@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
@@ -1630,9 +1630,10 @@ var PipelineRuleInputSchema = external_exports.object({
1630
1630
  priority: external_exports.number().int().nonnegative().default(100)
1631
1631
  });
1632
1632
  var NotifyChannelSchema = external_exports.object({
1633
- type: external_exports.enum(["desktop", "webhook", "log", "terminal"]),
1633
+ type: external_exports.enum(["desktop", "webhook", "log", "terminal", "sound"]),
1634
1634
  sound: external_exports.boolean().optional(),
1635
1635
  sound_file: external_exports.string().optional(),
1636
+ sound_name: external_exports.string().optional(),
1636
1637
  url: external_exports.string().optional(),
1637
1638
  template: external_exports.string().optional(),
1638
1639
  path: external_exports.string().optional(),
@@ -1917,6 +1918,9 @@ function buildPermissionOutput(decision, reason, hookEventName = "PreToolUse") {
1917
1918
  }
1918
1919
  };
1919
1920
  }
1921
+ function evaluatePermission(rule) {
1922
+ return buildPermissionOutput(rule.decision, rule.message);
1923
+ }
1920
1924
  function collectPostconditions(input, rules, projectDir) {
1921
1925
  const results = [];
1922
1926
  const toolName = input.tool_name ?? "";
@@ -2153,11 +2157,53 @@ function evaluateRules(hookInput, rules, state, projectDir) {
2153
2157
  }
2154
2158
  return allowResult(matchedRules, postconditionCommands, postconditionResults);
2155
2159
  }
2160
+ function resolveVariables(template, config, input) {
2161
+ const pm = config.package_manager ?? "npm";
2162
+ const vars = {
2163
+ file_path: input?.tool_input?.file_path,
2164
+ command: input?.tool_input?.command,
2165
+ package_manager: pm,
2166
+ test_command: config.test_command ?? `${pm} test`,
2167
+ lint_command: config.lint_command ?? `${pm} lint`,
2168
+ build_command: config.build_command ?? `${pm} build`,
2169
+ format_command: config.format_command,
2170
+ project_name: config.name
2171
+ };
2172
+ return template.replace(/\{(\w+)\}/g, (_match, key) => {
2173
+ const value = vars[key];
2174
+ return value !== void 0 ? value : `{${key}}`;
2175
+ });
2176
+ }
2156
2177
 
2157
2178
  export {
2179
+ HookEventSchema,
2180
+ SessionStateFlagSchema,
2181
+ RuleSourceSchema,
2182
+ PermissionDecisionSchema,
2183
+ PipelineOnFailureSchema,
2184
+ StackConfigSchema,
2185
+ PreconditionRuleInputSchema,
2186
+ PostconditionRuleInputSchema,
2187
+ PermissionRuleInputSchema,
2188
+ PipelineStepSchema,
2189
+ PipelineRuleInputSchema,
2190
+ NotifyChannelSchema,
2191
+ EventResponseConfigSchema,
2158
2192
  ResponseConfigSchema,
2193
+ ReviewSettingsConfigSchema,
2194
+ RulesConfigSchema,
2159
2195
  parseRules,
2160
2196
  loadRulesSync,
2197
+ matchesTool,
2198
+ normalizePath,
2161
2199
  matchesFilePattern,
2162
- evaluateRules
2200
+ matchesCommand,
2201
+ isDangerousCommand,
2202
+ checkPrecondition,
2203
+ buildPermissionOutput,
2204
+ evaluatePermission,
2205
+ collectPostconditions,
2206
+ checkPipelinePrereqs,
2207
+ evaluateRules,
2208
+ resolveVariables
2163
2209
  };
@@ -1,4 +1,4 @@
1
- // ../../packages/codemap-engine/dist/chunk-RU4VHMIP.js
1
+ // ../../packages/embed-engine/dist/chunk-RU4VHMIP.js
2
2
  var DEFAULT_OLLAMA_URL = "http://localhost:11434";
3
3
  var MAX_RETRIES = 3;
4
4
  var RETRY_BASE_MS = 500;
@@ -0,0 +1,221 @@
1
+ import {
2
+ external_exports
3
+ } from "./chunk-KIKPIH6N.js";
4
+
5
+ // ../../packages/ci-engine/dist/index.js
6
+ import * as fs4 from "fs";
7
+ import * as path3 from "path";
8
+ import { execFileSync as execFileSync2 } from "child_process";
9
+ var GITHUB_API = "https://api.github.com";
10
+ async function githubFetch(path4, token, options) {
11
+ const url = `${GITHUB_API}${path4}`;
12
+ const res = await fetch(url, {
13
+ ...options,
14
+ headers: {
15
+ Accept: "application/vnd.github+json",
16
+ Authorization: `Bearer ${token}`,
17
+ "X-GitHub-Api-Version": "2022-11-28",
18
+ ...options?.headers ?? {}
19
+ }
20
+ });
21
+ if (!res.ok) {
22
+ const body = await res.text().catch(() => "");
23
+ throw new Error(
24
+ `GitHub API ${res.status}: ${path4} - ${body.slice(0, 200)}`
25
+ );
26
+ }
27
+ return res;
28
+ }
29
+ function extractDescription(desc) {
30
+ if (typeof desc === "string") return desc;
31
+ if (!desc || typeof desc !== "object") return void 0;
32
+ try {
33
+ return extractAdfText(desc);
34
+ } catch {
35
+ return void 0;
36
+ }
37
+ }
38
+ function extractAdfText(node) {
39
+ if (node.type === "text") return node.text ?? "";
40
+ const content = node.content;
41
+ if (!content) return "";
42
+ return content.map(extractAdfText).join("").trim();
43
+ }
44
+ function buildPrompt(config, context) {
45
+ const sections = [];
46
+ sections.push("# Task");
47
+ sections.push("");
48
+ sections.push(config.instruction);
49
+ sections.push("");
50
+ if (context.prTitle || context.prBody) {
51
+ sections.push("# Pull Request Context");
52
+ sections.push("");
53
+ if (context.prTitle) sections.push(`**Title:** ${context.prTitle}`);
54
+ if (context.prBody) {
55
+ sections.push("");
56
+ sections.push(context.prBody);
57
+ }
58
+ sections.push("");
59
+ }
60
+ sections.push("# Branch Info");
61
+ sections.push("");
62
+ sections.push(`- **Working branch:** ${config.ref}`);
63
+ sections.push(`- **Base branch:** ${config.baseBranch}`);
64
+ sections.push(`- **Repository:** ${config.repoFullName}`);
65
+ sections.push("");
66
+ if (config.jiraContext || context.jiraContext) {
67
+ sections.push("# Jira Context");
68
+ sections.push("");
69
+ sections.push(config.jiraContext ?? context.jiraContext ?? "");
70
+ sections.push("");
71
+ }
72
+ sections.push("# Workflow: Plan \u2192 Execute");
73
+ sections.push("");
74
+ sections.push("You MUST follow this two-phase workflow:");
75
+ sections.push("");
76
+ sections.push("## Phase 1: Plan");
77
+ sections.push("");
78
+ sections.push("1. **Discover skills**: Scan `.claude/skills/*/SKILL.md` for available skills. If a `start` skill exists, follow its protocol.");
79
+ sections.push("2. **Use `plan-enhanced`**: If the repo has a `.claude/skills/plan-enhanced/SKILL.md` skill, use it to create a structured plan. The plan must include:");
80
+ sections.push(" - Task breakdown with scope and estimated files");
81
+ sections.push(" - Dependency graph between tasks");
82
+ sections.push(" - Parallelizability score");
83
+ sections.push(" - Agent assignment for each task (match domain to `.claude/agents/` \u2014 e.g. `express-senior-engineer`, `react-vite-tailwind-engineer`, `nodejs-cli-senior-engineer`)");
84
+ sections.push(" - Agent briefs with scope, files, output, and success criteria");
85
+ sections.push("3. **Write plan to file**: Save the plan as `plan.md` in the repo root and commit it. Do NOT just output text.");
86
+ sections.push("");
87
+ sections.push("## Phase 2: Execute");
88
+ sections.push("");
89
+ sections.push("4. **Launch agents from the plan**: Read the plan file and spawn the assigned agents via the Task tool. Launch independent streams in parallel (multiple Task tool calls in one message). Sequential tasks run after their dependencies complete.");
90
+ sections.push("5. **Commit results**: After agents finish, use the `/commit` skill to commit all changes. This skill analyzes diffs and creates proper conventional commit messages.");
91
+ sections.push("6. **Run tests**: If a test runner is configured, run tests and fix failures.");
92
+ sections.push("");
93
+ sections.push("If the task is simple (1\u20132 files, single domain), skip `plan-enhanced` and execute directly with the matching agent.");
94
+ sections.push("");
95
+ if (context.stackContext) {
96
+ sections.push("# Project Stack");
97
+ sections.push("");
98
+ sections.push(context.stackContext);
99
+ sections.push("");
100
+ }
101
+ sections.push("# CI Constraints");
102
+ sections.push("");
103
+ sections.push("- You are running in CI mode inside a worker container.");
104
+ sections.push("- **Commit early and often.** After completing each logical unit of work (a feature, a module, a batch of related files), commit immediately with `git add` + `git commit`. Do NOT wait until the end to commit everything at once. Use conventional commit messages (e.g. `feat:`, `fix:`, `chore:`).");
105
+ sections.push("- Work on the existing branch \u2014 do NOT create new branches.");
106
+ sections.push("- Do NOT push to the remote \u2014 the orchestrator will handle pushing.");
107
+ sections.push("");
108
+ sections.push("# Prohibited Actions");
109
+ sections.push("");
110
+ sections.push("The following are STRICTLY FORBIDDEN in CI mode:");
111
+ sections.push("- **No `npm install`, `npm init`, `npx create-*`, `yarn add`, `pnpm add`, or any package installation commands.** Dependencies must be declared in package.json and committed \u2014 never installed at runtime.");
112
+ sections.push("- **No scaffolding tools** (`create-next-app`, `create-react-app`, `express-generator`, etc.). Write files directly.");
113
+ sections.push("- **No documentation directories** (`docs/`, `guides/`, `examples/`) unless explicitly requested in the task.");
114
+ sections.push("- **No infrastructure/DevOps files** (`Dockerfile`, `docker-compose.yml`, `nginx.conf`, `Makefile`, CI/CD pipelines, monitoring configs) unless explicitly requested.");
115
+ sections.push("- **No `.env` or `.env.example` files** unless explicitly requested.");
116
+ sections.push("- **Minimize TodoWrite** \u2014 use it at most once to set up your task list, not repeatedly during execution.");
117
+ sections.push("");
118
+ sections.push("# Code Quality");
119
+ sections.push("");
120
+ sections.push("- **Always use TypeScript (`.ts`/`.tsx`)** for all application code. Never write `.js` files except for config files that require it (e.g. `tailwind.config.js`, `postcss.config.js`).");
121
+ sections.push("- Write production code directly \u2014 no placeholder implementations, no TODO comments, no stub functions.");
122
+ sections.push("- Focus exclusively on what the task asks for. Do not add extras (monitoring, logging infrastructure, CI/CD, documentation) unless the task explicitly requires them.");
123
+ sections.push("- Keep solutions minimal and focused. Three files that work are better than twenty files of scaffolding.");
124
+ sections.push("");
125
+ return sections.join("\n");
126
+ }
127
+ var CREDENTIAL_FILES = [
128
+ "oauth_token",
129
+ ".credentials.json",
130
+ "credentials.json",
131
+ "auth.json"
132
+ ];
133
+ function extractCredentials(claudeConfigDir) {
134
+ const configDir = claudeConfigDir ?? path3.join(process.env.HOME ?? "", ".claude");
135
+ if (!fs4.existsSync(configDir)) {
136
+ throw new Error(
137
+ `Claude config directory not found: ${configDir}`
138
+ );
139
+ }
140
+ const existingFiles = CREDENTIAL_FILES.filter(
141
+ (f) => fs4.existsSync(path3.join(configDir, f))
142
+ );
143
+ if (existingFiles.length === 0) {
144
+ throw new Error(
145
+ `No credential files found in ${configDir}. Run 'claude login' first.`
146
+ );
147
+ }
148
+ const tarOutput = execFileSync2(
149
+ "tar",
150
+ ["-czf", "-", "-C", configDir, ...existingFiles],
151
+ {
152
+ encoding: "buffer",
153
+ timeout: 3e4,
154
+ maxBuffer: 10 * 1024 * 1024
155
+ // 10MB limit (credentials are tiny)
156
+ }
157
+ );
158
+ return tarOutput.toString("base64");
159
+ }
160
+ function writeCredentials(blob, targetDir) {
161
+ fs4.mkdirSync(targetDir, { recursive: true });
162
+ const tarBuffer = Buffer.from(blob, "base64");
163
+ execFileSync2("tar", ["-xzf", "-", "-C", targetDir], {
164
+ input: tarBuffer,
165
+ timeout: 3e4
166
+ });
167
+ }
168
+ function validateCredentials(blob) {
169
+ const tmpDir = fs4.mkdtempSync("/tmp/ulpi-claude-check-");
170
+ try {
171
+ writeCredentials(blob, tmpDir);
172
+ const files = fs4.readdirSync(tmpDir);
173
+ return files.length > 0;
174
+ } catch {
175
+ return false;
176
+ } finally {
177
+ try {
178
+ fs4.rmSync(tmpDir, { recursive: true, force: true });
179
+ } catch {
180
+ }
181
+ }
182
+ }
183
+ function getCredentialExpiry(blob) {
184
+ const tmpDir = fs4.mkdtempSync("/tmp/ulpi-claude-expiry-");
185
+ try {
186
+ writeCredentials(blob, tmpDir);
187
+ const authFile = path3.join(tmpDir, ".credentials.json");
188
+ if (fs4.existsSync(authFile)) {
189
+ try {
190
+ const data = JSON.parse(
191
+ fs4.readFileSync(authFile, "utf-8")
192
+ );
193
+ if (data.expiresAt) return data.expiresAt;
194
+ if (data.expires_at) return data.expires_at;
195
+ } catch {
196
+ }
197
+ }
198
+ return void 0;
199
+ } finally {
200
+ try {
201
+ fs4.rmSync(tmpDir, { recursive: true, force: true });
202
+ } catch {
203
+ }
204
+ }
205
+ }
206
+ var PlanTierSchema = external_exports.enum([
207
+ "free",
208
+ "starter",
209
+ "pro",
210
+ "team",
211
+ "enterprise"
212
+ ]);
213
+
214
+ export {
215
+ githubFetch,
216
+ extractDescription,
217
+ buildPrompt,
218
+ extractCredentials,
219
+ validateCredentials,
220
+ getCredentialExpiry
221
+ };
@@ -3,7 +3,7 @@ import {
3
3
  depgraphGraphFile,
4
4
  depgraphMetricsFile,
5
5
  depgraphPagerankFile
6
- } from "./chunk-7LXY5UVC.js";
6
+ } from "./chunk-C7CLUQI6.js";
7
7
 
8
8
  // ../../packages/depgraph-engine/dist/index.js
9
9
  import { mkdirSync, readFileSync, writeFileSync } from "fs";