@ulpi/cli 0.1.5 → 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 (109) hide show
  1. package/LICENSE +21 -0
  2. package/dist/{auth-PN7TMQHV-2W4ICG64.js → auth-FWM7MM4Q-VZC3U2XZ.js} +1 -1
  3. package/dist/{auth-BFFBUJUC.js → auth-HDK7ECJL.js} +2 -1
  4. package/dist/{chunk-RJIRWQJD.js → chunk-3BCW6ABU.js} +402 -142
  5. package/dist/{chunk-L3PWNHSA.js → chunk-3WB5CXH4.js} +180 -5
  6. package/dist/{chunk-K4OVPFY2.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-AV5RB3N2.js → chunk-76D3BYJD.js} +48 -0
  12. package/dist/{chunk-DOIKS6C5.js → chunk-AWOSRA5F.js} +1 -1
  13. package/dist/{chunk-UCMT5OKP.js → chunk-BFEKZZHM.js} +274 -57
  14. package/dist/chunk-C7CLUQI6.js +1286 -0
  15. package/dist/{chunk-ELTGWMDE.js → chunk-E3B5NROU.js} +7 -7
  16. package/dist/chunk-EJ7TW77N.js +1418 -0
  17. package/dist/{chunk-6OURRFP7.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-P2RESJRN.js → chunk-KYYI23AQ.js} +2 -2
  21. package/dist/chunk-S6ANCSYO.js +1271 -0
  22. package/dist/chunk-SEU7WWNQ.js +1251 -0
  23. package/dist/chunk-SNQ7NAIS.js +453 -0
  24. package/dist/{ulpi-RMMCUAGP-EWYUE7RU.js → chunk-TSLDGT5O.js} +73 -35
  25. package/dist/{chunk-EIWYSP3A.js → chunk-UXHCHOWQ.js} +83 -62
  26. package/dist/chunk-V2H5D6Y3.js +146 -0
  27. package/dist/{chunk-5SCG7UYM.js → chunk-VVEDXI7E.js} +1 -1
  28. package/dist/chunk-VXH5Y4FO.js +6761 -0
  29. package/dist/chunk-WED4LM5N.js +322 -0
  30. package/dist/{chunk-74WVVWJ4.js → chunk-YOKL7RB5.js} +184 -15
  31. package/dist/chunk-Z53CAR7G.js +298 -0
  32. package/dist/{ci-JQ56YIKC.js → ci-X3U2W4HC.js} +124 -26
  33. package/dist/cloud-2F3NLVHN.js +274 -0
  34. package/dist/{codemap-HMYBXJL2.js → codemap-XNGMAF3F.js} +37 -37
  35. package/dist/codex-MB5YTMRT.js +132 -0
  36. package/dist/{config-YYWEN7U2.js → config-OOELBYTH.js} +1 -1
  37. package/dist/dist-2BJYR5EI.js +59 -0
  38. package/dist/dist-3EIQTZHT.js +1380 -0
  39. package/dist/{dist-WAMAQVPK.js → dist-4U5L2X2C.js} +2 -2
  40. package/dist/{dist-4XTJ6HLM.js → dist-54KAMNLO.js} +16 -15
  41. package/dist/dist-6M4MZWZW.js +58 -0
  42. package/dist/dist-6X576SU2.js +27 -0
  43. package/dist/dist-7QOEYLFX.js +103 -0
  44. package/dist/dist-AYBGHEDY.js +2541 -0
  45. package/dist/dist-EK45QNEM.js +45 -0
  46. package/dist/{dist-U7ZIJMZD.js → dist-FKFEJRPX.js} +16 -15
  47. package/dist/dist-GTEJUBBT.js +66 -0
  48. package/dist/dist-HA74OKJZ.js +40 -0
  49. package/dist/{dist-XG2GG5SD.js → dist-HU5RZAON.js} +14 -2
  50. package/dist/dist-IYE3OBRB.js +374 -0
  51. package/dist/{dist-7WLLPWWB.js → dist-JLU26AB6.js} +12 -9
  52. package/dist/{dist-6G7JC2RA.js → dist-KUCI6JFE.js} +49 -9
  53. package/dist/dist-NUEMFZFL.js +33 -0
  54. package/dist/{dist-GWGTAHNM.js → dist-NUXMDXZ3.js} +31 -3
  55. package/dist/{dist-5R4RYNQO.js → dist-YCNWHSLN.js} +15 -5
  56. package/dist/{dist-6MFVWIFF.js → dist-YFFG2ZD6.js} +9 -16
  57. package/dist/dist-ZG4OKCSR.js +15 -0
  58. package/dist/doctor-SI4LLLDZ.js +345 -0
  59. package/dist/{export-import-4A5MWLIA.js → export-import-JFQH4KSJ.js} +1 -1
  60. package/dist/{history-RNUWO4JZ.js → history-5NE46ZAH.js} +7 -7
  61. package/dist/{hooks-installer-K2JXEBNN.js → hooks-installer-UN5JZLDQ.js} +2 -2
  62. package/dist/index.js +394 -618
  63. package/dist/{init-NQWFZPKO.js → init-5FK3VKRT.js} +76 -10
  64. package/dist/job-HIDMAFW2.js +376 -0
  65. package/dist/jobs.memory-PLMMSFHB-VBECCTHN.js +33 -0
  66. package/dist/kiro-VMUHDFGK.js +153 -0
  67. package/dist/{launchd-OYXUAVW6.js → launchd-6AWT54HR.js} +9 -17
  68. package/dist/mcp-PDUD7SGP.js +249 -0
  69. package/dist/mcp-installer-PQU3XOGO.js +259 -0
  70. package/dist/mcp-setup-OA7IB3H3.js +263 -0
  71. package/dist/{memory-D6ZFFCI2.js → memory-ZNAEAK3B.js} +17 -17
  72. package/dist/{ollama-3XCUZMZT-FYKHW4TZ.js → ollama-3XCUZMZT-4JMH6B7P.js} +1 -1
  73. package/dist/{openai-E7G2YAHU-IG33BFYF.js → openai-E7G2YAHU-T3HMBPH7.js} +2 -2
  74. package/dist/portal-JYWVHXDU.js +210 -0
  75. package/dist/prd-Q4J5NVAR.js +408 -0
  76. package/dist/repos-WWZXNN3P.js +271 -0
  77. package/dist/review-integration-5WHEJU2A.js +14 -0
  78. package/dist/{rules-3OFGWHP4.js → rules-Y4VSOY5Y.js} +3 -3
  79. package/dist/run-VPNXEIBY.js +687 -0
  80. package/dist/server-COL4AXKU-P7S7NNF6.js +11 -0
  81. package/dist/server-KKSETHDV-XSSLEENT.js +20 -0
  82. package/dist/{skills-GY2CTPWN.js → skills-QEYU2N27.js} +4 -2
  83. package/dist/start-JYOEL7AJ.js +303 -0
  84. package/dist/{status-SE43TIFJ.js → status-BHQYYGAL.js} +2 -2
  85. package/dist/{templates-O2XDKB5R.js → templates-CBRUJ66V.js} +6 -5
  86. package/dist/tui-DP7736EX.js +61 -0
  87. package/dist/ulpi-5EN6JCAS-LFE3WSL4.js +10 -0
  88. package/dist/{uninstall-KWGSGZTI.js → uninstall-ICUV6DDV.js} +3 -3
  89. package/dist/{update-QYZA4D23.js → update-7ZMAYRBH.js} +3 -3
  90. package/dist/{version-checker-MVB74DEX.js → version-checker-4ZFMZA7Y.js} +2 -2
  91. package/package.json +39 -31
  92. package/dist/chunk-26LLDX2T.js +0 -553
  93. package/dist/chunk-DDRLI6JU.js +0 -331
  94. package/dist/chunk-IFATANHR.js +0 -453
  95. package/dist/chunk-JWUUVXIV.js +0 -13694
  96. package/dist/chunk-LD52XG3X.js +0 -4273
  97. package/dist/chunk-MIAQVCFW.js +0 -39
  98. package/dist/chunk-YYZOFYS6.js +0 -415
  99. package/dist/dist-XD4YI27T.js +0 -26
  100. package/dist/mcp-installer-TOYDP77X.js +0 -124
  101. package/dist/projects-COUJP4ZC.js +0 -271
  102. package/dist/review-KMGP2S25.js +0 -152
  103. package/dist/server-USLHY6GH-F4JSXCWA.js +0 -18
  104. package/dist/server-X5P6WH2M-ULZF5WHZ.js +0 -11
  105. package/dist/skills/ulpi-generate-guardian/SKILL.md +0 -750
  106. package/dist/skills/ulpi-generate-guardian/references/framework-rules.md +0 -849
  107. package/dist/skills/ulpi-generate-guardian/references/language-rules.md +0 -591
  108. package/dist/ui-4SM2SUI6.js +0 -167
  109. 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-DDRLI6JU.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.5";
16
+ return "0.1.6";
17
17
  } catch {
18
18
  return "0.0.0";
19
19
  }