@triedotdev/mcp 1.0.61 → 1.0.63

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 (56) hide show
  1. package/README.md +591 -52
  2. package/dist/agent-smith-W4HUCFGC.js +14 -0
  3. package/dist/{agent-smith-runner-ZU4R3I2Z.js → agent-smith-runner-QRVOEOBE.js} +13 -7
  4. package/dist/agent-smith-runner-QRVOEOBE.js.map +1 -0
  5. package/dist/chunk-4YSLDGBL.js +674 -0
  6. package/dist/chunk-4YSLDGBL.js.map +1 -0
  7. package/dist/chunk-7KHT2NKR.js +212 -0
  8. package/dist/chunk-7KHT2NKR.js.map +1 -0
  9. package/dist/{chunk-XSPS463E.js → chunk-ALA6733H.js} +492 -14
  10. package/dist/chunk-ALA6733H.js.map +1 -0
  11. package/dist/chunk-AQCAMIQQ.js +139 -0
  12. package/dist/chunk-AQCAMIQQ.js.map +1 -0
  13. package/dist/chunk-D3DMONAJ.js +904 -0
  14. package/dist/chunk-D3DMONAJ.js.map +1 -0
  15. package/dist/{chunk-KB5ZN6K2.js → chunk-GWSNINKX.js} +2 -2
  16. package/dist/{chunk-32WLOG6E.js → chunk-K6BQBKIR.js} +662 -633
  17. package/dist/chunk-K6BQBKIR.js.map +1 -0
  18. package/dist/{chunk-ASGSTVVF.js → chunk-KOFQ47YW.js} +10 -6
  19. package/dist/chunk-KOFQ47YW.js.map +1 -0
  20. package/dist/{chunk-XVGHO2Z5.js → chunk-N2AZH3EQ.js} +7683 -4777
  21. package/dist/chunk-N2AZH3EQ.js.map +1 -0
  22. package/dist/chunk-PBOVCPKE.js +2566 -0
  23. package/dist/chunk-PBOVCPKE.js.map +1 -0
  24. package/dist/{chunk-NUT4G5AY.js → chunk-R7Z7OHTJ.js} +493 -650
  25. package/dist/chunk-R7Z7OHTJ.js.map +1 -0
  26. package/dist/chunk-TSHZQKCM.js +933 -0
  27. package/dist/chunk-TSHZQKCM.js.map +1 -0
  28. package/dist/{chunk-S4VGGLXF.js → chunk-X2PABPBH.js} +461 -892
  29. package/dist/chunk-X2PABPBH.js.map +1 -0
  30. package/dist/cli/create-agent.js +3 -2
  31. package/dist/cli/create-agent.js.map +1 -1
  32. package/dist/cli/main.js +1120 -70
  33. package/dist/cli/main.js.map +1 -1
  34. package/dist/cli/yolo-daemon.js +151 -41
  35. package/dist/cli/yolo-daemon.js.map +1 -1
  36. package/dist/goal-manager-KFBOAP4X.js +20 -0
  37. package/dist/goal-manager-KFBOAP4X.js.map +1 -0
  38. package/dist/guardian-agent-PULK546O.js +17 -0
  39. package/dist/guardian-agent-PULK546O.js.map +1 -0
  40. package/dist/index.js +173 -39
  41. package/dist/index.js.map +1 -1
  42. package/dist/issue-store-QRDF3X55.js +22 -0
  43. package/dist/issue-store-QRDF3X55.js.map +1 -0
  44. package/dist/workers/agent-worker.js +6 -3
  45. package/dist/workers/agent-worker.js.map +1 -1
  46. package/package.json +1 -1
  47. package/dist/agent-smith-57MKX5QC.js +0 -13
  48. package/dist/agent-smith-runner-ZU4R3I2Z.js.map +0 -1
  49. package/dist/chunk-32WLOG6E.js.map +0 -1
  50. package/dist/chunk-ASGSTVVF.js.map +0 -1
  51. package/dist/chunk-NUT4G5AY.js.map +0 -1
  52. package/dist/chunk-S4VGGLXF.js.map +0 -1
  53. package/dist/chunk-XSPS463E.js.map +0 -1
  54. package/dist/chunk-XVGHO2Z5.js.map +0 -1
  55. /package/dist/{agent-smith-57MKX5QC.js.map → agent-smith-W4HUCFGC.js.map} +0 -0
  56. /package/dist/{chunk-KB5ZN6K2.js.map → chunk-GWSNINKX.js.map} +0 -0
@@ -1,16 +1,40 @@
1
1
  import {
2
2
  CustomSkill,
3
- getGlobalMemoryStats,
4
- getHistoricalInsights,
5
- getMemoryStats,
6
- getRecentIssues,
7
3
  getSkillRegistry,
8
4
  loadContextState
9
- } from "./chunk-S4VGGLXF.js";
5
+ } from "./chunk-X2PABPBH.js";
6
+ import {
7
+ getGlobalMemoryStats
8
+ } from "./chunk-7KHT2NKR.js";
9
+ import {
10
+ getHistoricalInsights,
11
+ getMemoryStats,
12
+ getRecentIssues
13
+ } from "./chunk-TSHZQKCM.js";
14
+ import {
15
+ getWorkingDirectory
16
+ } from "./chunk-KOFQ47YW.js";
10
17
  import {
11
18
  isInteractiveMode
12
19
  } from "./chunk-RAZUNSBI.js";
13
20
 
21
+ // src/utils/trie-init.ts
22
+ import { existsSync } from "fs";
23
+ import { join } from "path";
24
+ var INIT_MARKERS = [
25
+ "PROJECT.md",
26
+ "RULES.md",
27
+ "TEAM.md",
28
+ "BOOTSTRAP.md",
29
+ "AGENTS.md",
30
+ "config.json"
31
+ ];
32
+ function isTrieInitialized(workDir) {
33
+ const dir = workDir || getWorkingDirectory(void 0, true);
34
+ const trieDir = join(dir, ".trie");
35
+ return INIT_MARKERS.some((marker) => existsSync(join(trieDir, marker)));
36
+ }
37
+
14
38
  // src/orchestrator/triager.ts
15
39
  var Triager = class {
16
40
  agentRegistry = getSkillRegistry();
@@ -679,6 +703,8 @@ var Triager = class {
679
703
  // src/utils/parallel-executor.ts
680
704
  import { Worker } from "worker_threads";
681
705
  import { cpus } from "os";
706
+ import { existsSync as existsSync2 } from "fs";
707
+ import { fileURLToPath } from "url";
682
708
  var ParallelExecutor = class {
683
709
  maxWorkers;
684
710
  cache;
@@ -686,6 +712,8 @@ var ParallelExecutor = class {
686
712
  activeWorkers = /* @__PURE__ */ new Set();
687
713
  cacheEnabled = true;
688
714
  useWorkerThreads = false;
715
+ workerAvailable = null;
716
+ warnedWorkerFallback = false;
689
717
  constructor(cacheManager, maxWorkers = Math.max(2, Math.min(cpus().length - 1, 8)), options) {
690
718
  this.maxWorkers = maxWorkers;
691
719
  this.cache = cacheManager;
@@ -797,7 +825,7 @@ var ParallelExecutor = class {
797
825
  const startTime = Date.now();
798
826
  this.streaming?.startAgent(task.agent.name);
799
827
  try {
800
- const result = this.useWorkerThreads ? await this.executeTaskInWorker(task) : await task.agent.scan(task.files, task.context);
828
+ const result = this.canUseWorkers() ? await this.executeTaskInWorker(task) : await task.agent.scan(task.files, task.context);
801
829
  const executionTime = Date.now() - startTime;
802
830
  this.streaming?.completeAgent(task.agent.name, result.issues);
803
831
  return {
@@ -824,9 +852,27 @@ var ParallelExecutor = class {
824
852
  };
825
853
  }
826
854
  }
827
- async executeTaskInWorker(task) {
855
+ canUseWorkers() {
856
+ if (!this.useWorkerThreads) {
857
+ return false;
858
+ }
859
+ if (this.workerAvailable !== null) {
860
+ return this.workerAvailable;
861
+ }
862
+ const workerUrl = this.getWorkerUrl();
863
+ this.workerAvailable = existsSync2(fileURLToPath(workerUrl));
864
+ if (!this.workerAvailable && !this.warnedWorkerFallback && !isInteractiveMode()) {
865
+ console.error("\u26A0\uFE0F Worker threads unavailable; falling back to in-process agents.");
866
+ this.warnedWorkerFallback = true;
867
+ }
868
+ return this.workerAvailable;
869
+ }
870
+ getWorkerUrl() {
828
871
  const distDir = new URL(".", import.meta.url);
829
- const workerUrl = new URL("workers/agent-worker.js", distDir);
872
+ return new URL("workers/agent-worker.js", distDir);
873
+ }
874
+ async executeTaskInWorker(task) {
875
+ const workerUrl = this.getWorkerUrl();
830
876
  return new Promise((resolve, reject) => {
831
877
  const worker = new Worker(workerUrl, {
832
878
  workerData: {
@@ -914,7 +960,7 @@ function calculateOptimalConcurrency() {
914
960
 
915
961
  // src/utils/cache-manager.ts
916
962
  import { readFile, writeFile, mkdir, stat } from "fs/promises";
917
- import { join } from "path";
963
+ import { join as join2 } from "path";
918
964
  import { createHash } from "crypto";
919
965
  var CacheManager = class {
920
966
  cacheDir;
@@ -924,8 +970,8 @@ var CacheManager = class {
924
970
  // 24 hours
925
971
  MAX_ENTRIES = 1e3;
926
972
  constructor(baseDir) {
927
- this.cacheDir = join(baseDir, ".trie", "cache");
928
- this.indexPath = join(this.cacheDir, "index.json");
973
+ this.cacheDir = join2(baseDir, ".trie", "cache");
974
+ this.indexPath = join2(this.cacheDir, "index.json");
929
975
  }
930
976
  /**
931
977
  * Generate cache key for a file and agent combination
@@ -1192,9 +1238,436 @@ var Executor = class {
1192
1238
  }
1193
1239
  };
1194
1240
 
1241
+ // src/bootstrap/stack-detector.ts
1242
+ import { readFile as readFile2 } from "fs/promises";
1243
+ import { existsSync as existsSync3 } from "fs";
1244
+ import { join as join3 } from "path";
1245
+ var SKILL_MAPPINGS = {
1246
+ // Frontend Frameworks - React/Next.js
1247
+ "next": [
1248
+ "vercel-labs/agent-skills vercel-react-best-practices",
1249
+ "vercel-labs/agent-skills web-design-guidelines",
1250
+ "anthropics/skills frontend-design",
1251
+ "wshobson/agents nextjs-app-router-patterns"
1252
+ ],
1253
+ "react": [
1254
+ "vercel-labs/agent-skills vercel-react-best-practices",
1255
+ "anthropics/skills frontend-design",
1256
+ "wshobson/agents react-state-management"
1257
+ ],
1258
+ // Vue/Nuxt Ecosystem
1259
+ "vue": [
1260
+ "hyf0/vue-skills vue-best-practices",
1261
+ "hyf0/vue-skills pinia-best-practices",
1262
+ "hyf0/vue-skills vueuse-best-practices",
1263
+ "onmax/nuxt-skills vue"
1264
+ ],
1265
+ "nuxt": [
1266
+ "onmax/nuxt-skills nuxt",
1267
+ "onmax/nuxt-skills nuxt-ui",
1268
+ "onmax/nuxt-skills nuxt-content",
1269
+ "onmax/nuxt-skills nuxt-modules",
1270
+ "onmax/nuxt-skills nuxt-better-auth",
1271
+ "onmax/nuxt-skills nuxthub"
1272
+ ],
1273
+ "pinia": [
1274
+ "hyf0/vue-skills pinia-best-practices"
1275
+ ],
1276
+ "@vueuse/core": [
1277
+ "hyf0/vue-skills vueuse-best-practices",
1278
+ "onmax/nuxt-skills vueuse"
1279
+ ],
1280
+ // Mobile - Expo
1281
+ "expo": [
1282
+ "expo/skills building-native-ui",
1283
+ "expo/skills upgrading-expo",
1284
+ "expo/skills native-data-fetching",
1285
+ "expo/skills expo-dev-client",
1286
+ "expo/skills expo-deployment",
1287
+ "expo/skills expo-api-routes",
1288
+ "expo/skills expo-tailwind-setup",
1289
+ "expo/skills expo-cicd-workflows",
1290
+ "expo/skills use-dom"
1291
+ ],
1292
+ // Mobile - React Native
1293
+ "react-native": [
1294
+ "callstackincubator/agent-skills react-native-best-practices",
1295
+ "wshobson/agents react-native-architecture"
1296
+ ],
1297
+ // Backend Frameworks
1298
+ "@nestjs/core": [
1299
+ "kadajett/agent-nestjs-skills nestjs-best-practices"
1300
+ ],
1301
+ "nestjs": [
1302
+ "kadajett/agent-nestjs-skills nestjs-best-practices"
1303
+ ],
1304
+ "elysia": [
1305
+ "elysiajs/skills elysiajs"
1306
+ ],
1307
+ "hono": [
1308
+ "elysiajs/skills elysiajs"
1309
+ ],
1310
+ // Database/BaaS
1311
+ "@supabase/supabase-js": [
1312
+ "supabase/agent-skills supabase-postgres-best-practices"
1313
+ ],
1314
+ "convex": [
1315
+ "waynesutton/convexskills convex-best-practices"
1316
+ ],
1317
+ "pg": [
1318
+ "wshobson/agents postgresql-table-design"
1319
+ ],
1320
+ "postgres": [
1321
+ "wshobson/agents postgresql-table-design"
1322
+ ],
1323
+ // Auth
1324
+ "better-auth": [
1325
+ "better-auth/skills better-auth-best-practices",
1326
+ "better-auth/skills create-auth-skill"
1327
+ ],
1328
+ // Payments
1329
+ "stripe": [
1330
+ "stripe/ai stripe-best-practices"
1331
+ ],
1332
+ "@stripe/stripe-js": [
1333
+ "stripe/ai stripe-best-practices"
1334
+ ],
1335
+ // Media/Graphics
1336
+ "remotion": [
1337
+ "remotion-dev/skills remotion-best-practices"
1338
+ ],
1339
+ "three": [
1340
+ "cloudai-x/threejs-skills threejs-fundamentals",
1341
+ "cloudai-x/threejs-skills threejs-animation",
1342
+ "cloudai-x/threejs-skills threejs-materials",
1343
+ "cloudai-x/threejs-skills threejs-shaders",
1344
+ "cloudai-x/threejs-skills threejs-lighting",
1345
+ "cloudai-x/threejs-skills threejs-geometry",
1346
+ "cloudai-x/threejs-skills threejs-textures",
1347
+ "cloudai-x/threejs-skills threejs-loaders",
1348
+ "cloudai-x/threejs-skills threejs-interaction",
1349
+ "cloudai-x/threejs-skills threejs-postprocessing"
1350
+ ],
1351
+ // UI Libraries
1352
+ "tailwindcss": [
1353
+ "wshobson/agents tailwind-design-system",
1354
+ "jezweb/claude-skills tailwind-v4-shadcn",
1355
+ "wshobson/agents responsive-design"
1356
+ ],
1357
+ "@shadcn/ui": [
1358
+ "giuseppe-trisciuoglio/developer-kit shadcn-ui"
1359
+ ],
1360
+ "shadcn": [
1361
+ "giuseppe-trisciuoglio/developer-kit shadcn-ui"
1362
+ ],
1363
+ "@radix-ui/react-slot": [
1364
+ "onmax/nuxt-skills reka-ui"
1365
+ ],
1366
+ // State Management
1367
+ "@tanstack/react-query": [
1368
+ "jezweb/claude-skills tanstack-query"
1369
+ ],
1370
+ // Testing
1371
+ "playwright": [
1372
+ "anthropics/skills webapp-testing",
1373
+ "wshobson/agents e2e-testing-patterns"
1374
+ ],
1375
+ "puppeteer": [
1376
+ "anthropics/skills webapp-testing"
1377
+ ],
1378
+ "vitest": [
1379
+ "wshobson/agents e2e-testing-patterns"
1380
+ ],
1381
+ "jest": [
1382
+ "wshobson/agents e2e-testing-patterns"
1383
+ ],
1384
+ // DevTools/MCP
1385
+ "@modelcontextprotocol/sdk": [
1386
+ "anthropics/skills mcp-builder"
1387
+ ],
1388
+ // Security
1389
+ "semgrep": [
1390
+ "trailofbits/skills semgrep"
1391
+ ],
1392
+ // Monorepos
1393
+ "turbo": [
1394
+ "wshobson/agents monorepo-management"
1395
+ ],
1396
+ "nx": [
1397
+ "wshobson/agents monorepo-management"
1398
+ ],
1399
+ "lerna": [
1400
+ "wshobson/agents monorepo-management"
1401
+ ],
1402
+ // TypeScript (handled separately based on tsconfig.json)
1403
+ "typescript": [
1404
+ "wshobson/agents typescript-advanced-types"
1405
+ ]
1406
+ };
1407
+ var SKILL_CATEGORIES = {
1408
+ documents: [
1409
+ "anthropics/skills pdf",
1410
+ "anthropics/skills xlsx",
1411
+ "anthropics/skills pptx",
1412
+ "anthropics/skills docx",
1413
+ "anthropics/skills doc-coauthoring"
1414
+ ],
1415
+ design: [
1416
+ "anthropics/skills canvas-design",
1417
+ "anthropics/skills theme-factory",
1418
+ "anthropics/skills web-artifacts-builder",
1419
+ "anthropics/skills algorithmic-art",
1420
+ "anthropics/skills brand-guidelines",
1421
+ "anthropics/skills slack-gif-creator",
1422
+ "nextlevelbuilder/ui-ux-pro-max ui-ux-pro-max",
1423
+ "superdesigndev/superdesign-skill superdesign",
1424
+ "wshobson/agents design-system-patterns"
1425
+ ],
1426
+ marketing: [
1427
+ "coreyhaines31/marketingskills seo-audit",
1428
+ "coreyhaines31/marketingskills copywriting",
1429
+ "coreyhaines31/marketingskills marketing-psychology",
1430
+ "coreyhaines31/marketingskills programmatic-seo",
1431
+ "coreyhaines31/marketingskills marketing-ideas",
1432
+ "coreyhaines31/marketingskills copy-editing",
1433
+ "coreyhaines31/marketingskills pricing-strategy",
1434
+ "coreyhaines31/marketingskills social-content",
1435
+ "coreyhaines31/marketingskills launch-strategy",
1436
+ "coreyhaines31/marketingskills page-cro",
1437
+ "coreyhaines31/marketingskills competitor-alternatives",
1438
+ "coreyhaines31/marketingskills analytics-tracking",
1439
+ "coreyhaines31/marketingskills schema-markup",
1440
+ "coreyhaines31/marketingskills onboarding-cro",
1441
+ "coreyhaines31/marketingskills email-sequence",
1442
+ "coreyhaines31/marketingskills paid-ads",
1443
+ "coreyhaines31/marketingskills signup-flow-cro",
1444
+ "coreyhaines31/marketingskills free-tool-strategy",
1445
+ "coreyhaines31/marketingskills form-cro",
1446
+ "coreyhaines31/marketingskills paywall-upgrade-cro",
1447
+ "coreyhaines31/marketingskills referral-program",
1448
+ "coreyhaines31/marketingskills popup-cro",
1449
+ "coreyhaines31/marketingskills ab-test-setup"
1450
+ ],
1451
+ development: [
1452
+ "obra/superpowers brainstorming",
1453
+ "obra/superpowers test-driven-development",
1454
+ "obra/superpowers systematic-debugging",
1455
+ "obra/superpowers writing-plans",
1456
+ "obra/superpowers executing-plans",
1457
+ "obra/superpowers verification-before-completion",
1458
+ "obra/superpowers using-superpowers",
1459
+ "obra/superpowers subagent-driven-development",
1460
+ "obra/superpowers requesting-code-review",
1461
+ "obra/superpowers writing-skills",
1462
+ "obra/superpowers dispatching-parallel-agents",
1463
+ "obra/superpowers receiving-code-review",
1464
+ "obra/superpowers using-git-worktrees",
1465
+ "obra/superpowers finishing-a-development-branch",
1466
+ "wshobson/agents code-review-excellence",
1467
+ "wshobson/agents api-design-principles",
1468
+ "wshobson/agents architecture-patterns",
1469
+ "wshobson/agents error-handling-patterns",
1470
+ "wshobson/agents nodejs-backend-patterns",
1471
+ "wshobson/agents microservices-patterns",
1472
+ "wshobson/agents modern-javascript-patterns",
1473
+ "wshobson/agents web-component-design",
1474
+ "wshobson/agents async-python-patterns",
1475
+ "wshobson/agents python-testing-patterns",
1476
+ "boristane/agent-skills logging-best-practices"
1477
+ ],
1478
+ productivity: [
1479
+ "softaworks/agent-toolkit daily-meeting-update",
1480
+ "softaworks/agent-toolkit agent-md-refactor",
1481
+ "softaworks/agent-toolkit session-handoff",
1482
+ "softaworks/agent-toolkit meme-factory",
1483
+ "softaworks/agent-toolkit qa-test-planner",
1484
+ "softaworks/agent-toolkit writing-clearly-and-concisely",
1485
+ "softaworks/agent-toolkit commit-work",
1486
+ "softaworks/agent-toolkit mermaid-diagrams",
1487
+ "softaworks/agent-toolkit dependency-updater",
1488
+ "softaworks/agent-toolkit crafting-effective-readmes",
1489
+ "softaworks/agent-toolkit reducing-entropy",
1490
+ "softaworks/agent-toolkit feedback-mastery",
1491
+ "softaworks/agent-toolkit marp-slide",
1492
+ "softaworks/agent-toolkit professional-communication",
1493
+ "softaworks/agent-toolkit difficult-workplace-conversations",
1494
+ "anthropics/skills internal-comms",
1495
+ "othmanadi/planning-with-files planning-with-files"
1496
+ ],
1497
+ security: [
1498
+ "trailofbits/skills semgrep",
1499
+ "trailofbits/skills secure-workflow-guide",
1500
+ "trailofbits/skills codeql",
1501
+ "trailofbits/skills property-based-testing",
1502
+ "trailofbits/skills variant-analysis",
1503
+ "trailofbits/skills guidelines-advisor",
1504
+ "trailofbits/skills sharp-edges",
1505
+ "trailofbits/skills differential-review",
1506
+ "trailofbits/skills ask-questions-if-underspecified",
1507
+ "squirrelscan/skills audit-website"
1508
+ ],
1509
+ mobile: [
1510
+ "wshobson/agents mobile-ios-design",
1511
+ "wshobson/agents mobile-android-design",
1512
+ "dimillian/skills swiftui-ui-patterns",
1513
+ "dimillian/skills swiftui-liquid-glass"
1514
+ ],
1515
+ obsidian: [
1516
+ "kepano/obsidian-skills obsidian-markdown",
1517
+ "kepano/obsidian-skills obsidian-bases",
1518
+ "kepano/obsidian-skills json-canvas"
1519
+ ],
1520
+ prompts: [
1521
+ "f/awesome-chatgpt-prompts skill-lookup",
1522
+ "f/awesome-chatgpt-prompts prompt-lookup",
1523
+ "wshobson/agents prompt-engineering-patterns"
1524
+ ],
1525
+ browser: [
1526
+ "vercel-labs/agent-browser agent-browser"
1527
+ ],
1528
+ content: [
1529
+ "op7418/humanizer-zh humanizer-zh",
1530
+ "blader/humanizer humanizer",
1531
+ "op7418/youtube-clipper-skill youtube-clipper",
1532
+ "jimliu/baoyu-skills baoyu-slide-deck",
1533
+ "jimliu/baoyu-skills baoyu-article-illustrator",
1534
+ "jimliu/baoyu-skills baoyu-cover-image",
1535
+ "jimliu/baoyu-skills baoyu-comic",
1536
+ "jimliu/baoyu-skills baoyu-infographic",
1537
+ "jimliu/baoyu-skills baoyu-image-gen"
1538
+ ],
1539
+ integrations: [
1540
+ "intellectronica/agent-skills context7",
1541
+ "softaworks/agent-toolkit gemini",
1542
+ "softaworks/agent-toolkit codex"
1543
+ ]
1544
+ };
1545
+ async function detectStack(projectDir) {
1546
+ const stack = {
1547
+ suggestedSkills: [],
1548
+ suggestedAgents: ["security", "privacy", "bugs"],
1549
+ dependencies: /* @__PURE__ */ new Set()
1550
+ };
1551
+ if (existsSync3(join3(projectDir, "tsconfig.json"))) {
1552
+ stack.language = "TypeScript";
1553
+ stack.suggestedAgents.push("typecheck");
1554
+ stack.suggestedSkills.push("wshobson/agents typescript-advanced-types");
1555
+ } else if (existsSync3(join3(projectDir, "package.json"))) {
1556
+ stack.language = "JavaScript";
1557
+ } else if (existsSync3(join3(projectDir, "requirements.txt")) || existsSync3(join3(projectDir, "pyproject.toml"))) {
1558
+ stack.language = "Python";
1559
+ } else if (existsSync3(join3(projectDir, "go.mod"))) {
1560
+ stack.language = "Go";
1561
+ } else if (existsSync3(join3(projectDir, "Cargo.toml"))) {
1562
+ stack.language = "Rust";
1563
+ }
1564
+ if (existsSync3(join3(projectDir, "Package.swift")) || existsSync3(join3(projectDir, "project.pbxproj")) || existsSync3(join3(projectDir, "*.xcodeproj"))) {
1565
+ stack.language = "Swift";
1566
+ stack.suggestedSkills.push("dimillian/skills swiftui-ui-patterns");
1567
+ stack.suggestedSkills.push("dimillian/skills swiftui-liquid-glass");
1568
+ }
1569
+ if (existsSync3(join3(projectDir, "pnpm-lock.yaml"))) {
1570
+ stack.packageManager = "pnpm";
1571
+ } else if (existsSync3(join3(projectDir, "yarn.lock"))) {
1572
+ stack.packageManager = "yarn";
1573
+ } else if (existsSync3(join3(projectDir, "bun.lockb"))) {
1574
+ stack.packageManager = "bun";
1575
+ } else if (existsSync3(join3(projectDir, "package-lock.json"))) {
1576
+ stack.packageManager = "npm";
1577
+ }
1578
+ if (existsSync3(join3(projectDir, ".github", "workflows"))) {
1579
+ stack.suggestedSkills.push("wshobson/agents github-actions-templates");
1580
+ }
1581
+ try {
1582
+ const pkgPath = join3(projectDir, "package.json");
1583
+ if (existsSync3(pkgPath)) {
1584
+ const pkgContent = await readFile2(pkgPath, "utf-8");
1585
+ const pkg = JSON.parse(pkgContent);
1586
+ const deps = { ...pkg.dependencies, ...pkg.devDependencies };
1587
+ for (const dep of Object.keys(deps)) {
1588
+ stack.dependencies.add(dep);
1589
+ }
1590
+ for (const dep of Object.keys(deps)) {
1591
+ const skills = SKILL_MAPPINGS[dep];
1592
+ if (skills) {
1593
+ stack.suggestedSkills.push(...skills);
1594
+ }
1595
+ }
1596
+ if (deps["next"]) {
1597
+ stack.framework = `Next.js ${deps["next"].replace("^", "")}`;
1598
+ stack.suggestedAgents.push("accessibility", "design");
1599
+ } else if (deps["react"]) {
1600
+ stack.framework = `React ${deps["react"].replace("^", "")}`;
1601
+ stack.suggestedAgents.push("accessibility");
1602
+ } else if (deps["vue"]) {
1603
+ stack.framework = `Vue ${deps["vue"].replace("^", "")}`;
1604
+ } else if (deps["nuxt"]) {
1605
+ stack.framework = `Nuxt ${deps["nuxt"].replace("^", "")}`;
1606
+ } else if (deps["svelte"]) {
1607
+ stack.framework = "Svelte";
1608
+ } else if (deps["express"]) {
1609
+ stack.framework = "Express.js";
1610
+ } else if (deps["fastify"]) {
1611
+ stack.framework = "Fastify";
1612
+ } else if (deps["hono"]) {
1613
+ stack.framework = "Hono";
1614
+ } else if (deps["elysia"]) {
1615
+ stack.framework = "Elysia";
1616
+ } else if (deps["@nestjs/core"]) {
1617
+ stack.framework = "NestJS";
1618
+ }
1619
+ if (deps["next-auth"] || deps["@auth/core"]) {
1620
+ stack.auth = "NextAuth.js";
1621
+ } else if (deps["passport"]) {
1622
+ stack.auth = "Passport.js";
1623
+ } else if (deps["@clerk/nextjs"] || deps["@clerk/clerk-react"]) {
1624
+ stack.auth = "Clerk";
1625
+ } else if (deps["better-auth"]) {
1626
+ stack.auth = "Better Auth";
1627
+ }
1628
+ if (deps["prisma"] || deps["@prisma/client"]) {
1629
+ stack.database = "Prisma ORM";
1630
+ } else if (deps["drizzle-orm"]) {
1631
+ stack.database = "Drizzle ORM";
1632
+ } else if (deps["@supabase/supabase-js"]) {
1633
+ stack.database = "Supabase";
1634
+ } else if (deps["mongoose"]) {
1635
+ stack.database = "MongoDB (Mongoose)";
1636
+ } else if (deps["pg"]) {
1637
+ stack.database = "PostgreSQL";
1638
+ } else if (deps["convex"]) {
1639
+ stack.database = "Convex";
1640
+ }
1641
+ if (deps["stripe"] || deps["@stripe/stripe-js"]) {
1642
+ stack.suggestedAgents.push("moneybags");
1643
+ }
1644
+ }
1645
+ } catch {
1646
+ }
1647
+ if (!stack.database) {
1648
+ if (existsSync3(join3(projectDir, "prisma", "schema.prisma"))) {
1649
+ stack.database = "Prisma ORM";
1650
+ } else if (existsSync3(join3(projectDir, "drizzle.config.ts"))) {
1651
+ stack.database = "Drizzle ORM";
1652
+ }
1653
+ }
1654
+ stack.suggestedSkills = [...new Set(stack.suggestedSkills)];
1655
+ stack.suggestedAgents = [...new Set(stack.suggestedAgents)];
1656
+ return stack;
1657
+ }
1658
+ function getSkillsByCategory(category) {
1659
+ return SKILL_CATEGORIES[category] || [];
1660
+ }
1661
+ function getSkillCategories() {
1662
+ return Object.entries(SKILL_CATEGORIES).map(([name, skills]) => ({
1663
+ name,
1664
+ count: skills.length
1665
+ }));
1666
+ }
1667
+
1195
1668
  // src/agent/git.ts
1196
1669
  import { execFile } from "child_process";
1197
- import { existsSync } from "fs";
1670
+ import { existsSync as existsSync4 } from "fs";
1198
1671
  import path from "path";
1199
1672
  import { promisify } from "util";
1200
1673
  var execFileAsync = promisify(execFile);
@@ -1299,6 +1772,11 @@ export {
1299
1772
  getUncommittedChanges,
1300
1773
  getWorkingTreeDiff,
1301
1774
  isGitRepo,
1302
- getChangedFilesSinceTimestamp
1775
+ getChangedFilesSinceTimestamp,
1776
+ isTrieInitialized,
1777
+ SKILL_CATEGORIES,
1778
+ detectStack,
1779
+ getSkillsByCategory,
1780
+ getSkillCategories
1303
1781
  };
1304
- //# sourceMappingURL=chunk-XSPS463E.js.map
1782
+ //# sourceMappingURL=chunk-ALA6733H.js.map