@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,20 @@
1
+ import {
2
+ createApiServer
3
+ } from "./chunk-VXH5Y4FO.js";
4
+ import "./chunk-4XTHZVDS.js";
5
+ import "./chunk-Z53CAR7G.js";
6
+ import "./chunk-JLHNLM3C.js";
7
+ import "./chunk-3BCW6ABU.js";
8
+ import "./chunk-UXHCHOWQ.js";
9
+ import "./chunk-4ZPOZULQ.js";
10
+ import "./chunk-5MI5GIXM.js";
11
+ import "./chunk-RSFJ6QSR.js";
12
+ import "./chunk-3WB5CXH4.js";
13
+ import "./chunk-SEU7WWNQ.js";
14
+ import "./chunk-C7CLUQI6.js";
15
+ import "./chunk-YOKL7RB5.js";
16
+ import "./chunk-KIKPIH6N.js";
17
+ import "./chunk-4VNS5WPM.js";
18
+ export {
19
+ createApiServer
20
+ };
@@ -1,7 +1,9 @@
1
1
  import {
2
2
  loadSkillSync
3
- } from "./chunk-IFATANHR.js";
4
- import "./chunk-DDRLI6JU.js";
3
+ } from "./chunk-4ZPOZULQ.js";
4
+ import "./chunk-C7CLUQI6.js";
5
+ import "./chunk-YOKL7RB5.js";
6
+ import "./chunk-KIKPIH6N.js";
5
7
  import "./chunk-4VNS5WPM.js";
6
8
 
7
9
  // src/commands/skills.ts
@@ -0,0 +1,303 @@
1
+ import {
2
+ createApiServer
3
+ } from "./chunk-VXH5Y4FO.js";
4
+ import "./chunk-4XTHZVDS.js";
5
+ import {
6
+ attachWebSocket
7
+ } from "./chunk-E3B5NROU.js";
8
+ import {
9
+ generateApiSecret,
10
+ setApiSecret
11
+ } from "./chunk-Z53CAR7G.js";
12
+ import "./chunk-JLHNLM3C.js";
13
+ import "./chunk-3BCW6ABU.js";
14
+ import "./chunk-UXHCHOWQ.js";
15
+ import "./chunk-4ZPOZULQ.js";
16
+ import "./chunk-5MI5GIXM.js";
17
+ import "./chunk-RSFJ6QSR.js";
18
+ import "./chunk-3WB5CXH4.js";
19
+ import "./chunk-SEU7WWNQ.js";
20
+ import {
21
+ API_LOCK_FILE,
22
+ getApiHost,
23
+ getApiPort
24
+ } from "./chunk-C7CLUQI6.js";
25
+ import "./chunk-YOKL7RB5.js";
26
+ import "./chunk-KIKPIH6N.js";
27
+ import "./chunk-4VNS5WPM.js";
28
+
29
+ // src/commands/start.ts
30
+ import * as fs2 from "fs";
31
+ import * as path2 from "path";
32
+ import { fileURLToPath } from "url";
33
+ import { spawn } from "child_process";
34
+ import chalk from "chalk";
35
+
36
+ // ../api/dist/index.js
37
+ import * as fs from "fs";
38
+ import * as path from "path";
39
+ function writeApiLockFile(port, secret) {
40
+ try {
41
+ const dir = path.dirname(API_LOCK_FILE);
42
+ fs.mkdirSync(dir, { recursive: true });
43
+ const lockData = { port, pid: process.pid, startedAt: (/* @__PURE__ */ new Date()).toISOString() };
44
+ if (secret) lockData.secret = secret;
45
+ fs.writeFileSync(API_LOCK_FILE, JSON.stringify(lockData), { encoding: "utf-8", mode: 384 });
46
+ } catch {
47
+ }
48
+ }
49
+ function removeApiLockFile() {
50
+ try {
51
+ fs.unlinkSync(API_LOCK_FILE);
52
+ } catch {
53
+ }
54
+ }
55
+ async function main() {
56
+ const { getApiPort: getApiPort2, getApiHost: getApiHost2 } = await import("./dist-NUXMDXZ3.js");
57
+ const { generateApiSecret: generateApiSecret2, setApiSecret: setApiSecret2 } = await import("./auth-FWM7MM4Q-VZC3U2XZ.js");
58
+ const port = getApiPort2();
59
+ const host = getApiHost2();
60
+ const projectDir = process.argv[2] || process.cwd();
61
+ const secret = generateApiSecret2();
62
+ setApiSecret2(secret);
63
+ const { createApiServer: createApiServer2 } = await import("./server-KKSETHDV-XSSLEENT.js");
64
+ const { attachWebSocket: attachWebSocket2 } = await import("./server-COL4AXKU-P7S7NNF6.js");
65
+ const server = createApiServer2(projectDir);
66
+ const wss = attachWebSocket2(server, projectDir);
67
+ const shutdown = () => {
68
+ console.log("\nShutting down ULPI API server...");
69
+ removeApiLockFile();
70
+ for (const client of wss.clients) {
71
+ client.close();
72
+ }
73
+ wss.close();
74
+ server.close(() => {
75
+ console.log("Server stopped.");
76
+ process.exit(0);
77
+ });
78
+ setTimeout(() => process.exit(0), 5e3).unref();
79
+ };
80
+ process.on("SIGTERM", shutdown);
81
+ process.on("SIGINT", shutdown);
82
+ server.listen(port, host, () => {
83
+ writeApiLockFile(port, secret);
84
+ console.log(`ULPI API server running at http://${host}:${port}`);
85
+ console.log(` WebSocket: ws://${host}:${port}/ws`);
86
+ console.log(` API: http://${host}:${port}/api/health`);
87
+ console.log(` Project: ${projectDir}`);
88
+ });
89
+ }
90
+ if (process.env.ULPI_API_STANDALONE === "1") {
91
+ main().catch((err) => {
92
+ console.error(
93
+ "Fatal:",
94
+ err instanceof Error ? err.message : String(err)
95
+ );
96
+ process.exit(1);
97
+ });
98
+ }
99
+
100
+ // src/commands/start.ts
101
+ var __filename = fileURLToPath(import.meta.url);
102
+ var __dirname = path2.dirname(__filename);
103
+ function findPortalDir() {
104
+ const candidates = [
105
+ // apps/cli/dist/ → ../../portal (sibling app in apps/)
106
+ path2.resolve(__dirname, "..", "..", "portal"),
107
+ // From cwd
108
+ path2.join(process.cwd(), "apps", "portal")
109
+ ];
110
+ for (const candidate of candidates) {
111
+ if (fs2.existsSync(path2.join(candidate, "package.json"))) {
112
+ try {
113
+ const pkg = JSON.parse(fs2.readFileSync(path2.join(candidate, "package.json"), "utf-8"));
114
+ if (pkg.name === "@ulpi/portal") return candidate;
115
+ } catch {
116
+ }
117
+ }
118
+ }
119
+ return null;
120
+ }
121
+ function findNextBinary(portalDir) {
122
+ const localNext = path2.join(portalDir, "node_modules", ".bin", "next");
123
+ if (fs2.existsSync(localNext)) return localNext;
124
+ return null;
125
+ }
126
+ function spawnPortal(portalDir, apiPort, secret, portalPort) {
127
+ const nextBin = findNextBinary(portalDir);
128
+ if (!nextBin) return null;
129
+ const nextCommand = "dev";
130
+ const child = spawn(nextBin, [nextCommand, "--port", String(portalPort)], {
131
+ cwd: portalDir,
132
+ env: {
133
+ ...process.env,
134
+ ULPI_MODE: "local",
135
+ NEXT_PUBLIC_ULPI_MODE: "local",
136
+ NEXT_PUBLIC_API_URL: `http://localhost:${apiPort}`,
137
+ NEXT_PUBLIC_ULPI_API_SECRET: secret,
138
+ PORT: String(portalPort)
139
+ },
140
+ stdio: ["ignore", "pipe", "pipe"]
141
+ });
142
+ child.stdout?.on("data", (data) => {
143
+ const line = data.toString().trim();
144
+ if (line) console.log(chalk.dim(`[portal] ${line}`));
145
+ });
146
+ child.stderr?.on("data", (data) => {
147
+ const line = data.toString().trim();
148
+ if (line && !line.includes("ExperimentalWarning")) {
149
+ console.log(chalk.dim(`[portal] ${line}`));
150
+ }
151
+ });
152
+ return child;
153
+ }
154
+ async function runStart(args, projectDir) {
155
+ const noPortal = args.includes("--no-portal");
156
+ const portIndex = args.indexOf("--port");
157
+ let port = getApiPort();
158
+ if (portIndex !== -1 && args[portIndex + 1]) {
159
+ const parsed = parseInt(args[portIndex + 1], 10);
160
+ if (isNaN(parsed) || parsed < 1 || parsed > 65535) {
161
+ console.log(chalk.red("Invalid port number. Must be between 1 and 65535."));
162
+ process.exit(1);
163
+ }
164
+ port = parsed;
165
+ }
166
+ const portalPortIndex = args.indexOf("--portal-port");
167
+ let portalPort = port + 1;
168
+ if (portalPortIndex !== -1 && args[portalPortIndex + 1]) {
169
+ const parsed = parseInt(args[portalPortIndex + 1], 10);
170
+ if (!isNaN(parsed) && parsed >= 1 && parsed <= 65535) {
171
+ portalPort = parsed;
172
+ }
173
+ }
174
+ const host = getApiHost();
175
+ try {
176
+ const secret = generateApiSecret();
177
+ setApiSecret(secret);
178
+ const server = createApiServer(projectDir);
179
+ const wss = attachWebSocket(server, projectDir);
180
+ let codemapWatcherStarted = false;
181
+ try {
182
+ const { getCodemapStatus, CodemapWatcher } = await import("./dist-YFFG2ZD6.js");
183
+ const status = getCodemapStatus(projectDir);
184
+ if (status.initialized) {
185
+ const watcher = new CodemapWatcher({ projectDir });
186
+ await watcher.start();
187
+ codemapWatcherStarted = true;
188
+ }
189
+ } catch {
190
+ }
191
+ let memoryEnabled = false;
192
+ try {
193
+ const { loadMemoryConfig } = await import("./dist-JLU26AB6.js");
194
+ const memConfig = loadMemoryConfig(projectDir);
195
+ if (memConfig.enabled) {
196
+ memoryEnabled = true;
197
+ }
198
+ } catch {
199
+ }
200
+ let mcpCount = 0;
201
+ try {
202
+ const mcpJsonPath = path2.join(projectDir, ".mcp.json");
203
+ if (fs2.existsSync(mcpJsonPath)) {
204
+ const mcpJson = JSON.parse(fs2.readFileSync(mcpJsonPath, "utf-8"));
205
+ const servers = mcpJson.mcpServers;
206
+ if (servers) {
207
+ mcpCount = Object.keys(servers).length;
208
+ }
209
+ }
210
+ } catch {
211
+ }
212
+ let historyReady = false;
213
+ try {
214
+ const { historyBranchExists, initHistoryBranch } = await import("./dist-YCNWHSLN.js");
215
+ if (await historyBranchExists(projectDir)) {
216
+ historyReady = true;
217
+ } else {
218
+ const projectName = path2.basename(projectDir);
219
+ await initHistoryBranch(projectDir, projectName, "0.1.6");
220
+ historyReady = true;
221
+ }
222
+ } catch {
223
+ }
224
+ let portalChild = null;
225
+ if (!noPortal) {
226
+ const portalDir = findPortalDir();
227
+ if (portalDir) {
228
+ portalChild = spawnPortal(portalDir, port, secret, portalPort);
229
+ if (portalChild) {
230
+ portalChild.on("error", () => {
231
+ portalChild = null;
232
+ });
233
+ portalChild.on("close", () => {
234
+ portalChild = null;
235
+ });
236
+ }
237
+ }
238
+ }
239
+ const shutdown = () => {
240
+ console.log("\nShutting down ULPI daemon...");
241
+ removeApiLockFile();
242
+ if (portalChild) {
243
+ portalChild.kill("SIGTERM");
244
+ }
245
+ for (const client of wss.clients) {
246
+ client.close();
247
+ }
248
+ wss.close();
249
+ server.close(() => {
250
+ console.log("Daemon stopped.");
251
+ process.exit(0);
252
+ });
253
+ setTimeout(() => process.exit(0), 5e3).unref();
254
+ };
255
+ process.on("SIGTERM", shutdown);
256
+ process.on("SIGINT", shutdown);
257
+ await new Promise((resolve2, reject) => {
258
+ server.on("error", (err) => {
259
+ if (err.code === "EADDRINUSE") {
260
+ console.error(
261
+ `Port ${port} is already in use. Try a different port with --port.`
262
+ );
263
+ }
264
+ reject(err);
265
+ });
266
+ server.listen(port, host, () => {
267
+ writeApiLockFile(port, secret);
268
+ console.log(chalk.bold(`
269
+ ULPI Daemon`));
270
+ console.log(chalk.dim("\u2500".repeat(40)));
271
+ console.log(` API: ${chalk.cyan(`http://${host}:${port}`)}`);
272
+ console.log(` WebSocket: ${chalk.cyan(`ws://${host}:${port}/ws`)}`);
273
+ if (portalChild) {
274
+ console.log(` Portal: ${chalk.cyan(`http://localhost:${portalPort}`)}`);
275
+ }
276
+ console.log(` Health: ${chalk.dim(`http://${host}:${port}/api/health`)}`);
277
+ console.log(` Project: ${chalk.dim(projectDir)}`);
278
+ console.log(` PID: ${chalk.dim(String(process.pid))}`);
279
+ console.log(chalk.dim("\u2500".repeat(40)));
280
+ console.log(` CodeMap: ${codemapWatcherStarted ? chalk.green("watcher running") : chalk.yellow("not indexed")}`);
281
+ console.log(` Memory: ${memoryEnabled ? chalk.green("enabled") : chalk.yellow("disabled")}`);
282
+ console.log(` History: ${historyReady ? chalk.green("ready") : chalk.yellow("not initialized")}`);
283
+ console.log(` Portal: ${portalChild ? chalk.green("running") : chalk.yellow("not available")}`);
284
+ console.log(` MCPs: ${mcpCount > 0 ? chalk.green(`${mcpCount} registered`) : chalk.yellow("none")}`);
285
+ console.log(chalk.dim("\u2500".repeat(40)));
286
+ console.log(`
287
+ Press Ctrl+C to stop.
288
+ `);
289
+ resolve2();
290
+ });
291
+ });
292
+ } catch (err) {
293
+ console.error(
294
+ chalk.red(
295
+ `Failed to start daemon: ${err instanceof Error ? err.message : String(err)}`
296
+ )
297
+ );
298
+ process.exit(1);
299
+ }
300
+ }
301
+ export {
302
+ runStart
303
+ };
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  JsonSessionStore
3
- } from "./chunk-26LLDX2T.js";
4
- import "./chunk-DDRLI6JU.js";
3
+ } from "./chunk-SEU7WWNQ.js";
4
+ import "./chunk-C7CLUQI6.js";
5
5
  import "./chunk-4VNS5WPM.js";
6
6
 
7
7
  // src/commands/status.ts
@@ -1,6 +1,3 @@
1
- import {
2
- loadRulesSync
3
- } from "./chunk-SIAQVRKG.js";
4
1
  import {
5
2
  deleteUserTemplate,
6
3
  exportUserTemplate,
@@ -8,9 +5,13 @@ import {
8
5
  listUserTemplates,
9
6
  loadBundledTemplates,
10
7
  saveUserTemplate
11
- } from "./chunk-IFATANHR.js";
8
+ } from "./chunk-4ZPOZULQ.js";
9
+ import {
10
+ loadRulesSync
11
+ } from "./chunk-5MI5GIXM.js";
12
+ import "./chunk-C7CLUQI6.js";
13
+ import "./chunk-YOKL7RB5.js";
12
14
  import "./chunk-KIKPIH6N.js";
13
- import "./chunk-DDRLI6JU.js";
14
15
  import "./chunk-4VNS5WPM.js";
15
16
 
16
17
  // src/commands/templates.ts
@@ -0,0 +1,61 @@
1
+ import "./chunk-4VNS5WPM.js";
2
+
3
+ // src/commands/tui.ts
4
+ import { execFileSync, execSync } from "child_process";
5
+ import { resolve, dirname } from "path";
6
+ import { existsSync } from "fs";
7
+ import { fileURLToPath } from "url";
8
+ import chalk from "chalk";
9
+ function isBunInstalled() {
10
+ try {
11
+ execFileSync("bun", ["--version"], { stdio: "ignore" });
12
+ return true;
13
+ } catch {
14
+ return false;
15
+ }
16
+ }
17
+ function installBun() {
18
+ console.log(chalk.yellow("Bun runtime required for TUI. Installing..."));
19
+ if (process.platform !== "win32") {
20
+ try {
21
+ execSync("curl -fsSL https://bun.sh/install | bash", {
22
+ stdio: "inherit",
23
+ shell: process.env.SHELL || "/bin/sh"
24
+ });
25
+ console.log(chalk.green("Bun installed successfully."));
26
+ return true;
27
+ } catch {
28
+ }
29
+ }
30
+ try {
31
+ execFileSync("npm", ["install", "-g", "bun"], { stdio: "inherit" });
32
+ console.log(chalk.green("Bun installed successfully via npm."));
33
+ return true;
34
+ } catch {
35
+ console.log(chalk.red("Failed to install Bun. Install manually: https://bun.sh"));
36
+ return false;
37
+ }
38
+ }
39
+ function runTuiCommand(args, _projectDir) {
40
+ if (!isBunInstalled()) {
41
+ if (!installBun()) {
42
+ process.exit(1);
43
+ }
44
+ }
45
+ const cliDir = dirname(fileURLToPath(import.meta.url));
46
+ const tuiEntry = resolve(cliDir, "../../tui/dist/index.js");
47
+ if (!existsSync(tuiEntry)) {
48
+ console.log(chalk.red("TUI not built. Run: pnpm --filter @ulpi/tui build"));
49
+ process.exit(1);
50
+ }
51
+ try {
52
+ execFileSync("bun", ["run", tuiEntry, ...args], {
53
+ stdio: "inherit",
54
+ env: process.env
55
+ });
56
+ } catch {
57
+ }
58
+ }
59
+ export {
60
+ runTuiCommand
61
+ };
@@ -0,0 +1,10 @@
1
+ import {
2
+ BATCH_POLL_INTERVAL_MS,
3
+ UlpiEmbedder
4
+ } from "./chunk-TSLDGT5O.js";
5
+ import "./chunk-C7CLUQI6.js";
6
+ import "./chunk-4VNS5WPM.js";
7
+ export {
8
+ BATCH_POLL_INTERVAL_MS,
9
+ UlpiEmbedder
10
+ };
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  uninstallHooks
3
- } from "./chunk-5SCG7UYM.js";
4
- import "./chunk-DDRLI6JU.js";
3
+ } from "./chunk-VVEDXI7E.js";
4
+ import "./chunk-C7CLUQI6.js";
5
5
  import "./chunk-4VNS5WPM.js";
6
6
 
7
7
  // src/commands/uninstall.ts
@@ -11,7 +11,7 @@ async function runUninstall(_args, projectDir) {
11
11
  uninstallHooks(projectDir);
12
12
  console.log(chalk.green("\u2713 Hooks removed from .claude/settings.json"));
13
13
  try {
14
- const { isSupported, isLaunchAgentInstalled, uninstallLaunchAgent } = await import("./launchd-OYXUAVW6.js");
14
+ const { isSupported, isLaunchAgentInstalled, uninstallLaunchAgent } = await import("./launchd-6AWT54HR.js");
15
15
  if (isSupported() && isLaunchAgentInstalled()) {
16
16
  uninstallLaunchAgent();
17
17
  console.log(chalk.green("\u2713 Removed LaunchAgent for UI server"));
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  checkForUpdates
3
- } from "./chunk-P2RESJRN.js";
3
+ } from "./chunk-KYYI23AQ.js";
4
4
  import {
5
5
  CLI_BIN_NAME,
6
6
  CLI_NPM_PACKAGE
7
- } from "./chunk-DDRLI6JU.js";
7
+ } from "./chunk-C7CLUQI6.js";
8
8
  import "./chunk-4VNS5WPM.js";
9
9
 
10
10
  // src/commands/update.ts
@@ -36,7 +36,7 @@ Run '${CLI_BIN_NAME} update' to install the update.`));
36
36
  console.log(chalk.green(`
37
37
  \u2713 Updated to v${info.latest}`));
38
38
  try {
39
- const { isSupported, isLaunchAgentInstalled, needsLegacyMigration, installLaunchAgent, restartLaunchAgent } = await import("./launchd-OYXUAVW6.js");
39
+ const { isSupported, isLaunchAgentInstalled, needsLegacyMigration, installLaunchAgent, restartLaunchAgent } = await import("./launchd-6AWT54HR.js");
40
40
  if (isSupported()) {
41
41
  if (needsLegacyMigration()) {
42
42
  installLaunchAgent();
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  checkForUpdates,
3
3
  getCurrentVersion
4
- } from "./chunk-P2RESJRN.js";
5
- import "./chunk-DDRLI6JU.js";
4
+ } from "./chunk-KYYI23AQ.js";
5
+ import "./chunk-C7CLUQI6.js";
6
6
  import "./chunk-4VNS5WPM.js";
7
7
  export {
8
8
  checkForUpdates,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ulpi/cli",
3
- "version": "0.1.5",
3
+ "version": "0.1.6",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "ulpi": "./dist/index.js"
@@ -12,16 +12,9 @@
12
12
  "dist/templates/**",
13
13
  "README.md"
14
14
  ],
15
- "scripts": {
16
- "build": "tsup",
17
- "prepack": "rm -rf dist && tsup",
18
- "dev": "tsup src/index.ts --format esm --watch",
19
- "test": "vitest",
20
- "clean": "rm -rf dist",
21
- "lint": "tsc --noEmit"
22
- },
23
15
  "dependencies": {
24
16
  "@lancedb/lancedb": "^0.16.0",
17
+ "@modelcontextprotocol/sdk": "^1.12.0",
25
18
  "chalk": "^5.4.0",
26
19
  "ora": "^8.2.0",
27
20
  "tree-sitter-c": "^0.24.1",
@@ -46,30 +39,38 @@
46
39
  "yaml": "^2.7.0"
47
40
  },
48
41
  "devDependencies": {
49
- "@ulpi/contracts": "workspace:*",
50
- "@ulpi/config": "workspace:*",
51
- "@ulpi/guards-engine": "workspace:*",
52
- "@ulpi/session-engine": "workspace:*",
53
- "@ulpi/stack-engine": "workspace:*",
54
- "@ulpi/templates-engine": "workspace:*",
55
- "@ulpi/notifications-engine": "workspace:*",
56
- "@ulpi/projects-engine": "workspace:*",
57
- "@ulpi/history-engine": "workspace:*",
58
- "@ulpi/review-engine": "workspace:*",
59
- "@ulpi/review-runtime": "workspace:*",
60
- "@ulpi/codemap-engine": "workspace:*",
61
- "@ulpi/depgraph-engine": "workspace:*",
62
- "@ulpi/codemap-mcp": "workspace:*",
63
- "@ulpi/memory-engine": "workspace:*",
64
- "@ulpi/memory-mcp": "workspace:*",
65
- "@ulpi/contracts-ci": "workspace:*",
66
- "@ulpi/ci-engine": "workspace:*",
67
- "@ulpi/api": "workspace:*",
68
42
  "@types/node": "^25.2.0",
69
43
  "@types/ws": "^8.5.0",
70
44
  "tsup": "^8.4.0",
71
45
  "typescript": "^5.7.0",
72
- "vitest": "^3.0.0"
46
+ "vitest": "^3.0.0",
47
+ "@ulpi/contracts": "0.1.0",
48
+ "@ulpi/guards-engine": "0.1.0",
49
+ "@ulpi/agent-installer": "0.1.0",
50
+ "@ulpi/agent-converter": "0.1.0",
51
+ "@ulpi/config": "0.1.0",
52
+ "@ulpi/session-engine": "0.1.0",
53
+ "@ulpi/stack-engine": "0.1.0",
54
+ "@ulpi/notifications-engine": "0.1.0",
55
+ "@ulpi/templates-engine": "0.1.0",
56
+ "@ulpi/repos-engine": "0.1.0",
57
+ "@ulpi/codemap-engine": "0.1.0",
58
+ "@ulpi/history-engine": "0.1.0",
59
+ "@ulpi/depgraph-engine": "0.1.0",
60
+ "@ulpi/memory-engine": "0.1.0",
61
+ "@ulpi/codemap-mcp": "0.1.0",
62
+ "@ulpi/memory-mcp": "0.1.0",
63
+ "@ulpi/contracts-ci": "0.1.0",
64
+ "@ulpi/review-runtime": "0.1.0",
65
+ "@ulpi/ci-engine": "0.1.0",
66
+ "@ulpi/prd-engine": "0.1.0",
67
+ "@ulpi/agent-plugins": "0.1.0",
68
+ "@ulpi/loop-engine": "0.1.0",
69
+ "@ulpi/parallel-engine": "0.1.0",
70
+ "@ulpi/mcp-gateway": "0.1.0",
71
+ "@ulpi/tracker-engine": "0.1.0",
72
+ "@ulpi/api": "0.1.0",
73
+ "@ulpi/mcp-gateway-engine": "0.1.0"
73
74
  },
74
75
  "publishConfig": {
75
76
  "access": "public"
@@ -91,5 +92,12 @@
91
92
  "ulpi",
92
93
  "cli"
93
94
  ],
94
- "license": "MIT"
95
- }
95
+ "license": "MIT",
96
+ "scripts": {
97
+ "build": "tsup",
98
+ "dev": "tsup src/index.ts --format esm --watch",
99
+ "test": "vitest",
100
+ "clean": "rm -rf dist",
101
+ "lint": "tsc --noEmit"
102
+ }
103
+ }