@akanjs/cli 3.1.0-rc.22 → 3.1.0-rc.24

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 (68) hide show
  1. package/.build-stamp +1 -1
  2. package/{CodeAgent-fee0pnwp.js → CodeAgent-qrhqfc5s.js} +2 -2
  3. package/{CodeTui-xh71b2k8.js → CodeTui-k2c7wzhf.js} +1 -1
  4. package/README.ko.md +1 -1
  5. package/README.md +1 -1
  6. package/TunnelShare-necyr77h.js +14 -0
  7. package/{agent.command-tge9rvmt.js → agent.command-8sma9jnd.js} +5 -5
  8. package/akanCode.js +2 -2
  9. package/{application.command-j5b8yrcf.js → application.command-v7xbe18e.js} +9 -9
  10. package/{applicationBuildRunner-s41mgz21.js → applicationBuildRunner-qaxt8try.js} +5 -5
  11. package/buildBatch.proc.js +5 -5
  12. package/{cloud.command-q9srng6e.js → cloud.command-gxspyqpr.js} +13 -13
  13. package/cloud.script-0trnvgbv.js +24 -0
  14. package/{code.command-n6r6zt97.js → code.command-ds7sr16b.js} +6 -6
  15. package/{context.command-1je84w1b.js → context.command-ytr0n79h.js} +16 -16
  16. package/context.runner-cjkadr7r.js +25 -0
  17. package/{guideline.command-0e0sx2vg.js → guideline.command-6tnmtn4w.js} +2 -2
  18. package/guidelines/pageRule/pageRule.instruction.md +3 -1
  19. package/incrementalBuilder.proc.js +3 -3
  20. package/{index-tbmtmkhx.js → index-0jxja6c2.js} +2 -2
  21. package/{index-1xqq3va9.js → index-1g5atn4s.js} +9 -9
  22. package/{index-x7bny3wv.js → index-32hkenqb.js} +1 -1
  23. package/{index-vyh8kemm.js → index-37gfh3nw.js} +3 -3
  24. package/{index-cgyqx6q1.js → index-3xm8hm4f.js} +2 -2
  25. package/{index-6nqnqzv1.js → index-5q6tyqv5.js} +1 -1
  26. package/{index-3xhak9e0.js → index-60gryg73.js} +1 -1
  27. package/{index-ex35dg39.js → index-6a64svwc.js} +1 -1
  28. package/{index-5m0s0gdv.js → index-6tkzmfze.js} +1 -1
  29. package/{index-9h0z0tjr.js → index-9f2bkqpf.js} +2 -2
  30. package/{index-rp9anyeb.js → index-arwtza6k.js} +4 -4
  31. package/{index-cq5x7a9k.js → index-bm5ed553.js} +8 -8
  32. package/{index-6mprvdt8.js → index-c090a8wn.js} +116 -39
  33. package/{index-t8npm331.js → index-cj3md29d.js} +3 -3
  34. package/{index-94jq9cbz.js → index-d5kf5rct.js} +2 -2
  35. package/{index-f9118j70.js → index-gzjpj0sw.js} +1 -1
  36. package/{index-p44jnjfr.js → index-hgeq1wpr.js} +2 -2
  37. package/{index-gxqvev8w.js → index-hzsmeevh.js} +2 -2
  38. package/{index-551gh8h2.js → index-k1s1ps6r.js} +3 -3
  39. package/{index-g5px5pxd.js → index-k8zer3t3.js} +1 -1
  40. package/{index-1bhv9dh4.js → index-khefnpqw.js} +4 -4
  41. package/{index-c9rfak6r.js → index-mt611jnw.js} +7 -7
  42. package/{index-hagw9c94.js → index-mzenhe26.js} +3 -3
  43. package/{index-4fe4qqgn.js → index-pkg6bhgc.js} +3 -3
  44. package/{index-8abyrfw8.js → index-q3kddxxd.js} +3 -3
  45. package/{index-73esn3y2.js → index-s2g91tgy.js} +1 -1
  46. package/{index-7xy30jev.js → index-tq0mjh8w.js} +4 -4
  47. package/{index-85h3dhe0.js → index-vt87d6kx.js} +7 -7
  48. package/{index-deckcwbg.js → index-zjfz6rvx.js} +2 -2
  49. package/index.js +22 -22
  50. package/{library.command-ys9s0mtc.js → library.command-d29mkrn1.js} +3 -3
  51. package/{localRegistry.command-kmp3sd47.js → localRegistry.command-e1d1sm2q.js} +12 -12
  52. package/{module.command-5sx9453y.js → module.command-7kgfp688.js} +5 -5
  53. package/{package.command-s0d3417k.js → package.command-9r2215cr.js} +3 -3
  54. package/package.json +3 -3
  55. package/{page.command-zsa03pmc.js → page.command-2jhwcye7.js} +3 -3
  56. package/{pipeline.command-j8h6qsha.js → pipeline.command-gcbxwwng.js} +2 -2
  57. package/{primitive.command-n2978nmw.js → primitive.command-dzjh98t1.js} +6 -6
  58. package/{projectTypecheck-qg2jf80j.js → projectTypecheck-wkbzjpry.js} +1 -1
  59. package/{quality.command-7kgz46st.js → quality.command-3yg6gt8j.js} +2 -2
  60. package/{repair.command-2sszcckw.js → repair.command-d1gm1hqc.js} +5 -5
  61. package/{scalar.command-230jrhzf.js → scalar.command-ntd52q4x.js} +4 -4
  62. package/{subspace.command-y5v4ypd3.js → subspace.command-w7540907.js} +8 -8
  63. package/{tunnel.command-ja29zghd.js → tunnel.command-61gd7btn.js} +7 -7
  64. package/{workflow.command-0eg8czt5.js → workflow.command-fykqj11r.js} +10 -10
  65. package/{workspace.command-zcym1dk5.js → workspace.command-fabmw1hc.js} +24 -24
  66. package/TunnelShare-s7bpe55e.js +0 -14
  67. package/cloud.script-vfsd4gxs.js +0 -24
  68. package/context.runner-xg0ngz93.js +0 -25
@@ -1,12 +1,12 @@
1
1
  // @bun
2
2
  import {
3
3
  script
4
- } from "./index-g5px5pxd.js";
4
+ } from "./index-k8zer3t3.js";
5
5
  import {
6
6
  AppExecutor,
7
7
  LibExecutor,
8
8
  ModuleExecutor
9
- } from "./index-gxqvev8w.js";
9
+ } from "./index-hzsmeevh.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-5m0s0gdv.js";
44
+ } from "./index-6tkzmfze.js";
45
45
  import {
46
46
  ModuleScript
47
- } from "./index-1bhv9dh4.js";
47
+ } from "./index-khefnpqw.js";
48
48
 
49
49
  // pkgs/@akanjs/cli/primitive/primitive.script.ts
50
50
  import { capitalize, lowerlize } from "akanjs/common";
@@ -1,13 +1,13 @@
1
1
  // @bun
2
2
  import {
3
3
  AppExecutor
4
- } from "./index-gxqvev8w.js";
4
+ } from "./index-hzsmeevh.js";
5
5
  import {
6
6
  jsonText,
7
7
  createWorkflowBaselineSummary,
8
8
  buildAkanModuleContextIndex,
9
9
  toolingRolloutGate
10
- } from "./index-5m0s0gdv.js";
10
+ } from "./index-6tkzmfze.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-tbmtmkhx.js";
20
+ } from "./index-0jxja6c2.js";
21
21
  import {
22
22
  runner
23
- } from "./index-g5px5pxd.js";
23
+ } from "./index-k8zer3t3.js";
24
24
  import {
25
25
  isPlaceholderAppId
26
- } from "./index-ex35dg39.js";
26
+ } from "./index-6a64svwc.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-551gh8h2.js";
33
+ } from "./index-k1s1ps6r.js";
34
34
  import {
35
35
  Prompter2
36
36
  } from "./index-zzvvc845.js";
37
37
  import {
38
38
  RepairRunner
39
- } from "./index-t8npm331.js";
39
+ } from "./index-cj3md29d.js";
40
40
  import {
41
41
  WorkflowRunner
42
- } from "./index-85h3dhe0.js";
42
+ } from "./index-vt87d6kx.js";
43
43
 
44
44
  // pkgs/@akanjs/devkit/akanMcpContract.ts
45
45
  import path from "path";
@@ -1,17 +1,17 @@
1
1
  // @bun
2
2
  import {
3
3
  resolveSsrPageEntriesForApp
4
- } from "./index-gxqvev8w.js";
4
+ } from "./index-hzsmeevh.js";
5
5
  import {
6
6
  bundleDefine,
7
7
  CsrEntryFiles,
8
8
  PagesEntrySourceGenerator,
9
9
  PagesBundleBuilder
10
- } from "./index-6nqnqzv1.js";
10
+ } from "./index-5q6tyqv5.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";
14
- import path4 from "path";
14
+ import path5 from "path";
15
15
 
16
16
  // pkgs/@akanjs/devkit/transforms/browserDirnamePlugin.ts
17
17
  import path from "path";
@@ -34,18 +34,95 @@ var createBrowserDirnamePlugin = () => ({
34
34
  }
35
35
  });
36
36
 
37
+ // pkgs/@akanjs/devkit/transforms/sideEffectImportOrder.ts
38
+ import { existsSync } from "fs";
39
+ import path2 from "path";
40
+ import ts from "typescript";
41
+
42
+ class SideEffectImportOrder {
43
+ static #prefix = "akan-side-effect:";
44
+ static #vendorModule = /[\\/]node_modules[\\/].+\.m?js$/;
45
+ static #shim = /\.akan-side-effect$/;
46
+ static plugin() {
47
+ return {
48
+ name: "akan-side-effect-order",
49
+ setup(build) {
50
+ const specifiers = new Map;
51
+ build.onLoad({ filter: SideEffectImportOrder.#vendorModule }, async ({ path: modulePath }) => {
52
+ const source = await Bun.file(modulePath).text();
53
+ const rewritten = await SideEffectImportOrder.rewrite(source, modulePath);
54
+ return rewritten === source ? undefined : { contents: rewritten, loader: "js" };
55
+ });
56
+ build.onResolve({ filter: /^akan-side-effect:/ }, ({ path: prefixed, importer }) => {
57
+ const specifier = prefixed.slice(SideEffectImportOrder.#prefix.length);
58
+ const shimPath = `${importer}.${Bun.hash(specifier).toString(36)}.akan-side-effect`;
59
+ specifiers.set(shimPath, specifier);
60
+ return { path: shimPath };
61
+ });
62
+ build.onLoad({ filter: SideEffectImportOrder.#shim }, ({ path: shimPath }) => ({
63
+ contents: `import ${JSON.stringify(specifiers.get(shimPath))};
64
+ `,
65
+ loader: "js"
66
+ }));
67
+ }
68
+ };
69
+ }
70
+ static async rewrite(source, filePath) {
71
+ if (!/\bimport\s*["']/.test(source))
72
+ return source;
73
+ const sourceFile = ts.createSourceFile(filePath, source, ts.ScriptTarget.Latest, false, ts.ScriptKind.JS);
74
+ const literals = sourceFile.statements.flatMap((statement) => ts.isImportDeclaration(statement) && !statement.importClause && !statement.attributes && ts.isStringLiteral(statement.moduleSpecifier) ? [statement.moduleSpecifier] : []);
75
+ const late = await Promise.all(literals.map((literal) => SideEffectImportOrder.#runsLate(literal.text, filePath)));
76
+ return literals.filter((_, idx) => late[idx]).reverse().reduce((rewritten, literal) => `${rewritten.slice(0, literal.getStart(sourceFile))}${JSON.stringify(`${SideEffectImportOrder.#prefix}${literal.text}`)}${rewritten.slice(literal.end)}`, source);
77
+ }
78
+ static async#runsLate(specifier, importer) {
79
+ const from = path2.dirname(importer);
80
+ const target = specifier.startsWith(".") ? path2.resolve(from, specifier) : null;
81
+ if (target && await SideEffectImportOrder.#isEsModule(target))
82
+ return false;
83
+ const sideEffects = await SideEffectImportOrder.#sideEffectsOf(target ? path2.dirname(target) : SideEffectImportOrder.#packageDirOf(specifier, from));
84
+ return sideEffects === undefined || sideEffects === true;
85
+ }
86
+ static async#isEsModule(filePath) {
87
+ const file = Bun.file(filePath);
88
+ if (!/\.m?js$/.test(filePath) || !await file.exists())
89
+ return false;
90
+ const sourceFile = ts.createSourceFile(filePath, await file.text(), ts.ScriptTarget.Latest, false, ts.ScriptKind.JS);
91
+ return ts.isExternalModule(sourceFile);
92
+ }
93
+ static #packageDirOf(specifier, from) {
94
+ const name = specifier.split("/").slice(0, specifier.startsWith("@") ? 2 : 1).join("/");
95
+ for (let dir = from;; dir = path2.dirname(dir)) {
96
+ const packageDir = path2.join(dir, "node_modules", name);
97
+ if (existsSync(packageDir))
98
+ return packageDir;
99
+ if (path2.dirname(dir) === dir)
100
+ return from;
101
+ }
102
+ }
103
+ static async#sideEffectsOf(fromDir) {
104
+ for (let dir = fromDir;; dir = path2.dirname(dir)) {
105
+ const manifest = Bun.file(path2.join(dir, "package.json"));
106
+ if (await manifest.exists())
107
+ return (await manifest.json()).sideEffects;
108
+ if (path2.dirname(dir) === dir)
109
+ return;
110
+ }
111
+ }
112
+ }
113
+
37
114
  // pkgs/@akanjs/devkit/frontendBuild/mcpAppViewBuilder.ts
38
115
  import { mkdir, readdir, rename, rm, unlink } from "fs/promises";
39
- import path3 from "path";
116
+ import path4 from "path";
40
117
  import { parseRouteModuleKey } from "akanjs/common";
41
118
 
42
119
  // pkgs/@akanjs/devkit/transforms/mcpAppPageTrimmer.ts
43
120
  import { realpathSync } from "fs";
44
- import path2 from "path";
45
- import ts2 from "typescript";
121
+ import path3 from "path";
122
+ import ts3 from "typescript";
46
123
 
47
124
  // pkgs/@akanjs/devkit/transforms/pureLazyMarker.ts
48
- import ts from "typescript";
125
+ import ts2 from "typescript";
49
126
 
50
127
  class PureLazyMarker {
51
128
  static plugin() {
@@ -66,14 +143,14 @@ class PureLazyMarker {
66
143
  static mark(source, filePath) {
67
144
  if (!source.includes("lazy("))
68
145
  return source;
69
- const kind = filePath.endsWith(".tsx") ? ts.ScriptKind.TSX : ts.ScriptKind.TS;
70
- const sourceFile = ts.createSourceFile(filePath, source, ts.ScriptTarget.Latest, true, kind);
146
+ const kind = filePath.endsWith(".tsx") ? ts2.ScriptKind.TSX : ts2.ScriptKind.TS;
147
+ const sourceFile = ts2.createSourceFile(filePath, source, ts2.ScriptTarget.Latest, true, kind);
71
148
  const starts = [];
72
149
  const visit = (node) => {
73
- const call = ts.isVariableDeclaration(node) ? node.initializer : undefined;
74
- if (call && ts.isCallExpression(call) && ts.isIdentifier(call.expression) && call.expression.text === "lazy")
150
+ const call = ts2.isVariableDeclaration(node) ? node.initializer : undefined;
151
+ if (call && ts2.isCallExpression(call) && ts2.isIdentifier(call.expression) && call.expression.text === "lazy")
75
152
  starts.push(call.getStart(sourceFile));
76
- ts.forEachChild(node, visit);
153
+ ts2.forEachChild(node, visit);
77
154
  };
78
155
  visit(sourceFile);
79
156
  return starts.sort((a, b) => b - a).reduce((marked, start) => `${marked.slice(0, start)}/* @__PURE__ */ ${marked.slice(start)}`, source);
@@ -93,13 +170,13 @@ class McpAppPageTrimmer {
93
170
  const filter = new RegExp(`^(?:${[...loadedPaths].map((pagePath) => RegExp.escape(pagePath)).join("|")})$`);
94
171
  build.onLoad({ filter }, async (args) => ({
95
172
  contents: PureLazyMarker.mark(McpAppPageTrimmer.trim(await Bun.file(args.path).text(), args.path), args.path),
96
- loader: path2.extname(args.path).slice(1)
173
+ loader: path3.extname(args.path).slice(1)
97
174
  }));
98
175
  }
99
176
  };
100
177
  }
101
178
  static trim(source, filePath) {
102
- const sourceFile = ts2.createSourceFile(filePath, source, ts2.ScriptTarget.Latest, true, ts2.ScriptKind.TSX);
179
+ const sourceFile = ts3.createSourceFile(filePath, source, ts3.ScriptTarget.Latest, true, ts3.ScriptKind.TSX);
103
180
  const spans = McpAppPageTrimmer.#stagesOf(sourceFile).flatMap((stage) => {
104
181
  const [first] = stage.arguments;
105
182
  if (!first || !McpAppPageTrimmer.#unused.has(stage.expression.name.text))
@@ -121,12 +198,12 @@ class McpAppPageTrimmer {
121
198
  static #stagesOf(sourceFile) {
122
199
  const stages = [];
123
200
  for (const statement of sourceFile.statements) {
124
- if (!ts2.isExportAssignment(statement) || statement.isExportEquals)
201
+ if (!ts3.isExportAssignment(statement) || statement.isExportEquals)
125
202
  continue;
126
203
  let node = statement.expression;
127
- while (ts2.isParenthesizedExpression(node) || ts2.isAsExpression(node) || ts2.isSatisfiesExpression(node))
204
+ while (ts3.isParenthesizedExpression(node) || ts3.isAsExpression(node) || ts3.isSatisfiesExpression(node))
128
205
  node = node.expression;
129
- while (ts2.isCallExpression(node) && ts2.isPropertyAccessExpression(node.expression)) {
206
+ while (ts3.isCallExpression(node) && ts3.isPropertyAccessExpression(node.expression)) {
130
207
  stages.push(node);
131
208
  node = node.expression.expression;
132
209
  }
@@ -146,7 +223,7 @@ class McpAppViewBuilder {
146
223
  this.#command = command;
147
224
  }
148
225
  get outputDir() {
149
- return this.#command === "build" ? path3.join(this.#app.dist.cwdPath, McpAppViewBuilder.dirName) : path3.join(this.#app.cwdPath, ".akan", "artifact", McpAppViewBuilder.dirName);
226
+ return this.#command === "build" ? path4.join(this.#app.dist.cwdPath, McpAppViewBuilder.dirName) : path4.join(this.#app.cwdPath, ".akan", "artifact", McpAppViewBuilder.dirName);
150
227
  }
151
228
  async build(pageEntries, { basePaths, cssAssets, options }) {
152
229
  const views = await McpAppViewBuilder.discover(pageEntries, basePaths);
@@ -156,18 +233,18 @@ class McpAppViewBuilder {
156
233
  }
157
234
  const stagingDir = `${this.outputDir}.next`;
158
235
  await rm(stagingDir, { recursive: true, force: true });
159
- const generatedDir = path3.join(this.#app.cwdPath, ".akan", "generated", McpAppViewBuilder.dirName);
236
+ const generatedDir = path4.join(this.#app.cwdPath, ".akan", "generated", McpAppViewBuilder.dirName);
160
237
  await rm(generatedDir, { recursive: true, force: true });
161
238
  await mkdir(generatedDir, { recursive: true });
162
239
  const files = Object.fromEntries(views.flatMap((view) => [
163
- [path3.join(generatedDir, `${view.name}.html`), McpAppViewBuilder.htmlOf(view)],
164
- [path3.join(generatedDir, `${view.name}.view.tsx`), McpAppViewBuilder.entryOf(view, generatedDir)]
240
+ [path4.join(generatedDir, `${view.name}.html`), McpAppViewBuilder.htmlOf(view)],
241
+ [path4.join(generatedDir, `${view.name}.view.tsx`), McpAppViewBuilder.entryOf(view, generatedDir)]
165
242
  ]));
166
243
  const pagePaths = [...new Set(views.map((view) => view.page.moduleAbsPath))];
167
244
  const result = await Bun.build({
168
245
  ...options,
169
246
  plugins: [...options.plugins, McpAppPageTrimmer.plugin(pagePaths), PureLazyMarker.plugin()],
170
- entrypoints: views.map((view) => path3.join(generatedDir, `${view.name}.html`)),
247
+ entrypoints: views.map((view) => path4.join(generatedDir, `${view.name}.html`)),
171
248
  files,
172
249
  root: generatedDir,
173
250
  outdir: stagingDir
@@ -187,10 +264,10 @@ ${logs}` : ""}`);
187
264
  const names = new Set(views.map((view) => `${view.name}.html`));
188
265
  await mkdir(this.outputDir, { recursive: true });
189
266
  for (const name of names)
190
- await rename(path3.join(stagingDir, name), path3.join(this.outputDir, name));
267
+ await rename(path4.join(stagingDir, name), path4.join(this.outputDir, name));
191
268
  for (const name of await readdir(this.outputDir))
192
269
  if (!names.has(name))
193
- await rm(path3.join(this.outputDir, name), { recursive: true, force: true });
270
+ await rm(path4.join(this.outputDir, name), { recursive: true, force: true });
194
271
  const strays = await readdir(stagingDir);
195
272
  if (strays.length)
196
273
  this.#app.logger.warn(`[mcp-app-build] ${strays.join(", ")} reached no view; a view loads nothing beside its own file`);
@@ -249,7 +326,7 @@ ${logs}` : ""}`);
249
326
  }
250
327
  static entryOf(view, fromDir) {
251
328
  const specifier = (absPath) => {
252
- const relative = path3.relative(fromDir, absPath).split(path3.sep).join("/");
329
+ const relative = path4.relative(fromDir, absPath).split(path4.sep).join("/");
253
330
  return JSON.stringify(relative.startsWith(".") ? relative : `./${relative}`);
254
331
  };
255
332
  const importsOf = (entries, name) => entries.map((entry, idx) => `import ${name}${idx} from ${specifier(entry.moduleAbsPath)};
@@ -288,11 +365,11 @@ ${importsOf(view.rootOverrides, "rootOverride")}${importsOf(view.overrides, "ove
288
365
  return null;
289
366
  }
290
367
  async#inline(view, dir, cssAsset) {
291
- const htmlPath = path3.join(dir, `${view.name}.html`);
368
+ const htmlPath = path4.join(dir, `${view.name}.html`);
292
369
  let html = await Bun.file(htmlPath).text();
293
370
  if (cssAsset) {
294
- const artifactDir = path3.join(this.#command === "build" ? this.#app.dist.cwdPath : this.#app.cwdPath, ".akan", "artifact");
295
- const css = await Bun.file(path3.join(artifactDir, cssAsset.cssRelPath)).text();
371
+ const artifactDir = path4.join(this.#command === "build" ? this.#app.dist.cwdPath : this.#app.cwdPath, ".akan", "artifact");
372
+ const css = await Bun.file(path4.join(artifactDir, cssAsset.cssRelPath)).text();
296
373
  html = CsrArtifactBuilder.injectBeforeHeadEnd(html, CsrArtifactBuilder.createInlineStyle(css));
297
374
  } else
298
375
  this.#app.logger.warn(`[mcp-app-build] no compiled stylesheet for ${view.name}; its view ships without CSS`);
@@ -385,11 +462,11 @@ ${logs}` : ""}`);
385
462
  minify: true,
386
463
  define: bundleDefine(app, command, "csr"),
387
464
  optimizeImports,
388
- plugins: [PagesBundleBuilder.createCssStubPlugin(), createBrowserDirnamePlugin()]
465
+ plugins: [PagesBundleBuilder.createCssStubPlugin(), createBrowserDirnamePlugin(), SideEffectImportOrder.plugin()]
389
466
  };
390
467
  }
391
468
  static publicEnvPath(app) {
392
- return path4.join(app.dist.cwdPath, ".akan", "artifact", "csr-public-env.json");
469
+ return path5.join(app.dist.cwdPath, ".akan", "artifact", "csr-public-env.json");
393
470
  }
394
471
  static async writePublicEnv(app, define) {
395
472
  const prefix = "process.env.";
@@ -407,20 +484,20 @@ ${logs}` : ""}`);
407
484
  return CsrEntryFiles.entryFilename(basePath);
408
485
  }
409
486
  static basePathOfHtml(htmlPath) {
410
- const name = path4.basename(htmlPath, ".html");
487
+ const name = path5.basename(htmlPath, ".html");
411
488
  return name === "index" ? "" : name;
412
489
  }
413
490
  get #outputDir() {
414
- return path4.join(this.#command === "build" ? this.#app.dist.cwdPath : this.#app.cwdPath, this.#command === "build" ? "csr" : ".akan/artifact/csr");
491
+ return path5.join(this.#command === "build" ? this.#app.dist.cwdPath : this.#app.cwdPath, this.#command === "build" ? "csr" : ".akan/artifact/csr");
415
492
  }
416
493
  get #generatedDir() {
417
- return path4.join(this.#app.cwdPath, ".akan/generated/csr");
494
+ return path5.join(this.#app.cwdPath, ".akan/generated/csr");
418
495
  }
419
496
  get #artifactDir() {
420
- return path4.join(this.#command === "build" ? this.#app.dist.cwdPath : this.#app.cwdPath, ".akan/artifact");
497
+ return path5.join(this.#command === "build" ? this.#app.dist.cwdPath : this.#app.cwdPath, ".akan/artifact");
421
498
  }
422
499
  #generatedPath(filename) {
423
- return path4.join(this.#generatedDir, filename);
500
+ return path5.join(this.#generatedDir, filename);
424
501
  }
425
502
  async#createEntryFile(basePath, pageEntries) {
426
503
  return [
@@ -453,7 +530,7 @@ void bootCsr(pages);
453
530
  async#loadCssAssets() {
454
531
  if (this.#cssAssets)
455
532
  return this.#cssAssets;
456
- const artifactFile = Bun.file(path4.join(this.#artifactDir, "base-artifact.json"));
533
+ const artifactFile = Bun.file(path5.join(this.#artifactDir, "base-artifact.json"));
457
534
  if (!await artifactFile.exists())
458
535
  return {};
459
536
  const artifact = await artifactFile.json();
@@ -468,7 +545,7 @@ void bootCsr(pages);
468
545
  const basePath = CsrArtifactBuilder.basePathOfHtml(htmlPath);
469
546
  const cssAsset = cssAssets[basePath];
470
547
  if (!cssAsset) {
471
- this.#app.logger.warn(`[csr-build] base-artifact.json has no compiled stylesheet for ${basePath || "root"}; ${path4.basename(htmlPath)} ships without CSS`);
548
+ this.#app.logger.warn(`[csr-build] base-artifact.json has no compiled stylesheet for ${basePath || "root"}; ${path5.basename(htmlPath)} ships without CSS`);
472
549
  }
473
550
  const inlined = await this.#inlineHtmlAssets(await htmlFile.text(), htmlPath, cssAsset);
474
551
  for (const filePath of inlined.jsFiles)
@@ -489,7 +566,7 @@ ${remainingAssets.join(`
489
566
  async#inlineHtmlAssets(html, htmlPath, cssAsset) {
490
567
  let next = html;
491
568
  if (cssAsset) {
492
- const css = await Bun.file(path4.join(this.#artifactDir, cssAsset.cssRelPath)).text();
569
+ const css = await Bun.file(path5.join(this.#artifactDir, cssAsset.cssRelPath)).text();
493
570
  next = CsrArtifactBuilder.injectBeforeHeadEnd(next, CsrArtifactBuilder.createInlineStyle(css));
494
571
  }
495
572
  const jsFiles = [];
@@ -559,7 +636,7 @@ ${CsrArtifactBuilder.escapeInlineScript(await loadScript(src))}
559
636
  throw new Error(`[csr-build] cannot inline external script: ${src}`);
560
637
  }
561
638
  const normalized = src.startsWith("/") ? src.slice(1) : src;
562
- return path4.resolve(path4.dirname(htmlPath), normalized);
639
+ return path5.resolve(path5.dirname(htmlPath), normalized);
563
640
  }
564
641
  }
565
642
 
@@ -5,13 +5,13 @@ import {
5
5
  writeGeneratedSyncState,
6
6
  createRepairReport,
7
7
  renderRepairReport
8
- } from "./index-5m0s0gdv.js";
8
+ } from "./index-6tkzmfze.js";
9
9
  import {
10
10
  AkanContextAnalyzer
11
- } from "./index-tbmtmkhx.js";
11
+ } from "./index-0jxja6c2.js";
12
12
  import {
13
13
  runner
14
- } from "./index-g5px5pxd.js";
14
+ } from "./index-k8zer3t3.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], {
@@ -2,12 +2,12 @@
2
2
  import {
3
3
  runner,
4
4
  script
5
- } from "./index-g5px5pxd.js";
5
+ } from "./index-k8zer3t3.js";
6
6
  import {
7
7
  generatedFilesForSync,
8
8
  createPassedPrimitiveReport,
9
9
  scalarChangedFiles
10
- } from "./index-5m0s0gdv.js";
10
+ } from "./index-6tkzmfze.js";
11
11
  import {
12
12
  pluralizeName
13
13
  } from "./index-nz8prx9g.js";
@@ -1,7 +1,7 @@
1
1
  // @bun
2
2
  import {
3
3
  AppInfo
4
- } from "./index-gxqvev8w.js";
4
+ } from "./index-hzsmeevh.js";
5
5
 
6
6
  // pkgs/@akanjs/devkit/slicePlanner.ts
7
7
  class SlicePlanner {
@@ -2,12 +2,12 @@
2
2
  import {
3
3
  runner,
4
4
  script
5
- } from "./index-g5px5pxd.js";
5
+ } from "./index-k8zer3t3.js";
6
6
  import {
7
7
  LibSource,
8
8
  formatLibStatuses,
9
9
  LibExecutor
10
- } from "./index-gxqvev8w.js";
10
+ } from "./index-hzsmeevh.js";
11
11
 
12
12
  // pkgs/@akanjs/cli/library/library.script.ts
13
13
  import { Logger } from "akanjs/common";
@@ -519,7 +519,7 @@ var DEFAULT_OPTIMIZE_IMPORTS = [
519
519
  "@material-ui/icons @tabler/icons-react mui-core react-icons/*"
520
520
  ].flatMap((line) => line.split(" "));
521
521
  var WORKSPACE_BARREL_FACETS = ["ui", "webkit", "common", "client", "server"];
522
- var DEFAULT_DOCKER_IMAGE = "oven/bun:1-slim";
522
+ var DEFAULT_DOCKER_IMAGE = "oven/bun:1.4.4-slim";
523
523
  var SSR_RUNTIME_PACKAGES = ["react", "react-dom", "react-server-dom-webpack"];
524
524
  var DEFAULT_AKAN_IMAGE_CONFIG = {
525
525
  deviceSizes: [640, 750, 828, 1080, 1200, 1920, 2048, 3840],
@@ -4265,7 +4265,7 @@ class PkgExecutor extends Executor {
4265
4265
  default: "./index.ts"
4266
4266
  }
4267
4267
  },
4268
- engines: { bun: ">=1.4.0" },
4268
+ engines: { bun: ">=1.4.4" },
4269
4269
  ...dependencyMaps
4270
4270
  };
4271
4271
  await Promise.all([this.dist.writeJson("package.json", distPkgJson), this.writeJson("package.json", distPkgJson)]);
@@ -4,17 +4,17 @@ import {
4
4
  ServerEnvProfile,
5
5
  Executor,
6
6
  WorkspaceExecutor
7
- } from "./index-gxqvev8w.js";
7
+ } from "./index-hzsmeevh.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-6mprvdt8.js";
14
+ } from "./index-c090a8wn.js";
15
15
  import {
16
16
  ExitCodeError
17
- } from "./index-g5px5pxd.js";
17
+ } from "./index-k8zer3t3.js";
18
18
 
19
19
  // pkgs/@akanjs/devkit/mobile/desktopBin.ts
20
20
  import { chmod, mkdir, rename, rm, writeFile } from "fs/promises";
@@ -10,7 +10,7 @@ import {
10
10
  LibExecutor,
11
11
  PkgExecutor,
12
12
  ModuleExecutor
13
- } from "./index-gxqvev8w.js";
13
+ } from "./index-hzsmeevh.js";
14
14
 
15
15
  // pkgs/@akanjs/devkit/commandDecorators/camelToKebabCase.ts
16
16
  var camelToKebabCase = (str) => str.replace(/([A-Z])/g, "-$1").toLowerCase();
@@ -2,10 +2,10 @@
2
2
  import {
3
3
  runner,
4
4
  script
5
- } from "./index-g5px5pxd.js";
5
+ } from "./index-k8zer3t3.js";
6
6
  import {
7
7
  ModuleExecutor
8
- } from "./index-gxqvev8w.js";
8
+ } from "./index-hzsmeevh.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-5m0s0gdv.js";
16
+ } from "./index-6tkzmfze.js";
17
17
  import {
18
18
  PageScript
19
- } from "./index-3xhak9e0.js";
19
+ } from "./index-60gryg73.js";
20
20
  import {
21
21
  pluralizeName
22
22
  } from "./index-nz8prx9g.js";
@@ -4,26 +4,26 @@ import {
4
4
  CloudApi,
5
5
  CloudUpdates,
6
6
  PipelineSecrets
7
- } from "./index-9h0z0tjr.js";
7
+ } from "./index-9f2bkqpf.js";
8
8
  import {
9
9
  PkgExecutor
10
- } from "./index-gxqvev8w.js";
10
+ } from "./index-hzsmeevh.js";
11
11
  import {
12
12
  NativePublicEnv,
13
13
  UpdatePackFolder
14
- } from "./index-551gh8h2.js";
14
+ } from "./index-k1s1ps6r.js";
15
15
  import {
16
16
  script
17
- } from "./index-g5px5pxd.js";
17
+ } from "./index-k8zer3t3.js";
18
18
  import {
19
19
  ApplicationScript
20
- } from "./index-1xqq3va9.js";
20
+ } from "./index-1g5atn4s.js";
21
21
  import {
22
22
  PackageScript
23
- } from "./index-deckcwbg.js";
23
+ } from "./index-zjfz6rvx.js";
24
24
  import {
25
25
  CloudRunner
26
- } from "./index-hagw9c94.js";
26
+ } from "./index-mzenhe26.js";
27
27
 
28
28
  // pkgs/@akanjs/cli/cloud/cloud.script.ts
29
29
  import { Logger } from "akanjs/common";
@@ -5,15 +5,15 @@ import {
5
5
  CloudApi,
6
6
  CloudUpdates,
7
7
  PipelineSecrets
8
- } from "./index-9h0z0tjr.js";
8
+ } from "./index-9f2bkqpf.js";
9
9
  import {
10
10
  WorkspaceExecutor,
11
11
  AppExecutor
12
- } from "./index-gxqvev8w.js";
12
+ } from "./index-hzsmeevh.js";
13
13
  import {
14
14
  runner,
15
15
  assertPromptable
16
- } from "./index-g5px5pxd.js";
16
+ } from "./index-k8zer3t3.js";
17
17
  import {
18
18
  SubspaceConfig
19
19
  } from "./index-4pf8g7ff.js";
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  runner,
4
4
  script
5
- } from "./index-g5px5pxd.js";
5
+ } from "./index-k8zer3t3.js";
6
6
  import {
7
7
  AGENT_BLOCK_START,
8
8
  AGENT_BLOCK_END,
@@ -13,14 +13,14 @@ import {
13
13
  CLAUDE_COMMENT_RULE,
14
14
  AppExecutor,
15
15
  LibExecutor
16
- } from "./index-gxqvev8w.js";
16
+ } from "./index-hzsmeevh.js";
17
17
  import {
18
18
  collectRecipeSources2,
19
19
  scanRecipes2
20
20
  } from "./index-hj6w4ka1.js";
21
21
  import {
22
22
  AkanContextAnalyzer
23
- } from "./index-tbmtmkhx.js";
23
+ } from "./index-0jxja6c2.js";
24
24
  import {
25
25
  Prompter2
26
26
  } from "./index-zzvvc845.js";
@@ -1,7 +1,7 @@
1
1
  // @bun
2
2
  import {
3
3
  resolveSsrPageEntriesForApp
4
- } from "./index-gxqvev8w.js";
4
+ } from "./index-hzsmeevh.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-cgyqx6q1.js";
12
+ } from "./index-3xm8hm4f.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-6nqnqzv1.js";
22
+ } from "./index-5q6tyqv5.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-fee0pnwp.js");
182
+ const { CodeAgent } = await import("./CodeAgent-qrhqfc5s.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({