@akanjs/cli 3.1.1-rc.15 → 3.1.1-rc.17

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 (120) hide show
  1. package/.build-stamp +1 -1
  2. package/{CodeAgent-gtwn7tmb.js → CodeAgent-fbcq8vks.js} +2 -2
  3. package/{CodeTui-v941fqdh.js → CodeTui-0626gxqd.js} +1 -1
  4. package/TunnelShare-2p24xxza.js +14 -0
  5. package/agent.command-hpza0pg9.js +46 -0
  6. package/akanCode.js +5 -3
  7. package/{application.command-j1reb9p1.js → application.command-3a7q1hs2.js} +11 -10
  8. package/{applicationBuildRunner-w20x63mz.js → applicationBuildRunner-s7yt71j4.js} +6 -5
  9. package/buildBatch.proc.js +6 -6
  10. package/{cloud.command-zd2mfkm0.js → cloud.command-4vg0pcea.js} +15 -14
  11. package/cloud.script-nkmeyhet.js +25 -0
  12. package/{code.command-dyet4xn6.js → code.command-fbntb67p.js} +6 -6
  13. package/commandManifest.json +1 -1
  14. package/{context.command-79gxczm4.js → context.command-31rm54v0.js} +18 -17
  15. package/context.runner-w01a32ph.js +26 -0
  16. package/{guideline.command-xwkskvky.js → guideline.command-cv3by2ng.js} +3 -3
  17. package/guidelines/conventions/core.md +104 -0
  18. package/guidelines/conventions/rules/app.md +83 -0
  19. package/guidelines/conventions/rules/auth.md +45 -0
  20. package/guidelines/conventions/rules/config.md +56 -0
  21. package/guidelines/conventions/rules/constant.md +24 -0
  22. package/guidelines/conventions/rules/gates.md +31 -0
  23. package/guidelines/conventions/rules/layer.md +25 -0
  24. package/guidelines/conventions/rules/migration.md +27 -0
  25. package/guidelines/conventions/rules/module.md +90 -0
  26. package/guidelines/conventions/rules/page.md +56 -0
  27. package/guidelines/conventions/rules/sensitive.md +16 -0
  28. package/guidelines/conventions/rules/server.md +86 -0
  29. package/guidelines/conventions/rules/ssr.md +47 -0
  30. package/guidelines/conventions/rules/style.md +43 -0
  31. package/guidelines/conventions/rules/test.md +34 -0
  32. package/guidelines/conventions/rules/ts.md +95 -0
  33. package/guidelines/conventions/rules/tsx.md +75 -0
  34. package/guidelines/mcpRule/mcpRule.instruction.md +1 -1
  35. package/guidelines/workspaceRecipes/workspaceRecipes.instruction.md +3 -3
  36. package/incrementalBuilder.proc.js +6 -6
  37. package/{index-pqdz7rat.js → index-05nxx4m5.js} +952 -47
  38. package/{index-41d3zx66.js → index-0ht91675.js} +37 -59
  39. package/{index-cz9g85xh.js → index-0zwznvv1.js} +1 -1
  40. package/{index-7ktk2hnz.js → index-0zyatd10.js} +2 -2
  41. package/{index-8jb5ep2e.js → index-12kzwak1.js} +3 -3
  42. package/{index-yknrmkmt.js → index-1dhf8ymv.js} +2 -2
  43. package/{index-qmeh0s05.js → index-3gccwenr.js} +2 -2
  44. package/{index-hdzjaq7s.js → index-3txrjt6n.js} +2 -2
  45. package/{index-tzzs52h0.js → index-57q1ayd2.js} +18 -1240
  46. package/index-5kh9scvs.js +514 -0
  47. package/index-5n5hds19.js +1246 -0
  48. package/{index-pc9ps0hx.js → index-6269mf2s.js} +10 -9
  49. package/{index-1e2955yd.js → index-64g9fsjy.js} +43 -12
  50. package/index-7zeb5r1p.js +653 -0
  51. package/{index-kr62ph5a.js → index-8s8b4eba.js} +45 -4
  52. package/{index-wvvwdzfw.js → index-922k2zwq.js} +3 -3
  53. package/{index-brpk7gd8.js → index-9ndw5d8j.js} +7 -7
  54. package/{index-xeh7m2j5.js → index-et6ce601.js} +1 -1
  55. package/{index-jtydvvq7.js → index-f5adsa58.js} +4 -4
  56. package/index-fbewhg4g.js +590 -0
  57. package/{index-7abjzny1.js → index-hm7x0c11.js} +33 -37
  58. package/{index-rshwdv9w.js → index-hvv5rnaq.js} +2 -2
  59. package/index-jje9qzyq.js +27 -0
  60. package/index-js1gj6f6.js +410 -0
  61. package/{index-2qzzp0c9.js → index-kjrvwzav.js} +3 -3
  62. package/index-m5n3ka0p.js +18 -0
  63. package/index-m6r88hhr.js +3582 -0
  64. package/{index-4rwfh2de.js → index-mt0wa941.js} +4 -4
  65. package/{index-553xyb55.js → index-mwj9q2ya.js} +1 -1
  66. package/{index-5nd1wtkv.js → index-p6x5b7hr.js} +1 -1
  67. package/index-r2wedvqn.js +138 -0
  68. package/{index-ygy8c12j.js → index-rvynj5gz.js} +1 -1
  69. package/{index-nmy1rana.js → index-tdv66eah.js} +4 -4
  70. package/{index-8rvwgd1r.js → index-w134p86k.js} +1 -1
  71. package/{index-jjd97ya6.js → index-wfczhj1z.js} +14 -36
  72. package/{index-dy0jx9ay.js → index-wwe9rsrx.js} +14 -0
  73. package/{index-kbbyzs6j.js → index-x5ecanqh.js} +2 -2
  74. package/{index-ch1sv7ke.js → index-zre4m2ce.js} +9 -21
  75. package/index.js +23 -22
  76. package/{library.command-td8t85kb.js → library.command-sh70fyvy.js} +3 -3
  77. package/{localRegistry.command-jx9zkmxf.js → localRegistry.command-2nbyy84d.js} +17 -14
  78. package/{module.command-j70mqgpp.js → module.command-n0bmtzwy.js} +5 -5
  79. package/{package.command-1b1v6k5v.js → package.command-7h9r51bz.js} +3 -3
  80. package/package.json +2 -2
  81. package/{page.command-m31w2tsz.js → page.command-vjtpfbb1.js} +3 -3
  82. package/{pipeline.command-q7b8wy55.js → pipeline.command-c93se3ar.js} +2 -2
  83. package/{primitive.command-4zrbhkb9.js → primitive.command-a3075qp2.js} +6 -6
  84. package/{projectTypecheck-synx6qff.js → projectTypecheck-sf9xwaga.js} +1 -1
  85. package/{prompter-76k56b37.js → prompter-hgcta8pb.js} +1 -1
  86. package/quality.command-dw1y9hmy.js +76 -0
  87. package/{repair.command-98n6zxg7.js → repair.command-tg57d8yt.js} +5 -5
  88. package/{scalar.command-rak5pjk3.js → scalar.command-cwzge353.js} +4 -4
  89. package/skills/akan-agent/SKILL.md +36 -0
  90. package/skills/akan-debug/SKILL.md +3 -3
  91. package/skills/akan-deps/SKILL.md +1 -2
  92. package/skills/akan-mcp/SKILL.md +40 -0
  93. package/skills/akan-page/SKILL.md +44 -0
  94. package/skills/akan-query/SKILL.md +38 -0
  95. package/skills/akan-runtime/SKILL.md +40 -0
  96. package/skills/akan-scaffold/SKILL.md +16 -6
  97. package/skills/akan-transport/SKILL.md +40 -0
  98. package/skills/akan-validate/SKILL.md +13 -11
  99. package/{subspace.command-ej0rk116.js → subspace.command-3h03c7kc.js} +8 -8
  100. package/templates/workspaceRoot/.gitignore.template +3 -0
  101. package/templates/workspaceRoot/AGENTS.md.template +4 -10
  102. package/{tunnel.command-kdx3amrc.js → tunnel.command-czaz6ys4.js} +7 -7
  103. package/{typeChecker-px49mezc.js → typeChecker-j2jdnqsr.js} +1 -1
  104. package/typecheck.proc.js +6 -1
  105. package/verify.command-nzwhtz71.js +91 -0
  106. package/{workflow.command-gffk9nj9.js → workflow.command-srhky88x.js} +47 -13
  107. package/workspace.command-9stchcd2.js +262 -0
  108. package/TunnelShare-26ty9skr.js +0 -14
  109. package/agent.command-h82gepwn.js +0 -25
  110. package/cloud.script-vdj8ymch.js +0 -24
  111. package/context.runner-ejag7mhr.js +0 -25
  112. package/guidelines/conventions/conventions.instruction.md +0 -617
  113. package/guidelines/workspaceOnboarding/workspaceOnboarding.instruction.md +0 -291
  114. package/index-6pzt55w3.js +0 -279
  115. package/index-y5m4j2w6.js +0 -856
  116. package/index-zzvvc845.js +0 -74
  117. package/quality.command-cy0pgqjz.js +0 -1478
  118. package/templates/workspaceRoot/docs/AI-DEVELOPMENT.md.template +0 -69
  119. package/templates/workspaceRoot/docs/GENERATED.md.template +0 -55
  120. package/workspace.command-097hv6n1.js +0 -521
@@ -10,7 +10,7 @@ import {
10
10
  isScannedRootEntry,
11
11
  AppExecutor,
12
12
  LibExecutor
13
- } from "./index-1e2955yd.js";
13
+ } from "./index-64g9fsjy.js";
14
14
  import {
15
15
  FileSys2
16
16
  } from "./index-52w0fvh8.js";
@@ -23,7 +23,7 @@ import {
23
23
  workflowPathsForPlan,
24
24
  workflowRunArtifactPath,
25
25
  workflowSyncDir
26
- } from "./index-pqdz7rat.js";
26
+ } from "./index-05nxx4m5.js";
27
27
 
28
28
  // pkgs/@akanjs/devkit/akanContext.ts
29
29
  import { readdir } from "fs/promises";
@@ -129,6 +129,7 @@ var generatedFiles = [
129
129
  "*/common/index.ts"
130
130
  ];
131
131
  var validationCommands = [
132
+ "akan verify [<app-or-lib-or-pkg>]",
132
133
  "akan sync <app-or-lib>",
133
134
  "akan lint <app-or-lib-or-pkg>",
134
135
  "akan typecheck <app-or-lib>",
@@ -142,7 +143,7 @@ var unknownGeneratedFilesFreshness = {
142
143
  status: "unknown",
143
144
  message: "Run sync before validation so generated Akan files match the current source conventions.",
144
145
  refreshCommand: "akan sync <app-or-lib>",
145
- verifyingCommands: ["akan lint <app-or-lib-or-pkg>", "akan build <app-name>"]
146
+ verifyingCommands: ["akan verify <app-or-lib>"]
146
147
  };
147
148
  var repairAction = (kind, command, reason, safeToRun) => ({
148
149
  kind,
@@ -231,7 +232,7 @@ var generatedFreshnessFromStates = async (workspace) => {
231
232
  status: targets.some((target) => target.status === "fresh") ? "fresh" : "stale",
232
233
  message: lastFresh ? `Generated files were refreshed for ${lastFresh.target} at ${lastFresh.lastSyncedAt}.` : "Generated sync state exists, but the last recorded repair did not pass.",
233
234
  refreshCommand: "akan sync <app-or-lib>",
234
- verifyingCommands: ["akan lint <app-or-lib-or-pkg>", "akan build <app-name>"],
235
+ verifyingCommands: ["akan verify <app-or-lib>"],
235
236
  targets
236
237
  };
237
238
  };
@@ -372,6 +373,41 @@ class AkanContextAnalyzer {
372
373
  hint
373
374
  };
374
375
  }
376
+ static async#agentGuideOversize(workspace, sysPaths) {
377
+ const sizeOf = async (file) => {
378
+ const content = await safeReadText(path.join(workspace.workspaceRoot, file));
379
+ return { file, bytes: content === null ? 0 : Buffer.byteLength(content) };
380
+ };
381
+ const root = await sizeOf("AGENTS.md");
382
+ if (root.bytes === 0)
383
+ return null;
384
+ const scoped = await Promise.all(sysPaths.map((sysPath) => sizeOf(`${sysPath}/AGENTS.md`)));
385
+ const largest = scoped.reduce((max, entry) => entry.bytes > max.bytes ? entry : max, { file: "", bytes: 0 });
386
+ const total = root.bytes + largest.bytes;
387
+ if (total <= 32 * 1024 * 0.8)
388
+ return null;
389
+ const subject = largest.bytes ? `AGENTS.md and ${largest.file} add up to` : "AGENTS.md is";
390
+ return `${subject} ${Math.ceil(total / 1024)} KiB of the 32 KiB Codex reads \u2014 run \`akan agent install\`, then shorten the text outside the akan:agent markers or move it into a skill.`;
391
+ }
392
+ static async#agentGuideLeftovers(workspace) {
393
+ const root = workspace.workspaceRoot;
394
+ const guide = await safeReadText(path.join(root, "AGENTS.md")) ?? "";
395
+ const leftovers = [];
396
+ for (const doc of ["docs/AI-DEVELOPMENT.md", "docs/GENERATED.md"]) {
397
+ const pointer = guide.includes(doc);
398
+ if (await safeReadText(path.join(root, doc)) !== null)
399
+ leftovers.push({
400
+ path: doc,
401
+ message: `${doc} is an older template's copy of the agent guide, and nothing reads it now \u2014 delete it${pointer ? " and the AGENTS.md sentence that points to it" : ""}.`
402
+ });
403
+ else if (pointer)
404
+ leftovers.push({
405
+ path: "AGENTS.md",
406
+ message: `AGENTS.md points to ${doc}, which is gone \u2014 delete that sentence.`
407
+ });
408
+ }
409
+ return leftovers;
410
+ }
375
411
  static async#configLeftovers(workspace, sysPaths) {
376
412
  const leftovers = [];
377
413
  for (const sysPath of sysPaths) {
@@ -435,6 +471,11 @@ class AkanContextAnalyzer {
435
471
  if (agentDrift)
436
472
  report({ severity: "warning", code: agentDrift.code, path: "AGENTS.md", message: agentDrift.message }, repairAction("generated", "akan agent install agents-md", agentDrift.hint, true));
437
473
  const sysPaths = [...context.apps, ...context.libs].map((sys) => sys.path);
474
+ const oversize = await AkanContextAnalyzer.#agentGuideOversize(workspace, sysPaths);
475
+ if (oversize)
476
+ diagnostics.push({ severity: "warning", code: "agent-guide-oversized", path: "AGENTS.md", message: oversize });
477
+ for (const leftover of await AkanContextAnalyzer.#agentGuideLeftovers(workspace))
478
+ diagnostics.push({ severity: "warning", code: "agent-guide-leftover", ...leftover });
438
479
  for (const leftover of await AkanContextAnalyzer.#configLeftovers(workspace, sysPaths))
439
480
  diagnostics.push({ severity: "warning", code: "config-leftover", ...leftover });
440
481
  for (const sys of [...context.apps, ...context.libs]) {
@@ -5,13 +5,13 @@ import {
5
5
  writeGeneratedSyncState,
6
6
  createRepairReport,
7
7
  renderRepairReport
8
- } from "./index-pqdz7rat.js";
8
+ } from "./index-05nxx4m5.js";
9
9
  import {
10
10
  AkanContextAnalyzer
11
- } from "./index-kr62ph5a.js";
11
+ } from "./index-8s8b4eba.js";
12
12
  import {
13
13
  runner
14
- } from "./index-qmeh0s05.js";
14
+ } from "./index-3gccwenr.js";
15
15
 
16
16
  // pkgs/@akanjs/cli/repair/repair.runner.ts
17
17
  var spawnShell = async (workspace, command) => await workspace.spawn("bash", ["-lc", command.startsWith("akan ") ? `bun run ${command}` : command], {
@@ -4,27 +4,27 @@ import {
4
4
  CloudApi,
5
5
  CloudUpdates,
6
6
  PipelineSecrets
7
- } from "./index-7ktk2hnz.js";
7
+ } from "./index-0zyatd10.js";
8
8
  import {
9
9
  PkgExecutor
10
- } from "./index-1e2955yd.js";
10
+ } from "./index-64g9fsjy.js";
11
11
  import {
12
12
  UpdatePackFolder,
13
13
  NativePublicEnv,
14
14
  NativeApp
15
- } from "./index-2qzzp0c9.js";
15
+ } from "./index-kjrvwzav.js";
16
16
  import {
17
17
  script
18
- } from "./index-qmeh0s05.js";
18
+ } from "./index-3gccwenr.js";
19
19
  import {
20
20
  ApplicationScript
21
- } from "./index-tzzs52h0.js";
21
+ } from "./index-5n5hds19.js";
22
22
  import {
23
23
  PackageScript
24
- } from "./index-hdzjaq7s.js";
24
+ } from "./index-3txrjt6n.js";
25
25
  import {
26
26
  CloudRunner
27
- } from "./index-ch1sv7ke.js";
27
+ } from "./index-zre4m2ce.js";
28
28
 
29
29
  // pkgs/@akanjs/cli/cloud/cloud.script.ts
30
30
  import { Logger } from "akanjs/common";
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  GlobalConfig,
4
4
  CloudApi
5
- } from "./index-7ktk2hnz.js";
5
+ } from "./index-0zyatd10.js";
6
6
 
7
7
  // pkgs/@akanjs/cli/tunnel/TunnelShare.ts
8
8
  import { TunnelAgent } from "akanjs/server/tunnel";
@@ -1,16 +1,16 @@
1
1
  // @bun
2
2
  import {
3
3
  jsonText
4
- } from "./index-pqdz7rat.js";
4
+ } from "./index-05nxx4m5.js";
5
5
  import {
6
6
  akanMcpInstallTargets
7
- } from "./index-kr62ph5a.js";
7
+ } from "./index-8s8b4eba.js";
8
8
  import {
9
9
  script
10
- } from "./index-qmeh0s05.js";
10
+ } from "./index-3gccwenr.js";
11
11
  import {
12
12
  ContextRunner2
13
- } from "./index-pc9ps0hx.js";
13
+ } from "./index-6269mf2s.js";
14
14
 
15
15
  // pkgs/@akanjs/cli/context/context.script.ts
16
16
  import { Logger } from "akanjs/common";