@akanjs/cli 3.1.0-rc.2 → 3.1.0-rc.21

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 (103) hide show
  1. package/.build-stamp +1 -1
  2. package/{CodeAgent-q50k4s45.js → CodeAgent-gzfc5t52.js} +2 -2
  3. package/{CodeAgentRpcHost-p7h6n2hp.js → CodeAgentRpcHost-9g27hmer.js} +1 -1
  4. package/{CodeTui-62g35ztk.js → CodeTui-bpsjs8wz.js} +47 -4
  5. package/TunnelShare-tfrnftgr.js +14 -0
  6. package/{agent.command-adfd5299.js → agent.command-67ysh3n6.js} +5 -5
  7. package/akanCode.js +7 -5
  8. package/{application.command-hj3gv1rx.js → application.command-q0tqw5pc.js} +38 -11
  9. package/{applicationBuildRunner-by10r9gf.js → applicationBuildRunner-wsszr305.js} +16 -9
  10. package/buildBatch.proc.js +7 -7
  11. package/{cloud.command-k2fhaape.js → cloud.command-e7tkxyx6.js} +17 -16
  12. package/cloud.script-krzh3d7k.js +24 -0
  13. package/{code.command-kt5zgcc2.js → code.command-ttk8tje2.js} +25 -12
  14. package/commandManifest.json +1 -1
  15. package/{context.command-8fgn42jw.js → context.command-bdsk2z2r.js} +17 -16
  16. package/context.runner-bxzv0gm0.js +25 -0
  17. package/{dependencyScanner-06z2dmrr.js → dependencyScanner-3afj2vt1.js} +1 -1
  18. package/{guideline.command-3yxxr2mm.js → guideline.command-man90n70.js} +2 -2
  19. package/guidelines/agentRule/agentRule.instruction.md +25 -10
  20. package/guidelines/conventions/conventions.instruction.md +486 -1084
  21. package/guidelines/cssRule/cssRule.instruction.md +16 -1
  22. package/guidelines/fieldRule/fieldRule.instruction.md +74 -0
  23. package/guidelines/framework/framework.instruction.md +4 -7
  24. package/guidelines/mcpRule/mcpRule.instruction.md +16 -9
  25. package/guidelines/modelConstant/modelConstant.instruction.md +2 -1
  26. package/guidelines/modelStore/modelStore.instruction.md +16 -0
  27. package/guidelines/pageRule/pageRule.instruction.md +80 -0
  28. package/guidelines/queryRule/queryRule.instruction.md +47 -12
  29. package/guidelines/runtimeRule/runtimeRule.instruction.md +89 -2
  30. package/guidelines/ssrRule/ssrRule.instruction.md +13 -0
  31. package/guidelines/transportRule/transportRule.instruction.md +107 -8
  32. package/guidelines/workspaceOnboarding/workspaceOnboarding.instruction.md +4 -4
  33. package/guidelines/workspaceRecipes/workspaceRecipes.instruction.md +70 -7
  34. package/incrementalBuilder.proc.js +4 -4
  35. package/{index-rhbabmja.js → index-033wne2j.js} +260 -259
  36. package/{index-xpdgxsj5.js → index-1r5a8bzx.js} +2216 -2216
  37. package/{index-jwqtchha.js → index-27y8t17p.js} +1 -1
  38. package/{index-wa5jbxj1.js → index-2mrn1mrg.js} +1 -0
  39. package/{index-t7nws9mx.js → index-2w8j2fnv.js} +661 -448
  40. package/{index-0909wckt.js → index-35m6bzm7.js} +238 -236
  41. package/{index-sqfdmb5b.js → index-4393nb4b.js} +4 -4
  42. package/{index-sby8fe1p.js → index-48edp6q4.js} +1 -1
  43. package/{index-g0vwzy9m.js → index-4v43h00g.js} +20 -21
  44. package/{index-azh29dc8.js → index-54wc2phm.js} +19 -14
  45. package/{index-k9rrten6.js → index-5nd1wtkv.js} +92 -94
  46. package/index-62md4dwy.js +260 -0
  47. package/{index-hnby7p9n.js → index-75n5q4ph.js} +7 -7
  48. package/{index-fjsv10hd.js → index-844q7f8z.js} +7 -7
  49. package/{index-tv8fjaba.js → index-8jehkey8.js} +4 -4
  50. package/{index-bea2gwc6.js → index-9mt4smfy.js} +2 -2
  51. package/{index-d2242ksy.js → index-at7bz0xq.js} +3 -0
  52. package/{index-3hx1z96c.js → index-bqbf654f.js} +1 -1
  53. package/{index-8zdwpxef.js → index-cae9m5jz.js} +119 -81
  54. package/{index-tz5evhdr.js → index-ebarbgba.js} +6 -6
  55. package/{index-2etqq75t.js → index-g6ax17x4.js} +1114 -1082
  56. package/{index-h85cxfkg.js → index-g9ks2k8c.js} +2 -2
  57. package/{index-nq045px5.js → index-h3r3nr9y.js} +356 -307
  58. package/{index-20cebtth.js → index-h6czey01.js} +79 -24
  59. package/{index-6726qr1m.js → index-jrmzcp66.js} +57 -58
  60. package/{index-q958tqqg.js → index-m9jj544v.js} +1 -1
  61. package/{index-8935h3n1.js → index-mdjc93e1.js} +1 -1
  62. package/{index-rk9sdys3.js → index-nv79n88g.js} +5 -5
  63. package/{index-kc8z134d.js → index-nx64dz92.js} +38 -15
  64. package/{index-z507nzhg.js → index-p2r64bpa.js} +4 -4
  65. package/{index-nq2ja5e0.js → index-pg1t468s.js} +3 -3
  66. package/{index-3reaaa1h.js → index-rc51f9ht.js} +29 -27
  67. package/{index-e9prnmyt.js → index-ta1dychm.js} +3 -3
  68. package/{index-2ahj896a.js → index-tvehn2sp.js} +1 -1
  69. package/{index-31ce9vhg.js → index-vkb9m4z7.js} +80 -38
  70. package/{index-58vvz603.js → index-xsd96yzw.js} +1 -1
  71. package/{index-pyxn1b53.js → index-zv5s8x58.js} +13 -13
  72. package/index.js +22 -22
  73. package/{library.command-8tw59xzj.js → library.command-6amzsrb8.js} +3 -3
  74. package/{localRegistry.command-tf3dmznd.js → localRegistry.command-yqc0nyhh.js} +15 -14
  75. package/{module.command-9vm8hffy.js → module.command-10x6jv6c.js} +5 -5
  76. package/{package.command-erbxe2tz.js → package.command-pwfvecjf.js} +4 -4
  77. package/package.json +21 -21
  78. package/{page.command-jpavcj0p.js → page.command-ahhgx9y1.js} +3 -3
  79. package/{pipeline.command-b8rzvjvv.js → pipeline.command-1ptr3e9y.js} +3 -3
  80. package/{primitive.command-sm32chzk.js → primitive.command-g5xwv6tj.js} +6 -6
  81. package/{projectTypecheck-jamtx95x.js → projectTypecheck-fx8x7cat.js} +1 -1
  82. package/{quality.command-pkd17n6y.js → quality.command-fw9ck061.js} +4 -4
  83. package/{repair.command-8y4mq6hs.js → repair.command-g8kecj96.js} +5 -5
  84. package/{scalar.command-q8khmyx5.js → scalar.command-fprap51w.js} +4 -4
  85. package/skills/akan-code/SKILL.md +4 -0
  86. package/skills/akan-store/SKILL.md +2 -1
  87. package/{subspace.command-51n0ykbx.js → subspace.command-sc0t527y.js} +11 -10
  88. package/templates/appSample/lib/task/Task.Util.tsx +7 -7
  89. package/templates/appSample/lib/task/Task.Zone.tsx +1 -1
  90. package/templates/appSample/ui/QuantityControl.tsx +2 -2
  91. package/templates/crudSinglePage/page.tsx +1 -1
  92. package/templates/lib/cnst.ts +0 -1
  93. package/templates/migration/__migrationId__.ts +23 -0
  94. package/templates/server.ts +8 -1
  95. package/templates/workspaceRoot/.gitignore.template +23 -52
  96. package/templates/workspaceRoot/biome.json.template +1 -1
  97. package/{tunnel.command-7820vtxq.js → tunnel.command-mqnsqbwf.js} +8 -7
  98. package/{workflow.command-n5sv4wqz.js → workflow.command-j0jgkr13.js} +10 -10
  99. package/{workspace.command-zdy60jh8.js → workspace.command-1r9hvvw0.js} +29 -28
  100. package/TunnelShare-f1egrktx.js +0 -13
  101. package/cloud.script-z8p5dz7e.js +0 -23
  102. package/context.runner-hnh0rg7m.js +0 -24
  103. package/index-n68jx79w.js +0 -120
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@akanjs/cli",
3
- "version": "3.1.0-rc.2",
3
+ "version": "3.1.0-rc.21",
4
4
  "sourceType": "module",
5
5
  "type": "module",
6
6
  "publishConfig": {
@@ -31,31 +31,31 @@
31
31
  "./package.json": "./package.json"
32
32
  },
33
33
  "dependencies": {
34
- "@earendil-works/chord": "0.86.1",
35
- "@earendil-works/pi-agent-core": "0.86.1",
36
- "@earendil-works/pi-ai": "0.86.1",
37
- "@earendil-works/pi-coding-agent": "0.86.1",
38
- "@earendil-works/pi-telemetry": "0.86.1",
39
- "@earendil-works/pi-tui": "0.86.1",
40
- "@inquirer/prompts": "^8.4.3",
41
- "@tailwindcss/node": "^4.3.0",
42
- "akanjs": "3.1.0-rc.2",
43
- "chalk": "^5.6.2",
44
- "commander": "^14.0.3",
45
- "dayjs": "^1.11.20",
46
- "fontaine": "^0.8.0",
34
+ "@earendil-works/pi-agent-core": "1.3.0",
35
+ "@earendil-works/pi-ai": "1.3.0",
36
+ "@earendil-works/pi-codemode": "1.3.0",
37
+ "@earendil-works/pi-coding-agent": "1.3.0",
38
+ "@earendil-works/pi-mcp": "1.3.0",
39
+ "@earendil-works/pi-tui": "1.3.0",
40
+ "@inquirer/prompts": "^8.7.3",
41
+ "@tailwindcss/node": "^4.3.3",
42
+ "akanjs": "3.1.0-rc.21",
43
+ "chalk": "^6.0.1",
44
+ "commander": "^15.0.0",
45
+ "dayjs": "^1.11.23",
46
+ "fontaine": "^1.0.1",
47
47
  "fonteditor-core": "^2.6.3",
48
- "ignore": "^7.0.5",
48
+ "ignore": "^7.0.12",
49
49
  "ink": "^6.8.0",
50
- "ora": "^9.4.0",
50
+ "ora": "^9.4.1",
51
51
  "qrcode": "^1.5.4",
52
- "react": "19.3.0",
52
+ "react": "19.3.1",
53
53
  "ssh2": "^1.17.0",
54
- "string-width": "^8.2.1",
55
- "subset-font": "^2.5.0",
54
+ "string-width": "^8.3.0",
55
+ "subset-font": "^2.9.0",
56
56
  "tailwind-scrollbar": "^4.0.2",
57
- "tailwindcss": "^4.3.0",
58
- "typebox": "1.1.38",
57
+ "tailwindcss": "^4.3.3",
58
+ "typebox": "1.3.37",
59
59
  "typescript": "^6.0.3"
60
60
  },
61
61
  "devDependencies": {},
@@ -3,12 +3,12 @@ import {
3
3
  App,
4
4
  Module,
5
5
  command
6
- } from "./index-31ce9vhg.js";
6
+ } from "./index-vkb9m4z7.js";
7
7
  import"./index-52w0fvh8.js";
8
- import"./index-2etqq75t.js";
8
+ import"./index-g6ax17x4.js";
9
9
  import {
10
10
  PageScript
11
- } from "./index-jwqtchha.js";
11
+ } from "./index-27y8t17p.js";
12
12
 
13
13
  // pkgs/@akanjs/cli/page/page.command.ts
14
14
  class PageCommand extends command("page", [PageScript], ({ public: target }) => ({
@@ -4,7 +4,7 @@ import {
4
4
  runner,
5
5
  script,
6
6
  command
7
- } from "./index-31ce9vhg.js";
7
+ } from "./index-vkb9m4z7.js";
8
8
  import {
9
9
  FileSys2
10
10
  } from "./index-52w0fvh8.js";
@@ -12,10 +12,10 @@ import {
12
12
  AkanAppConfig,
13
13
  AkanWorkspaceConfig,
14
14
  AppExecutor
15
- } from "./index-2etqq75t.js";
15
+ } from "./index-g6ax17x4.js";
16
16
  import {
17
17
  resolveMobileTargets
18
- } from "./index-q958tqqg.js";
18
+ } from "./index-m9jj544v.js";
19
19
 
20
20
  // pkgs/@akanjs/cli/pipeline/pipeline.command.ts
21
21
  import { pipelineTriggers as pipelineTriggers2 } from "akanjs/common";
@@ -2,17 +2,17 @@
2
2
  import {
3
3
  Workspace,
4
4
  command
5
- } from "./index-31ce9vhg.js";
5
+ } from "./index-vkb9m4z7.js";
6
6
  import"./index-52w0fvh8.js";
7
- import"./index-2etqq75t.js";
7
+ import"./index-g6ax17x4.js";
8
8
  import {
9
9
  renderPrimitiveReport
10
- } from "./index-rhbabmja.js";
11
- import"./index-jwqtchha.js";
12
- import"./index-z507nzhg.js";
10
+ } from "./index-033wne2j.js";
11
+ import"./index-27y8t17p.js";
12
+ import"./index-p2r64bpa.js";
13
13
  import {
14
14
  PrimitiveScript
15
- } from "./index-sqfdmb5b.js";
15
+ } from "./index-4393nb4b.js";
16
16
 
17
17
  // pkgs/@akanjs/cli/primitive/primitive.command.ts
18
18
  import { Logger } from "akanjs/common";
@@ -1,7 +1,7 @@
1
1
  // @bun
2
2
  import {
3
3
  ProjectTypecheck2
4
- } from "./index-2etqq75t.js";
4
+ } from "./index-g6ax17x4.js";
5
5
  export {
6
6
  ProjectTypecheck2 as ProjectTypecheck
7
7
  };
@@ -3,7 +3,7 @@ import {
3
3
  Workspace,
4
4
  script,
5
5
  command
6
- } from "./index-31ce9vhg.js";
6
+ } from "./index-vkb9m4z7.js";
7
7
  import"./index-52w0fvh8.js";
8
8
  import {
9
9
  rootAllowedFiles,
@@ -12,7 +12,7 @@ import {
12
12
  libFacetRootHintOf,
13
13
  facetIndexShadowOf,
14
14
  rootEntryHintOf
15
- } from "./index-2etqq75t.js";
15
+ } from "./index-g6ax17x4.js";
16
16
 
17
17
  // pkgs/@akanjs/devkit/qualityScanner.ts
18
18
  import { createHash } from "crypto";
@@ -49,7 +49,7 @@ class AbstractDoc {
49
49
  return folder.startsWith("_") ? "service" : "domain";
50
50
  }
51
51
  static async findAll(sys, { module } = {}) {
52
- const filePaths = (await sys.getAllFiles(`${AbstractDoc.#facetRoots}/**/*${AbstractDoc.suffix}`)).map((filePath) => filePath.split(path.sep).join("/")).sort();
52
+ const filePaths = (await sys.getAllFiles(`${AbstractDoc.#facetRoots}/**/*${AbstractDoc.suffix}`)).map((filePath) => filePath.split(path.sep).join("/")).sort((a, b) => a < b ? -1 : a > b ? 1 : 0);
53
53
  const docs = await Promise.all(filePaths.map((filePath) => AbstractDoc.read(sys, filePath)));
54
54
  if (!module)
55
55
  return docs;
@@ -555,7 +555,7 @@ class AkanQualityScanner {
555
555
  continue;
556
556
  await this.#walkTargetFiles(workspaceRoot, absoluteTargetRoot, ignoreFilter, files);
557
557
  }
558
- return files.sort();
558
+ return files.sort((a, b) => a < b ? -1 : a > b ? 1 : 0);
559
559
  }
560
560
  async#readGitIgnore(workspaceRoot) {
561
561
  const gitIgnorePath = path2.join(workspaceRoot, ".gitignore");
@@ -3,15 +3,15 @@ import {
3
3
  Workspace,
4
4
  script,
5
5
  command
6
- } from "./index-31ce9vhg.js";
6
+ } from "./index-vkb9m4z7.js";
7
7
  import"./index-52w0fvh8.js";
8
- import"./index-2etqq75t.js";
8
+ import"./index-g6ax17x4.js";
9
9
  import"./index-hj6w4ka1.js";
10
- import"./index-rhbabmja.js";
11
- import"./index-rk9sdys3.js";
10
+ import"./index-033wne2j.js";
11
+ import"./index-nv79n88g.js";
12
12
  import {
13
13
  RepairRunner
14
- } from "./index-nq2ja5e0.js";
14
+ } from "./index-pg1t468s.js";
15
15
 
16
16
  // pkgs/@akanjs/cli/repair/repair.script.ts
17
17
  import { Logger } from "akanjs/common";
@@ -2,15 +2,15 @@
2
2
  import {
3
3
  Sys,
4
4
  command
5
- } from "./index-31ce9vhg.js";
5
+ } from "./index-vkb9m4z7.js";
6
6
  import"./index-52w0fvh8.js";
7
- import"./index-2etqq75t.js";
7
+ import"./index-g6ax17x4.js";
8
8
  import {
9
9
  renderPrimitiveReport
10
- } from "./index-rhbabmja.js";
10
+ } from "./index-033wne2j.js";
11
11
  import {
12
12
  ScalarScript
13
- } from "./index-h85cxfkg.js";
13
+ } from "./index-g9ks2k8c.js";
14
14
 
15
15
  // pkgs/@akanjs/cli/scalar/scalar.command.ts
16
16
  import { Logger, lowerlize } from "akanjs/common";
@@ -78,6 +78,9 @@ Stored under `.akan/code/sessions` — project history, so a second checkout of
78
78
  - `/peers` lists other `akan code` sessions running in this workspace; `/msg <peer> <text>` hands one a
79
79
  message.
80
80
  - `/clear` wipes the screen and keeps the conversation; `/compact [notes]` shortens what the model carries.
81
+ - `/autocompact <percent>` compacts on its own once the window is that full, in steps of 10 (`/autocompact 60`);
82
+ `100` is the default, which waits until 32k remain for the reply. `akan code --compact-at 60` (`-c`) starts
83
+ with it, and a share under the 20k every compaction keeps is refused.
81
84
 
82
85
  ## Model, effort, keys
83
86
 
@@ -119,6 +122,7 @@ akan code -i "<prompt>" open the session with the prompt already sent
119
122
  --app <name> narrow the agent to one app
120
123
  --profile local|pod|review|web what it may do (default local)
121
124
  --model <provider>/<id> --thinking, --json, --rpc, --resume <id>
125
+ --compact-at <percent> compact once the window is this full (10, 20, … 100)
122
126
  ```
123
127
 
124
128
  `review` reads and never writes, loads no project context files, and keeps no session on disk. `pod` has
@@ -26,7 +26,8 @@ For a model `comment` (`<Slice>` is a signal slice suffix, e.g. `InPublic`):
26
26
 
27
27
  ## Generated state — `st.use.*`
28
28
 
29
- `comment`, `commentLoading`, `commentForm`, `commentFormLoading`, `commentSubmit`, `commentModal`,
29
+ `comment`, `commentLoading`, `commentForm`, `commentFormLoading`, `commentFormUploading` (uploads in flight, per
30
+ `File` field — non-empty means do not submit), `commentSubmit`, `commentModal`,
30
31
  `commentViewAt`, `commentOperation`; per slice `commentList<Slice>`, `commentListLoading<Slice>`,
31
32
  `commentInitList<Slice>`, `commentSelection<Slice>`, `commentInsight<Slice>`, `pageOfComment<Slice>`,
32
33
  `lastPageOfComment<Slice>`, `hasMoreOfComment<Slice>`, `limitOfComment<Slice>`, `sortOfComment<Slice>`.
@@ -5,7 +5,7 @@ import {
5
5
  runner,
6
6
  script,
7
7
  command
8
- } from "./index-31ce9vhg.js";
8
+ } from "./index-vkb9m4z7.js";
9
9
  import {
10
10
  FileSys2
11
11
  } from "./index-52w0fvh8.js";
@@ -14,19 +14,20 @@ import {
14
14
  Executor,
15
15
  WorkspaceExecutor,
16
16
  AppExecutor
17
- } from "./index-2etqq75t.js";
17
+ } from "./index-g6ax17x4.js";
18
18
  import {
19
19
  GlobalConfig
20
- } from "./index-6726qr1m.js";
21
- import"./index-0909wckt.js";
22
- import"./index-nq045px5.js";
20
+ } from "./index-jrmzcp66.js";
21
+ import"./index-m9jj544v.js";
22
+ import"./index-35m6bzm7.js";
23
+ import"./index-h3r3nr9y.js";
23
24
  import {
24
25
  SubspaceConfig
25
26
  } from "./index-4pf8g7ff.js";
26
27
  import {
27
28
  SlicePlanner
28
- } from "./index-58vvz603.js";
29
- import"./index-kc8z134d.js";
29
+ } from "./index-xsd96yzw.js";
30
+ import"./index-nx64dz92.js";
30
31
 
31
32
  // pkgs/@akanjs/devkit/subspace.ts
32
33
  import { mkdir as mkdir2 } from "fs/promises";
@@ -219,11 +220,11 @@ class SubspaceClone {
219
220
  }
220
221
  }
221
222
  #localEnv() {
222
- const { serveDomain } = WorkspaceExecutor.getBaseDevEnv();
223
+ const { serveDomain, defaulted = [] } = WorkspaceExecutor.getBaseDevEnv();
223
224
  return {
224
225
  AKAN_WORKSPACE_ID: "local",
225
226
  AKAN_PUBLIC_REPO_NAME: this.#declaration.name,
226
- AKAN_PUBLIC_SERVE_DOMAIN: serveDomain,
227
+ ...defaulted.includes("AKAN_PUBLIC_SERVE_DOMAIN") ? {} : { AKAN_PUBLIC_SERVE_DOMAIN: serveDomain },
227
228
  AKAN_PUBLIC_ENV: "local",
228
229
  AKAN_PUBLIC_OPERATION_MODE: "local",
229
230
  AKAN_PUBLIC_LOG_LEVEL: "warn"
@@ -824,7 +825,7 @@ class SubspaceRunner extends runner("subspace") {
824
825
  if (!asked)
825
826
  return { name: subspace.name, workspaceId, host, apps, libs: [], outcome: "cancelled", files: [] };
826
827
  const { libs } = await subspace.slice();
827
- const { CloudScript } = await import("./cloud.script-z8p5dz7e.js");
828
+ const { CloudScript } = await import("./cloud.script-krzh3d7k.js");
828
829
  const { files } = await CommandContainer.get(CloudScript).uploadEnv(workspace, {
829
830
  host,
830
831
  workspaceId,
@@ -20,7 +20,7 @@ interface StartProps {
20
20
  }
21
21
 
22
22
  export const Start = ({ taskId }: StartProps) => (
23
- <button className={jellyButtonRecipe({ variant: "primary", size: "xs" })} onClick={() => st.do.startTask(taskId)}>
23
+ <button type="button" className={jellyButtonRecipe({ variant: "primary", size: "xs" })} onClick={() => st.do.startTask(taskId)}>
24
24
  {usePage().l("task.taskStart")}
25
25
  </button>
26
26
  );
@@ -30,7 +30,7 @@ interface CompleteProps {
30
30
  }
31
31
 
32
32
  export const Complete = ({ taskId }: CompleteProps) => (
33
- <button className={jellyButtonRecipe({ variant: "success", size: "xs" })} onClick={() => st.do.completeTask(taskId)}>
33
+ <button type="button" className={jellyButtonRecipe({ variant: "success", size: "xs" })} onClick={() => st.do.completeTask(taskId)}>
34
34
  {usePage().l("task.taskComplete")}
35
35
  </button>
36
36
  );
@@ -41,7 +41,7 @@ interface RemoveProps {
41
41
 
42
42
  export const Remove = ({ taskId }: RemoveProps) => (
43
43
  <Model.Remove modelId={taskId} slice={fetch.slice.task}>
44
- <button className={jellyButtonRecipe({ variant: "ghost", size: "xs" }, "text-destructive")}>
44
+ <button type="button" className={jellyButtonRecipe({ variant: "ghost", size: "xs" }, "text-destructive")}>
45
45
  {usePage().l("task.taskRemove")}
46
46
  </button>
47
47
  </Model.Remove>
@@ -63,16 +63,16 @@ export const Toolbox = ({ taskId, status }: ToolboxProps) => {
63
63
  <>
64
64
  {status === "todo" && (
65
65
  <li>
66
- <button onClick={() => st.do.startTask(taskId)}>{l("task.taskStart")}</button>
66
+ <button type="button" onClick={() => st.do.startTask(taskId)}>{l("task.taskStart")}</button>
67
67
  </li>
68
68
  )}
69
69
  {status === "inProgress" && (
70
70
  <li>
71
- <button onClick={() => st.do.completeTask(taskId)}>{l("task.taskComplete")}</button>
71
+ <button type="button" onClick={() => st.do.completeTask(taskId)}>{l("task.taskComplete")}</button>
72
72
  </li>
73
73
  )}
74
74
  <li>
75
- <button className="text-destructive" onClick={() => st.do.removeTask(taskId)}>
75
+ <button type="button" className="text-destructive" onClick={() => st.do.removeTask(taskId)}>
76
76
  {l("task.taskRemove")}
77
77
  </button>
78
78
  </li>
@@ -93,7 +93,7 @@ export const Toolbox = ({ taskId, status }: ToolboxProps) => {
93
93
  // New Task Button: Model.NewWrapper — triggers new Task creation form
94
94
  // export const NewTask = () => (
95
95
  // <Model.NewWrapper partial={{}}>
96
- // <button className={jellyButtonRecipe({ variant: "primary", size: "sm" })}>+ New Task</button>
96
+ // <button type="button" className={jellyButtonRecipe({ variant: "primary", size: "sm" })}>+ New Task</button>
97
97
  // </Model.NewWrapper>
98
98
  // );
99
99
  `,
@@ -31,7 +31,7 @@ export const Card = ({ className, init }: CardProps) => {
31
31
  <div className="flex flex-col items-center gap-4 py-16 text-center">
32
32
  <div className="text-foreground/40 text-lg">{l("task.taskNoTasks")}</div>
33
33
  <Link href="/task/new">
34
- <button className={jellyButtonRecipe({ variant: "primary", size: "sm" })}>
34
+ <button type="button" className={jellyButtonRecipe({ variant: "primary", size: "sm" })}>
35
35
  {l("task.taskCreateFirst")}
36
36
  </button>
37
37
  </Link>
@@ -30,7 +30,7 @@ export const QuantityControl = ({
30
30
  }: QuantityControlProps) => {
31
31
  return (
32
32
  <div className={cn("inline-flex items-center gap-1", className)}>
33
- <button
33
+ <button type="button"
34
34
  className={jellyButtonRecipe({ variant: "default", size: "icon" }, "size-7")}
35
35
  disabled={value <= min}
36
36
  onClick={() => onChange(Math.max(min, value - 1))}
@@ -38,7 +38,7 @@ export const QuantityControl = ({
38
38
  −
39
39
  </button>
40
40
  <span className="w-8 text-center font-medium tabular-nums">{value}</span>
41
- <button
41
+ <button type="button"
42
42
  className={jellyButtonRecipe({ variant: "default", size: "icon" }, "size-7")}
43
43
  disabled={value >= max}
44
44
  onClick={() => onChange(Math.min(max, value + 1))}
@@ -24,7 +24,7 @@ export default page()
24
24
  <div className="flex animate-fadeIn items-center gap-4 px-4 pt-4">
25
25
  <div className="font-bold text-lg md:text-4xl">{l("${dict.model}.modelName")}</div>
26
26
  <Model.New
27
- trigger={<button className={buttonRecipe({ size: "sm", variant: "ghost" })}>{l("base.new")}</button>}
27
+ trigger={<button type="button" className={buttonRecipe({ size: "sm", variant: "ghost" })}>{l("base.new")}</button>}
28
28
  slice={fetch.slice.${dict.model}InPublic}
29
29
  renderTitle="id"
30
30
  >
@@ -7,7 +7,6 @@ export default function getContent(scanInfo: AppInfo | LibInfo | null, dict: { [
7
7
  const databaseModules = scanInfo.getDatabaseModules();
8
8
  const scalarModules = scanInfo.getScalarModules();
9
9
  const libs = scanInfo.getLibs();
10
- const libInfos = scanInfo.getLibInfos();
11
10
  return `
12
11
  import { ConstantRegistry } from "akanjs/constant";
13
12
  ${scalarModules.map((module) => `import * as ${module}Cnst from "./__scalar/${module}/${module}.constant";`).join("\n")}
@@ -0,0 +1,23 @@
1
+ import type { AppInfo, LibInfo } from "akanjs";
2
+
3
+ interface Dict {
4
+ migrationId: string;
5
+ title: string;
6
+ }
7
+ export default function getContent(scanInfo: AppInfo | LibInfo | null, dict: Dict) {
8
+ return `import { migration } from "akanjs/server";
9
+
10
+ export default migration(${JSON.stringify(dict.title)})
11
+ .plan(async ({ table }) => {
12
+ // TODO: count the rows apply changes, and list each decision a person approves
13
+ return { summary: {}, items: [] };
14
+ })
15
+ .apply(async ({ table }, { items }) => {
16
+ // TODO: write through table(refName), so every change is logged and a rollback can undo it
17
+ })
18
+ .verify(async ({ table }) => {
19
+ // TODO: one line per row apply left wrong; none means the data is as intended
20
+ return [];
21
+ });
22
+ `;
23
+ }
@@ -6,7 +6,7 @@ export default function getContent(scanInfo: AppInfo | LibInfo | null, dict: { [
6
6
  const databaseModules = [...scanInfo.database.entries()].filter(([_, files]) => files.has("service"));
7
7
  const serviceModules = [...scanInfo.service.entries()].filter(([_, files]) => files.has("service"));
8
8
  const scalarModules = [...scanInfo.scalar.entries()];
9
- return `import { ${scanInfo.type === "app" ? "AkanServer, " : ""}AkanLib } from "akanjs/server";
9
+ return `import { ${scanInfo.type === "app" ? "AkanServer, " : ""}AkanLib${scanInfo.type === "app" ? ", Migrations" : ""} } from "akanjs/server";
10
10
  import * as cnst from "./lib/cnst";
11
11
  import * as db from "./lib/db";
12
12
  import * as sig from "./lib/sig";
@@ -29,6 +29,13 @@ ${scalarModules.map(([model]) => ` { constant: cnst.${model}, database: db.${
29
29
  });
30
30
 
31
31
  ${scanInfo.type === "app" ? `export const server = new AkanServer("${scanInfo.name}", env, undefined${libs.length ? `, ${libs.join(", ")}` : ""}, lib);` : ""}
32
+ ${
33
+ scanInfo.type === "app"
34
+ ? `export const migrations = new Migrations([
35
+ ${scanInfo.migrations.map(({ id, checksum }) => ` { id: "${id}", checksum: "${checksum}", load: () => import("./script/migration/${id}") },`).join("\n")}
36
+ ]);`
37
+ : ""
38
+ }
32
39
 
33
40
  ${scanInfo.type === "lib" ? `export { env } from "./env/env.server.testing";` : ""}
34
41
  export * as db from "./lib/db";
@@ -1,27 +1,18 @@
1
1
  **/dist
2
- /node_modules
3
- /.akan
2
+ **/node_modules
3
+ **/.akan
4
4
  .vscode/*
5
5
  .DS_Store
6
6
  Thumbs.db
7
7
  *.env
8
- **/node_modules
9
8
  /data
10
9
  apps/*/data
11
10
  /releases
12
11
  apps/*/scripts
13
- **/.env
14
- **/env.client.local.ts
15
- **/env.client.debug.ts
16
- **/env.client.develop.ts
17
- **/env.client.main.ts
18
- **/env.client.testing.ts
19
- **/env.server.local.ts
20
- **/env.server.debug.ts
21
- **/env.server.develop.ts
22
- **/env.server.main.ts
23
- **/env.server.testing.ts
24
- **/env.server.type.ts
12
+ **/env.client.*.ts
13
+ !**/env.client.type.ts
14
+ **/env.server.*.ts
15
+ !**/env.server.example.ts
25
16
  **/*secrets.yaml
26
17
  **/kubeconfig.yaml
27
18
  **/secrets.*
@@ -46,7 +37,6 @@ DerivedData
46
37
  *.ipa
47
38
  *.xcuserstate
48
39
 
49
- build/
50
40
  .gradle
51
41
  local.properties
52
42
  *.iml
@@ -56,19 +46,18 @@ local.properties
56
46
  !debug.keystore
57
47
 
58
48
  **/public/precache.*.*.js
59
- **/public/sw.js
60
- **/public/workbox-*.js
61
- **/public/worker-*.js
62
- **/public/fallback-*.js
63
49
  **/public/precache.*.*.js.map
64
- **/public/sw.js.map
50
+ **/public/*sw.js
51
+ **/public/*sw.js.map
52
+ **/public/workbox-*.js
65
53
  **/public/workbox-*.js.map
54
+ **/public/worker-*.js
66
55
  **/public/worker-*.js.map
67
56
  **/public/fallback-*.js
57
+ **/public/fallback-*.js.map
68
58
  **/public/libs
69
59
  **/private/libs
70
60
  **/page/**/(libs)
71
- **/public/firebase-messaging-sw.js
72
61
 
73
62
  **/android/keystore.properties
74
63
  **/vendor/bundle/
@@ -78,24 +67,18 @@ local.properties
78
67
  **/*-secret.yaml
79
68
 
80
69
  # Akanjs files
81
- **/akan.app.json
82
- **/akan.lib.json
83
- **/akan.pkg.json
84
- **/next.config.ts
85
- **/next-env.d.ts
86
- apps/**/lib/__lib/**
87
- libs/**/lib/__lib/**
88
- apps/*/lib/cnst.ts
89
- apps/*/lib/dict.ts
90
- apps/*/lib/db.ts
91
- apps/*/lib/srv.ts
92
- apps/*/lib/st.ts
93
- apps/*/lib/sig.ts
94
- apps/*/lib/useClient.ts
95
- apps/*/lib/useServer.ts
96
- apps/*/lib/*/index.tsx
97
- apps/*/lib/*/index.ts
98
- apps/*/lib/__scalar/*/index.ts
70
+ **/akan.*.json
71
+ */*/lib/__lib/**
72
+ */*/lib/cnst.ts
73
+ */*/lib/dict.ts
74
+ */*/lib/db.ts
75
+ */*/lib/srv.ts
76
+ */*/lib/st.ts
77
+ */*/lib/sig.ts
78
+ */*/lib/useClient.ts
79
+ */*/lib/useServer.ts
80
+ */*/lib/*/index.ts*
81
+ */*/lib/__scalar/*/index.ts
99
82
  apps/*/ui/index.ts
100
83
  apps/*/webkit/index.ts
101
84
  apps/*/srvkit/index.ts
@@ -103,17 +86,6 @@ apps/*/common/index.ts
103
86
  apps/*/plugin/index.ts
104
87
  apps/*/client.ts
105
88
  apps/*/server.ts
106
- libs/*/lib/cnst.ts
107
- libs/*/lib/dict.ts
108
- libs/*/lib/db.ts
109
- libs/*/lib/srv.ts
110
- libs/*/lib/st.ts
111
- libs/*/lib/sig.ts
112
- libs/*/lib/useClient.ts
113
- libs/*/lib/useServer.ts
114
- libs/*/lib/*/index.tsx
115
- libs/*/lib/*/index.ts
116
- libs/*/lib/__scalar/*/index.ts
117
89
  libs/*/ui/index.ts
118
90
  libs/*/webkit/index.ts
119
91
  libs/*/srvkit/index.ts
@@ -122,5 +94,4 @@ libs/*/plugin/index.ts
122
94
  libs/*/client.ts
123
95
  libs/*/server.ts
124
96
  libs/*/index.ts
125
- **/.akan
126
97
  **/tsconfig.tsbuildinfo
@@ -1,5 +1,5 @@
1
1
  {
2
- "$schema": "https://biomejs.dev/schemas/2.5.12/schema.json",
2
+ "$schema": "https://biomejs.dev/schemas/2.5.14/schema.json",
3
3
  "extends": ["@akanjs/devkit/biome.base.json"],
4
4
  "files": {
5
5
  "includes": [
@@ -4,24 +4,25 @@ import {
4
4
  runner,
5
5
  script,
6
6
  command
7
- } from "./index-31ce9vhg.js";
7
+ } from "./index-vkb9m4z7.js";
8
8
  import"./index-52w0fvh8.js";
9
9
  import {
10
10
  AppExecutor
11
- } from "./index-2etqq75t.js";
11
+ } from "./index-g6ax17x4.js";
12
12
  import {
13
13
  GlobalConfig,
14
14
  CloudApi
15
- } from "./index-6726qr1m.js";
16
- import"./index-0909wckt.js";
17
- import"./index-nq045px5.js";
15
+ } from "./index-jrmzcp66.js";
16
+ import"./index-m9jj544v.js";
17
+ import"./index-35m6bzm7.js";
18
+ import"./index-h3r3nr9y.js";
18
19
  import {
19
20
  TunnelShare2
20
- } from "./index-sby8fe1p.js";
21
+ } from "./index-48edp6q4.js";
21
22
  import {
22
23
  writeClipboard
23
24
  } from "./index-p6pbz9n5.js";
24
- import"./index-kc8z134d.js";
25
+ import"./index-nx64dz92.js";
25
26
 
26
27
  // pkgs/@akanjs/cli/tunnel/tunnel.script.ts
27
28
  import { select } from "@inquirer/prompts";
@@ -3,20 +3,20 @@ import {
3
3
  Workspace,
4
4
  script,
5
5
  command
6
- } from "./index-31ce9vhg.js";
6
+ } from "./index-vkb9m4z7.js";
7
7
  import"./index-52w0fvh8.js";
8
- import"./index-2etqq75t.js";
8
+ import"./index-g6ax17x4.js";
9
9
  import"./index-hj6w4ka1.js";
10
- import"./index-rhbabmja.js";
11
- import"./index-rk9sdys3.js";
12
- import"./index-jwqtchha.js";
13
- import"./index-z507nzhg.js";
14
- import"./index-sqfdmb5b.js";
15
- import"./index-nq2ja5e0.js";
16
- import"./index-h85cxfkg.js";
10
+ import"./index-033wne2j.js";
11
+ import"./index-nv79n88g.js";
12
+ import"./index-27y8t17p.js";
13
+ import"./index-p2r64bpa.js";
14
+ import"./index-4393nb4b.js";
15
+ import"./index-pg1t468s.js";
16
+ import"./index-g9ks2k8c.js";
17
17
  import {
18
18
  WorkflowRunner
19
- } from "./index-hnby7p9n.js";
19
+ } from "./index-75n5q4ph.js";
20
20
 
21
21
  // pkgs/@akanjs/cli/workflow/workflow.script.ts
22
22
  import { Logger } from "akanjs/common";