@ulpi/cli 0.1.4 → 0.1.6

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 (112) hide show
  1. package/LICENSE +21 -0
  2. package/dist/{auth-PN7TMQHV-2W4ICG64.js → auth-FWM7MM4Q-VZC3U2XZ.js} +1 -1
  3. package/dist/{auth-ECQ3IB4E.js → auth-HDK7ECJL.js} +2 -1
  4. package/dist/{chunk-3SBPZRB5.js → chunk-3BCW6ABU.js} +402 -142
  5. package/dist/{chunk-JGBXM5NC.js → chunk-3WB5CXH4.js} +180 -5
  6. package/dist/{chunk-2HEE5OKX.js → chunk-4UCJIAOU.js} +2 -2
  7. package/dist/chunk-4XTHZVDS.js +109 -0
  8. package/dist/chunk-4ZPOZULQ.js +6522 -0
  9. package/dist/{chunk-SIAQVRKG.js → chunk-5MI5GIXM.js} +48 -2
  10. package/dist/{chunk-KLEASXUR.js → chunk-6ZL6NXMV.js} +1 -1
  11. package/dist/chunk-76D3BYJD.js +221 -0
  12. package/dist/{chunk-ZLYRPD7I.js → chunk-AWOSRA5F.js} +1 -1
  13. package/dist/{chunk-PDR55ZNW.js → chunk-BFEKZZHM.js} +274 -57
  14. package/dist/chunk-C7CLUQI6.js +1286 -0
  15. package/dist/{chunk-7AL4DOEJ.js → chunk-E3B5NROU.js} +7 -7
  16. package/dist/chunk-EJ7TW77N.js +1418 -0
  17. package/dist/{chunk-5J6NLQUN.js → chunk-IV6MWETF.js} +383 -168
  18. package/dist/chunk-IZPJHSPX.js +1478 -0
  19. package/dist/chunk-JLHNLM3C.js +228 -0
  20. package/dist/{chunk-BZL5H4YQ.js → chunk-KYYI23AQ.js} +2 -2
  21. package/dist/{chunk-2CLNOKPA.js → chunk-RSFJ6QSR.js} +18 -0
  22. package/dist/chunk-S6ANCSYO.js +1271 -0
  23. package/dist/chunk-SEU7WWNQ.js +1251 -0
  24. package/dist/chunk-SNQ7NAIS.js +453 -0
  25. package/dist/{ulpi-RMMCUAGP-JCJ273T6.js → chunk-TSLDGT5O.js} +73 -35
  26. package/dist/{chunk-SPOI23SB.js → chunk-UXHCHOWQ.js} +83 -62
  27. package/dist/chunk-V2H5D6Y3.js +146 -0
  28. package/dist/{chunk-QJ5GSMEC.js → chunk-VVEDXI7E.js} +2 -1
  29. package/dist/chunk-VXH5Y4FO.js +6761 -0
  30. package/dist/chunk-WED4LM5N.js +322 -0
  31. package/dist/{chunk-74WVVWJ4.js → chunk-YOKL7RB5.js} +184 -15
  32. package/dist/chunk-Z53CAR7G.js +298 -0
  33. package/dist/ci-X3U2W4HC.js +854 -0
  34. package/dist/cloud-2F3NLVHN.js +274 -0
  35. package/dist/{codemap-RKSD4MIE.js → codemap-XNGMAF3F.js} +37 -37
  36. package/dist/codex-MB5YTMRT.js +132 -0
  37. package/dist/{config-EGAXXCGL.js → config-OOELBYTH.js} +1 -1
  38. package/dist/dist-2BJYR5EI.js +59 -0
  39. package/dist/dist-2K7IEVTA.js +43 -0
  40. package/dist/dist-3EIQTZHT.js +1380 -0
  41. package/dist/{dist-YA2BWZB2.js → dist-4U5L2X2C.js} +2 -2
  42. package/dist/{dist-UKMCJBB2.js → dist-54KAMNLO.js} +16 -15
  43. package/dist/dist-6M4MZWZW.js +58 -0
  44. package/dist/dist-6X576SU2.js +27 -0
  45. package/dist/dist-7QOEYLFX.js +103 -0
  46. package/dist/dist-AYBGHEDY.js +2541 -0
  47. package/dist/dist-EK45QNEM.js +45 -0
  48. package/dist/{dist-CS2VKNYS.js → dist-FKFEJRPX.js} +16 -15
  49. package/dist/dist-GTEJUBBT.js +66 -0
  50. package/dist/dist-HA74OKJZ.js +40 -0
  51. package/dist/dist-HU5RZAON.js +48 -0
  52. package/dist/dist-IYE3OBRB.js +374 -0
  53. package/dist/{dist-GJYT2OQV.js → dist-JLU26AB6.js} +12 -9
  54. package/dist/{dist-6G7JC2RA.js → dist-KUCI6JFE.js} +49 -9
  55. package/dist/dist-NUEMFZFL.js +33 -0
  56. package/dist/{dist-RKOGLK7R.js → dist-NUXMDXZ3.js} +31 -3
  57. package/dist/{dist-QAU3LGJN.js → dist-YCNWHSLN.js} +15 -5
  58. package/dist/{dist-CB5D5LMO.js → dist-YFFG2ZD6.js} +9 -16
  59. package/dist/dist-ZG4OKCSR.js +15 -0
  60. package/dist/doctor-SI4LLLDZ.js +345 -0
  61. package/dist/{export-import-4A5MWLIA.js → export-import-JFQH4KSJ.js} +1 -1
  62. package/dist/{history-3MOBX4MA.js → history-5NE46ZAH.js} +7 -7
  63. package/dist/hooks-installer-UN5JZLDQ.js +19 -0
  64. package/dist/index.js +395 -619
  65. package/dist/{init-6CH4HV5T.js → init-5FK3VKRT.js} +79 -13
  66. package/dist/job-HIDMAFW2.js +376 -0
  67. package/dist/jobs.memory-PLMMSFHB-VBECCTHN.js +33 -0
  68. package/dist/kiro-VMUHDFGK.js +153 -0
  69. package/dist/{launchd-LF2QMSKZ.js → launchd-6AWT54HR.js} +9 -17
  70. package/dist/mcp-PDUD7SGP.js +249 -0
  71. package/dist/mcp-installer-PQU3XOGO.js +259 -0
  72. package/dist/mcp-setup-OA7IB3H3.js +263 -0
  73. package/dist/{memory-Y6OZTXJ2.js → memory-ZNAEAK3B.js} +17 -17
  74. package/dist/{ollama-3XCUZMZT-FYKHW4TZ.js → ollama-3XCUZMZT-4JMH6B7P.js} +1 -1
  75. package/dist/{openai-E7G2YAHU-UYY4ZWON.js → openai-E7G2YAHU-T3HMBPH7.js} +2 -2
  76. package/dist/portal-JYWVHXDU.js +210 -0
  77. package/dist/prd-Q4J5NVAR.js +408 -0
  78. package/dist/repos-WWZXNN3P.js +271 -0
  79. package/dist/review-integration-5WHEJU2A.js +14 -0
  80. package/dist/{rules-E427DKYJ.js → rules-Y4VSOY5Y.js} +3 -3
  81. package/dist/run-VPNXEIBY.js +687 -0
  82. package/dist/server-COL4AXKU-P7S7NNF6.js +11 -0
  83. package/dist/server-KKSETHDV-XSSLEENT.js +20 -0
  84. package/dist/{skills-CX73O3IV.js → skills-QEYU2N27.js} +4 -2
  85. package/dist/start-JYOEL7AJ.js +303 -0
  86. package/dist/{status-4DFHDJMN.js → status-BHQYYGAL.js} +2 -2
  87. package/dist/{templates-U7T6MARD.js → templates-CBRUJ66V.js} +4 -3
  88. package/dist/tui-DP7736EX.js +61 -0
  89. package/dist/ulpi-5EN6JCAS-LFE3WSL4.js +10 -0
  90. package/dist/{uninstall-6SW35IK4.js → uninstall-ICUV6DDV.js} +3 -3
  91. package/dist/{update-M6IBJNYP.js → update-7ZMAYRBH.js} +3 -3
  92. package/dist/{version-checker-Q6YTYAGP.js → version-checker-4ZFMZA7Y.js} +2 -2
  93. package/package.json +39 -31
  94. package/dist/chunk-2MZER6ND.js +0 -415
  95. package/dist/chunk-2VYFVYJL.js +0 -4273
  96. package/dist/chunk-6OCEY7JY.js +0 -422
  97. package/dist/chunk-7LXY5UVC.js +0 -330
  98. package/dist/chunk-B55DDP24.js +0 -136
  99. package/dist/chunk-JWUUVXIV.js +0 -13694
  100. package/dist/chunk-MIAQVCFW.js +0 -39
  101. package/dist/chunk-YM2HV4IA.js +0 -505
  102. package/dist/ci-STSL2LSP.js +0 -370
  103. package/dist/mcp-installer-NQCGKQ23.js +0 -124
  104. package/dist/projects-ATHDD3D6.js +0 -271
  105. package/dist/review-ADUPV3PN.js +0 -152
  106. package/dist/server-USLHY6GH-AEOJC5ST.js +0 -18
  107. package/dist/server-X5P6WH2M-7K2RY34N.js +0 -11
  108. package/dist/skills/ulpi-generate-guardian/SKILL.md +0 -750
  109. package/dist/skills/ulpi-generate-guardian/references/framework-rules.md +0 -849
  110. package/dist/skills/ulpi-generate-guardian/references/language-rules.md +0 -591
  111. package/dist/ui-OWXZ3YSR.js +0 -167
  112. package/dist/ui.html +0 -698
@@ -0,0 +1,228 @@
1
+ import {
2
+ loadMcpCatalog
3
+ } from "./chunk-4ZPOZULQ.js";
4
+ import {
5
+ MCPS_LIBRARY_FILE,
6
+ ULPI_GLOBAL_DIR,
7
+ projectMcpsFile
8
+ } from "./chunk-C7CLUQI6.js";
9
+ import {
10
+ McpLibrarySchema,
11
+ McpRepoConfigSchema
12
+ } from "./chunk-YOKL7RB5.js";
13
+
14
+ // ../../packages/mcp-gateway-engine/dist/index.js
15
+ import * as fs from "fs";
16
+ import { parse as parseYaml, stringify as stringifyYaml } from "yaml";
17
+ import * as fs2 from "fs";
18
+ import * as path from "path";
19
+ import { parse as parseYaml2, stringify as stringifyYaml2 } from "yaml";
20
+ import * as fs3 from "fs";
21
+ import * as path2 from "path";
22
+ function loadLibrary() {
23
+ try {
24
+ if (!fs.existsSync(MCPS_LIBRARY_FILE)) {
25
+ return { mcps: {} };
26
+ }
27
+ const raw = fs.readFileSync(MCPS_LIBRARY_FILE, "utf-8");
28
+ const parsed = parseYaml(raw);
29
+ return McpLibrarySchema.parse(parsed ?? {});
30
+ } catch {
31
+ return { mcps: {} };
32
+ }
33
+ }
34
+ function saveLibrary(library) {
35
+ fs.mkdirSync(ULPI_GLOBAL_DIR, { recursive: true });
36
+ const yaml = stringifyYaml(library, { lineWidth: 120 });
37
+ fs.writeFileSync(MCPS_LIBRARY_FILE, yaml, "utf-8");
38
+ }
39
+ function addToLibrary(name, definition) {
40
+ const library = loadLibrary();
41
+ library.mcps[name] = { ...definition, name, added_at: definition.added_at ?? (/* @__PURE__ */ new Date()).toISOString() };
42
+ saveLibrary(library);
43
+ }
44
+ function removeFromLibrary(name) {
45
+ const library = loadLibrary();
46
+ if (!(name in library.mcps)) return false;
47
+ delete library.mcps[name];
48
+ saveLibrary(library);
49
+ return true;
50
+ }
51
+ function getLibraryEntry(name) {
52
+ const library = loadLibrary();
53
+ return library.mcps[name];
54
+ }
55
+ function listLibrary() {
56
+ const library = loadLibrary();
57
+ return Object.values(library.mcps);
58
+ }
59
+ function loadActivations(projectDir) {
60
+ try {
61
+ const filePath = projectMcpsFile(projectDir);
62
+ if (!fs2.existsSync(filePath)) {
63
+ return { mcps: {} };
64
+ }
65
+ const raw = fs2.readFileSync(filePath, "utf-8");
66
+ const parsed = parseYaml2(raw);
67
+ return McpRepoConfigSchema.parse(parsed ?? {});
68
+ } catch {
69
+ return { mcps: {} };
70
+ }
71
+ }
72
+ function saveActivations(projectDir, config) {
73
+ const filePath = projectMcpsFile(projectDir);
74
+ fs2.mkdirSync(path.dirname(filePath), { recursive: true });
75
+ const yaml = stringifyYaml2(config, { lineWidth: 120 });
76
+ fs2.writeFileSync(filePath, yaml, "utf-8");
77
+ }
78
+ function enableMcp(projectDir, name, config) {
79
+ const current = loadActivations(projectDir);
80
+ current.mcps[name] = { enabled: true, config: config ?? current.mcps[name]?.config ?? {} };
81
+ saveActivations(projectDir, current);
82
+ }
83
+ function disableMcp(projectDir, name) {
84
+ const current = loadActivations(projectDir);
85
+ if (!(name in current.mcps)) return false;
86
+ current.mcps[name] = { ...current.mcps[name], enabled: false, config: current.mcps[name]?.config ?? {} };
87
+ saveActivations(projectDir, current);
88
+ return true;
89
+ }
90
+ function updateActivationConfig(projectDir, name, config) {
91
+ const current = loadActivations(projectDir);
92
+ const existing = current.mcps[name];
93
+ current.mcps[name] = { enabled: existing?.enabled ?? true, config };
94
+ saveActivations(projectDir, current);
95
+ }
96
+ function getActivation(projectDir, name) {
97
+ const config = loadActivations(projectDir);
98
+ return config.mcps[name];
99
+ }
100
+ function listActivations(projectDir) {
101
+ const config = loadActivations(projectDir);
102
+ return Object.entries(config.mcps).map(([name, activation]) => ({ name, activation }));
103
+ }
104
+ function loadCatalog() {
105
+ return loadMcpCatalog();
106
+ }
107
+ function getCatalogEntry(name) {
108
+ return loadMcpCatalog().find((e) => e.name === name);
109
+ }
110
+ function searchCatalog(query) {
111
+ const q = query.toLowerCase();
112
+ return loadMcpCatalog().filter((entry) => {
113
+ if (entry.name.toLowerCase().includes(q)) return true;
114
+ if (entry.display_name?.toLowerCase().includes(q)) return true;
115
+ if (entry.description?.toLowerCase().includes(q)) return true;
116
+ if (entry.tags?.some((t) => t.toLowerCase().includes(q))) return true;
117
+ if (entry.category?.toLowerCase().includes(q)) return true;
118
+ return false;
119
+ });
120
+ }
121
+ function suggestMcps(input) {
122
+ const catalog = loadMcpCatalog();
123
+ const library = loadLibrary();
124
+ const suggestions = [];
125
+ for (const entry of catalog) {
126
+ const signals = entry.detect_signals;
127
+ if (!signals) continue;
128
+ const evidence = [];
129
+ const depMatches = (signals.dependencies ?? []).filter(
130
+ (d) => input.dependencies.some((dep) => dep === d || dep.startsWith(d + "/"))
131
+ );
132
+ if (depMatches.length > 0) {
133
+ evidence.push(`Dependencies: ${depMatches.join(", ")}`);
134
+ }
135
+ const envMatches = (signals.env_vars ?? []).filter((e) => input.envVars.includes(e));
136
+ if (envMatches.length > 0) {
137
+ evidence.push(`Env vars: ${envMatches.join(", ")}`);
138
+ }
139
+ const dockerMatches = (signals.docker_services ?? []).filter((s) => input.dockerServices.includes(s));
140
+ if (dockerMatches.length > 0) {
141
+ evidence.push(`Docker services: ${dockerMatches.join(", ")}`);
142
+ }
143
+ if (evidence.length === 0) continue;
144
+ let confidence = "low";
145
+ if (depMatches.length > 0 && (envMatches.length > 0 || dockerMatches.length > 0)) {
146
+ confidence = "high";
147
+ } else if (depMatches.length > 0 || envMatches.length > 0) {
148
+ confidence = "medium";
149
+ }
150
+ suggestions.push({
151
+ name: entry.name,
152
+ displayName: entry.display_name ?? entry.name,
153
+ description: entry.description ?? "",
154
+ category: entry.category ?? "custom",
155
+ confidence,
156
+ evidence,
157
+ alreadyAdded: entry.name in library.mcps
158
+ });
159
+ }
160
+ const order = { high: 0, medium: 1, low: 2 };
161
+ suggestions.sort((a, b) => order[a.confidence] - order[b.confidence] || a.name.localeCompare(b.name));
162
+ return suggestions;
163
+ }
164
+ function collectProjectSignals(projectDir) {
165
+ const dependencies = [];
166
+ const envVars = [];
167
+ const dockerServices = [];
168
+ const pkgJsonPath = path2.join(projectDir, "package.json");
169
+ try {
170
+ if (fs3.existsSync(pkgJsonPath)) {
171
+ const pkg = JSON.parse(fs3.readFileSync(pkgJsonPath, "utf-8"));
172
+ dependencies.push(...Object.keys(pkg.dependencies ?? {}));
173
+ dependencies.push(...Object.keys(pkg.devDependencies ?? {}));
174
+ }
175
+ } catch {
176
+ }
177
+ for (const envFile of [".env", ".env.local", ".env.example"]) {
178
+ const envPath = path2.join(projectDir, envFile);
179
+ try {
180
+ if (fs3.existsSync(envPath)) {
181
+ const content = fs3.readFileSync(envPath, "utf-8");
182
+ for (const line of content.split("\n")) {
183
+ const match = line.match(/^([A-Z_][A-Z0-9_]*)=/);
184
+ if (match?.[1]) envVars.push(match[1]);
185
+ }
186
+ }
187
+ } catch {
188
+ }
189
+ }
190
+ for (const dcFile of ["docker-compose.yml", "docker-compose.yaml", "compose.yml", "compose.yaml"]) {
191
+ const dcPath = path2.join(projectDir, dcFile);
192
+ try {
193
+ if (fs3.existsSync(dcPath)) {
194
+ const content = fs3.readFileSync(dcPath, "utf-8");
195
+ const servicesMatch = content.match(/^services:\s*\n((?:\s+\S+.*\n?)*)/m);
196
+ if (servicesMatch?.[1]) {
197
+ for (const line of servicesMatch[1].split("\n")) {
198
+ const svcMatch = line.match(/^\s{2}(\w[\w-]*):/);
199
+ if (svcMatch?.[1]) dockerServices.push(svcMatch[1]);
200
+ }
201
+ }
202
+ }
203
+ } catch {
204
+ }
205
+ }
206
+ return { dependencies, envVars, dockerServices };
207
+ }
208
+
209
+ export {
210
+ loadLibrary,
211
+ saveLibrary,
212
+ addToLibrary,
213
+ removeFromLibrary,
214
+ getLibraryEntry,
215
+ listLibrary,
216
+ loadActivations,
217
+ saveActivations,
218
+ enableMcp,
219
+ disableMcp,
220
+ updateActivationConfig,
221
+ getActivation,
222
+ listActivations,
223
+ loadCatalog,
224
+ getCatalogEntry,
225
+ searchCatalog,
226
+ suggestMcps,
227
+ collectProjectSignals
228
+ };
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  CLI_REGISTRY_URL,
3
3
  VERSION_CACHE_FILE
4
- } from "./chunk-7LXY5UVC.js";
4
+ } from "./chunk-C7CLUQI6.js";
5
5
 
6
6
  // src/version-checker.ts
7
7
  import * as fs from "fs";
@@ -13,7 +13,7 @@ var REGISTRY_URL = CLI_REGISTRY_URL;
13
13
  var FETCH_TIMEOUT_MS = 5e3;
14
14
  function getCurrentVersion() {
15
15
  try {
16
- return "0.1.4";
16
+ return "0.1.6";
17
17
  } catch {
18
18
  return "0.0.0";
19
19
  }
@@ -789,5 +789,23 @@ function detectStack(projectDir) {
789
789
  }
790
790
 
791
791
  export {
792
+ detectRuntime,
793
+ detectLanguage,
794
+ readJsonFile,
795
+ readTextFile,
796
+ getNodeDependencies,
797
+ getPythonDependencies,
798
+ getComposerDependencies,
799
+ getGoDependencies,
800
+ getCargoDependencies,
801
+ getGemDependencies,
802
+ getMixDependencies,
803
+ detectFramework,
804
+ detectPackageManager,
805
+ detectFormatter,
806
+ detectLinter,
807
+ detectTestRunner,
808
+ detectGitWorkflow,
809
+ detectOrm,
792
810
  detectStack
793
811
  };