@akanjs/cli 3.2.0-rc.16 → 3.2.0-rc.18

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 (85) hide show
  1. package/.build-stamp +2 -2
  2. package/{CodeAgent-18qg03re.js → CodeAgent-w96z7fm7.js} +2 -2
  3. package/{CodeTui-zkm51zf3.js → CodeTui-496f55hh.js} +1 -1
  4. package/TunnelShare-tyj8nb0z.js +19 -0
  5. package/{agent.command-5k2zegmj.js → agent.command-81h65wcv.js} +20 -20
  6. package/akanCode.js +2 -2
  7. package/{appExecutor-1bgs9a69.js → appExecutor-g4wq24v1.js} +3 -3
  8. package/{application.command-ge27047n.js → application.command-rcw4h1gh.js} +15 -15
  9. package/{applicationBuildRunner-7skfg8zn.js → applicationBuildRunner-emhp6rh0.js} +10 -10
  10. package/buildBatch.proc.js +10 -10
  11. package/{cloud.command-d18qj1v2.js → cloud.command-k47h3kma.js} +22 -22
  12. package/cloud.script-b4smdpa5.js +35 -0
  13. package/{code.command-tz4x5zm6.js → code.command-dam01a2f.js} +10 -10
  14. package/{context.command-x1smtm5q.js → context.command-44carkt5.js} +22 -22
  15. package/context.runner-xtr9ngpa.js +34 -0
  16. package/{guideline.command-rdcwxf8g.js → guideline.command-ccxs69br.js} +6 -6
  17. package/incrementalBuilder.proc.js +11 -11
  18. package/{index-dp7sht3v.js → index-1j1jmmac.js} +8 -8
  19. package/{index-39byv35b.js → index-286djj0d.js} +2 -2
  20. package/{index-3641r8q0.js → index-2hwjhe8r.js} +4 -4
  21. package/{index-trp7jdr1.js → index-4279crca.js} +7 -6
  22. package/{index-nd39rssn.js → index-a42cf737.js} +58 -46
  23. package/{index-dtpeyts6.js → index-a85n83t6.js} +1 -1
  24. package/{index-gh4brxzn.js → index-aw7at6j6.js} +1 -1
  25. package/{index-6p02be7n.js → index-b061e6fn.js} +9 -9
  26. package/{index-neassptx.js → index-bbd1727m.js} +5 -5
  27. package/{index-bzdq8wfw.js → index-cef0fxf2.js} +3 -3
  28. package/{index-9mx3b3zh.js → index-ctrx7asj.js} +4 -4
  29. package/{index-0c8zj1da.js → index-e4w015qt.js} +1 -1
  30. package/{index-vm6pr11y.js → index-g95rbz83.js} +2 -2
  31. package/{index-b2sptt87.js → index-gd9tkq2k.js} +5 -5
  32. package/{index-669sg3yp.js → index-ggmwp14t.js} +4 -4
  33. package/{index-n8mxyy3f.js → index-gkfpqdm8.js} +1 -1
  34. package/{index-e82xwj3x.js → index-h9356zmz.js} +1 -1
  35. package/{index-q4e18ne4.js → index-her656ng.js} +3 -3
  36. package/{index-g56xae1n.js → index-hw2eammf.js} +6 -6
  37. package/{index-fcrr79gh.js → index-jeqq717b.js} +11 -11
  38. package/{index-yr5jv8yd.js → index-k1p29hdp.js} +3 -3
  39. package/{index-dqsc1b5t.js → index-k2kr1wd4.js} +1 -1
  40. package/{index-emf3wzvh.js → index-kqf2s304.js} +7 -7
  41. package/{index-1ts8vfsk.js → index-ktvyva62.js} +1 -1
  42. package/{index-z7t6neq1.js → index-mgvvtjp1.js} +4 -4
  43. package/{index-h7yd92c8.js → index-nwbdpnna.js} +1 -1
  44. package/{index-sp331bww.js → index-pcqr0r0m.js} +1 -1
  45. package/{index-xywq95wk.js → index-pqf6d5ff.js} +6 -6
  46. package/{index-bjnebzzc.js → index-ptpdd9hw.js} +4 -4
  47. package/{index-q57rsax4.js → index-qrh7kdb1.js} +3 -3
  48. package/{index-g7e58wz2.js → index-r790hx48.js} +6 -6
  49. package/{index-t329y8am.js → index-rj406y9n.js} +8 -8
  50. package/{index-er2ja34m.js → index-rxxjkbj2.js} +5 -5
  51. package/{index-ttfz2sc7.js → index-s21zxj7p.js} +6 -6
  52. package/{index-d2r762fk.js → index-sa8g94se.js} +8 -47
  53. package/{index-s75h0455.js → index-tkrg58qv.js} +1 -1
  54. package/{index-jfkh776h.js → index-tpr9nqkj.js} +1 -1
  55. package/{index-t8tysbxv.js → index-vh8q7mrq.js} +3 -3
  56. package/{index-j2eqe3jk.js → index-wy7qcqsd.js} +11 -11
  57. package/{index-bxqbt5p3.js → index-y27cxjd6.js} +1 -1
  58. package/{index-f482h2hj.js → index-y71v7grx.js} +1 -1
  59. package/index.js +27 -27
  60. package/{libExecutor-hxe5eqfh.js → libExecutor-mmrzd606.js} +2 -2
  61. package/{library.command-83shs8fw.js → library.command-brkcat13.js} +7 -7
  62. package/{localRegistry.command-sz713jg3.js → localRegistry.command-qwzy3t7w.js} +21 -21
  63. package/{module.command-jhhm0nmw.js → module.command-t5emqxkr.js} +10 -10
  64. package/{package.command-42syy96v.js → package.command-xv04dbxf.js} +10 -10
  65. package/package.json +2 -2
  66. package/{page.command-jkv29zzs.js → page.command-yhgq9tj8.js} +7 -7
  67. package/{pipeline.command-6sg9g4hq.js → pipeline.command-x3nkf9kc.js} +6 -6
  68. package/{pkgExecutor-6p82w5y1.js → pkgExecutor-4cbe3sgr.js} +2 -2
  69. package/{primitive.command-tt6aq7m9.js → primitive.command-jv60b759.js} +11 -11
  70. package/{projectTypecheck-wfrz0cxr.js → projectTypecheck-fbfq9rm9.js} +1 -1
  71. package/{quality.command-tqar7ss5.js → quality.command-mdjardf1.js} +9 -9
  72. package/{repair.command-qkcn329t.js → repair.command-s22j5xbe.js} +10 -10
  73. package/{routeSourceValidator-8aph1dsr.js → routeSourceValidator-8n6j1vn7.js} +3 -1
  74. package/{scalar.command-6nvq11ag.js → scalar.command-a6qs7012.js} +9 -9
  75. package/{subspace.command-dvwds4cv.js → subspace.command-26hkjqf9.js} +12 -12
  76. package/templates/biomeForm.ts +1 -1
  77. package/templates/env/_env.server.type.ts +1 -1
  78. package/templates/facetIndex/index.ts +2 -37
  79. package/{tunnel.command-h8r69a7v.js → tunnel.command-83sfgz5z.js} +11 -11
  80. package/{verify.command-ynec8kt2.js → verify.command-krm1rrf1.js} +17 -17
  81. package/{workflow.command-f70fx73a.js → workflow.command-z05y7amj.js} +15 -15
  82. package/{workspace.command-vagjy1q9.js → workspace.command-qga6cn1n.js} +36 -36
  83. package/TunnelShare-6t4rwyc0.js +0 -19
  84. package/cloud.script-0hbhm3mw.js +0 -35
  85. package/context.runner-vb7jc0k8.js +0 -34
@@ -3,7 +3,7 @@ import {
3
3
  runner,
4
4
  script,
5
5
  markCliErrorPrinted
6
- } from "./index-neassptx.js";
6
+ } from "./index-bbd1727m.js";
7
7
  import {
8
8
  CliError
9
9
  } from "./index-j4yvgfhr.js";
@@ -15,16 +15,16 @@ import {
15
15
  upsertAgentBlock,
16
16
  renderRecipeEntries,
17
17
  CLAUDE_COMMENT_RULE
18
- } from "./index-g56xae1n.js";
18
+ } from "./index-hw2eammf.js";
19
19
  import {
20
20
  AppExecutor2
21
- } from "./index-trp7jdr1.js";
21
+ } from "./index-4279crca.js";
22
22
  import {
23
23
  LibExecutor2
24
- } from "./index-n8mxyy3f.js";
24
+ } from "./index-gkfpqdm8.js";
25
25
  import {
26
26
  AkanContextAnalyzer
27
- } from "./index-er2ja34m.js";
27
+ } from "./index-rxxjkbj2.js";
28
28
  import {
29
29
  collectRecipeSources2,
30
30
  scanRecipes2
@@ -39,15 +39,15 @@ import {
39
39
  import {
40
40
  ApplicationRunner,
41
41
  VerifyScope
42
- } from "./index-j2eqe3jk.js";
42
+ } from "./index-wy7qcqsd.js";
43
43
  import {
44
44
  WorkspaceRunner
45
- } from "./index-ttfz2sc7.js";
45
+ } from "./index-s21zxj7p.js";
46
46
  import {
47
47
  VerifyComments,
48
48
  VerifyPipeline,
49
49
  VerifyReport
50
- } from "./index-xywq95wk.js";
50
+ } from "./index-pqf6d5ff.js";
51
51
 
52
52
  // pkgs/@akanjs/cli/agent/agent.script.ts
53
53
  import { Logger as Logger3 } from "akanjs/common";
@@ -2,12 +2,12 @@
2
2
  import {
3
3
  runner,
4
4
  script
5
- } from "./index-neassptx.js";
5
+ } from "./index-bbd1727m.js";
6
6
  import {
7
7
  generatedFilesForSync,
8
8
  createPassedPrimitiveReport,
9
9
  scalarChangedFiles
10
- } from "./index-669sg3yp.js";
10
+ } from "./index-ggmwp14t.js";
11
11
  import {
12
12
  pluralizeName
13
13
  } from "./index-nz8prx9g.js";
@@ -1,16 +1,16 @@
1
1
  // @bun
2
2
  import {
3
3
  script
4
- } from "./index-neassptx.js";
4
+ } from "./index-bbd1727m.js";
5
5
  import {
6
6
  jsonText
7
- } from "./index-669sg3yp.js";
7
+ } from "./index-ggmwp14t.js";
8
8
  import {
9
9
  akanMcpInstallTargets
10
- } from "./index-er2ja34m.js";
10
+ } from "./index-rxxjkbj2.js";
11
11
  import {
12
12
  ContextRunner2
13
- } from "./index-6p02be7n.js";
13
+ } from "./index-b061e6fn.js";
14
14
 
15
15
  // pkgs/@akanjs/cli/context/context.script.ts
16
16
  import { Logger } from "akanjs/common";
@@ -7,13 +7,13 @@ import {
7
7
  AkanAppConfig,
8
8
  increaseBuildNum,
9
9
  decreaseBuildNum
10
- } from "./index-g56xae1n.js";
10
+ } from "./index-hw2eammf.js";
11
11
  import {
12
12
  FileSys2
13
13
  } from "./index-by2tvsq6.js";
14
14
  import {
15
15
  LibExecutor2
16
- } from "./index-n8mxyy3f.js";
16
+ } from "./index-gkfpqdm8.js";
17
17
 
18
18
  // pkgs/@akanjs/devkit/executors/appExecutor.ts
19
19
  import { cp as cpEntry, lstat, mkdir, readdir as readDirEntries, realpath, symlink } from "fs/promises";
@@ -261,8 +261,8 @@ const userLayout: LayoutModule = {};
261
261
  process.env.AKAN_PUBLIC_RENDER_ENV === "csr"
262
262
  ? await UserLayout({ params, searchParams, children })
263
263
  : ${userLayoutElement};
264
+ ` : opts.includeSystemProvider ? ` const layout = ${userLayoutElement};
264
265
  ` : "";
265
- const layoutChild = isAsyncUserLayout ? "{layout}" : userLayoutElement;
266
266
  const layoutReturn = isAsyncUserLayout ? "layout" : userLayoutElement;
267
267
  const headLayouts = opts.includeSystemProvider ? "[inheritedLayout, userLayout]" : "[userLayout]";
268
268
  const guardExport = opts.includeSystemProvider ? "export const guard = RouteGuards.compose(inheritedLayout.guard, userLayout.guard);" : "export const guard = userLayout.guard;";
@@ -286,6 +286,7 @@ import { assertGuardOnChain, loadFonts, RouteGuards, resolveRouteModule, RouteHe
286
286
  import type { ReactNode } from "react";
287
287
  import { System } from "${ROOT_LAYOUT_SYSTEM.specifier}";
288
288
  import type { McpAppRootProps } from "akanjs/webkit";
289
+ import { RouteLevelBoundary } from "akanjs/webkit/RouteLevelBoundary.tsx";
289
290
  import { env } from "@apps/${opts.appName}/env/env.client";
290
291
  import { allDictionary } from ${JSON.stringify(dictMacroSpecifier)};
291
292
  ${storeImport}${inheritedImport}${userImport}
@@ -297,7 +298,7 @@ const defaultFontClassName = defaultFont ? (defaultFont.className ?? \`font-\${d
297
298
  export const theme = userLayout.theme ?? inheritedLayout.theme;
298
299
  export const viewport = userLayout.viewport ?? inheritedLayout.viewport;
299
300
  export const manifest = userLayout.manifest ?? inheritedLayout.manifest;
300
- export { RouteLevelBoundary as LevelBoundary } from "akanjs/webkit/RouteLevelBoundary.tsx";
301
+ export const LevelBoundary = process.env.AKAN_PUBLIC_RENDER_ENV === "csr" ? undefined : RouteLevelBoundary;
301
302
 
302
303
  ${layoutExports}(
303
304
  <System.Provider
@@ -316,7 +317,7 @@ ${layoutExports}(
316
317
  wsConnect={userLayout.wsConnect ?? inheritedLayout.wsConnect}
317
318
  allDictionary={process.env.AKAN_PUBLIC_RENDER_ENV === "ssr" ? allDictionary : undefined}
318
319
  >
319
- ${layoutChild}
320
+ {process.env.AKAN_PUBLIC_RENDER_ENV === "csr" ? layout : <RouteLevelBoundary>{layout}</RouteLevelBoundary>}
320
321
  </System.Provider>
321
322
  );
322
323
  }
@@ -396,7 +397,7 @@ async function resolveSsrPageEntriesForApp(app, pageKeys) {
396
397
  class AppExecutor2 extends SysExecutor {
397
398
  static #routeSourceValidator = null;
398
399
  static async#getRouteSourceValidator() {
399
- AppExecutor2.#routeSourceValidator ??= (await import("./routeSourceValidator-8aph1dsr.js")).RouteSourceValidator;
400
+ AppExecutor2.#routeSourceValidator ??= (await import("./routeSourceValidator-8n6j1vn7.js")).RouteSourceValidator;
400
401
  return AppExecutor2.#routeSourceValidator;
401
402
  }
402
403
  dist;
@@ -110,6 +110,9 @@ ${at.file}` : null;
110
110
  return node.fields ? { ...node, fields: node.fields.map(({ digest: _field, ...field }) => field) } : node;
111
111
  }
112
112
  }
113
+ // pkgs/@akanjs/language/guardResolver.ts
114
+ import { barrelFacetDirs, facetBarrelNamesOf } from "akanjs/common/facetBarrel.ts";
115
+
113
116
  // pkgs/@akanjs/language/escapeRegExp.ts
114
117
  var regExpSpecials = /[\\^$.*+?()[\]{}|]/g;
115
118
  var escapeRegExp = (text) => text.replace(regExpSpecials, (special) => `\\${special}`);
@@ -780,6 +783,7 @@ var aliasPattern = /^@(apps|libs)\/([^/]+)/;
780
783
  var maxMapDepth = 4;
781
784
  var identifierPattern = /^[\p{ID_Start}$_][\p{ID_Continue}$\u200c\u200d]*$/u;
782
785
  var starExportPattern = /export\s*\*\s*from\s*["']([^"']+)["']/g;
786
+ var facetEntryPattern = new RegExp(`^((?:apps|libs)/[^/]+/(${barrelFacetDirs.map(escapeRegExp).join("|")}))/([^/]+)(/)?`);
783
787
  var exportingPatternOf = (name) => new RegExp(`export\\s*\\{(?:[^}]*?[\\s,])?${escapeRegExp(name)}(?![\\w$])`);
784
788
  var declaringPatternOf = (name, isAnyBinding) => {
785
789
  const escaped = escapeRegExp(name);
@@ -805,6 +809,7 @@ class GuardResolver {
805
809
  #moduleExports = new Map;
806
810
  #ownerFiles = null;
807
811
  #modules = null;
812
+ #barrels = null;
808
813
  constructor(source, routes) {
809
814
  this.#source = source;
810
815
  this.#routes = routes;
@@ -932,7 +937,7 @@ ${name}`, guard);
932
937
  const own = this.#nearest(candidates.filter((other) => other.owner === from), ({ site }) => site.fileName, near);
933
938
  if (own)
934
939
  return own;
935
- const reexport = from && depth < maxMapDepth ? this.reexportOf(from, name, near) : null;
940
+ const reexport = from && depth < maxMapDepth ? this.#reexportOf(from, name, near) : null;
936
941
  if (reexport)
937
942
  return this.#factoryAt(factories, reexport.local, reexport.site, depth + 1);
938
943
  return from && near ? this.#throughStar(candidates, from, name, near) : undefined;
@@ -970,13 +975,13 @@ ${name}`, guard);
970
975
  const visible = isBase ? undefined : declared.find((other) => this.visible(other.owner, site.owner));
971
976
  return visible ? { guard: visible } : { name, from };
972
977
  }
973
- const reexport = from && depth < maxMapDepth ? this.reexportOf(from, name, near) : null;
978
+ const reexport = from && depth < maxMapDepth ? this.#reexportOf(from, name, near) : null;
974
979
  if (reexport)
975
980
  return this.#findGuard(reexport.local, reexport.site, depth + 1, isBase);
976
981
  const reached = from && near ? this.#throughStar(declared, from, name, near) : undefined;
977
982
  return reached ? { guard: reached } : { name, from };
978
983
  }
979
- reexportOf(owner, name, near) {
984
+ #reexportOf(owner, name, near) {
980
985
  const key = `${owner}
981
986
  ${name}
982
987
  ${near ?? ""}`;
@@ -1133,20 +1138,24 @@ ${near}`;
1133
1138
  return cached;
1134
1139
  const found = { owners: [], packages: [], paths: [near], isOpaque: false };
1135
1140
  this.#starExports.set(key, found);
1136
- for (let idx = 0;idx < found.paths.length; idx++)
1137
- for (const fileName of this.#modulesAt(found.paths[idx] ?? ""))
1138
- for (const [, specifier = ""] of this.#source.readText(fileName)?.matchAll(starExportPattern) ?? []) {
1139
- const target = this.ownerOfSpecifier(fileName, specifier);
1140
- const path = this.pathOfSpecifier(fileName, specifier);
1141
- if (path === null && !found.packages.includes(specifier))
1142
- found.packages.push(specifier);
1143
- if (target === undefined || target === frameworkOwner || path === null)
1144
- found.isOpaque = true;
1145
- else if (!found.paths.includes(path))
1146
- found.paths.push(path);
1147
- if (target && target !== frameworkOwner && target !== owner && !found.owners.includes(target))
1148
- found.owners.push(target);
1149
- }
1141
+ const reach = (specifier, path, target) => {
1142
+ if (path === null && !found.packages.includes(specifier))
1143
+ found.packages.push(specifier);
1144
+ if (target === undefined || target === frameworkOwner || path === null)
1145
+ found.isOpaque = true;
1146
+ else if (!found.paths.includes(path))
1147
+ found.paths.push(path);
1148
+ if (target && target !== frameworkOwner && target !== owner && !found.owners.includes(target))
1149
+ found.owners.push(target);
1150
+ };
1151
+ for (let idx = 0;idx < found.paths.length; idx++) {
1152
+ const path = found.paths[idx] ?? "";
1153
+ for (const module of this.#barrelAt(path) ?? [])
1154
+ reach(module, module, ownerOf(module) ?? undefined);
1155
+ for (const fileName of this.#modulesAt(path))
1156
+ for (const [, specifier = ""] of this.#source.readText(fileName)?.matchAll(starExportPattern) ?? [])
1157
+ reach(specifier, this.pathOfSpecifier(fileName, specifier), this.ownerOfSpecifier(fileName, specifier));
1158
+ }
1150
1159
  return found;
1151
1160
  }
1152
1161
  exportsAt(path, name) {
@@ -1155,7 +1164,7 @@ ${name}`;
1155
1164
  const cached = this.#moduleExports.get(key);
1156
1165
  if (cached)
1157
1166
  return cached;
1158
- const found = { named: null, stars: [] };
1167
+ const found = { named: null, stars: this.#barrelAt(path) ?? [] };
1159
1168
  const exporting = exportingPatternOf(name);
1160
1169
  for (const fileName of this.#modulesAt(path)) {
1161
1170
  const text = this.#source.readText(fileName);
@@ -1187,21 +1196,23 @@ ${name}`;
1187
1196
  }
1188
1197
  return this.#modules.get(path) ?? [];
1189
1198
  }
1190
- hasModule(path) {
1191
- return this.#modulesAt(path).length > 0;
1192
- }
1193
- packagesUnder(owner, folder) {
1194
- const packages = new Set;
1195
- for (const [fileName, words] of this.#filesIn(owner)) {
1196
- if (!this.#source.relative(fileName).startsWith(`${folder}/`) || !words.includes(`
1197
- export
1198
- `))
1199
- continue;
1200
- for (const [, specifier = ""] of this.#source.readText(fileName)?.matchAll(starExportPattern) ?? [])
1201
- if (this.pathOfSpecifier(fileName, specifier) === null)
1202
- packages.add(specifier);
1199
+ #barrelAt(path) {
1200
+ if (!this.#barrels) {
1201
+ const entries = new Map;
1202
+ for (const [fileName] of this.#source.files) {
1203
+ const [, folder, facet, entry, nested] = this.#source.relative(fileName).match(facetEntryPattern) ?? [];
1204
+ if (!folder || !facet || !entry)
1205
+ continue;
1206
+ const found = entries.get(folder) ?? { facet, files: new Set, dirs: new Set };
1207
+ (nested ? found.dirs : found.files).add(entry);
1208
+ entries.set(folder, found);
1209
+ }
1210
+ this.#barrels = new Map([...entries].map(([folder, { facet, files, dirs }]) => [
1211
+ folder,
1212
+ facetBarrelNamesOf(facet, [...files], [...dirs]).map((name) => `${folder}/${name}`)
1213
+ ]));
1203
1214
  }
1204
- return [...packages];
1215
+ return this.#modulesAt(path).length ? undefined : this.#barrels.get(path);
1205
1216
  }
1206
1217
  declares(owner, name) {
1207
1218
  const declaring = declaringPatternOf(name, true);
@@ -1262,7 +1273,9 @@ export
1262
1273
  }
1263
1274
 
1264
1275
  // pkgs/@akanjs/language/adaptorResolver.ts
1265
- var maxModules = 64;
1276
+ var packageOf = (specifier) => specifier.split("/").slice(0, specifier.startsWith("@") ? 2 : 1).join("/");
1277
+ var packageKeyOf = ({ name, from }) => `${packageOf(from)}
1278
+ ${name}`;
1266
1279
 
1267
1280
  class AdaptorResolver {
1268
1281
  #source;
@@ -1353,8 +1366,6 @@ ${field}`))
1353
1366
  return own.find((adaptor) => adaptor.fileName === fileName) ?? first;
1354
1367
  if (own.length === 1)
1355
1368
  return first;
1356
- if (!this.#resolver.hasModule(path))
1357
- return own.find((adaptor) => this.#source.relative(adaptor.fileName).startsWith(`${path}/`)) ?? first;
1358
1369
  const exported = this.#exportedAt(name, path, new Set).filter((item) => first || ("fact" in item));
1359
1370
  const [only] = exported;
1360
1371
  if (only)
@@ -1364,7 +1375,7 @@ ${field}`))
1364
1375
  #exportedAt(name, path, seen) {
1365
1376
  const key = `${path}
1366
1377
  ${name}`;
1367
- if (seen.has(key) || seen.size >= maxModules)
1378
+ if (seen.has(key))
1368
1379
  return [];
1369
1380
  seen.add(key);
1370
1381
  const here = (this.#adaptors.get(name) ?? []).filter((adaptor) => {
@@ -1380,25 +1391,26 @@ ${name}`;
1380
1391
  const target = named.from === null ? path : this.#resolver.pathOfSpecifier(named.fileName, named.from);
1381
1392
  return target === null ? [] : this.#exportedAt(named.name, target, seen);
1382
1393
  }
1383
- return [...new Set(stars.flatMap((star) => this.#exportedAt(name, star, seen)))];
1394
+ const reached = stars.flatMap((star) => this.#exportedAt(name, star, seen));
1395
+ return [...new Map(reached.map((item) => ["fact" in item ? item.id : packageKeyOf(item), item])).values()];
1384
1396
  }
1385
1397
  #packageAdaptorOf(name, specifier) {
1386
1398
  if (frameworkPattern.test(specifier))
1387
1399
  return this.#sink.addNode(this.#sink.key("adaptor", null, name), "adaptor", null, name, null, [frameworkOwner]).id;
1388
- const pkg = specifier.split("/").slice(0, specifier.startsWith("@") ? 2 : 1).join("/");
1400
+ const pkg = packageOf(specifier);
1389
1401
  return this.#sink.addNode(this.#sink.key("adaptor", pkg, name), "adaptor", null, name, null, [pkg]).id;
1390
1402
  }
1391
1403
  #packageShimOf(owner, name, near) {
1392
- const reexport = this.#resolver.reexportOf(owner, name, near);
1393
- const [shim] = reexport?.site.imports ?? [];
1394
- if (reexport && shim && this.#resolver.pathOfSpecifier(reexport.site.fileName, shim.from) === null)
1395
- return { name: reexport.local === "default" ? name : reexport.local, from: shim.from };
1396
- if (reexport || !near)
1404
+ if (!near)
1397
1405
  return null;
1398
- const { packages, paths } = this.#resolver.hasModule(near) ? this.#resolver.starExportsOf(owner, near) : { packages: this.#resolver.packagesUnder(owner, near), paths: [] };
1406
+ const shims = this.#exportedAt(name, near, new Set).filter((item) => !("fact" in item));
1407
+ const [shim] = shims;
1408
+ if (shim)
1409
+ return shims.length === 1 ? shim : null;
1410
+ const { packages, paths } = this.#resolver.starExportsOf(owner, near);
1399
1411
  const [only] = packages;
1400
- const isDeclared = this.#resolver.declares(owner, name) || paths.some((path) => this.#resolver.declaresAt(path, name));
1401
- return packages.length === 1 && only && !isDeclared ? { name, from: only } : null;
1412
+ const isDeclared = paths.some((path) => this.#resolver.declaresAt(path, name));
1413
+ return only && new Set(packages.map(packageOf)).size === 1 && !isDeclared ? { name, from: only } : null;
1402
1414
  }
1403
1415
  #nodeOf({ fact, owner, fileName, id }) {
1404
1416
  const detail = fact.refName ? [fact.refName] : [];
@@ -4,7 +4,7 @@ import {
4
4
  Executor,
5
5
  PkgInfo,
6
6
  WorkspaceExecutor
7
- } from "./index-g56xae1n.js";
7
+ } from "./index-hw2eammf.js";
8
8
 
9
9
  // pkgs/@akanjs/devkit/executors/pkgExecutor.ts
10
10
  import path from "path";
@@ -1,7 +1,7 @@
1
1
  // @bun
2
2
  import {
3
3
  AppInfo
4
- } from "./index-g56xae1n.js";
4
+ } from "./index-hw2eammf.js";
5
5
 
6
6
  // pkgs/@akanjs/devkit/workspace/slicePlanner.ts
7
7
  class SlicePlanner {
@@ -1,17 +1,17 @@
1
1
  // @bun
2
2
  import {
3
3
  runner
4
- } from "./index-neassptx.js";
4
+ } from "./index-bbd1727m.js";
5
5
  import {
6
6
  AppExecutor2
7
- } from "./index-trp7jdr1.js";
7
+ } from "./index-4279crca.js";
8
8
  import {
9
9
  jsonText,
10
10
  workflowStatus,
11
11
  createWorkflowBaselineSummary,
12
12
  buildAkanModuleContextIndex,
13
13
  toolingRolloutGate
14
- } from "./index-669sg3yp.js";
14
+ } from "./index-ggmwp14t.js";
15
15
  import {
16
16
  buildResourceList,
17
17
  codexMcpConfigPath,
@@ -21,29 +21,29 @@ import {
21
21
  upsertCodexMcpServerBlock,
22
22
  renderDoctorText,
23
23
  AkanContextAnalyzer
24
- } from "./index-er2ja34m.js";
24
+ } from "./index-rxxjkbj2.js";
25
25
  import {
26
26
  Prompter2
27
27
  } from "./index-89x8tp7z.js";
28
28
  import {
29
29
  NativeApp
30
- } from "./index-q57rsax4.js";
30
+ } from "./index-qrh7kdb1.js";
31
31
  import {
32
32
  isPlaceholderAppId
33
- } from "./index-jfkh776h.js";
33
+ } from "./index-tpr9nqkj.js";
34
34
  import {
35
35
  getMobileTargets,
36
36
  appIdsOf
37
37
  } from "./index-m9jj544v.js";
38
38
  import {
39
39
  WorkspaceGraph
40
- } from "./index-sp331bww.js";
40
+ } from "./index-pcqr0r0m.js";
41
41
  import {
42
42
  RepairRunner
43
- } from "./index-bzdq8wfw.js";
43
+ } from "./index-cef0fxf2.js";
44
44
  import {
45
45
  WorkflowRunner
46
- } from "./index-t329y8am.js";
46
+ } from "./index-rj406y9n.js";
47
47
 
48
48
  // pkgs/@akanjs/devkit/context/akanMcpContract.ts
49
49
  import { lstatSync, realpathSync } from "fs";
@@ -5,23 +5,23 @@ import {
5
5
  import {
6
6
  Executor,
7
7
  WorkspaceExecutor
8
- } from "./index-g56xae1n.js";
8
+ } from "./index-hw2eammf.js";
9
9
  import {
10
10
  getDirname2,
11
11
  FileSys2
12
12
  } from "./index-by2tvsq6.js";
13
13
  import {
14
14
  AppExecutor2
15
- } from "./index-trp7jdr1.js";
15
+ } from "./index-4279crca.js";
16
16
  import {
17
17
  LibExecutor2
18
- } from "./index-n8mxyy3f.js";
18
+ } from "./index-gkfpqdm8.js";
19
19
  import {
20
20
  PkgExecutor2
21
- } from "./index-dtpeyts6.js";
21
+ } from "./index-a85n83t6.js";
22
22
  import {
23
23
  ModuleExecutor
24
- } from "./index-dqsc1b5t.js";
24
+ } from "./index-k2kr1wd4.js";
25
25
 
26
26
  // pkgs/@akanjs/devkit/commandDecorators/camelToKebabCase.ts
27
27
  var camelToKebabCase = (str) => str.replace(/([A-Z])/g, "-$1").toLowerCase();
@@ -1,17 +1,17 @@
1
1
  // @bun
2
2
  import {
3
3
  runner
4
- } from "./index-neassptx.js";
4
+ } from "./index-bbd1727m.js";
5
5
  import {
6
6
  writeWorkflowRunArtifact,
7
7
  generatedFilePathsForTarget,
8
8
  writeGeneratedSyncState,
9
9
  createRepairReport,
10
10
  renderRepairReport
11
- } from "./index-669sg3yp.js";
11
+ } from "./index-ggmwp14t.js";
12
12
  import {
13
13
  AkanContextAnalyzer
14
- } from "./index-er2ja34m.js";
14
+ } from "./index-rxxjkbj2.js";
15
15
  import {
16
16
  isWorkflowSysName,
17
17
  isWorkflowModuleName
@@ -3,7 +3,7 @@ import {
3
3
  ROOT_LAYOUT_SYSTEM,
4
4
  isImplicitRootLayoutKey,
5
5
  resolveSsrPageEntriesForApp
6
- } from "./index-trp7jdr1.js";
6
+ } from "./index-4279crca.js";
7
7
  import {
8
8
  computeRouteSeedIndex,
9
9
  saveRouteSeedIndex,
@@ -11,12 +11,12 @@ import {
11
11
  ClientEntriesBundler,
12
12
  VENDOR_SPECIFIERS,
13
13
  RouteClientBuilder
14
- } from "./index-d2r762fk.js";
14
+ } from "./index-sa8g94se.js";
15
15
  import {
16
16
  SOURCE_EXTS,
17
17
  FontOptimizer,
18
18
  FontPruner
19
- } from "./index-1ts8vfsk.js";
19
+ } from "./index-ktvyva62.js";
20
20
  import {
21
21
  BarrelAnalyzer,
22
22
  createTsconfigPackageResolver,
@@ -24,7 +24,7 @@ import {
24
24
  CsrEntryFiles,
25
25
  toClientReferencePath,
26
26
  PagesBundleBuilder
27
- } from "./index-h7yd92c8.js";
27
+ } from "./index-nwbdpnna.js";
28
28
  import {
29
29
  CssBlockParser
30
30
  } from "./index-62md4dwy.js";
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  GlobalConfig,
4
4
  CloudApi
5
- } from "./index-vm6pr11y.js";
5
+ } from "./index-g95rbz83.js";
6
6
 
7
7
  // pkgs/@akanjs/cli/tunnel/TunnelShare.ts
8
8
  import { TunnelAgent } from "akanjs/server/tunnel";
@@ -9,10 +9,10 @@ import {
9
9
  UpdatePackFolder,
10
10
  NativePublicEnv,
11
11
  NativeApp
12
- } from "./index-q57rsax4.js";
12
+ } from "./index-qrh7kdb1.js";
13
13
  import {
14
14
  ExitCodeError
15
- } from "./index-neassptx.js";
15
+ } from "./index-bbd1727m.js";
16
16
  import {
17
17
  ConfigLock
18
18
  } from "./index-bqbf654f.js";
@@ -6,23 +6,23 @@ import {
6
6
  CloudApi,
7
7
  CloudUpdates,
8
8
  PipelineSecrets
9
- } from "./index-vm6pr11y.js";
9
+ } from "./index-g95rbz83.js";
10
10
  import {
11
11
  resolveMobileTargets
12
12
  } from "./index-m9jj544v.js";
13
13
  import {
14
14
  WorkspaceExecutor
15
- } from "./index-g56xae1n.js";
15
+ } from "./index-hw2eammf.js";
16
16
  import {
17
17
  AppExecutor2
18
- } from "./index-trp7jdr1.js";
18
+ } from "./index-4279crca.js";
19
19
  import {
20
20
  NativeApp
21
- } from "./index-q57rsax4.js";
21
+ } from "./index-qrh7kdb1.js";
22
22
  import {
23
23
  runner,
24
24
  assertPromptable
25
- } from "./index-neassptx.js";
25
+ } from "./index-bbd1727m.js";
26
26
  import {
27
27
  getNpmRegistryUrl,
28
28
  getPublishedVersions,
@@ -1,21 +1,21 @@
1
1
  // @bun
2
2
  import {
3
3
  AppExecutor2
4
- } from "./index-trp7jdr1.js";
4
+ } from "./index-4279crca.js";
5
5
  import {
6
6
  LibExecutor2
7
- } from "./index-n8mxyy3f.js";
7
+ } from "./index-gkfpqdm8.js";
8
8
  import {
9
9
  createAst,
10
10
  AkanIndex
11
- } from "./index-nd39rssn.js";
11
+ } from "./index-a42cf737.js";
12
12
  import {
13
13
  sysNamePattern,
14
14
  identifierPattern
15
15
  } from "./index-va90m8nd.js";
16
16
  import {
17
17
  camelToKebabCase
18
- } from "./index-neassptx.js";
18
+ } from "./index-bbd1727m.js";
19
19
 
20
20
  // pkgs/@akanjs/devkit/workflow/artifacts.ts
21
21
  import { capitalize as capitalize2 } from "akanjs/common";
@@ -5,7 +5,7 @@ import {
5
5
  SysExecutor,
6
6
  WorkspaceExecutor,
7
7
  AkanLibConfig
8
- } from "./index-g56xae1n.js";
8
+ } from "./index-hw2eammf.js";
9
9
 
10
10
  // pkgs/@akanjs/devkit/executors/libExecutor.ts
11
11
  class LibExecutor2 extends SysExecutor {
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  runner,
4
4
  script
5
- } from "./index-neassptx.js";
5
+ } from "./index-bbd1727m.js";
6
6
 
7
7
  // pkgs/@akanjs/cli/page/page.runner.ts
8
8
  class PageRunner extends runner("page") {
@@ -2,15 +2,15 @@
2
2
  import {
3
3
  runner,
4
4
  script
5
- } from "./index-neassptx.js";
5
+ } from "./index-bbd1727m.js";
6
6
  import {
7
7
  CommandExecutionError,
8
8
  LibSource,
9
9
  formatLibStatuses
10
- } from "./index-g56xae1n.js";
10
+ } from "./index-hw2eammf.js";
11
11
  import {
12
12
  LibExecutor2
13
- } from "./index-n8mxyy3f.js";
13
+ } from "./index-gkfpqdm8.js";
14
14
  import {
15
15
  assertPlainName
16
16
  } from "./index-va90m8nd.js";