@kud/ai-conventional-commit-cli 3.2.3 → 3.2.5

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 (51) hide show
  1. package/dist/{chunk-IWJLYYKM.js → chunk-EHJXGWTJ.js} +3 -19
  2. package/dist/index.cjs +1200 -0
  3. package/dist/index.d.cts +1 -0
  4. package/dist/index.js +59 -43
  5. package/dist/{reword-3MH2DYFS.js → reword-BKQ7K33J.js} +1 -1
  6. package/dist/{reword-3JBE7MPQ.js → reword-QQO7UBGM.js} +2 -0
  7. package/package.json +1 -1
  8. package/dist/chunk-2WRUFO3O.js +0 -689
  9. package/dist/chunk-2X3JJVRR.js +0 -639
  10. package/dist/chunk-7FBRAH4R.js +0 -643
  11. package/dist/chunk-7U4J2ORD.js +0 -614
  12. package/dist/chunk-CC3NIT53.js +0 -650
  13. package/dist/chunk-CLQ6OPLU.js +0 -668
  14. package/dist/chunk-F3BOAVBY.js +0 -122
  15. package/dist/chunk-FYJNHXAR.js +0 -700
  16. package/dist/chunk-H4W6AMGZ.js +0 -549
  17. package/dist/chunk-HJR5M6U7.js +0 -120
  18. package/dist/chunk-HOUMTU6H.js +0 -699
  19. package/dist/chunk-KEEMHNNS.js +0 -628
  20. package/dist/chunk-OLEHSPCO.js +0 -707
  21. package/dist/chunk-RHXNXVGI.js +0 -621
  22. package/dist/chunk-SNV4RWS4.js +0 -696
  23. package/dist/chunk-W7OC77AV.js +0 -649
  24. package/dist/chunk-WFXVVHL2.js +0 -645
  25. package/dist/chunk-YIXP5EWA.js +0 -545
  26. package/dist/chunk-YRVQGOVW.js +0 -649
  27. package/dist/chunk-ZLYMV2NJ.js +0 -644
  28. package/dist/config-C3S4LWLD.js +0 -12
  29. package/dist/config-RHGCFLHQ.js +0 -12
  30. package/dist/reword-2ASH5EH5.js +0 -212
  31. package/dist/reword-6EWRZ6WZ.js +0 -212
  32. package/dist/reword-CZDYMQEV.js +0 -150
  33. package/dist/reword-D5YVSCPO.js +0 -212
  34. package/dist/reword-ESY2TLBT.js +0 -212
  35. package/dist/reword-FE5N4MGV.js +0 -150
  36. package/dist/reword-IN2D2J4H.js +0 -212
  37. package/dist/reword-JRE6KAF7.js +0 -212
  38. package/dist/reword-KIR2DMTO.js +0 -212
  39. package/dist/reword-KUE3IVBE.js +0 -212
  40. package/dist/reword-LIVSGNUN.js +0 -212
  41. package/dist/reword-MCQOCOZ2.js +0 -212
  42. package/dist/reword-NGEKVTD6.js +0 -212
  43. package/dist/reword-PEOUOAT7.js +0 -212
  44. package/dist/reword-Q7MES34W.js +0 -212
  45. package/dist/reword-T44WTP5I.js +0 -212
  46. package/dist/reword-UA3EG7DK.js +0 -212
  47. package/dist/reword-UE5IP5V3.js +0 -212
  48. package/dist/reword-VKG5G6CB.js +0 -212
  49. package/dist/reword-VRH7B6BE.js +0 -205
  50. package/dist/reword-WFCNTOEU.js +0 -203
  51. package/dist/reword-XWYWVQRZ.js +0 -212
@@ -171,18 +171,7 @@ Refine now.`
171
171
 
172
172
  // src/model/provider.ts
173
173
  import { z } from "zod";
174
- import { createServer } from "net";
175
174
  import { createOpencode } from "@opencode-ai/sdk";
176
- function findFreePort() {
177
- return new Promise((resolve, reject) => {
178
- const server = createServer();
179
- server.on("error", reject);
180
- server.listen(0, "127.0.0.1", () => {
181
- const port = server.address().port;
182
- server.close(() => resolve(port));
183
- });
184
- });
185
- }
186
175
  var OpenCodeProvider = class {
187
176
  constructor(model = "github-copilot/gpt-4.1") {
188
177
  this.model = model;
@@ -221,16 +210,11 @@ ${userAggregate}`;
221
210
  const start = Date.now();
222
211
  let server;
223
212
  try {
224
- if (debug) console.error("[ai-cc][provider] starting opencode server");
225
- const port = await findFreePort();
226
- const opencode = await createOpencode({ signal: ac.signal, port });
213
+ const opencode = await createOpencode({ signal: ac.signal });
227
214
  server = opencode.server;
228
- const client = opencode.client;
215
+ const { client } = opencode;
229
216
  const session = await client.session.create({ body: { title: "aicc" } });
230
- if (!session.data) {
231
- const errMsg = session.error?.message ?? JSON.stringify(session.error) ?? "unknown";
232
- throw new Error(`Failed to create opencode session: ${errMsg}`);
233
- }
217
+ if (!session.data) throw new Error("Failed to create opencode session");
234
218
  const result = await client.session.prompt({
235
219
  path: { id: session.data.id },
236
220
  body: {