@akanjs/cli 3.0.0-beta.9 → 3.0.1

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 (224) hide show
  1. package/.build-stamp +1 -1
  2. package/CodeAgent-zfab7pkn.js +9 -0
  3. package/CodeAgentRpcHost-p7h6n2hp.js +7 -0
  4. package/CodeAgentRpcListener-7p7z5dd7.js +97 -0
  5. package/CodeTui-0zhnr0pw.js +1457 -0
  6. package/README.ko.md +83 -28
  7. package/README.md +70 -27
  8. package/TunnelShare-cwh9ezsm.js +9 -0
  9. package/{agent.command-0q17pnrs.js → agent.command-aja6z9mn.js} +8 -9
  10. package/akanCode.js +102 -0
  11. package/application.command-049ehgx3.js +246 -0
  12. package/{applicationBuildRunner-kxwbssgn.js → applicationBuildRunner-75n5rpwp.js} +121 -77
  13. package/buildBatch.proc.js +120 -32
  14. package/cloud.command-gw4kqxt8.js +95 -0
  15. package/cloud.script-c723cpcb.js +20 -0
  16. package/code.command-x9t6z5nw.js +154 -0
  17. package/commandManifest.json +1 -1
  18. package/consoleToStderr-h5bryj94.js +7 -0
  19. package/context.command-yfbe1rtd.js +48 -0
  20. package/context.runner-erfe68j5.js +21 -0
  21. package/{dependencyScanner-shs82ynp.js → dependencyScanner-06z2dmrr.js} +2 -2
  22. package/{devTui-m1atgkc9.js → devTui-q7k7bakd.js} +122 -40
  23. package/fileSys-wzzrntkw.js +9 -0
  24. package/guideline.command-kq9gp690.js +42 -0
  25. package/guidelines/agentRule/agentRule.instruction.md +154 -26
  26. package/guidelines/conventions/conventions.instruction.md +138 -48
  27. package/guidelines/mcpRule/mcpRule.instruction.md +7 -5
  28. package/guidelines/queryRule/queryRule.instruction.md +21 -7
  29. package/guidelines/runtimeRule/runtimeRule.instruction.md +291 -6
  30. package/guidelines/ssrRule/ssrRule.instruction.md +4 -2
  31. package/guidelines/transportRule/transportRule.instruction.md +10 -8
  32. package/guidelines/workspaceOnboarding/workspaceOnboarding.instruction.md +20 -0
  33. package/guidelines/workspaceRecipes/workspaceRecipes.instruction.md +66 -3
  34. package/incrementalBuilder.proc.js +564 -109
  35. package/{index-2tv3fdx4.js → index-150s07n8.js} +1230 -1459
  36. package/{index-vyvre9en.js → index-25fvrxmy.js} +6 -2
  37. package/{index-kcxmv48c.js → index-2ahj896a.js} +45 -79
  38. package/index-2wc41k5w.js +49 -0
  39. package/index-3hx1z96c.js +87 -0
  40. package/{index-q0y2jq9j.js → index-52w0fvh8.js} +21 -4
  41. package/{index-04bk599g.js → index-5g4rkrvt.js} +10 -17
  42. package/index-5pvxf7z0.js +53 -0
  43. package/index-5q14pwzd.js +69 -0
  44. package/{index-vxtad5bd.js → index-66yspb67.js} +5 -8
  45. package/index-7md2g9vw.js +6 -0
  46. package/index-7p4c0yer.js +1058 -0
  47. package/{index-d43r08tf.js → index-8b639zes.js} +77 -150
  48. package/{index-ktb5njgy.js → index-8kvy8qb4.js} +49 -99
  49. package/index-94s080qm.js +266 -0
  50. package/index-9dp031by.js +12 -0
  51. package/{index-0g7r8xz3.js → index-a37by9hn.js} +114 -232
  52. package/{index-k2j1hc4r.js → index-b95yhqjr.js} +12 -12
  53. package/{index-3d9y066c.js → index-bjwxs904.js} +9 -8
  54. package/{index-2xp0kfkt.js → index-br8pkrk1.js} +37 -25
  55. package/index-c14nsvnv.js +700 -0
  56. package/index-c6eggbee.js +123 -0
  57. package/index-d2242ksy.js +99 -0
  58. package/{index-92zztqy1.js → index-dy0jx9ay.js} +2 -17
  59. package/{index-a64esmtb.js → index-fkvb79qe.js} +523 -1022
  60. package/index-h54yj9wr.js +1119 -0
  61. package/{index-by5gpp8x.js → index-hj6w4ka1.js} +2 -1
  62. package/{index-y6n8nmny.js → index-kn5d4jmg.js} +75 -203
  63. package/index-m3xsb1ms.js +4300 -0
  64. package/{index-gyd220p2.js → index-mb59b8x0.js} +554 -577
  65. package/{index-j9yhg404.js → index-mzjb6zp4.js} +4 -7
  66. package/index-p6pbz9n5.js +25 -0
  67. package/{index-sj5vxr8f.js → index-qe71g4ze.js} +983 -898
  68. package/index-rfcz04w9.js +187 -0
  69. package/{index-hwkygn9s.js → index-senscydg.js} +331 -36
  70. package/{index-ffvk10zz.js → index-vs8mefhy.js} +107 -241
  71. package/index-wa5jbxj1.js +760 -0
  72. package/index-y5ga5w9t.js +2729 -0
  73. package/{index-9077wzd2.js → index-y7hx1ygz.js} +43 -26
  74. package/{index-h7yw2z9n.js → index-zzvvc845.js} +8 -14
  75. package/index.js +23 -22
  76. package/{library.command-qzzbj6d8.js → library.command-keqjevpp.js} +4 -5
  77. package/{localRegistry.command-vyrgg4xw.js → localRegistry.command-pydeq5zf.js} +23 -43
  78. package/{module.command-rq5hq3ax.js → module.command-dkrnqx3v.js} +8 -12
  79. package/{package.command-d9hd6v9n.js → package.command-wmc0ys5y.js} +6 -7
  80. package/package.json +15 -7
  81. package/{page.command-126d56te.js → page.command-tf3erhrv.js} +4 -5
  82. package/{primitive.command-taxd1538.js → primitive.command-7hqpegj4.js} +9 -23
  83. package/prompter-76k56b37.js +8 -0
  84. package/{quality.command-6gsna0a3.js → quality.command-8122axq3.js} +205 -377
  85. package/{recipeScanner-fpagtgc1.js → recipeScanner-4b69ybe0.js} +1 -1
  86. package/{repair.command-tq2dgy72.js → repair.command-mcy12h0n.js} +11 -35
  87. package/{routeSourceValidator-apyqw7wk.js → routeSourceValidator-7ycnfz0e.js} +0 -6
  88. package/{scalar.command-3bcmrrkv.js → scalar.command-vvvbzttc.js} +7 -11
  89. package/skills/akan-code/SKILL.md +130 -0
  90. package/skills/akan-debug/SKILL.md +42 -0
  91. package/skills/akan-deps/SKILL.md +50 -0
  92. package/skills/akan-err/SKILL.md +39 -0
  93. package/skills/akan-module/SKILL.md +45 -0
  94. package/skills/akan-scaffold/SKILL.md +76 -0
  95. package/skills/akan-scalar/SKILL.md +52 -0
  96. package/skills/akan-service/SKILL.md +34 -0
  97. package/skills/akan-store/SKILL.md +67 -0
  98. package/skills/akan-ui/SKILL.md +63 -0
  99. package/skills/akan-validate/SKILL.md +44 -0
  100. package/{subspace.command-eddzqpx3.js → subspace.command-pzvqfy5h.js} +53 -62
  101. package/templates/__scalar/__model__/__model__.abstract.md.template +8 -0
  102. package/templates/app/page/_index.tsx +257 -258
  103. package/templates/app/page/_layout.tsx +5 -1
  104. package/templates/app/page/_overrides.tsx +12 -0
  105. package/templates/app/page/styles.css.template +316 -14
  106. package/templates/app/public/apple-touch-icon.png +0 -0
  107. package/templates/app/public/favicon.ico +0 -0
  108. package/templates/app/public/jelly/cloud.webp +0 -0
  109. package/templates/app/public/jelly/comet.webp +0 -0
  110. package/templates/app/public/jelly/moon.webp +0 -0
  111. package/templates/app/public/jelly/planet.webp +0 -0
  112. package/templates/app/public/jelly/rocket.webp +0 -0
  113. package/templates/app/public/jelly/star.webp +0 -0
  114. package/templates/app/public/jelly/sugar.webp +0 -0
  115. package/templates/app/public/logo.png +0 -0
  116. package/templates/app/ui/Recipe/index.ts +9 -0
  117. package/templates/app/ui/Recipe/jellyButton.ts +63 -0
  118. package/templates/appSample/lib/__scalar/workHistory/workHistory.abstract.ts +8 -39
  119. package/templates/appSample/lib/_noti/noti.abstract.ts +6 -29
  120. package/templates/appSample/lib/task/Task.Unit.tsx +1 -1
  121. package/templates/appSample/lib/task/Task.Util.tsx +10 -13
  122. package/templates/appSample/lib/task/Task.View.tsx +2 -2
  123. package/templates/appSample/lib/task/Task.Zone.tsx +5 -2
  124. package/templates/appSample/lib/task/task.abstract.ts +12 -32
  125. package/templates/appSample/lib/task/task.signal.spec.ts +1 -15
  126. package/templates/appSample/lib/task/task.signal.test.ts +15 -1
  127. package/templates/appSample/lib/task/task.signal.ts +10 -8
  128. package/templates/appSample/page/task/[taskId]/_index.tsx +6 -6
  129. package/templates/appSample/page/task/[taskId]/edit.tsx +5 -4
  130. package/templates/appSample/page/task/_index.tsx +4 -3
  131. package/templates/appSample/page/task/_layout.tsx +1 -1
  132. package/templates/appSample/page/task/new.tsx +5 -4
  133. package/templates/appSample/srvkit/{AuthGuard.ts → guards.ts} +7 -4
  134. package/templates/appSample/srvkit/{SessionInternalArg.ts → internalArgs.ts} +6 -4
  135. package/templates/appSample/ui/GlobalLoading.tsx +2 -1
  136. package/templates/appSample/ui/QuantityControl.tsx +3 -3
  137. package/templates/client.ts +7 -30
  138. package/templates/crudPages/[__model__Id]/edit/page.tsx +2 -1
  139. package/templates/crudPages/[__model__Id]/page.tsx +2 -1
  140. package/templates/crudPages/new/page.tsx +2 -1
  141. package/templates/crudPages/page.tsx +2 -1
  142. package/templates/crudSinglePage/page.tsx +2 -1
  143. package/templates/lib/__lib/lib.dictionary.ts +0 -2
  144. package/templates/lib/__lib/lib.document.ts +0 -2
  145. package/templates/lib/sig.ts +8 -30
  146. package/templates/localDev/docker-compose.yaml.template +3 -14
  147. package/templates/module/__model__.signal.ts +12 -4
  148. package/templates/pkgRoot/tsconfig.json.template +2 -7
  149. package/templates/server.ts +1 -3
  150. package/templates/service/__model__.abstract.md.template +8 -0
  151. package/templates/workspaceRoot/.gitignore.template +0 -1
  152. package/templates/workspaceRoot/AGENTS.md.template +6 -0
  153. package/templates/workspaceRoot/package.json.template +1 -3
  154. package/tunnel.command-82zz5xnq.js +129 -0
  155. package/{typeChecker-3xgrzc2v.js → typeChecker-px49mezc.js} +1 -1
  156. package/typecheck.proc.js +1 -1
  157. package/workflow.command-y8x3kgjv.js +79 -0
  158. package/{workspace.command-06wvstgr.js → workspace.command-jvsb7brc.js} +79 -109
  159. package/abstractCompactor-gmkc0z8j.js +0 -102
  160. package/application.command-18y0s485.js +0 -204
  161. package/applicationReleasePackager-4yasxwv9.js +0 -244
  162. package/capacitorApp-36rbr858.js +0 -12
  163. package/cloud.command-av97ndh6.js +0 -94
  164. package/cloud.script-cm11xjdz.js +0 -20
  165. package/context.command-5v37ef3n.js +0 -81
  166. package/devTuiView-0hc2emhe.js +0 -9
  167. package/getDirname-dr3jz1xg.js +0 -7
  168. package/guideline.command-4pz9g1rt.js +0 -360
  169. package/guidelines/agentRule/agentRule.generate.json +0 -31
  170. package/guidelines/componentRule/componentRule.generate.json +0 -31
  171. package/guidelines/conventions/conventions.generate.json +0 -25
  172. package/guidelines/cssRule/cssRule.generate.json +0 -31
  173. package/guidelines/docPageRule/docPageRule.generate.json +0 -31
  174. package/guidelines/docPageRule/docPageRule.instruction.md +0 -25
  175. package/guidelines/docSyncRule/docSyncRule.generate.json +0 -31
  176. package/guidelines/docSyncRule/docSyncRule.instruction.md +0 -25
  177. package/guidelines/enumConstant/enumConstant.generate.json +0 -31
  178. package/guidelines/enumConstant/enumConstant.instruction.md +0 -28
  179. package/guidelines/fieldRule/fieldRule.generate.json +0 -31
  180. package/guidelines/framework/framework.generate.json +0 -32
  181. package/guidelines/mcpRule/mcpRule.generate.json +0 -35
  182. package/guidelines/modelConstant/modelConstant.generate.json +0 -32
  183. package/guidelines/modelDictionary/modelDictionary.generate.json +0 -32
  184. package/guidelines/modelDocument/modelDocument.generate.json +0 -31
  185. package/guidelines/modelService/modelService.generate.json +0 -31
  186. package/guidelines/modelSignal/modelSignal.generate.json +0 -31
  187. package/guidelines/modelStore/modelStore.generate.json +0 -31
  188. package/guidelines/modelTemplate/modelTemplate.generate.json +0 -31
  189. package/guidelines/modelUnit/modelUnit.generate.json +0 -31
  190. package/guidelines/modelUtil/modelUtil.generate.json +0 -31
  191. package/guidelines/modelView/modelView.generate.json +0 -31
  192. package/guidelines/modelZone/modelZone.generate.json +0 -31
  193. package/guidelines/moduleCodegen/moduleCodegen.generate.json +0 -31
  194. package/guidelines/moduleCodegen/moduleCodegen.instruction.md +0 -28
  195. package/guidelines/moduleOverview/moduleOverview.generate.json +0 -31
  196. package/guidelines/queryRule/queryRule.generate.json +0 -31
  197. package/guidelines/recipeRule/recipeRule.generate.json +0 -31
  198. package/guidelines/runtimeRule/runtimeRule.generate.json +0 -25
  199. package/guidelines/scalarConstant/scalarConstant.generate.json +0 -32
  200. package/guidelines/scalarDictionary/scalarDictionary.generate.json +0 -32
  201. package/guidelines/scalarModule/scalarModule.generate.json +0 -31
  202. package/guidelines/sharedUiUsage/sharedUiUsage.generate.json +0 -31
  203. package/guidelines/sharedUiUsage/sharedUiUsage.instruction.md +0 -25
  204. package/guidelines/ssrRule/ssrRule.generate.json +0 -31
  205. package/guidelines/transportRule/transportRule.generate.json +0 -31
  206. package/guidelines/utilUiUsage/utilUiUsage.generate.json +0 -31
  207. package/guidelines/utilUiUsage/utilUiUsage.instruction.md +0 -25
  208. package/guidelines/workspaceOnboarding/workspaceOnboarding.generate.json +0 -24
  209. package/guidelines/workspaceRecipes/workspaceRecipes.generate.json +0 -33
  210. package/index-47pj3aee.js +0 -76
  211. package/index-5ystnsd5.js +0 -841
  212. package/index-6wwzs1bc.js +0 -7
  213. package/index-a17x49vg.js +0 -229
  214. package/index-m0xccmmm.js +0 -228
  215. package/index-meh558jy.js +0 -65
  216. package/index-rtxxan88.js +0 -471
  217. package/index-te54x9zm.js +0 -338
  218. package/index-w8kmx1b6.js +0 -2176
  219. package/index-wt7qrtd4.js +0 -1516
  220. package/templates/__scalar/__model__/__model__.abstract.md +0 -28
  221. package/templates/module/__model__.abstract.md +0 -28
  222. package/templates/service/__model__.abstract.md +0 -28
  223. package/templates/workspaceRoot/patches/react-dom@19.2.7.patch.template +0 -62
  224. package/workflow.command-gtdnzvbz.js +0 -108
@@ -1,28 +0,0 @@
1
- # Scalar Abstract
2
-
3
- ## Purpose
4
-
5
- Describe the embedded value object or reusable data concept this scalar owns.
6
-
7
- ## Domain Rules
8
-
9
- - Keep durable validation and meaning rules here.
10
- - Avoid repeating field types that are already clear in the constant file.
11
-
12
- ## Data Meaning
13
-
14
- Explain the meaning of the scalar fields and when this scalar should be used.
15
-
16
- ## Workflows
17
-
18
- Describe lifecycle or normalization behavior when relevant.
19
-
20
- ## Agent Notes
21
-
22
- - Read this abstract before changing the scalar.
23
- - Update this file when validation meaning, public behavior, or reuse rules change.
24
- - Do not update this file for formatting-only, import-only, or style-only changes.
25
-
26
- ## Related Modules
27
-
28
- - None yet.
@@ -1,28 +0,0 @@
1
- # Module Abstract
2
-
3
- ## Purpose
4
-
5
- Describe the business concept this module owns.
6
-
7
- ## Domain Rules
8
-
9
- - Keep durable business invariants here.
10
- - Avoid repeating field types that are already clear in the constant file.
11
-
12
- ## Data Meaning
13
-
14
- Explain the meaning of important data only when the code does not make the intent obvious.
15
-
16
- ## Workflows
17
-
18
- Describe create, update, approval, deletion, state transition, or other business flows.
19
-
20
- ## Agent Notes
21
-
22
- - Read this abstract before changing the module.
23
- - Update this file when business invariants, workflows, or public behavior change.
24
- - Do not update this file for formatting-only, import-only, or style-only changes.
25
-
26
- ## Related Modules
27
-
28
- - None yet.
@@ -1,28 +0,0 @@
1
- # Service Abstract
2
-
3
- ## Purpose
4
-
5
- Describe the business workflow or integration this service owns.
6
-
7
- ## Domain Rules
8
-
9
- - Keep durable business invariants here.
10
- - Avoid repeating implementation details already clear in the service or signal files.
11
-
12
- ## Data Meaning
13
-
14
- Explain important input, output, and state meanings only when the code does not make the intent obvious.
15
-
16
- ## Workflows
17
-
18
- Describe the service workflows, background jobs, external calls, or state transitions.
19
-
20
- ## Agent Notes
21
-
22
- - Read this abstract before changing the service module.
23
- - Keep business behavior in service code and expose callable actions through signals.
24
- - Update this file when business invariants, workflows, or public behavior change.
25
-
26
- ## Related Modules
27
-
28
- - None yet.
@@ -1,62 +0,0 @@
1
- diff --git a/cjs/react-dom-client.development.js b/cjs/react-dom-client.development.js
2
- index 8c860aca7db6a1ca74788209d100f10ae5f085fa..fa5f3344475e66bc04befe3cc631a1f4f710228b 100644
3
- --- a/cjs/react-dom-client.development.js
4
- +++ b/cjs/react-dom-client.development.js
5
- @@ -18607,8 +18607,9 @@
6
- (workInProgressRootRenderLanes & 62914560) ===
7
- workInProgressRootRenderLanes &&
8
- now$1() - globalMostRecentFallbackTime < FALLBACK_THROTTLE_MS)
9
- - ? (executionContext & RenderContext) === NoContext &&
10
- - prepareFreshStack(root, 0)
11
- + ? (executionContext & RenderContext) === NoContext
12
- + ? prepareFreshStack(root, 0)
13
- + : (workInProgressRootPingedLanes |= pingedLanes)
14
- : (workInProgressRootPingedLanes |= pingedLanes),
15
- workInProgressSuspendedRetryLanes === workInProgressRootRenderLanes &&
16
- (workInProgressSuspendedRetryLanes = 0));
17
- diff --git a/cjs/react-dom-client.production.js b/cjs/react-dom-client.production.js
18
- index bbeab5ad7211c6fa240c790988898a47967b2469..5ebddf28cafddadf02af2edf49b98c1327bc31af 100644
19
- --- a/cjs/react-dom-client.production.js
20
- +++ b/cjs/react-dom-client.production.js
21
- @@ -11856,7 +11856,9 @@ function pingSuspendedRoot(root, wakeable, pingedLanes) {
22
- (workInProgressRootRenderLanes & 62914560) ===
23
- workInProgressRootRenderLanes &&
24
- 300 > now() - globalMostRecentFallbackTime)
25
- - ? 0 === (executionContext & 2) && prepareFreshStack(root, 0)
26
- + ? 0 === (executionContext & 2)
27
- + ? prepareFreshStack(root, 0)
28
- + : (workInProgressRootPingedLanes |= pingedLanes)
29
- : (workInProgressRootPingedLanes |= pingedLanes),
30
- workInProgressSuspendedRetryLanes === workInProgressRootRenderLanes &&
31
- (workInProgressSuspendedRetryLanes = 0));
32
- diff --git a/cjs/react-dom-profiling.development.js b/cjs/react-dom-profiling.development.js
33
- index 0df4ce8bc7ab7574e6c18fc0356d85303f4970aa..e2ebd50133473319eb3d191ff790700cda497309 100644
34
- --- a/cjs/react-dom-profiling.development.js
35
- +++ b/cjs/react-dom-profiling.development.js
36
- @@ -18615,8 +18615,9 @@
37
- (workInProgressRootRenderLanes & 62914560) ===
38
- workInProgressRootRenderLanes &&
39
- now$1() - globalMostRecentFallbackTime < FALLBACK_THROTTLE_MS)
40
- - ? (executionContext & RenderContext) === NoContext &&
41
- - prepareFreshStack(root, 0)
42
- + ? (executionContext & RenderContext) === NoContext
43
- + ? prepareFreshStack(root, 0)
44
- + : (workInProgressRootPingedLanes |= pingedLanes)
45
- : (workInProgressRootPingedLanes |= pingedLanes),
46
- workInProgressSuspendedRetryLanes === workInProgressRootRenderLanes &&
47
- (workInProgressSuspendedRetryLanes = 0));
48
- diff --git a/cjs/react-dom-profiling.profiling.js b/cjs/react-dom-profiling.profiling.js
49
- index 91621dbe568cf0f924805e7492ff7f487c8254b5..315c5e88d3e03f841ac31ccee4fc17e19e196363 100644
50
- --- a/cjs/react-dom-profiling.profiling.js
51
- +++ b/cjs/react-dom-profiling.profiling.js
52
- @@ -13672,7 +13672,9 @@ function pingSuspendedRoot(root, wakeable, pingedLanes) {
53
- (workInProgressRootRenderLanes & 62914560) ===
54
- workInProgressRootRenderLanes &&
55
- 300 > now$1() - globalMostRecentFallbackTime)
56
- - ? 0 === (executionContext & 2) && prepareFreshStack(root, 0)
57
- + ? 0 === (executionContext & 2)
58
- + ? prepareFreshStack(root, 0)
59
- + : (workInProgressRootPingedLanes |= pingedLanes)
60
- : (workInProgressRootPingedLanes |= pingedLanes),
61
- workInProgressSuspendedRetryLanes === workInProgressRootRenderLanes &&
62
- (workInProgressSuspendedRetryLanes = 0));
@@ -1,108 +0,0 @@
1
- // @bun
2
- import {
3
- Workspace,
4
- script,
5
- command
6
- } from "./index-0g7r8xz3.js";
7
- import"./index-q0y2jq9j.js";
8
- import"./index-2tv3fdx4.js";
9
- import"./index-6wwzs1bc.js";
10
- import {
11
- createWorkflowStepRegistry
12
- } from "./index-gyd220p2.js";
13
- import"./index-m0xccmmm.js";
14
- import"./index-te54x9zm.js";
15
- import {
16
- ModuleScript
17
- } from "./index-5ystnsd5.js";
18
- import"./index-vyvre9en.js";
19
- import"./index-h7yw2z9n.js";
20
- import {
21
- PrimitiveScript
22
- } from "./index-d43r08tf.js";
23
- import {
24
- ScalarScript
25
- } from "./index-a17x49vg.js";
26
- import"./index-by5gpp8x.js";
27
- import"./index-ktb5njgy.js";
28
- import {
29
- WorkflowRunner
30
- } from "./index-ffvk10zz.js";
31
-
32
- // pkgs/@akanjs/cli/workflow/workflow.script.ts
33
- import { Logger } from "akanjs/common";
34
- class WorkflowScript extends script("workflow", [WorkflowRunner, ModuleScript, ScalarScript, PrimitiveScript]) {
35
- async workflow(action, workflow, inputs, {
36
- format = "markdown",
37
- out = null,
38
- dryRun = false,
39
- workspace
40
- } = {}) {
41
- if (action === "list") {
42
- Logger.rawLog(this.workflowRunner.list({ format }));
43
- return;
44
- }
45
- if (!workflow)
46
- throw new Error(`Workflow name is required for "${action}".`);
47
- if (action === "explain") {
48
- Logger.rawLog(this.workflowRunner.explain(workflow, { format }));
49
- return;
50
- }
51
- if (action === "plan") {
52
- Logger.rawLog(await this.workflowRunner.plan(workflow, inputs, { format, out }));
53
- return;
54
- }
55
- if (action === "apply") {
56
- if (!workspace)
57
- throw new Error("Workspace is required for workflow apply.");
58
- Logger.rawLog(await this.workflowRunner.apply(workflow, {
59
- dryRun,
60
- format,
61
- workspace,
62
- registry: createWorkflowStepRegistry({
63
- workspace,
64
- createModule: (sys, module) => this.moduleScript.createModuleTemplate(sys, module),
65
- createScalar: (sys, scalar) => this.scalarScript.createScalar(sys, scalar),
66
- createUi: (input) => this.primitiveScript.createUi(workspace, input),
67
- addField: (input) => this.primitiveScript.addField(workspace, input),
68
- addEnumField: (input) => this.primitiveScript.addEnumField(workspace, input),
69
- addMutation: (input) => this.primitiveScript.addMutation(workspace, input),
70
- addSlice: (input) => this.primitiveScript.addSlice(workspace, input)
71
- })
72
- }));
73
- return;
74
- }
75
- if (action === "validate") {
76
- if (!workspace)
77
- throw new Error("Workspace is required for workflow validate.");
78
- Logger.rawLog(await this.workflowRunner.validate(workflow, { format, workspace }));
79
- return;
80
- }
81
- if (action === "report") {
82
- if (!workspace)
83
- throw new Error("Workspace is required for workflow report.");
84
- Logger.rawLog(await this.workflowRunner.report(workflow, { format, workspace }));
85
- return;
86
- }
87
- throw new Error(`Unknown workflow action: ${action}. Use list, explain, plan, apply, validate, or report.`);
88
- }
89
- }
90
-
91
- // pkgs/@akanjs/cli/workflow/workflow.command.ts
92
- class WorkflowCommand extends command("workflow", [WorkflowScript], ({ public: target }) => ({
93
- workflow: target({ desc: "List, explain, plan, apply, validate, or report Akan workflows" }).arg("action", String, {
94
- desc: "list, explain, plan, apply, validate, or report",
95
- enum: ["list", "explain", "plan", "apply", "validate", "report"]
96
- }).arg("workflow", String, { desc: "workflow name, plan path, or run id", nullable: true }).with(Workspace).option("format", String, {
97
- desc: "output format",
98
- flag: "o",
99
- default: "markdown",
100
- enum: ["markdown", "json"]
101
- }).option("out", String, { flag: "w", desc: "write workflow plan JSON to this path", nullable: true }).option("dryRun", Boolean, { flag: "r", desc: "show predicted apply report without writing files", default: false }).option("app", String, { desc: "target app or library name", nullable: true }).option("module", String, { desc: "target module name", nullable: true }).option("field", String, { desc: "field name", nullable: true }).option("type", String, { desc: "field type or scalar name", nullable: true }).option("values", String, { flag: "l", desc: "comma-separated values", nullable: true }).option("default", String, { desc: "default value", nullable: true }).option("scalar", String, { flag: "c", desc: "scalar name", nullable: true }).option("surface", String, { flag: "u", desc: "UI surface name", nullable: true }).option("mutation", String, { flag: "n", desc: "mutation name", nullable: true }).option("slice", String, { flag: "i", desc: "slice name", nullable: true }).exec(async function(action, workflow, workspace, format, out, dryRun, app, module, field, typeName, values, defaultValue, scalar, surface, mutation, slice) {
102
- await this.workflowScript.workflow(action, workflow, { app, module, field, type: typeName, values, default: defaultValue, scalar, surface, mutation, slice }, { format, out, dryRun, workspace });
103
- })
104
- })) {
105
- }
106
- export {
107
- WorkflowCommand
108
- };