@akanjs/cli 3.2.0-rc.9 → 3.2.1-rc.0

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 (145) hide show
  1. package/.build-stamp +2 -2
  2. package/CodeAgent-xdw73nbz.js +11 -0
  3. package/{CodeTui-qstk5vpj.js → CodeTui-0gewm71c.js} +822 -666
  4. package/README.ko.md +7 -0
  5. package/README.md +7 -0
  6. package/TunnelShare-cccfdgbm.js +16 -0
  7. package/agent.command-g1mj34wz.js +59 -0
  8. package/akanCode.js +12 -12
  9. package/appExecutor-rrx10jya.js +11 -0
  10. package/{application.command-m4rq4wc2.js → application.command-3w4v7t40.js} +84 -40
  11. package/{applicationBuildRunner-df7rx3ra.js → applicationBuildRunner-y5xbetyz.js} +51 -20
  12. package/buildBatch.proc.js +31 -16
  13. package/{cloud.command-a0gy0qq2.js → cloud.command-ph0rz6sw.js} +28 -29
  14. package/cloud.script-8bs9tp4j.js +30 -0
  15. package/{code.command-5rsdqw8s.js → code.command-9b967qpg.js} +13 -9
  16. package/context.command-ndzs5rbf.js +62 -0
  17. package/context.runner-bmstpng2.js +32 -0
  18. package/csrArtifactBuilder-gtvff6k7.js +10 -0
  19. package/{index-qd7xn2bk.js → dependencyScanner-93g8tk0r.js} +7 -6
  20. package/{devTui-h77zrjv5.js → devTui-rf374y2w.js} +1 -1
  21. package/{fileSys-zpvt5gtf.js → fileSys-e5mwt73x.js} +1 -1
  22. package/frameworkGraph-aneq2nwy.js +8 -0
  23. package/{guideline.command-mffxknbr.js → guideline.command-y8qz9kxy.js} +9 -5
  24. package/guidelines/agentRule/agentRule.instruction.md +25 -9
  25. package/guidelines/akanApi/akanApi.instruction.md +6 -4
  26. package/guidelines/conventions/core.md +23 -5
  27. package/guidelines/conventions/rules/app.md +4 -1
  28. package/guidelines/conventions/rules/page.md +5 -4
  29. package/guidelines/conventions/rules/ts.md +3 -3
  30. package/guidelines/errorCodes/errorCodes.instruction.md +165 -0
  31. package/guidelines/fieldRule/fieldRule.instruction.md +2 -1
  32. package/guidelines/mcpRule/mcpRule.instruction.md +225 -5
  33. package/guidelines/pageRule/pageRule.instruction.md +10 -1
  34. package/guidelines/queryRule/queryRule.instruction.md +3 -1
  35. package/guidelines/runtimeRule/runtimeRule.instruction.md +14 -8
  36. package/guidelines/transportRule/transportRule.instruction.md +31 -1
  37. package/incrementalBuilder.proc.js +609 -437
  38. package/{index-skmtj8rm.js → index-02v45hh9.js} +27 -10
  39. package/{index-j6gc8n14.js → index-0csk6jqm.js} +11 -9
  40. package/{index-2r9ff9qm.js → index-0wa5z6rm.js} +2 -2
  41. package/{index-nmvhjn8c.js → index-0z8sbdme.js} +93 -82
  42. package/{index-2vgv7fs7.js → index-1c2807kg.js} +727 -693
  43. package/{index-hj6w4ka1.js → index-1p81ecbz.js} +1 -1
  44. package/{index-2mf1aen9.js → index-1p9bxjmt.js} +2 -2
  45. package/{index-an76bdrv.js → index-2kh4xj3m.js} +1 -1
  46. package/{index-99qvtff2.js → index-2vn0m9z5.js} +5 -5
  47. package/{index-rp4yf32g.js → index-3569fr49.js} +36 -29
  48. package/{index-xvk2a75m.js → index-38x8ynrx.js} +25 -25
  49. package/{index-cmg5ngqa.js → index-3fmzz9sf.js} +20 -20
  50. package/{index-rfzp4pqs.js → index-45aprybg.js} +3 -3
  51. package/{index-k92x3vne.js → index-4a1n0nym.js} +1 -1
  52. package/{index-ra9fvn7s.js → index-4zgm54wf.js} +76 -40
  53. package/{index-exn38bzx.js → index-652f3bs8.js} +116 -54
  54. package/{index-grxs6fts.js → index-6gepp8yn.js} +57 -31
  55. package/{index-vm0dn0mt.js → index-6j351de4.js} +294 -157
  56. package/{index-w15mg3km.js → index-7ssr7wq4.js} +1 -1
  57. package/{index-gxav1bjz.js → index-82cmbpxc.js} +9 -9
  58. package/{index-2mrn1mrg.js → index-9f3reh2y.js} +1 -1
  59. package/{index-gcx48get.js → index-9rymt8d6.js} +2 -2
  60. package/{index-swwjakt0.js → index-ankyx6dj.js} +14 -18
  61. package/{index-28x1aszt.js → index-b0t92k71.js} +154 -58
  62. package/index-b372rck5.js +799 -0
  63. package/{index-yf9wc28h.js → index-bejy9zyc.js} +1 -1
  64. package/{index-r0a604h4.js → index-c669pbyb.js} +5 -4
  65. package/{index-xyn02k0w.js → index-cm9rb480.js} +662 -433
  66. package/{index-j9790rhk.js → index-d0n78fzc.js} +1635 -1139
  67. package/{index-hqv34wzq.js → index-dr1carpr.js} +10 -10
  68. package/index-f2arv0mv.js +30 -0
  69. package/{index-5radqwn2.js → index-gtydr9qc.js} +12 -12
  70. package/{index-j6eeh5d7.js → index-j3fqs8rc.js} +5 -5
  71. package/{index-yckz5t8b.js → index-jdw9m5c4.js} +516 -434
  72. package/{index-ny2k80mv.js → index-jf4vk1s0.js} +9 -2
  73. package/{index-x40bdsca.js → index-jg5rwrf7.js} +77 -115
  74. package/{index-5zwr4n6k.js → index-ktxdfqg5.js} +65 -8
  75. package/index-mnhrqjjq.js +127 -0
  76. package/{index-3ghdb7p5.js → index-pc42gxa5.js} +2777 -3676
  77. package/{index-0hbtve0a.js → index-q8h4eg5y.js} +32 -28
  78. package/{index-j3v29pq7.js → index-qh81drde.js} +219 -175
  79. package/{index-b4qq3rq0.js → index-rwgqba9p.js} +1 -1
  80. package/{index-w8yasvpc.js → index-scfsqen7.js} +2136 -2175
  81. package/{index-9p260r4e.js → index-trffs83s.js} +538 -250
  82. package/{index-0gg15zwa.js → index-twjgmryg.js} +6 -6
  83. package/index-whvhsb5f.js +80 -0
  84. package/{index-h7hehkw6.js → index-xczjdng6.js} +3 -1
  85. package/{index-39jz41jb.js → index-xs9a3ddt.js} +3 -3
  86. package/{index-35j83zkd.js → index-xv3pvdw4.js} +2 -2
  87. package/{index-34792nh7.js → index-y2g0s9tn.js} +1 -1
  88. package/{index-43f4h4cm.js → index-ymgsvhc5.js} +7 -8
  89. package/{index-ygdbn9jn.js → index-zyb0ebm4.js} +1 -1
  90. package/{index-bns3wcpc.js → index-zyjztrvc.js} +2 -2
  91. package/index.js +30 -24
  92. package/libExecutor-nstr00s7.js +10 -0
  93. package/{library.command-bmd7zc5m.js → library.command-b02aw1hm.js} +12 -5
  94. package/{localRegistry.command-y6en1599.js → localRegistry.command-3hg1p4aj.js} +24 -24
  95. package/{module.command-7exfffqw.js → module.command-bd9gz6cv.js} +11 -7
  96. package/{package.command-adskw2rj.js → package.command-xmr0mxze.js} +11 -10
  97. package/package.json +8 -8
  98. package/{page.command-dw01272p.js → page.command-x94qf58g.js} +8 -4
  99. package/{pipeline.command-0b1r3y5r.js → pipeline.command-n2843k6t.js} +15 -9
  100. package/pkgExecutor-cka27e3c.js +10 -0
  101. package/{primitive.command-byw6vc04.js → primitive.command-cs7v376h.js} +12 -8
  102. package/{projectTypecheck-kkrpq60a.js → projectTypecheck-za2n3nbr.js} +1 -1
  103. package/{prompter-qrwx1p17.js → prompter-d33wmdpa.js} +2 -2
  104. package/{quality.command-6rqnhzct.js → quality.command-nqngh1jd.js} +25 -16
  105. package/{recipeScanner-4b69ybe0.js → recipeScanner-rrx69awy.js} +1 -1
  106. package/{repair.command-rw5zymak.js → repair.command-v2medwsm.js} +12 -8
  107. package/{routeSourceValidator-4h947v7c.js → routeSourceValidator-8n6j1vn7.js} +4 -2
  108. package/{scalar.command-2dyp9nh9.js → scalar.command-61cjmxn1.js} +10 -6
  109. package/skills/akan-debug/SKILL.md +8 -5
  110. package/skills/akan-err/SKILL.md +7 -0
  111. package/skills/akan-mcp/SKILL.md +19 -1
  112. package/skills/akan-scaffold/SKILL.md +1 -1
  113. package/skills/akan-validate/SKILL.md +3 -3
  114. package/{subspace.command-111ynwv1.js → subspace.command-dtv8nfh7.js} +30 -24
  115. package/templates/app/page/_layout.tsx +13 -0
  116. package/templates/app/page/styles.css.template +40 -0
  117. package/templates/appSample/page/_index.tsx +9 -9
  118. package/templates/appSample/page/_layout.tsx +1 -0
  119. package/templates/appSample/page/styles.css.template +40 -5
  120. package/templates/appSample/ui/Recipe/jellyButton.ts +1 -1
  121. package/templates/biomeForm.ts +1 -1
  122. package/templates/env/_env.server.type.ts +1 -1
  123. package/templates/facetIndex/index.ts +2 -37
  124. package/templates/lib/sig.ts +0 -4
  125. package/templates/lib/useClient.ts +1 -1
  126. package/templates/workspaceRoot/.devcontainer/devcontainer.json.template +1 -1
  127. package/templates/workspaceRoot/AGENTS.md.template +2 -1
  128. package/templates/workspaceRoot/README.ts +4 -2
  129. package/{tunnel.command-2gcpfbdj.js → tunnel.command-fmwm5fgb.js} +15 -13
  130. package/{typeChecker-s640r6c0.js → typeChecker-7jt6abrs.js} +1 -1
  131. package/typecheck.proc.js +3 -2
  132. package/{verify.command-djgs86ma.js → verify.command-4f260t53.js} +19 -17
  133. package/{workflow.command-n0k2mxr5.js → workflow.command-tm5q9xsm.js} +21 -14
  134. package/{workspace.command-fh1qwxfx.js → workspace.command-75gc280j.js} +56 -54
  135. package/CodeAgent-x2p3a3e0.js +0 -11
  136. package/TunnelShare-c4xsfzg5.js +0 -15
  137. package/agent.command-9et2e27p.js +0 -52
  138. package/cloud.script-xze4zh7n.js +0 -31
  139. package/context.command-rk1dwrg4.js +0 -57
  140. package/context.runner-83ky5m1b.js +0 -30
  141. package/dependencyScanner-78sq8m4q.js +0 -8
  142. /package/templates/{appSample → app}/public/fonts/Pretendard-Bold.woff2 +0 -0
  143. /package/templates/{appSample → app}/public/fonts/Pretendard-Medium.woff2 +0 -0
  144. /package/templates/{appSample → app}/public/fonts/Pretendard-Regular.woff2 +0 -0
  145. /package/templates/{appSample → app}/public/fonts/Pretendard-SemiBold.woff2 +0 -0
@@ -8,7 +8,7 @@ export default function getContent(scanInfo: AppInfo | LibInfo | null, dict: { a
8
8
  /** Sugared gummy button with the same variants as akanjs's \`buttonRecipe\`; \`page/_overrides.tsx\` binds it to every akanjs/ui Button. ghost/outline/link stay surfaceless. */
9
9
  export const jellyButtonRecipe = recipe(
10
10
  tv({
11
- base: "squish inline-flex cursor-pointer items-center justify-center gap-2 whitespace-nowrap rounded-full font-bold focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",
11
+ base: "squish inline-flex cursor-pointer items-center justify-center gap-2 whitespace-nowrap rounded-full font-bold leading-auto focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",
12
12
  variants: {
13
13
  variant: {
14
14
  default: "text-foreground",
@@ -1,4 +1,4 @@
1
- import { compareExportNames } from "./facetIndex";
1
+ import { compareExportNames } from "akanjs/common";
2
2
 
3
3
  export interface JsxElement {
4
4
  tag: string;
@@ -1,5 +1,5 @@
1
1
  import type { AppInfo, LibInfo } from "akanjs";
2
- import { compareExportNames } from "../facetIndex";
2
+ import { compareExportNames } from "akanjs/common";
3
3
 
4
4
  export default function getContent(scanInfo: AppInfo | LibInfo | null, dict: { [key: string]: string } = {}) {
5
5
  if (!scanInfo) return null;
@@ -1,5 +1,6 @@
1
1
  import type { SysExecutor } from "@akanjs/devkit/executors";
2
2
  import type { AppInfo, LibInfo } from "akanjs";
3
+ import { facetBarrelOf } from "akanjs/common";
3
4
 
4
5
  interface Dict {
5
6
  [key: string]: string;
@@ -10,47 +11,11 @@ interface Options {
10
11
  facet?: string;
11
12
  }
12
13
 
13
- const sourceFilePattern = /\.(ts|tsx)$/;
14
- const excludedFilePattern = /(^index\.tsx?$|\.d\.ts$|\.(test|spec)\.(ts|tsx)$|\.css$|\.scss$|\.sass$)/;
15
- // `ui` exports PascalCase names only; `common`/`srvkit`/`webkit` export camelCase names only. Names with
16
- // dots, underscores, or hyphens (e.g. `foo.helper`, `Globe_Dynamic`, `kebab-case`) match neither and are skipped.
17
- const pascalCasePattern = /^[A-Z][A-Za-z0-9]*$/;
18
- const camelCasePattern = /^[a-z][A-Za-z0-9]*$/;
19
- const nameCasePatternForFacet = (facet: string) => (facet === "ui" ? pascalCasePattern : camelCasePattern);
20
- //? Biome's organizeImports order, or `akan lint` reorders the barrel: A < a < B < b, a digit before a letter, and a
21
- //? run of digits compared by its length first. DevGeneratedIndexSync sorts the same way; the env template imports it.
22
- const letterRankOf = (char: string) => char.toLowerCase().charCodeAt(0) * 2 + (char === char.toLowerCase() ? 1 : 0);
23
- const digitRunAt = (name: string, idx: number) => /^\d+/.exec(name.slice(idx))?.[0] ?? "";
24
- export const compareExportNames = (a: string, b: string) => {
25
- for (let idx = 0; idx < a.length && idx < b.length; ) {
26
- const [runA, runB] = [digitRunAt(a, idx), digitRunAt(b, idx)];
27
- if (runA && runB && runA !== runB) return runA.length - runB.length || (runA < runB ? -1 : 1);
28
- if (runA && runB) idx += runA.length;
29
- else if (runA || runB) return runA ? -1 : 1;
30
- else if (a.charAt(idx) !== b.charAt(idx)) return letterRankOf(a.charAt(idx)) - letterRankOf(b.charAt(idx));
31
- else idx++;
32
- }
33
- return a.length - b.length;
34
- };
35
-
36
14
  export default async function getContent(scanInfo: AppInfo | LibInfo | null, dict: Dict = {}, options: Options = {}) {
37
15
  const { exec, facet } = options;
38
16
  if (!exec || !facet || !(await exec.exists(facet))) return null;
39
17
 
40
- const nameCasePattern = nameCasePatternForFacet(facet);
41
18
  const { files, dirs } = await exec.getFilesAndDirs(facet);
42
- const exportNames = [
43
- ...files
44
- .filter((filename) => sourceFilePattern.test(filename) && !excludedFilePattern.test(filename))
45
- .map((filename) => filename.replace(sourceFilePattern, "")),
46
- ...dirs.filter((dirname) => !dirname.startsWith(".")),
47
- ]
48
- .filter((name) => nameCasePattern.test(name))
49
- .sort(compareExportNames);
50
-
51
- //? Not null: a null result writes nothing, so a barrel still exporting a deleted file would outlive the file.
52
- const content = exportNames.length
53
- ? `${exportNames.map((name) => `export * from "./${name}";`).join("\n")}\n`
54
- : "export {};\n";
19
+ const content = facetBarrelOf(facet, files, dirs);
55
20
  return { filename: "index.ts", content };
56
21
  }
@@ -19,7 +19,6 @@ export default function getContent(scanInfo: AppInfo | LibInfo | null, dict: { [
19
19
  return `
20
20
  import { FetchClient, type FetchClientType } from "akanjs/fetch";
21
21
  import { SignalRegistry, serverSignal${libs.length === 0 ? ", fetch as base" : ""} } from "akanjs/signal";
22
- import { Err } from "./dict";
23
22
  ${libs.map((lib) => `import { fetch as ${lib} } from "@libs/${lib}/lib/sig";`).join("\n")}
24
23
 
25
24
  ${databaseModules.map((module) => `import * as ${module}Sig from "./${module}/${module}.signal";`).join("\n")}
@@ -37,9 +36,6 @@ ${serviceModules.map((module) => `export const ${module} = SignalRegistry.regist
37
36
  export const fetchSignals = [${signalNames.join(", ")}] as const;
38
37
  export type Fetch = FetchClientType<typeof fetchSignals>;
39
38
  export const fetch = FetchClient.from(...fetchSignals) as unknown as Fetch;
40
- // A failure restored from another process is this scope's own Err, so a server hop that rethrows one keeps its
41
- // dictionary key and data instead of answering the original caller with Internal Server Error.
42
- fetch.setErrorConstructor(Err);
43
39
 
44
40
  export const getSerializedSignal = () => fetch.ownSerializedSignal
45
41
  `;
@@ -18,7 +18,7 @@ ${
18
18
  const dictionary = {};`
19
19
  }
20
20
  const pageProto = makePageProto<typeof dict>(dictionary);
21
- const fetchProto = FetchClient.build<typeof signal>(cnst, getSerializedSignal(), { Err: pageProto.Err });
21
+ const fetchProto = FetchClient.build<typeof signal>(cnst, getSerializedSignal());
22
22
  export const runtime = registerClientRuntime({ ...pageProto, ...fetchProto }, { scope: ${JSON.stringify(scanInfo?.type ?? "lib")} });
23
23
 
24
24
  export const { msg, Err, usePage, sig, fetch } = runtime;
@@ -10,7 +10,7 @@
10
10
  "remoteEnv": {
11
11
  "PATH": "/home/vscode/.bun/bin:${containerEnv:PATH}"
12
12
  },
13
- "onCreateCommand": "export PATH=\"/home/vscode/.bun/bin:$PATH\" && bun add -g @akanjs/cli@latest",
13
+ "onCreateCommand": "export PATH=\"/home/vscode/.bun/bin:$PATH\" && v=\"$(bun -e \"const p=require('./package.json'),v=p.dependencies?.akanjs??p.devDependencies?.akanjs;if(!v){console.error('package.json lists no akanjs in dependencies or devDependencies');process.exit(1)}console.log(v)\")\" && bun add -g \"@akanjs/cli@$v\"",
14
14
  "postCreateCommand": "bun install",
15
15
  "forwardPorts": [8282, 8283, 8284, 8285, 8286, 8287, 8288, 8289, 8290],
16
16
  "portsAttributes": {
@@ -7,7 +7,8 @@ the framework generate the repeated surfaces.
7
7
 
8
8
  If you hit an Akan.js bug, or a fix that one framework change would solve more easily than app-level workarounds,
9
9
  draft a GitHub issue for <https://github.com/akan-team/akanjs/issues> (version, repro, expected vs actual) and ask
10
- the user before filing it. Keep any interim workaround small and marked `// TODO: <issue url>`.
10
+ the user before filing it, since an issue is public. Meanwhile finish the task with a small interim workaround marked
11
+ `// TODO: <issue url>`.
11
12
 
12
13
  ## Generated Context
13
14
 
@@ -21,13 +21,15 @@ and deployment artifacts with strict conventions.
21
21
 
22
22
  ## Quick Start
23
23
 
24
- Install dependencies:
24
+ Install dependencies, and the \`akan\` CLI at the version of \`akanjs\` this workspace depends on:
25
25
 
26
26
  \`\`\`bash
27
27
  bun install
28
- bun install -g @akanjs/cli
28
+ v="$(bun -e "const p=require('./package.json'),v=p.dependencies?.akanjs??p.devDependencies?.akanjs;if(!v){console.error('package.json lists no akanjs in dependencies or devDependencies');process.exit(1)}console.log(v)")" && bun install -g "@akanjs/cli@$v"
29
29
  \`\`\`
30
30
 
31
+ A CLI of another major or minor version refuses to write to the workspace; run \`akan update\` to move both.
32
+
31
33
  Start the app:
32
34
 
33
35
  \`\`\`bash
@@ -4,26 +4,28 @@ import {
4
4
  runner,
5
5
  script,
6
6
  command
7
- } from "./index-exn38bzx.js";
7
+ } from "./index-652f3bs8.js";
8
8
  import"./index-j4yvgfhr.js";
9
- import"./index-bns3wcpc.js";
9
+ import"./index-pc42gxa5.js";
10
+ import"./index-zyjztrvc.js";
10
11
  import {
11
- AppExecutor
12
- } from "./index-3ghdb7p5.js";
12
+ AppExecutor2
13
+ } from "./index-b372rck5.js";
14
+ import"./index-f2arv0mv.js";
15
+ import"./index-mnhrqjjq.js";
13
16
  import {
14
17
  GlobalConfig,
15
18
  CloudApi
16
- } from "./index-rfzp4pqs.js";
19
+ } from "./index-45aprybg.js";
17
20
  import"./index-m9jj544v.js";
18
- import"./index-43f4h4cm.js";
19
- import"./index-nmvhjn8c.js";
20
- import"./index-xvk2a75m.js";
21
+ import"./index-ymgsvhc5.js";
21
22
  import {
22
23
  TunnelShare2
23
- } from "./index-k92x3vne.js";
24
+ } from "./index-4a1n0nym.js";
24
25
  import {
25
26
  writeClipboard
26
27
  } from "./index-p6pbz9n5.js";
28
+ import"./index-whvhsb5f.js";
27
29
 
28
30
  // pkgs/@akanjs/cli/tunnel/tunnel.script.ts
29
31
  import { select } from "@inquirer/prompts";
@@ -96,11 +98,11 @@ class TunnelScript extends script("tunnel", [TunnelRunner]) {
96
98
  if (name && !appNames.includes(name))
97
99
  throw new Error(`Unknown app: ${name}. Available: ${appNames.join(", ")}`);
98
100
  if (name)
99
- return AppExecutor.from(workspace, name);
101
+ return AppExecutor2.from(workspace, name);
100
102
  const only = appNames.length === 1 ? appNames[0] : null;
101
103
  if (only)
102
- return AppExecutor.from(workspace, only);
103
- return AppExecutor.from(workspace, await select({ message: "Select the app to share", choices: appNames }));
104
+ return AppExecutor2.from(workspace, only);
105
+ return AppExecutor2.from(workspace, await select({ message: "Select the app to share", choices: appNames }));
104
106
  }
105
107
  async share(name, { workspace, host, port, ttl, devRoutes }) {
106
108
  const app = await TunnelScript.resolveApp(workspace, name);
@@ -122,7 +124,7 @@ class TunnelScript extends script("tunnel", [TunnelRunner]) {
122
124
 
123
125
  // pkgs/@akanjs/cli/tunnel/tunnel.command.ts
124
126
  class TunnelCommand extends command("tunnel", [TunnelScript], ({ public: target }) => ({
125
- tunnel: target({ desc: "Share a locally running app on a public URL" }).arg("app", String, { desc: "app to share", nullable: true }).option("list", Boolean, { desc: "list the shares this account is holding", default: false }).option("stop", String, { desc: "stop the share with this code", default: "" }).option("host", String, {
127
+ tunnel: target({ desc: "Share a locally running app on a public URL", readOnly: true }).arg("app", String, { desc: "app to share", nullable: true }).option("list", Boolean, { desc: "list the shares this account is holding", default: false }).option("stop", String, { desc: "stop the share with this code", default: "" }).option("host", String, {
126
128
  desc: "host of the cloud (default: cloud.host of the root akan.config.ts, else Akan Cloud)",
127
129
  nullable: true
128
130
  }).option("port", Number, { desc: "local port to share (default: the app's dev port)", nullable: true }).option("ttl", Number, { desc: "minutes before the share expires", nullable: true }).option("devRoutes", Boolean, {
@@ -1,7 +1,7 @@
1
1
  // @bun
2
2
  import {
3
3
  TypeChecker2
4
- } from "./index-r0a604h4.js";
4
+ } from "./index-c669pbyb.js";
5
5
  export {
6
6
  TypeChecker2 as TypeChecker
7
7
  };
package/typecheck.proc.js CHANGED
@@ -1,7 +1,7 @@
1
1
  // @bun
2
2
  import {
3
3
  TypeChecker2
4
- } from "./index-r0a604h4.js";
4
+ } from "./index-c669pbyb.js";
5
5
  import {
6
6
  TypecheckFailure
7
7
  } from "./index-j4yvgfhr.js";
@@ -28,7 +28,8 @@ try {
28
28
  const configPath = process.env.AKAN_TYPECHECK_TSCONFIG;
29
29
  if (!configPath)
30
30
  throw new Error("AKAN_TYPECHECK_TSCONFIG is required");
31
- const result = TypeChecker2.checkProject(configPath);
31
+ const tsBuildInfoFile = process.env.AKAN_TYPECHECK_BUILDINFO;
32
+ const result = TypeChecker2.checkProject(configPath, tsBuildInfoFile ? { noEmit: true, incremental: true, tsBuildInfoFile } : {});
32
33
  if (process.env.AKAN_TYPECHECK_FORMAT === "json") {
33
34
  const root = process.env.AKAN_TYPECHECK_ROOT ?? process.cwd();
34
35
  process.stdout.write(JSON.stringify(TypeChecker2.toRecords(result.errors, root)));
@@ -4,37 +4,39 @@ import {
4
4
  script,
5
5
  markCliErrorPrinted,
6
6
  command
7
- } from "./index-exn38bzx.js";
7
+ } from "./index-652f3bs8.js";
8
8
  import {
9
9
  CliError
10
10
  } from "./index-j4yvgfhr.js";
11
- import"./index-bns3wcpc.js";
12
- import"./index-3ghdb7p5.js";
11
+ import"./index-pc42gxa5.js";
12
+ import"./index-zyjztrvc.js";
13
+ import"./index-b372rck5.js";
14
+ import"./index-f2arv0mv.js";
15
+ import"./index-mnhrqjjq.js";
13
16
  import {
14
17
  ApplicationRunner,
15
18
  VerifyScope
16
- } from "./index-j9790rhk.js";
17
- import"./index-vm0dn0mt.js";
18
- import"./index-43f4h4cm.js";
19
- import"./index-an76bdrv.js";
19
+ } from "./index-d0n78fzc.js";
20
+ import"./index-6j351de4.js";
21
+ import"./index-ymgsvhc5.js";
22
+ import"./index-2kh4xj3m.js";
20
23
  import"./index-m9jj544v.js";
21
- import"./index-nmvhjn8c.js";
22
- import"./index-xvk2a75m.js";
24
+ import"./index-1p81ecbz.js";
23
25
  import"./index-62md4dwy.js";
26
+ import"./index-zyb0ebm4.js";
24
27
  import {
25
28
  WorkspaceRunner
26
- } from "./index-xyn02k0w.js";
27
- import"./index-ygdbn9jn.js";
28
- import"./index-5zwr4n6k.js";
29
- import"./index-9p260r4e.js";
30
- import"./index-hj6w4ka1.js";
31
- import"./index-ny2k80mv.js";
29
+ } from "./index-cm9rb480.js";
30
+ import"./index-ktxdfqg5.js";
31
+ import"./index-trffs83s.js";
32
+ import"./index-jf4vk1s0.js";
32
33
  import"./index-t4d0ckde.js";
33
34
  import {
34
35
  VerifyPipeline,
35
36
  VerifyReport
36
- } from "./index-ra9fvn7s.js";
37
- import"./index-gcx48get.js";
37
+ } from "./index-4zgm54wf.js";
38
+ import"./index-9rymt8d6.js";
39
+ import"./index-whvhsb5f.js";
38
40
 
39
41
  // pkgs/@akanjs/cli/verify/verify.script.ts
40
42
  import path from "path";
@@ -3,29 +3,33 @@ import {
3
3
  Workspace,
4
4
  script,
5
5
  command
6
- } from "./index-exn38bzx.js";
6
+ } from "./index-652f3bs8.js";
7
7
  import"./index-j4yvgfhr.js";
8
- import"./index-bns3wcpc.js";
9
- import"./index-3ghdb7p5.js";
8
+ import"./index-pc42gxa5.js";
9
+ import"./index-zyjztrvc.js";
10
+ import"./index-b372rck5.js";
11
+ import"./index-f2arv0mv.js";
12
+ import"./index-mnhrqjjq.js";
10
13
  import {
11
14
  jsonText,
12
15
  workflowStatus,
13
16
  renderWorkflowPlan,
14
17
  renderWorkflowApply,
15
18
  renderWorkflowValidation
16
- } from "./index-2vgv7fs7.js";
17
- import"./index-9p260r4e.js";
18
- import"./index-yckz5t8b.js";
19
- import"./index-hj6w4ka1.js";
20
- import"./index-34792nh7.js";
21
- import"./index-hqv34wzq.js";
22
- import"./index-0hbtve0a.js";
23
- import"./index-99qvtff2.js";
24
- import"./index-2mf1aen9.js";
19
+ } from "./index-1c2807kg.js";
20
+ import"./index-trffs83s.js";
21
+ import"./index-jdw9m5c4.js";
22
+ import"./index-1p81ecbz.js";
23
+ import"./index-y2g0s9tn.js";
24
+ import"./index-dr1carpr.js";
25
+ import"./index-q8h4eg5y.js";
26
+ import"./index-2vn0m9z5.js";
27
+ import"./index-1p9bxjmt.js";
25
28
  import"./index-t4d0ckde.js";
26
29
  import {
27
30
  WorkflowRunner
28
- } from "./index-5radqwn2.js";
31
+ } from "./index-gtydr9qc.js";
32
+ import"./index-whvhsb5f.js";
29
33
 
30
34
  // pkgs/@akanjs/cli/workflow/workflow.script.ts
31
35
  import { Logger } from "akanjs/common";
@@ -97,7 +101,10 @@ class WorkflowScript extends script("workflow", [WorkflowRunner]) {
97
101
 
98
102
  // pkgs/@akanjs/cli/workflow/workflow.command.ts
99
103
  class WorkflowCommand extends command("workflow", [WorkflowScript], ({ public: target }) => ({
100
- workflow: target({ desc: "List, explain, plan, apply, validate, or report Akan workflows" }).arg("action", String, {
104
+ workflow: target({
105
+ desc: "List, explain, plan, apply, validate, or report Akan workflows",
106
+ readOnly: ({ action, dryRun }) => action !== "apply" || dryRun === true
107
+ }).arg("action", String, {
101
108
  desc: "list, explain, plan, apply, validate, or report",
102
109
  enum: ["list", "explain", "plan", "apply", "validate", "report"]
103
110
  }).arg("workflow", String, { desc: "workflow name, plan path, or run id", nullable: true }).with(Workspace).option("format", String, { desc: "output format", flag: "o", default: "markdown", enum: ["markdown", "json"] }).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("surfaces", String, {
@@ -4,76 +4,78 @@ import {
4
4
  Workspace,
5
5
  script,
6
6
  command
7
- } from "./index-exn38bzx.js";
7
+ } from "./index-652f3bs8.js";
8
8
  import"./index-j4yvgfhr.js";
9
- import"./index-bns3wcpc.js";
9
+ import"./index-pc42gxa5.js";
10
+ import"./index-zyjztrvc.js";
10
11
  import {
11
- AppExecutor,
12
- LibExecutor,
13
- PkgExecutor
14
- } from "./index-3ghdb7p5.js";
12
+ AppExecutor2
13
+ } from "./index-b372rck5.js";
14
+ import {
15
+ LibExecutor2
16
+ } from "./index-f2arv0mv.js";
17
+ import {
18
+ PkgExecutor2
19
+ } from "./index-mnhrqjjq.js";
15
20
  import {
16
21
  npmRegistryFromEnv,
17
22
  warnIgnoredNpmRegistry
18
- } from "./index-ny2k80mv.js";
23
+ } from "./index-jf4vk1s0.js";
24
+ import"./index-1p81ecbz.js";
19
25
  import"./index-62md4dwy.js";
26
+ import"./index-zyb0ebm4.js";
20
27
  import {
21
28
  defaultMaxDiagnostics,
22
29
  WorkspaceRunner
23
- } from "./index-xyn02k0w.js";
24
- import"./index-ygdbn9jn.js";
25
- import"./index-5zwr4n6k.js";
26
- import"./index-9p260r4e.js";
27
- import"./index-hj6w4ka1.js";
30
+ } from "./index-cm9rb480.js";
31
+ import"./index-ktxdfqg5.js";
32
+ import"./index-trffs83s.js";
28
33
  import"./index-t4d0ckde.js";
29
- import"./index-35j83zkd.js";
30
- import"./index-j6eeh5d7.js";
31
- import"./index-yckz5t8b.js";
32
- import"./index-2vgv7fs7.js";
33
- import"./index-j9790rhk.js";
34
- import"./index-vm0dn0mt.js";
35
- import"./index-43f4h4cm.js";
36
- import"./index-an76bdrv.js";
34
+ import"./index-1c2807kg.js";
35
+ import"./index-jdw9m5c4.js";
36
+ import"./index-xv3pvdw4.js";
37
+ import"./index-j3fqs8rc.js";
38
+ import"./index-d0n78fzc.js";
39
+ import"./index-6j351de4.js";
40
+ import"./index-ymgsvhc5.js";
41
+ import"./index-2kh4xj3m.js";
37
42
  import"./index-m9jj544v.js";
38
- import"./index-nmvhjn8c.js";
39
- import"./index-xvk2a75m.js";
40
- import"./index-ra9fvn7s.js";
43
+ import"./index-4zgm54wf.js";
41
44
  import {
42
45
  AgentScript
43
- } from "./index-grxs6fts.js";
46
+ } from "./index-6gepp8yn.js";
44
47
  import {
45
48
  LibraryScript
46
- } from "./index-j6gc8n14.js";
47
- import"./index-b4qq3rq0.js";
49
+ } from "./index-0csk6jqm.js";
50
+ import"./index-rwgqba9p.js";
48
51
  import {
49
52
  ApplicationScript
50
- } from "./index-28x1aszt.js";
51
- import"./index-rfzp4pqs.js";
52
- import"./index-qd7xn2bk.js";
53
- import"./index-cmg5ngqa.js";
53
+ } from "./index-b0t92k71.js";
54
+ import"./index-45aprybg.js";
54
55
  import {
55
56
  PackageScript
56
- } from "./index-swwjakt0.js";
57
- import"./index-rp4yf32g.js";
57
+ } from "./index-ankyx6dj.js";
58
+ import"./index-3569fr49.js";
58
59
  import {
59
60
  CloudScript2
60
- } from "./index-gxav1bjz.js";
61
- import"./index-j3v29pq7.js";
62
- import"./index-39jz41jb.js";
63
- import"./index-99qvtff2.js";
64
- import"./index-34792nh7.js";
65
- import"./index-hqv34wzq.js";
66
- import"./index-0hbtve0a.js";
67
- import"./index-2mf1aen9.js";
68
- import"./index-5radqwn2.js";
61
+ } from "./index-82cmbpxc.js";
62
+ import"./index-qh81drde.js";
63
+ import"./index-xs9a3ddt.js";
64
+ import"./index-2vn0m9z5.js";
65
+ import"./index-y2g0s9tn.js";
66
+ import"./index-dr1carpr.js";
67
+ import"./index-q8h4eg5y.js";
68
+ import"./index-1p9bxjmt.js";
69
+ import"./index-gtydr9qc.js";
69
70
  import {
70
71
  ContextScript
71
- } from "./index-0gg15zwa.js";
72
- import"./index-gcx48get.js";
72
+ } from "./index-twjgmryg.js";
73
+ import"./index-9rymt8d6.js";
73
74
  import {
74
75
  assertPlainName
75
76
  } from "./index-va90m8nd.js";
76
77
  import"./index-9bv479q5.js";
78
+ import"./index-whvhsb5f.js";
77
79
 
78
80
  // pkgs/@akanjs/cli/workspace/workspace.command.ts
79
81
  import path from "path";
@@ -166,9 +168,9 @@ class WorkspaceScript extends script("workspace", [
166
168
  AKAN_MACHINE_PUBLIC_KEY=${publicKey}`);
167
169
  }
168
170
  async lint(exec, workspace, { fix = true, maxDiagnostics } = {}) {
169
- if (exec instanceof AppExecutor)
171
+ if (exec instanceof AppExecutor2)
170
172
  await this.applicationScript.sync(exec);
171
- else if (exec instanceof LibExecutor)
173
+ else if (exec instanceof LibExecutor2)
172
174
  await this.libraryScript.syncLibrary(exec);
173
175
  const spinner = workspace.spinning(`Linting${fix ? " with fix" : ""}...`);
174
176
  try {
@@ -182,20 +184,20 @@ AKAN_MACHINE_PUBLIC_KEY=${publicKey}`);
182
184
  async lintAll(workspace, { fix = true, maxDiagnostics } = {}) {
183
185
  const [appNames, libNames, pkgNames] = await workspace.getExecs();
184
186
  const options = { fix, maxDiagnostics };
185
- await Promise.all(appNames.map((appName) => this.applicationScript.sync(AppExecutor.from(workspace, appName))));
186
- await Promise.all(libNames.map((libName) => this.libraryScript.syncLibrary(LibExecutor.from(workspace, libName))));
187
+ await Promise.all(appNames.map((appName) => this.applicationScript.sync(AppExecutor2.from(workspace, appName))));
188
+ await Promise.all(libNames.map((libName) => this.libraryScript.syncLibrary(LibExecutor2.from(workspace, libName))));
187
189
  await Promise.all([
188
- ...appNames.map((appName) => this.workspaceRunner.lint(AppExecutor.from(workspace, appName), workspace, options)),
189
- ...libNames.map((libName) => this.workspaceRunner.lint(LibExecutor.from(workspace, libName), workspace, options)),
190
- ...pkgNames.filter((pkgName) => pkgName !== "contract").map((pkgName) => this.workspaceRunner.lint(PkgExecutor.from(workspace, pkgName), workspace, options))
190
+ ...appNames.map((appName) => this.workspaceRunner.lint(AppExecutor2.from(workspace, appName), workspace, options)),
191
+ ...libNames.map((libName) => this.workspaceRunner.lint(LibExecutor2.from(workspace, libName), workspace, options)),
192
+ ...pkgNames.filter((pkgName) => pkgName !== "contract").map((pkgName) => this.workspaceRunner.lint(PkgExecutor2.from(workspace, pkgName), workspace, options))
191
193
  ]);
192
194
  }
193
195
  async syncAll(workspace) {
194
196
  const [appNames, libNames] = await workspace.getExecs();
195
197
  for (const libName of libNames)
196
- await this.libraryScript.syncLibrary(LibExecutor.from(workspace, libName));
198
+ await this.libraryScript.syncLibrary(LibExecutor2.from(workspace, libName));
197
199
  for (const appName of appNames)
198
- await this.applicationScript.sync(AppExecutor.from(workspace, appName));
200
+ await this.applicationScript.sync(AppExecutor2.from(workspace, appName));
199
201
  }
200
202
  async init(devProjectId, workspace, { host } = {}) {
201
203
  const [bunfigExists, packageJsonExists, tsconfigExists] = await Promise.all([
@@ -279,10 +281,10 @@ class WorkspaceCommand extends command("workspace", [WorkspaceScript], ({ public
279
281
  }).option("overwrite", Boolean, { desc: "Overwrite existing agent rule files", default: false }).option("cursorRules", Boolean, { desc: "Generate .cursor/rules/akan.mdc", default: true }).with(Workspace).exec(async function(overwrite, cursorRules, workspace) {
280
282
  await this.workspaceScript.generateAgentRules(workspace, { overwrite, cursorRules });
281
283
  }),
282
- lint: target({ desc: "Lint and fix code in a specific app/lib/pkg" }).with(Exec).option("fix", Boolean, { default: true }).option("maxDiagnostics", Number, maxDiagnosticsOption).with(Workspace).exec(async function(exec, fix, maxDiagnostics, workspace) {
284
+ lint: target({ desc: "Lint and fix code in a specific app/lib/pkg", readOnly: ({ fix }) => fix === false }).with(Exec).option("fix", Boolean, { default: true }).option("maxDiagnostics", Number, maxDiagnosticsOption).with(Workspace).exec(async function(exec, fix, maxDiagnostics, workspace) {
283
285
  await this.workspaceScript.lint(exec, workspace, { fix, maxDiagnostics });
284
286
  }),
285
- lintAll: target({ desc: "Lint and fix code in all apps and libraries" }).option("fix", Boolean, { default: true }).option("maxDiagnostics", Number, maxDiagnosticsOption).with(Workspace).exec(async function(fix, maxDiagnostics, workspace) {
287
+ lintAll: target({ desc: "Lint and fix code in all apps and libraries", readOnly: ({ fix }) => fix === false }).option("fix", Boolean, { default: true }).option("maxDiagnostics", Number, maxDiagnosticsOption).with(Workspace).exec(async function(fix, maxDiagnostics, workspace) {
286
288
  await this.workspaceScript.lintAll(workspace, { fix, maxDiagnostics });
287
289
  }),
288
290
  machineKeygen: target({
@@ -1,11 +0,0 @@
1
- // @bun
2
- import {
3
- CodeAgent2
4
- } from "./index-skmtj8rm.js";
5
- import"./index-2r9ff9qm.js";
6
- import"./index-b4qq3rq0.js";
7
- import"./index-35j83zkd.js";
8
- import"./index-bns3wcpc.js";
9
- export {
10
- CodeAgent2 as CodeAgent
11
- };
@@ -1,15 +0,0 @@
1
- // @bun
2
- import {
3
- TunnelShare2
4
- } from "./index-k92x3vne.js";
5
- import"./index-rfzp4pqs.js";
6
- import"./index-43f4h4cm.js";
7
- import"./index-m9jj544v.js";
8
- import"./index-xvk2a75m.js";
9
- import"./index-nmvhjn8c.js";
10
- import"./index-3ghdb7p5.js";
11
- import"./index-j4yvgfhr.js";
12
- import"./index-bns3wcpc.js";
13
- export {
14
- TunnelShare2 as TunnelShare
15
- };
@@ -1,52 +0,0 @@
1
- // @bun
2
- import {
3
- Workspace,
4
- command
5
- } from "./index-exn38bzx.js";
6
- import"./index-j4yvgfhr.js";
7
- import"./index-bns3wcpc.js";
8
- import"./index-3ghdb7p5.js";
9
- import"./index-35j83zkd.js";
10
- import"./index-j6eeh5d7.js";
11
- import"./index-yckz5t8b.js";
12
- import"./index-hj6w4ka1.js";
13
- import"./index-2vgv7fs7.js";
14
- import"./index-9p260r4e.js";
15
- import"./index-j9790rhk.js";
16
- import"./index-vm0dn0mt.js";
17
- import"./index-43f4h4cm.js";
18
- import"./index-an76bdrv.js";
19
- import"./index-m9jj544v.js";
20
- import"./index-nmvhjn8c.js";
21
- import"./index-xvk2a75m.js";
22
- import"./index-xyn02k0w.js";
23
- import"./index-5zwr4n6k.js";
24
- import"./index-62md4dwy.js";
25
- import"./index-ygdbn9jn.js";
26
- import"./index-ny2k80mv.js";
27
- import"./index-t4d0ckde.js";
28
- import"./index-ra9fvn7s.js";
29
- import {
30
- AgentScript
31
- } from "./index-grxs6fts.js";
32
- import"./index-gcx48get.js";
33
-
34
- // pkgs/@akanjs/cli/agent/agent.command.ts
35
- class AgentCommand extends command("agent", [AgentScript], ({ public: target }) => ({
36
- agent: target({ desc: "Install Akan agent rules for editors and coding agents", stdio: true, usageExitCode: 1 }).arg("action", String, { desc: "install, or hook (run by Claude Code hooks)" }).arg("target", String, {
37
- desc: "install: cursor, agents-md, claude, rules, skills, hooks, or all; hook: pre-edit, post-edit, stop",
38
- nullable: true
39
- }).option("force", Boolean, {
40
- desc: "overwrite existing pointer files and generated files you took over",
41
- default: false
42
- }).option("check", Boolean, {
43
- desc: "write nothing; exit 3 when install would create, change or remove a file",
44
- default: false
45
- }).with(Workspace).exec(async function(action, targetName, force, check, workspace) {
46
- await this.agentScript.agent(workspace, action, targetName, { force, check });
47
- })
48
- })) {
49
- }
50
- export {
51
- AgentCommand
52
- };