workspai 0.66.0 → 0.68.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.
Files changed (149) hide show
  1. package/README.md +24 -22
  2. package/contracts/cli-runtime-command-inventory.v1.snapshot.json +4 -0
  3. package/contracts/extension-cli-compatibility.v1.json +4 -0
  4. package/contracts/published-contract-catalog.v1.json +20 -0
  5. package/contracts/runtime-command-surface.v1.json +55 -2
  6. package/contracts/workspace-activity-board.v1.json +120 -0
  7. package/contracts/workspace-activity-event.v1.json +31 -1
  8. package/contracts/workspace-activity-monitor-fleet.v1.json +18 -0
  9. package/contracts/workspace-activity-monitor-snapshot.v1.json +194 -0
  10. package/contracts/workspace-intelligence/workspace-intelligence-benchmark.v1.json +196 -0
  11. package/contracts/workspace-intelligence/workspace-knowledge-search.v1.json +1 -0
  12. package/contracts/workspace-intelligence-architecture.v1.json +17 -0
  13. package/contracts/workspace-intelligence-chain.v1.json +17 -0
  14. package/dist/analyze-JDEWUBC6.js +1 -0
  15. package/dist/{artifact-remediation-plan-M2XBS2IU.js → artifact-remediation-plan-I7IKC5MR.js} +1 -1
  16. package/dist/autopilot-release-OELUFNLL.js +1 -0
  17. package/dist/capabilities-command-RAAYENQ6.js +1 -0
  18. package/dist/chunk-25AWHAB5.js +2 -0
  19. package/dist/{chunk-QGAPGZPL.js → chunk-2C5XJBYI.js} +1 -1
  20. package/dist/{chunk-PJPS7CNH.js → chunk-2KX6KHEC.js} +1 -1
  21. package/dist/{chunk-JZJBA2V2.js → chunk-2MTJWPQ4.js} +1 -1
  22. package/dist/chunk-3BMYMZQB.js +1 -0
  23. package/dist/{chunk-VA5VSOBL.js → chunk-3KU3YUWD.js} +1 -1
  24. package/dist/{chunk-UPIPSSXY.js → chunk-3NF3M3RE.js} +1 -1
  25. package/dist/chunk-3OGPTLI2.js +1 -0
  26. package/dist/{chunk-EHH4SKVH.js → chunk-3XF7O66C.js} +3 -3
  27. package/dist/{chunk-WTWRSEOW.js → chunk-3Z4SVBMR.js} +1 -1
  28. package/dist/{chunk-NVND4727.js → chunk-46QH3ZVI.js} +1 -1
  29. package/dist/{chunk-XQFWUM2P.js → chunk-4WVOAX2V.js} +1 -1
  30. package/dist/{chunk-727IQFGN.js → chunk-5ME4W4LN.js} +1 -1
  31. package/dist/{chunk-IVF6NEHS.js → chunk-5OV2WXAR.js} +1 -1
  32. package/dist/{chunk-R2M5OJOK.js → chunk-5XUAAQSV.js} +2 -2
  33. package/dist/{chunk-IIFFEEMX.js → chunk-5YZ2W57R.js} +1 -1
  34. package/dist/{chunk-B4IVVTMQ.js → chunk-64XWHDZ3.js} +1 -1
  35. package/dist/{chunk-AP4PV6WJ.js → chunk-6E2Y3XGT.js} +1 -1
  36. package/dist/{chunk-4XEH3WNV.js → chunk-7DDEMDG2.js} +1 -1
  37. package/dist/{chunk-YX5VWPR5.js → chunk-7DZNZ3GM.js} +1 -1
  38. package/dist/{chunk-OI2VOU6S.js → chunk-BG6IX6HA.js} +1 -1
  39. package/dist/{chunk-6JX56VAL.js → chunk-BHM6RHTA.js} +1 -1
  40. package/dist/chunk-BMAFHX6A.js +1 -0
  41. package/dist/{chunk-3NM3JAZW.js → chunk-BUYLM6QV.js} +1 -1
  42. package/dist/{chunk-GAYK3WGV.js → chunk-C2VTO5WT.js} +1 -1
  43. package/dist/chunk-CPR2CMOY.js +1 -0
  44. package/dist/{chunk-PD7Y6HIM.js → chunk-CSZPE637.js} +1 -1
  45. package/dist/{chunk-5OA33JH2.js → chunk-D5LLTUTY.js} +1 -1
  46. package/dist/{chunk-3H5ACWWZ.js → chunk-DFVG4DDZ.js} +1 -1
  47. package/dist/{chunk-5XGR3LRI.js → chunk-EHLGPLIU.js} +1 -1
  48. package/dist/{chunk-334J2KIP.js → chunk-FPDH3N3A.js} +1 -1
  49. package/dist/{chunk-D4UHRJAP.js → chunk-FX5J6JCK.js} +1 -1
  50. package/dist/{chunk-DUBOKZMA.js → chunk-GVQKAINC.js} +12 -12
  51. package/dist/{chunk-XESFJN52.js → chunk-IKUFNK46.js} +1 -1
  52. package/dist/{chunk-AXUA7PFV.js → chunk-IXXQMD34.js} +1 -1
  53. package/dist/{chunk-HJLGXFMK.js → chunk-JYMO7QXQ.js} +1 -1
  54. package/dist/{chunk-JRP6WP5C.js → chunk-KDY4X7SQ.js} +1 -1
  55. package/dist/{chunk-L5Q2S5GY.js → chunk-KFTJVVJR.js} +1 -1
  56. package/dist/{chunk-SX6A656X.js → chunk-KY2GOSO5.js} +1 -1
  57. package/dist/chunk-LDBULT2T.js +4 -0
  58. package/dist/{chunk-VQOWB26M.js → chunk-LEOFD3W5.js} +1 -1
  59. package/dist/{chunk-L5CCIIF2.js → chunk-N5HPMATQ.js} +1 -1
  60. package/dist/{chunk-2PACEMNE.js → chunk-OFYY4725.js} +1 -1
  61. package/dist/{chunk-O37UBRMX.js → chunk-P3622IM5.js} +1 -1
  62. package/dist/{chunk-TABXSDTR.js → chunk-PKKSRXUS.js} +1 -1
  63. package/dist/{chunk-ZQH2I5RQ.js → chunk-Q7UGDNSM.js} +1 -1
  64. package/dist/{chunk-HLWDIIWL.js → chunk-QMQBX3RV.js} +1 -1
  65. package/dist/{chunk-TTHO4MFC.js → chunk-RVAOJOXA.js} +1 -1
  66. package/dist/{chunk-H5RJCS5E.js → chunk-SLFOUSRW.js} +1 -1
  67. package/dist/{chunk-7FF5EOIO.js → chunk-TCLKGPXF.js} +1 -1
  68. package/dist/chunk-TMRCPT7S.js +1 -0
  69. package/dist/{chunk-EP4CUWOO.js → chunk-VIN7NJW3.js} +1 -1
  70. package/dist/chunk-W37NOQVG.js +1 -0
  71. package/dist/chunk-W5VKBDSD.js +157 -0
  72. package/dist/{chunk-UOCERSAN.js → chunk-WRZSQDZV.js} +1 -1
  73. package/dist/{chunk-ECLMYTWT.js → chunk-Y4Z6CEII.js} +1 -1
  74. package/dist/{chunk-6UNATTB7.js → chunk-ZGHJIQXL.js} +1 -1
  75. package/dist/{create-SOLLXXAB.js → create-U5PQHOZ4.js} +1 -1
  76. package/dist/{demo-kit-5UQH2OXC.js → demo-kit-RKTHTXHJ.js} +1 -1
  77. package/dist/{doctor-NQ5PUCUP.js → doctor-D7YI7LSA.js} +1 -1
  78. package/dist/{dotnet-webapi-clean-YEHYIGOT.js → dotnet-webapi-clean-XL4IBUQV.js} +1 -1
  79. package/dist/{goal-lifecycle-IPNY7KNR.js → goal-lifecycle-BMS6GSIU.js} +1 -1
  80. package/dist/{goal-pack-2WV3EA4Y.js → goal-pack-RBSVQMMX.js} +1 -1
  81. package/dist/{gofiber-standard-C44IIQYH.js → gofiber-standard-OHHMCNMJ.js} +1 -1
  82. package/dist/{gogin-standard-X7VKACVR.js → gogin-standard-BAZXPOKL.js} +1 -1
  83. package/dist/index.d.ts +14 -2
  84. package/dist/index.js +129 -129
  85. package/dist/live-command-GNAASZ7U.js +15 -0
  86. package/dist/{pipeline-MIMENSI7.js → pipeline-QOMXH2EK.js} +1 -1
  87. package/dist/{project-agent-entry-OWLJ3IHQ.js → project-agent-entry-MH7364BE.js} +1 -1
  88. package/dist/{project-intelligence-lens-I67EO6AE.js → project-intelligence-lens-ZCCHUKVI.js} +1 -1
  89. package/dist/{project-test-coverage-OPDVSFPH.js → project-test-coverage-JPWTBSSJ.js} +1 -1
  90. package/dist/{rust-axum-JKZTZDRZ.js → rust-axum-CCJ6UCBW.js} +1 -1
  91. package/dist/{springboot-standard-PI4FLTAN.js → springboot-standard-M5JQEJML.js} +1 -1
  92. package/dist/{verified-goal-46JWNCDY.js → verified-goal-XUXU2X5H.js} +1 -1
  93. package/dist/{workspace-KO37XHF6.js → workspace-B33BFZZ3.js} +1 -1
  94. package/dist/{workspace-agent-sync-32FIJQBH.js → workspace-agent-sync-T3MJO2MX.js} +1 -1
  95. package/dist/{workspace-archive-6R5DRNZW.js → workspace-archive-NOSGRKRZ.js} +1 -1
  96. package/dist/{workspace-context-JKRPX775.js → workspace-context-KOCEP4MJ.js} +1 -1
  97. package/dist/{workspace-contract-4T3NYNK5.js → workspace-contract-MQ3QE52V.js} +1 -1
  98. package/dist/workspace-explain-DTFCKYXK.js +1 -0
  99. package/dist/workspace-explain-contract-WMREJWHF.js +1 -0
  100. package/dist/{workspace-feedback-6VQ7T4CR.js → workspace-feedback-3YLIUFQ7.js} +1 -1
  101. package/dist/{workspace-foundation-GHWO3BZU.js → workspace-foundation-O7O3QIS4.js} +1 -1
  102. package/dist/{workspace-graph-stream-PTVS47NJ.js → workspace-graph-stream-XTGGBD7D.js} +1 -1
  103. package/dist/workspace-graph-token-efficiency-5LJKQU2J.js +1 -0
  104. package/dist/{workspace-history-M2K4M2JY.js → workspace-history-7HDZZ4G5.js} +1 -1
  105. package/dist/{workspace-intelligence-PJIPTXL3.js → workspace-intelligence-TFEQBPUP.js} +1 -1
  106. package/dist/workspace-intelligence-benchmark-PLVUBGWO.js +1 -0
  107. package/dist/workspace-intelligence-evaluation-OJIQS5SN.js +1 -0
  108. package/dist/{workspace-intelligence-runner-M47QR3JM.js → workspace-intelligence-runner-6ZAV6RO4.js} +1 -1
  109. package/dist/{workspace-intelligence-runtime-registry-FFGQF4A7.js → workspace-intelligence-runtime-registry-UKFB3BI7.js} +1 -1
  110. package/dist/{workspace-knowledge-graph-V2EAYDCL.js → workspace-knowledge-graph-AUXYL3L6.js} +1 -1
  111. package/dist/{workspace-knowledge-graph-contract-VANN7RCA.js → workspace-knowledge-graph-contract-X52KXBXJ.js} +1 -1
  112. package/dist/{workspace-knowledge-graph-query-RASPF7FS.js → workspace-knowledge-graph-query-A7TKONWY.js} +1 -1
  113. package/dist/workspace-knowledge-graph-snapshot-GPBDAKAU.js +1 -0
  114. package/dist/{workspace-mcp-serve-YRORNE4P.js → workspace-mcp-serve-TDUXJUAA.js} +1 -1
  115. package/dist/{workspace-model-VSVKLX7M.js → workspace-model-GVXNLSQM.js} +1 -1
  116. package/dist/{workspace-onboarding-2VMJZVLZ.js → workspace-onboarding-ECZ2KJ2A.js} +1 -1
  117. package/dist/{workspace-readme-6X3GLTBM.js → workspace-readme-6N5Y2ZSJ.js} +1 -1
  118. package/dist/{workspace-registry-summary-QVSJKKTX.js → workspace-registry-summary-5SFBTRGQ.js} +1 -1
  119. package/dist/{workspace-repair-engine-WSKV3Q4V.js → workspace-repair-engine-CKJCTWKX.js} +1 -1
  120. package/dist/workspace-run-ZZ5WHL7W.js +1 -0
  121. package/dist/{workspace-verify-EJCSOBIK.js → workspace-verify-D3QTMAUI.js} +1 -1
  122. package/dist/{workspace-watch-JTIFBF4Z.js → workspace-watch-XYJEW2Z2.js} +1 -1
  123. package/docs/DEVELOPMENT.md +19 -0
  124. package/docs/README.md +19 -16
  125. package/docs/ci-workflows.md +1 -1
  126. package/docs/commands-reference.md +20 -2
  127. package/docs/contracts/ARTIFACT_CATALOG.md +1 -0
  128. package/docs/contracts/README.md +3 -0
  129. package/docs/workspace-intelligence-benchmark.md +82 -0
  130. package/docs/workspace-knowledge-graph.md +1 -0
  131. package/docs/workspace-live-activity.md +29 -5
  132. package/package.json +4 -2
  133. package/dist/analyze-UJQWGNM2.js +0 -1
  134. package/dist/autopilot-release-U6F4M2BQ.js +0 -1
  135. package/dist/capabilities-command-XUKPO25Z.js +0 -1
  136. package/dist/chunk-5TY74LLW.js +0 -2
  137. package/dist/chunk-5U4L6VF2.js +0 -1
  138. package/dist/chunk-C4S22E6S.js +0 -1
  139. package/dist/chunk-H7MRINGP.js +0 -1
  140. package/dist/chunk-JC4XSU7G.js +0 -1
  141. package/dist/chunk-MZ7U4BIQ.js +0 -157
  142. package/dist/chunk-UTV4DTNM.js +0 -1
  143. package/dist/live-command-Q6E45N7S.js +0 -18
  144. package/dist/workspace-explain-MOGL4GEA.js +0 -1
  145. package/dist/workspace-explain-contract-W2E6LF4Q.js +0 -1
  146. package/dist/workspace-graph-token-efficiency-Z5JD5NHI.js +0 -1
  147. package/dist/workspace-intelligence-evaluation-GONCRE6O.js +0 -1
  148. package/dist/workspace-knowledge-graph-snapshot-5YIG6EMG.js +0 -1
  149. package/dist/workspace-run-3BXKTLVL.js +0 -1
@@ -0,0 +1,196 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://workspai.dev/schemas/workspace-intelligence/workspace-intelligence-benchmark.v1.json",
4
+ "title": "Workspai Workspace Intelligence Benchmark",
5
+ "description": "A deterministic multi-scenario retrieval benchmark with an optional, separately classified evaluation measurement. Estimated retrieval reduction is never represented as measured model savings.",
6
+ "type": "object",
7
+ "required": [
8
+ "schemaVersion",
9
+ "generatedAt",
10
+ "workspace",
11
+ "suite",
12
+ "graph",
13
+ "methodology",
14
+ "corpus",
15
+ "scenarios",
16
+ "retrievalSummary",
17
+ "evaluation"
18
+ ],
19
+ "properties": {
20
+ "schemaVersion": { "const": "workspace-intelligence-benchmark.v1" },
21
+ "generatedAt": { "type": "string", "format": "date-time" },
22
+ "workspace": {
23
+ "type": "object",
24
+ "required": ["name", "path"],
25
+ "properties": {
26
+ "name": { "type": "string", "minLength": 1 },
27
+ "path": { "type": "string", "minLength": 1 }
28
+ },
29
+ "additionalProperties": false
30
+ },
31
+ "suite": {
32
+ "type": "object",
33
+ "required": ["id", "version", "title"],
34
+ "properties": {
35
+ "id": { "const": "agent-core.v1" },
36
+ "version": { "const": 1 },
37
+ "title": { "type": "string", "minLength": 1 }
38
+ },
39
+ "additionalProperties": false
40
+ },
41
+ "graph": {
42
+ "type": "object",
43
+ "required": [
44
+ "schemaVersion",
45
+ "sourceArtifact",
46
+ "sourceHash",
47
+ "entityCount",
48
+ "relationCount",
49
+ "proofCount"
50
+ ],
51
+ "properties": {
52
+ "schemaVersion": { "const": "workspace-knowledge-graph.v1" },
53
+ "sourceArtifact": { "type": "string", "minLength": 1 },
54
+ "sourceHash": { "type": "string", "pattern": "^[a-f0-9]{64}$" },
55
+ "entityCount": { "type": "integer", "minimum": 0 },
56
+ "relationCount": { "type": "integer", "minimum": 0 },
57
+ "proofCount": { "type": "integer", "minimum": 0 }
58
+ },
59
+ "additionalProperties": false
60
+ },
61
+ "methodology": {
62
+ "type": "object",
63
+ "required": [
64
+ "id",
65
+ "charsPerEstimatedToken",
66
+ "deterministic",
67
+ "networkRequired",
68
+ "scenarioTargetPolicy",
69
+ "claimBoundary"
70
+ ],
71
+ "properties": {
72
+ "id": { "const": "multi-scenario-bounded-retrieval.v1" },
73
+ "charsPerEstimatedToken": { "const": 4 },
74
+ "deterministic": { "const": true },
75
+ "networkRequired": { "const": false },
76
+ "scenarioTargetPolicy": { "const": "evidence-backed-representative.v1" },
77
+ "claimBoundary": { "type": "string", "minLength": 1 }
78
+ },
79
+ "additionalProperties": false
80
+ },
81
+ "corpus": { "$ref": "#/$defs/corpus" },
82
+ "scenarios": {
83
+ "type": "array",
84
+ "minItems": 1,
85
+ "items": { "$ref": "#/$defs/scenario" }
86
+ },
87
+ "retrievalSummary": {
88
+ "type": "object",
89
+ "required": [
90
+ "provenance",
91
+ "scenarioCount",
92
+ "matchedScenarioCount",
93
+ "medianRetrievalEstimatedTokens",
94
+ "p95RetrievalEstimatedTokens",
95
+ "medianEstimatedReductionPercent",
96
+ "status"
97
+ ],
98
+ "properties": {
99
+ "provenance": { "const": "estimated" },
100
+ "scenarioCount": { "type": "integer", "minimum": 1 },
101
+ "matchedScenarioCount": { "type": "integer", "minimum": 0 },
102
+ "medianRetrievalEstimatedTokens": { "type": "integer", "minimum": 0 },
103
+ "p95RetrievalEstimatedTokens": { "type": "integer", "minimum": 0 },
104
+ "medianEstimatedReductionPercent": { "type": "number", "minimum": 0, "maximum": 100 },
105
+ "status": { "enum": ["passed", "partial", "unavailable"] }
106
+ },
107
+ "additionalProperties": false
108
+ },
109
+ "evaluation": {
110
+ "type": "object",
111
+ "required": [
112
+ "availability",
113
+ "provenance",
114
+ "trustedMeasuredReductionPercent",
115
+ "claimBoundary"
116
+ ],
117
+ "properties": {
118
+ "availability": { "enum": ["available", "unavailable"] },
119
+ "provenance": { "enum": ["measured", "mixed", "estimated", "unavailable"] },
120
+ "current": { "$ref": "#/$defs/currentEvaluation" },
121
+ "comparison": { "$ref": "workspace-intelligence-evaluation-comparison.v1.json" },
122
+ "trustedMeasuredReductionPercent": { "type": ["number", "null"] },
123
+ "claimBoundary": { "type": "string", "minLength": 1 }
124
+ },
125
+ "additionalProperties": false
126
+ }
127
+ },
128
+ "additionalProperties": false,
129
+ "$defs": {
130
+ "corpus": {
131
+ "type": "object",
132
+ "required": ["artifactCount", "characterCount", "estimatedTokens", "unreadableArtifacts"],
133
+ "properties": {
134
+ "artifactCount": { "type": "integer", "minimum": 0 },
135
+ "characterCount": { "type": "integer", "minimum": 0 },
136
+ "estimatedTokens": { "type": "integer", "minimum": 0 },
137
+ "unreadableArtifacts": {
138
+ "type": "array",
139
+ "items": { "type": "string" },
140
+ "uniqueItems": true
141
+ }
142
+ },
143
+ "additionalProperties": false
144
+ },
145
+ "scenario": {
146
+ "type": "object",
147
+ "required": [
148
+ "id",
149
+ "title",
150
+ "query",
151
+ "queryOrigin",
152
+ "targetEntityId",
153
+ "targetKind",
154
+ "targetRetrieved",
155
+ "result",
156
+ "matchCount",
157
+ "truncated",
158
+ "retrievalCharacterCount",
159
+ "retrievalEstimatedTokens",
160
+ "estimatedTokensAvoided",
161
+ "estimatedReductionPercent"
162
+ ],
163
+ "properties": {
164
+ "id": { "type": "string", "minLength": 1 },
165
+ "title": { "type": "string", "minLength": 1 },
166
+ "query": { "type": "string", "minLength": 1 },
167
+ "queryOrigin": { "const": "graph-derived" },
168
+ "targetEntityId": { "type": "string", "minLength": 1 },
169
+ "targetKind": { "type": "string", "minLength": 1 },
170
+ "targetRetrieved": { "type": "boolean" },
171
+ "result": { "enum": ["matched", "empty"] },
172
+ "matchCount": { "type": "integer", "minimum": 0, "maximum": 100 },
173
+ "truncated": { "type": "boolean" },
174
+ "retrievalCharacterCount": { "type": "integer", "minimum": 0 },
175
+ "retrievalEstimatedTokens": { "type": "integer", "minimum": 0 },
176
+ "estimatedTokensAvoided": { "type": "integer", "minimum": 0 },
177
+ "estimatedReductionPercent": { "type": "number", "minimum": 0, "maximum": 100 }
178
+ },
179
+ "additionalProperties": false
180
+ },
181
+ "currentEvaluation": {
182
+ "type": "object",
183
+ "required": ["runId", "taskId", "strategy", "status", "summary"],
184
+ "properties": {
185
+ "runId": { "type": "string", "minLength": 1 },
186
+ "taskId": { "type": "string", "minLength": 1 },
187
+ "strategy": {
188
+ "enum": ["full-corpus", "grep", "vector", "graph", "workspace-intelligence", "custom"]
189
+ },
190
+ "status": { "enum": ["live", "completed", "aborted"] },
191
+ "summary": { "$ref": "workspace-intelligence-evaluation.v1.json#/properties/summary" }
192
+ },
193
+ "additionalProperties": false
194
+ }
195
+ }
196
+ }
@@ -18,6 +18,7 @@
18
18
  ],
19
19
  "properties": {
20
20
  "schemaVersion": { "const": "workspace-knowledge-search.v1" },
21
+ "graphSourceHash": { "type": "string", "pattern": "^[a-f0-9]{64}$" },
21
22
  "query": { "type": "string", "minLength": 1 },
22
23
  "kind": {
23
24
  "oneOf": [
@@ -304,6 +304,7 @@
304
304
  "workspace graph path",
305
305
  "workspace graph search",
306
306
  "workspace graph benchmark",
307
+ "workspace graph benchmark-suite",
307
308
  "workspace graph overlay",
308
309
  "workspace graph dot",
309
310
  "workspace graph mermaid",
@@ -315,6 +316,9 @@
315
316
  ".workspai/reports/workspace-model.json",
316
317
  ".workspai/reports/workspace-knowledge-graph.json"
317
318
  ],
319
+ "produces": [
320
+ ".workspai/reports/workspace-intelligence-benchmark-last-run.json"
321
+ ],
318
322
  "role": "Query the proof-backed graph derived from the canonical workspace model.",
319
323
  "chainStep": false
320
324
  },
@@ -338,6 +342,19 @@
338
342
  "role": "Measure model usage, activity, cost provenance, and verified outcomes without storing prompt or response bodies.",
339
343
  "chainStep": false
340
344
  },
345
+ {
346
+ "id": "activity",
347
+ "commands": [
348
+ "live",
349
+ "live --json --projection monitor",
350
+ "live --json --projection board"
351
+ ],
352
+ "reads": [
353
+ "local workspace activity journals"
354
+ ],
355
+ "role": "Project observational command activity into versioned monitor and renderer-neutral board contracts without treating activity as verification evidence.",
356
+ "chainStep": false
357
+ },
341
358
  {
342
359
  "id": "watch",
343
360
  "commands": [
@@ -525,6 +525,7 @@
525
525
  "workspace graph path",
526
526
  "workspace graph search",
527
527
  "workspace graph benchmark",
528
+ "workspace graph benchmark-suite",
528
529
  "workspace graph overlay",
529
530
  "workspace graph dot",
530
531
  "workspace graph mermaid",
@@ -536,6 +537,9 @@
536
537
  ".workspai/reports/workspace-model.json",
537
538
  ".workspai/reports/workspace-knowledge-graph.json"
538
539
  ],
540
+ "produces": [
541
+ ".workspai/reports/workspace-intelligence-benchmark-last-run.json"
542
+ ],
539
543
  "role": "Query the proof-backed graph derived from the canonical workspace model.",
540
544
  "chainStep": false
541
545
  },
@@ -559,6 +563,19 @@
559
563
  "role": "Measure model usage, activity, cost provenance, and verified outcomes without storing prompt or response bodies.",
560
564
  "chainStep": false
561
565
  },
566
+ {
567
+ "id": "activity",
568
+ "commands": [
569
+ "live",
570
+ "live --json --projection monitor",
571
+ "live --json --projection board"
572
+ ],
573
+ "reads": [
574
+ "local workspace activity journals"
575
+ ],
576
+ "role": "Project observational command activity into versioned monitor and renderer-neutral board contracts without treating activity as verification evidence.",
577
+ "chainStep": false
578
+ },
562
579
  {
563
580
  "id": "watch",
564
581
  "commands": [
@@ -0,0 +1 @@
1
+ export{b as printAnalyzeReport,a as runAnalyze}from'./chunk-VIN7NJW3.js';
@@ -1 +1 @@
1
- export{a as buildArtifactRemediationPlan,b as writeArtifactRemediationPlan}from'./chunk-YX5VWPR5.js';
1
+ export{a as buildArtifactRemediationPlan,b as writeArtifactRemediationPlan}from'./chunk-7DZNZ3GM.js';
@@ -0,0 +1 @@
1
+ export{b as AUTOPILOT_RELEASE_ALIAS_FILENAME,a as AUTOPILOT_RELEASE_LAST_RUN_FILENAME,c as runAutopilotRelease}from'./chunk-5YZ2W57R.js';
@@ -0,0 +1 @@
1
+ export{b as runDoctorCapabilities}from'./chunk-DFVG4DDZ.js';
@@ -0,0 +1,2 @@
1
+ import {e,i as i$1,h as h$1,g as g$1,f,a}from'./chunk-W37NOQVG.js';import E from'crypto';import g from'fs';import k from'path';var i=null,h=/(?:authorization|cookie|credential|password|passwd|secret|token|api[-_]?key)/i;function R(e,t){return t.WORKSPAI_ACTIVITY_DISABLE==="1"||(t.VITEST==="true"||t.VITEST==="1"||t.NODE_ENV==="test")&&t.WORKSPAI_ACTIVITY_FORCE!=="1"?true:e[0]==="live"}function m(e,t="",n=0){if(h.test(t))return "[REDACTED]";if(n>4)return "[TRUNCATED]";if(e!==void 0){if(e===null||typeof e=="number"||typeof e=="boolean")return e;if(typeof e=="string")return l(e);if(Array.isArray(e))return e.slice(0,100).map(o=>m(o,t,n+1));if(e instanceof Error)return {name:e.name,message:l(e.message)};if(typeof e=="object"){let o={};for(let[s,r]of Object.entries(e).slice(0,100))o[s]=m(r,s,n+1);return o}return String(e)}}function l(e){let t=e;for(let n of i?.sensitiveValues??[])n.length>=3&&(t=t.split(n).join("[REDACTED]"));if(t=t.replace(/((?:authorization|cookie|credential|password|passwd|secret|token|api[-_]?key)\s*[=:]\s*)(?:"[^"]*"|'[^']*'|[^\s,;]+)/gi,"$1[REDACTED]"),t=t.replace(/\bBearer\s+[^\s,;]+/gi,"Bearer [REDACTED]"),i){let n=i.resolvedScope.observationRootPath,o=[n,i.resolvedScope.rootPath].sort((s,r)=>r.length-s.length);for(let s of new Set(o))t=t.split(s).join("."),k.sep==="\\"&&(t=t.split(s.replaceAll("\\","/")).join("."));t=t.replace(/(^|[\s("'=])((?:[A-Za-z]:[\\/]|\/)(?!\/)[^\s"',;)\]}]+)/g,(s,r,a)=>`${r}${g$1(n,a)}`);}return t.length>2e3?`${t.slice(0,2e3)}\u2026`:t}function S(e,t){return e.startsWith("-")?h.test(e)?true:t.some(o=>/^(?:set|add|update|rotate)-(?:api-)?(?:key|token|secret|password)$/i.test(o))&&/^--?key$/i.test(e):false}function w(e){let t=[],n=false;for(let o of e){if(n){o.length>0&&t.push(o),n=false;continue}let s=o.indexOf("="),r=s>=0?o.slice(0,s):o;if(S(r,e))if(s>=0){let a=o.slice(s+1);a.length>0&&t.push(a);}else n=true;}return [...new Set(t)]}function B(e,t){let n=false;return e.map(o=>{if(n)return n=false,"[REDACTED]";let s=o.indexOf("="),r=s>=0?o.slice(0,s):o;return S(r,e)?s>=0?`${r}=[REDACTED]`:(n=true,o):k.isAbsolute(o)?g$1(t,o):o.length>300?`${o.slice(0,300)}\u2026`:o})}function P(e){if(e)return m(e)}function d(e){if(!i||i.finalized)return null;let t;if(e.blockId&&e.kind.startsWith("block.")&&e.kind!=="block.planned"){let r=i.blockAttempts.get(e.blockId)??0,a=i.blockStatuses.get(e.blockId);e.kind==="block.started"?t=a==="running"?Math.max(1,r):r+1:(e.kind!=="block.skipped"||r>0)&&(t=Math.max(1,r));}let n={schemaVersion:a,eventId:E.randomUUID(),sequence:++i.sequence,timestamp:new Date().toISOString(),runId:i.runId,...i.parentRunId?{parentRunId:i.parentRunId}:{},scope:i.resolvedScope.scope,...e,origin:f(i.resolvedScope),...t!==void 0?{attempt:t}:{},component:l(e.component),message:l(e.message),...e.target?{target:{...e.target,...e.target.locator?{locator:l(e.target.locator)}:{},...e.target.operation?{operation:l(e.target.operation)}:{}}}:{},...e.evidenceBindings?{evidenceBindings:e.evidenceBindings.slice(0,100).map(r=>({...r,ref:l(r.ref),...r.graphSourceHash?{graphSourceHash:l(r.graphSourceHash)}:{}}))}:{},...e.attributes?{attributes:P(e.attributes)}:{}},o=`${JSON.stringify(n)}
2
+ `,s=false;for(let r of i.fds)try{g.writeSync(r,o),s=true;}catch{}return s&&n.blockId&&n.kind.startsWith("block.")&&(i.blockStatuses.set(n.blockId,n.status),n.attempt!==void 0&&i.blockAttempts.set(n.blockId,n.attempt)),s?n:null}function O(e$1){let t=e$1.env??process.env;if(!R(e$1.command,t)){T(1,"Previous in-process activity run was superseded.");try{let n=e(e$1.cwd,{env:t}),s=[n.statePath,...n.mirrorStatePaths].map(c=>{let f=k.join(c,"runs");return g.mkdirSync(f,{recursive:true,mode:448}),i$1(f,{maxRuns:h$1-1}),k.join(f,`${e$1.runId}.ndjson`)}),r=[];try{for(let c of s)r.push(g.openSync(c,"a",384));}catch(c){for(let f of r)try{g.closeSync(f);}catch{}throw c}let a=w(e$1.command),u=B(e$1.command,n.observationRootPath);i={runId:e$1.runId,...e$1.parentRunId?{parentRunId:e$1.parentRunId}:{},command:u,sensitiveValues:a,startedAtMs:Date.now(),sequence:0,fds:r,journalPaths:s,resolvedScope:n,...e$1.blueprint?.nodes[0]?.id?{rootBlockId:e$1.blueprint.nodes[0].id}:{},blockStatuses:new Map,blockAttempts:new Map,finalized:false},d({kind:"run.started",status:"running",component:"cli",message:u.length>0?`workspai ${u.join(" ")}`:"workspai",attributes:{command:u,rapidkitVersion:e$1.rapidkitVersion,pid:process.pid,blueprintId:e$1.blueprint?.id,blueprintVersion:e$1.blueprint?.version}});for(let c of e$1.blueprint?.nodes??[])d({kind:"block.planned",status:"planned",component:"cli",blockId:c.id,parentSpanId:c.parentId,message:c.label,attributes:{order:c.order,layoutHint:c.layoutHint,group:c.group},...c.evidenceBindings?{evidenceBindings:c.evidenceBindings}:{}});for(let c of e$1.blueprint?.edges??[])d({kind:"edge.declared",status:"planned",component:"cli",message:`${c.from} -> ${c.to}`,edge:{id:c.id,fromBlockId:c.from,toBlockId:c.to,kind:c.kind},attributes:{order:c.order}});i.rootBlockId&&d({kind:"block.started",status:"running",component:"cli",blockId:i.rootBlockId,message:e$1.blueprint?.nodes[0]?.label??"Workspai command"});}catch{i=null;}}}function j(e){return d(e)}function H(e){let t=e.status==="planned"?"block.planned":e.status==="running"?e.progress?"block.progress":"block.started":e.status==="succeeded"?"block.completed":e.status==="failed"?"block.failed":e.status==="blocked"?"block.blocked":e.status==="skipped"?"block.skipped":"block.progress";return d({kind:t,status:e.status,component:e.component??"cli",blockId:e.blockId,message:e.message,...e.progress?{progress:e.progress}:{},...e.attributes?{attributes:e.attributes}:{},...e.evidenceBindings?{evidenceBindings:e.evidenceBindings}:{}})}function K(e){let t=i?g$1(i.resolvedScope.observationRootPath,k.resolve(e.workspacePath,e.relativePath)):e.relativePath.replaceAll("\\","/"),n=i?[...i.blockStatuses.entries()].filter(([s,r])=>s!==i?.rootBlockId&&r==="running").map(([s])=>s):[],o=e.blockId??(n.length===1?n[0]:void 0);return d({kind:"artifact.published",status:"succeeded",component:"artifact-store",message:`Published ${t}`,...o?{blockId:o}:{},target:{kind:"artifact",locator:t,operation:e.operation??"publish",provenance:"authoritative"},evidenceBindings:[{kind:"artifact",ref:t,role:"output",provenance:"authoritative"}]})}function L(e){if(!i)return null;let t=g$1(i.resolvedScope.observationRootPath,e.targetPath);return d({kind:e.status==="planned"?"touch.planned":"touch.observed",status:e.status??"succeeded",component:"filesystem",message:e.message??`${e.operation} ${t}`,target:{kind:"file",locator:t,operation:e.operation,provenance:e.provenance??"authoritative"}})}function T(e,t){if(!i||i.finalized)return;let n=i,o=Date.now()-n.startedAtMs;for(let[s,r]of [...n.blockStatuses.entries()]){if(s===n.rootBlockId||r!=="planned"&&r!=="running")continue;let a=r==="running",u=e===130||e===143;d({kind:a?e===0?"block.completed":u?"block.blocked":"block.failed":"block.skipped",status:a?e===0?"succeeded":u?"cancelled":"failed":"skipped",component:"cli",blockId:s,message:a?e===0?"Stage completed with command":t??`Stage interrupted by command exit ${e}`:"Stage was not entered",durationMs:o,attributes:{finalizedByRun:true}});}n.rootBlockId&&d({kind:e===0?"block.completed":e===130||e===143?"block.blocked":"block.failed",status:e===0?"succeeded":e===130||e===143?"cancelled":"failed",component:"cli",blockId:n.rootBlockId,message:t??(e===0?"Command completed":`Command exited with code ${e}`),durationMs:o}),d({kind:e===0?"run.completed":e===130||e===143?"run.cancelled":"run.failed",status:e===0?"succeeded":e===130||e===143?"cancelled":"failed",component:"cli",message:t??(e===0?"CLI run completed":`CLI run exited with code ${e}`),durationMs:o,attributes:{exitCode:e}}),n.finalized=true;for(let s of n.fds)try{g.closeSync(s);}catch{}i=null;}export{O as a,j as b,H as c,K as d,L as e,T as f};
@@ -1,4 +1,4 @@
1
- import {a as a$e}from'./chunk-WCJU3CFG.js';import {a as a$9}from'./chunk-3H5ACWWZ.js';import {a as a$c}from'./chunk-ZEEV5J4I.js';import {c,b,e as e$2,d as d$1}from'./chunk-727IQFGN.js';import {b as b$1}from'./chunk-B6FJ6RG6.js';import {j,g}from'./chunk-L5CCIIF2.js';import {d as d$3}from'./chunk-JC4XSU7G.js';import {f as f$1,e as e$4}from'./chunk-SX6A656X.js';import {a as a$1,b as b$2}from'./chunk-HLWDIIWL.js';import {c as c$4,a as a$7,d as d$2,b as b$5}from'./chunk-3NM3JAZW.js';import {a,c as c$5,h as h$1,g as g$1,k as k$1,f as f$3,d as d$5,e as e$6,i as i$1,j as j$3}from'./chunk-AO2ZI42U.js';import {c as c$3}from'./chunk-ZQH2I5RQ.js';import {a as a$6,b as b$3}from'./chunk-VQOWB26M.js';import {b as b$4}from'./chunk-JZJBA2V2.js';import {a as a$4}from'./chunk-NMXGSVMD.js';import {a as a$3}from'./chunk-7FF5EOIO.js';import {z}from'./chunk-L5Q2S5GY.js';import {j as j$2,l,m as m$1,d as d$4,e as e$5,b as b$7,a as a$d}from'./chunk-U5ENEDJA.js';import {a as a$b}from'./chunk-GR6442P7.js';import {d,e as e$3,f as f$2}from'./chunk-GAYK3WGV.js';import {a as a$5}from'./chunk-AFIFZTOY.js';import {a as a$2}from'./chunk-2LIVMG5C.js';import {e,i,h}from'./chunk-6UNATTB7.js';import {e as e$1}from'./chunk-TABXSDTR.js';import {a as a$a}from'./chunk-TQEMLBAG.js';import {c as c$1}from'./chunk-5TY74LLW.js';import {c as c$2,j as j$1,b as b$6,t as t$1,n,p,m as m$2}from'./chunk-RGNCL5OB.js';import {a as a$8}from'./chunk-2FIX2MDC.js';import {t,k,u as u$1}from'./chunk-VQZ5PI5J.js';import f from'chalk';import {createHash}from'crypto';import {execa}from'execa';import m from'fs-extra';import u from'path';import {existsSync}from'fs';var Vi=[".eslintrc.js",".eslintrc.cjs",".eslintrc.json",".eslintrc.yaml",".eslintrc.yml","eslint.config.js","eslint.config.mjs","eslint.config.cjs"],zi=["tests","test","src/test","__tests__","e2e","playwright","cypress"],Ji=["vitest.config.ts","vitest.config.js","vitest.config.mjs","jest.config.js","jest.config.ts","jest.config.mjs","playwright.config.ts","playwright.config.js","cypress.config.js","cypress.config.ts"],Ui=["src","app","pages"],Yi=["dev","build","test","lint"];function Yn(e){let t=e?.scripts;if(!t||typeof t!="object"||Array.isArray(t))return {};let i={};for(let[n,o]of Object.entries(t))typeof o=="string"&&o.trim().length>0&&(i[n]=o);return i}async function Zn(e,t){for(let o of Vi)if(await m.pathExists(u.join(e,o)))return true;let i=t??(await m.pathExists(u.join(e,"package.json"))?await m.readJson(u.join(e,"package.json")):null);if(!i)return false;if(i.eslintConfig)return true;let n={...i.dependencies??{},...i.devDependencies??{}};return !!(n.eslint||n["@eslint/js"]||n["@eslint/eslintrc"])}async function Xn(e,t){for(let o of zi)if(await m.pathExists(u.join(e,o)))return true;for(let o of Ji)if(await m.pathExists(u.join(e,o)))return true;let i=Yn(t);if(i.test||i["test:unit"]||i["test:e2e"]||i["test:ci"]||i["test:watch"])return true;let n={...t?.dependencies??{},...t?.devDependencies??{}};return n.vitest||n.jest||n["@playwright/test"]||n.cypress?true:await Zi(e)}async function Zi(e){let t=["src","app","pages","components"],i=/\.(test|spec)\.(tsx?|jsx?|vue|svelte)$/i,o=new Set(["node_modules",".git","dist","build",".next","coverage",".turbo"]);for(let s of t){let r=u.join(e,s);if(!await m.pathExists(r))continue;let c=[{dir:r,depth:0}];for(;c.length>0;){let a=c.shift();if(!a)break;let l=[];try{l=await m.readdir(a.dir);}catch{continue}for(let d of l){let p=u.join(a.dir,d);if(i.test(d))return true;if(!(a.depth>=3||o.has(d)||d.startsWith(".")))try{(await m.stat(p)).isDirectory()&&c.push({dir:p,depth:a.depth+1});}catch{continue}}}}return false}async function Ut(e){for(let t of Ui){let i=u.join(e,t);if(await m.pathExists(i))try{if((await m.readdir(i)).some(o=>!o.startsWith(".")))return true}catch{continue}}return false}function Xi(e){let t=e.key;return b$7(t).key}function Qi(e,t,i){return a$d(t,i).some(o=>!!e[o])}async function Qn(e){let{projectPath:t,detection:i,packageJsonData:n}=e,o=Xi(i),s=b$7(o),r=Yn(n),c=[],a=await m.pathExists(u.join(t,"package-lock.json"))||await m.pathExists(u.join(t,"pnpm-lock.yaml"))||await m.pathExists(u.join(t,"yarn.lock"))||await m.pathExists(u.join(t,"bun.lockb"));c.push({id:"frontend-lockfile-integrity",label:"Frontend lockfile integrity",status:a?"pass":"warn",severity:"warn",scope:"project-scoped",reason:a?"Node lockfile detected for deterministic dependency restore.":"No Node lockfile detected (package-lock/yarn.lock/pnpm-lock.yaml/bun.lockb).",recommendation:a?void 0:"Commit a lockfile for deterministic installs and CI parity."});let l=await m.pathExists(u.join(t,"tsconfig.json")),d=await m.pathExists(u.join(t,"jsconfig.json")),p=l||d;c.push({id:"frontend-typescript-surface",label:"TypeScript project surface",status:p?"pass":"warn",severity:"warn",scope:"project-scoped",reason:p?l?"tsconfig.json detected.":"jsconfig.json detected.":"No tsconfig.json or jsconfig.json detected.",recommendation:p?void 0:"Add tsconfig.json (or jsconfig.json) for typed frontend builds and IDE parity."});let y=s.fileHints.length>0&&s.fileHints.some(k=>existsSync(u.join(t,k)));c.push({id:"frontend-framework-config",label:`${s.displayName} config surface`,status:y?"pass":"warn",severity:"warn",scope:"project-scoped",reason:y?`${s.displayName} configuration artifacts detected.`:`No ${s.displayName} config markers detected (${s.fileHints.join(", ")||"n/a"}).`,recommendation:y?void 0:"Keep framework config files in-repo for reproducible dev/build behavior."});for(let k of Yi){let v=Qi(r,o,k),b=k==="dev"||k==="build",j=!v&&k==="test"?h$1({projectPath:t,frameworkDisplayName:s.displayName,scriptName:k,scriptValue:g$1(r)}):void 0;c.push({id:`frontend-script-${k}`,label:`${k} script surface`,status:v?"pass":b?"fail":"warn",severity:b?"error":"warn",scope:"project-scoped",reason:v?`package.json exposes a ${k} script for ${s.displayName}.`:`No ${k} script detected for ${s.displayName}.`,recommendation:v?void 0:`Add a "${a$d(o,k)[0]??k}" script to package.json.`,repairCapability:j});}let h=await Ut(t);return c.push({id:"frontend-source-tree",label:"Frontend source tree",status:h?"pass":"warn",severity:"warn",scope:"project-scoped",reason:h?"Application source directories detected (src/app/pages).":"No frontend source directories detected under src/, app/, or pages/.",recommendation:h?void 0:"Ensure the scaffolded application tree exists before running lifecycle commands."}),c}var eo=["python","node","go","java","rust","elixir","clojure","deno","bun","php","ruby","dotnet","scala","kotlin","c","cpp","unknown"],ei={node:["package-lock.json","pnpm-lock.yaml","yarn.lock","bun.lock","bun.lockb"],deno:["deno.lock"],bun:["bun.lock","bun.lockb"],python:["uv.lock","poetry.lock","requirements.txt","requirements.lock"],go:["go.sum"],java:["gradle.lockfile","gradle/libs.versions.toml"],rust:["Cargo.lock"],elixir:["mix.lock"],clojure:["deps.edn","project.clj"],php:["composer.lock"],ruby:["Gemfile.lock"],dotnet:["packages.lock.json","Directory.Packages.props"],scala:["project/build.properties","project/plugins.sbt"],kotlin:["gradle.lockfile","gradle/libs.versions.toml"],c:["conan.lock","vcpkg-lock.json","MODULE.bazel.lock","requirements.bazel.lock"],cpp:["conan.lock","vcpkg-lock.json","MODULE.bazel.lock","requirements.bazel.lock"],unknown:[]},ti={node:["package.json"],deno:["deno.json","deno.jsonc"],bun:["package.json","bunfig.toml",".bunfig.toml"],python:["pyproject.toml","requirements.txt","setup.py"],go:["go.mod"],java:["pom.xml","build.gradle","build.gradle.kts"],rust:["Cargo.toml"],elixir:["mix.exs"],clojure:["deps.edn","project.clj"],php:["composer.json"],ruby:["Gemfile"],dotnet:["*.csproj","*.sln"],scala:["build.sbt"],kotlin:["build.gradle","build.gradle.kts","pom.xml"],c:["CMakeLists.txt","meson.build","Makefile","MODULE.bazel","WORKSPACE"],cpp:["CMakeLists.txt","meson.build","Makefile","MODULE.bazel","WORKSPACE"],unknown:[]},to=["node_modules",".git",".workspai/reports",".venv","dist","build","coverage",".env",".env.*","!.env.example"].join(`
1
+ import {a as a$e}from'./chunk-WCJU3CFG.js';import {a as a$9}from'./chunk-DFVG4DDZ.js';import {a as a$c}from'./chunk-ZEEV5J4I.js';import {c,b,e as e$2,d as d$1}from'./chunk-5ME4W4LN.js';import {b as b$1}from'./chunk-B6FJ6RG6.js';import {j,g}from'./chunk-N5HPMATQ.js';import {d as d$3}from'./chunk-BMAFHX6A.js';import {f as f$1,e as e$4}from'./chunk-KY2GOSO5.js';import {a as a$1,b as b$2}from'./chunk-QMQBX3RV.js';import {c as c$4,a as a$7,d as d$2,b as b$5}from'./chunk-BUYLM6QV.js';import {a,c as c$5,h as h$1,g as g$1,k as k$1,f as f$3,d as d$5,e as e$6,i as i$1,j as j$3}from'./chunk-AO2ZI42U.js';import {c as c$3}from'./chunk-Q7UGDNSM.js';import {a as a$6,b as b$3}from'./chunk-LEOFD3W5.js';import {b as b$4}from'./chunk-2MTJWPQ4.js';import {a as a$4}from'./chunk-NMXGSVMD.js';import {a as a$3}from'./chunk-TCLKGPXF.js';import {z}from'./chunk-KFTJVVJR.js';import {j as j$2,l,m as m$1,d as d$4,e as e$5,b as b$7,a as a$d}from'./chunk-U5ENEDJA.js';import {a as a$b}from'./chunk-GR6442P7.js';import {d,e as e$3,f as f$2}from'./chunk-C2VTO5WT.js';import {a as a$5}from'./chunk-AFIFZTOY.js';import {a as a$2}from'./chunk-2LIVMG5C.js';import {e,i,h}from'./chunk-ZGHJIQXL.js';import {e as e$1}from'./chunk-PKKSRXUS.js';import {a as a$a}from'./chunk-TQEMLBAG.js';import {c as c$1}from'./chunk-25AWHAB5.js';import {c as c$2,j as j$1,b as b$6,t as t$1,n,p,m as m$2}from'./chunk-RGNCL5OB.js';import {a as a$8}from'./chunk-2FIX2MDC.js';import {t,k,u as u$1}from'./chunk-VQZ5PI5J.js';import f from'chalk';import {createHash}from'crypto';import {execa}from'execa';import m from'fs-extra';import u from'path';import {existsSync}from'fs';var Vi=[".eslintrc.js",".eslintrc.cjs",".eslintrc.json",".eslintrc.yaml",".eslintrc.yml","eslint.config.js","eslint.config.mjs","eslint.config.cjs"],zi=["tests","test","src/test","__tests__","e2e","playwright","cypress"],Ji=["vitest.config.ts","vitest.config.js","vitest.config.mjs","jest.config.js","jest.config.ts","jest.config.mjs","playwright.config.ts","playwright.config.js","cypress.config.js","cypress.config.ts"],Ui=["src","app","pages"],Yi=["dev","build","test","lint"];function Yn(e){let t=e?.scripts;if(!t||typeof t!="object"||Array.isArray(t))return {};let i={};for(let[n,o]of Object.entries(t))typeof o=="string"&&o.trim().length>0&&(i[n]=o);return i}async function Zn(e,t){for(let o of Vi)if(await m.pathExists(u.join(e,o)))return true;let i=t??(await m.pathExists(u.join(e,"package.json"))?await m.readJson(u.join(e,"package.json")):null);if(!i)return false;if(i.eslintConfig)return true;let n={...i.dependencies??{},...i.devDependencies??{}};return !!(n.eslint||n["@eslint/js"]||n["@eslint/eslintrc"])}async function Xn(e,t){for(let o of zi)if(await m.pathExists(u.join(e,o)))return true;for(let o of Ji)if(await m.pathExists(u.join(e,o)))return true;let i=Yn(t);if(i.test||i["test:unit"]||i["test:e2e"]||i["test:ci"]||i["test:watch"])return true;let n={...t?.dependencies??{},...t?.devDependencies??{}};return n.vitest||n.jest||n["@playwright/test"]||n.cypress?true:await Zi(e)}async function Zi(e){let t=["src","app","pages","components"],i=/\.(test|spec)\.(tsx?|jsx?|vue|svelte)$/i,o=new Set(["node_modules",".git","dist","build",".next","coverage",".turbo"]);for(let s of t){let r=u.join(e,s);if(!await m.pathExists(r))continue;let c=[{dir:r,depth:0}];for(;c.length>0;){let a=c.shift();if(!a)break;let l=[];try{l=await m.readdir(a.dir);}catch{continue}for(let d of l){let p=u.join(a.dir,d);if(i.test(d))return true;if(!(a.depth>=3||o.has(d)||d.startsWith(".")))try{(await m.stat(p)).isDirectory()&&c.push({dir:p,depth:a.depth+1});}catch{continue}}}}return false}async function Ut(e){for(let t of Ui){let i=u.join(e,t);if(await m.pathExists(i))try{if((await m.readdir(i)).some(o=>!o.startsWith(".")))return true}catch{continue}}return false}function Xi(e){let t=e.key;return b$7(t).key}function Qi(e,t,i){return a$d(t,i).some(o=>!!e[o])}async function Qn(e){let{projectPath:t,detection:i,packageJsonData:n}=e,o=Xi(i),s=b$7(o),r=Yn(n),c=[],a=await m.pathExists(u.join(t,"package-lock.json"))||await m.pathExists(u.join(t,"pnpm-lock.yaml"))||await m.pathExists(u.join(t,"yarn.lock"))||await m.pathExists(u.join(t,"bun.lockb"));c.push({id:"frontend-lockfile-integrity",label:"Frontend lockfile integrity",status:a?"pass":"warn",severity:"warn",scope:"project-scoped",reason:a?"Node lockfile detected for deterministic dependency restore.":"No Node lockfile detected (package-lock/yarn.lock/pnpm-lock.yaml/bun.lockb).",recommendation:a?void 0:"Commit a lockfile for deterministic installs and CI parity."});let l=await m.pathExists(u.join(t,"tsconfig.json")),d=await m.pathExists(u.join(t,"jsconfig.json")),p=l||d;c.push({id:"frontend-typescript-surface",label:"TypeScript project surface",status:p?"pass":"warn",severity:"warn",scope:"project-scoped",reason:p?l?"tsconfig.json detected.":"jsconfig.json detected.":"No tsconfig.json or jsconfig.json detected.",recommendation:p?void 0:"Add tsconfig.json (or jsconfig.json) for typed frontend builds and IDE parity."});let y=s.fileHints.length>0&&s.fileHints.some(k=>existsSync(u.join(t,k)));c.push({id:"frontend-framework-config",label:`${s.displayName} config surface`,status:y?"pass":"warn",severity:"warn",scope:"project-scoped",reason:y?`${s.displayName} configuration artifacts detected.`:`No ${s.displayName} config markers detected (${s.fileHints.join(", ")||"n/a"}).`,recommendation:y?void 0:"Keep framework config files in-repo for reproducible dev/build behavior."});for(let k of Yi){let v=Qi(r,o,k),b=k==="dev"||k==="build",j=!v&&k==="test"?h$1({projectPath:t,frameworkDisplayName:s.displayName,scriptName:k,scriptValue:g$1(r)}):void 0;c.push({id:`frontend-script-${k}`,label:`${k} script surface`,status:v?"pass":b?"fail":"warn",severity:b?"error":"warn",scope:"project-scoped",reason:v?`package.json exposes a ${k} script for ${s.displayName}.`:`No ${k} script detected for ${s.displayName}.`,recommendation:v?void 0:`Add a "${a$d(o,k)[0]??k}" script to package.json.`,repairCapability:j});}let h=await Ut(t);return c.push({id:"frontend-source-tree",label:"Frontend source tree",status:h?"pass":"warn",severity:"warn",scope:"project-scoped",reason:h?"Application source directories detected (src/app/pages).":"No frontend source directories detected under src/, app/, or pages/.",recommendation:h?void 0:"Ensure the scaffolded application tree exists before running lifecycle commands."}),c}var eo=["python","node","go","java","rust","elixir","clojure","deno","bun","php","ruby","dotnet","scala","kotlin","c","cpp","unknown"],ei={node:["package-lock.json","pnpm-lock.yaml","yarn.lock","bun.lock","bun.lockb"],deno:["deno.lock"],bun:["bun.lock","bun.lockb"],python:["uv.lock","poetry.lock","requirements.txt","requirements.lock"],go:["go.sum"],java:["gradle.lockfile","gradle/libs.versions.toml"],rust:["Cargo.lock"],elixir:["mix.lock"],clojure:["deps.edn","project.clj"],php:["composer.lock"],ruby:["Gemfile.lock"],dotnet:["packages.lock.json","Directory.Packages.props"],scala:["project/build.properties","project/plugins.sbt"],kotlin:["gradle.lockfile","gradle/libs.versions.toml"],c:["conan.lock","vcpkg-lock.json","MODULE.bazel.lock","requirements.bazel.lock"],cpp:["conan.lock","vcpkg-lock.json","MODULE.bazel.lock","requirements.bazel.lock"],unknown:[]},ti={node:["package.json"],deno:["deno.json","deno.jsonc"],bun:["package.json","bunfig.toml",".bunfig.toml"],python:["pyproject.toml","requirements.txt","setup.py"],go:["go.mod"],java:["pom.xml","build.gradle","build.gradle.kts"],rust:["Cargo.toml"],elixir:["mix.exs"],clojure:["deps.edn","project.clj"],php:["composer.json"],ruby:["Gemfile"],dotnet:["*.csproj","*.sln"],scala:["build.sbt"],kotlin:["build.gradle","build.gradle.kts","pom.xml"],c:["CMakeLists.txt","meson.build","Makefile","MODULE.bazel","WORKSPACE"],cpp:["CMakeLists.txt","meson.build","Makefile","MODULE.bazel","WORKSPACE"],unknown:[]},to=["node_modules",".git",".workspai/reports",".venv","dist","build","coverage",".env",".env.*","!.env.example"].join(`
2
2
  `),Yt=[".env",".env.*","!.env.example"];function We(e){return e&&eo.includes(e)?e:"unknown"}async function we(e,t){for(let i of t){if(i.includes("*")){let n=i.replace("*","");if(await no(e,n,2))return true;continue}if(await m.pathExists(u.join(e,i)))return true}return false}async function no(e,t,i){let n=[{dir:e,depth:0}],o=new Set(["node_modules",".git",".workspai",".rapidkit","dist","build","coverage"]);for(;n.length>0;){let s=n.shift();if(!s)break;let r=[];try{r=await m.readdir(s.dir,{withFileTypes:true});}catch{continue}for(let c of r){if(o.has(c.name))continue;let a=u.join(s.dir,c.name);if(c.isFile()&&c.name.endsWith(t))return true;c.isDirectory()&&s.depth<i&&!c.name.startsWith(".")&&n.push({dir:a,depth:s.depth+1});}}return false}async function Zt(e,t=6){let i=await m.pathExists(u.join(e,"Dockerfile")),n=false,o=false,s=new Set(["docker-compose.yml","docker-compose.yaml","compose.yml","compose.yaml"]),r=new Set(["node_modules",".git",".workspai",".rapidkit","dist","build","coverage","target","vendor"]),c=[{dir:e,depth:0}];for(;c.length>0&&(!n||!o);){let a=c.shift();if(!a)break;let l=[];try{l=await m.readdir(a.dir,{withFileTypes:true});}catch{continue}for(let d of l)r.has(d.name)||(d.isFile()?(a.depth>0&&d.name==="Dockerfile"&&(n=true),s.has(d.name)&&(o=true)):d.isDirectory()&&a.depth<t&&!d.name.startsWith(".")&&c.push({dir:u.join(a.dir,d.name),depth:a.depth+1}));}return {rootDockerfile:i,nestedDockerfile:n,compose:o}}async function et(e){try{return await m.pathExists(e)?await m.readFile(e,"utf8"):""}catch{return ""}}async function Dt(e,t){let i=[];for(let n of t){let o=await et(u.join(e,n));o&&i.push(o);}return i.join(`
3
3
  `)}async function io(e){let t=u.join(e,".github","workflows"),i=[];try{i=await m.readdir(t,{withFileTypes:true});}catch{return ""}let n=[],o=0;for(let s of i.filter(r=>r.isFile()&&/\.(?:ya?ml)$/i.test(r.name)).sort((r,c)=>r.name.localeCompare(c.name)).slice(0,64)){let r=u.join(t,s.name);try{let c=await m.stat(r);if(c.size>512*1024||o+c.size>1024*1024)continue;n.push(await m.readFile(r,"utf8")),o+=c.size;}catch{}}return n.join(`
4
4
  `)}var oo=new Set([".c",".cc",".clj",".cljs",".cpp",".cs",".ex",".exs",".go",".h",".hpp",".java",".js",".jsx",".kt",".kts",".mjs",".cjs",".php",".py",".rb",".rs",".scala",".svelte",".ts",".tsx",".vue"]),ro=[/\bprocess\.env(?:\.([A-Z][A-Z0-9_]*)|\[['"]([A-Z][A-Z0-9_]*)['"]\])/g,/\bimport\.meta\.env\.([A-Z][A-Z0-9_]*)/g,/\b(?:Deno\.env\.get|os\.getenv|os\.Getenv|os\.LookupEnv|System\.getenv|std::env::var|env!|option_env!|getenv|Environment\.GetEnvironmentVariable)\(\s*['"]([A-Z][A-Z0-9_]*)['"]/g,/\bos\.environ(?:\.get\(\s*['"]([A-Z][A-Z0-9_]*)['"]|\[\s*['"]([A-Z][A-Z0-9_]*)['"]\s*\])/g,/\bENV(?:\.fetch\(\s*['"]([A-Z][A-Z0-9_]*)['"]|\[\s*['"]([A-Z][A-Z0-9_]*)['"]\s*\])/g,/\$_ENV\[\s*['"]([A-Z][A-Z0-9_]*)['"]\s*\]/g,/@Value\(\s*['"]\$\{([A-Z][A-Z0-9_]*)(?::[^}]*)?\}['"]\s*\)/g],so=new Set(["BROWSER","CI","GITHUB_WORKSPACE","HOME","HOMEDRIVE","HOMEPATH","LOCALAPPDATA","PAGER","PATH","PROCESSOR_ARCHITEW6432","SSH_CLIENT","SSH_TTY","SYSTEMROOT","TEMP","TMP","TMPDIR","XDG_CACHE_HOME"]);async function ao(e){let t=new Set,i=new Set([".git",".next",".nuxt",".output",".rapidkit",".svelte-kit",".venv",".workspai","build","coverage","dist","node_modules","target","vendor"]),n=[{dir:e,depth:0}],o=0;for(;n.length>0&&o<300;){let r=n.shift();if(!r)break;let c=[];try{c=await m.readdir(r.dir,{withFileTypes:true});}catch{continue}for(let a of c){if(i.has(a.name))continue;let l=u.join(r.dir,a.name);if(a.isDirectory()){r.depth<6&&!a.name.startsWith(".")&&n.push({dir:l,depth:r.depth+1});continue}if(!a.isFile()||!oo.has(u.extname(a.name).toLowerCase()))continue;o+=1;let d="";try{if((await m.stat(l)).size>512*1024)continue;d=await m.readFile(l,"utf8");}catch{continue}for(let p of ro){p.lastIndex=0;for(let y of d.matchAll(p)){let h=y.slice(1).find(k=>typeof k=="string"&&k.length>0);h&&!so.has(h)&&t.add(h);}}}}let s=await et(u.join(e,".env"));for(let r of s.split(/\r?\n/)){let c=r.match(/^\s*(?:export\s+)?([A-Z][A-Z0-9_]*)\s*=/);c?.[1]&&t.add(c[1]);}return [...t].sort((r,c)=>r.localeCompare(c))}async function co(e){if(e.runtime==="node"){let t=typeof e.packageJsonData?.packageManager=="string"?e.packageJsonData.packageManager.split("@")[0]:null;return {command:t==="pnpm"?"pnpm install":t==="yarn"?"yarn install":t==="bun"?"bun install":"npm install",title:"Generate Node dependency lockfile",files:["package.json","package-lock.json","pnpm-lock.yaml","yarn.lock","bun.lock"],limitations:["Review dependency and lockfile changes before committing."]}}if(e.runtime==="go"&&await m.pathExists(u.join(e.projectPath,"go.mod")))return {command:"go mod tidy",title:"Reconcile Go module graph",files:["go.mod","go.sum"],limitations:["Review go.mod/go.sum changes before committing."]};if(e.runtime==="java"){let t=await m.pathExists(u.join(e.projectPath,"pom.xml")),i=await m.pathExists(u.join(e.projectPath,"mvnw"))||await m.pathExists(u.join(e.projectPath,"mvnw.cmd")),n=await m.pathExists(u.join(e.projectPath,"gradlew"))||await m.pathExists(u.join(e.projectPath,"gradlew.bat")),o=t?i?process.platform==="win32"?".\\mvnw.cmd -B -DskipTests -Dmaven.repo.local=.workspai/cache/java/m2 dependency:go-offline":"./mvnw -B -DskipTests -Dmaven.repo.local=.workspai/cache/java/m2 dependency:go-offline":"mvn -B -DskipTests -Dmaven.repo.local=.workspai/cache/java/m2 dependency:go-offline":n?process.platform==="win32"?".\\gradlew.bat --project-cache-dir .workspai/cache/java/gradle dependencies":"./gradlew --project-cache-dir .workspai/cache/java/gradle dependencies":"gradle --project-cache-dir .workspai/cache/java/gradle dependencies";return t?{command:o,title:"Warm Maven dependency graph",files:["pom.xml"],limitations:["Maven does not provide a native transitive lockfile; dependency:go-offline warms dependencies but does not create reproducibility evidence."]}:{command:o,title:"Prepare Gradle dependency baseline",files:["build.gradle","build.gradle.kts","gradle.lockfile"],limitations:["Review resolved dependency and lockfile changes before committing."]}}if(e.runtime==="scala")return {command:"sbt update",title:"Prepare Scala dependency baseline",files:["build.sbt","project/build.properties","project/plugins.sbt"],limitations:["Review resolved dependency and plugin changes before committing."]};if(e.runtime==="kotlin")return {command:process.platform==="win32"?".\\gradlew.bat dependencies":"./gradlew dependencies",title:"Prepare Kotlin dependency baseline",files:["build.gradle","build.gradle.kts","gradle.lockfile"],limitations:["Review resolved dependency and lockfile changes before committing."]};if(e.runtime==="rust")return {command:"cargo fetch",title:"Generate Rust dependency baseline",files:["Cargo.toml","Cargo.lock"],limitations:["Review Cargo.lock changes before committing."]};if(e.runtime==="php")return {command:"composer install",title:"Generate Composer lockfile",files:["composer.json","composer.lock"],limitations:["Review composer.lock changes before committing."]};if(e.runtime==="ruby")return {command:"bundle install",title:"Generate Bundler lockfile",files:["Gemfile","Gemfile.lock"],limitations:["Review Gemfile.lock changes before committing."]};if(e.runtime==="dotnet")return {command:"dotnet restore",title:".NET dependency restore",files:["*.sln","*.csproj","packages.lock.json","Directory.Packages.props"],limitations:["Enable NuGet lock files in the project when release policy requires deterministic restore."]};if(e.runtime==="elixir")return {command:"mix deps.get",title:"Generate Elixir dependency lockfile",files:["mix.exs","mix.lock"],limitations:["Review mix.lock changes before committing."]};if(e.runtime==="clojure")return {command:"clojure -P",title:"Prepare Clojure dependency baseline",files:["deps.edn","project.clj"],limitations:["Review dependency cache and CI restore policy before release."]};if(e.runtime==="python"){let t=await et(u.join(e.projectPath,"pyproject.toml"));if(/\[tool\.poetry\]/.test(t))return {command:"poetry install --no-root",title:"Install Poetry dependency baseline",files:["pyproject.toml","poetry.lock"],limitations:["Review poetry.lock changes before committing when Poetry resolves or updates the lockfile."]};if(/\[tool\.uv\]|\[project\]/.test(t))return {command:"uv lock",title:"Generate uv lockfile",files:["pyproject.toml","uv.lock"],limitations:["Review uv.lock changes before committing."]}}return null}function tt(e){let t=e?.scripts;if(!t||typeof t!="object"||Array.isArray(t))return {};let i={};for(let[n,o]of Object.entries(t))typeof o=="string"&&o.trim().length>0&&(i[n]=o);return i}function lo(e){if(e.runtime==="node"){let i=tt(e.packageJsonData);if(!e.packageJsonData)return null;if(e.kind==="test"){let n=i.lint?"npm run lint":i.build?"npm run build":null;return n?{command:n,title:"Define Node test script",targetName:"test",files:["package.json"],limitations:["Replace this fallback with real tests when product coverage is required."]}:null}if(e.kind==="security"){let n=a$e(e.projectPath);return {command:n==="pnpm"?"pnpm audit --audit-level=moderate":n==="yarn"?m.existsSync(u.join(e.projectPath,".yarnrc.yml"))?"yarn npm audit --severity moderate":"yarn audit --level moderate":n==="bun"?"bun audit":"npm audit --audit-level=moderate",title:"Define Node security audit script",targetName:"audit",files:["package.json"]}}return null}return {deno:{test:{command:"deno test --allow-none",title:"Define Deno test command",targetName:"test",files:["Makefile","deno.json","deno.jsonc"]},quality:{command:"deno fmt --check && deno lint",title:"Define Deno quality command",targetName:"quality",files:["Makefile","deno.json","deno.jsonc"]},security:{command:"deno info --json",title:"Define Deno dependency inspection command",targetName:"security",files:["Makefile","deno.json","deno.jsonc","deno.lock"],limitations:["Pair dependency inspection with the organization vulnerability service used by CI."]}},bun:{test:{command:"bun test",title:"Define Bun test script",targetName:"test",files:["package.json","bun.lock","bun.lockb"]},quality:{command:"bunx eslint .",title:"Define Bun quality script",targetName:"quality",files:["package.json"],limitations:["Ensure ESLint is declared before enforcing this command in CI."]},security:{command:"bun audit",title:"Define Bun security audit script",targetName:"audit",files:["package.json","bun.lock","bun.lockb"]}},python:{test:{command:"python -m pytest",title:"Define Python test command",targetName:"test",files:["Makefile","pyproject.toml"]},quality:{command:"python -m ruff check .",title:"Define Python quality command",targetName:"quality",files:["Makefile","pyproject.toml"],limitations:["Ensure ruff is declared in project dev dependencies before enforcing in CI."]},security:{command:"python -m pip_audit",title:"Define Python security audit command",targetName:"security",files:["Makefile","pyproject.toml"],limitations:["Ensure pip-audit is available in the project toolchain before enforcing in CI."]}},go:{test:{command:"go test ./...",title:"Define Go test command",targetName:"test",files:["Makefile","go.mod"]},quality:{command:"gofmt -w .",title:"Define Go formatting command",targetName:"quality",files:["Makefile","go.mod"],limitations:["Use CI-specific check mode if formatting should not mutate files in pipelines."]},security:{command:"govulncheck ./...",title:"Define Go vulnerability scan command",targetName:"security",files:["Makefile","go.mod"],limitations:["Ensure govulncheck is installed or provisioned by CI before enforcing."]}},rust:{test:{command:"cargo test",title:"Define Rust test command",targetName:"test",files:["Makefile","Cargo.toml"]},quality:{command:"cargo fmt -- --check && cargo clippy --all-targets -- -D warnings",title:"Define Rust quality command",targetName:"quality",files:["Makefile","Cargo.toml"]},security:{command:"cargo audit",title:"Define Rust security audit command",targetName:"security",files:["Makefile","Cargo.toml"],limitations:["Ensure cargo-audit is installed or provisioned by CI before enforcing."]}},php:{test:{command:"vendor/bin/phpunit",title:"Define PHP test command",targetName:"test",files:["Makefile","composer.json"]},quality:{command:"vendor/bin/phpstan analyse",title:"Define PHP static analysis command",targetName:"quality",files:["Makefile","composer.json"],limitations:["Ensure phpstan is declared in require-dev before enforcing in CI."]},security:{command:"composer audit",title:"Define Composer security audit command",targetName:"security",files:["Makefile","composer.json"]}},ruby:{test:{command:"bundle exec rspec",title:"Define Ruby test command",targetName:"test",files:["Makefile","Gemfile"],limitations:["Use bundle exec ruby -Itest when the project uses minitest instead of RSpec."]},quality:{command:"bundle exec rubocop",title:"Define Ruby quality command",targetName:"quality",files:["Makefile","Gemfile"]},security:{command:"bundle exec bundler-audit check",title:"Define Ruby security audit command",targetName:"security",files:["Makefile","Gemfile"],limitations:["Ensure bundler-audit is installed or provisioned by CI before enforcing."]}},dotnet:{test:{command:"dotnet test",title:"Define .NET test command",targetName:"test",files:["Makefile","*.sln","*.csproj"]},quality:{command:"dotnet format --verify-no-changes",title:"Define .NET formatting gate",targetName:"quality",files:["Makefile","*.sln","*.csproj"]},security:{command:"dotnet list package --vulnerable",title:"Define .NET package vulnerability check",targetName:"security",files:["Makefile","*.sln","*.csproj"]}},java:{test:{command:"mvn test",title:"Define Java test command",targetName:"test",files:["Makefile","pom.xml","build.gradle","build.gradle.kts"],limitations:["Use ./gradlew test when the project is Gradle-first."]},quality:{command:"mvn verify",title:"Define Java verification command",targetName:"quality",files:["Makefile","pom.xml","build.gradle","build.gradle.kts"],limitations:["Use ./gradlew check when the project is Gradle-first."]},security:{command:"mvn org.owasp:dependency-check-maven:check",title:"Define Java dependency vulnerability check",targetName:"security",files:["Makefile","pom.xml"],limitations:["Review OWASP dependency-check policy and cache behavior before enforcing in CI."]}},elixir:{test:{command:"mix test",title:"Define Elixir test command",targetName:"test",files:["Makefile","mix.exs"]},quality:{command:"mix format --check-formatted && mix credo --strict",title:"Define Elixir quality command",targetName:"quality",files:["Makefile","mix.exs",".formatter.exs","credo.exs"],limitations:["Ensure Credo is declared before enforcing the strict quality command."]},security:{command:"mix hex.audit",title:"Define Hex dependency audit command",targetName:"security",files:["Makefile","mix.exs","mix.lock"]}},clojure:{test:{command:"clojure -M:test",title:"Define Clojure test command",targetName:"test",files:["Makefile","deps.edn","project.clj"],limitations:["Align the alias with the test runner declared by the project."]},quality:{command:"clj-kondo --lint src test",title:"Define Clojure quality command",targetName:"quality",files:["Makefile","deps.edn","project.clj"],limitations:["Ensure clj-kondo is provisioned before enforcing this command in CI."]},security:{command:"clojure -Stree",title:"Define Clojure dependency inspection command",targetName:"security",files:["Makefile","deps.edn","project.clj"],limitations:["Pair dependency-tree inspection with the vulnerability scanner selected by the organization."]}},scala:{test:{command:"sbt test",title:"Define Scala test command",targetName:"test",files:["Makefile","build.sbt"]},quality:{command:"sbt scalafmtCheckAll scalafixAll",title:"Define Scala quality command",targetName:"quality",files:["Makefile","build.sbt",".scalafmt.conf"],limitations:["Declare Scalafmt and Scalafix plugins before enforcing this command."]},security:{command:"sbt dependencyTree",title:"Define Scala dependency inspection command",targetName:"security",files:["Makefile","build.sbt"],limitations:["Pair dependency inspection with the organization vulnerability scanner."]}},kotlin:{test:{command:"./gradlew test",title:"Define Kotlin test command",targetName:"test",files:["Makefile","build.gradle","build.gradle.kts"]},quality:{command:"./gradlew check",title:"Define Kotlin quality command",targetName:"quality",files:["Makefile","build.gradle","build.gradle.kts"]},security:{command:"./gradlew dependencies",title:"Define Kotlin dependency inspection command",targetName:"security",files:["Makefile","build.gradle","build.gradle.kts"],limitations:["Pair dependency inspection with the organization vulnerability scanner."]}},c:{test:{command:"ctest --test-dir build --output-on-failure",title:"Define C test command",targetName:"test",files:["Makefile","CMakeLists.txt"]},quality:{command:"clang-tidy src/**/*.c --",title:"Define C quality command",targetName:"quality",files:["Makefile","CMakeLists.txt",".clang-tidy"],limitations:["Align source globs and compile database with the project build."]},security:{command:"cmake --build build --target sbom",title:"Define C dependency evidence command",targetName:"security",files:["Makefile","CMakeLists.txt"],limitations:["Declare the SBOM target or replace it with the organization scanner."]}},cpp:{test:{command:"ctest --test-dir build --output-on-failure",title:"Define C++ test command",targetName:"test",files:["Makefile","CMakeLists.txt"]},quality:{command:"clang-tidy src/**/*.cpp --",title:"Define C++ quality command",targetName:"quality",files:["Makefile","CMakeLists.txt",".clang-tidy"],limitations:["Align source globs and compile database with the project build."]},security:{command:"cmake --build build --target sbom",title:"Define C++ dependency evidence command",targetName:"security",files:["Makefile","CMakeLists.txt"],limitations:["Declare the SBOM target or replace it with the organization scanner."]}}}[e.runtime]?.[e.kind]??null}async function po(e){return j$3({issueId:e.issueId,title:e.contract.title,projectPath:e.projectPath,targetName:e.contract.targetName,command:e.contract.command,reason:e.reason,risk:"guarded",requiresReview:true,limitations:e.contract.limitations})}async function Xt(e){let t=lo({runtime:e.runtime,kind:e.kind,projectPath:e.projectPath,packageJsonData:e.packageJsonData});if(t)return (e.runtime==="node"||e.runtime==="bun")&&e.packageJsonData?i$1({issueId:e.issueId,title:t.title,projectPath:e.projectPath,scriptName:t.targetName,scriptValue:t.command,reason:e.reason,risk:"guarded",limitations:t.limitations}):await m.pathExists(u.join(e.projectPath,"Makefile"))?po({issueId:e.issueId,projectPath:e.projectPath,contract:t,reason:e.reason}):je({issueId:e.issueId,title:t.title,projectPath:e.projectPath,files:t.files.filter(i=>i!=="Makefile"),reason:`${e.reason} The repository does not expose a Makefile, so Doctor will not invent a new command surface.`,limitations:t.limitations})}function je(e){return {id:`${e.issueId}.manual`,issueId:e.issueId,title:e.title,status:"manual",fixKind:"manual",risk:"guarded",canAutoFix:false,canEditFiles:false,requiresApproval:true,requiresReview:true,files:e.files.map(t=>u.join(e.projectPath,t)),refreshCommands:["npx workspai doctor project --json","npx workspai workspace verify --json"],reason:e.reason,limitations:e.limitations}}function uo(e){return d$5({issueId:"surface-dockerignore",title:"Create .dockerignore",projectPath:e,relativePath:".dockerignore",content:`${to}