@visulima/vis 1.0.0-alpha.2 → 1.0.0-alpha.21

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 (147) hide show
  1. package/CHANGELOG.md +840 -14
  2. package/LICENSE.md +7667 -0
  3. package/README.md +322 -19
  4. package/dist/bin.js +1 -146
  5. package/dist/config/index.d.ts +2795 -0
  6. package/dist/config/index.js +1 -0
  7. package/dist/generate/index.d.ts +157 -0
  8. package/dist/generate/index.js +1 -0
  9. package/dist/packem_chunks/bin.js +1295 -0
  10. package/dist/packem_chunks/config.js +19 -0
  11. package/dist/packem_chunks/doctor-probe.js +2 -0
  12. package/dist/packem_chunks/fix.js +11 -0
  13. package/dist/packem_chunks/handler.js +1 -0
  14. package/dist/packem_chunks/handler10.js +1 -0
  15. package/dist/packem_chunks/handler11.js +5 -0
  16. package/dist/packem_chunks/handler12.js +1 -0
  17. package/dist/packem_chunks/handler13.js +27 -0
  18. package/dist/packem_chunks/handler14.js +5 -0
  19. package/dist/packem_chunks/handler15.js +1 -0
  20. package/dist/packem_chunks/handler16.js +1 -0
  21. package/dist/packem_chunks/handler17.js +1 -0
  22. package/dist/packem_chunks/handler18.js +1 -0
  23. package/dist/packem_chunks/handler19.js +1 -0
  24. package/dist/packem_chunks/handler2.js +2 -0
  25. package/dist/packem_chunks/handler20.js +5 -0
  26. package/dist/packem_chunks/handler21.js +2 -0
  27. package/dist/packem_chunks/handler22.js +2 -0
  28. package/dist/packem_chunks/handler23.js +18 -0
  29. package/dist/packem_chunks/handler24.js +1 -0
  30. package/dist/packem_chunks/handler25.js +1 -0
  31. package/dist/packem_chunks/handler26.js +5 -0
  32. package/dist/packem_chunks/handler27.js +1 -0
  33. package/dist/packem_chunks/handler28.js +3 -0
  34. package/dist/packem_chunks/handler29.js +1 -0
  35. package/dist/packem_chunks/handler3.js +4 -0
  36. package/dist/packem_chunks/handler30.js +7 -0
  37. package/dist/packem_chunks/handler31.js +33 -0
  38. package/dist/packem_chunks/handler32.js +3 -0
  39. package/dist/packem_chunks/handler33.js +1 -0
  40. package/dist/packem_chunks/handler34.js +26 -0
  41. package/dist/packem_chunks/handler35.js +3 -0
  42. package/dist/packem_chunks/handler36.js +7 -0
  43. package/dist/packem_chunks/handler37.js +22 -0
  44. package/dist/packem_chunks/handler38.js +428 -0
  45. package/dist/packem_chunks/handler39.js +6 -0
  46. package/dist/packem_chunks/handler4.js +8 -0
  47. package/dist/packem_chunks/handler40.js +24 -0
  48. package/dist/packem_chunks/handler41.js +10 -0
  49. package/dist/packem_chunks/handler42.js +153 -0
  50. package/dist/packem_chunks/handler43.js +25 -0
  51. package/dist/packem_chunks/handler44.js +24 -0
  52. package/dist/packem_chunks/handler45.js +213 -0
  53. package/dist/packem_chunks/handler46.js +3 -0
  54. package/dist/packem_chunks/handler47.js +27 -0
  55. package/dist/packem_chunks/handler48.js +167 -0
  56. package/dist/packem_chunks/handler49.js +34 -0
  57. package/dist/packem_chunks/handler5.js +1 -0
  58. package/dist/packem_chunks/handler6.js +1 -0
  59. package/dist/packem_chunks/handler7.js +1 -0
  60. package/dist/packem_chunks/handler8.js +1 -0
  61. package/dist/packem_chunks/handler9.js +2 -0
  62. package/dist/packem_chunks/heal-accept.js +10 -0
  63. package/dist/packem_chunks/heal.js +14 -0
  64. package/dist/packem_chunks/help-command.js +18 -0
  65. package/dist/packem_chunks/index.js +7 -0
  66. package/dist/packem_chunks/keys-refresh.js +4 -0
  67. package/dist/packem_chunks/list.js +3 -0
  68. package/dist/packem_chunks/loader.js +1 -0
  69. package/dist/packem_chunks/prune.js +3 -0
  70. package/dist/packem_chunks/run.js +1 -0
  71. package/dist/packem_chunks/status.js +2 -0
  72. package/dist/packem_chunks/sync.js +2 -0
  73. package/dist/packem_chunks/sync2.js +2 -0
  74. package/dist/packem_chunks/tar.js +3 -0
  75. package/dist/packem_chunks/tripwire.js +2 -0
  76. package/dist/packem_shared/advisories-DsynpacV.js +1 -0
  77. package/dist/packem_shared/ai-analysis-uYuTIIXi.js +68 -0
  78. package/dist/packem_shared/ai-cache-DuwHYx2O.js +1 -0
  79. package/dist/packem_shared/ai-fix-DzrA-dVz.js +43 -0
  80. package/dist/packem_shared/applyDefaults-BOVDw1jD.js +1 -0
  81. package/dist/packem_shared/build-scripts-DsWMSWDs.js +1 -0
  82. package/dist/packem_shared/cache-directory-DQak1Vjc.js +1 -0
  83. package/dist/packem_shared/cyclonedx-CiHXuG8M.js +4 -0
  84. package/dist/packem_shared/definePlugin-CWm4Dv_t.js +1 -0
  85. package/dist/packem_shared/dependency-scan-DC3nAFHS.js +1 -0
  86. package/dist/packem_shared/docker-B-CIN_nj.js +60 -0
  87. package/dist/packem_shared/failure-log-C3LEMmkq.js +2 -0
  88. package/dist/packem_shared/flakiness-Dq6K4ymq.js +1 -0
  89. package/dist/packem_shared/giget-CcEy_Elm.js +2 -0
  90. package/dist/packem_shared/glob-MHJQjR39-CQ2GC0b_.js +1 -0
  91. package/dist/packem_shared/index-DH-5hsrC.js +1 -0
  92. package/dist/packem_shared/lifecycle-Dv3nAtoD.js +2 -0
  93. package/dist/packem_shared/lockfile-C5DYMHVq.js +1 -0
  94. package/dist/packem_shared/manifests-B0fMp872.js +1 -0
  95. package/dist/packem_shared/min-release-age-BFozFonQ.js +34 -0
  96. package/dist/packem_shared/native-config-sync-Dvi1g2nQ.js +21 -0
  97. package/dist/packem_shared/otelPlugin-CJR2T_lk.js +1 -0
  98. package/dist/packem_shared/registry-keys-CewRFW0e.js +1 -0
  99. package/dist/packem_shared/resolve-explicit-CC4Kifk5.js +5 -0
  100. package/dist/packem_shared/run-summary-utils-BaBGP3bo.js +1 -0
  101. package/dist/packem_shared/runtime-check-BusAwPb2.js +1 -0
  102. package/dist/packem_shared/scan-progress-CMynp3eA.js +2 -0
  103. package/dist/packem_shared/selectors-B2ISH581.js +3 -0
  104. package/dist/packem_shared/signatures-5ZdjJ2Pu.js +2 -0
  105. package/dist/packem_shared/symbols-CQmER5MT.js +1 -0
  106. package/dist/packem_shared/toolchain-Cc3cwyLP.js +5 -0
  107. package/dist/packem_shared/typosquats-BCeR-sLf.js +1 -0
  108. package/dist/packem_shared/use-measured-height-DjYgUOKk.js +1 -0
  109. package/dist/packem_shared/utils-DrNg0XTR.js +1 -0
  110. package/dist/packem_shared/verify-07kUNTuP.js +1 -0
  111. package/dist/packem_shared/vis-update-app-CFrlJ3mW.js +1 -0
  112. package/dist/packem_shared/xxh3-DrAUNq4n.js +1 -0
  113. package/index.d.ts +358 -0
  114. package/index.js +609 -0
  115. package/package.json +57 -22
  116. package/schemas/project.schema.json +872 -0
  117. package/schemas/vis-config.schema.json +4306 -0
  118. package/skills/vis/SKILL.md +96 -0
  119. package/templates/buildkite-ci/.buildkite/pipeline.yml.tera +85 -0
  120. package/templates/buildkite-ci/template.yml +20 -0
  121. package/dist/ai-analysis.d.ts +0 -40
  122. package/dist/ai-cache.d.ts +0 -21
  123. package/dist/bin.d.ts +0 -1
  124. package/dist/catalog.d.ts +0 -110
  125. package/dist/commands/affected.d.ts +0 -3
  126. package/dist/commands/ai.d.ts +0 -3
  127. package/dist/commands/analyze.d.ts +0 -3
  128. package/dist/commands/check.d.ts +0 -3
  129. package/dist/commands/graph.d.ts +0 -3
  130. package/dist/commands/hook/constants.d.ts +0 -8
  131. package/dist/commands/hook/index.d.ts +0 -3
  132. package/dist/commands/hook/install.d.ts +0 -7
  133. package/dist/commands/hook/migrate.d.ts +0 -27
  134. package/dist/commands/hook/uninstall.d.ts +0 -3
  135. package/dist/commands/migrate/constants.d.ts +0 -12
  136. package/dist/commands/migrate/deps.d.ts +0 -32
  137. package/dist/commands/migrate/index.d.ts +0 -3
  138. package/dist/commands/migrate/json.d.ts +0 -20
  139. package/dist/commands/migrate/lint-staged.d.ts +0 -62
  140. package/dist/commands/migrate/types.d.ts +0 -20
  141. package/dist/commands/run.d.ts +0 -3
  142. package/dist/commands/staged.d.ts +0 -3
  143. package/dist/commands/update.d.ts +0 -3
  144. package/dist/config.d.ts +0 -40
  145. package/dist/config.js +0 -1
  146. package/dist/package-manager.d.ts +0 -23
  147. package/dist/workspace.d.ts +0 -58
@@ -0,0 +1,872 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://visulima.com/schemas/project.schema.json",
4
+ "title": "vis project.json",
5
+ "description": "Per-project configuration for @visulima/vis. Place a project.json in each workspace package root.",
6
+ "type": "object",
7
+ "properties": {
8
+ "implicitDependencies": {
9
+ "type": "array",
10
+ "items": {
11
+ "type": "string"
12
+ },
13
+ "description": "Implicit dependencies on other projects."
14
+ },
15
+ "language": {
16
+ "type": "string",
17
+ "description": "Primary language — informational and query-able."
18
+ },
19
+ "layer": {
20
+ "type": "string",
21
+ "enum": [
22
+ "application",
23
+ "automation",
24
+ "configuration",
25
+ "library",
26
+ "scaffolding",
27
+ "tool"
28
+ ],
29
+ "description": "Project layer, used for constraint inheritance and query filtering."
30
+ },
31
+ "owners": {
32
+ "type": "array",
33
+ "items": {
34
+ "$ref": "#/$defs/OwnersEntry"
35
+ },
36
+ "description": "Code owners for paths inside this project."
37
+ },
38
+ "project": {
39
+ "type": "object",
40
+ "properties": {
41
+ "channel": {
42
+ "type": "string"
43
+ },
44
+ "description": {
45
+ "type": "string"
46
+ },
47
+ "maintainers": {
48
+ "type": "array",
49
+ "items": {
50
+ "type": "string"
51
+ }
52
+ },
53
+ "owner": {
54
+ "type": "string"
55
+ },
56
+ "title": {
57
+ "type": "string"
58
+ }
59
+ },
60
+ "additionalProperties": false,
61
+ "description": "Project-level metadata."
62
+ },
63
+ "projectType": {
64
+ "type": "string",
65
+ "enum": [
66
+ "application",
67
+ "library",
68
+ "service",
69
+ "tool"
70
+ ],
71
+ "description": "Project type — `library`, `application`, `service`, or `tool`.\n\n- `library` — reusable code consumed by other workspace projects.\n- `application` — end-user-facing build target (web app, mobile app).\n- `service` — long-running HTTP / worker process deployed independently.\n- `tool` — CLI or developer tooling shipped as an executable."
72
+ },
73
+ "sourceRoot": {
74
+ "type": "string",
75
+ "description": "Source root, used for display and language inference."
76
+ },
77
+ "stack": {
78
+ "type": "string",
79
+ "enum": [
80
+ "backend",
81
+ "data",
82
+ "frontend",
83
+ "infrastructure",
84
+ "systems"
85
+ ],
86
+ "description": "Tech stack."
87
+ },
88
+ "tags": {
89
+ "type": "array",
90
+ "items": {
91
+ "type": "string"
92
+ },
93
+ "description": "Filterable tags."
94
+ },
95
+ "targets": {
96
+ "type": "object",
97
+ "additionalProperties": {
98
+ "$ref": "#/$defs/VisTargetConfiguration"
99
+ },
100
+ "description": "Vis-style target definitions (merged on top of package.json scripts)."
101
+ },
102
+ "$schema": {
103
+ "type": "string",
104
+ "description": "JSON Schema reference for editor autocomplete."
105
+ }
106
+ },
107
+ "additionalProperties": false,
108
+ "$defs": {
109
+ "OwnersEntry": {
110
+ "type": "object",
111
+ "properties": {
112
+ "channel": {
113
+ "type": "string",
114
+ "description": "Optional notification channel (e.g. Slack, Teams)."
115
+ },
116
+ "owners": {
117
+ "type": "array",
118
+ "items": {
119
+ "type": "string"
120
+ },
121
+ "description": "Owner handles (e.g. `@visulima/core-team`)."
122
+ },
123
+ "path": {
124
+ "type": "string",
125
+ "description": "File/glob pattern relative to the project root."
126
+ }
127
+ },
128
+ "required": [
129
+ "owners",
130
+ "path"
131
+ ],
132
+ "additionalProperties": false,
133
+ "description": "Declared code-owner assignment for a path glob within a project. Mirrors moon's `owners` shape so migrations can round-trip cleanly."
134
+ },
135
+ "VisTargetConfiguration": {
136
+ "type": "object",
137
+ "properties": {
138
+ "always": {
139
+ "type": "boolean",
140
+ "description": "When `true`, this target runs after the main task graph completes — even if upstream tasks failed. Useful for cleanup, teardown, notifications, or anything that should fire regardless of build outcome. Always-tasks are not part of the normal dependency graph and never block other tasks."
141
+ },
142
+ "cache": {
143
+ "type": "boolean",
144
+ "description": "Whether this target is cacheable"
145
+ },
146
+ "cacheOnWarning": {
147
+ "type": "boolean",
148
+ "description": "When `false`, exit-0 runs whose terminal output matched any {@link TargetConfiguration.warningPattern } are not seeded into the cache. Defaults to `true` — warnings are surfaced on the result (`hadWarnings: true`) but caching still happens, matching the \"succeeded with warnings is incremental\" behaviour rush, lage and wireit users have repeatedly asked for."
149
+ },
150
+ "cacheRestore": {
151
+ "type": "object",
152
+ "properties": {
153
+ "preserveMtime": {
154
+ "type": "boolean",
155
+ "description": "Restore each file's modification time from the captured tar header (second precision). When `false`, restored files take the current wall-clock time, matching the legacy behaviour."
156
+ },
157
+ "preservePerms": {
158
+ "type": "boolean",
159
+ "description": "Restore each file's POSIX mode bits (rwx triplets, low 12 bits). When `false`, restored files take the process umask. Only meaningful on POSIX hosts; Windows ignores tar mode."
160
+ }
161
+ },
162
+ "additionalProperties": false,
163
+ "description": "Fine-grained controls over how cached outputs are rehydrated. See {@link CacheRestoreOptions } . Both fields default to `true` (faithful restore); flip individually when downstream tooling needs the legacy \"now\"-stamped behaviour."
164
+ },
165
+ "command": {
166
+ "type": "string",
167
+ "description": "The command to run (alternative to executor)"
168
+ },
169
+ "configurations": {
170
+ "type": "object",
171
+ "additionalProperties": {
172
+ "type": "object",
173
+ "additionalProperties": {}
174
+ },
175
+ "description": "Named configurations (e.g., \"production\", \"development\")"
176
+ },
177
+ "concurrencyGroup": {
178
+ "type": "string",
179
+ "description": "Workspace-level concurrency group this target opts into. The scheduler caps the *combined* in-flight count of every task whose target carries the same group name to the value declared in {@link TaskRunnerOptions.concurrencyGroups } . Use this when several targets share an external resource (a single Postgres, a developer's Docker daemon, an account-wide deploy lock) so the cap follows the resource, not any single target name.\n\nTargets that name a group not declared in `concurrencyGroups` run uncapped — a typo shouldn't deadlock the graph. Caps don't apply to tasks marked `always: true`; those run in a separate finalisation phase outside the scheduler."
180
+ },
181
+ "dependsOn": {
182
+ "type": "array",
183
+ "items": {
184
+ "anyOf": [
185
+ {
186
+ "type": "string"
187
+ },
188
+ {
189
+ "type": "object",
190
+ "properties": {
191
+ "dependencies": {
192
+ "type": "boolean",
193
+ "description": "Whether this is a dependency on the same project"
194
+ },
195
+ "params": {
196
+ "type": "string",
197
+ "enum": [
198
+ "forward",
199
+ "ignore"
200
+ ],
201
+ "description": "Params to pass through"
202
+ },
203
+ "projects": {
204
+ "anyOf": [
205
+ {
206
+ "type": "string"
207
+ },
208
+ {
209
+ "type": "array",
210
+ "items": {
211
+ "type": "string"
212
+ }
213
+ }
214
+ ],
215
+ "description": "The project name (if different from the current project)"
216
+ },
217
+ "target": {
218
+ "type": "string",
219
+ "description": "The target name"
220
+ }
221
+ },
222
+ "required": [
223
+ "target"
224
+ ],
225
+ "additionalProperties": false,
226
+ "description": "Defines a dependency on another target."
227
+ }
228
+ ]
229
+ },
230
+ "description": "Other targets this target depends on"
231
+ },
232
+ "executor": {
233
+ "type": "string",
234
+ "description": "The executor/command to run"
235
+ },
236
+ "inputs": {
237
+ "type": "array",
238
+ "items": {
239
+ "anyOf": [
240
+ {
241
+ "type": "string"
242
+ },
243
+ {
244
+ "anyOf": [
245
+ {
246
+ "type": "object",
247
+ "properties": {
248
+ "fileset": {
249
+ "anyOf": [
250
+ {
251
+ "type": "object",
252
+ "properties": {
253
+ "base": {
254
+ "type": "string",
255
+ "enum": [
256
+ "package",
257
+ "workspace"
258
+ ],
259
+ "description": "Anchor for the pattern."
260
+ },
261
+ "pattern": {
262
+ "type": "string",
263
+ "description": "Glob pattern (may start with `!` for negation)."
264
+ }
265
+ },
266
+ "required": [
267
+ "base",
268
+ "pattern"
269
+ ],
270
+ "additionalProperties": false,
271
+ "description": "Object form of a fileset pattern, for anchoring to the workspace root."
272
+ },
273
+ {
274
+ "type": "string"
275
+ }
276
+ ]
277
+ }
278
+ },
279
+ "required": [
280
+ "fileset"
281
+ ],
282
+ "additionalProperties": false,
283
+ "description": "An input based on file patterns.\n\n`fileset` may be a bare glob string (package-root relative) or an object form `{ pattern, base }` to anchor explicitly to the workspace root. Negation (`!` prefix) works in both forms."
284
+ },
285
+ {
286
+ "type": "object",
287
+ "properties": {
288
+ "runtime": {
289
+ "type": "string"
290
+ }
291
+ },
292
+ "required": [
293
+ "runtime"
294
+ ],
295
+ "additionalProperties": false,
296
+ "description": "An input based on a runtime command."
297
+ },
298
+ {
299
+ "type": "object",
300
+ "properties": {
301
+ "env": {
302
+ "type": "string"
303
+ }
304
+ },
305
+ "required": [
306
+ "env"
307
+ ],
308
+ "additionalProperties": false,
309
+ "description": "An input based on environment variables."
310
+ },
311
+ {
312
+ "type": "object",
313
+ "properties": {
314
+ "externalDependencies": {
315
+ "type": "array",
316
+ "items": {
317
+ "type": "string"
318
+ }
319
+ }
320
+ },
321
+ "required": [
322
+ "externalDependencies"
323
+ ],
324
+ "additionalProperties": false,
325
+ "description": "An input based on external dependency versions."
326
+ }
327
+ ],
328
+ "description": "Defines an input for cache invalidation."
329
+ }
330
+ ]
331
+ },
332
+ "description": "Input patterns for cache invalidation"
333
+ },
334
+ "maxConcurrent": {
335
+ "type": "number",
336
+ "description": "Maximum number of in-flight instances of this target across the whole graph. When set, the scheduler refuses to start an additional task whose `target.target` equals this target's name once the running count reaches `maxConcurrent`. Independent of `--parallel`: the global cap still bounds total in-flight tasks, and `maxConcurrent` further bounds the per-target subset.\n\nUse for tests/deploys that share an external resource (DB, port, mock server). Set to `1` to serialize. Values `<= 0` are ignored.\n\nIf multiple projects declare different values for the same target name, the runner uses the smallest declared cap. Caps don't apply to tasks marked `always: true`; those run in a separate finalisation phase outside the scheduler."
337
+ },
338
+ "outputs": {
339
+ "type": "array",
340
+ "items": {
341
+ "type": "string"
342
+ },
343
+ "description": "Output patterns produced by this target"
344
+ },
345
+ "parallelism": {
346
+ "type": "boolean",
347
+ "description": "Whether this target supports parallel execution"
348
+ },
349
+ "warningPattern": {
350
+ "anyOf": [
351
+ {
352
+ "type": "string"
353
+ },
354
+ {
355
+ "type": "array",
356
+ "items": {
357
+ "type": "string"
358
+ }
359
+ }
360
+ ],
361
+ "description": "Regex source string(s) that mark a successful task as having emitted warnings. The orchestrator scans the task's combined terminal output after a 0-exit and, on first match, sets `hadWarnings` on the result. Combine with `cacheOnWarning: false` to skip caching for warning-tainted runs. Both bare strings and arrays are accepted; arrays are tested in order.\n\n ```ts warningPattern: [\"\\\\bwarning\\\\b\", \"TS\\\\d{4}\"] ```"
362
+ },
363
+ "when": {
364
+ "type": "object",
365
+ "properties": {
366
+ "branch": {
367
+ "anyOf": [
368
+ {
369
+ "type": "string"
370
+ },
371
+ {
372
+ "type": "array",
373
+ "items": {
374
+ "type": "string"
375
+ }
376
+ }
377
+ ],
378
+ "description": "Match against the current git branch (HEAD)."
379
+ },
380
+ "ci": {
381
+ "type": "boolean",
382
+ "description": "Run only when invoked inside CI when `true`, only outside CI when `false`. Detects CI via the `CI` env var (the convention GitHub Actions, GitLab, CircleCI, Jenkins, etc. all share)."
383
+ },
384
+ "env": {
385
+ "anyOf": [
386
+ {
387
+ "anyOf": [
388
+ {
389
+ "type": "string"
390
+ },
391
+ {
392
+ "type": "object",
393
+ "properties": {
394
+ "equals": {
395
+ "type": "string",
396
+ "description": "Match this exact value. Mutually exclusive with `exists`."
397
+ },
398
+ "exists": {
399
+ "type": "boolean",
400
+ "description": "Assert the variable is set & non-empty (`true`) or unset/empty (`false`)."
401
+ },
402
+ "name": {
403
+ "type": "string",
404
+ "description": "Variable name."
405
+ }
406
+ },
407
+ "required": [
408
+ "name"
409
+ ],
410
+ "additionalProperties": false
411
+ }
412
+ ],
413
+ "description": "An environment-variable match. The string form is shorthand for `{ name, exists: true }` (set + non-empty). The object form supports either presence assertions or exact-value matching."
414
+ },
415
+ {
416
+ "type": "array",
417
+ "items": {
418
+ "anyOf": [
419
+ {
420
+ "type": "string"
421
+ },
422
+ {
423
+ "type": "object",
424
+ "properties": {
425
+ "equals": {
426
+ "type": "string",
427
+ "description": "Match this exact value. Mutually exclusive with `exists`."
428
+ },
429
+ "exists": {
430
+ "type": "boolean",
431
+ "description": "Assert the variable is set & non-empty (`true`) or unset/empty (`false`)."
432
+ },
433
+ "name": {
434
+ "type": "string",
435
+ "description": "Variable name."
436
+ }
437
+ },
438
+ "required": [
439
+ "name"
440
+ ],
441
+ "additionalProperties": false
442
+ }
443
+ ],
444
+ "description": "An environment-variable match. The string form is shorthand for `{ name, exists: true }` (set + non-empty). The object form supports either presence assertions or exact-value matching."
445
+ }
446
+ }
447
+ ],
448
+ "description": "Match against environment variables. A bare string asserts the variable is set and non-empty; the object form lets you match an exact value or just assert presence/absence."
449
+ },
450
+ "not": {
451
+ "type": "object",
452
+ "properties": {
453
+ "branch": {
454
+ "anyOf": [
455
+ {
456
+ "type": "string"
457
+ },
458
+ {
459
+ "type": "array",
460
+ "items": {
461
+ "type": "string"
462
+ }
463
+ }
464
+ ]
465
+ },
466
+ "ci": {
467
+ "type": "boolean"
468
+ },
469
+ "env": {
470
+ "anyOf": [
471
+ {
472
+ "anyOf": [
473
+ {
474
+ "type": "string"
475
+ },
476
+ {
477
+ "type": "object",
478
+ "properties": {
479
+ "equals": {
480
+ "type": "string",
481
+ "description": "Match this exact value. Mutually exclusive with `exists`."
482
+ },
483
+ "exists": {
484
+ "type": "boolean",
485
+ "description": "Assert the variable is set & non-empty (`true`) or unset/empty (`false`)."
486
+ },
487
+ "name": {
488
+ "type": "string",
489
+ "description": "Variable name."
490
+ }
491
+ },
492
+ "required": [
493
+ "name"
494
+ ],
495
+ "additionalProperties": false
496
+ }
497
+ ],
498
+ "description": "An environment-variable match. The string form is shorthand for `{ name, exists: true }` (set + non-empty). The object form supports either presence assertions or exact-value matching."
499
+ },
500
+ {
501
+ "type": "array",
502
+ "items": {
503
+ "anyOf": [
504
+ {
505
+ "type": "string"
506
+ },
507
+ {
508
+ "type": "object",
509
+ "properties": {
510
+ "equals": {
511
+ "type": "string",
512
+ "description": "Match this exact value. Mutually exclusive with `exists`."
513
+ },
514
+ "exists": {
515
+ "type": "boolean",
516
+ "description": "Assert the variable is set & non-empty (`true`) or unset/empty (`false`)."
517
+ },
518
+ "name": {
519
+ "type": "string",
520
+ "description": "Variable name."
521
+ }
522
+ },
523
+ "required": [
524
+ "name"
525
+ ],
526
+ "additionalProperties": false
527
+ }
528
+ ],
529
+ "description": "An environment-variable match. The string form is shorthand for `{ name, exists: true }` (set + non-empty). The object form supports either presence assertions or exact-value matching."
530
+ }
531
+ }
532
+ ]
533
+ },
534
+ "os": {
535
+ "anyOf": [
536
+ {
537
+ "type": "string",
538
+ "enum": [
539
+ "aix",
540
+ "darwin",
541
+ "freebsd",
542
+ "linux",
543
+ "openbsd",
544
+ "sunos",
545
+ "windows",
546
+ "win32"
547
+ ],
548
+ "description": "Aliased platform list — `\"windows\"` is sugar for Node's `\"win32\"`."
549
+ },
550
+ {
551
+ "type": "array",
552
+ "items": {
553
+ "type": "string",
554
+ "enum": [
555
+ "aix",
556
+ "darwin",
557
+ "freebsd",
558
+ "linux",
559
+ "openbsd",
560
+ "sunos",
561
+ "windows",
562
+ "win32"
563
+ ],
564
+ "description": "Aliased platform list — `\"windows\"` is sugar for Node's `\"win32\"`."
565
+ }
566
+ }
567
+ ]
568
+ }
569
+ },
570
+ "additionalProperties": false,
571
+ "description": "Negative mirrors. A task runs only when *all* `not.*` clauses fail."
572
+ },
573
+ "os": {
574
+ "anyOf": [
575
+ {
576
+ "type": "string",
577
+ "enum": [
578
+ "aix",
579
+ "darwin",
580
+ "freebsd",
581
+ "linux",
582
+ "openbsd",
583
+ "sunos",
584
+ "windows",
585
+ "win32"
586
+ ],
587
+ "description": "Aliased platform list — `\"windows\"` is sugar for Node's `\"win32\"`."
588
+ },
589
+ {
590
+ "type": "array",
591
+ "items": {
592
+ "type": "string",
593
+ "enum": [
594
+ "aix",
595
+ "darwin",
596
+ "freebsd",
597
+ "linux",
598
+ "openbsd",
599
+ "sunos",
600
+ "windows",
601
+ "win32"
602
+ ],
603
+ "description": "Aliased platform list — `\"windows\"` is sugar for Node's `\"win32\"`."
604
+ }
605
+ }
606
+ ],
607
+ "description": "Match `process.platform` (`\"linux\" | \"darwin\" | \"win32\" | \"freebsd\" | \"openbsd\" | \"sunos\" | \"aix\"`). Pass `\"windows\"` as an alias for `\"win32\"` — easier to remember and matches what people type."
608
+ }
609
+ },
610
+ "additionalProperties": false,
611
+ "description": "Predicate that gates execution. When the condition evaluates to `false` for the current environment, the task is skipped (marked `\"skipped\"`, not failed). Combine with `os`, `env`, `branch`, and `ci` clauses for granular control:\n\n ```ts when: { os: \"linux\", ci: true, env: \"DEPLOY_TOKEN\" } ```"
612
+ },
613
+ "aliases": {
614
+ "type": "array",
615
+ "items": {
616
+ "type": "string"
617
+ },
618
+ "description": "Alternate names that resolve to this target on the CLI. Useful for shortening long canonical names (`test` ↔ `t`) or for offering migration-friendly aliases when renaming targets. Aliases must be globally unique within the workspace."
619
+ },
620
+ "description": {
621
+ "type": "string",
622
+ "description": "One-line description surfaced by `vis list` and (in future) per-task `--help`. Kept short — longer docs belong in project READMEs or vis.config.ts comments."
623
+ },
624
+ "inferred": {
625
+ "type": "boolean",
626
+ "description": "True when the target was synthesized by a Project Crystal-style detector (see {@link ../inference } ) rather than declared by a package.json script, project.json, or vis.task.ts file. Surfaced by `vis list --inferred` and used by tooling to distinguish implicit defaults from explicit user intent."
627
+ },
628
+ "options": {
629
+ "$ref": "#/$defs/VisTargetOptions",
630
+ "description": "Vis-specific target options."
631
+ },
632
+ "preset": {
633
+ "$ref": "#/$defs/TargetPreset",
634
+ "description": "Preset applied before user-specified options."
635
+ },
636
+ "type": {
637
+ "$ref": "#/$defs/TargetType",
638
+ "description": "Semantic task type. Affects caching defaults and CI filtering.",
639
+ "default": "test"
640
+ }
641
+ },
642
+ "additionalProperties": false,
643
+ "description": "An extended target configuration that adds the vis-specific options on top of task-runner's `TargetConfiguration`."
644
+ },
645
+ "VisTargetOptions": {
646
+ "type": "object",
647
+ "properties": {
648
+ "affectedFiles": {
649
+ "$ref": "#/$defs/AffectedFilesMode",
650
+ "description": "How to forward affected files to the task process. Only used when invoked via `vis affected &lt;target>`.",
651
+ "default": false
652
+ },
653
+ "envFile": {
654
+ "anyOf": [
655
+ {
656
+ "type": "boolean"
657
+ },
658
+ {
659
+ "type": "string"
660
+ },
661
+ {
662
+ "type": "array",
663
+ "items": {
664
+ "type": "string"
665
+ }
666
+ }
667
+ ],
668
+ "description": "Load environment variables from dotenv file(s) before running.\n- `string`: a single file path (relative to project root).\n- `string[]`: multiple files — later entries override earlier ones, so put more-specific files last (e.g. `[\".env\", \".env.local\"]`).\n- `true`: auto-cascade in the Next/Vite order: `.env` → `.env.{NODE_ENV}` → `.env.local` → `.env.{NODE_ENV}.local`. Skips `.env.local` when NODE_ENV is `test`, matching Next.js."
669
+ },
670
+ "interactive": {
671
+ "type": "boolean",
672
+ "description": "When true, the task is serialized with respect to parallel execution and must be run on the main process (claims stdin). Used for commands that read from the terminal.",
673
+ "default": false
674
+ },
675
+ "internal": {
676
+ "type": "boolean",
677
+ "description": "When true, the task is hidden from CLI listings and can only be invoked as a dependency of another task.",
678
+ "default": false
679
+ },
680
+ "killGracePeriodMs": {
681
+ "type": "number",
682
+ "description": "Milliseconds the timeout watchdog waits between sending SIGTERM and SIGKILL when the `timeout` budget fires. Tasks that ignore SIGTERM (e.g. test runners holding open child processes) get force-killed after this grace window so a stuck task can't outlive its budget.\n\nSet to `0` to skip escalation and rely on SIGTERM only.",
683
+ "default": 5000
684
+ },
685
+ "mutex": {
686
+ "type": "string",
687
+ "description": "Serializes all tasks that share the same mutex name. Useful for tasks that contend on a shared resource (e.g., a database migration)."
688
+ },
689
+ "outputStyle": {
690
+ "type": "string",
691
+ "enum": [
692
+ "normal",
693
+ "quiet"
694
+ ],
695
+ "description": "Per-target output verbosity. Overrides the global `--output-style` flag for this specific target.\n\n- `\"normal\"` (default): print every task's terminal output\n- `\"quiet\"`: only print output when the task fails. Successful and cached tasks contribute their status line and timing, but their captured stdout/stderr is suppressed.\n\nUseful when a routinely-noisy task (a linter or test runner with verbose progress output) should stay quiet during green builds but reveal everything when it fails."
696
+ },
697
+ "persistent": {
698
+ "type": "boolean",
699
+ "description": "When true, the task is a long-running / never-ending process. Persistent tasks are scheduled last, execute after all cacheable tasks complete, and are never cached.",
700
+ "default": false
701
+ },
702
+ "preset": {
703
+ "$ref": "#/$defs/TargetPreset",
704
+ "description": "A preset that pre-fills a common bundle of options. User-provided fields always take precedence over the preset."
705
+ },
706
+ "pty": {
707
+ "type": "boolean",
708
+ "description": "Run the task through a pseudo-terminal so color-aware tools (vitest, eslint, biome, …) render as if attached to a real TTY instead of a pipe. Output is captured via task-runner's `TerminalBuffer` so ANSI escapes are normalized into the final rendered state before reaching the reporter.\n\nForces cache to off — PTY output can include timing-dependent frames (spinners) that aren't safe to replay from a cache.",
709
+ "default": false
710
+ },
711
+ "retryCount": {
712
+ "type": "number",
713
+ "description": "Number of times to retry the task on failure. Uses an exponential backoff by default (1s, 2s, 4s, ...).",
714
+ "default": 0
715
+ },
716
+ "retryDelay": {
717
+ "anyOf": [
718
+ {
719
+ "type": "number"
720
+ },
721
+ {
722
+ "type": "string",
723
+ "const": "exponential"
724
+ }
725
+ ],
726
+ "description": "Delay between retry attempts in milliseconds, or `\"exponential\"` for 2^attempt * 1000 ms.",
727
+ "default": "exponential"
728
+ },
729
+ "runFromWorkspaceRoot": {
730
+ "type": "boolean",
731
+ "description": "When true, the command executes with the workspace root as CWD instead of the project root.",
732
+ "default": false
733
+ },
734
+ "runInCI": {
735
+ "$ref": "#/$defs/RunInCI",
736
+ "description": "Controls whether the task runs in CI environments.",
737
+ "default": true
738
+ },
739
+ "runnerTags": {
740
+ "type": "array",
741
+ "items": {
742
+ "type": "string"
743
+ },
744
+ "description": "Capability tags that gate this task to runners advertising the same tag. The CLI's `--runner-tags=gpu,slow` flag (or `VIS_RUNNER_TAGS` env var) tells vis what the current runner supports; tasks whose `runnerTags` share at least one tag with the runner set are eligible. Untagged tasks (no `runnerTags` or an empty array) are general-purpose and always run.\n\nUse this for special-purpose CI lanes — e.g. a GPU runner that should only pick up visual-regression suites, or a nightly job that runs `slow` integration tests. When neither flag nor env is set, the filter is inactive and every task runs."
745
+ },
746
+ "service": {
747
+ "$ref": "#/$defs/ServiceConfig",
748
+ "description": "Marks this target as a long-lived service that can be started via `vis service start &lt;id>` and auto-attached when other tasks declare it in `dependsOn`. Implies persistent + non-cacheable behaviour (set `preset: \"server\"` to inherit the rest of the bundle).\n\nThe presence of this block — not `preset: \"server\"` alone — is what makes a target eligible for the cross-invocation registry. `preset: \"server\"` without `service` keeps today's in-run-only behaviour."
749
+ },
750
+ "shell": {
751
+ "type": "string",
752
+ "description": "Per-target shell override. When set, the command runs through this shell instead of the platform default."
753
+ },
754
+ "strictEnv": {
755
+ "type": "boolean",
756
+ "description": "Override the workspace `strictEnv` setting for this target. When truthy, the target fails if its command references an env var that resolves to neither the task's effective env nor `process.env`. When `false`, the target opts out of a workspace `strictEnv: true` (e.g. for a one-off command that legitimately tolerates an unset variable)."
757
+ },
758
+ "timeout": {
759
+ "type": "number",
760
+ "description": "Maximum wall-clock milliseconds a single task run is allowed to take before being killed. `0` / `undefined` means no timeout.\n\nWhen the timeout fires the task is sent SIGTERM and, if it has not exited within `killGracePeriodMs`, SIGKILL. The task exits with a failure status carrying the `[timeout]` marker in `terminalOutput`. Retries count per-attempt, not cumulatively.\n\nUse this to prevent runaway tasks from eating CI wall-clock time up to the job-level cutoff."
761
+ },
762
+ "unixShell": {
763
+ "type": "string",
764
+ "description": "Per-target unix shell override, used on Linux and macOS. Takes precedence over `shell` on unix-like systems."
765
+ },
766
+ "windowsShell": {
767
+ "type": "string",
768
+ "description": "Per-target windows shell override, used on Windows. Takes precedence over `shell` on Windows."
769
+ }
770
+ },
771
+ "additionalProperties": false,
772
+ "description": "Vis-specific target options that extend the task-runner's base `TargetConfiguration`. These live under `target.options` and are interpreted by vis before handing the task off to task-runner.\n\nConditional execution (`when:`) and finally tasks (`always:`) live at the target top level, not under `options` — they're handled by the task-runner orchestrator. See `@visulima/task-runner`'s `WhenCondition`."
773
+ },
774
+ "AffectedFilesMode": {
775
+ "type": [
776
+ "string",
777
+ "boolean"
778
+ ],
779
+ "enum": [
780
+ "args",
781
+ "both",
782
+ "env",
783
+ false
784
+ ],
785
+ "description": "Controls how affected files are forwarded to a task.\n- `false` (default): Do not forward.\n- `\"args\"`: Append affected paths as additional command arguments.\n- `\"env\"`: Expose them via `VIS_AFFECTED_FILES` environment variable.\n- `\"both\"`: Both of the above."
786
+ },
787
+ "TargetPreset": {
788
+ "type": "string",
789
+ "enum": [
790
+ "server",
791
+ "utility"
792
+ ],
793
+ "description": "Preset bundles of target options.\n- `server`: Long-running local dev server — caching off, not in CI, interactive, persistent.\n- `utility`: Short-lived helper — caching off, not in CI."
794
+ },
795
+ "RunInCI": {
796
+ "anyOf": [
797
+ {
798
+ "type": "string",
799
+ "const": "affected"
800
+ },
801
+ {
802
+ "type": "string",
803
+ "const": "always"
804
+ },
805
+ {
806
+ "type": "boolean"
807
+ }
808
+ ],
809
+ "description": "Controls whether a target runs in CI.\n- `true` (default): Always run.\n- `false`: Never run in CI (local-only).\n- `\"affected\"`: Only when the project is affected by the current change set.\n- `\"always\"`: Always run, even if unaffected."
810
+ },
811
+ "ServiceConfig": {
812
+ "type": "object",
813
+ "properties": {
814
+ "env": {
815
+ "type": "object",
816
+ "additionalProperties": {
817
+ "type": "string"
818
+ },
819
+ "description": "Env vars to expose to dependent tasks when this service is registered. Merged into the dependent task's env after the task's own envFile and before the task's explicit `env` overrides — the dependent task wins on key collisions.\n\nNote: only this `env` map propagates to dependents. The service target's own `envFile` is loaded into the **service process** at start time but is *not* forwarded — dependents must declare any shared values they need either here or in their own envFile. This boundary is intentional: envFiles often contain operator-only secrets (deploy keys, admin tokens) that should not leak into downstream test commands."
820
+ },
821
+ "killGracePeriodMs": {
822
+ "type": "number",
823
+ "description": "Grace period in milliseconds between SIGTERM and SIGKILL when the service is stopped.",
824
+ "default": 5000
825
+ },
826
+ "port": {
827
+ "type": "number",
828
+ "description": "Optional port the service listens on. Used as the default for `readiness.tcp.port` when no explicit probe is configured, and surfaced by `vis service list`."
829
+ },
830
+ "readiness": {
831
+ "type": "object",
832
+ "properties": {
833
+ "tcp": {
834
+ "type": "object",
835
+ "properties": {
836
+ "host": {
837
+ "type": "string"
838
+ },
839
+ "port": {
840
+ "type": "number"
841
+ },
842
+ "timeoutMs": {
843
+ "type": "number"
844
+ }
845
+ },
846
+ "required": [
847
+ "port"
848
+ ],
849
+ "additionalProperties": false
850
+ }
851
+ },
852
+ "required": [
853
+ "tcp"
854
+ ],
855
+ "additionalProperties": false,
856
+ "description": "Readiness probe configuration. v1 supports TCP only."
857
+ }
858
+ },
859
+ "additionalProperties": false,
860
+ "description": "Configuration block declared on a target to mark it as a long-lived \"service\" — eligible to be started/stopped via `vis service` and auto-attached when other tasks depend on it.\n\nTargets must also carry `preset: \"server\"` (or the equivalent `persistent: true`) for the service-mode lifecycle to apply."
861
+ },
862
+ "TargetType": {
863
+ "type": "string",
864
+ "enum": [
865
+ "build",
866
+ "run",
867
+ "test"
868
+ ],
869
+ "description": "Semantic classification for a target.\n- `build`: Generates one or more artifacts; cached by default.\n- `test`: Validation task (lint, typecheck, unit test). Default type.\n- `run`: One-off or long-running process. Not cached by default."
870
+ }
871
+ }
872
+ }