vibeman 0.0.7 → 0.0.9

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 (193) hide show
  1. package/dist/api.js +97867 -35
  2. package/dist/commit.txt +1 -0
  3. package/dist/index.js +151 -119
  4. package/dist/prisma/migrations/20260105000737_init/migration.sql +127 -0
  5. package/dist/prisma/migrations/20260105041541/migration.sql +30 -0
  6. package/dist/prisma/migrations/20260126143041_rename/migration.sql +152 -0
  7. package/dist/prisma/migrations/20260130233931_add_initial_run_payload/migration.sql +2 -0
  8. package/dist/prisma/migrations/20260204061511_add_workflow_type/migration.sql +2 -0
  9. package/dist/prisma/migrations/20260213000000_add_token_usage/migration.sql +2 -0
  10. package/dist/prisma/migrations/migration_lock.toml +3 -0
  11. package/dist/prisma/prisma/dev.db +0 -0
  12. package/dist/prisma/schema.prisma +121 -0
  13. package/dist/ui/assets/KaTeX_AMS-Regular-BQhdFMY1.woff2 +0 -0
  14. package/dist/ui/assets/KaTeX_AMS-Regular-DMm9YOAa.woff +0 -0
  15. package/dist/ui/assets/KaTeX_AMS-Regular-DRggAlZN.ttf +0 -0
  16. package/dist/ui/assets/KaTeX_Caligraphic-Bold-ATXxdsX0.ttf +0 -0
  17. package/dist/ui/assets/KaTeX_Caligraphic-Bold-BEiXGLvX.woff +0 -0
  18. package/dist/ui/assets/KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2 +0 -0
  19. package/dist/ui/assets/KaTeX_Caligraphic-Regular-CTRA-rTL.woff +0 -0
  20. package/dist/ui/assets/KaTeX_Caligraphic-Regular-Di6jR-x-.woff2 +0 -0
  21. package/dist/ui/assets/KaTeX_Caligraphic-Regular-wX97UBjC.ttf +0 -0
  22. package/dist/ui/assets/KaTeX_Fraktur-Bold-BdnERNNW.ttf +0 -0
  23. package/dist/ui/assets/KaTeX_Fraktur-Bold-BsDP51OF.woff +0 -0
  24. package/dist/ui/assets/KaTeX_Fraktur-Bold-CL6g_b3V.woff2 +0 -0
  25. package/dist/ui/assets/KaTeX_Fraktur-Regular-CB_wures.ttf +0 -0
  26. package/dist/ui/assets/KaTeX_Fraktur-Regular-CTYiF6lA.woff2 +0 -0
  27. package/dist/ui/assets/KaTeX_Fraktur-Regular-Dxdc4cR9.woff +0 -0
  28. package/dist/ui/assets/KaTeX_Main-Bold-Cx986IdX.woff2 +0 -0
  29. package/dist/ui/assets/KaTeX_Main-Bold-Jm3AIy58.woff +0 -0
  30. package/dist/ui/assets/KaTeX_Main-Bold-waoOVXN0.ttf +0 -0
  31. package/dist/ui/assets/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2 +0 -0
  32. package/dist/ui/assets/KaTeX_Main-BoldItalic-DzxPMmG6.ttf +0 -0
  33. package/dist/ui/assets/KaTeX_Main-BoldItalic-SpSLRI95.woff +0 -0
  34. package/dist/ui/assets/KaTeX_Main-Italic-3WenGoN9.ttf +0 -0
  35. package/dist/ui/assets/KaTeX_Main-Italic-BMLOBm91.woff +0 -0
  36. package/dist/ui/assets/KaTeX_Main-Italic-NWA7e6Wa.woff2 +0 -0
  37. package/dist/ui/assets/KaTeX_Main-Regular-B22Nviop.woff2 +0 -0
  38. package/dist/ui/assets/KaTeX_Main-Regular-Dr94JaBh.woff +0 -0
  39. package/dist/ui/assets/KaTeX_Main-Regular-ypZvNtVU.ttf +0 -0
  40. package/dist/ui/assets/KaTeX_Math-BoldItalic-B3XSjfu4.ttf +0 -0
  41. package/dist/ui/assets/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2 +0 -0
  42. package/dist/ui/assets/KaTeX_Math-BoldItalic-iY-2wyZ7.woff +0 -0
  43. package/dist/ui/assets/KaTeX_Math-Italic-DA0__PXp.woff +0 -0
  44. package/dist/ui/assets/KaTeX_Math-Italic-flOr_0UB.ttf +0 -0
  45. package/dist/ui/assets/KaTeX_Math-Italic-t53AETM-.woff2 +0 -0
  46. package/dist/ui/assets/KaTeX_SansSerif-Bold-CFMepnvq.ttf +0 -0
  47. package/dist/ui/assets/KaTeX_SansSerif-Bold-D1sUS0GD.woff2 +0 -0
  48. package/dist/ui/assets/KaTeX_SansSerif-Bold-DbIhKOiC.woff +0 -0
  49. package/dist/ui/assets/KaTeX_SansSerif-Italic-C3H0VqGB.woff2 +0 -0
  50. package/dist/ui/assets/KaTeX_SansSerif-Italic-DN2j7dab.woff +0 -0
  51. package/dist/ui/assets/KaTeX_SansSerif-Italic-YYjJ1zSn.ttf +0 -0
  52. package/dist/ui/assets/KaTeX_SansSerif-Regular-BNo7hRIc.ttf +0 -0
  53. package/dist/ui/assets/KaTeX_SansSerif-Regular-CS6fqUqJ.woff +0 -0
  54. package/dist/ui/assets/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2 +0 -0
  55. package/dist/ui/assets/KaTeX_Script-Regular-C5JkGWo-.ttf +0 -0
  56. package/dist/ui/assets/KaTeX_Script-Regular-D3wIWfF6.woff2 +0 -0
  57. package/dist/ui/assets/KaTeX_Script-Regular-D5yQViql.woff +0 -0
  58. package/dist/ui/assets/KaTeX_Size1-Regular-C195tn64.woff +0 -0
  59. package/dist/ui/assets/KaTeX_Size1-Regular-Dbsnue_I.ttf +0 -0
  60. package/dist/ui/assets/KaTeX_Size1-Regular-mCD8mA8B.woff2 +0 -0
  61. package/dist/ui/assets/KaTeX_Size2-Regular-B7gKUWhC.ttf +0 -0
  62. package/dist/ui/assets/KaTeX_Size2-Regular-Dy4dx90m.woff2 +0 -0
  63. package/dist/ui/assets/KaTeX_Size2-Regular-oD1tc_U0.woff +0 -0
  64. package/dist/ui/assets/KaTeX_Size3-Regular-CTq5MqoE.woff +0 -0
  65. package/dist/ui/assets/KaTeX_Size3-Regular-DgpXs0kz.ttf +0 -0
  66. package/dist/ui/assets/KaTeX_Size4-Regular-BF-4gkZK.woff +0 -0
  67. package/dist/ui/assets/KaTeX_Size4-Regular-DWFBv043.ttf +0 -0
  68. package/dist/ui/assets/KaTeX_Size4-Regular-Dl5lxZxV.woff2 +0 -0
  69. package/dist/ui/assets/KaTeX_Typewriter-Regular-C0xS9mPB.woff +0 -0
  70. package/dist/ui/assets/KaTeX_Typewriter-Regular-CO6r4hn1.woff2 +0 -0
  71. package/dist/ui/assets/KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf +0 -0
  72. package/dist/ui/assets/apl-B4CMkyY2.js +1 -0
  73. package/dist/ui/assets/asciiarmor-Df11BRmG.js +1 -0
  74. package/dist/ui/assets/asn1-EdZsLKOL.js +1 -0
  75. package/dist/ui/assets/asterisk-B-8jnY81.js +1 -0
  76. package/dist/ui/assets/brainfuck-C4LP7Hcl.js +1 -0
  77. package/dist/ui/assets/clike-B9uivgTg.js +1 -0
  78. package/dist/ui/assets/clojure-BMjYHr_A.js +1 -0
  79. package/dist/ui/assets/cmake-BQqOBYOt.js +1 -0
  80. package/dist/ui/assets/cobol-CWcv1MsR.js +1 -0
  81. package/dist/ui/assets/coffeescript-S37ZYGWr.js +1 -0
  82. package/dist/ui/assets/commonlisp-DBKNyK5s.js +1 -0
  83. package/dist/ui/assets/crystal-SjHAIU92.js +1 -0
  84. package/dist/ui/assets/css-BnMrqG3P.js +1 -0
  85. package/dist/ui/assets/cypher-C_CwsFkJ.js +1 -0
  86. package/dist/ui/assets/d-pRatUO7H.js +1 -0
  87. package/dist/ui/assets/diff-DbItnlRl.js +1 -0
  88. package/dist/ui/assets/dockerfile-BKs6k2Af.js +1 -0
  89. package/dist/ui/assets/dtd-DF_7sFjM.js +1 -0
  90. package/dist/ui/assets/dylan-DwRh75JA.js +1 -0
  91. package/dist/ui/assets/ebnf-CDyGwa7X.js +1 -0
  92. package/dist/ui/assets/ecl-Cabwm37j.js +1 -0
  93. package/dist/ui/assets/eiffel-CnydiIhH.js +1 -0
  94. package/dist/ui/assets/elm-vLlmbW-K.js +1 -0
  95. package/dist/ui/assets/erlang-BNw1qcRV.js +1 -0
  96. package/dist/ui/assets/factor-kuTfRLto.js +1 -0
  97. package/dist/ui/assets/fcl-Kvtd6kyn.js +1 -0
  98. package/dist/ui/assets/forth-Ffai-XNe.js +1 -0
  99. package/dist/ui/assets/fortran-DYz_wnZ1.js +1 -0
  100. package/dist/ui/assets/gas-Bneqetm1.js +1 -0
  101. package/dist/ui/assets/gherkin-heZmZLOM.js +1 -0
  102. package/dist/ui/assets/groovy-D9Dt4D0W.js +1 -0
  103. package/dist/ui/assets/haskell-Cw1EW3IL.js +1 -0
  104. package/dist/ui/assets/haxe-H-WmDvRZ.js +1 -0
  105. package/dist/ui/assets/http-DBlCnlav.js +1 -0
  106. package/dist/ui/assets/idl-BEugSyMb.js +1 -0
  107. package/dist/ui/assets/index-B-lQSV62.css +1 -0
  108. package/dist/ui/assets/index-B7PC3UwW.js +1 -0
  109. package/dist/ui/assets/index-BEEMkSga.js +13 -0
  110. package/dist/ui/assets/index-BZ4ywKS-.js +1 -0
  111. package/dist/ui/assets/index-Bb69tSxN.js +1 -0
  112. package/dist/ui/assets/index-BbfDsh-D.js +1 -0
  113. package/dist/ui/assets/index-Bu9gi8CT.js +1 -0
  114. package/dist/ui/assets/index-C-OxxnxE.js +6 -0
  115. package/dist/ui/assets/index-CH876Txt.js +1 -0
  116. package/dist/ui/assets/index-CW8VfVIC.js +1026 -0
  117. package/dist/ui/assets/index-Cb3j0p9y.js +2 -0
  118. package/dist/ui/assets/index-CwR-eksU.js +1 -0
  119. package/dist/ui/assets/index-DQTqMEWL.js +1 -0
  120. package/dist/ui/assets/index-Dhrbisdh.js +1 -0
  121. package/dist/ui/assets/index-DqEtuI-j.js +1 -0
  122. package/dist/ui/assets/index-DrA24vfU.js +7 -0
  123. package/dist/ui/assets/index-Du9IbowE.js +1 -0
  124. package/dist/ui/assets/index-EHnTtRu0.js +1 -0
  125. package/dist/ui/assets/index-F3UrAKk1.js +3 -0
  126. package/dist/ui/assets/index-SowqJRTb.js +1 -0
  127. package/dist/ui/assets/index-ZYq2otFn.js +1 -0
  128. package/dist/ui/assets/index-hJzy_UWf.js +1 -0
  129. package/dist/ui/assets/index-iMeltPfH.js +1 -0
  130. package/dist/ui/assets/index-qDf_Uo6N.js +1 -0
  131. package/dist/ui/assets/javascript-iXu5QeM3.js +1 -0
  132. package/dist/ui/assets/julia-DuME0IfC.js +1 -0
  133. package/dist/ui/assets/livescript-BwQOo05w.js +1 -0
  134. package/dist/ui/assets/lua-BgMRiT3U.js +1 -0
  135. package/dist/ui/assets/mathematica-DTrFuWx2.js +1 -0
  136. package/dist/ui/assets/mbox-CNhZ1qSd.js +1 -0
  137. package/dist/ui/assets/mirc-CjQqDB4T.js +1 -0
  138. package/dist/ui/assets/mllike-CXdrOF99.js +1 -0
  139. package/dist/ui/assets/modelica-Dc1JOy9r.js +1 -0
  140. package/dist/ui/assets/mscgen-BA5vi2Kp.js +1 -0
  141. package/dist/ui/assets/mumps-BT43cFF4.js +1 -0
  142. package/dist/ui/assets/nginx-DdIZxoE0.js +1 -0
  143. package/dist/ui/assets/nsis-LdVXkNf5.js +1 -0
  144. package/dist/ui/assets/ntriples-BfvgReVJ.js +1 -0
  145. package/dist/ui/assets/octave-Ck1zUtKM.js +1 -0
  146. package/dist/ui/assets/oz-BzwKVEFT.js +1 -0
  147. package/dist/ui/assets/pascal--L3eBynH.js +1 -0
  148. package/dist/ui/assets/perl-CdXCOZ3F.js +1 -0
  149. package/dist/ui/assets/pig-CevX1Tat.js +1 -0
  150. package/dist/ui/assets/powershell-CFHJl5sT.js +1 -0
  151. package/dist/ui/assets/properties-C78fOPTZ.js +1 -0
  152. package/dist/ui/assets/protobuf-ChK-085T.js +1 -0
  153. package/dist/ui/assets/pug-DeIclll2.js +1 -0
  154. package/dist/ui/assets/puppet-DMA9R1ak.js +1 -0
  155. package/dist/ui/assets/python-BuPzkPfP.js +1 -0
  156. package/dist/ui/assets/q-pXgVlZs6.js +1 -0
  157. package/dist/ui/assets/r-B6wPVr8A.js +1 -0
  158. package/dist/ui/assets/rpm-CTu-6PCP.js +1 -0
  159. package/dist/ui/assets/ruby-B2Rjki9n.js +1 -0
  160. package/dist/ui/assets/sas-B4kiWyti.js +1 -0
  161. package/dist/ui/assets/scheme-C41bIUwD.js +1 -0
  162. package/dist/ui/assets/shell-CjFT_Tl9.js +1 -0
  163. package/dist/ui/assets/sieve-C3Gn_uJK.js +1 -0
  164. package/dist/ui/assets/simple-mode-GW_nhZxv.js +1 -0
  165. package/dist/ui/assets/smalltalk-CnHTOXQT.js +1 -0
  166. package/dist/ui/assets/solr-DehyRSwq.js +1 -0
  167. package/dist/ui/assets/sparql-DkYu6x3z.js +1 -0
  168. package/dist/ui/assets/spreadsheet-BCZA_wO0.js +1 -0
  169. package/dist/ui/assets/sql-D0XecflT.js +1 -0
  170. package/dist/ui/assets/stex-C3f8Ysf7.js +1 -0
  171. package/dist/ui/assets/stylus-B533Al4x.js +1 -0
  172. package/dist/ui/assets/swift-BzpIVaGY.js +1 -0
  173. package/dist/ui/assets/tcl-DVfN8rqt.js +1 -0
  174. package/dist/ui/assets/textile-CnDTJFAw.js +1 -0
  175. package/dist/ui/assets/tiddlywiki-DO-Gjzrf.js +1 -0
  176. package/dist/ui/assets/tiki-DGYXhP31.js +1 -0
  177. package/dist/ui/assets/toml-Bm5Em-hy.js +1 -0
  178. package/dist/ui/assets/troff-wAsdV37c.js +1 -0
  179. package/dist/ui/assets/ttcn-CfJYG6tj.js +1 -0
  180. package/dist/ui/assets/ttcn-cfg-B9xdYoR4.js +1 -0
  181. package/dist/ui/assets/turtle-B1tBg_DP.js +1 -0
  182. package/dist/ui/assets/vb-CmGdzxic.js +1 -0
  183. package/dist/ui/assets/vbscript-BuJXcnF6.js +1 -0
  184. package/dist/ui/assets/velocity-D8B20fx6.js +1 -0
  185. package/dist/ui/assets/verilog-C6RDOZhf.js +1 -0
  186. package/dist/ui/assets/vhdl-lSbBsy5d.js +1 -0
  187. package/dist/ui/assets/webidl-ZXfAyPTL.js +1 -0
  188. package/dist/ui/assets/xquery-DzFWVndE.js +1 -0
  189. package/dist/ui/assets/yacas-BJ4BC0dw.js +1 -0
  190. package/dist/ui/assets/z80-Hz9HOZM7.js +1 -0
  191. package/dist/ui/index.html +12 -1
  192. package/package.json +8 -5
  193. package/dist/ui/assets/index-C_kQPI1m.js +0 -9
@@ -0,0 +1 @@
1
+ 9663eaa
package/dist/index.js CHANGED
@@ -2,11 +2,9 @@
2
2
 
3
3
  // src/index.ts
4
4
  import { spawn } from "node:child_process";
5
- import { createReadStream, existsSync } from "node:fs";
6
- import { stat } from "node:fs/promises";
7
- import { createServer, request } from "node:http";
8
- import { request as requestSecure } from "node:https";
9
- import { basename, dirname, extname, normalize, resolve } from "node:path";
5
+ import { existsSync, readFileSync } from "node:fs";
6
+ import { request } from "node:http";
7
+ import { basename, dirname, resolve } from "node:path";
10
8
  import { fileURLToPath } from "node:url";
11
9
  var args = process.argv.slice(2);
12
10
  var command = args[0];
@@ -14,18 +12,27 @@ if (!command || command === "--help" || command === "-h" || command === "help")
14
12
  printHelp();
15
13
  process.exit(0);
16
14
  }
17
- if (command !== "start") {
18
- console.error(`Unknown command: ${command}`);
19
- printHelp();
20
- process.exit(1);
15
+ if (command === "--version" || command === "-v" || command === "version") {
16
+ printVersion();
17
+ process.exit(0);
18
+ }
19
+ if (command === "start") {
20
+ const options = parseStartArgs(args.slice(1));
21
+ await startApps(options);
22
+ process.exit(0);
21
23
  }
22
- var options = parseStartArgs(args.slice(1));
23
- await startApps(options);
24
+ if (command === "init-test-repo") {
25
+ const exitCode = await runFixtureScript("init-test-repo.mjs", args.slice(1));
26
+ process.exit(exitCode);
27
+ }
28
+ console.error(`Unknown command: ${command}`);
29
+ printHelp();
30
+ process.exit(1);
24
31
  function parseStartArgs(argv) {
32
+ const envPort = Number(process.env.PORT);
25
33
  const output = {
26
34
  path: ".",
27
- apiPort: 6970,
28
- uiPort: 6969,
35
+ port: Number.isFinite(envPort) ? envPort : 6969,
29
36
  open: true
30
37
  };
31
38
  for (let i = 0;i < argv.length; i += 1) {
@@ -34,8 +41,7 @@ function parseStartArgs(argv) {
34
41
  continue;
35
42
  if (arg === "--port") {
36
43
  const mainPort = Number(argv[i + 1]);
37
- output.uiPort = mainPort;
38
- output.apiPort = mainPort + 1;
44
+ output.port = mainPort;
39
45
  i += 1;
40
46
  continue;
41
47
  }
@@ -49,12 +55,13 @@ function parseStartArgs(argv) {
49
55
  }
50
56
  return output;
51
57
  }
52
- async function startApps(options2) {
58
+ async function startApps(options) {
53
59
  const moduleDir = dirname(fileURLToPath(import.meta.url));
54
60
  const distRoot = resolveDistRoot(moduleDir);
55
61
  const distApi = distRoot ? resolve(distRoot, "api.js") : "";
56
62
  const distUiRoot = distRoot ? resolve(distRoot, "ui") : "";
57
63
  const nodePath = resolveNodePath();
64
+ const targetRoot = resolve(process.cwd(), options.path);
58
65
  if (!distRoot || !existsSync(distApi) || !existsSync(resolve(distUiRoot, "index.html"))) {
59
66
  console.error("Missing dist runtime files. Run the build first.");
60
67
  process.exit(1);
@@ -63,30 +70,24 @@ async function startApps(options2) {
63
70
  cwd: process.cwd(),
64
71
  env: {
65
72
  ...process.env,
66
- API_PORT: String(options2.apiPort)
73
+ PORT: String(options.port),
74
+ VIBEMAN_ROOT: targetRoot,
75
+ UI_DIST: distUiRoot
67
76
  },
68
77
  stdio: "inherit"
69
78
  });
70
- const uiServer = createUiServer({
71
- apiBase: `http://localhost:${options2.apiPort}`,
72
- uiRoot: distUiRoot
73
- });
74
- uiServer.listen(options2.uiPort, () => {
75
- console.log(`UI ready on http://localhost:${options2.uiPort}`);
76
- });
77
- const url = new URL(`http://localhost:${options2.uiPort}/`);
78
- url.searchParams.set("path", options2.path);
79
- if (options2.open) {
79
+ const url = new URL(`http://localhost:${options.port}/`);
80
+ if (options.open) {
81
+ const ready = await waitForApiReady(options.port);
82
+ if (!ready) {
83
+ console.warn("API not ready yet; opening the browser anyway.");
84
+ }
80
85
  await openBrowser(url.toString());
81
86
  }
82
87
  console.log(`
83
- Vibeman running:`);
84
- console.log(` API: http://localhost:${options2.apiPort}`);
85
- console.log(` UI: ${url.toString()}`);
86
- console.log("Press Ctrl+C to stop.");
88
+ Vibeman running at ${url.toString()}. Press Ctrl+C to stop.`);
87
89
  const stop = () => {
88
90
  apiProcess.kill();
89
- uiServer.close();
90
91
  };
91
92
  process.on("SIGINT", () => {
92
93
  stop();
@@ -100,6 +101,49 @@ Vibeman running:`);
100
101
  stop();
101
102
  process.exit(exitCode ?? 1);
102
103
  }
104
+ async function runFixtureScript(scriptName, forwardedArgs) {
105
+ const moduleDir = dirname(fileURLToPath(import.meta.url));
106
+ const workspaceRoot = findFixtureWorkspaceRoot(moduleDir, process.cwd());
107
+ if (!workspaceRoot) {
108
+ console.error(`Unable to locate fixture scripts. This command is available when running inside the vibeman workspace repository.`);
109
+ return 1;
110
+ }
111
+ const scriptPath = resolve(workspaceRoot, "scripts", scriptName);
112
+ if (!existsSync(scriptPath)) {
113
+ console.error(`Fixture script not found: ${scriptPath}`);
114
+ return 1;
115
+ }
116
+ const child = spawn(resolveNodePath(), [scriptPath, ...forwardedArgs], {
117
+ cwd: workspaceRoot,
118
+ env: process.env,
119
+ stdio: "inherit"
120
+ });
121
+ const exitCode = await waitForExit(child);
122
+ return exitCode ?? 1;
123
+ }
124
+ function findFixtureWorkspaceRoot(moduleDir, currentDir) {
125
+ const candidates = [currentDir, moduleDir];
126
+ for (const seed of candidates) {
127
+ const found = ascendForFixtureWorkspace(seed);
128
+ if (found)
129
+ return found;
130
+ }
131
+ return "";
132
+ }
133
+ function ascendForFixtureWorkspace(seed) {
134
+ let dir = resolve(seed);
135
+ while (true) {
136
+ const fixtureScript = resolve(dir, "scripts", "init-test-repo.mjs");
137
+ const packageJson = resolve(dir, "package.json");
138
+ if (existsSync(fixtureScript) && existsSync(packageJson)) {
139
+ return dir;
140
+ }
141
+ const parent = dirname(dir);
142
+ if (parent === dir)
143
+ return "";
144
+ dir = parent;
145
+ }
146
+ }
103
147
  async function openBrowser(target) {
104
148
  const platform = process.platform;
105
149
  if (platform === "darwin") {
@@ -117,17 +161,92 @@ function printHelp() {
117
161
 
118
162
  Usage:
119
163
  vibeman start [path] [--port <port>] [--no-open]
164
+ vibeman init-test-repo [path] [--force] [--skip-db-seed]
165
+ vibeman --version
120
166
 
121
167
  Examples:
122
168
  vibeman start .
123
169
  vibeman start ./notes --port 7010
170
+ vibeman init-test-repo ./tmp/test-repo
124
171
  `);
125
172
  }
173
+ function printVersion() {
174
+ const version = readPackageVersion();
175
+ const commit = readGitCommit();
176
+ if (commit) {
177
+ console.log(`${version} (${commit})`);
178
+ return;
179
+ }
180
+ console.log(version);
181
+ }
182
+ function readPackageVersion() {
183
+ try {
184
+ const moduleDir = dirname(fileURLToPath(import.meta.url));
185
+ const packagePath = resolve(moduleDir, "..", "package.json");
186
+ const raw = readFileSync(packagePath, "utf-8");
187
+ const parsed = JSON.parse(raw);
188
+ return parsed.version ?? "unknown";
189
+ } catch {
190
+ return "unknown";
191
+ }
192
+ }
193
+ function readGitCommit() {
194
+ const packaged = readPackagedCommit();
195
+ if (packaged)
196
+ return packaged;
197
+ return "";
198
+ }
199
+ function readPackagedCommit() {
200
+ try {
201
+ const moduleDir = dirname(fileURLToPath(import.meta.url));
202
+ const commitPath = resolve(moduleDir, "commit.txt");
203
+ if (!existsSync(commitPath))
204
+ return "";
205
+ return readFileSync(commitPath, "utf-8").trim();
206
+ } catch {
207
+ return "";
208
+ }
209
+ }
126
210
  function waitForExit(child) {
127
211
  return new Promise((resolvePromise) => {
128
212
  child.once("exit", (code) => resolvePromise(code));
129
213
  });
130
214
  }
215
+ async function waitForApiReady(port, timeoutMs = 30000, intervalMs = 250) {
216
+ const startedAt = Date.now();
217
+ while (Date.now() - startedAt < timeoutMs) {
218
+ const ok = await checkApiHealth(port);
219
+ if (ok)
220
+ return true;
221
+ await delay(intervalMs);
222
+ }
223
+ return false;
224
+ }
225
+ function checkApiHealth(port) {
226
+ return new Promise((resolvePromise) => {
227
+ const req = request({
228
+ hostname: "127.0.0.1",
229
+ port,
230
+ path: "/api/health",
231
+ method: "GET",
232
+ timeout: 2000
233
+ }, (res) => {
234
+ res.resume();
235
+ resolvePromise(res.statusCode === 200);
236
+ });
237
+ req.on("timeout", () => {
238
+ req.destroy();
239
+ resolvePromise(false);
240
+ });
241
+ req.on("error", () => resolvePromise(false));
242
+ req.end();
243
+ });
244
+ }
245
+ function delay(ms) {
246
+ return new Promise((resolvePromise) => {
247
+ setTimeout(resolvePromise, ms);
248
+ });
249
+ }
131
250
  function resolveDistRoot(selfDir) {
132
251
  const execDir = dirname(process.execPath);
133
252
  const candidates = [
@@ -148,90 +267,3 @@ function resolveNodePath() {
148
267
  const execBase = basename(process.execPath);
149
268
  return execBase === "node" || execBase === "node.exe" ? process.execPath : "node";
150
269
  }
151
- function createUiServer({ apiBase, uiRoot }) {
152
- return createServer(async (req, res) => {
153
- const url = new URL(req.url ?? "/", `http://${req.headers.host ?? "localhost"}`);
154
- if (url.pathname.startsWith("/api")) {
155
- proxyApi(req, res, url, apiBase);
156
- return;
157
- }
158
- try {
159
- const filePath = resolveStaticPath(uiRoot, url.pathname);
160
- const fileStat = await stat(filePath);
161
- if (fileStat.isDirectory()) {
162
- return serveFile(resolve(filePath, "index.html"), res);
163
- }
164
- return serveFile(filePath, res);
165
- } catch {
166
- return serveFile(resolve(uiRoot, "index.html"), res);
167
- }
168
- });
169
- }
170
- function resolveStaticPath(uiRoot, pathname) {
171
- const normalized = normalize(pathname).replace(/^(\.\.(\/|\\|$))+/, "");
172
- const target = resolve(uiRoot, normalized.slice(1));
173
- if (!target.startsWith(uiRoot)) {
174
- throw new Error("Invalid path");
175
- }
176
- return target;
177
- }
178
- function serveFile(filePath, res) {
179
- if (!existsSync(filePath)) {
180
- res.statusCode = 404;
181
- res.setHeader("content-type", "text/plain; charset=utf-8");
182
- res.end("Not found");
183
- return;
184
- }
185
- res.statusCode = 200;
186
- res.setHeader("content-type", contentType(filePath));
187
- createReadStream(filePath).pipe(res);
188
- }
189
- function contentType(filePath) {
190
- switch (extname(filePath)) {
191
- case ".html":
192
- return "text/html; charset=utf-8";
193
- case ".js":
194
- return "text/javascript; charset=utf-8";
195
- case ".css":
196
- return "text/css; charset=utf-8";
197
- case ".json":
198
- return "application/json; charset=utf-8";
199
- case ".svg":
200
- return "image/svg+xml";
201
- case ".png":
202
- return "image/png";
203
- case ".jpg":
204
- case ".jpeg":
205
- return "image/jpeg";
206
- case ".ico":
207
- return "image/x-icon";
208
- default:
209
- return "application/octet-stream";
210
- }
211
- }
212
- function proxyApi(req, res, url, apiBase) {
213
- const target = new URL(apiBase);
214
- target.pathname = url.pathname;
215
- target.search = url.search;
216
- const isSecure = target.protocol === "https:";
217
- const proxyRequest = (isSecure ? requestSecure : request)({
218
- protocol: target.protocol,
219
- hostname: target.hostname,
220
- port: target.port,
221
- method: req.method,
222
- path: target.pathname + target.search,
223
- headers: {
224
- ...req.headers,
225
- host: target.host
226
- }
227
- }, (proxyRes) => {
228
- res.writeHead(proxyRes.statusCode ?? 502, proxyRes.headers);
229
- proxyRes.pipe(res);
230
- });
231
- proxyRequest.on("error", (error) => {
232
- res.statusCode = 502;
233
- res.setHeader("content-type", "text/plain; charset=utf-8");
234
- res.end(`Proxy error: ${error instanceof Error ? error.message : "unknown"}`);
235
- });
236
- req.pipe(proxyRequest);
237
- }
@@ -0,0 +1,127 @@
1
+ -- CreateTable
2
+ CREATE TABLE "Setting" (
3
+ "key" TEXT NOT NULL PRIMARY KEY,
4
+ "value" JSONB NOT NULL,
5
+ "createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
6
+ "updatedAt" DATETIME NOT NULL
7
+ );
8
+
9
+ -- CreateTable
10
+ CREATE TABLE "Executor" (
11
+ "id" TEXT NOT NULL PRIMARY KEY,
12
+ "name" TEXT NOT NULL,
13
+ "type" TEXT NOT NULL,
14
+ "config" JSONB NOT NULL,
15
+ "tags" JSONB,
16
+ "createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
17
+ "updatedAt" DATETIME NOT NULL
18
+ );
19
+
20
+ -- CreateTable
21
+ CREATE TABLE "Workflow" (
22
+ "id" TEXT NOT NULL PRIMARY KEY,
23
+ "name" TEXT NOT NULL,
24
+ "tag" TEXT,
25
+ "description" TEXT,
26
+ "version" INTEGER NOT NULL DEFAULT 1,
27
+ "startStepId" TEXT NOT NULL,
28
+ "createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
29
+ "updatedAt" DATETIME NOT NULL
30
+ );
31
+
32
+ -- CreateTable
33
+ CREATE TABLE "WorkflowStep" (
34
+ "id" TEXT NOT NULL PRIMARY KEY,
35
+ "workflowId" TEXT NOT NULL,
36
+ "stepId" TEXT NOT NULL,
37
+ "executorId" TEXT NOT NULL,
38
+ "config" JSONB,
39
+ "transitions" JSONB,
40
+ "maxRetry" INTEGER NOT NULL DEFAULT 0,
41
+ "retryConfig" JSONB,
42
+ "timeoutMs" INTEGER,
43
+ "createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
44
+ "updatedAt" DATETIME NOT NULL,
45
+ CONSTRAINT "WorkflowStep_workflowId_fkey" FOREIGN KEY ("workflowId") REFERENCES "Workflow" ("id") ON DELETE CASCADE ON UPDATE CASCADE,
46
+ CONSTRAINT "WorkflowStep_executorId_fkey" FOREIGN KEY ("executorId") REFERENCES "Executor" ("id") ON DELETE RESTRICT ON UPDATE CASCADE
47
+ );
48
+
49
+ -- CreateTable
50
+ CREATE TABLE "WorkflowRun" (
51
+ "id" TEXT NOT NULL PRIMARY KEY,
52
+ "workflowId" TEXT NOT NULL,
53
+ "status" TEXT NOT NULL,
54
+ "currentStepId" TEXT,
55
+ "payload" JSONB,
56
+ "humanMessage" TEXT,
57
+ "aiMessage" TEXT,
58
+ "lastError" TEXT,
59
+ "deletedAt" DATETIME,
60
+ "createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
61
+ "updatedAt" DATETIME NOT NULL,
62
+ CONSTRAINT "WorkflowRun_workflowId_fkey" FOREIGN KEY ("workflowId") REFERENCES "Workflow" ("id") ON DELETE CASCADE ON UPDATE CASCADE
63
+ );
64
+
65
+ -- CreateTable
66
+ CREATE TABLE "WorkflowRunStep" (
67
+ "id" TEXT NOT NULL PRIMARY KEY,
68
+ "runId" TEXT NOT NULL,
69
+ "stepId" TEXT NOT NULL,
70
+ "status" TEXT NOT NULL,
71
+ "attempt" INTEGER NOT NULL,
72
+ "input" JSONB,
73
+ "output" JSONB,
74
+ "humanMessage" TEXT,
75
+ "aiMessage" TEXT,
76
+ "sessionId" TEXT,
77
+ "threadId" TEXT,
78
+ "messages" JSONB,
79
+ "graphState" JSONB,
80
+ "createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
81
+ "updatedAt" DATETIME NOT NULL,
82
+ CONSTRAINT "WorkflowRunStep_runId_fkey" FOREIGN KEY ("runId") REFERENCES "WorkflowRun" ("id") ON DELETE CASCADE ON UPDATE CASCADE
83
+ );
84
+
85
+ -- CreateTable
86
+ CREATE TABLE "WorkflowRunLog" (
87
+ "id" TEXT NOT NULL PRIMARY KEY,
88
+ "runId" TEXT NOT NULL,
89
+ "stepId" TEXT,
90
+ "event" TEXT NOT NULL,
91
+ "payload" JSONB,
92
+ "createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
93
+ CONSTRAINT "WorkflowRunLog_runId_fkey" FOREIGN KEY ("runId") REFERENCES "WorkflowRun" ("id") ON DELETE CASCADE ON UPDATE CASCADE
94
+ );
95
+
96
+ -- CreateIndex
97
+ CREATE INDEX "WorkflowStep_workflowId_idx" ON "WorkflowStep"("workflowId");
98
+
99
+ -- CreateIndex
100
+ CREATE INDEX "WorkflowStep_executorId_idx" ON "WorkflowStep"("executorId");
101
+
102
+ -- CreateIndex
103
+ CREATE UNIQUE INDEX "WorkflowStep_workflowId_stepId_key" ON "WorkflowStep"("workflowId", "stepId");
104
+
105
+ -- CreateIndex
106
+ CREATE INDEX "WorkflowRun_workflowId_idx" ON "WorkflowRun"("workflowId");
107
+
108
+ -- CreateIndex
109
+ CREATE INDEX "WorkflowRun_status_idx" ON "WorkflowRun"("status");
110
+
111
+ -- CreateIndex
112
+ CREATE INDEX "WorkflowRun_deletedAt_idx" ON "WorkflowRun"("deletedAt");
113
+
114
+ -- CreateIndex
115
+ CREATE INDEX "WorkflowRunStep_runId_idx" ON "WorkflowRunStep"("runId");
116
+
117
+ -- CreateIndex
118
+ CREATE INDEX "WorkflowRunStep_stepId_idx" ON "WorkflowRunStep"("stepId");
119
+
120
+ -- CreateIndex
121
+ CREATE UNIQUE INDEX "WorkflowRunStep_runId_stepId_key" ON "WorkflowRunStep"("runId", "stepId");
122
+
123
+ -- CreateIndex
124
+ CREATE INDEX "WorkflowRunLog_runId_idx" ON "WorkflowRunLog"("runId");
125
+
126
+ -- CreateIndex
127
+ CREATE INDEX "WorkflowRunLog_stepId_idx" ON "WorkflowRunLog"("stepId");
@@ -0,0 +1,30 @@
1
+ /*
2
+ Warnings:
3
+
4
+ - You are about to drop the column `aiMessage` on the `WorkflowRun` table. All the data in the column will be lost.
5
+ - You are about to drop the column `humanMessage` on the `WorkflowRun` table. All the data in the column will be lost.
6
+
7
+ */
8
+ -- RedefineTables
9
+ PRAGMA defer_foreign_keys=ON;
10
+ PRAGMA foreign_keys=OFF;
11
+ CREATE TABLE "new_WorkflowRun" (
12
+ "id" TEXT NOT NULL PRIMARY KEY,
13
+ "workflowId" TEXT NOT NULL,
14
+ "status" TEXT NOT NULL,
15
+ "currentStepId" TEXT,
16
+ "payload" JSONB,
17
+ "lastError" TEXT,
18
+ "deletedAt" DATETIME,
19
+ "createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
20
+ "updatedAt" DATETIME NOT NULL,
21
+ CONSTRAINT "WorkflowRun_workflowId_fkey" FOREIGN KEY ("workflowId") REFERENCES "Workflow" ("id") ON DELETE CASCADE ON UPDATE CASCADE
22
+ );
23
+ INSERT INTO "new_WorkflowRun" ("createdAt", "currentStepId", "deletedAt", "id", "lastError", "payload", "status", "updatedAt", "workflowId") SELECT "createdAt", "currentStepId", "deletedAt", "id", "lastError", "payload", "status", "updatedAt", "workflowId" FROM "WorkflowRun";
24
+ DROP TABLE "WorkflowRun";
25
+ ALTER TABLE "new_WorkflowRun" RENAME TO "WorkflowRun";
26
+ CREATE INDEX "WorkflowRun_workflowId_idx" ON "WorkflowRun"("workflowId");
27
+ CREATE INDEX "WorkflowRun_status_idx" ON "WorkflowRun"("status");
28
+ CREATE INDEX "WorkflowRun_deletedAt_idx" ON "WorkflowRun"("deletedAt");
29
+ PRAGMA foreign_keys=ON;
30
+ PRAGMA defer_foreign_keys=OFF;
@@ -0,0 +1,152 @@
1
+ /*
2
+ Warnings:
3
+
4
+ - You are about to drop the `Workflow` table. If the table is not empty, all the data it contains will be lost.
5
+ - You are about to drop the `WorkflowRunStep` table. If the table is not empty, all the data it contains will be lost.
6
+ - You are about to drop the `WorkflowStep` table. If the table is not empty, all the data it contains will be lost.
7
+ - You are about to drop the column `currentStepId` on the `WorkflowRun` table. All the data in the column will be lost.
8
+ - You are about to drop the column `payload` on the `WorkflowRun` table. All the data in the column will be lost.
9
+ - You are about to drop the column `workflowId` on the `WorkflowRun` table. All the data in the column will be lost.
10
+ - You are about to drop the column `runId` on the `WorkflowRunLog` table. All the data in the column will be lost.
11
+ - You are about to drop the column `stepId` on the `WorkflowRunLog` table. All the data in the column will be lost.
12
+ - Added the required column `workflowDefinitionId` to the `WorkflowRun` table without a default value. This is not possible if the table is not empty.
13
+ - Added the required column `workflowRunId` to the `WorkflowRunLog` table without a default value. This is not possible if the table is not empty.
14
+
15
+ */
16
+ -- DropIndex
17
+ DROP INDEX "WorkflowRunStep_runId_stepId_key";
18
+
19
+ -- DropIndex
20
+ DROP INDEX "WorkflowRunStep_stepId_idx";
21
+
22
+ -- DropIndex
23
+ DROP INDEX "WorkflowRunStep_runId_idx";
24
+
25
+ -- DropIndex
26
+ DROP INDEX "WorkflowStep_workflowId_stepId_key";
27
+
28
+ -- DropIndex
29
+ DROP INDEX "WorkflowStep_executorId_idx";
30
+
31
+ -- DropIndex
32
+ DROP INDEX "WorkflowStep_workflowId_idx";
33
+
34
+ -- DropTable
35
+ PRAGMA foreign_keys=off;
36
+ DROP TABLE "Workflow";
37
+ PRAGMA foreign_keys=on;
38
+
39
+ -- DropTable
40
+ PRAGMA foreign_keys=off;
41
+ DROP TABLE "WorkflowRunStep";
42
+ PRAGMA foreign_keys=on;
43
+
44
+ -- DropTable
45
+ PRAGMA foreign_keys=off;
46
+ DROP TABLE "WorkflowStep";
47
+ PRAGMA foreign_keys=on;
48
+
49
+ -- CreateTable
50
+ CREATE TABLE "WorkflowDefinition" (
51
+ "id" TEXT NOT NULL PRIMARY KEY,
52
+ "name" TEXT NOT NULL,
53
+ "tag" TEXT,
54
+ "description" TEXT,
55
+ "version" INTEGER NOT NULL DEFAULT 1,
56
+ "startNodeKey" TEXT NOT NULL,
57
+ "createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
58
+ "updatedAt" DATETIME NOT NULL
59
+ );
60
+
61
+ -- CreateTable
62
+ CREATE TABLE "WorkflowNode" (
63
+ "id" TEXT NOT NULL PRIMARY KEY,
64
+ "workflowDefinitionId" TEXT NOT NULL,
65
+ "nodeKey" TEXT NOT NULL,
66
+ "executorId" TEXT NOT NULL,
67
+ "nodeConfig" JSONB,
68
+ "transitionMap" JSONB,
69
+ "maxRetry" INTEGER NOT NULL DEFAULT 0,
70
+ "retryConfig" JSONB,
71
+ "timeoutMs" INTEGER,
72
+ "createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
73
+ "updatedAt" DATETIME NOT NULL,
74
+ CONSTRAINT "WorkflowNode_workflowDefinitionId_fkey" FOREIGN KEY ("workflowDefinitionId") REFERENCES "WorkflowDefinition" ("id") ON DELETE CASCADE ON UPDATE CASCADE,
75
+ CONSTRAINT "WorkflowNode_executorId_fkey" FOREIGN KEY ("executorId") REFERENCES "Executor" ("id") ON DELETE RESTRICT ON UPDATE CASCADE
76
+ );
77
+
78
+ -- CreateTable
79
+ CREATE TABLE "WorkflowRunStepResult" (
80
+ "id" TEXT NOT NULL PRIMARY KEY,
81
+ "workflowRunId" TEXT NOT NULL,
82
+ "nodeKey" TEXT NOT NULL,
83
+ "status" TEXT NOT NULL,
84
+ "attempt" INTEGER NOT NULL,
85
+ "nodeInput" JSONB,
86
+ "nodeOutput" JSONB,
87
+ "humanMessage" TEXT,
88
+ "aiMessage" TEXT,
89
+ "sessionId" TEXT,
90
+ "threadId" TEXT,
91
+ "messages" JSONB,
92
+ "graphState" JSONB,
93
+ "createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
94
+ "updatedAt" DATETIME NOT NULL,
95
+ CONSTRAINT "WorkflowRunStepResult_workflowRunId_fkey" FOREIGN KEY ("workflowRunId") REFERENCES "WorkflowRun" ("id") ON DELETE CASCADE ON UPDATE CASCADE
96
+ );
97
+
98
+ -- RedefineTables
99
+ PRAGMA defer_foreign_keys=ON;
100
+ PRAGMA foreign_keys=OFF;
101
+ CREATE TABLE "new_WorkflowRun" (
102
+ "id" TEXT NOT NULL PRIMARY KEY,
103
+ "workflowDefinitionId" TEXT NOT NULL,
104
+ "status" TEXT NOT NULL,
105
+ "currentNodeKey" TEXT,
106
+ "runPayload" JSONB,
107
+ "lastError" TEXT,
108
+ "deletedAt" DATETIME,
109
+ "createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
110
+ "updatedAt" DATETIME NOT NULL,
111
+ CONSTRAINT "WorkflowRun_workflowDefinitionId_fkey" FOREIGN KEY ("workflowDefinitionId") REFERENCES "WorkflowDefinition" ("id") ON DELETE CASCADE ON UPDATE CASCADE
112
+ );
113
+ INSERT INTO "new_WorkflowRun" ("createdAt", "deletedAt", "id", "lastError", "status", "updatedAt") SELECT "createdAt", "deletedAt", "id", "lastError", "status", "updatedAt" FROM "WorkflowRun";
114
+ DROP TABLE "WorkflowRun";
115
+ ALTER TABLE "new_WorkflowRun" RENAME TO "WorkflowRun";
116
+ CREATE INDEX "WorkflowRun_workflowDefinitionId_idx" ON "WorkflowRun"("workflowDefinitionId");
117
+ CREATE INDEX "WorkflowRun_status_idx" ON "WorkflowRun"("status");
118
+ CREATE INDEX "WorkflowRun_deletedAt_idx" ON "WorkflowRun"("deletedAt");
119
+ CREATE TABLE "new_WorkflowRunLog" (
120
+ "id" TEXT NOT NULL PRIMARY KEY,
121
+ "workflowRunId" TEXT NOT NULL,
122
+ "nodeKey" TEXT,
123
+ "event" TEXT NOT NULL,
124
+ "payload" JSONB,
125
+ "createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
126
+ CONSTRAINT "WorkflowRunLog_workflowRunId_fkey" FOREIGN KEY ("workflowRunId") REFERENCES "WorkflowRun" ("id") ON DELETE CASCADE ON UPDATE CASCADE
127
+ );
128
+ INSERT INTO "new_WorkflowRunLog" ("createdAt", "event", "id", "payload") SELECT "createdAt", "event", "id", "payload" FROM "WorkflowRunLog";
129
+ DROP TABLE "WorkflowRunLog";
130
+ ALTER TABLE "new_WorkflowRunLog" RENAME TO "WorkflowRunLog";
131
+ CREATE INDEX "WorkflowRunLog_workflowRunId_idx" ON "WorkflowRunLog"("workflowRunId");
132
+ CREATE INDEX "WorkflowRunLog_nodeKey_idx" ON "WorkflowRunLog"("nodeKey");
133
+ PRAGMA foreign_keys=ON;
134
+ PRAGMA defer_foreign_keys=OFF;
135
+
136
+ -- CreateIndex
137
+ CREATE INDEX "WorkflowNode_workflowDefinitionId_idx" ON "WorkflowNode"("workflowDefinitionId");
138
+
139
+ -- CreateIndex
140
+ CREATE INDEX "WorkflowNode_executorId_idx" ON "WorkflowNode"("executorId");
141
+
142
+ -- CreateIndex
143
+ CREATE UNIQUE INDEX "WorkflowNode_workflowDefinitionId_nodeKey_key" ON "WorkflowNode"("workflowDefinitionId", "nodeKey");
144
+
145
+ -- CreateIndex
146
+ CREATE INDEX "WorkflowRunStepResult_workflowRunId_idx" ON "WorkflowRunStepResult"("workflowRunId");
147
+
148
+ -- CreateIndex
149
+ CREATE INDEX "WorkflowRunStepResult_nodeKey_idx" ON "WorkflowRunStepResult"("nodeKey");
150
+
151
+ -- CreateIndex
152
+ CREATE UNIQUE INDEX "WorkflowRunStepResult_workflowRunId_nodeKey_attempt_key" ON "WorkflowRunStepResult"("workflowRunId", "nodeKey", "attempt");
@@ -0,0 +1,2 @@
1
+ -- AlterTable
2
+ ALTER TABLE "WorkflowRun" ADD COLUMN "initialRunPayload" JSONB;
@@ -0,0 +1,2 @@
1
+ -- AlterTable
2
+ ALTER TABLE "WorkflowDefinition" ADD COLUMN "type" TEXT;
@@ -0,0 +1,2 @@
1
+ -- AlterTable
2
+ ALTER TABLE "WorkflowRunStepResult" ADD COLUMN "tokenUsage" JSONB;
@@ -0,0 +1,3 @@
1
+ # Please do not edit this file manually
2
+ # It should be added in your version-control system (e.g., Git)
3
+ provider = "sqlite"
Binary file