@akanjs/cli 3.0.0-alpha.70 → 3.0.0-alpha.72

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 (79) hide show
  1. package/.build-stamp +1 -1
  2. package/{abstractCompactor-20e0cwbs.js → abstractCompactor-8yjc9sj4.js} +1 -1
  3. package/{agent.command-964bf8qg.js → agent.command-z0cam80t.js} +6 -6
  4. package/{application.command-n45n18sc.js → application.command-2dct57za.js} +34 -12
  5. package/{applicationBuildRunner-af0wtspv.js → applicationBuildRunner-ds8acdfz.js} +3 -3
  6. package/{applicationReleasePackager-93nzdfsy.js → applicationReleasePackager-0jf6ejr4.js} +2 -2
  7. package/buildBatch.proc.js +4 -4
  8. package/{capacitorApp-vnvnvdhf.js → capacitorApp-md7dnt25.js} +2 -2
  9. package/{cloud.command-kx1bh5yq.js → cloud.command-8j7xrxsm.js} +10 -10
  10. package/commandManifest.json +1 -1
  11. package/{context.command-g1a65x6j.js → context.command-xjf4y7em.js} +14 -14
  12. package/{dependencyScanner-rbs2407b.js → dependencyScanner-aqg3dkks.js} +1 -1
  13. package/{guideline.command-xphyhvwh.js → guideline.command-yzm0qevv.js} +4 -4
  14. package/guidelines/conventions/conventions.instruction.md +267 -440
  15. package/guidelines/framework/framework.generate.json +3 -2
  16. package/guidelines/framework/framework.instruction.md +0 -9
  17. package/guidelines/mcpRule/mcpRule.instruction.md +5 -8
  18. package/guidelines/queryRule/queryRule.generate.json +31 -0
  19. package/guidelines/queryRule/queryRule.instruction.md +143 -0
  20. package/guidelines/runtimeRule/runtimeRule.generate.json +25 -0
  21. package/guidelines/runtimeRule/runtimeRule.instruction.md +176 -0
  22. package/guidelines/ssrRule/ssrRule.instruction.md +49 -5
  23. package/guidelines/transportRule/transportRule.generate.json +31 -0
  24. package/guidelines/transportRule/transportRule.instruction.md +60 -0
  25. package/guidelines/workspaceOnboarding/workspaceOnboarding.instruction.md +17 -392
  26. package/guidelines/workspaceRecipes/workspaceRecipes.generate.json +33 -0
  27. package/guidelines/workspaceRecipes/workspaceRecipes.instruction.md +402 -0
  28. package/incrementalBuilder.proc.js +5 -5
  29. package/{index-4rw4qhe6.js → index-116w1dap.js} +4 -4
  30. package/{index-mkn5qagt.js → index-5r4e65hb.js} +128 -59
  31. package/{index-abyjt72y.js → index-61x7qthy.js} +17 -21
  32. package/{index-bqqts262.js → index-763h7h9g.js} +1 -1
  33. package/{index-wnp7hwq7.js → index-94hdqqka.js} +1 -1
  34. package/{index-v5fdxdre.js → index-9gqzgfsd.js} +4 -4
  35. package/{index-fahkq20v.js → index-a341yqdh.js} +3 -3
  36. package/{index-e31ghfp5.js → index-akz5xvyw.js} +17 -5
  37. package/{index-va15r8h5.js → index-bmz9crym.js} +13 -6
  38. package/{index-qt4nfr0n.js → index-eed7vc38.js} +66 -33
  39. package/{index-46tjzh6s.js → index-h5sr2nnj.js} +24 -24
  40. package/{index-nkwmnqwn.js → index-h9cybjep.js} +92 -19
  41. package/{index-p681w089.js → index-hvbdre8z.js} +4 -10
  42. package/{index-qnv0aqmm.js → index-jcm6zr20.js} +3 -1
  43. package/{index-j37qq1f2.js → index-k7731a4v.js} +4 -4
  44. package/{index-ytaqtc04.js → index-q0s2dp3y.js} +1 -1
  45. package/{index-nj3w0r34.js → index-q13s3e01.js} +3 -3
  46. package/{index-0ngvvgry.js → index-qge1hc70.js} +5 -5
  47. package/{index-sh01r3pm.js → index-safgeq9a.js} +3 -2
  48. package/{index-xjd3rqzj.js → index-scemmfpj.js} +6 -15
  49. package/{index-rbnpe8cp.js → index-te6r1b79.js} +19 -23
  50. package/{index-yg3hxk2k.js → index-vrra4ttx.js} +6 -6
  51. package/{index-8gybxemv.js → index-y3wyqcsp.js} +6 -6
  52. package/{index-hee7egtm.js → index-ym9g9ggs.js} +21 -21
  53. package/{index-fgc8r6dj.js → index-ynf37b66.js} +3 -1
  54. package/{index-rb65xnw9.js → index-z52nhkjs.js} +4 -4
  55. package/index.js +18 -18
  56. package/{library.command-rfpd27yv.js → library.command-w8b53vtt.js} +4 -4
  57. package/{localRegistry.command-pyxfe0fs.js → localRegistry.command-ymrgda7e.js} +9 -9
  58. package/{module.command-qhaxad0p.js → module.command-7pje37dv.js} +7 -7
  59. package/{package.command-2k22q9nt.js → package.command-jg4qk8ts.js} +4 -4
  60. package/package.json +3 -4
  61. package/{page.command-ymk9dqh4.js → page.command-abbpj96j.js} +3 -3
  62. package/{primitive.command-9k45zpc1.js → primitive.command-jw4yv918.js} +8 -8
  63. package/{quality.command-bf6vkxe5.js → quality.command-06j6qy6n.js} +34 -4
  64. package/{repair.command-egvvm6xf.js → repair.command-x6resn10.js} +5 -5
  65. package/{scalar.command-bt1facyj.js → scalar.command-mj2vx6rj.js} +6 -6
  66. package/templates/appSample/lib/task/task.signal.ts +11 -6
  67. package/templates/crudPages/[__model__Id]/edit/page.tsx +5 -5
  68. package/templates/crudPages/[__model__Id]/page.tsx +10 -13
  69. package/templates/crudPages/new/page.tsx +5 -5
  70. package/templates/crudPages/page.tsx +9 -9
  71. package/templates/crudSinglePage/page.tsx +11 -7
  72. package/templates/module/__model__.dictionary.ts +4 -1
  73. package/templates/module/__model__.signal.ts +2 -3
  74. package/templates/module/__model__.store.ts +1 -2
  75. package/templates/workspaceRoot/AGENTS.md.template +4 -0
  76. package/{typeChecker-g6bh0xfv.js → typeChecker-yhs4eht8.js} +1 -1
  77. package/typecheck.proc.js +1 -1
  78. package/{workflow.command-v1n3wg7v.js → workflow.command-pmw2tere.js} +11 -11
  79. package/{workspace.command-yvvqvhzz.js → workspace.command-x32k2vma.js} +29 -26
@@ -2,13 +2,13 @@
2
2
  import {
3
3
  runner,
4
4
  script
5
- } from "./index-e31ghfp5.js";
5
+ } from "./index-akz5xvyw.js";
6
6
  import {
7
7
  PkgExecutor
8
- } from "./index-nkwmnqwn.js";
8
+ } from "./index-h9cybjep.js";
9
9
  import {
10
10
  TypeScriptDependencyScanner
11
- } from "./index-46tjzh6s.js";
11
+ } from "./index-h5sr2nnj.js";
12
12
  import {
13
13
  FileSys
14
14
  } from "./index-67546d0j.js";
@@ -140,7 +140,7 @@ class PackageRunner extends runner("package") {
140
140
  await workspace.setPkgTsPaths(pkgName);
141
141
  }
142
142
  async removePackage(pkg) {
143
- await pkg.workspace.exec(`rm -rf pkgs/${pkg.name}`);
143
+ await pkg.workspace.removeDir(`pkgs/${pkg.name}`);
144
144
  await pkg.workspace.unsetPkgTsPaths(pkg.name);
145
145
  }
146
146
  async scanSync(pkg) {
@@ -272,7 +272,7 @@ class PackageRunner extends runner("package") {
272
272
  }
273
273
  if (!pkgJson.version)
274
274
  throw new Error(`[package] dist package version is missing for ${pkg.name}`);
275
- if (!pkgJson.publishConfig || pkgJson.publishConfig.access !== "public") {
275
+ if (pkgJson.publishConfig?.access !== "public") {
276
276
  throw new Error(`[package] ${pkg.name} must publish with publishConfig.access=public`);
277
277
  }
278
278
  if (!await Bun.file(`${pkg.dist.cwdPath}/README.md`).exists()) {
@@ -7,7 +7,7 @@ import {
7
7
  } from "./index-67546d0j.js";
8
8
 
9
9
  // pkgs/@akanjs/devkit/cloud/globalConfig.ts
10
- import { mkdir } from "fs/promises";
10
+ import { chmod, mkdir } from "fs/promises";
11
11
  import dayjs from "dayjs";
12
12
 
13
13
  // pkgs/@akanjs/devkit/cloud/constants.ts
@@ -34,8 +34,9 @@ class GlobalConfig {
34
34
  };
35
35
  }
36
36
  static async#setAkanGlobalConfig(akanConfig) {
37
- await mkdir(basePath, { recursive: true });
37
+ await mkdir(basePath, { recursive: true, mode: 448 });
38
38
  await Bun.write(configPath, JSON.stringify(akanConfig, null, 2));
39
+ await chmod(configPath, 384);
39
40
  }
40
41
  static async getHostConfig(host = GlobalConfig.akanCloudHost) {
41
42
  const akanConfig = await GlobalConfig.#getAkanGlobalConfig();
@@ -1,20 +1,11 @@
1
1
  // @bun
2
2
  // pkgs/@akanjs/devkit/frontendBuild/styleContract.ts
3
- var countBlocking = (v) => v.style.filter((s) => s.severity === "error").length + v.theme.length;
4
- var formatStyleContract = (v) => {
5
- const lines = [];
6
- for (const s of v.style) {
7
- lines.push(` [${s.severity}] ${s.rule} ${s.path}:${s.line}`);
8
- lines.push(` ${s.snippet}`);
9
- lines.push(` \u2192 ${s.suggestion}`);
10
- }
11
- for (const t of v.theme) {
12
- lines.push(` [error] contrast ${t.scope} ${t.pair} = ${t.ratio}:1 (min ${t.threshold}:1)`);
13
- lines.push(` \u2192 ${t.suggestion}`);
14
- }
15
- return lines.join(`
3
+ var countBlocking = (violations) => violations.theme.length;
4
+ var formatStyleContract = (violations) => violations.theme.flatMap((theme) => [
5
+ ` [error] contrast ${theme.scope} ${theme.pair} = ${theme.ratio}:1 (min ${theme.threshold}:1)`,
6
+ ` \u2192 ${theme.suggestion}`
7
+ ]).join(`
16
8
  `);
17
- };
18
9
 
19
10
  // pkgs/@akanjs/devkit/frontendBuild/themeValidator.ts
20
11
  var PAIRS = [
@@ -66,7 +57,7 @@ class ThemeValidator {
66
57
  foreground: front,
67
58
  ratio: Math.round(ratio * 100) / 100,
68
59
  threshold,
69
- suggestion: `${scope}\uC758 --${base}(${bg})\uC640 --${fg}(${front}) \uB300\uBE44\uAC00 ${ratio.toFixed(2)}:1 \uB85C \uCD5C\uC18C ${threshold}:1 \uBBF8\uB9CC\uC785\uB2C8\uB2E4. \uD55C\uCABD\uC744 \uB354 \uBC1D\uAC8C/\uC5B4\uB461\uAC8C \uC870\uC815\uD574 \uB300\uBE44\uB97C \uD655\uBCF4\uD558\uC138\uC694.`
60
+ suggestion: `In ${scope}, --${base} (${bg}) against --${fg} (${front}) is ${ratio.toFixed(2)}:1, under the ${threshold}:1 minimum. Lighten or darken one of them until it clears.`
70
61
  });
71
62
  }
72
63
  return violations;
@@ -1,14 +1,14 @@
1
1
  // @bun
2
2
  import {
3
3
  AkanContextAnalyzer
4
- } from "./index-va15r8h5.js";
4
+ } from "./index-bmz9crym.js";
5
5
  import {
6
6
  Prompter
7
- } from "./index-j37qq1f2.js";
7
+ } from "./index-k7731a4v.js";
8
8
  import {
9
9
  runner,
10
10
  script
11
- } from "./index-e31ghfp5.js";
11
+ } from "./index-akz5xvyw.js";
12
12
  import {
13
13
  AGENT_BLOCK_END,
14
14
  AGENT_BLOCK_START,
@@ -19,7 +19,7 @@ import {
19
19
  renderRecipeEntries,
20
20
  stampBlockVersion,
21
21
  upsertAgentBlock
22
- } from "./index-nkwmnqwn.js";
22
+ } from "./index-h9cybjep.js";
23
23
  import {
24
24
  collectRecipeSources,
25
25
  scanRecipes
@@ -90,15 +90,14 @@ ${scopeIndexPointer}
90
90
  `;
91
91
  return `## Recipes
92
92
 
93
- Framework UI recipes (Tailwind-variant look factories), importable from every app and lib. Consume by exact name \u2014
94
- \`import { <name> } from "akanjs/ui"\`, then \`<name>(variants?, className?)\`. The second arg merges internally and
95
- takes **an array too**, so never wrap it in \`cn()\`: \`<name>({}, ["h-full", isWide && "w-full", className])\`.
96
- Do not guess recipe names, import paths, or variant values; the list below carries
97
- the full contract (\`*\` marks the default, \`key?\` is a boolean flag), so there is no need to open the recipe file to
98
- consume one. tsc still reports variant mistakes. **Before inlining a repeated surface (card, box,
99
- tile, \u2026): reuse a recipe, or add one as \`apps/<app>/ui/Recipe/<name>.ts\` (one recipe per file, re-exported from
100
- that folder's \`index.ts\`) \u2014 never re-implement the same look inline in several places, and never author a
101
- near-duplicate.** Full authoring/consumption policy: the \`recipeRule\` guideline.
93
+ Framework UI recipes (Tailwind-variant look factories), importable from every app and lib: \`import { <name> } from
94
+ "akanjs/ui"\`, then \`<name>(variants?, className?)\`. The second arg merges internally and takes **an array too**, so
95
+ never wrap it in \`cn()\`: \`<name>({}, ["h-full", isWide && "w-full", className])\`. The list below is the full
96
+ contract (\`*\` marks the default, \`key?\` is a boolean flag) \u2014 do not guess a name, path, or variant value, and do
97
+ not open the recipe file to consume one. **Before inlining a repeated surface (card, box, tile, \u2026): reuse a recipe,
98
+ or add one as \`apps/<app>/ui/Recipe/<name>.ts\`, one per file, re-exported from that folder's \`index.ts\` \u2014 never
99
+ re-implement the same look inline in several places, and never author a near-duplicate.** Full policy: the
100
+ \`recipeRule\` guideline.
102
101
 
103
102
  ${renderRecipeEntries(recipes)}
104
103
 
@@ -148,15 +147,12 @@ If generated output is stale or broken, update the owning source file and run \`
148
147
 
149
148
  ${recipeIndex}## MCP Workflow Policy
150
149
 
151
- - Prefer Akan MCP workflows before direct source edits.
152
- - Direct source edits are denied when an allowlisted Akan workflow or repair tool can perform the change.
153
- - Use \`akan mcp --mode plan\` to inspect \`list_workflows\`, \`explain_workflow\`, and \`plan_workflow\`.
154
- - If \`plan_workflow\` returns \`planPath\` or \`next.tool=apply_workflow\`, call \`apply_workflow({ planPath })\` before editing source files directly.
155
- - Use \`akan mcp --mode apply\` only for allowlisted \`apply_workflow\`, \`run_validation\`, and repair tools.
156
- - After \`apply_workflow\`, run \`run_validation\` with \`validationTarget\` when present; otherwise use \`applyReportPath\`.
157
- - If no workflow exists, or apply reports unsupported/no-op/failed diagnostics that require manual action, keep edits scoped to owning source files and never patch generated files directly.
158
- - For compound requests, split the request into workflows and apply each \`planPath\` in order, such as \`create-module\` followed by \`add-field\`.
159
- - **CLI-only fallback (MCP not connected):** \`akan mcp\` starts a stdio MCP server, so the \`list_workflows\`/\`plan_workflow\`/\`apply_workflow\` tools exist only when your agent is wired to it as an MCP client. When they are unavailable, the CLI is a first-class equivalent: \`akan workflow list\` / \`explain <name>\` / \`plan <name> ... --format json --out <planPath>\` / \`apply <planPath> --format json\`, \`akan doctor --strict --format json\` for validation, and \`akan repair generated|imports|module-shape --app <app> --format json\` for repairs. Scaffolding primitives (\`create-module\`/\`create-scalar\`/\`create-service\` take the target app/lib as a POSITIONAL arg; \`add-field\`/\`add-enum-field\` use \`--app\`/\`--module\` flags) call the same code the workflows do.
150
+ - **Prefer an Akan workflow to a direct source edit.** A direct edit is denied when an allowlisted workflow or repair tool can make the change.
151
+ - Inspect with \`akan mcp --mode plan\` (\`list_workflows\`, \`explain_workflow\`, \`plan_workflow\`); apply with \`akan mcp --mode apply\`, which allowlists \`apply_workflow\`, \`run_validation\`, and the repair tools.
152
+ - If \`plan_workflow\` returns \`planPath\` or \`next.tool=apply_workflow\`, call \`apply_workflow({ planPath })\` before editing source. Then run \`run_validation\` with \`validationTarget\` when present, otherwise \`applyReportPath\`.
153
+ - Split a compound request into workflows and apply each \`planPath\` in order, such as \`create-module\` followed by \`add-field\`.
154
+ - When no workflow exists, or apply reports unsupported/no-op/failed diagnostics needing manual action, keep edits scoped to owning source files and never patch generated files directly.
155
+ - **MCP not connected?** The CLI is a first-class equivalent \u2014 \`akan workflow list\` / \`explain\` / \`plan\` / \`apply\`, \`akan doctor\`, \`akan repair\`. See the onboarding guide's CLI-only fallback for the exact flags.
160
156
 
161
157
  ## Validation
162
158
 
@@ -249,7 +245,7 @@ class AgentRunner extends runner("agent") {
249
245
  written.push(`${exec.type}s/${exec.name}/AGENTS.md`);
250
246
  } catch (error) {
251
247
  const message = error instanceof Error ? error.message : String(error);
252
- Logger.rawLog(`Skipped ${exec.type}s/${exec.name}/AGENTS.md (${message})`, undefined, "warn");
248
+ Logger.rawLog(`Skipped ${exec.type}s/${exec.name}/AGENTS.md (${message})`, undefined, "error");
253
249
  }
254
250
  };
255
251
  for (const name of libNames)
@@ -4,10 +4,10 @@ import {
4
4
  } from "./index-ss469dec.js";
5
5
  import {
6
6
  PageScript
7
- } from "./index-bqqts262.js";
7
+ } from "./index-763h7h9g.js";
8
8
  import {
9
9
  AiSession
10
- } from "./index-sh01r3pm.js";
10
+ } from "./index-safgeq9a.js";
11
11
  import {
12
12
  bilingualDescriptionForField,
13
13
  bilingualLabelForField,
@@ -15,17 +15,17 @@ import {
15
15
  generatedFilesForSync,
16
16
  moduleSourcePaths,
17
17
  sourceFile
18
- } from "./index-ytaqtc04.js";
18
+ } from "./index-q0s2dp3y.js";
19
19
  import {
20
20
  Prompter
21
- } from "./index-j37qq1f2.js";
21
+ } from "./index-k7731a4v.js";
22
22
  import {
23
23
  runner,
24
24
  script
25
- } from "./index-e31ghfp5.js";
25
+ } from "./index-akz5xvyw.js";
26
26
  import {
27
27
  ModuleExecutor
28
- } from "./index-nkwmnqwn.js";
28
+ } from "./index-h9cybjep.js";
29
29
  import {
30
30
  FileSys
31
31
  } from "./index-67546d0j.js";
@@ -1,24 +1,24 @@
1
1
  // @bun
2
2
  import {
3
3
  CloudRunner
4
- } from "./index-4rw4qhe6.js";
4
+ } from "./index-116w1dap.js";
5
5
  import {
6
6
  PackageScript
7
- } from "./index-0ngvvgry.js";
7
+ } from "./index-qge1hc70.js";
8
8
  import {
9
9
  AiSession,
10
10
  CloudApi,
11
11
  GlobalConfig
12
- } from "./index-sh01r3pm.js";
12
+ } from "./index-safgeq9a.js";
13
13
  import {
14
14
  ApplicationScript
15
- } from "./index-mkn5qagt.js";
15
+ } from "./index-5r4e65hb.js";
16
16
  import {
17
17
  script
18
- } from "./index-e31ghfp5.js";
18
+ } from "./index-akz5xvyw.js";
19
19
  import {
20
20
  PkgExecutor
21
- } from "./index-nkwmnqwn.js";
21
+ } from "./index-h9cybjep.js";
22
22
 
23
23
  // pkgs/@akanjs/cli/cloud/cloud.script.ts
24
24
  import { Logger } from "akanjs/common";
@@ -5,7 +5,7 @@ import {
5
5
  } from "./index-76rn3g2c.js";
6
6
  import {
7
7
  CommandExecutionError
8
- } from "./index-nkwmnqwn.js";
8
+ } from "./index-h9cybjep.js";
9
9
 
10
10
  // pkgs/@akanjs/devkit/capacitorApp.ts
11
11
  import { cp, mkdir, readFile, rm, writeFile } from "fs/promises";
@@ -17,22 +17,22 @@ import { capitalize } from "akanjs/common";
17
17
 
18
18
  // pkgs/@akanjs/devkit/fileEditor.ts
19
19
  class FileEditor {
20
- filePath;
21
- content;
20
+ #filePath;
21
+ #content;
22
22
  constructor(filePath, content) {
23
- this.filePath = filePath;
24
- this.content = content;
23
+ this.#filePath = filePath;
24
+ this.#content = content;
25
25
  }
26
26
  static async create(filePath) {
27
27
  try {
28
28
  const content = await Bun.file(filePath).text();
29
29
  return new FileEditor(filePath, content);
30
- } catch (error) {
30
+ } catch (_error) {
31
31
  throw new Error(`Failed to read file: ${filePath}`);
32
32
  }
33
33
  }
34
34
  find(pattern) {
35
- const lines = this.content.split(`
35
+ const lines = this.#content.split(`
36
36
  `);
37
37
  const regex = typeof pattern === "string" ? new RegExp(pattern) : pattern;
38
38
  for (let i = 0;i < lines.length; i++) {
@@ -45,7 +45,7 @@ class FileEditor {
45
45
  return -1;
46
46
  }
47
47
  findAll(pattern) {
48
- const lines = this.content.split(`
48
+ const lines = this.#content.split(`
49
49
  `);
50
50
  const regex = typeof pattern === "string" ? new RegExp(pattern) : pattern;
51
51
  const matches = [];
@@ -63,10 +63,10 @@ class FileEditor {
63
63
  if (lineIndex === -1) {
64
64
  throw new Error(`Pattern not found: ${pattern}`);
65
65
  }
66
- const lines = this.content.split(`
66
+ const lines = this.#content.split(`
67
67
  `);
68
68
  lines.splice(lineIndex + 1, 0, data);
69
- this.content = lines.join(`
69
+ this.#content = lines.join(`
70
70
  `);
71
71
  return this;
72
72
  }
@@ -75,40 +75,40 @@ class FileEditor {
75
75
  if (lineIndex === -1) {
76
76
  throw new Error(`Pattern not found: ${pattern}`);
77
77
  }
78
- const lines = this.content.split(`
78
+ const lines = this.#content.split(`
79
79
  `);
80
80
  lines.splice(lineIndex, 0, data);
81
- this.content = lines.join(`
81
+ this.#content = lines.join(`
82
82
  `);
83
83
  return this;
84
84
  }
85
85
  replace(pattern, replacement) {
86
86
  const regex = typeof pattern === "string" ? new RegExp(pattern, "g") : pattern;
87
- this.content = this.content.replace(regex, replacement);
87
+ this.#content = this.#content.replace(regex, replacement);
88
88
  return this;
89
89
  }
90
90
  append(data) {
91
- this.content += `
91
+ this.#content += `
92
92
  ${data}`;
93
93
  return this;
94
94
  }
95
95
  prepend(data) {
96
- this.content = `${data}
97
- ${this.content}`;
96
+ this.#content = `${data}
97
+ ${this.#content}`;
98
98
  return this;
99
99
  }
100
100
  async save() {
101
101
  try {
102
- await Bun.write(this.filePath, this.content);
103
- } catch (error) {
104
- throw new Error(`Failed to save file: ${this.filePath}`);
102
+ await Bun.write(this.#filePath, this.#content);
103
+ } catch (_error) {
104
+ throw new Error(`Failed to save file: ${this.#filePath}`);
105
105
  }
106
106
  }
107
107
  getContent() {
108
- return this.content;
108
+ return this.#content;
109
109
  }
110
110
  setContent(content) {
111
- this.content = content;
111
+ this.#content = content;
112
112
  return this;
113
113
  }
114
114
  }
@@ -19,12 +19,14 @@ var prepareDevWatchBatch = ({
19
19
  generatedFiles: indexSync.changedFiles
20
20
  });
21
21
  if (indexSync.errors.length > 0 && !devPlan.actions.includes("report-error")) {
22
- devPlan.actions = [...devPlan.actions, "report-error"].sort();
22
+ const withReport = [...devPlan.actions, "report-error"];
23
+ devPlan.actions = withReport.sort();
23
24
  }
24
25
  return {
25
26
  files,
26
27
  kinds,
27
28
  expandedBatch,
29
+ devPlan,
28
30
  event: { type: "invalidate", kinds, files, generation, devPlan },
29
31
  hasSyncErrors: indexSync.errors.length > 0
30
32
  };
@@ -1,7 +1,7 @@
1
1
  // @bun
2
2
  import {
3
3
  ModuleScript
4
- } from "./index-yg3hxk2k.js";
4
+ } from "./index-vrra4ttx.js";
5
5
  import {
6
6
  addFieldUiPolicyForType,
7
7
  coerceFieldDefault,
@@ -34,15 +34,15 @@ import {
34
34
  sourceFile,
35
35
  validationCommandsForTarget,
36
36
  viaBuilderParameterName
37
- } from "./index-ytaqtc04.js";
37
+ } from "./index-q0s2dp3y.js";
38
38
  import {
39
39
  script
40
- } from "./index-e31ghfp5.js";
40
+ } from "./index-akz5xvyw.js";
41
41
  import {
42
42
  AppExecutor,
43
43
  LibExecutor,
44
44
  ModuleExecutor
45
- } from "./index-nkwmnqwn.js";
45
+ } from "./index-h9cybjep.js";
46
46
 
47
47
  // pkgs/@akanjs/cli/primitive/primitive.script.ts
48
48
  import { capitalize } from "akanjs/common";
package/index.js CHANGED
@@ -4,8 +4,8 @@ import {
4
4
  getTargetCommandNames,
5
5
  getTargetMetas,
6
6
  runCommands
7
- } from "./index-e31ghfp5.js";
8
- import"./index-nkwmnqwn.js";
7
+ } from "./index-akz5xvyw.js";
8
+ import"./index-h9cybjep.js";
9
9
  import"./index-f39512t6.js";
10
10
  import"./index-mxvakhsm.js";
11
11
  import"./index-1577bej2.js";
@@ -19,22 +19,22 @@ import path from "path";
19
19
 
20
20
  // pkgs/@akanjs/cli/commandModules.ts
21
21
  var commandModules = {
22
- workspace: async () => (await import("./workspace.command-yvvqvhzz.js")).WorkspaceCommand,
23
- agent: async () => (await import("./agent.command-964bf8qg.js")).AgentCommand,
24
- application: async () => (await import("./application.command-n45n18sc.js")).ApplicationCommand,
25
- library: async () => (await import("./library.command-rfpd27yv.js")).LibraryCommand,
26
- localRegistry: async () => (await import("./localRegistry.command-pyxfe0fs.js")).LocalRegistryCommand,
27
- package: async () => (await import("./package.command-2k22q9nt.js")).PackageCommand,
28
- module: async () => (await import("./module.command-qhaxad0p.js")).ModuleCommand,
29
- page: async () => (await import("./page.command-ymk9dqh4.js")).PageCommand,
30
- context: async () => (await import("./context.command-g1a65x6j.js")).ContextCommand,
31
- cloud: async () => (await import("./cloud.command-kx1bh5yq.js")).CloudCommand,
32
- guideline: async () => (await import("./guideline.command-xphyhvwh.js")).GuidelineCommand,
33
- scalar: async () => (await import("./scalar.command-bt1facyj.js")).ScalarCommand,
34
- primitive: async () => (await import("./primitive.command-9k45zpc1.js")).PrimitiveCommand,
35
- quality: async () => (await import("./quality.command-bf6vkxe5.js")).QualityCommand,
36
- repair: async () => (await import("./repair.command-egvvm6xf.js")).RepairCommand,
37
- workflow: async () => (await import("./workflow.command-v1n3wg7v.js")).WorkflowCommand
22
+ workspace: async () => (await import("./workspace.command-x32k2vma.js")).WorkspaceCommand,
23
+ agent: async () => (await import("./agent.command-z0cam80t.js")).AgentCommand,
24
+ application: async () => (await import("./application.command-2dct57za.js")).ApplicationCommand,
25
+ library: async () => (await import("./library.command-w8b53vtt.js")).LibraryCommand,
26
+ localRegistry: async () => (await import("./localRegistry.command-ymrgda7e.js")).LocalRegistryCommand,
27
+ package: async () => (await import("./package.command-jg4qk8ts.js")).PackageCommand,
28
+ module: async () => (await import("./module.command-7pje37dv.js")).ModuleCommand,
29
+ page: async () => (await import("./page.command-abbpj96j.js")).PageCommand,
30
+ context: async () => (await import("./context.command-xjf4y7em.js")).ContextCommand,
31
+ cloud: async () => (await import("./cloud.command-8j7xrxsm.js")).CloudCommand,
32
+ guideline: async () => (await import("./guideline.command-yzm0qevv.js")).GuidelineCommand,
33
+ scalar: async () => (await import("./scalar.command-mj2vx6rj.js")).ScalarCommand,
34
+ primitive: async () => (await import("./primitive.command-jw4yv918.js")).PrimitiveCommand,
35
+ quality: async () => (await import("./quality.command-06j6qy6n.js")).QualityCommand,
36
+ repair: async () => (await import("./repair.command-x6resn10.js")).RepairCommand,
37
+ workflow: async () => (await import("./workflow.command-pmw2tere.js")).WorkflowCommand
38
38
  };
39
39
  var commandModuleIds = Object.keys(commandModules);
40
40
 
@@ -1,13 +1,13 @@
1
1
  // @bun
2
2
  import {
3
3
  LibraryScript
4
- } from "./index-p681w089.js";
4
+ } from "./index-hvbdre8z.js";
5
5
  import {
6
6
  Lib,
7
7
  Workspace,
8
8
  command
9
- } from "./index-e31ghfp5.js";
10
- import"./index-nkwmnqwn.js";
9
+ } from "./index-akz5xvyw.js";
10
+ import"./index-h9cybjep.js";
11
11
  import"./index-f39512t6.js";
12
12
  import"./index-mxvakhsm.js";
13
13
  import"./index-1577bej2.js";
@@ -25,7 +25,7 @@ class LibraryCommand extends command("library", [LibraryScript], ({ public: targ
25
25
  syncLibrary: target({ desc: "Sync dependencies and configuration for a library" }).with(Lib).exec(async function(lib) {
26
26
  await this.libraryScript.syncLibrary(lib);
27
27
  }),
28
- installLibrary: target({ desc: "Install pre-built library templates (shared, util, etc.)" }).arg("libName", String, { desc: "name of library", nullable: true }).with(Workspace).exec(async function(libName, workspace) {
28
+ installLibrary: target({ desc: "Install pre-built library templates (shared, util, etc.)" }).arg("libName", String, { desc: "name of library" }).with(Workspace).exec(async function(libName, workspace) {
29
29
  await this.libraryScript.installLibrary(workspace, libName);
30
30
  })
31
31
  })) {
@@ -2,31 +2,31 @@
2
2
  import {
3
3
  CloudRunner,
4
4
  getNpmRegistryUrl
5
- } from "./index-4rw4qhe6.js";
5
+ } from "./index-116w1dap.js";
6
6
  import {
7
7
  PackageScript
8
- } from "./index-0ngvvgry.js";
9
- import"./index-sh01r3pm.js";
8
+ } from "./index-qge1hc70.js";
9
+ import"./index-safgeq9a.js";
10
10
  import {
11
11
  ApplicationScript
12
- } from "./index-mkn5qagt.js";
13
- import"./index-p681w089.js";
12
+ } from "./index-5r4e65hb.js";
13
+ import"./index-hvbdre8z.js";
14
14
  import"./index-76rn3g2c.js";
15
15
  import {
16
16
  Workspace,
17
17
  command,
18
18
  runner,
19
19
  script
20
- } from "./index-e31ghfp5.js";
21
- import"./index-fgc8r6dj.js";
20
+ } from "./index-akz5xvyw.js";
21
+ import"./index-ynf37b66.js";
22
22
  import"./index-5vy2jzar.js";
23
23
  import {
24
24
  PkgExecutor
25
- } from "./index-nkwmnqwn.js";
25
+ } from "./index-h9cybjep.js";
26
26
  import"./index-f39512t6.js";
27
27
  import"./index-mxvakhsm.js";
28
28
  import"./index-1577bej2.js";
29
- import"./index-46tjzh6s.js";
29
+ import"./index-h5sr2nnj.js";
30
30
  import"./index-67546d0j.js";
31
31
  import"./index-yb2wsc7f.js";
32
32
 
@@ -1,20 +1,20 @@
1
1
  // @bun
2
2
  import {
3
3
  ModuleScript
4
- } from "./index-yg3hxk2k.js";
4
+ } from "./index-vrra4ttx.js";
5
5
  import"./index-ss469dec.js";
6
- import"./index-bqqts262.js";
7
- import"./index-sh01r3pm.js";
6
+ import"./index-763h7h9g.js";
7
+ import"./index-safgeq9a.js";
8
8
  import {
9
9
  renderPrimitiveReport
10
- } from "./index-ytaqtc04.js";
11
- import"./index-j37qq1f2.js";
10
+ } from "./index-q0s2dp3y.js";
11
+ import"./index-k7731a4v.js";
12
12
  import {
13
13
  Module,
14
14
  Sys,
15
15
  command
16
- } from "./index-e31ghfp5.js";
17
- import"./index-nkwmnqwn.js";
16
+ } from "./index-akz5xvyw.js";
17
+ import"./index-h9cybjep.js";
18
18
  import"./index-f39512t6.js";
19
19
  import"./index-mxvakhsm.js";
20
20
  import"./index-1577bej2.js";
@@ -1,17 +1,17 @@
1
1
  // @bun
2
2
  import {
3
3
  PackageScript
4
- } from "./index-0ngvvgry.js";
4
+ } from "./index-qge1hc70.js";
5
5
  import {
6
6
  Pkg,
7
7
  Workspace,
8
8
  command
9
- } from "./index-e31ghfp5.js";
10
- import"./index-nkwmnqwn.js";
9
+ } from "./index-akz5xvyw.js";
10
+ import"./index-h9cybjep.js";
11
11
  import"./index-f39512t6.js";
12
12
  import"./index-mxvakhsm.js";
13
13
  import"./index-1577bej2.js";
14
- import"./index-46tjzh6s.js";
14
+ import"./index-h5sr2nnj.js";
15
15
  import"./index-67546d0j.js";
16
16
  import"./index-yb2wsc7f.js";
17
17
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@akanjs/cli",
3
- "version": "3.0.0-alpha.70",
3
+ "version": "3.0.0-alpha.72",
4
4
  "sourceType": "module",
5
5
  "type": "module",
6
6
  "publishConfig": {
@@ -17,8 +17,7 @@
17
17
  "bun": ">=1.4.0"
18
18
  },
19
19
  "bin": {
20
- "akan": "./index.js",
21
- "akan2": "./index.js"
20
+ "akan": "./index.js"
22
21
  },
23
22
  "exports": {
24
23
  ".": {
@@ -34,7 +33,7 @@
34
33
  "@langchain/openai": "^1.4.6",
35
34
  "@tailwindcss/node": "^4.3.0",
36
35
  "@trapezedev/project": "^7.1.4",
37
- "akanjs": "3.0.0-alpha.70",
36
+ "akanjs": "3.0.0-alpha.72",
38
37
  "chalk": "^5.6.2",
39
38
  "commander": "^14.0.3",
40
39
  "dayjs": "^1.11.20",
@@ -1,13 +1,13 @@
1
1
  // @bun
2
2
  import {
3
3
  PageScript
4
- } from "./index-bqqts262.js";
4
+ } from "./index-763h7h9g.js";
5
5
  import {
6
6
  App,
7
7
  Module,
8
8
  command
9
- } from "./index-e31ghfp5.js";
10
- import"./index-nkwmnqwn.js";
9
+ } from "./index-akz5xvyw.js";
10
+ import"./index-h9cybjep.js";
11
11
  import"./index-f39512t6.js";
12
12
  import"./index-mxvakhsm.js";
13
13
  import"./index-1577bej2.js";
@@ -1,20 +1,20 @@
1
1
  // @bun
2
2
  import {
3
3
  PrimitiveScript
4
- } from "./index-rb65xnw9.js";
5
- import"./index-yg3hxk2k.js";
4
+ } from "./index-z52nhkjs.js";
5
+ import"./index-vrra4ttx.js";
6
6
  import"./index-ss469dec.js";
7
- import"./index-bqqts262.js";
8
- import"./index-sh01r3pm.js";
7
+ import"./index-763h7h9g.js";
8
+ import"./index-safgeq9a.js";
9
9
  import {
10
10
  renderPrimitiveReport
11
- } from "./index-ytaqtc04.js";
12
- import"./index-j37qq1f2.js";
11
+ } from "./index-q0s2dp3y.js";
12
+ import"./index-k7731a4v.js";
13
13
  import {
14
14
  Workspace,
15
15
  command
16
- } from "./index-e31ghfp5.js";
17
- import"./index-nkwmnqwn.js";
16
+ } from "./index-akz5xvyw.js";
17
+ import"./index-h9cybjep.js";
18
18
  import"./index-f39512t6.js";
19
19
  import"./index-mxvakhsm.js";
20
20
  import"./index-1577bej2.js";