@akanjs/cli 3.1.0 → 3.1.1-rc.1

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 (71) hide show
  1. package/.build-stamp +1 -1
  2. package/{CodeAgent-c53dm40p.js → CodeAgent-4pnxwptq.js} +2 -2
  3. package/{CodeTui-xz9jtrn3.js → CodeTui-hhndze8h.js} +1 -1
  4. package/TunnelShare-8qtffcex.js +14 -0
  5. package/{agent.command-qawf7z4s.js → agent.command-p02330r6.js} +5 -5
  6. package/akanCode.js +2 -2
  7. package/{application.command-jqrgqk6j.js → application.command-1117fgq9.js} +16 -11
  8. package/{applicationBuildRunner-grgrey5c.js → applicationBuildRunner-9cnnsdm5.js} +5 -5
  9. package/buildBatch.proc.js +5 -5
  10. package/{cloud.command-p9067ssj.js → cloud.command-ttb2s2x6.js} +13 -13
  11. package/cloud.script-fqp3zh02.js +24 -0
  12. package/{code.command-t6j55sbk.js → code.command-16pm1p2v.js} +6 -6
  13. package/{context.command-eqbzbgth.js → context.command-6ys86sqf.js} +16 -16
  14. package/context.runner-3jrypwe3.js +25 -0
  15. package/{guideline.command-w905q73w.js → guideline.command-3zay3d8g.js} +2 -2
  16. package/guidelines/conventions/conventions.instruction.md +7 -3
  17. package/guidelines/mcpRule/mcpRule.instruction.md +13 -6
  18. package/guidelines/pageRule/pageRule.instruction.md +13 -5
  19. package/guidelines/runtimeRule/runtimeRule.instruction.md +8 -2
  20. package/guidelines/ssrRule/ssrRule.instruction.md +6 -1
  21. package/guidelines/transportRule/transportRule.instruction.md +12 -5
  22. package/incrementalBuilder.proc.js +3 -3
  23. package/{index-z5cxrbvv.js → index-1cq1hq12.js} +30 -15
  24. package/{index-wt7m1hfc.js → index-1mfyyxh5.js} +3 -3
  25. package/{index-yfy3t4kw.js → index-2ar6tffh.js} +17 -12
  26. package/{index-vtj332gj.js → index-4w3skd33.js} +3 -3
  27. package/{index-48n4yhm4.js → index-7f0edwsj.js} +172 -70
  28. package/{index-bs9yr4we.js → index-9hbhm6cs.js} +1 -1
  29. package/{index-j4dzazmw.js → index-b5vptvnt.js} +4 -4
  30. package/{index-cgexcnwd.js → index-bb4hj03s.js} +8 -8
  31. package/{index-avjqbtkj.js → index-e9e9cebg.js} +74 -24
  32. package/{index-3hvmytbs.js → index-ekpp5tax.js} +1 -1
  33. package/{index-eabfsarf.js → index-fmder14z.js} +1 -1
  34. package/{index-qh73jnyb.js → index-g2s33373.js} +1 -1
  35. package/{index-fnqj2d2w.js → index-jaa81e9r.js} +4 -4
  36. package/{index-64pjry21.js → index-jgs8z8xb.js} +3 -3
  37. package/{index-45c0mxb6.js → index-ngpn9hzy.js} +6 -4
  38. package/{index-fbw3kmt5.js → index-p4dnj2wc.js} +1 -1
  39. package/{index-25ks6x4k.js → index-q8age5az.js} +2 -2
  40. package/{index-0dd6z4b9.js → index-qfzfaq96.js} +3 -3
  41. package/{index-er62k6w3.js → index-qkcwsg6r.js} +2 -2
  42. package/{index-n8dsax1f.js → index-rr7jk14m.js} +1 -1
  43. package/{index-dkfadmrx.js → index-sh9mmp5v.js} +7 -7
  44. package/{index-f2gfq0yh.js → index-sng3vt0p.js} +2 -2
  45. package/{index-1de5f0qq.js → index-sww1x1mv.js} +7 -7
  46. package/{index-1enc9rga.js → index-tk3jg2bm.js} +25 -8
  47. package/{index-3aynkpf8.js → index-vcpbrrf2.js} +1 -1
  48. package/{index-yyxy7aff.js → index-ynqxpwx6.js} +1 -1
  49. package/{index-aqwdjn4x.js → index-z6v7k9sb.js} +2 -2
  50. package/{index-nr8m4j21.js → index-z9xepn8t.js} +3 -3
  51. package/{index-hqh4mpgt.js → index-zn6bn1s2.js} +4 -4
  52. package/index.js +22 -22
  53. package/{library.command-z1v7zepj.js → library.command-a8n9h8j4.js} +3 -3
  54. package/{localRegistry.command-48n23bjy.js → localRegistry.command-c2mxqf4h.js} +12 -12
  55. package/{module.command-rv307dk7.js → module.command-b6f1p1xa.js} +5 -5
  56. package/{package.command-7xkzc8m1.js → package.command-tc27ftmy.js} +3 -3
  57. package/package.json +2 -2
  58. package/{page.command-34hpdt7v.js → page.command-m5wyqfkd.js} +3 -3
  59. package/{pipeline.command-ckvhrpyg.js → pipeline.command-4qxyafpz.js} +2 -2
  60. package/{primitive.command-em0twr5a.js → primitive.command-9yaatk0d.js} +6 -6
  61. package/{projectTypecheck-fy6hn05y.js → projectTypecheck-87k6z6ab.js} +1 -1
  62. package/{quality.command-c6p2819k.js → quality.command-fxn07zwp.js} +387 -73
  63. package/{repair.command-j6czdgrv.js → repair.command-evg9g911.js} +5 -5
  64. package/{scalar.command-17e20sj2.js → scalar.command-xsejjeq1.js} +4 -4
  65. package/{subspace.command-n3j7vv0w.js → subspace.command-4mjjxgmf.js} +8 -8
  66. package/{tunnel.command-cm578f4s.js → tunnel.command-7f41pm7y.js} +7 -7
  67. package/{workflow.command-h9vkr6jb.js → workflow.command-qpyq0ya5.js} +10 -10
  68. package/{workspace.command-tp8ysvjs.js → workspace.command-qvwdqmnd.js} +24 -24
  69. package/TunnelShare-59zd4j8n.js +0 -14
  70. package/cloud.script-f0r4ce7j.js +0 -24
  71. package/context.runner-1cs88ags.js +0 -25
@@ -2,10 +2,10 @@
2
2
  import {
3
3
  runner,
4
4
  script
5
- } from "./index-fbw3kmt5.js";
5
+ } from "./index-p4dnj2wc.js";
6
6
  import {
7
7
  ModuleExecutor
8
- } from "./index-n8dsax1f.js";
8
+ } from "./index-rr7jk14m.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-yyxy7aff.js";
16
+ } from "./index-ynqxpwx6.js";
17
17
  import {
18
18
  PageScript
19
- } from "./index-qh73jnyb.js";
19
+ } from "./index-g2s33373.js";
20
20
  import {
21
21
  pluralizeName
22
22
  } from "./index-nz8prx9g.js";
@@ -1,13 +1,13 @@
1
1
  // @bun
2
2
  import {
3
3
  AppExecutor
4
- } from "./index-n8dsax1f.js";
4
+ } from "./index-rr7jk14m.js";
5
5
  import {
6
6
  jsonText,
7
7
  createWorkflowBaselineSummary,
8
8
  buildAkanModuleContextIndex,
9
9
  toolingRolloutGate
10
- } from "./index-yyxy7aff.js";
10
+ } from "./index-ynqxpwx6.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-aqwdjn4x.js";
20
+ } from "./index-z6v7k9sb.js";
21
21
  import {
22
22
  runner
23
- } from "./index-fbw3kmt5.js";
23
+ } from "./index-p4dnj2wc.js";
24
24
  import {
25
25
  isPlaceholderAppId
26
- } from "./index-3hvmytbs.js";
26
+ } from "./index-ekpp5tax.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-nr8m4j21.js";
33
+ } from "./index-z9xepn8t.js";
34
34
  import {
35
35
  Prompter2
36
36
  } from "./index-zzvvc845.js";
37
37
  import {
38
38
  RepairRunner
39
- } from "./index-0dd6z4b9.js";
39
+ } from "./index-qfzfaq96.js";
40
40
  import {
41
41
  WorkflowRunner
42
- } from "./index-dkfadmrx.js";
42
+ } from "./index-sh9mmp5v.js";
43
43
 
44
44
  // pkgs/@akanjs/devkit/akanMcpContract.ts
45
45
  import path from "path";
@@ -1,7 +1,7 @@
1
1
  // @bun
2
2
  import {
3
3
  resolveSsrPageEntriesForApp
4
- } from "./index-n8dsax1f.js";
4
+ } from "./index-rr7jk14m.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-45c0mxb6.js";
12
+ } from "./index-ngpn9hzy.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-64pjry21.js";
22
+ } from "./index-jgs8z8xb.js";
23
23
  import {
24
24
  CssBlockParser
25
25
  } from "./index-62md4dwy.js";
@@ -1324,23 +1324,26 @@ import path6 from "path";
1324
1324
  import zlib from "zlib";
1325
1325
  var COMPRESSIBLE_EXTS = new Set([".css", ".html", ".js", ".json", ".svg"]);
1326
1326
  var MIN_COMPRESS_BYTES = 1024;
1327
- var BROTLI_QUALITY_BY_EXT = { ".css": 11 };
1327
+ var MAX_BROTLI_QUALITY = 11;
1328
+ var BROTLI_QUALITY_BY_EXT = { ".css": MAX_BROTLI_QUALITY };
1328
1329
  var DEFAULT_BROTLI_QUALITY = 9;
1329
1330
  var GZIP_LEVEL = 9;
1330
1331
  var { formatBytes } = FontPruner;
1331
1332
  async function precompressArtifacts(app) {
1333
+ const artifactDir = path6.join(app.dist.cwdPath, ".akan/artifact");
1332
1334
  const roots = [
1333
- path6.join(app.dist.cwdPath, ".akan/artifact/client"),
1334
- path6.join(app.dist.cwdPath, ".akan/artifact/styles")
1335
+ { root: path6.join(artifactDir, "client") },
1336
+ { root: path6.join(artifactDir, "styles") },
1337
+ { root: path6.join(artifactDir, "dict"), brotliQuality: MAX_BROTLI_QUALITY }
1335
1338
  ];
1336
1339
  const result = { files: 0, inputBytes: 0, outputBytes: 0, brotliBytes: 0 };
1337
- await Promise.all(roots.map((root) => precompressRoot(root, result)));
1340
+ await Promise.all(roots.map(({ root, brotliQuality }) => precompressRoot(root, result, brotliQuality)));
1338
1341
  if (result.files > 0) {
1339
1342
  app.verbose(`[precompress] wrote ${result.files} sidecars (${formatBytes(result.inputBytes)} -> gzip ${formatBytes(result.outputBytes)} / br ${formatBytes(result.brotliBytes)})`);
1340
1343
  }
1341
1344
  return result;
1342
1345
  }
1343
- async function precompressRoot(root, result) {
1346
+ async function precompressRoot(root, result, brotliQuality) {
1344
1347
  if (!fs.existsSync(root) || !fs.statSync(root).isDirectory())
1345
1348
  return;
1346
1349
  const glob = new Bun.Glob("**/*");
@@ -1350,7 +1353,7 @@ async function precompressRoot(root, result) {
1350
1353
  const bytes = await Bun.file(filePath).bytes();
1351
1354
  const buffer = bytes.buffer.slice(bytes.byteOffset, bytes.byteOffset + bytes.byteLength);
1352
1355
  const gz = Bun.gzipSync(buffer, { level: GZIP_LEVEL });
1353
- const br = brotliCompress(buffer, path6.extname(filePath).toLowerCase());
1356
+ const br = brotliCompress(buffer, brotliQuality ?? brotliQualityOf(path6.extname(filePath).toLowerCase()));
1354
1357
  await Promise.all([Bun.write(`${filePath}.gz`, gz), Bun.write(`${filePath}.br`, br)]);
1355
1358
  result.files += 1;
1356
1359
  result.inputBytes += bytes.byteLength;
@@ -1358,8 +1361,10 @@ async function precompressRoot(root, result) {
1358
1361
  result.brotliBytes += br.byteLength;
1359
1362
  }
1360
1363
  }
1361
- function brotliCompress(buffer, ext) {
1362
- const quality = BROTLI_QUALITY_BY_EXT[ext] ?? DEFAULT_BROTLI_QUALITY;
1364
+ function brotliQualityOf(ext) {
1365
+ return BROTLI_QUALITY_BY_EXT[ext] ?? DEFAULT_BROTLI_QUALITY;
1366
+ }
1367
+ function brotliCompress(buffer, quality) {
1363
1368
  return zlib.brotliCompressSync(buffer, {
1364
1369
  params: {
1365
1370
  [zlib.constants.BROTLI_PARAM_QUALITY]: quality,
@@ -1378,8 +1383,51 @@ async function shouldPrecompress(filePath) {
1378
1383
  return file.size >= MIN_COMPRESS_BYTES;
1379
1384
  }
1380
1385
  // pkgs/@akanjs/devkit/frontendBuild/ssrBaseArtifactBuilder.ts
1381
- import path7 from "path";
1386
+ import path8 from "path";
1382
1387
  import { optimize } from "@tailwindcss/node";
1388
+
1389
+ // pkgs/@akanjs/devkit/frontendBuild/dictionaryAssetBuilder.ts
1390
+ import path7 from "path";
1391
+ import { Translator } from "akanjs/client";
1392
+
1393
+ class DictionaryAssetBuilder {
1394
+ static urlPrefix = "/_akan/dict";
1395
+ #app;
1396
+ #absArtifactDir;
1397
+ constructor(app, absArtifactDir) {
1398
+ this.#app = app;
1399
+ this.#absArtifactDir = absArtifactDir;
1400
+ }
1401
+ async build(i18n) {
1402
+ const allDictionary = await this.#loadAllDictionary();
1403
+ if (!allDictionary)
1404
+ return {};
1405
+ const assets = await Promise.all(i18n.locales.map((lang) => this.#write(lang, Translator.fillFromDefault(allDictionary, lang, i18n.defaultLocale))));
1406
+ this.#app.verbose(`[base-artifact] dictionaries -> ${assets.map(([, asset]) => asset.relPath).join(", ")}`);
1407
+ return Object.fromEntries(assets);
1408
+ }
1409
+ async#loadAllDictionary() {
1410
+ const dictPath = path7.resolve(this.#app.cwdPath, "lib", "dict.ts");
1411
+ if (!await Bun.file(dictPath).exists())
1412
+ return null;
1413
+ const { getAllDictionary } = await import(dictPath);
1414
+ return getAllDictionary ? getAllDictionary() : null;
1415
+ }
1416
+ async#write(lang, dictionary) {
1417
+ const source = DictionaryAssetBuilder.source(lang, dictionary);
1418
+ const name = `${lang}-${Bun.hash(source).toString(36)}.js`;
1419
+ const relPath = `dict/${name}`;
1420
+ await Bun.write(path7.join(this.#absArtifactDir, relPath), source);
1421
+ return [lang, { url: `${DictionaryAssetBuilder.urlPrefix}/${name}`, relPath }];
1422
+ }
1423
+ static source(lang, dictionary) {
1424
+ return `export const lang = ${JSON.stringify(lang)};
1425
+ export default JSON.parse(${JSON.stringify(JSON.stringify(dictionary))});
1426
+ `;
1427
+ }
1428
+ }
1429
+
1430
+ // pkgs/@akanjs/devkit/frontendBuild/ssrBaseArtifactBuilder.ts
1383
1431
  function prepareCssAsset(command, basePath, cssText) {
1384
1432
  return optimize(cssText, { file: `${basePath || "root"}.css`, minify: command === "build" }).code;
1385
1433
  }
@@ -1396,7 +1444,7 @@ class SsrBaseArtifactBuilder {
1396
1444
  this.#command = command;
1397
1445
  this.#serverEnv = serverEnv;
1398
1446
  this.#artifactDir = `${command === "build" ? app.dist.cwdPath : app.cwdPath}/.akan/artifact`;
1399
- this.#absArtifactDir = path7.resolve(this.#artifactDir);
1447
+ this.#absArtifactDir = path8.resolve(this.#artifactDir);
1400
1448
  }
1401
1449
  static servedWeb(command, web) {
1402
1450
  return command === "start" ? { ssr: true, csr: true } : web;
@@ -1408,6 +1456,7 @@ class SsrBaseArtifactBuilder {
1408
1456
  this.#app.verbose(`[base-artifact] discovered ${pageKeys.length} route files under ${this.#app.cwdPath}/page`);
1409
1457
  const pageEntries = await resolveSsrPageEntriesForApp(this.#app, pageKeys);
1410
1458
  const { cssCompiler, optimizedFonts, cssAssets } = await this.#buildStyleAssets();
1459
+ const dictAssets = await new DictionaryAssetBuilder(this.#app, this.#absArtifactDir).build(akanConfig.i18n);
1411
1460
  const pagesBundle = await new PagesBundleBuilder(this.#app, this.#command, pageEntries, this.#serverEnv).build();
1412
1461
  this.#app.verbose(`[base-artifact] pages bundle -> ${pagesBundle.bundlePath} (buildId=${pagesBundle.buildId}, splitting=${pagesBundle.splitting}, entry=${pagesBundle.entryBytes} bytes, outputs=${pagesBundle.outputCount}, chunks=${pagesBundle.chunkCount}, total=${pagesBundle.outputBytes} bytes)`);
1413
1462
  const seedIndex = computeRouteSeedIndex(pageEntries);
@@ -1421,7 +1470,8 @@ class SsrBaseArtifactBuilder {
1421
1470
  rscRuntimeSsrManifest,
1422
1471
  vendorMap,
1423
1472
  cssAssets,
1424
- pagesBundlePath: this.#command === "build" ? path7.relative(this.#absArtifactDir, pagesBundle.bundlePath) : pagesBundle.bundlePath,
1473
+ dictAssets,
1474
+ pagesBundlePath: this.#command === "build" ? path8.relative(this.#absArtifactDir, pagesBundle.bundlePath) : pagesBundle.bundlePath,
1425
1475
  pagesBundleBuildId: pagesBundle.buildId,
1426
1476
  domains: [...akanConfig.domains],
1427
1477
  subRoutes: Object.fromEntries(Array.from(akanConfig.subRoutes.entries()).map(([basePath, domains]) => [basePath, [...domains]])),
@@ -1439,18 +1489,18 @@ class SsrBaseArtifactBuilder {
1439
1489
  androidSha256CertFingerprints: target.android?.sha256CertFingerprints
1440
1490
  }))
1441
1491
  };
1442
- await Bun.write(path7.join(this.#absArtifactDir, "base-artifact.json"), `${JSON.stringify(artifact, null, 2)}
1492
+ await Bun.write(path8.join(this.#absArtifactDir, "base-artifact.json"), `${JSON.stringify(artifact, null, 2)}
1443
1493
  `);
1444
1494
  this.#app.verbose(`[base-artifact] complete in ${Date.now() - this.#started}ms`);
1445
1495
  return { artifact, seedIndex, cssCompiler, optimizedFonts };
1446
1496
  }
1447
1497
  async#buildRuntimeClientEntries() {
1448
1498
  const akanServerPath = await this.#resolveAkanServerPath();
1449
- const rscClientEntry = path7.resolve(akanServerPath, "rscClient.tsx");
1450
- const rscSegmentOutletEntry = path7.resolve(akanServerPath, "rscSegmentOutlet.tsx");
1499
+ const rscClientEntry = path8.resolve(akanServerPath, "rscClient.tsx");
1500
+ const rscSegmentOutletEntry = path8.resolve(akanServerPath, "rscSegmentOutlet.tsx");
1451
1501
  const vendorEntries = VENDOR_SPECIFIERS.map((specifier) => ({
1452
1502
  specifier,
1453
- absPath: path7.resolve(akanServerPath, "vendor", `${specifier.replaceAll("/", "-").replaceAll(".", "-")}.ts`)
1503
+ absPath: path8.resolve(akanServerPath, "vendor", `${specifier.replaceAll("/", "-").replaceAll(".", "-")}.ts`)
1454
1504
  }));
1455
1505
  const entries = [rscClientEntry, rscSegmentOutletEntry, ...vendorEntries.map((v) => v.absPath)];
1456
1506
  const clientBundle = await new ClientEntriesBundler({ app: this.#app, entries, command: this.#command }).bundle();
@@ -1487,15 +1537,15 @@ class SsrBaseArtifactBuilder {
1487
1537
  async#resolveAkanServerPath() {
1488
1538
  const candidates = [];
1489
1539
  try {
1490
- candidates.push(path7.dirname(Bun.resolveSync("akanjs/server", this.#app.workspace.workspaceRoot)));
1540
+ candidates.push(path8.dirname(Bun.resolveSync("akanjs/server", this.#app.workspace.workspaceRoot)));
1491
1541
  } catch {}
1492
- candidates.push(path7.join(this.#app.workspace.workspaceRoot, "pkgs/akanjs/server"), path7.join(this.#app.workspace.workspaceRoot, "node_modules/akanjs/server"));
1542
+ candidates.push(path8.join(this.#app.workspace.workspaceRoot, "pkgs/akanjs/server"), path8.join(this.#app.workspace.workspaceRoot, "node_modules/akanjs/server"));
1493
1543
  try {
1494
- candidates.push(path7.dirname(Bun.resolveSync("akanjs/server", path7.dirname(Bun.main))));
1544
+ candidates.push(path8.dirname(Bun.resolveSync("akanjs/server", path8.dirname(Bun.main))));
1495
1545
  } catch {}
1496
- candidates.push(path7.join(path7.dirname(Bun.main), "node_modules/akanjs/server"), path7.join(path7.dirname(Bun.main), "../../akanjs/server"), path7.resolve(import.meta.dir, "../../server"), path7.resolve(import.meta.dir, "../server"));
1546
+ candidates.push(path8.join(path8.dirname(Bun.main), "node_modules/akanjs/server"), path8.join(path8.dirname(Bun.main), "../../akanjs/server"), path8.resolve(import.meta.dir, "../../server"), path8.resolve(import.meta.dir, "../server"));
1497
1547
  for (const candidate of candidates) {
1498
- if (await Bun.file(path7.join(candidate, "rscClient.tsx")).exists())
1548
+ if (await Bun.file(path8.join(candidate, "rscClient.tsx")).exists())
1499
1549
  return candidate;
1500
1550
  }
1501
1551
  throw new Error(`[base-artifact] failed to locate akanjs/server; looked in: ${candidates.join(", ")}`);
@@ -1524,7 +1574,7 @@ ${preparedCssText}`).toString(36);
1524
1574
  `styles/${cssAssetName}-${cssHash}.css`,
1525
1575
  `/_akan/styles/${cssAssetName}-${cssHash}.css`
1526
1576
  ];
1527
- await Bun.write(path7.join(this.#absArtifactDir, cssRelPath), preparedCssText);
1577
+ await Bun.write(path8.join(this.#absArtifactDir, cssRelPath), preparedCssText);
1528
1578
  SsrBaseArtifactBuilder.#warnDroppedImports(this.#app, cssRelPath, preparedCssText, imported);
1529
1579
  this.#app.verbose(`[base-artifact] wrote ${preparedCssText.length} bytes of CSS for ${basePath} -> ${cssRelPath}`);
1530
1580
  return [basePath, { cssUrl, cssRelPath }];
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  DesktopBin,
4
4
  UpdatePackFolder
5
- } from "./index-nr8m4j21.js";
5
+ } from "./index-z9xepn8t.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";
@@ -1,7 +1,7 @@
1
1
  // @bun
2
2
  import {
3
3
  AppInfo
4
- } from "./index-n8dsax1f.js";
4
+ } from "./index-rr7jk14m.js";
5
5
 
6
6
  // pkgs/@akanjs/devkit/slicePlanner.ts
7
7
  class SlicePlanner {
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  runner,
4
4
  script
5
- } from "./index-fbw3kmt5.js";
5
+ } from "./index-p4dnj2wc.js";
6
6
 
7
7
  // pkgs/@akanjs/cli/page/page.runner.ts
8
8
  class PageRunner extends runner("page") {
@@ -1,16 +1,16 @@
1
1
  // @bun
2
2
  import {
3
3
  jsonText
4
- } from "./index-yyxy7aff.js";
4
+ } from "./index-ynqxpwx6.js";
5
5
  import {
6
6
  akanMcpInstallTargets
7
- } from "./index-aqwdjn4x.js";
7
+ } from "./index-z6v7k9sb.js";
8
8
  import {
9
9
  script
10
- } from "./index-fbw3kmt5.js";
10
+ } from "./index-p4dnj2wc.js";
11
11
  import {
12
12
  ContextRunner2
13
- } from "./index-cgexcnwd.js";
13
+ } from "./index-bb4hj03s.js";
14
14
 
15
15
  // pkgs/@akanjs/cli/context/context.script.ts
16
16
  import { Logger } from "akanjs/common";
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  AsyncDefaultExportDetector,
4
4
  resolveSsrPageEntriesForApp
5
- } from "./index-n8dsax1f.js";
5
+ } from "./index-rr7jk14m.js";
6
6
  import {
7
7
  FileSys2
8
8
  } from "./index-52w0fvh8.js";
@@ -201,9 +201,9 @@ var defaultResolveRelative = async (fromFile, relSpec) => {
201
201
  // pkgs/@akanjs/devkit/transforms/barrelImportsPlugin.ts
202
202
  import path2 from "path";
203
203
  import ts from "typescript";
204
- var createBarrelImportsPlugin = async (app, { skipPath = defaultSkipPath, pipeAfter } = {}) => {
204
+ var createBarrelImportsPlugin = async (app, { skipPath = defaultSkipPath, pipeAfter, external = [] } = {}) => {
205
205
  const akanConfig = await app.getConfig();
206
- const barrels = [...new Set(akanConfig.barrelImports)].filter(Boolean);
206
+ const barrels = [...new Set(akanConfig.barrelImports)].filter((barrel) => barrel && !external.includes(barrel));
207
207
  const analyzer = new BarrelAnalyzer({
208
208
  resolvePackage: await createTsconfigPackageResolver(app)
209
209
  });
@@ -19,11 +19,11 @@ import {
19
19
  CsrDevPaths,
20
20
  PagesEntrySourceGenerator,
21
21
  PagesBundleBuilder
22
- } from "./index-64pjry21.js";
22
+ } from "./index-jgs8z8xb.js";
23
23
  import {
24
24
  AsyncDefaultExportDetector,
25
25
  resolveSsrPageEntriesForApp
26
- } from "./index-n8dsax1f.js";
26
+ } from "./index-rr7jk14m.js";
27
27
 
28
28
  // pkgs/@akanjs/devkit/frontendBuild/autoImportSync.ts
29
29
  import { readdir, readFile, stat } from "fs/promises";
@@ -1578,7 +1578,8 @@ var VENDOR_SPECIFIERS = [
1578
1578
  "akanjs/base",
1579
1579
  "akanjs/common",
1580
1580
  "akanjs/constant",
1581
- "akanjs/fetch"
1581
+ "akanjs/fetch",
1582
+ "tailwind-merge"
1582
1583
  ];
1583
1584
 
1584
1585
  // pkgs/@akanjs/devkit/frontendBuild/routeClientBuilder.ts
@@ -1693,7 +1694,8 @@ class RouteClientBuilder {
1693
1694
  entries: bootstrapEntries.buildEntries,
1694
1695
  plugins: [
1695
1696
  await createBarrelImportsPlugin(this.#app, {
1696
- pipeAfter: reactFastRefresh ? RouteClientBuilder.normalizeNamedDefaultFunctionForFastRefresh : undefined
1697
+ pipeAfter: reactFastRefresh ? RouteClientBuilder.normalizeNamedDefaultFunctionForFastRefresh : undefined,
1698
+ external: VENDOR_SPECIFIERS
1697
1699
  })
1698
1700
  ],
1699
1701
  external: VENDOR_SPECIFIERS,
@@ -10,7 +10,7 @@ import {
10
10
  LibExecutor,
11
11
  PkgExecutor,
12
12
  ModuleExecutor
13
- } from "./index-n8dsax1f.js";
13
+ } from "./index-rr7jk14m.js";
14
14
 
15
15
  // pkgs/@akanjs/devkit/commandDecorators/camelToKebabCase.ts
16
16
  var camelToKebabCase = (str) => str.replace(/([A-Z])/g, "-$1").toLowerCase();
@@ -1,13 +1,13 @@
1
1
  // @bun
2
2
  import {
3
3
  resolveSsrPageEntriesForApp
4
- } from "./index-n8dsax1f.js";
4
+ } from "./index-rr7jk14m.js";
5
5
  import {
6
6
  bundleDefine,
7
7
  CsrEntryFiles,
8
8
  PagesEntrySourceGenerator,
9
9
  PagesBundleBuilder
10
- } from "./index-64pjry21.js";
10
+ } from "./index-jgs8z8xb.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";
@@ -5,13 +5,13 @@ import {
5
5
  writeGeneratedSyncState,
6
6
  createRepairReport,
7
7
  renderRepairReport
8
- } from "./index-yyxy7aff.js";
8
+ } from "./index-ynqxpwx6.js";
9
9
  import {
10
10
  AkanContextAnalyzer
11
- } from "./index-aqwdjn4x.js";
11
+ } from "./index-z6v7k9sb.js";
12
12
  import {
13
13
  runner
14
- } from "./index-fbw3kmt5.js";
14
+ } from "./index-p4dnj2wc.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,13 +2,13 @@
2
2
  import {
3
3
  runner,
4
4
  script
5
- } from "./index-fbw3kmt5.js";
5
+ } from "./index-p4dnj2wc.js";
6
6
  import {
7
7
  LibSource,
8
8
  formatLibStatuses,
9
9
  CommandExecutionError,
10
10
  LibExecutor
11
- } from "./index-n8dsax1f.js";
11
+ } from "./index-rr7jk14m.js";
12
12
 
13
13
  // pkgs/@akanjs/cli/library/library.script.ts
14
14
  import { Logger } from "akanjs/common";
@@ -1521,7 +1521,7 @@ ${layoutExports}(
1521
1521
  className={defaultFontClassName}
1522
1522
  layoutStyle={userLayout.layoutStyle ?? inheritedLayout.layoutStyle}
1523
1523
  reconnect={userLayout.reconnect ?? inheritedLayout.reconnect ?? false}
1524
- wsConnect={userLayout.wsConnect ?? inheritedLayout.wsConnect ?? true}
1524
+ wsConnect={userLayout.wsConnect ?? inheritedLayout.wsConnect}
1525
1525
  allDictionary={process.env.AKAN_PUBLIC_RENDER_ENV === "ssr" ? allDictionary : undefined}
1526
1526
  >
1527
1527
  ${layoutChild}
@@ -22,26 +22,26 @@ import {
22
22
  renderWorkflowApply,
23
23
  renderWorkflowValidation,
24
24
  renderWorkflowRunArtifact
25
- } from "./index-yyxy7aff.js";
25
+ } from "./index-ynqxpwx6.js";
26
26
  import {
27
27
  AkanContextAnalyzer
28
- } from "./index-aqwdjn4x.js";
28
+ } from "./index-z6v7k9sb.js";
29
29
  import {
30
30
  CommandContainer,
31
31
  runner
32
- } from "./index-fbw3kmt5.js";
32
+ } from "./index-p4dnj2wc.js";
33
33
  import {
34
34
  ModuleScript
35
- } from "./index-j4dzazmw.js";
35
+ } from "./index-b5vptvnt.js";
36
36
  import {
37
37
  PrimitiveScript
38
- } from "./index-hqh4mpgt.js";
38
+ } from "./index-zn6bn1s2.js";
39
39
  import {
40
40
  spawnShell
41
- } from "./index-0dd6z4b9.js";
41
+ } from "./index-qfzfaq96.js";
42
42
  import {
43
43
  ScalarScript
44
- } from "./index-f2gfq0yh.js";
44
+ } from "./index-sng3vt0p.js";
45
45
 
46
46
  // pkgs/@akanjs/cli/workflow/workflow.runner.ts
47
47
  import { mkdir, readFile, writeFile } from "fs/promises";
@@ -2,12 +2,12 @@
2
2
  import {
3
3
  runner,
4
4
  script
5
- } from "./index-fbw3kmt5.js";
5
+ } from "./index-p4dnj2wc.js";
6
6
  import {
7
7
  generatedFilesForSync,
8
8
  createPassedPrimitiveReport,
9
9
  scalarChangedFiles
10
- } from "./index-yyxy7aff.js";
10
+ } from "./index-ynqxpwx6.js";
11
11
  import {
12
12
  pluralizeName
13
13
  } from "./index-nz8prx9g.js";
@@ -4,26 +4,26 @@ import {
4
4
  CloudApi,
5
5
  CloudUpdates,
6
6
  PipelineSecrets
7
- } from "./index-yfy3t4kw.js";
7
+ } from "./index-2ar6tffh.js";
8
8
  import {
9
9
  PkgExecutor
10
- } from "./index-n8dsax1f.js";
10
+ } from "./index-rr7jk14m.js";
11
11
  import {
12
12
  NativePublicEnv,
13
13
  UpdatePackFolder
14
- } from "./index-nr8m4j21.js";
14
+ } from "./index-z9xepn8t.js";
15
15
  import {
16
16
  script
17
- } from "./index-fbw3kmt5.js";
17
+ } from "./index-p4dnj2wc.js";
18
18
  import {
19
19
  ApplicationScript
20
- } from "./index-z5cxrbvv.js";
20
+ } from "./index-1cq1hq12.js";
21
21
  import {
22
22
  PackageScript
23
- } from "./index-1enc9rga.js";
23
+ } from "./index-tk3jg2bm.js";
24
24
  import {
25
25
  CloudRunner
26
- } from "./index-48n4yhm4.js";
26
+ } from "./index-7f0edwsj.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-fbw3kmt5.js";
5
+ } from "./index-p4dnj2wc.js";
6
6
  import {
7
7
  FileSys2
8
8
  } from "./index-52w0fvh8.js";
9
9
  import {
10
10
  PkgExecutor
11
- } from "./index-n8dsax1f.js";
11
+ } from "./index-rr7jk14m.js";
12
12
  import {
13
13
  TypeScriptDependencyScanner2
14
14
  } from "./index-tvehn2sp.js";
@@ -111,6 +111,13 @@ class PackageRunner extends runner("package") {
111
111
  "@akanjs/devkit",
112
112
  "create-akan-workspace"
113
113
  ];
114
+ static #bundledRuntimeDependencies = {
115
+ "@akanjs/cli": ["@akanjs/devkit", "@akanjs/native"],
116
+ akanjs: ["use-agentic", "@akanjs/native"]
117
+ };
118
+ static #unpublishedPackages = [
119
+ ...new Set(Object.values(PackageRunner.#bundledRuntimeDependencies).flat())
120
+ ].filter((name) => !PackageRunner.publishableAkanPackages.includes(name));
114
121
  async version(workspace, { log = true } = {}) {
115
122
  const pkgJson = process.env.USE_AKANJS_PKGS === "true" ? await FileSys2.readJson(`${workspace?.workspaceRoot ?? process.cwd()}/pkgs/akanjs/package.json`) : await this.#getInstalledPackageJson();
116
123
  const version = pkgJson.name === "akanjs" ? pkgJson.version : pkgJson.dependencies?.akanjs ?? pkgJson.version;
@@ -174,12 +181,7 @@ class PackageRunner extends runner("package") {
174
181
  "tailwind-scrollbar"
175
182
  ].filter((dep) => dep !== "akanjs" && dep !== "@akanjs/devkit");
176
183
  }
177
- const packageBundledRuntimeDependencies = {
178
- "@akanjs/cli": ["@akanjs/devkit", "@akanjs/native"],
179
- "@akanjs/devkit": ["@akanjs/native"],
180
- akanjs: ["use-agentic", "@akanjs/native"]
181
- };
182
- const bundledRuntimeDeps = new Set(packageBundledRuntimeDependencies[pkg.name] ?? []);
184
+ const bundledRuntimeDeps = new Set(PackageRunner.#bundledRuntimeDependencies[pkg.name] ?? []);
183
185
  const forcedRuntimeDeps = packageRuntimeDependencies[pkg.name] ?? [];
184
186
  const forcedRuntimeDevDeps = packageRuntimeDevDependencies[pkg.name] ?? [];
185
187
  const [rootPackageJson, pkgJson] = await Promise.all([pkg.workspace.getPackageJson(), pkg.getPackageJson()]);
@@ -276,6 +278,20 @@ class PackageRunner extends runner("package") {
276
278
  ` + `${failures.sort((a, b) => a < b ? -1 : a > b ? 1 : 0).join(`
277
279
  `)}
278
280
  ` + `Add the missing "exports" entries: a bare file facet needs "./*": "./*.ts", a directory facet ` + `needs its own "./name": "./name/index.ts", and "./*.ts": "./*.ts" keeps an already-suffixed ` + `specifier from gaining a second extension.`);
281
+ }
282
+ async#verifyDistImportsPublished(pkg) {
283
+ const imports = await this.#collectDistAkanImports(pkg.dist.cwdPath, PackageRunner.#unpublishedPackages);
284
+ if (!imports.size)
285
+ return;
286
+ const failures = [...imports].map(([specifier, importers]) => {
287
+ const files = [...importers].sort();
288
+ const shown = files.slice(0, 3).join(", ") + (files.length > 3 ? ` (+${files.length - 3} more)` : "");
289
+ return ` ${specifier} \u2014 imported by ${shown}`;
290
+ });
291
+ throw new Error(`[package] ${pkg.name} dist imports ${failures.length} specifier(s) of a package that is never published:
292
+ ` + `${failures.sort((a, b) => a < b ? -1 : a > b ? 1 : 0).join(`
293
+ `)}
294
+ ` + "Reach it through a published package that embeds it (akanjs/native/api for @akanjs/native/api), or embed it " + "in this package's build.");
279
295
  }
280
296
  async verifyDistPackage(pkg, {
281
297
  peerExportsMaps = new Map
@@ -308,6 +324,7 @@ class PackageRunner extends runner("package") {
308
324
  }
309
325
  }
310
326
  await this.#verifyDistExportsReachable(pkg, peerExportsMaps);
327
+ await this.#verifyDistImportsPublished(pkg);
311
328
  const packOutput = await pkg.workspace.spawn("npm", ["pack", "--dry-run", "--json", pkg.dist.cwdPath], {
312
329
  cwd: pkg.workspace.workspaceRoot
313
330
  });
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  GlobalConfig,
4
4
  CloudApi
5
- } from "./index-yfy3t4kw.js";
5
+ } from "./index-2ar6tffh.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
  AppExecutor,
4
4
  LibExecutor
5
- } from "./index-n8dsax1f.js";
5
+ } from "./index-rr7jk14m.js";
6
6
 
7
7
  // pkgs/@akanjs/devkit/workflow/artifacts.ts
8
8
  import { capitalize } from "akanjs/common";