@akanjs/cli 3.1.0-rc.26 → 3.1.0-rc.27

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 (74) hide show
  1. package/.build-stamp +1 -1
  2. package/{CodeAgent-qrhqfc5s.js → CodeAgent-c53dm40p.js} +2 -2
  3. package/{CodeTui-k2c7wzhf.js → CodeTui-xz9jtrn3.js} +1 -1
  4. package/TunnelShare-59zd4j8n.js +14 -0
  5. package/{agent.command-8sma9jnd.js → agent.command-qawf7z4s.js} +5 -5
  6. package/akanCode.js +2 -2
  7. package/{application.command-v7xbe18e.js → application.command-jqrgqk6j.js} +9 -9
  8. package/{applicationBuildRunner-qaxt8try.js → applicationBuildRunner-grgrey5c.js} +7 -6
  9. package/buildBatch.proc.js +5 -5
  10. package/{cloud.command-gxspyqpr.js → cloud.command-p9067ssj.js} +13 -13
  11. package/cloud.script-f0r4ce7j.js +24 -0
  12. package/{code.command-ds7sr16b.js → code.command-t6j55sbk.js} +6 -6
  13. package/{context.command-ytr0n79h.js → context.command-eqbzbgth.js} +16 -16
  14. package/context.runner-1cs88ags.js +25 -0
  15. package/{guideline.command-6tnmtn4w.js → guideline.command-w905q73w.js} +2 -2
  16. package/guidelines/conventions/conventions.instruction.md +15 -11
  17. package/guidelines/modelDocument/modelDocument.instruction.md +2 -1
  18. package/guidelines/queryRule/queryRule.instruction.md +9 -7
  19. package/guidelines/runtimeRule/runtimeRule.instruction.md +4 -3
  20. package/guidelines/ssrRule/ssrRule.instruction.md +9 -9
  21. package/guidelines/transportRule/transportRule.instruction.md +5 -5
  22. package/guidelines/workspaceOnboarding/workspaceOnboarding.instruction.md +5 -3
  23. package/guidelines/workspaceRecipes/workspaceRecipes.instruction.md +6 -4
  24. package/incrementalBuilder.proc.js +3 -3
  25. package/{index-cj3md29d.js → index-0dd6z4b9.js} +3 -3
  26. package/{index-mt611jnw.js → index-1de5f0qq.js} +7 -7
  27. package/{index-zjfz6rvx.js → index-1enc9rga.js} +2 -2
  28. package/{index-c090a8wn.js → index-25ks6x4k.js} +2 -2
  29. package/{index-32hkenqb.js → index-3aynkpf8.js} +1 -1
  30. package/{index-6a64svwc.js → index-3hvmytbs.js} +1 -1
  31. package/{index-3xm8hm4f.js → index-45c0mxb6.js} +2 -2
  32. package/{index-mzenhe26.js → index-48n4yhm4.js} +3 -3
  33. package/{index-5q6tyqv5.js → index-64pjry21.js} +1 -1
  34. package/{index-0jxja6c2.js → index-aqwdjn4x.js} +2 -2
  35. package/{index-q3kddxxd.js → index-avjqbtkj.js} +3 -3
  36. package/{index-s2g91tgy.js → index-bs9yr4we.js} +1 -1
  37. package/{index-bm5ed553.js → index-cgexcnwd.js} +8 -8
  38. package/{index-vt87d6kx.js → index-dkfadmrx.js} +7 -7
  39. package/{index-gzjpj0sw.js → index-eabfsarf.js} +1 -1
  40. package/{index-hgeq1wpr.js → index-er62k6w3.js} +35 -9
  41. package/{index-d5kf5rct.js → index-f2gfq0yh.js} +2 -2
  42. package/{index-k8zer3t3.js → index-fbw3kmt5.js} +2 -2
  43. package/{index-tq0mjh8w.js → index-fnqj2d2w.js} +4 -4
  44. package/{index-arwtza6k.js → index-hqh4mpgt.js} +4 -4
  45. package/{index-khefnpqw.js → index-j4dzazmw.js} +4 -4
  46. package/{index-hzsmeevh.js → index-n8dsax1f.js} +10 -5
  47. package/{index-k1s1ps6r.js → index-nr8m4j21.js} +3 -3
  48. package/{index-60gryg73.js → index-qh73jnyb.js} +1 -1
  49. package/{index-37gfh3nw.js → index-vtj332gj.js} +36 -13
  50. package/{index-pkg6bhgc.js → index-wt7m1hfc.js} +3 -3
  51. package/{index-9f2bkqpf.js → index-yfy3t4kw.js} +2 -2
  52. package/{index-6tkzmfze.js → index-yyxy7aff.js} +1 -1
  53. package/{index-1g5atn4s.js → index-z5cxrbvv.js} +13 -10
  54. package/index.js +40 -22
  55. package/{library.command-d29mkrn1.js → library.command-z1v7zepj.js} +3 -3
  56. package/{localRegistry.command-e1d1sm2q.js → localRegistry.command-48n23bjy.js} +12 -12
  57. package/{module.command-7kgfp688.js → module.command-rv307dk7.js} +5 -5
  58. package/{package.command-9r2215cr.js → package.command-7xkzc8m1.js} +3 -3
  59. package/package.json +2 -2
  60. package/{page.command-2jhwcye7.js → page.command-34hpdt7v.js} +3 -3
  61. package/{pipeline.command-gcbxwwng.js → pipeline.command-ckvhrpyg.js} +2 -2
  62. package/{primitive.command-dzjh98t1.js → primitive.command-em0twr5a.js} +6 -6
  63. package/{projectTypecheck-wkbzjpry.js → projectTypecheck-fy6hn05y.js} +1 -1
  64. package/{quality.command-3yg6gt8j.js → quality.command-c6p2819k.js} +2 -2
  65. package/{repair.command-d1gm1hqc.js → repair.command-j6czdgrv.js} +5 -5
  66. package/{scalar.command-ntd52q4x.js → scalar.command-17e20sj2.js} +4 -4
  67. package/skills/akan-store/SKILL.md +2 -1
  68. package/{subspace.command-w7540907.js → subspace.command-n3j7vv0w.js} +8 -17
  69. package/{tunnel.command-61gd7btn.js → tunnel.command-cm578f4s.js} +7 -7
  70. package/{workflow.command-fykqj11r.js → workflow.command-h9vkr6jb.js} +10 -10
  71. package/{workspace.command-fabmw1hc.js → workspace.command-tp8ysvjs.js} +29 -27
  72. package/TunnelShare-necyr77h.js +0 -14
  73. package/cloud.script-0trnvgbv.js +0 -24
  74. package/context.runner-cjkadr7r.js +0 -25
@@ -8,7 +8,7 @@ import {
8
8
  CodegenLock,
9
9
  WorkspaceExecutor,
10
10
  AppExecutor
11
- } from "./index-hzsmeevh.js";
11
+ } from "./index-n8dsax1f.js";
12
12
  import"./index-52w0fvh8.js";
13
13
  import {
14
14
  GraphClientEntryDiscovery,
@@ -19,10 +19,10 @@ import {
19
19
  DevChangePlanner,
20
20
  DevGeneratedIndexSync,
21
21
  SsrDevBundler
22
- } from "./index-3xm8hm4f.js";
22
+ } from "./index-45c0mxb6.js";
23
23
  import {
24
24
  ServerGraphFile
25
- } from "./index-5q6tyqv5.js";
25
+ } from "./index-64pjry21.js";
26
26
  import {
27
27
  prepareDevWatchBatch
28
28
  } from "./index-a5vmm6x4.js";
@@ -5,13 +5,13 @@ import {
5
5
  writeGeneratedSyncState,
6
6
  createRepairReport,
7
7
  renderRepairReport
8
- } from "./index-6tkzmfze.js";
8
+ } from "./index-yyxy7aff.js";
9
9
  import {
10
10
  AkanContextAnalyzer
11
- } from "./index-0jxja6c2.js";
11
+ } from "./index-aqwdjn4x.js";
12
12
  import {
13
13
  runner
14
- } from "./index-k8zer3t3.js";
14
+ } from "./index-fbw3kmt5.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,26 +4,26 @@ import {
4
4
  CloudApi,
5
5
  CloudUpdates,
6
6
  PipelineSecrets
7
- } from "./index-9f2bkqpf.js";
7
+ } from "./index-yfy3t4kw.js";
8
8
  import {
9
9
  PkgExecutor
10
- } from "./index-hzsmeevh.js";
10
+ } from "./index-n8dsax1f.js";
11
11
  import {
12
12
  NativePublicEnv,
13
13
  UpdatePackFolder
14
- } from "./index-k1s1ps6r.js";
14
+ } from "./index-nr8m4j21.js";
15
15
  import {
16
16
  script
17
- } from "./index-k8zer3t3.js";
17
+ } from "./index-fbw3kmt5.js";
18
18
  import {
19
19
  ApplicationScript
20
- } from "./index-1g5atn4s.js";
20
+ } from "./index-z5cxrbvv.js";
21
21
  import {
22
22
  PackageScript
23
- } from "./index-zjfz6rvx.js";
23
+ } from "./index-1enc9rga.js";
24
24
  import {
25
25
  CloudRunner
26
- } from "./index-mzenhe26.js";
26
+ } from "./index-48n4yhm4.js";
27
27
 
28
28
  // pkgs/@akanjs/cli/cloud/cloud.script.ts
29
29
  import { Logger } from "akanjs/common";
@@ -2,13 +2,13 @@
2
2
  import {
3
3
  runner,
4
4
  script
5
- } from "./index-k8zer3t3.js";
5
+ } from "./index-fbw3kmt5.js";
6
6
  import {
7
7
  FileSys2
8
8
  } from "./index-52w0fvh8.js";
9
9
  import {
10
10
  PkgExecutor
11
- } from "./index-hzsmeevh.js";
11
+ } from "./index-n8dsax1f.js";
12
12
  import {
13
13
  TypeScriptDependencyScanner2
14
14
  } from "./index-tvehn2sp.js";
@@ -1,13 +1,13 @@
1
1
  // @bun
2
2
  import {
3
3
  resolveSsrPageEntriesForApp
4
- } from "./index-hzsmeevh.js";
4
+ } from "./index-n8dsax1f.js";
5
5
  import {
6
6
  bundleDefine,
7
7
  CsrEntryFiles,
8
8
  PagesEntrySourceGenerator,
9
9
  PagesBundleBuilder
10
- } from "./index-5q6tyqv5.js";
10
+ } from "./index-64pjry21.js";
11
11
 
12
12
  // pkgs/@akanjs/devkit/frontendBuild/csrArtifactBuilder.ts
13
13
  import { mkdir as mkdir2, rm as rm2, unlink as unlink2 } from "fs/promises";
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  GlobalConfig,
4
4
  CloudApi
5
- } from "./index-9f2bkqpf.js";
5
+ } from "./index-yfy3t4kw.js";
6
6
 
7
7
  // pkgs/@akanjs/cli/tunnel/TunnelShare.ts
8
8
  import { TunnelAgent } from "akanjs/server/tunnel";
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  DesktopBin,
4
4
  UpdatePackFolder
5
- } from "./index-k1s1ps6r.js";
5
+ } from "./index-nr8m4j21.js";
6
6
  // pkgs/@akanjs/devkit/mobile/desktopServerStage.ts
7
7
  import { cp, mkdir, readdir, rm, writeFile } from "fs/promises";
8
8
  import path from "path";
@@ -19,11 +19,11 @@ import {
19
19
  CsrDevPaths,
20
20
  PagesEntrySourceGenerator,
21
21
  PagesBundleBuilder
22
- } from "./index-5q6tyqv5.js";
22
+ } from "./index-64pjry21.js";
23
23
  import {
24
24
  AsyncDefaultExportDetector,
25
25
  resolveSsrPageEntriesForApp
26
- } from "./index-hzsmeevh.js";
26
+ } from "./index-n8dsax1f.js";
27
27
 
28
28
  // pkgs/@akanjs/devkit/frontendBuild/autoImportSync.ts
29
29
  import { readdir, readFile, stat } from "fs/promises";
@@ -5,15 +5,15 @@ import {
5
5
  CloudApi,
6
6
  CloudUpdates,
7
7
  PipelineSecrets
8
- } from "./index-9f2bkqpf.js";
8
+ } from "./index-yfy3t4kw.js";
9
9
  import {
10
10
  WorkspaceExecutor,
11
11
  AppExecutor
12
- } from "./index-hzsmeevh.js";
12
+ } from "./index-n8dsax1f.js";
13
13
  import {
14
14
  runner,
15
15
  assertPromptable
16
- } from "./index-k8zer3t3.js";
16
+ } from "./index-fbw3kmt5.js";
17
17
  import {
18
18
  SubspaceConfig
19
19
  } from "./index-4pf8g7ff.js";
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  AsyncDefaultExportDetector,
4
4
  resolveSsrPageEntriesForApp
5
- } from "./index-hzsmeevh.js";
5
+ } from "./index-n8dsax1f.js";
6
6
  import {
7
7
  FileSys2
8
8
  } from "./index-52w0fvh8.js";
@@ -10,7 +10,7 @@ import {
10
10
  isScannedRootEntry,
11
11
  AppExecutor,
12
12
  LibExecutor
13
- } from "./index-hzsmeevh.js";
13
+ } from "./index-n8dsax1f.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-6tkzmfze.js";
26
+ } from "./index-yyxy7aff.js";
27
27
 
28
28
  // pkgs/@akanjs/devkit/akanContext.ts
29
29
  import { readdir } from "fs/promises";
@@ -1,7 +1,7 @@
1
1
  // @bun
2
2
  import {
3
3
  resolveSsrPageEntriesForApp
4
- } from "./index-hzsmeevh.js";
4
+ } from "./index-n8dsax1f.js";
5
5
  import {
6
6
  computeRouteSeedIndex,
7
7
  saveRouteSeedIndex,
@@ -9,7 +9,7 @@ import {
9
9
  ClientEntriesBundler,
10
10
  VENDOR_SPECIFIERS,
11
11
  RouteClientBuilder
12
- } from "./index-3xm8hm4f.js";
12
+ } from "./index-45c0mxb6.js";
13
13
  import {
14
14
  SOURCE_EXTS
15
15
  } from "./index-5nd1wtkv.js";
@@ -19,7 +19,7 @@ import {
19
19
  createTsconfigPackageResolver,
20
20
  rewriteBarrelImports,
21
21
  PagesBundleBuilder
22
- } from "./index-5q6tyqv5.js";
22
+ } from "./index-64pjry21.js";
23
23
  import {
24
24
  CssBlockParser
25
25
  } from "./index-62md4dwy.js";
@@ -179,7 +179,7 @@ class SubagentPool2 {
179
179
  }
180
180
  }
181
181
  async#run(id, kind, prompt, signal) {
182
- const { CodeAgent } = await import("./CodeAgent-qrhqfc5s.js");
182
+ const { CodeAgent } = await import("./CodeAgent-c53dm40p.js");
183
183
  const budget = this.#options.parent.tools.subagent;
184
184
  const child = SubagentPool2.childOf(this.#options.parent, kind);
185
185
  const agent = await CodeAgent.create({
@@ -1,13 +1,13 @@
1
1
  // @bun
2
2
  import {
3
3
  AppExecutor
4
- } from "./index-hzsmeevh.js";
4
+ } from "./index-n8dsax1f.js";
5
5
  import {
6
6
  jsonText,
7
7
  createWorkflowBaselineSummary,
8
8
  buildAkanModuleContextIndex,
9
9
  toolingRolloutGate
10
- } from "./index-6tkzmfze.js";
10
+ } from "./index-yyxy7aff.js";
11
11
  import {
12
12
  buildResourceList,
13
13
  codexMcpConfigPath,
@@ -17,29 +17,29 @@ import {
17
17
  upsertCodexMcpServerBlock,
18
18
  renderDoctorText,
19
19
  AkanContextAnalyzer
20
- } from "./index-0jxja6c2.js";
20
+ } from "./index-aqwdjn4x.js";
21
21
  import {
22
22
  runner
23
- } from "./index-k8zer3t3.js";
23
+ } from "./index-fbw3kmt5.js";
24
24
  import {
25
25
  isPlaceholderAppId
26
- } from "./index-6a64svwc.js";
26
+ } from "./index-3hvmytbs.js";
27
27
  import {
28
28
  getMobileTargets,
29
29
  appIdsOf
30
30
  } from "./index-m9jj544v.js";
31
31
  import {
32
32
  NativeApp
33
- } from "./index-k1s1ps6r.js";
33
+ } from "./index-nr8m4j21.js";
34
34
  import {
35
35
  Prompter2
36
36
  } from "./index-zzvvc845.js";
37
37
  import {
38
38
  RepairRunner
39
- } from "./index-cj3md29d.js";
39
+ } from "./index-0dd6z4b9.js";
40
40
  import {
41
41
  WorkflowRunner
42
- } from "./index-vt87d6kx.js";
42
+ } from "./index-dkfadmrx.js";
43
43
 
44
44
  // pkgs/@akanjs/devkit/akanMcpContract.ts
45
45
  import path from "path";
@@ -22,26 +22,26 @@ import {
22
22
  renderWorkflowApply,
23
23
  renderWorkflowValidation,
24
24
  renderWorkflowRunArtifact
25
- } from "./index-6tkzmfze.js";
25
+ } from "./index-yyxy7aff.js";
26
26
  import {
27
27
  AkanContextAnalyzer
28
- } from "./index-0jxja6c2.js";
28
+ } from "./index-aqwdjn4x.js";
29
29
  import {
30
30
  CommandContainer,
31
31
  runner
32
- } from "./index-k8zer3t3.js";
32
+ } from "./index-fbw3kmt5.js";
33
33
  import {
34
34
  ModuleScript
35
- } from "./index-khefnpqw.js";
35
+ } from "./index-j4dzazmw.js";
36
36
  import {
37
37
  PrimitiveScript
38
- } from "./index-arwtza6k.js";
38
+ } from "./index-hqh4mpgt.js";
39
39
  import {
40
40
  spawnShell
41
- } from "./index-cj3md29d.js";
41
+ } from "./index-0dd6z4b9.js";
42
42
  import {
43
43
  ScalarScript
44
- } from "./index-d5kf5rct.js";
44
+ } from "./index-f2gfq0yh.js";
45
45
 
46
46
  // pkgs/@akanjs/cli/workflow/workflow.runner.ts
47
47
  import { mkdir, readFile, writeFile } from "fs/promises";
@@ -1,7 +1,7 @@
1
1
  // @bun
2
2
  import {
3
3
  AppInfo
4
- } from "./index-hzsmeevh.js";
4
+ } from "./index-n8dsax1f.js";
5
5
 
6
6
  // pkgs/@akanjs/devkit/slicePlanner.ts
7
7
  class SlicePlanner {
@@ -2,12 +2,13 @@
2
2
  import {
3
3
  runner,
4
4
  script
5
- } from "./index-k8zer3t3.js";
5
+ } from "./index-fbw3kmt5.js";
6
6
  import {
7
7
  LibSource,
8
8
  formatLibStatuses,
9
+ CommandExecutionError,
9
10
  LibExecutor
10
- } from "./index-hzsmeevh.js";
11
+ } from "./index-n8dsax1f.js";
11
12
 
12
13
  // pkgs/@akanjs/cli/library/library.script.ts
13
14
  import { Logger } from "akanjs/common";
@@ -37,6 +38,8 @@ var compareSemver = (a, b) => {
37
38
  // pkgs/@akanjs/cli/library/library.runner.ts
38
39
  class LibraryRunner extends runner("library") {
39
40
  static libraryRepository = "https://github.com/akan-team/akanjs.git";
41
+ static #cloneDir = "node_modules/.akan/akanjs";
42
+ #clones = new Map;
40
43
  async createLibrary(libName, workspace) {
41
44
  await workspace.mkdir(`libs/${libName}`);
42
45
  await workspace.applyTemplate({ basePath: `libs/${libName}`, template: "libRoot", dict: { libName } });
@@ -59,14 +62,37 @@ class LibraryRunner extends runner("library") {
59
62
  const { version } = await workspace.readJson(manifestPath);
60
63
  return version ?? "unknown";
61
64
  }
65
+ async#hasTag(workspace, tag) {
66
+ try {
67
+ await workspace.spawn("git", ["ls-remote", "--exit-code", LibraryRunner.libraryRepository, `refs/tags/${tag}`]);
68
+ return true;
69
+ } catch (error) {
70
+ if (error instanceof CommandExecutionError && error.code === 2)
71
+ return false;
72
+ throw error;
73
+ }
74
+ }
75
+ async#cloneRepository(workspace) {
76
+ const repository = LibraryRunner.libraryRepository;
77
+ const version = await this.#installedAkanVersion(workspace);
78
+ const tag = version === "unknown" ? null : `v${version}`;
79
+ const branch = tag && await this.#hasTag(workspace, tag) ? ["--branch", tag] : [];
80
+ if (!branch.length) {
81
+ const reason = tag ? `akanjs ${version} has no ${tag} tag` : "akanjs is not installed in this workspace";
82
+ workspace.logger.warn(`${reason}; installing libraries from the default branch of ${repository}, which may expect a newer akanjs`);
83
+ }
84
+ if (await workspace.exists(LibraryRunner.#cloneDir))
85
+ await workspace.removeDir(LibraryRunner.#cloneDir);
86
+ await workspace.spawn("git", ["clone", "--depth", "1", ...branch, repository, LibraryRunner.#cloneDir]);
87
+ const sha = await workspace.spawn("git", ["-C", LibraryRunner.#cloneDir, "rev-parse", "HEAD"]);
88
+ return { origin: repository, sha: sha.trim().slice(0, 12) };
89
+ }
62
90
  async#copyLibraryFromRepository(workspace, libName) {
63
- await workspace.mkdir("node_modules/.akan");
64
- if (await workspace.exists("node_modules/.akan/akanjs"))
65
- await workspace.removeDir("node_modules/.akan/akanjs");
66
- await workspace.exec(`cd node_modules/.akan && git clone ${LibraryRunner.libraryRepository}`);
67
- await workspace.cp(`node_modules/.akan/akanjs/libs/${libName}`, `libs/${libName}`);
68
- const sha = await workspace.spawn("git", ["-C", "node_modules/.akan/akanjs", "rev-parse", "HEAD"]);
69
- return { origin: LibraryRunner.libraryRepository, sha: sha.trim().slice(0, 12) };
91
+ const cloned = this.#clones.get(workspace.workspaceRoot);
92
+ const source = cloned && await workspace.exists(LibraryRunner.#cloneDir) ? cloned : await this.#cloneRepository(workspace);
93
+ this.#clones.set(workspace.workspaceRoot, source);
94
+ await workspace.cp(`${LibraryRunner.#cloneDir}/libs/${libName}`, `libs/${libName}`);
95
+ return source;
70
96
  }
71
97
  async installLibrary(workspace, libName) {
72
98
  const source = await this.#copyInstalledLibrary(workspace, libName) ?? await this.#copyLibraryFromRepository(workspace, libName);
@@ -2,12 +2,12 @@
2
2
  import {
3
3
  runner,
4
4
  script
5
- } from "./index-k8zer3t3.js";
5
+ } from "./index-fbw3kmt5.js";
6
6
  import {
7
7
  generatedFilesForSync,
8
8
  createPassedPrimitiveReport,
9
9
  scalarChangedFiles
10
- } from "./index-6tkzmfze.js";
10
+ } from "./index-yyxy7aff.js";
11
11
  import {
12
12
  pluralizeName
13
13
  } from "./index-nz8prx9g.js";
@@ -10,7 +10,7 @@ import {
10
10
  LibExecutor,
11
11
  PkgExecutor,
12
12
  ModuleExecutor
13
- } from "./index-hzsmeevh.js";
13
+ } from "./index-n8dsax1f.js";
14
14
 
15
15
  // pkgs/@akanjs/devkit/commandDecorators/camelToKebabCase.ts
16
16
  var camelToKebabCase = (str) => str.replace(/([A-Z])/g, "-$1").toLowerCase();
@@ -631,7 +631,7 @@ var runCommands = async (...commands) => {
631
631
  if (installedAkanPackageJson && installedAkanPackageJson.version !== process.env.AKAN_VERSION) {
632
632
  Logger.rawLog(chalk2.yellow(`
633
633
  Akan CLI version is mismatch with installed package. ${process.env.AKAN_VERSION} (global) vs ${installedAkanPackageJson.version} (akanjs)
634
- It may cause unexpected behavior. Run \`akan update\` to update latest akanjs.`));
634
+ It may cause unexpected behavior. Run \`akan update\` to update latest akanjs.`), undefined, "error");
635
635
  }
636
636
  for (const command of commands) {
637
637
  const targetMetas = getTargetMetas(command);
@@ -1,16 +1,16 @@
1
1
  // @bun
2
2
  import {
3
3
  jsonText
4
- } from "./index-6tkzmfze.js";
4
+ } from "./index-yyxy7aff.js";
5
5
  import {
6
6
  akanMcpInstallTargets
7
- } from "./index-0jxja6c2.js";
7
+ } from "./index-aqwdjn4x.js";
8
8
  import {
9
9
  script
10
- } from "./index-k8zer3t3.js";
10
+ } from "./index-fbw3kmt5.js";
11
11
  import {
12
12
  ContextRunner2
13
- } from "./index-bm5ed553.js";
13
+ } from "./index-cgexcnwd.js";
14
14
 
15
15
  // pkgs/@akanjs/cli/context/context.script.ts
16
16
  import { Logger } from "akanjs/common";
@@ -1,12 +1,12 @@
1
1
  // @bun
2
2
  import {
3
3
  script
4
- } from "./index-k8zer3t3.js";
4
+ } from "./index-fbw3kmt5.js";
5
5
  import {
6
6
  AppExecutor,
7
7
  LibExecutor,
8
8
  ModuleExecutor
9
- } from "./index-hzsmeevh.js";
9
+ } from "./index-n8dsax1f.js";
10
10
  import {
11
11
  workflowStatus,
12
12
  compactDiagnostics,
@@ -41,10 +41,10 @@ import {
41
41
  hasSignalFactoryEntry,
42
42
  insertSignalFactoryEntry,
43
43
  addFieldUiPolicyForType
44
- } from "./index-6tkzmfze.js";
44
+ } from "./index-yyxy7aff.js";
45
45
  import {
46
46
  ModuleScript
47
- } from "./index-khefnpqw.js";
47
+ } from "./index-j4dzazmw.js";
48
48
 
49
49
  // pkgs/@akanjs/cli/primitive/primitive.script.ts
50
50
  import { capitalize, lowerlize } from "akanjs/common";
@@ -2,10 +2,10 @@
2
2
  import {
3
3
  runner,
4
4
  script
5
- } from "./index-k8zer3t3.js";
5
+ } from "./index-fbw3kmt5.js";
6
6
  import {
7
7
  ModuleExecutor
8
- } from "./index-hzsmeevh.js";
8
+ } from "./index-n8dsax1f.js";
9
9
  import {
10
10
  sourceFile,
11
11
  moduleSourcePaths,
@@ -13,10 +13,10 @@ import {
13
13
  createPassedPrimitiveReport,
14
14
  bilingualLabelForField,
15
15
  bilingualDescriptionForField
16
- } from "./index-6tkzmfze.js";
16
+ } from "./index-yyxy7aff.js";
17
17
  import {
18
18
  PageScript
19
- } from "./index-60gryg73.js";
19
+ } from "./index-qh73jnyb.js";
20
20
  import {
21
21
  pluralizeName
22
22
  } from "./index-nz8prx9g.js";
@@ -2962,6 +2962,15 @@ var execEmoji = {
2962
2962
  module: "\u2699\uFE0F",
2963
2963
  default: "\u2708\uFE0F"
2964
2964
  };
2965
+ var parseEnvValue = (value) => {
2966
+ const [, quote, inner] = value.match(/^(["'`])((?:\\.|(?!\1)[^\\])*)\1/) ?? [];
2967
+ if (!quote)
2968
+ return value.replace(/#.*/, "").trim();
2969
+ if (quote !== '"')
2970
+ return inner;
2971
+ return inner.replace(/\\(.)/g, (pair, char) => char === "n" ? `
2972
+ ` : char === "r" ? "\r" : pair);
2973
+ };
2965
2974
  var parseEnvFile = (envPath) => {
2966
2975
  const env = {};
2967
2976
  const content = (() => {
@@ -2980,11 +2989,7 @@ var parseEnvFile = (envPath) => {
2980
2989
  if (separatorIndex <= 0)
2981
2990
  continue;
2982
2991
  const key = normalized.slice(0, separatorIndex).trim();
2983
- let value = normalized.slice(separatorIndex + 1).trim();
2984
- if (value.startsWith('"') && value.endsWith('"') || value.startsWith("'") && value.endsWith("'")) {
2985
- value = value.slice(1, -1);
2986
- }
2987
- env[key] = value;
2992
+ env[key] = parseEnvValue(normalized.slice(separatorIndex + 1).trim());
2988
2993
  }
2989
2994
  return env;
2990
2995
  };
@@ -4,17 +4,17 @@ import {
4
4
  ServerEnvProfile,
5
5
  Executor,
6
6
  WorkspaceExecutor
7
- } from "./index-hzsmeevh.js";
7
+ } from "./index-n8dsax1f.js";
8
8
  import {
9
9
  resolveAppId,
10
10
  targetHtmlFilename
11
11
  } from "./index-m9jj544v.js";
12
12
  import {
13
13
  CsrArtifactBuilder
14
- } from "./index-c090a8wn.js";
14
+ } from "./index-25ks6x4k.js";
15
15
  import {
16
16
  ExitCodeError
17
- } from "./index-k8zer3t3.js";
17
+ } from "./index-fbw3kmt5.js";
18
18
 
19
19
  // pkgs/@akanjs/devkit/mobile/desktopBin.ts
20
20
  import { chmod, mkdir, rename, rm, writeFile } from "fs/promises";
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  runner,
4
4
  script
5
- } from "./index-k8zer3t3.js";
5
+ } from "./index-fbw3kmt5.js";
6
6
 
7
7
  // pkgs/@akanjs/cli/page/page.runner.ts
8
8
  class PageRunner extends runner("page") {
@@ -5,7 +5,7 @@ import {
5
5
  McpServerConfig,
6
6
  McpSignIn,
7
7
  AkanCodeCompaction2
8
- } from "./index-s2g91tgy.js";
8
+ } from "./index-bs9yr4we.js";
9
9
  import {
10
10
  stripAnsi
11
11
  } from "./index-7md2g9vw.js";
@@ -809,7 +809,7 @@ class AkanToolPack2 {
809
809
  return { name: "akan-tools", factory: async (pi) => await this.#register(pi) };
810
810
  }
811
811
  async names() {
812
- const { ContextRunner } = await import("./context.runner-cjkadr7r.js");
812
+ const { ContextRunner } = await import("./context.runner-1cs88ags.js");
813
813
  return [
814
814
  ...new ContextRunner().listMcpTools(this.#options.mode).map((tool) => tool.name),
815
815
  AkanToolPack2.verifyToolName
@@ -817,7 +817,7 @@ class AkanToolPack2 {
817
817
  }
818
818
  static verifyToolName = "akan_verify";
819
819
  async#register(pi) {
820
- const { ContextRunner } = await import("./context.runner-cjkadr7r.js");
820
+ const { ContextRunner } = await import("./context.runner-1cs88ags.js");
821
821
  const runner = new ContextRunner;
822
822
  const guidelineNames = await AkanToolPack2.#guidelineNames();
823
823
  for (const tool of runner.listMcpTools(this.#options.mode, { guidelineNames })) {
@@ -1396,6 +1396,7 @@ class SessionToolPack2 {
1396
1396
  }
1397
1397
 
1398
1398
  // pkgs/@akanjs/devkit/codeAgent/tools/WebToolPack.ts
1399
+ import { lookup } from "dns/promises";
1399
1400
  import { isIP } from "net";
1400
1401
  import { codeAgentClip as codeAgentClip4 } from "akanjs/common";
1401
1402
  import { Type as Type6 } from "typebox";
@@ -1630,7 +1631,7 @@ class WebToolPack2 {
1630
1631
  }
1631
1632
  async#read(url, signal) {
1632
1633
  const deepseek = this.#options.deepseek;
1633
- if (deepseek && !WebToolPack2.#isLocal(new URL(url).hostname)) {
1634
+ if (deepseek && !await this.#isLocal(new URL(url).hostname)) {
1634
1635
  try {
1635
1636
  const page = await deepseek.fetch(url, signal);
1636
1637
  return { status: 200, ok: true, title: page.title, text: page.content };
@@ -1668,16 +1669,38 @@ Offset ${offset} is past the end; the page has ${total} characters.`;
1668
1669
 
1669
1670
  ${page.text.slice(offset, end)}${rest}`;
1670
1671
  }
1671
- static #isLocal(hostname) {
1672
- const host = hostname.replace(/^\[|\]$/g, "").toLowerCase();
1673
- const family = isIP(host);
1674
- if (family === 6)
1675
- return host === "::1" || /^(f[cd]|fe[89ab])/.test(host);
1676
- if (family === 4) {
1677
- const [a = 0, b = 0] = host.split(".").map(Number);
1678
- return a === 0 || a === 10 || a === 127 || a === 100 && b >= 64 && b <= 127 || a === 169 && b === 254 || a === 172 && b >= 16 && b <= 31 || a === 192 && b === 168;
1672
+ async#isLocal(hostname) {
1673
+ const host = hostname.replace(/^\[|\]$|\.$/g, "").toLowerCase();
1674
+ if (isIP(host))
1675
+ return WebToolPack2.#isLocalAddress(host);
1676
+ if (!host.includes(".") || /\.(localhost|local|internal|lan|home\.arpa)$/.test(host))
1677
+ return true;
1678
+ try {
1679
+ const addresses = await (this.#options.lookup ?? WebToolPack2.#lookup)(host);
1680
+ return !addresses.length || addresses.some((address) => WebToolPack2.#isLocalAddress(address));
1681
+ } catch {
1682
+ return true;
1679
1683
  }
1680
- return !host.includes(".") || /\.(localhost|local|internal|lan|home\.arpa)$/.test(host);
1684
+ }
1685
+ static async#lookup(host) {
1686
+ return (await lookup(host, { all: true })).map((entry) => entry.address);
1687
+ }
1688
+ static #isLocalAddress(literal) {
1689
+ const address = WebToolPack2.#unmapped(literal);
1690
+ if (isIP(address) === 6)
1691
+ return address === "::" || address === "::1" || /^(f[cd]|fe[89ab])/.test(address);
1692
+ const [a = 0, b = 0] = address.split(".").map(Number);
1693
+ return a === 0 || a === 10 || a === 127 || a === 100 && b >= 64 && b <= 127 || a === 169 && b === 254 || a === 172 && b >= 16 && b <= 31 || a === 192 && b === 168;
1694
+ }
1695
+ static #unmapped(address) {
1696
+ const mapped = /^::ffff:(?:(\d+\.\d+\.\d+\.\d+)|([0-9a-f]{1,4}):([0-9a-f]{1,4}))$/i.exec(address);
1697
+ if (!mapped)
1698
+ return address;
1699
+ if (mapped[1])
1700
+ return mapped[1];
1701
+ const high = Number.parseInt(mapped[2] ?? "0", 16);
1702
+ const low = Number.parseInt(mapped[3] ?? "0", 16);
1703
+ return [high >> 8, high & 255, low >> 8, low & 255].join(".");
1681
1704
  }
1682
1705
  static #refuseHost(url, allowHosts) {
1683
1706
  let parsed;