@visulima/vis 1.0.0-alpha.1 → 1.0.0-alpha.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +403 -12
- package/LICENSE.md +283 -0
- package/README.md +254 -9
- package/dist/bin.js +9 -146
- package/dist/config/index.d.ts +1818 -0
- package/dist/config/index.js +2 -0
- package/dist/generate/index.d.ts +157 -0
- package/dist/generate/index.js +3 -0
- package/dist/packem_chunks/applyDefaults.js +336 -0
- package/dist/packem_chunks/bin.js +9577 -0
- package/dist/packem_chunks/doctor-probe.js +112 -0
- package/dist/packem_chunks/fix.js +234 -0
- package/dist/packem_chunks/handler.js +99 -0
- package/dist/packem_chunks/handler10.js +53 -0
- package/dist/packem_chunks/handler11.js +32 -0
- package/dist/packem_chunks/handler12.js +100 -0
- package/dist/packem_chunks/handler13.js +25 -0
- package/dist/packem_chunks/handler14.js +916 -0
- package/dist/packem_chunks/handler15.js +206 -0
- package/dist/packem_chunks/handler16.js +124 -0
- package/dist/packem_chunks/handler17.js +13 -0
- package/dist/packem_chunks/handler18.js +106 -0
- package/dist/packem_chunks/handler19.js +19 -0
- package/dist/packem_chunks/handler2.js +75 -0
- package/dist/packem_chunks/handler20.js +29 -0
- package/dist/packem_chunks/handler21.js +222 -0
- package/dist/packem_chunks/handler22.js +237 -0
- package/dist/packem_chunks/handler23.js +101 -0
- package/dist/packem_chunks/handler24.js +110 -0
- package/dist/packem_chunks/handler25.js +402 -0
- package/dist/packem_chunks/handler26.js +13 -0
- package/dist/packem_chunks/handler27.js +63 -0
- package/dist/packem_chunks/handler28.js +34 -0
- package/dist/packem_chunks/handler29.js +458 -0
- package/dist/packem_chunks/handler3.js +95 -0
- package/dist/packem_chunks/handler30.js +170 -0
- package/dist/packem_chunks/handler31.js +530 -0
- package/dist/packem_chunks/handler32.js +214 -0
- package/dist/packem_chunks/handler33.js +119 -0
- package/dist/packem_chunks/handler34.js +630 -0
- package/dist/packem_chunks/handler35.js +283 -0
- package/dist/packem_chunks/handler36.js +542 -0
- package/dist/packem_chunks/handler37.js +762 -0
- package/dist/packem_chunks/handler38.js +989 -0
- package/dist/packem_chunks/handler39.js +574 -0
- package/dist/packem_chunks/handler4.js +90 -0
- package/dist/packem_chunks/handler40.js +1685 -0
- package/dist/packem_chunks/handler41.js +1088 -0
- package/dist/packem_chunks/handler42.js +797 -0
- package/dist/packem_chunks/handler43.js +2658 -0
- package/dist/packem_chunks/handler44.js +3886 -0
- package/dist/packem_chunks/handler45.js +2574 -0
- package/dist/packem_chunks/handler46.js +3769 -0
- package/dist/packem_chunks/handler47.js +1491 -0
- package/dist/packem_chunks/handler5.js +174 -0
- package/dist/packem_chunks/handler6.js +95 -0
- package/dist/packem_chunks/handler7.js +115 -0
- package/dist/packem_chunks/handler8.js +12 -0
- package/dist/packem_chunks/handler9.js +29 -0
- package/dist/packem_chunks/heal-accept.js +522 -0
- package/dist/packem_chunks/heal.js +673 -0
- package/dist/packem_chunks/index.js +873 -0
- package/dist/packem_chunks/loader.js +23 -0
- package/dist/packem_shared/VisUpdateApp-D-Yz_wvg.js +1316 -0
- package/dist/packem_shared/_commonjsHelpers-BqLXS_qQ.js +5 -0
- package/dist/packem_shared/ai-analysis-CHeB1joD.js +367 -0
- package/dist/packem_shared/ai-cache-Be_jexe4.js +142 -0
- package/dist/packem_shared/ai-fix-B9iQVcD2.js +379 -0
- package/dist/packem_shared/cache-directory-2qvs4goY.js +98 -0
- package/dist/packem_shared/catalog-BJTtyi-O.js +1371 -0
- package/dist/packem_shared/dependency-scan-A0KSklpG.js +188 -0
- package/dist/packem_shared/docker-2iZzc280.js +181 -0
- package/dist/packem_shared/failure-log-Cz3Z4SKL.js +100 -0
- package/dist/packem_shared/flakiness-goTxXuCX.js +180 -0
- package/dist/packem_shared/otel-DCvqCTz_.js +158 -0
- package/dist/packem_shared/otelPlugin-DFaLDvJf.js +3 -0
- package/dist/packem_shared/registry-CbqXI0rc.js +272 -0
- package/dist/packem_shared/run-summary-utils-PVMl4aIh.js +130 -0
- package/dist/packem_shared/runtime-check-Cobi3p6l.js +127 -0
- package/dist/packem_shared/selectors-SM69TfqC.js +194 -0
- package/dist/packem_shared/symbols-Ta7g2nU-.js +14 -0
- package/dist/packem_shared/toolchain-BdZd9eBi.js +975 -0
- package/dist/packem_shared/typosquats-C-bCh3PX.js +1210 -0
- package/dist/packem_shared/use-measured-height-CNP0vT4M.js +20 -0
- package/dist/packem_shared/utils-CthVdBPS.js +40 -0
- package/dist/packem_shared/xxh3-Ck8mXNg1.js +239 -0
- package/index.js +773 -0
- package/package.json +82 -21
- package/schemas/project.schema.json +420 -0
- package/schemas/vis-config.schema.json +501 -0
- package/skills/vis/SKILL.md +96 -0
- package/templates/buildkite-ci/.buildkite/pipeline.yml.tera +85 -0
- package/templates/buildkite-ci/template.yml +20 -0
- package/dist/ai-analysis.d.ts +0 -40
- package/dist/ai-cache.d.ts +0 -21
- package/dist/bin.d.ts +0 -1
- package/dist/catalog.d.ts +0 -110
- package/dist/commands/affected.d.ts +0 -3
- package/dist/commands/ai.d.ts +0 -3
- package/dist/commands/analyze.d.ts +0 -3
- package/dist/commands/check.d.ts +0 -3
- package/dist/commands/graph.d.ts +0 -3
- package/dist/commands/hook/constants.d.ts +0 -8
- package/dist/commands/hook/index.d.ts +0 -3
- package/dist/commands/hook/install.d.ts +0 -7
- package/dist/commands/hook/migrate.d.ts +0 -27
- package/dist/commands/hook/uninstall.d.ts +0 -3
- package/dist/commands/migrate/constants.d.ts +0 -12
- package/dist/commands/migrate/deps.d.ts +0 -32
- package/dist/commands/migrate/index.d.ts +0 -3
- package/dist/commands/migrate/json.d.ts +0 -20
- package/dist/commands/migrate/lint-staged.d.ts +0 -62
- package/dist/commands/migrate/types.d.ts +0 -20
- package/dist/commands/run.d.ts +0 -3
- package/dist/commands/staged.d.ts +0 -3
- package/dist/commands/update.d.ts +0 -3
- package/dist/config.d.ts +0 -40
- package/dist/config.js +0 -1
- package/dist/package-manager.d.ts +0 -23
- package/dist/workspace.d.ts +0 -58
|
@@ -0,0 +1,501 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://visulima.com/schemas/vis-config.schema.json",
|
|
4
|
+
"title": "vis.config.ts",
|
|
5
|
+
"description": "Workspace configuration for @visulima/vis. Used by defineConfig() in vis.config.ts. This schema is for non-TypeScript editors; TypeScript users get autocomplete from defineConfig() types.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"properties": {
|
|
9
|
+
"ai": {
|
|
10
|
+
"type": "object",
|
|
11
|
+
"description": "AI analysis configuration.",
|
|
12
|
+
"additionalProperties": false,
|
|
13
|
+
"properties": {
|
|
14
|
+
"cacheTtl": { "type": "number", "description": "Cache TTL in milliseconds." },
|
|
15
|
+
"priority": {
|
|
16
|
+
"type": "object",
|
|
17
|
+
"description": "Override default provider priority. Higher number = preferred.",
|
|
18
|
+
"additionalProperties": { "type": "number" }
|
|
19
|
+
},
|
|
20
|
+
"provider": { "type": "string", "description": "Use a specific provider (e.g. \"claude\", \"gemini\")." }
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"codeowners": {
|
|
24
|
+
"type": "object",
|
|
25
|
+
"description": "Controls vis sync codeowners output.",
|
|
26
|
+
"additionalProperties": false,
|
|
27
|
+
"properties": {
|
|
28
|
+
"orderBy": {
|
|
29
|
+
"type": "string",
|
|
30
|
+
"enum": ["file-source", "project-id"],
|
|
31
|
+
"default": "file-source"
|
|
32
|
+
},
|
|
33
|
+
"provider": {
|
|
34
|
+
"type": "string",
|
|
35
|
+
"enum": ["github", "gitlab", "bitbucket", "other"],
|
|
36
|
+
"default": "github"
|
|
37
|
+
},
|
|
38
|
+
"globalPaths": {
|
|
39
|
+
"type": "object",
|
|
40
|
+
"description": "Workspace-level paths and their owners (e.g. \"/.github/**\": [\"@org/platform\"]).",
|
|
41
|
+
"additionalProperties": {
|
|
42
|
+
"type": "array",
|
|
43
|
+
"items": { "type": "string" }
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
"constraints": {
|
|
49
|
+
"type": "object",
|
|
50
|
+
"description": "Project dependency constraints enforced before running tasks.",
|
|
51
|
+
"additionalProperties": false,
|
|
52
|
+
"properties": {
|
|
53
|
+
"enforceLayerRelationships": {
|
|
54
|
+
"type": "boolean",
|
|
55
|
+
"description": "Projects can only depend on the same or lower layer: configuration < library < scaffolding < tool < automation < application.",
|
|
56
|
+
"default": false
|
|
57
|
+
},
|
|
58
|
+
"tagRelationships": {
|
|
59
|
+
"type": "object",
|
|
60
|
+
"description": "Tag-based rules. Key = source tag, value = allowed dependency tags.",
|
|
61
|
+
"additionalProperties": {
|
|
62
|
+
"type": "array",
|
|
63
|
+
"items": { "type": "string" }
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
"typeBoundaries": {
|
|
67
|
+
"type": "object",
|
|
68
|
+
"additionalProperties": false,
|
|
69
|
+
"properties": {
|
|
70
|
+
"enforceApplicationBoundary": {
|
|
71
|
+
"type": "boolean",
|
|
72
|
+
"description": "No project may depend on an application.",
|
|
73
|
+
"default": true
|
|
74
|
+
},
|
|
75
|
+
"allowedDependencyTypes": {
|
|
76
|
+
"type": "object",
|
|
77
|
+
"description": "Maps project types to allowed dependency types.",
|
|
78
|
+
"additionalProperties": {
|
|
79
|
+
"type": "array",
|
|
80
|
+
"items": { "type": "string" }
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
"dependencyKindRules": {
|
|
86
|
+
"type": "object",
|
|
87
|
+
"additionalProperties": false,
|
|
88
|
+
"properties": {
|
|
89
|
+
"noDevDependencyOnProductionDep": { "type": "boolean", "default": false },
|
|
90
|
+
"noProductionDependencyOnApplication": { "type": "boolean", "default": false }
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
"install": {
|
|
96
|
+
"type": "object",
|
|
97
|
+
"description": "Installer backend selection. Lets `vis install` (and friends) use aube — a fast Rust-native PM that reads/writes pnpm/npm/yarn/bun lockfiles in place — or pin a specific conventional PM. Aube must be installed separately; vis does not bundle it.",
|
|
98
|
+
"additionalProperties": false,
|
|
99
|
+
"properties": {
|
|
100
|
+
"backend": {
|
|
101
|
+
"type": "string",
|
|
102
|
+
"enum": ["auto", "aube", "pnpm", "npm", "yarn", "bun"],
|
|
103
|
+
"default": "auto",
|
|
104
|
+
"description": "Which PM runs install/add/remove. `auto` uses aube when it is on PATH and falls back to the lockfile-detected PM. Explicit names error if the binary is missing. CLI flag `--installer` and env var `VIS_INSTALLER` override this."
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
},
|
|
108
|
+
"inferTargets": {
|
|
109
|
+
"default": false,
|
|
110
|
+
"oneOf": [
|
|
111
|
+
{ "type": "boolean" },
|
|
112
|
+
{
|
|
113
|
+
"type": "object",
|
|
114
|
+
"description": "Per-detector opt-out map. Keys must be one of the 36 built-in detector names; set a key to `false` to disable that detector. Detectors omitted from the object stay enabled. Unknown keys log a warning at config-load time.",
|
|
115
|
+
"additionalProperties": { "type": "boolean" },
|
|
116
|
+
"propertyNames": {
|
|
117
|
+
"enum": [
|
|
118
|
+
"nuxt",
|
|
119
|
+
"next",
|
|
120
|
+
"remix",
|
|
121
|
+
"astro",
|
|
122
|
+
"gatsby",
|
|
123
|
+
"docusaurus",
|
|
124
|
+
"vite",
|
|
125
|
+
"vitepress",
|
|
126
|
+
"nest",
|
|
127
|
+
"rolldown",
|
|
128
|
+
"tsdown",
|
|
129
|
+
"tsup",
|
|
130
|
+
"packem",
|
|
131
|
+
"rollup",
|
|
132
|
+
"webpack",
|
|
133
|
+
"vitest",
|
|
134
|
+
"jest",
|
|
135
|
+
"bun",
|
|
136
|
+
"playwright",
|
|
137
|
+
"cypress",
|
|
138
|
+
"storybook",
|
|
139
|
+
"typescript",
|
|
140
|
+
"typedoc",
|
|
141
|
+
"eslint",
|
|
142
|
+
"prettier",
|
|
143
|
+
"biome",
|
|
144
|
+
"oxlint",
|
|
145
|
+
"oxfmt",
|
|
146
|
+
"stylelint",
|
|
147
|
+
"knip",
|
|
148
|
+
"deno",
|
|
149
|
+
"prisma",
|
|
150
|
+
"drizzle",
|
|
151
|
+
"graphql-codegen",
|
|
152
|
+
"api-extractor",
|
|
153
|
+
"changeset"
|
|
154
|
+
]
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
],
|
|
158
|
+
"description": "Project Crystal-style inference. Synthesizes default targets (`build`, `test`, `dev`, `lint`, `format`, `typecheck`, `docs`, `db:*`, …) for each project by sniffing config files and `package.json` dependencies. Ships with 36 detectors covering app frameworks (nuxt, next, remix, astro, gatsby, docusaurus), bundlers (vite, rolldown, tsdown, tsup, packem, rollup, webpack), test runners (vitest, jest, bun, deno, playwright, cypress), lint/format tools (eslint, prettier, biome, oxlint, oxfmt, stylelint, knip), docs (typedoc, vitepress), DB tooling (prisma, drizzle), and release plumbing (graphql-codegen, api-extractor, changeset). Inferred targets are the lowest-priority layer — package.json scripts, project.json, and vis.task.ts always win on a per-target-name basis. Boolean `true` enables every detector; the object form opts individual detectors in or out by name. See `vis list --inferred` to inspect what each project resolves to."
|
|
159
|
+
},
|
|
160
|
+
"create": {
|
|
161
|
+
"type": "object",
|
|
162
|
+
"description": "Configuration for vis create scaffolding command.",
|
|
163
|
+
"additionalProperties": false,
|
|
164
|
+
"properties": {
|
|
165
|
+
"auth": { "type": "string", "description": "Authorization token for private templates." },
|
|
166
|
+
"defaultEditor": { "type": "string", "enum": ["vscode"] },
|
|
167
|
+
"defaultPm": { "type": "string", "enum": ["pnpm", "npm", "yarn", "bun"] },
|
|
168
|
+
"defaultProvider": { "type": "string", "enum": ["github", "gitlab", "bitbucket", "sourcehut"], "default": "github" },
|
|
169
|
+
"gitInit": { "type": "boolean", "default": false },
|
|
170
|
+
"install": { "type": "boolean", "default": true },
|
|
171
|
+
"preferOffline": { "type": "boolean", "default": false },
|
|
172
|
+
"registry": {
|
|
173
|
+
"oneOf": [{ "type": "string" }, { "type": "boolean", "const": false }]
|
|
174
|
+
},
|
|
175
|
+
"templates": {
|
|
176
|
+
"type": "object",
|
|
177
|
+
"description": "Named template aliases mapping short names to giget source strings.",
|
|
178
|
+
"additionalProperties": { "type": "string" }
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
},
|
|
182
|
+
"overrides": {
|
|
183
|
+
"type": "object",
|
|
184
|
+
"description": "Package override mappings applied during migration.",
|
|
185
|
+
"additionalProperties": { "type": "string" }
|
|
186
|
+
},
|
|
187
|
+
"preflight": {
|
|
188
|
+
"type": "object",
|
|
189
|
+
"description": "Preflight checks gating `vis run` / `vis ci`. Each check can be opted out individually; the CLI flag `--no-preflight` disables them all.",
|
|
190
|
+
"additionalProperties": false,
|
|
191
|
+
"properties": {
|
|
192
|
+
"lockfile": {
|
|
193
|
+
"type": "boolean",
|
|
194
|
+
"default": true,
|
|
195
|
+
"description": "Detect lockfile drift by comparing the lockfile mtime against the package manager's install marker (e.g. `node_modules/.modules.yaml` for pnpm). When the lockfile is newer than the marker, the run fails with the right reinstall command for CI vs TTY."
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
},
|
|
199
|
+
"security": {
|
|
200
|
+
"type": "object",
|
|
201
|
+
"description": "Supply-chain security settings.",
|
|
202
|
+
"additionalProperties": false,
|
|
203
|
+
"properties": {
|
|
204
|
+
"allowBuilds": {
|
|
205
|
+
"type": "object",
|
|
206
|
+
"description": "Allow (true) or deny (false) build scripts per package.",
|
|
207
|
+
"additionalProperties": { "type": "boolean" }
|
|
208
|
+
},
|
|
209
|
+
"blockExoticSubdeps": { "type": "boolean", "default": false },
|
|
210
|
+
"minimumReleaseAge": { "type": "number", "description": "Minutes since publish before allowing install.", "default": 0 },
|
|
211
|
+
"minimumReleaseAgeExclude": { "type": "array", "items": { "type": "string" } },
|
|
212
|
+
"socket": {
|
|
213
|
+
"type": "object",
|
|
214
|
+
"additionalProperties": false,
|
|
215
|
+
"properties": {
|
|
216
|
+
"acceptedRisks": {
|
|
217
|
+
"type": "object",
|
|
218
|
+
"additionalProperties": {
|
|
219
|
+
"type": "object",
|
|
220
|
+
"required": ["reason", "acceptedAt", "acceptedScore"],
|
|
221
|
+
"properties": {
|
|
222
|
+
"reason": { "type": "string" },
|
|
223
|
+
"acceptedAt": { "type": "string", "format": "date-time" },
|
|
224
|
+
"acceptedScore": { "type": "number" }
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
},
|
|
228
|
+
"apiToken": { "type": "string" },
|
|
229
|
+
"cacheTtlMs": { "type": "number", "default": 3600000 },
|
|
230
|
+
"enabled": { "type": "boolean", "default": false },
|
|
231
|
+
"minimumScore": { "type": "number", "default": 0.4 },
|
|
232
|
+
"timeoutMs": { "type": "number", "default": 15000 }
|
|
233
|
+
}
|
|
234
|
+
},
|
|
235
|
+
"strictDepBuilds": { "type": "boolean", "default": false },
|
|
236
|
+
"trustPolicy": { "type": "string", "enum": ["off", "no-downgrade"], "default": "off" },
|
|
237
|
+
"trustPolicyExclude": { "type": "array", "items": { "type": "string" } },
|
|
238
|
+
"trustPolicyIgnoreAfter": { "type": "number" },
|
|
239
|
+
"typosquatAllowlist": { "type": "array", "items": { "type": "string" } }
|
|
240
|
+
}
|
|
241
|
+
},
|
|
242
|
+
"sortPackageJson": {
|
|
243
|
+
"type": "object",
|
|
244
|
+
"additionalProperties": false,
|
|
245
|
+
"properties": {
|
|
246
|
+
"sortScripts": { "type": "boolean", "default": false }
|
|
247
|
+
}
|
|
248
|
+
},
|
|
249
|
+
"toolchain": {
|
|
250
|
+
"type": "object",
|
|
251
|
+
"description": "Toolchain (Node / pnpm / python / ...) management. Delegates to proto / mise / fnm / volta / asdf / nvm / corepack.",
|
|
252
|
+
"additionalProperties": false,
|
|
253
|
+
"properties": {
|
|
254
|
+
"autoInstall": {
|
|
255
|
+
"type": "boolean",
|
|
256
|
+
"description": "Run the right manager install on engines.node mismatch before vis run / vis ci proceed. Default: true when a manager is detected on PATH."
|
|
257
|
+
},
|
|
258
|
+
"preferredManager": {
|
|
259
|
+
"type": "string",
|
|
260
|
+
"enum": ["proto", "mise", "fnm", "volta", "asdf", "nvm", "corepack", "none"],
|
|
261
|
+
"description": "Explicit manager override, bypasses auto-detection. Note: self-activate is resolved automatically for pnpm/yarn + packageManager pins and is not a valid override."
|
|
262
|
+
},
|
|
263
|
+
"tools": {
|
|
264
|
+
"type": "object",
|
|
265
|
+
"description": "Override engines/packageManager-derived pins.",
|
|
266
|
+
"additionalProperties": false,
|
|
267
|
+
"properties": {
|
|
268
|
+
"bun": { "type": "string" },
|
|
269
|
+
"deno": { "type": "string" },
|
|
270
|
+
"go": { "type": "string" },
|
|
271
|
+
"node": { "type": "string" },
|
|
272
|
+
"npm": { "type": "string" },
|
|
273
|
+
"pnpm": { "type": "string" },
|
|
274
|
+
"python": { "type": "string" },
|
|
275
|
+
"ruby": { "type": "string" },
|
|
276
|
+
"rust": { "type": "string" },
|
|
277
|
+
"yarn": { "type": "string" }
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
},
|
|
282
|
+
"staged": {
|
|
283
|
+
"description": "Staged file patterns and commands (replaces lint-staged). Accepts string, string[], {title, task}, or mixed arrays. Function-form tasks are supported at runtime but are not JSON-schema-representable.",
|
|
284
|
+
"type": "object",
|
|
285
|
+
"additionalProperties": {
|
|
286
|
+
"oneOf": [
|
|
287
|
+
{ "type": "string" },
|
|
288
|
+
{ "type": "array", "items": { "oneOf": [{ "type": "string" }, { "type": "object" }] } },
|
|
289
|
+
{
|
|
290
|
+
"type": "object",
|
|
291
|
+
"required": ["title"],
|
|
292
|
+
"properties": {
|
|
293
|
+
"title": { "type": "string" }
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
]
|
|
297
|
+
}
|
|
298
|
+
},
|
|
299
|
+
"targetDefaults": {
|
|
300
|
+
"type": "object",
|
|
301
|
+
"description": "Default target configurations applied to all projects with a matching target.",
|
|
302
|
+
"additionalProperties": { "$ref": "project.schema.json#/$defs/targetConfiguration" }
|
|
303
|
+
},
|
|
304
|
+
"fileGroups": {
|
|
305
|
+
"type": "object",
|
|
306
|
+
"description": "Named file-group patterns, reusable via @filegroup:<name> in target inputs. Strings may be bare globs or URI form (file://, glob://, env://, func://, dep://).",
|
|
307
|
+
"additionalProperties": {
|
|
308
|
+
"type": "array",
|
|
309
|
+
"items": { "$ref": "project.schema.json#/$defs/inputString" }
|
|
310
|
+
}
|
|
311
|
+
},
|
|
312
|
+
"namedInputs": {
|
|
313
|
+
"type": "object",
|
|
314
|
+
"description": "Named input patterns inherited by every project target.",
|
|
315
|
+
"additionalProperties": {
|
|
316
|
+
"type": "array",
|
|
317
|
+
"items": {
|
|
318
|
+
"oneOf": [
|
|
319
|
+
{ "$ref": "project.schema.json#/$defs/inputString" },
|
|
320
|
+
{ "$ref": "project.schema.json#/$defs/fileSetInput" },
|
|
321
|
+
{ "$ref": "project.schema.json#/$defs/environmentInput" },
|
|
322
|
+
{ "$ref": "project.schema.json#/$defs/runtimeInput" },
|
|
323
|
+
{ "$ref": "project.schema.json#/$defs/externalDependencyInput" }
|
|
324
|
+
]
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
},
|
|
328
|
+
"taskDefaults": {
|
|
329
|
+
"type": "array",
|
|
330
|
+
"description": "Cascading task-default blocks scoped by project metadata.",
|
|
331
|
+
"items": {
|
|
332
|
+
"type": "object",
|
|
333
|
+
"required": ["targets"],
|
|
334
|
+
"additionalProperties": false,
|
|
335
|
+
"properties": {
|
|
336
|
+
"scope": {
|
|
337
|
+
"type": "object",
|
|
338
|
+
"description": "Scope predicate — all fields must match for the block to apply.",
|
|
339
|
+
"additionalProperties": false,
|
|
340
|
+
"properties": {
|
|
341
|
+
"tags": { "type": "array", "items": { "type": "string" } },
|
|
342
|
+
"projectType": { "type": "string", "enum": ["library", "application"] },
|
|
343
|
+
"layer": {
|
|
344
|
+
"oneOf": [
|
|
345
|
+
{ "type": "string", "enum": ["configuration", "library", "scaffolding", "tool", "automation", "application"] },
|
|
346
|
+
{
|
|
347
|
+
"type": "array",
|
|
348
|
+
"items": { "type": "string", "enum": ["configuration", "library", "scaffolding", "tool", "automation", "application"] }
|
|
349
|
+
}
|
|
350
|
+
]
|
|
351
|
+
},
|
|
352
|
+
"stack": {
|
|
353
|
+
"oneOf": [
|
|
354
|
+
{ "type": "string", "enum": ["backend", "frontend", "data", "infrastructure", "systems"] },
|
|
355
|
+
{ "type": "array", "items": { "type": "string", "enum": ["backend", "frontend", "data", "infrastructure", "systems"] } }
|
|
356
|
+
]
|
|
357
|
+
},
|
|
358
|
+
"language": {
|
|
359
|
+
"oneOf": [{ "type": "string" }, { "type": "array", "items": { "type": "string" } }]
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
},
|
|
363
|
+
"targets": {
|
|
364
|
+
"type": "object",
|
|
365
|
+
"additionalProperties": { "$ref": "project.schema.json#/$defs/targetConfiguration" }
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
},
|
|
370
|
+
"taskRunnerOptions": {
|
|
371
|
+
"type": "object",
|
|
372
|
+
"description": "Task runner engine options.",
|
|
373
|
+
"additionalProperties": false,
|
|
374
|
+
"properties": {
|
|
375
|
+
"parallel": { "oneOf": [{ "type": "number" }, { "type": "boolean" }], "default": 3 },
|
|
376
|
+
"smartLockfileHashing": { "type": "boolean", "default": false },
|
|
377
|
+
"frameworkInference": { "type": "boolean", "default": false },
|
|
378
|
+
"autoFingerprint": { "type": "boolean", "default": false },
|
|
379
|
+
"cacheDiagnostics": { "type": "boolean", "default": false },
|
|
380
|
+
"cacheDirectory": { "type": "string" },
|
|
381
|
+
"dryRun": { "type": "boolean", "default": false },
|
|
382
|
+
"summarize": { "type": "boolean", "default": false },
|
|
383
|
+
"skipNxCache": { "type": "boolean" },
|
|
384
|
+
"globalInputs": { "type": "array", "items": { "type": "string" } },
|
|
385
|
+
"globalEnv": { "type": "array", "items": { "type": "string" } },
|
|
386
|
+
"maxCacheAge": { "type": "number" },
|
|
387
|
+
"maxCacheSize": { "type": "string" },
|
|
388
|
+
"remoteCache": {
|
|
389
|
+
"type": "object",
|
|
390
|
+
"required": ["url"],
|
|
391
|
+
"additionalProperties": false,
|
|
392
|
+
"properties": {
|
|
393
|
+
"url": {
|
|
394
|
+
"type": "string",
|
|
395
|
+
"description": "Cache server URL. HTTP: 'https://cache.example.com'. REAPI: 'grpcs://host:port' (TLS) or 'grpc://host:port' (cleartext)."
|
|
396
|
+
},
|
|
397
|
+
"backend": {
|
|
398
|
+
"type": "string",
|
|
399
|
+
"enum": ["http", "reapi"],
|
|
400
|
+
"default": "http",
|
|
401
|
+
"description": "Wire-protocol selector. 'http' is Turborepo-compatible; 'reapi' speaks the Bazel Remote Execution API over gRPC (bazel-remote, BuildBuddy, BuildBarn, EngFlow)."
|
|
402
|
+
},
|
|
403
|
+
"mode": {
|
|
404
|
+
"type": "string",
|
|
405
|
+
"enum": ["read", "readwrite", "write"],
|
|
406
|
+
"default": "readwrite",
|
|
407
|
+
"description": "Cache mode. 'read' pulls only, 'write' pushes only, 'readwrite' does both."
|
|
408
|
+
},
|
|
409
|
+
"token": {
|
|
410
|
+
"type": "string",
|
|
411
|
+
"description": "HTTP backend bearer token sent as 'Authorization: Bearer …'. For REAPI, use 'bearerToken' instead."
|
|
412
|
+
},
|
|
413
|
+
"teamId": { "type": "string", "description": "Team / namespace for cache isolation." },
|
|
414
|
+
"timeout": { "type": "number", "default": 30000, "description": "Per-call request timeout in milliseconds." },
|
|
415
|
+
"compression": {
|
|
416
|
+
"type": "string",
|
|
417
|
+
"enum": ["gzip", "brotli"],
|
|
418
|
+
"default": "gzip",
|
|
419
|
+
"description": "HTTP-only: tarball compression on the wire."
|
|
420
|
+
},
|
|
421
|
+
"signing": {
|
|
422
|
+
"type": "object",
|
|
423
|
+
"additionalProperties": false,
|
|
424
|
+
"required": ["secret"],
|
|
425
|
+
"description": "HTTP-only HMAC-SHA256 signing for upload integrity.",
|
|
426
|
+
"properties": {
|
|
427
|
+
"secret": { "type": "string", "minLength": 16, "description": "Shared secret. Must be at least 16 characters." },
|
|
428
|
+
"verifyOnDownload": { "type": "boolean", "default": false, "description": "Reject downloads whose signature doesn't match." }
|
|
429
|
+
}
|
|
430
|
+
},
|
|
431
|
+
"localCasRoot": {
|
|
432
|
+
"type": "string",
|
|
433
|
+
"description": "Local CAS root used by per-blob backend methods. The HTTP bridge extracts retrieved tarballs into this root so follow-up fetchBlob calls hit local disk."
|
|
434
|
+
},
|
|
435
|
+
"bearerToken": {
|
|
436
|
+
"type": "string",
|
|
437
|
+
"description": "REAPI-only: bearer token sent in gRPC 'authorization: Bearer …' metadata."
|
|
438
|
+
},
|
|
439
|
+
"instanceName": {
|
|
440
|
+
"type": "string",
|
|
441
|
+
"description": "REAPI-only: 'instance_name' for multi-tenant servers (single gRPC endpoint hosting multiple logical caches)."
|
|
442
|
+
},
|
|
443
|
+
"allowInsecureBearer": {
|
|
444
|
+
"type": "boolean",
|
|
445
|
+
"default": false,
|
|
446
|
+
"description": "REAPI-only: opt out of the safety check that refuses bearer tokens over cleartext gRPC. Only set when the connection terminates inside a trusted boundary (loopback, mTLS sidecar)."
|
|
447
|
+
},
|
|
448
|
+
"read": {
|
|
449
|
+
"type": "boolean",
|
|
450
|
+
"deprecated": true,
|
|
451
|
+
"description": "Deprecated. Use 'mode' instead. Setting both still works but emits a one-time warning."
|
|
452
|
+
},
|
|
453
|
+
"write": {
|
|
454
|
+
"type": "boolean",
|
|
455
|
+
"deprecated": true,
|
|
456
|
+
"description": "Deprecated. Use 'mode' instead. Setting both still works but emits a one-time warning."
|
|
457
|
+
}
|
|
458
|
+
}
|
|
459
|
+
}
|
|
460
|
+
}
|
|
461
|
+
},
|
|
462
|
+
"tui": {
|
|
463
|
+
"type": "object",
|
|
464
|
+
"additionalProperties": false,
|
|
465
|
+
"properties": {
|
|
466
|
+
"autoExit": {
|
|
467
|
+
"oneOf": [{ "type": "boolean" }, { "type": "number" }],
|
|
468
|
+
"description": "Auto-exit TUI after completion. false=stay open, true=3s countdown, number=custom seconds.",
|
|
469
|
+
"default": false
|
|
470
|
+
}
|
|
471
|
+
}
|
|
472
|
+
},
|
|
473
|
+
"update": {
|
|
474
|
+
"type": "object",
|
|
475
|
+
"description": "Defaults for vis check and vis update commands.",
|
|
476
|
+
"additionalProperties": false,
|
|
477
|
+
"properties": {
|
|
478
|
+
"depFields": { "type": "array", "items": { "type": "string" } },
|
|
479
|
+
"exclude": { "type": "array", "items": { "type": "string" } },
|
|
480
|
+
"format": { "type": "string", "enum": ["table", "json", "minimal"] },
|
|
481
|
+
"ignore": { "type": "array", "items": { "type": "string" } },
|
|
482
|
+
"include": { "type": "array", "items": { "type": "string" } },
|
|
483
|
+
"includeLocked": { "type": "boolean", "default": false },
|
|
484
|
+
"install": { "type": "boolean" },
|
|
485
|
+
"minimumReleaseAge": { "type": "number" },
|
|
486
|
+
"minimumReleaseAgeExclude": { "type": "array", "items": { "type": "string" } },
|
|
487
|
+
"packageMode": {
|
|
488
|
+
"type": "object",
|
|
489
|
+
"additionalProperties": { "type": "string", "enum": ["latest", "minor", "patch"] }
|
|
490
|
+
},
|
|
491
|
+
"prerelease": { "type": "boolean" },
|
|
492
|
+
"security": { "type": "boolean" },
|
|
493
|
+
"target": { "type": "string", "enum": ["latest", "minor", "patch"] }
|
|
494
|
+
}
|
|
495
|
+
},
|
|
496
|
+
"versionConstraint": {
|
|
497
|
+
"type": "string",
|
|
498
|
+
"description": "Minimum vis CLI version required. Accepts semver ranges (e.g. \">=1.0.0\", \"^1.2.0\")."
|
|
499
|
+
}
|
|
500
|
+
}
|
|
501
|
+
}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: vis
|
|
3
|
+
description: Use when the workspace contains a vis.config.ts (or vis.config.js/json) at the repo root, or when the user mentions "vis", "task-runner", or "@visulima/vis". This skill orchestrates the vis MCP server's eight read-only tools to inspect projects, plan task graphs, and diagnose remote-cache rotations.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Working with the `vis` task runner
|
|
7
|
+
|
|
8
|
+
`vis` is the Visulima monorepo task runner — a Turborepo/Nx-class tool with a remote cache, REAPI gRPC backend, and project graph. When this skill is active you have the **`@visulima/vis-mcp` server** mounted, exposing eight read-only tools. Use them in preference to running `vis` shell commands yourself: the tools give you structured JSON and run faster.
|
|
9
|
+
|
|
10
|
+
The MCP server deliberately does NOT execute targets or scaffold templates — Nx-style "agent prepares, human executes". When the user wants to run `<project>:<target>` or `vis generate <template>`, prepare the command (use `list_targets`/`describe_template` to confirm it exists and capture required arguments) and ask the user to run it themselves; afterwards use `get_run_logs` to read the result of any task run.
|
|
11
|
+
|
|
12
|
+
## Tools available
|
|
13
|
+
|
|
14
|
+
| Tool | Purpose |
|
|
15
|
+
| ------------------- | --------------------------------------------------------------------------------------------------------------------------------- |
|
|
16
|
+
| `list_projects` | All projects in the workspace, optionally filtered by a vis query (`tag=frontend`, `type=application`, …) |
|
|
17
|
+
| `describe_project` | Full metadata for one project: language, layer, tags, root path, all targets |
|
|
18
|
+
| `list_targets` | Per-target rows across the workspace, optionally narrowed to a single project |
|
|
19
|
+
| `list_templates` | Scaffolding templates discovered in `.vis/templates/`, `.moon/templates/`, and `vis.config.ts` `generator.templates` |
|
|
20
|
+
| `describe_template` | Variable schema, default destination, and description for a single template — required before suggesting a `vis generate` command |
|
|
21
|
+
| `get_run_logs` | Most recent run summary from `.task-runner/`, or a specific `runId`, optionally filtered to one task |
|
|
22
|
+
| `cache_why` | Diff a task's cache hash against the previous run — pinpoints what changed (command, nodes, runtime, implicit deps) |
|
|
23
|
+
| `cache_hash` | Recorded hash and per-input hash details for a task |
|
|
24
|
+
|
|
25
|
+
## Workflow patterns
|
|
26
|
+
|
|
27
|
+
### Discovery — "what's in this repo?"
|
|
28
|
+
|
|
29
|
+
Default opening move when the user asks about the workspace:
|
|
30
|
+
|
|
31
|
+
1. `list_projects` (no filter). Shows everything with categories and target counts.
|
|
32
|
+
2. If they ask about a specific package, `describe_project` for the full picture rather than re-running list with a filter.
|
|
33
|
+
|
|
34
|
+
### Plan a build
|
|
35
|
+
|
|
36
|
+
1. `list_targets` (optionally with `project: "@scope/name"`) to see what `build`/`test`/`lint`/etc. targets exist.
|
|
37
|
+
2. Tell the user the exact command (`vis run @scope/name:build`) and let them run it.
|
|
38
|
+
3. Use `get_run_logs` afterwards to inspect status, cache hits, and stderr tails.
|
|
39
|
+
|
|
40
|
+
### Investigate a cache miss
|
|
41
|
+
|
|
42
|
+
When a build that should have been cached re-ran:
|
|
43
|
+
|
|
44
|
+
1. `get_run_logs` (no args → latest summary) — surfaces all task statuses for the last run.
|
|
45
|
+
2. For any task with status `success` but `cacheStatus: "miss"`, call `cache_why` with that `taskId`. It diffs hashDetails against the previous run and tells you which input rotated (command string, file content, `implicitDependency`, runtime version, …).
|
|
46
|
+
3. If `cache_why` shows the change but the user wants to see the raw hash inputs, `cache_hash` returns the full per-input breakdown.
|
|
47
|
+
|
|
48
|
+
### Scaffold a new package or component
|
|
49
|
+
|
|
50
|
+
When the user asks for "a new X" / "scaffold Y":
|
|
51
|
+
|
|
52
|
+
1. `list_templates` — pick the template whose `name` or `description` matches the user's request.
|
|
53
|
+
2. `describe_template` with that name — read the `variables[]` schema. Identify which variables are `required` and which have sensible `default` values.
|
|
54
|
+
3. Construct the command: `vis generate <name> -- --var1=value1 --var2=value2`. For interactive prompts, drop the `--` overrides and let the user step through. For `--defaults`-friendly templates, add `--defaults` to skip prompts.
|
|
55
|
+
4. Hand the command to the user to execute. Don't fabricate variable values — if the user hasn't told you what to pass for a required variable, ask.
|
|
56
|
+
|
|
57
|
+
#### Worked example
|
|
58
|
+
|
|
59
|
+
User: _"Scaffold a new React button component called PrimaryButton."_
|
|
60
|
+
|
|
61
|
+
1. Call `list_templates` → response contains an entry `{ "name": "component", "source": "native", "description": "Scaffold a React component" }`. That's the closest match.
|
|
62
|
+
2. Call `describe_template` with `{ "name": "component" }` → response shows `variables`:
|
|
63
|
+
```json
|
|
64
|
+
[
|
|
65
|
+
{ "name": "name", "type": "string", "required": true, "prompt": "Component name?" },
|
|
66
|
+
{ "name": "withTest", "type": "boolean", "required": false, "default": true },
|
|
67
|
+
{ "name": "style", "type": "enum", "required": false, "default": "primary", "values": ["primary", "secondary"] }
|
|
68
|
+
]
|
|
69
|
+
```
|
|
70
|
+
3. The user supplied `name` (`PrimaryButton`) and implied `style=primary` (default already matches). `withTest` is unspecified — the default is fine, no need to override.
|
|
71
|
+
4. Suggested command for the user to run:
|
|
72
|
+
```sh
|
|
73
|
+
vis generate component -- --name=PrimaryButton --style=primary
|
|
74
|
+
```
|
|
75
|
+
Do **not** invent values for required variables the user never mentioned — ask first.
|
|
76
|
+
|
|
77
|
+
### Diagnose a failed run
|
|
78
|
+
|
|
79
|
+
1. `get_run_logs` to see which task(s) failed.
|
|
80
|
+
2. `get_run_logs` with `taskId` set to the failing task — returns just that entry, including the captured stderr tail.
|
|
81
|
+
3. Decide: is it a code bug (read the project's source), a cache poisoning issue (`cache_why`), or environmental (look at the run summary's `runtime` block)?
|
|
82
|
+
|
|
83
|
+
## Safety rules
|
|
84
|
+
|
|
85
|
+
- **All tools are read-only.** The server does not execute targets. If the user wants something built/tested/linted, give them the command and let them run it.
|
|
86
|
+
- **All tools run in the directory where `vis-mcp` was launched.** Override at server startup by setting `VIS_MCP_WORKSPACE_ROOT`. You can read that path from the server's stderr boot line: `[vis-mcp] ready (workspace: …)`.
|
|
87
|
+
|
|
88
|
+
## When NOT to use this skill
|
|
89
|
+
|
|
90
|
+
- The user wants to write a `vis.config.ts` — that's editing source, not running the CLI. Use Read/Edit/Write on the config file directly.
|
|
91
|
+
- The user is asking about Turborepo, Nx, or Bazel specifically (not vis). The tools won't help with those.
|
|
92
|
+
- The repo has no `vis.config.*` and no mention of vis. Don't volunteer the tools.
|
|
93
|
+
|
|
94
|
+
## Tool-result conventions
|
|
95
|
+
|
|
96
|
+
All tools return JSON-encoded text in the standard MCP `content[].text` slot. On error, `isError: true` is set and the text payload is `{"error": "<message>"}`. Parse the JSON before reasoning about it — the text field is structured data, not prose.
|