@yuaone/core 0.8.5 → 0.9.1

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 (86) hide show
  1. package/README.md +73 -2
  2. package/dist/agent-loop.d.ts +8 -0
  3. package/dist/agent-loop.d.ts.map +1 -1
  4. package/dist/agent-loop.js +34 -0
  5. package/dist/agent-loop.js.map +1 -1
  6. package/dist/dag-orchestrator.d.ts +3 -0
  7. package/dist/dag-orchestrator.d.ts.map +1 -1
  8. package/dist/dag-orchestrator.js +1 -0
  9. package/dist/dag-orchestrator.js.map +1 -1
  10. package/dist/execution-engine.d.ts.map +1 -1
  11. package/dist/execution-engine.js +1 -0
  12. package/dist/execution-engine.js.map +1 -1
  13. package/dist/index.d.ts +5 -1
  14. package/dist/index.d.ts.map +1 -1
  15. package/dist/index.js +7 -1
  16. package/dist/index.js.map +1 -1
  17. package/dist/language-detector.d.ts.map +1 -1
  18. package/dist/language-detector.js +43 -122
  19. package/dist/language-detector.js.map +1 -1
  20. package/dist/language-registry.d.ts +45 -0
  21. package/dist/language-registry.d.ts.map +1 -0
  22. package/dist/language-registry.js +893 -0
  23. package/dist/language-registry.js.map +1 -0
  24. package/dist/llm-client.d.ts +7 -0
  25. package/dist/llm-client.d.ts.map +1 -1
  26. package/dist/llm-client.js +58 -8
  27. package/dist/llm-client.js.map +1 -1
  28. package/dist/skill-loader.d.ts +9 -16
  29. package/dist/skill-loader.d.ts.map +1 -1
  30. package/dist/skill-loader.js +116 -52
  31. package/dist/skill-loader.js.map +1 -1
  32. package/dist/skill-mode-bridge.d.ts +17 -0
  33. package/dist/skill-mode-bridge.d.ts.map +1 -0
  34. package/dist/skill-mode-bridge.js +27 -0
  35. package/dist/skill-mode-bridge.js.map +1 -0
  36. package/dist/skills/code-review.md +58 -0
  37. package/dist/skills/debug.md +45 -0
  38. package/dist/skills/languages/bash.md +74 -0
  39. package/dist/skills/languages/c.md +76 -0
  40. package/dist/skills/languages/cpp.md +75 -0
  41. package/dist/skills/languages/csharp.md +77 -0
  42. package/dist/skills/languages/cuda.md +80 -0
  43. package/dist/skills/languages/dart.md +75 -0
  44. package/dist/skills/languages/docker.md +80 -0
  45. package/dist/skills/languages/elixir.md +80 -0
  46. package/dist/skills/languages/gdscript.md +80 -0
  47. package/dist/skills/languages/go.md +77 -0
  48. package/dist/skills/languages/haskell.md +80 -0
  49. package/dist/skills/languages/java.md +77 -0
  50. package/dist/skills/languages/javascript.md +73 -0
  51. package/dist/skills/languages/kotlin.md +75 -0
  52. package/dist/skills/languages/lua.md +79 -0
  53. package/dist/skills/languages/php.md +73 -0
  54. package/dist/skills/languages/python.md +89 -0
  55. package/dist/skills/languages/r.md +80 -0
  56. package/dist/skills/languages/react.md +86 -0
  57. package/dist/skills/languages/ruby.md +78 -0
  58. package/dist/skills/languages/rust.md +77 -0
  59. package/dist/skills/languages/solidity.md +81 -0
  60. package/dist/skills/languages/sql.md +74 -0
  61. package/dist/skills/languages/svelte.md +74 -0
  62. package/dist/skills/languages/swift.md +74 -0
  63. package/dist/skills/languages/terraform.md +80 -0
  64. package/dist/skills/languages/typescript.md +110 -0
  65. package/dist/skills/languages/verilog.md +80 -0
  66. package/dist/skills/languages/vue.md +73 -0
  67. package/dist/skills/plan.md +49 -0
  68. package/dist/skills/refactor.md +46 -0
  69. package/dist/skills/security-scan.md +59 -0
  70. package/dist/skills/test-driven.md +51 -0
  71. package/dist/strategy-selector.d.ts +11 -0
  72. package/dist/strategy-selector.d.ts.map +1 -0
  73. package/dist/strategy-selector.js +85 -0
  74. package/dist/strategy-selector.js.map +1 -0
  75. package/dist/sub-agent.d.ts +3 -0
  76. package/dist/sub-agent.d.ts.map +1 -1
  77. package/dist/sub-agent.js +10 -0
  78. package/dist/sub-agent.js.map +1 -1
  79. package/dist/system-prompt.d.ts +2 -0
  80. package/dist/system-prompt.d.ts.map +1 -1
  81. package/dist/system-prompt.js +469 -94
  82. package/dist/system-prompt.js.map +1 -1
  83. package/dist/types.d.ts +3 -0
  84. package/dist/types.d.ts.map +1 -1
  85. package/dist/types.js.map +1 -1
  86. package/package.json +2 -2
@@ -0,0 +1,893 @@
1
+ /**
2
+ * @module language-registry
3
+ * @description Single source of truth for all language/framework metadata.
4
+ * Add a language here once — detection, verification guides, and skill loading
5
+ * all derive from this registry automatically.
6
+ */
7
+ // ─────────────────────────────────────────────────────────────────────────────
8
+ // REGISTRY
9
+ // ─────────────────────────────────────────────────────────────────────────────
10
+ export const LANGUAGE_REGISTRY = [
11
+ // ═══════════════════════════════════════════════════════════════
12
+ // SYSTEMS
13
+ // ═══════════════════════════════════════════════════════════════
14
+ {
15
+ id: "c",
16
+ displayName: "C",
17
+ extensions: [".c", ".h"],
18
+ buildCmd: "gcc -Wall -Wextra -Werror -o out main.c",
19
+ testCmd: "make test",
20
+ lintCmd: "cppcheck --enable=all .",
21
+ errorSignal: "error:",
22
+ commonErrors: ["undefined reference", "implicit declaration", "segmentation fault"],
23
+ group: "systems",
24
+ skillFile: "languages/c.md",
25
+ },
26
+ {
27
+ id: "cpp",
28
+ displayName: "C++",
29
+ extensions: [".cpp", ".cc", ".cxx", ".hpp", ".hh", ".hxx"],
30
+ buildCmd: "cmake --build build",
31
+ testCmd: "ctest --test-dir build",
32
+ lintCmd: "clang-tidy src/**/*.cpp",
33
+ typeCheckCmd: "g++ -fsyntax-only -Wall -Wextra src/**/*.cpp",
34
+ errorSignal: "error:",
35
+ commonErrors: ["no matching function", "use of deleted function", "undefined reference"],
36
+ group: "systems",
37
+ skillFile: "languages/cpp.md",
38
+ },
39
+ {
40
+ id: "rust",
41
+ displayName: "Rust",
42
+ extensions: [".rs"],
43
+ manifestFiles: ["Cargo.toml"],
44
+ buildCmd: "cargo build",
45
+ testCmd: "cargo test",
46
+ lintCmd: "cargo clippy -- -D warnings",
47
+ typeCheckCmd: "cargo check",
48
+ successSignal: "Finished",
49
+ errorSignal: "error[",
50
+ commonErrors: ["cannot borrow", "lifetime", "mismatched types", "cannot move"],
51
+ group: "systems",
52
+ skillFile: "languages/rust.md",
53
+ },
54
+ {
55
+ id: "go",
56
+ displayName: "Go",
57
+ extensions: [".go"],
58
+ manifestFiles: ["go.mod"],
59
+ buildCmd: "go build ./...",
60
+ testCmd: "go test ./...",
61
+ lintCmd: "golangci-lint run",
62
+ typeCheckCmd: "go vet ./...",
63
+ successSignal: "ok",
64
+ errorSignal: "# ",
65
+ commonErrors: ["undefined:", "cannot use", "declared but not used", "import cycle"],
66
+ group: "systems",
67
+ skillFile: "languages/go.md",
68
+ },
69
+ {
70
+ id: "zig",
71
+ displayName: "Zig",
72
+ extensions: [".zig"],
73
+ manifestFiles: ["build.zig"],
74
+ buildCmd: "zig build",
75
+ testCmd: "zig build test",
76
+ errorSignal: "error:",
77
+ commonErrors: ["expected type", "cannot assign to constant", "undeclared identifier"],
78
+ group: "systems",
79
+ },
80
+ {
81
+ id: "assembly",
82
+ displayName: "Assembly",
83
+ extensions: [".asm", ".s"],
84
+ group: "systems",
85
+ },
86
+ // ═══════════════════════════════════════════════════════════════
87
+ // WEB
88
+ // ═══════════════════════════════════════════════════════════════
89
+ {
90
+ id: "typescript",
91
+ displayName: "TypeScript",
92
+ extensions: [".ts", ".tsx", ".mts", ".cts"],
93
+ manifestFiles: ["tsconfig.json", "package.json"],
94
+ buildCmd: "tsc",
95
+ testCmd: "vitest run",
96
+ lintCmd: "eslint . --ext .ts,.tsx",
97
+ typeCheckCmd: "tsc --noEmit",
98
+ successSignal: "0 errors",
99
+ errorSignal: "error TS",
100
+ commonErrors: ["TS2345", "TS2322", "TS2304", "TS7006", "TS2339"],
101
+ group: "web",
102
+ skillFile: "languages/typescript.md",
103
+ },
104
+ {
105
+ id: "javascript",
106
+ displayName: "JavaScript",
107
+ extensions: [".js", ".jsx", ".mjs", ".cjs"],
108
+ manifestFiles: ["package.json"],
109
+ buildCmd: "node --check index.js",
110
+ testCmd: "vitest run",
111
+ lintCmd: "eslint . --ext .js,.jsx",
112
+ errorSignal: "SyntaxError:",
113
+ commonErrors: ["is not a function", "Cannot read properties of", "is not defined"],
114
+ group: "web",
115
+ skillFile: "languages/javascript.md",
116
+ },
117
+ {
118
+ id: "react",
119
+ displayName: "React",
120
+ extensions: [".tsx", ".jsx"],
121
+ manifestFiles: ["package.json"],
122
+ buildCmd: "vite build",
123
+ testCmd: "vitest run",
124
+ lintCmd: "eslint . --ext .tsx,.jsx",
125
+ typeCheckCmd: "tsc --noEmit",
126
+ errorSignal: "error TS",
127
+ commonErrors: ["JSX element", "React Hook", "key prop", "Hooks can only"],
128
+ group: "web",
129
+ skillFile: "languages/react.md",
130
+ },
131
+ {
132
+ id: "vue",
133
+ displayName: "Vue",
134
+ extensions: [".vue"],
135
+ manifestFiles: ["package.json", "vite.config.ts", "vue.config.js"],
136
+ buildCmd: "vite build",
137
+ testCmd: "vitest run",
138
+ lintCmd: "eslint . --ext .vue,.ts",
139
+ typeCheckCmd: "vue-tsc --noEmit",
140
+ errorSignal: "error TS",
141
+ commonErrors: ["Property does not exist on type", "Extraneous non-props", "Missing required prop"],
142
+ group: "web",
143
+ skillFile: "languages/vue.md",
144
+ },
145
+ {
146
+ id: "svelte",
147
+ displayName: "Svelte",
148
+ extensions: [".svelte"],
149
+ manifestFiles: ["package.json", "svelte.config.js"],
150
+ buildCmd: "vite build",
151
+ testCmd: "vitest run",
152
+ lintCmd: "eslint . --ext .svelte,.ts",
153
+ typeCheckCmd: "svelte-check --tsconfig tsconfig.json",
154
+ errorSignal: "Error:",
155
+ commonErrors: ["Reactive statement", "store must have subscribe", "Cannot find module"],
156
+ group: "web",
157
+ skillFile: "languages/svelte.md",
158
+ },
159
+ {
160
+ id: "angular",
161
+ displayName: "Angular",
162
+ extensions: [".ts", ".html"],
163
+ manifestFiles: ["angular.json", "package.json"],
164
+ buildCmd: "ng build",
165
+ testCmd: "ng test --watch=false",
166
+ lintCmd: "ng lint",
167
+ typeCheckCmd: "tsc --noEmit",
168
+ errorSignal: "error TS",
169
+ commonErrors: ["NG0", "NullInjectorError", "Cannot read properties of null"],
170
+ group: "web",
171
+ },
172
+ {
173
+ id: "nextjs",
174
+ displayName: "Next.js",
175
+ extensions: [".ts", ".tsx", ".js", ".jsx"],
176
+ manifestFiles: ["next.config.js", "next.config.ts", "next.config.mjs"],
177
+ buildCmd: "next build",
178
+ testCmd: "vitest run",
179
+ lintCmd: "next lint",
180
+ typeCheckCmd: "tsc --noEmit",
181
+ successSignal: "Route (app)",
182
+ errorSignal: "error TS",
183
+ commonErrors: ["useClient directive", "Server Component", "Hydration", "Dynamic server usage"],
184
+ group: "web",
185
+ },
186
+ {
187
+ id: "html",
188
+ displayName: "HTML/CSS",
189
+ extensions: [".html", ".css", ".scss", ".sass", ".less"],
190
+ buildCmd: "npx sass src:dist",
191
+ lintCmd: "stylelint **/*.css",
192
+ errorSignal: "Error:",
193
+ group: "web",
194
+ },
195
+ {
196
+ id: "htmx",
197
+ displayName: "HTMX",
198
+ extensions: [".html"],
199
+ group: "web",
200
+ },
201
+ {
202
+ id: "nodejs",
203
+ displayName: "Node.js",
204
+ extensions: [".js", ".mjs", ".cjs"],
205
+ manifestFiles: ["package.json"],
206
+ buildCmd: "node --check server.js",
207
+ testCmd: "node --test",
208
+ lintCmd: "eslint .",
209
+ errorSignal: "Error:",
210
+ commonErrors: ["ENOENT", "ECONNREFUSED", "Cannot find module", "UnhandledPromiseRejection"],
211
+ group: "web",
212
+ },
213
+ // ═══════════════════════════════════════════════════════════════
214
+ // BACKEND
215
+ // ═══════════════════════════════════════════════════════════════
216
+ {
217
+ id: "python",
218
+ displayName: "Python",
219
+ extensions: [".py", ".pyi", ".pyx"],
220
+ manifestFiles: ["pyproject.toml", "requirements.txt", "setup.py", "setup.cfg"],
221
+ buildCmd: "python -m build",
222
+ testCmd: "pytest",
223
+ lintCmd: "ruff check .",
224
+ typeCheckCmd: "mypy .",
225
+ successSignal: "passed",
226
+ errorSignal: "Error:",
227
+ commonErrors: ["IndentationError", "TypeError", "AttributeError", "ImportError", "ModuleNotFoundError"],
228
+ group: "backend",
229
+ skillFile: "languages/python.md",
230
+ },
231
+ {
232
+ id: "java",
233
+ displayName: "Java",
234
+ extensions: [".java"],
235
+ manifestFiles: ["pom.xml", "build.gradle", "build.gradle.kts"],
236
+ buildCmd: "mvn compile",
237
+ testCmd: "mvn test",
238
+ lintCmd: "mvn checkstyle:check",
239
+ typeCheckCmd: "mvn compile -q",
240
+ successSignal: "BUILD SUCCESS",
241
+ errorSignal: "BUILD FAILURE",
242
+ commonErrors: ["NullPointerException", "ClassNotFoundException", "cannot find symbol", "incompatible types"],
243
+ group: "backend",
244
+ skillFile: "languages/java.md",
245
+ },
246
+ {
247
+ id: "kotlin",
248
+ displayName: "Kotlin",
249
+ extensions: [".kt", ".kts"],
250
+ manifestFiles: ["build.gradle.kts", "build.gradle", "pom.xml"],
251
+ buildCmd: "gradle build",
252
+ testCmd: "gradle test",
253
+ lintCmd: "ktlint",
254
+ typeCheckCmd: "gradle compileKotlin",
255
+ successSignal: "BUILD SUCCESSFUL",
256
+ errorSignal: "BUILD FAILED",
257
+ commonErrors: ["Unresolved reference", "Type mismatch", "Smart cast is impossible", "Val cannot be reassigned"],
258
+ group: "backend",
259
+ skillFile: "languages/kotlin.md",
260
+ },
261
+ {
262
+ id: "ruby",
263
+ displayName: "Ruby",
264
+ extensions: [".rb"],
265
+ manifestFiles: ["Gemfile", "Gemfile.lock", ".ruby-version"],
266
+ buildCmd: "bundle exec rake build",
267
+ testCmd: "bundle exec rspec",
268
+ lintCmd: "bundle exec rubocop",
269
+ typeCheckCmd: "bundle exec steep check",
270
+ successSignal: "0 failures",
271
+ errorSignal: "Error:",
272
+ commonErrors: ["NoMethodError", "NameError", "ArgumentError", "LoadError"],
273
+ group: "backend",
274
+ skillFile: "languages/ruby.md",
275
+ },
276
+ {
277
+ id: "php",
278
+ displayName: "PHP",
279
+ extensions: [".php"],
280
+ manifestFiles: ["composer.json", "composer.lock"],
281
+ buildCmd: "composer install",
282
+ testCmd: "vendor/bin/phpunit",
283
+ lintCmd: "vendor/bin/phpcs",
284
+ typeCheckCmd: "vendor/bin/phpstan analyse",
285
+ successSignal: "OK",
286
+ errorSignal: "Fatal error:",
287
+ commonErrors: ["Undefined variable", "Call to a member function", "Class not found", "Parse error"],
288
+ group: "backend",
289
+ skillFile: "languages/php.md",
290
+ },
291
+ {
292
+ id: "csharp",
293
+ displayName: "C#",
294
+ extensions: [".cs"],
295
+ manifestFiles: ["*.csproj", "*.sln"],
296
+ buildCmd: "dotnet build",
297
+ testCmd: "dotnet test",
298
+ lintCmd: "dotnet format --verify-no-changes",
299
+ typeCheckCmd: "dotnet build -warnaserror",
300
+ successSignal: "Build succeeded",
301
+ errorSignal: "error CS",
302
+ commonErrors: ["CS0103", "CS0246", "CS8600", "NullReferenceException", "CS0161"],
303
+ group: "backend",
304
+ skillFile: "languages/csharp.md",
305
+ },
306
+ {
307
+ id: "scala",
308
+ displayName: "Scala",
309
+ extensions: [".scala", ".sc"],
310
+ manifestFiles: ["build.sbt", "project/build.properties"],
311
+ buildCmd: "sbt compile",
312
+ testCmd: "sbt test",
313
+ lintCmd: "sbt scalafmtCheck",
314
+ typeCheckCmd: "sbt compile",
315
+ successSignal: "[success]",
316
+ errorSignal: "[error]",
317
+ commonErrors: ["value is not a member of", "type mismatch", "not found: value", "overloaded method"],
318
+ group: "backend",
319
+ },
320
+ {
321
+ id: "elixir",
322
+ displayName: "Elixir",
323
+ extensions: [".ex", ".exs"],
324
+ manifestFiles: ["mix.exs"],
325
+ buildCmd: "mix compile",
326
+ testCmd: "mix test",
327
+ lintCmd: "mix credo",
328
+ typeCheckCmd: "mix dialyzer",
329
+ successSignal: "Finished in",
330
+ errorSignal: "** (CompileError)",
331
+ commonErrors: ["undefined function", "no clause matching", "FunctionClauseError", "KeyError"],
332
+ group: "backend",
333
+ skillFile: "languages/elixir.md",
334
+ },
335
+ {
336
+ id: "groovy",
337
+ displayName: "Groovy",
338
+ extensions: [".groovy"],
339
+ manifestFiles: ["build.gradle"],
340
+ buildCmd: "gradle build",
341
+ testCmd: "gradle test",
342
+ lintCmd: "npm-groovy-lint",
343
+ successSignal: "BUILD SUCCESSFUL",
344
+ errorSignal: "BUILD FAILED",
345
+ commonErrors: ["MissingMethodException", "GroovyCastException", "ClassNotFoundException"],
346
+ group: "backend",
347
+ },
348
+ // ═══════════════════════════════════════════════════════════════
349
+ // MOBILE
350
+ // ═══════════════════════════════════════════════════════════════
351
+ {
352
+ id: "swift",
353
+ displayName: "Swift",
354
+ extensions: [".swift"],
355
+ manifestFiles: ["Package.swift", "*.xcodeproj", "*.xcworkspace"],
356
+ buildCmd: "swift build",
357
+ testCmd: "swift test",
358
+ lintCmd: "swiftlint",
359
+ typeCheckCmd: "swift build -Xswiftc -warnings-as-errors",
360
+ successSignal: "Build complete!",
361
+ errorSignal: "error:",
362
+ commonErrors: ["value of type has no member", "cannot convert value", "use of unresolved identifier", "force unwrap"],
363
+ group: "mobile",
364
+ skillFile: "languages/swift.md",
365
+ },
366
+ {
367
+ id: "kotlin-android",
368
+ displayName: "Kotlin Android",
369
+ extensions: [".kt", ".kts"],
370
+ manifestFiles: ["AndroidManifest.xml", "build.gradle.kts"],
371
+ buildCmd: "gradle assembleDebug",
372
+ testCmd: "gradle test",
373
+ lintCmd: "gradle lint",
374
+ typeCheckCmd: "gradle compileDebugKotlin",
375
+ successSignal: "BUILD SUCCESSFUL",
376
+ errorSignal: "BUILD FAILED",
377
+ commonErrors: ["Unresolved reference", "Type mismatch", "NullPointerException", "Activity not found"],
378
+ group: "mobile",
379
+ },
380
+ {
381
+ id: "dart",
382
+ displayName: "Dart / Flutter",
383
+ extensions: [".dart"],
384
+ manifestFiles: ["pubspec.yaml", "pubspec.lock"],
385
+ buildCmd: "flutter build apk",
386
+ testCmd: "flutter test",
387
+ lintCmd: "dart analyze",
388
+ typeCheckCmd: "dart analyze",
389
+ successSignal: "All tests passed",
390
+ errorSignal: "error •",
391
+ commonErrors: ["Undefined name", "The method doesn't exist", "A value of type cannot be assigned", "Null safety"],
392
+ group: "mobile",
393
+ skillFile: "languages/dart.md",
394
+ },
395
+ {
396
+ id: "react-native",
397
+ displayName: "React Native",
398
+ extensions: [".tsx", ".jsx", ".ts", ".js"],
399
+ manifestFiles: ["app.json", "metro.config.js"],
400
+ buildCmd: "npx react-native build-android",
401
+ testCmd: "jest",
402
+ lintCmd: "eslint . --ext .tsx,.ts,.jsx,.js",
403
+ typeCheckCmd: "tsc --noEmit",
404
+ errorSignal: "error TS",
405
+ commonErrors: ["Metro bundler", "Module not found", "Red Box", "Native module cannot be null"],
406
+ group: "mobile",
407
+ },
408
+ {
409
+ id: "objective-c",
410
+ displayName: "Objective-C",
411
+ extensions: [".m", ".mm", ".h"],
412
+ buildCmd: "xcodebuild build",
413
+ testCmd: "xcodebuild test",
414
+ errorSignal: "error:",
415
+ commonErrors: ["ARC forbids", "undeclared identifier", "instance method not found", "incompatible pointer types"],
416
+ group: "mobile",
417
+ },
418
+ // ═══════════════════════════════════════════════════════════════
419
+ // DATA
420
+ // ═══════════════════════════════════════════════════════════════
421
+ {
422
+ id: "python-ml",
423
+ displayName: "Python ML",
424
+ extensions: [".py", ".ipynb"],
425
+ manifestFiles: ["requirements.txt", "pyproject.toml", "environment.yml"],
426
+ testCmd: "pytest",
427
+ lintCmd: "ruff check .",
428
+ typeCheckCmd: "mypy .",
429
+ errorSignal: "Error:",
430
+ commonErrors: ["CUDA out of memory", "shape mismatch", "ValueError", "RuntimeError", "device mismatch"],
431
+ group: "data",
432
+ },
433
+ {
434
+ id: "r",
435
+ displayName: "R",
436
+ extensions: [".r", ".R", ".Rmd", ".qmd"],
437
+ manifestFiles: ["DESCRIPTION", "renv.lock"],
438
+ buildCmd: "R CMD build .",
439
+ testCmd: "Rscript -e \"testthat::test_dir('tests')\"",
440
+ lintCmd: "Rscript -e \"lintr::lint_dir('.')\"",
441
+ errorSignal: "Error in",
442
+ commonErrors: ["object not found", "could not find function", "subscript out of bounds", "non-numeric argument"],
443
+ group: "data",
444
+ skillFile: "languages/r.md",
445
+ },
446
+ {
447
+ id: "julia",
448
+ displayName: "Julia",
449
+ extensions: [".jl"],
450
+ manifestFiles: ["Project.toml", "Manifest.toml"],
451
+ buildCmd: "julia --project=. -e 'using Pkg; Pkg.build()'",
452
+ testCmd: "julia --project=. -e 'using Pkg; Pkg.test()'",
453
+ errorSignal: "ERROR:",
454
+ commonErrors: ["MethodError", "UndefVarError", "BoundsError", "DomainError", "type instability"],
455
+ group: "data",
456
+ },
457
+ {
458
+ id: "sql",
459
+ displayName: "SQL",
460
+ extensions: [".sql"],
461
+ lintCmd: "sqlfluff lint .",
462
+ typeCheckCmd: "sqlfluff fix --check .",
463
+ errorSignal: "ERROR:",
464
+ commonErrors: ["syntax error", "relation does not exist", "column does not exist", "null value in column"],
465
+ group: "data",
466
+ skillFile: "languages/sql.md",
467
+ },
468
+ // ═══════════════════════════════════════════════════════════════
469
+ // DEVOPS
470
+ // ═══════════════════════════════════════════════════════════════
471
+ {
472
+ id: "bash",
473
+ displayName: "Bash",
474
+ extensions: [".sh", ".bash", ".zsh"],
475
+ lintCmd: "shellcheck **/*.sh",
476
+ errorSignal: "line",
477
+ commonErrors: ["command not found", "unbound variable", "bad substitution", "syntax error near unexpected token"],
478
+ group: "devops",
479
+ skillFile: "languages/bash.md",
480
+ },
481
+ {
482
+ id: "powershell",
483
+ displayName: "PowerShell",
484
+ extensions: [".ps1", ".psm1", ".psd1"],
485
+ lintCmd: "Invoke-ScriptAnalyzer -Path . -Recurse",
486
+ errorSignal: "At line:",
487
+ commonErrors: ["is not recognized", "NullReference", "cannot bind parameter", "access is denied"],
488
+ group: "devops",
489
+ },
490
+ {
491
+ id: "dockerfile",
492
+ displayName: "Dockerfile",
493
+ extensions: [],
494
+ manifestFiles: ["Dockerfile", "Containerfile"],
495
+ buildCmd: "docker build .",
496
+ lintCmd: "hadolint Dockerfile",
497
+ successSignal: "Successfully built",
498
+ errorSignal: "ERROR:",
499
+ commonErrors: ["COPY failed", "RUN returned a non-zero code", "no such file or directory", "permission denied"],
500
+ group: "devops",
501
+ skillFile: "languages/docker.md",
502
+ },
503
+ {
504
+ id: "terraform",
505
+ displayName: "Terraform",
506
+ extensions: [".tf", ".tfvars"],
507
+ buildCmd: "terraform init && terraform plan",
508
+ testCmd: "terraform validate",
509
+ lintCmd: "tflint",
510
+ typeCheckCmd: "terraform validate",
511
+ successSignal: "No changes",
512
+ errorSignal: "Error:",
513
+ commonErrors: ["Invalid reference", "Missing required argument", "Unsupported attribute", "Cycle in dependency graph"],
514
+ group: "devops",
515
+ skillFile: "languages/terraform.md",
516
+ },
517
+ {
518
+ id: "kubernetes",
519
+ displayName: "Kubernetes",
520
+ extensions: [".yaml", ".yml"],
521
+ manifestFiles: ["Chart.yaml", "values.yaml", "kustomization.yaml"],
522
+ buildCmd: "helm template .",
523
+ testCmd: "helm test",
524
+ lintCmd: "helm lint . && kubectl --dry-run=client apply -f .",
525
+ typeCheckCmd: "kubeconform -strict .",
526
+ errorSignal: "Error:",
527
+ commonErrors: ["ImagePullBackOff", "CrashLoopBackOff", "OOMKilled", "Pending", "ErrImagePull"],
528
+ group: "devops",
529
+ },
530
+ {
531
+ id: "ansible",
532
+ displayName: "Ansible",
533
+ extensions: [".yaml", ".yml"],
534
+ manifestFiles: ["playbook.yml", "site.yml", "ansible.cfg", "inventory"],
535
+ testCmd: "ansible-playbook --syntax-check site.yml",
536
+ lintCmd: "ansible-lint",
537
+ typeCheckCmd: "ansible-playbook --check site.yml",
538
+ errorSignal: "fatal:",
539
+ commonErrors: ["unreachable", "FAILED!", "MODULE FAILURE", "Timeout", "Authentication failure"],
540
+ group: "devops",
541
+ },
542
+ {
543
+ id: "nix",
544
+ displayName: "Nix",
545
+ extensions: [".nix"],
546
+ manifestFiles: ["flake.nix", "default.nix", "shell.nix"],
547
+ buildCmd: "nix build",
548
+ testCmd: "nix flake check",
549
+ lintCmd: "statix check",
550
+ typeCheckCmd: "nix eval .#",
551
+ successSignal: "✓",
552
+ errorSignal: "error:",
553
+ commonErrors: ["infinite recursion", "attribute missing", "collision between packages", "hash mismatch"],
554
+ group: "devops",
555
+ },
556
+ {
557
+ id: "makefile",
558
+ displayName: "Makefile",
559
+ extensions: [],
560
+ manifestFiles: ["Makefile", "GNUmakefile", "makefile"],
561
+ buildCmd: "make",
562
+ testCmd: "make test",
563
+ errorSignal: "*** Error",
564
+ commonErrors: ["No rule to make target", "missing separator", "command not found", "recipe for target failed"],
565
+ group: "devops",
566
+ },
567
+ {
568
+ id: "awk",
569
+ displayName: "AWK",
570
+ extensions: [".awk"],
571
+ errorSignal: "awk:",
572
+ commonErrors: ["syntax error", "attempt to access field", "illegal reference", "division by zero"],
573
+ group: "devops",
574
+ },
575
+ // ═══════════════════════════════════════════════════════════════
576
+ // GAME
577
+ // ═══════════════════════════════════════════════════════════════
578
+ {
579
+ id: "gdscript",
580
+ displayName: "GDScript",
581
+ extensions: [".gd"],
582
+ manifestFiles: ["project.godot"],
583
+ buildCmd: "godot --headless --export-release Linux game.x86_64",
584
+ testCmd: "godot --headless -s addons/gut/gut_cmdln.gd",
585
+ errorSignal: "ERROR:",
586
+ commonErrors: ["Identifier not declared", "Invalid get index", "Null reference", "Method not found"],
587
+ group: "game",
588
+ skillFile: "languages/gdscript.md",
589
+ },
590
+ {
591
+ id: "unity-csharp",
592
+ displayName: "Unity C#",
593
+ extensions: [".cs"],
594
+ manifestFiles: ["ProjectSettings/ProjectVersion.txt", "Assets"],
595
+ buildCmd: "unity-editor -batchmode -buildLinux64Player Build/game",
596
+ testCmd: "unity-editor -batchmode -runEditorTests",
597
+ errorSignal: "error CS",
598
+ commonErrors: ["CS0103", "NullReferenceException", "MissingReferenceException", "Object reference not set"],
599
+ group: "game",
600
+ },
601
+ {
602
+ id: "glsl",
603
+ displayName: "GLSL",
604
+ extensions: [".glsl", ".frag", ".vert", ".geom", ".comp", ".hlsl"],
605
+ buildCmd: "glslangValidator -V shader.vert",
606
+ lintCmd: "glslangValidator --target-env vulkan1.2 **/*.vert **/*.frag",
607
+ errorSignal: "ERROR:",
608
+ commonErrors: ["undeclared identifier", "no matching overloaded function", "type mismatch", "precision qualifier required"],
609
+ group: "game",
610
+ },
611
+ {
612
+ id: "unreal-cpp",
613
+ displayName: "Unreal C++",
614
+ extensions: [".cpp", ".h"],
615
+ manifestFiles: ["*.uproject"],
616
+ buildCmd: "UnrealBuildTool MyProject Win64 Development",
617
+ testCmd: "UnrealEditor -ExecCmds=\"Automation RunTests\"",
618
+ errorSignal: "error C",
619
+ commonErrors: ["UPROPERTY missing", "Unresolved external", "UClass not found", "Blueprint callable"],
620
+ group: "game",
621
+ },
622
+ // ═══════════════════════════════════════════════════════════════
623
+ // HDL
624
+ // ═══════════════════════════════════════════════════════════════
625
+ {
626
+ id: "verilog",
627
+ displayName: "Verilog",
628
+ extensions: [".v", ".vh"],
629
+ buildCmd: "iverilog -o sim.vvp design.v",
630
+ testCmd: "vvp sim.vvp",
631
+ lintCmd: "verilator --lint-only design.v",
632
+ errorSignal: "error:",
633
+ commonErrors: ["Undefined variable", "Implicit net declaration", "sensitivity list", "always @* latch"],
634
+ group: "hdl",
635
+ skillFile: "languages/verilog.md",
636
+ },
637
+ {
638
+ id: "systemverilog",
639
+ displayName: "SystemVerilog",
640
+ extensions: [".sv", ".svh"],
641
+ buildCmd: "iverilog -g2012 -o sim.vvp design.sv",
642
+ testCmd: "vvp sim.vvp",
643
+ lintCmd: "verilator --lint-only --sv design.sv",
644
+ errorSignal: "error:",
645
+ commonErrors: ["Invalid module port", "Undeclared interface", "Packed/unpacked mismatch", "Assertion failed"],
646
+ group: "hdl",
647
+ },
648
+ {
649
+ id: "vhdl",
650
+ displayName: "VHDL",
651
+ extensions: [".vhd", ".vhdl"],
652
+ buildCmd: "ghdl -a design.vhd",
653
+ testCmd: "ghdl -r testbench",
654
+ lintCmd: "ghdl -s design.vhd",
655
+ errorSignal: "error:",
656
+ commonErrors: ["undefined identifier", "signal vs variable", "sensitivity list incomplete", "latch inferred"],
657
+ group: "hdl",
658
+ },
659
+ {
660
+ id: "chisel",
661
+ displayName: "Chisel",
662
+ extensions: [".scala"],
663
+ manifestFiles: ["build.sbt"],
664
+ buildCmd: "sbt compile",
665
+ testCmd: "sbt test",
666
+ lintCmd: "sbt scalafmtCheck",
667
+ successSignal: "[success]",
668
+ errorSignal: "[error]",
669
+ commonErrors: ["chisel3.ChiselException", "firrtl.passes.CheckTypes", "unconnected wire", "DontCare"],
670
+ group: "hdl",
671
+ },
672
+ {
673
+ id: "spinalhdl",
674
+ displayName: "SpinalHDL",
675
+ extensions: [".scala"],
676
+ manifestFiles: ["build.sbt"],
677
+ buildCmd: "sbt compile",
678
+ testCmd: "sbt test",
679
+ lintCmd: "sbt scalafmtCheck",
680
+ successSignal: "[success]",
681
+ errorSignal: "[error]",
682
+ commonErrors: ["SpinalError", "Clock domain crossing", "Latch detected", "unconnected signal"],
683
+ group: "hdl",
684
+ },
685
+ // ═══════════════════════════════════════════════════════════════
686
+ // BLOCKCHAIN
687
+ // ═══════════════════════════════════════════════════════════════
688
+ {
689
+ id: "solidity",
690
+ displayName: "Solidity",
691
+ extensions: [".sol"],
692
+ manifestFiles: ["hardhat.config.ts", "hardhat.config.js", "foundry.toml"],
693
+ buildCmd: "forge build",
694
+ testCmd: "forge test",
695
+ lintCmd: "solhint 'contracts/**/*.sol'",
696
+ typeCheckCmd: "forge build --deny-warnings",
697
+ successSignal: "Compiling done",
698
+ errorSignal: "Error:",
699
+ commonErrors: ["reentrancy", "integer overflow", "unauthorized", "underflow", "Solidity syntax error"],
700
+ group: "blockchain",
701
+ skillFile: "languages/solidity.md",
702
+ },
703
+ {
704
+ id: "solana-rust",
705
+ displayName: "Solana Rust",
706
+ extensions: [".rs"],
707
+ manifestFiles: ["Anchor.toml", "Cargo.toml"],
708
+ buildCmd: "anchor build",
709
+ testCmd: "anchor test",
710
+ lintCmd: "cargo clippy -- -D warnings",
711
+ typeCheckCmd: "cargo check",
712
+ successSignal: "Build successful",
713
+ errorSignal: "error[",
714
+ commonErrors: ["account not found", "invalid program id", "constraint violated", "arithmetic overflow"],
715
+ group: "blockchain",
716
+ },
717
+ {
718
+ id: "move",
719
+ displayName: "Move",
720
+ extensions: [".move"],
721
+ manifestFiles: ["Move.toml"],
722
+ buildCmd: "aptos move compile",
723
+ testCmd: "aptos move test",
724
+ lintCmd: "move-lint",
725
+ typeCheckCmd: "aptos move compile --skip-fetch-latest-git-deps",
726
+ successSignal: "Compiling, may take a little while",
727
+ errorSignal: "error[",
728
+ commonErrors: ["resource already exists", "cannot copy resource", "borrow violated", "type parameter constraint"],
729
+ group: "blockchain",
730
+ },
731
+ // ═══════════════════════════════════════════════════════════════
732
+ // EMERGING
733
+ // ═══════════════════════════════════════════════════════════════
734
+ {
735
+ id: "webassembly",
736
+ displayName: "WebAssembly",
737
+ extensions: [".wat", ".wast"],
738
+ buildCmd: "wat2wasm module.wat -o module.wasm",
739
+ testCmd: "wabt run --spec module.wast",
740
+ lintCmd: "wasm-validate module.wasm",
741
+ errorSignal: "error:",
742
+ commonErrors: ["type mismatch", "unknown function", "stack type mismatch", "unreachable"],
743
+ group: "emerging",
744
+ },
745
+ {
746
+ id: "cuda",
747
+ displayName: "CUDA",
748
+ extensions: [".cu", ".cuh"],
749
+ buildCmd: "nvcc -O2 -o kernel kernel.cu",
750
+ testCmd: "ctest",
751
+ lintCmd: "cuda-memcheck ./kernel",
752
+ errorSignal: "error:",
753
+ commonErrors: ["cudaErrorMemoryAllocation", "misaligned address", "an illegal memory access", "CUDA error"],
754
+ group: "emerging",
755
+ skillFile: "languages/cuda.md",
756
+ },
757
+ {
758
+ id: "opencl",
759
+ displayName: "OpenCL",
760
+ extensions: [".cl"],
761
+ buildCmd: "gcc -o clapp main.c -lOpenCL",
762
+ errorSignal: "CL_",
763
+ commonErrors: ["CL_BUILD_PROGRAM_FAILURE", "CL_INVALID_WORK_GROUP_SIZE", "CL_OUT_OF_RESOURCES", "CL_COMPILER_NOT_AVAILABLE"],
764
+ group: "emerging",
765
+ },
766
+ {
767
+ id: "mojo",
768
+ displayName: "Mojo",
769
+ extensions: [".mojo", ".🔥"],
770
+ buildCmd: "mojo build main.mojo",
771
+ testCmd: "mojo test",
772
+ errorSignal: "error:",
773
+ commonErrors: ["value used as a type", "cannot unify", "missing overload", "not Copyable"],
774
+ group: "emerging",
775
+ },
776
+ // ═══════════════════════════════════════════════════════════════
777
+ // SCRIPTING
778
+ // ═══════════════════════════════════════════════════════════════
779
+ {
780
+ id: "lua",
781
+ displayName: "Lua",
782
+ extensions: [".lua"],
783
+ buildCmd: "luac -o out.luac main.lua",
784
+ testCmd: "busted",
785
+ lintCmd: "luacheck .",
786
+ errorSignal: "stdin:",
787
+ commonErrors: ["attempt to index", "attempt to call", "stack overflow", "table index is nil"],
788
+ group: "scripting",
789
+ skillFile: "languages/lua.md",
790
+ },
791
+ {
792
+ id: "perl",
793
+ displayName: "Perl",
794
+ extensions: [".pl", ".pm"],
795
+ buildCmd: "perl -c script.pl",
796
+ testCmd: "prove -lr t/",
797
+ lintCmd: "perlcritic .",
798
+ errorSignal: "at script.pl line",
799
+ commonErrors: ["Global symbol requires", "Undefined subroutine", "Can't locate", "Use of uninitialized value"],
800
+ group: "scripting",
801
+ },
802
+ {
803
+ id: "tcl",
804
+ displayName: "Tcl",
805
+ extensions: [".tcl"],
806
+ buildCmd: "tclsh script.tcl",
807
+ testCmd: "tclsh tests/all.tcl",
808
+ errorSignal: "Error in startup script:",
809
+ commonErrors: ["wrong # args", "bad option", "can't read variable", "invalid command name"],
810
+ group: "scripting",
811
+ },
812
+ // ═══════════════════════════════════════════════════════════════
813
+ // FUNCTIONAL
814
+ // ═══════════════════════════════════════════════════════════════
815
+ {
816
+ id: "haskell",
817
+ displayName: "Haskell",
818
+ extensions: [".hs", ".lhs"],
819
+ manifestFiles: ["stack.yaml", "cabal.project", "*.cabal"],
820
+ buildCmd: "stack build",
821
+ testCmd: "stack test",
822
+ lintCmd: "hlint .",
823
+ typeCheckCmd: "stack build --ghc-options -Wall",
824
+ successSignal: "Completed",
825
+ errorSignal: "error:",
826
+ commonErrors: ["No instance for", "Couldn't match type", "Variable not in scope", "Non-exhaustive patterns"],
827
+ group: "functional",
828
+ skillFile: "languages/haskell.md",
829
+ },
830
+ {
831
+ id: "ocaml",
832
+ displayName: "OCaml",
833
+ extensions: [".ml", ".mli"],
834
+ manifestFiles: ["dune-project", "*.opam"],
835
+ buildCmd: "dune build",
836
+ testCmd: "dune test",
837
+ lintCmd: "ocamlformat --check **/*.ml",
838
+ typeCheckCmd: "dune build @check",
839
+ successSignal: "",
840
+ errorSignal: "Error:",
841
+ commonErrors: ["Unbound value", "This expression has type", "Unused variable", "Warning 8"],
842
+ group: "functional",
843
+ },
844
+ {
845
+ id: "fsharp",
846
+ displayName: "F#",
847
+ extensions: [".fs", ".fsi", ".fsx"],
848
+ manifestFiles: ["*.fsproj", "*.sln"],
849
+ buildCmd: "dotnet build",
850
+ testCmd: "dotnet test",
851
+ lintCmd: "dotnet fantomas --check .",
852
+ typeCheckCmd: "dotnet build -warnaserror",
853
+ successSignal: "Build succeeded",
854
+ errorSignal: "error FS",
855
+ commonErrors: ["FS0001", "FS0003", "FS0010", "Value restriction", "This expression was expected to have type"],
856
+ group: "functional",
857
+ },
858
+ {
859
+ id: "clojure",
860
+ displayName: "Clojure",
861
+ extensions: [".clj", ".cljs", ".cljc", ".edn"],
862
+ manifestFiles: ["project.clj", "deps.edn", "bb.edn"],
863
+ buildCmd: "clj -T:build jar",
864
+ testCmd: "clj -M:test",
865
+ lintCmd: "clj-kondo --lint src",
866
+ typeCheckCmd: "clj -M:clj-kondo",
867
+ successSignal: "Ran",
868
+ errorSignal: "Syntax error",
869
+ commonErrors: ["Unable to resolve symbol", "ArityException", "ClassCastException", "NullPointerException"],
870
+ group: "functional",
871
+ },
872
+ ];
873
+ // ─────────────────────────────────────────────────────────────────────────────
874
+ // HELPERS
875
+ // ─────────────────────────────────────────────────────────────────────────────
876
+ /** Look up a language by its canonical ID */
877
+ export function getLanguage(id) {
878
+ return LANGUAGE_REGISTRY.find((e) => e.id === id);
879
+ }
880
+ /** Find language by file extension (e.g. ".ts" → typescript entry) */
881
+ export function getLanguageByExtension(ext) {
882
+ const normalized = ext.startsWith(".") ? ext : `.${ext}`;
883
+ return LANGUAGE_REGISTRY.find((e) => e.extensions.includes(normalized));
884
+ }
885
+ /** Find language by manifest filename (e.g. "Cargo.toml" → rust entry) */
886
+ export function getLanguageByManifest(filename) {
887
+ return LANGUAGE_REGISTRY.find((e) => e.manifestFiles?.includes(filename));
888
+ }
889
+ /** Get all languages in a group */
890
+ export function getLanguagesByGroup(group) {
891
+ return LANGUAGE_REGISTRY.filter((e) => e.group === group);
892
+ }
893
+ //# sourceMappingURL=language-registry.js.map