@akanjs/cli 3.0.0-alpha.97 → 3.0.0-alpha.99

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 (51) hide show
  1. package/.build-stamp +1 -1
  2. package/{abstractCompactor-cefxzggj.js → abstractCompactor-byytxs22.js} +1 -1
  3. package/{agent.command-r93wmq7m.js → agent.command-v1a4746v.js} +5 -5
  4. package/{application.command-c4zsbmjj.js → application.command-j05fr5jc.js} +9 -6
  5. package/{applicationBuildRunner-nqvj15x7.js → applicationBuildRunner-s4gsk728.js} +2 -2
  6. package/{applicationReleasePackager-3wh58n2m.js → applicationReleasePackager-28v9vbzk.js} +1 -1
  7. package/buildBatch.proc.js +2 -2
  8. package/{capacitorApp-gzcx6txb.js → capacitorApp-8d6d4zkm.js} +2 -2
  9. package/{cloud.command-me9e9dwb.js → cloud.command-r6wvq2rp.js} +9 -9
  10. package/{context.command-qd8kqrnh.js → context.command-4vdt1aqq.js} +13 -13
  11. package/{devTui-jbn7cjfg.js → devTui-tnj2hh4f.js} +1 -1
  12. package/{devTuiView-2jffndk4.js → devTuiView-xzed2pd6.js} +1 -1
  13. package/{guideline.command-f38x8jhw.js → guideline.command-p92dq6ts.js} +3 -3
  14. package/guidelines/conventions/conventions.instruction.md +8 -4
  15. package/guidelines/runtimeRule/runtimeRule.instruction.md +7 -0
  16. package/incrementalBuilder.proc.js +1 -1
  17. package/{index-y74k5anj.js → index-0amdxycf.js} +3 -3
  18. package/{index-pgsswppj.js → index-1yxtbmbj.js} +1 -1
  19. package/{index-rntcdss1.js → index-29sxqfaw.js} +3 -3
  20. package/{index-pvb4vdwr.js → index-5svjba73.js} +1 -1
  21. package/{index-8qcydz5h.js → index-5wd728df.js} +51 -11
  22. package/{index-sjak5v5b.js → index-7d6vny25.js} +2 -2
  23. package/{index-5xdqxbn9.js → index-8p8p0cf8.js} +3 -3
  24. package/{index-vp0509kc.js → index-b9rkcrx8.js} +4 -4
  25. package/{index-n85fer99.js → index-c69j78kk.js} +1 -1
  26. package/{index-e82dyeqy.js → index-fc1bh0a7.js} +1 -1
  27. package/{index-4ravxy65.js → index-gkkdx9kp.js} +6 -6
  28. package/{index-zkvpaggp.js → index-gq44bqjt.js} +2 -2
  29. package/{index-0emb9eat.js → index-gtmz74tj.js} +2 -2
  30. package/{index-mpmyqm1y.js → index-hyywke0f.js} +1 -1
  31. package/{index-jydtyzva.js → index-p5neav9b.js} +1 -1
  32. package/{index-3vvbv974.js → index-qkk27bk6.js} +4 -4
  33. package/{index-q8sn827n.js → index-qsq3q8fy.js} +6 -2
  34. package/{index-h759vjfa.js → index-srdssqj7.js} +3 -3
  35. package/{index-r50qen0z.js → index-yza7zkpt.js} +10 -10
  36. package/{index-9bwhxrqf.js → index-zmjppp25.js} +5 -5
  37. package/{index-cezy7yb3.js → index-znynzt5w.js} +1 -1
  38. package/index.js +19 -19
  39. package/{library.command-em103wtn.js → library.command-s4fszngs.js} +3 -3
  40. package/{localRegistry.command-81acqng9.js → localRegistry.command-fq2w7cgz.js} +8 -8
  41. package/{module.command-451pztkc.js → module.command-6n7dwvav.js} +6 -6
  42. package/{package.command-rfhyf38t.js → package.command-gr82ypnr.js} +3 -3
  43. package/package.json +2 -2
  44. package/{page.command-kt19da5g.js → page.command-7gvgb3jb.js} +3 -3
  45. package/{primitive.command-pgy69ere.js → primitive.command-tk5ckw38.js} +7 -7
  46. package/{quality.command-gpe2vqb5.js → quality.command-38v81baf.js} +2 -2
  47. package/{repair.command-2sbrz187.js → repair.command-5xbwvsxp.js} +5 -5
  48. package/{scalar.command-jcf4e5sv.js → scalar.command-0epwcr5k.js} +5 -5
  49. package/{subspace.command-kqzqtk0p.js → subspace.command-e2t36xb2.js} +3 -3
  50. package/{workflow.command-m4z25a2p.js → workflow.command-kphbr7eh.js} +10 -10
  51. package/{workspace.command-t2v12ewm.js → workspace.command-ag5hy887.js} +20 -20
package/.build-stamp CHANGED
@@ -1 +1 @@
1
- 72632593f99ee4af80f43a1ebd41841fd780e98daecae6b84c290e2826628cc1
1
+ f3bce65fb2dff9410c9826ba3afeec931401da83210e2ac6030a4d84da16a600
@@ -2,7 +2,7 @@
2
2
  import"./index-q0y2jq9j.js";
3
3
  import {
4
4
  AiSession
5
- } from "./index-n85fer99.js";
5
+ } from "./index-c69j78kk.js";
6
6
  import {
7
7
  AbstractDoc
8
8
  } from "./index-meh558jy.js";
@@ -2,17 +2,17 @@
2
2
  import {
3
3
  Workspace,
4
4
  command
5
- } from "./index-cezy7yb3.js";
5
+ } from "./index-znynzt5w.js";
6
6
  import"./index-q0y2jq9j.js";
7
- import"./index-q8sn827n.js";
7
+ import"./index-qsq3q8fy.js";
8
8
  import"./index-6wwzs1bc.js";
9
9
  import"./index-by5gpp8x.js";
10
- import"./index-e82dyeqy.js";
11
- import"./index-0emb9eat.js";
10
+ import"./index-fc1bh0a7.js";
11
+ import"./index-gtmz74tj.js";
12
12
  import"./index-h7yw2z9n.js";
13
13
  import {
14
14
  AgentScript
15
- } from "./index-rntcdss1.js";
15
+ } from "./index-29sxqfaw.js";
16
16
 
17
17
  // pkgs/@akanjs/cli/agent/agent.command.ts
18
18
  class AgentCommand extends command("agent", [AgentScript], ({ public: target }) => ({
@@ -6,19 +6,19 @@ import {
6
6
  Exec,
7
7
  Workspace,
8
8
  command
9
- } from "./index-cezy7yb3.js";
9
+ } from "./index-znynzt5w.js";
10
10
  import"./index-q0y2jq9j.js";
11
- import"./index-q8sn827n.js";
11
+ import"./index-qsq3q8fy.js";
12
12
  import"./index-6wwzs1bc.js";
13
13
  import {
14
14
  ApplicationScript
15
- } from "./index-8qcydz5h.js";
16
- import"./index-zkvpaggp.js";
15
+ } from "./index-5wd728df.js";
16
+ import"./index-gq44bqjt.js";
17
17
  import"./index-hwkygn9s.js";
18
18
  import {
19
19
  AbstractDoc
20
20
  } from "./index-meh558jy.js";
21
- import"./index-pvb4vdwr.js";
21
+ import"./index-5svjba73.js";
22
22
  import {
23
23
  getMobileTargetChoices
24
24
  } from "./index-47pj3aee.js";
@@ -103,7 +103,10 @@ class ApplicationCommand extends command("application", [ApplicationScript], ({
103
103
  }).option("write", Boolean, { desc: "write code generation", default: true }).option("regenerate", Boolean, { flag: "g", desc: "delete and regenerate native project", default: false }).exec(async function(app, target, env, write, regenerate) {
104
104
  await this.applicationScript.buildAndroid(app, { target, env, write, regenerate });
105
105
  }),
106
- start: target({ short: true, desc: "Start development server(s) (frontend SSR + backend)" }).with(Apps).option("plain", Boolean, { desc: "print prefixed lines instead of the full-screen view", default: false }).option("kill", Boolean, { flag: "k", desc: "free the dev ports first, whoever is holding them", default: false }).option("concurrency", Number, { desc: "apps to boot at a time", default: 1 }).option("dbup", Boolean, { desc: "start the local database first", default: true }).option("open", Boolean, { desc: "open web browser?", default: false }).option("write", Boolean, { desc: "write code generation", default: true }).exec(async function(apps, plain, kill, concurrency, dbup, open, write) {
106
+ start: target({ short: true, desc: "Start development server(s) (frontend SSR + backend)" }).with(Apps).option("plain", Boolean, { desc: "print prefixed lines instead of the full-screen view", default: false }).option("kill", Boolean, { flag: "k", desc: "free the dev ports first, whoever is holding them", default: false }).option("concurrency", Number, {
107
+ desc: "apps to boot at a time (default: what this machine's memory and cores allow)",
108
+ nullable: true
109
+ }).option("dbup", Boolean, { desc: "start the local database first", default: true }).option("open", Boolean, { desc: "open web browser?", default: false }).option("write", Boolean, { desc: "write code generation", default: true }).exec(async function(apps, plain, kill, concurrency, dbup, open, write) {
107
110
  await this.applicationScript.start(apps, { plain, kill, concurrency, dbup, open, write });
108
111
  }),
109
112
  startIos: target({ short: true, desc: "Start iOS app in simulator or device" }).with(App).option("target", String, mobileTargetOption).option("env", String, {
@@ -1,14 +1,14 @@
1
1
  // @bun
2
2
  import {
3
3
  Spinner
4
- } from "./index-q8sn827n.js";
4
+ } from "./index-qsq3q8fy.js";
5
5
  import {
6
6
  AllRoutesBuilder,
7
7
  CsrArtifactBuilder,
8
8
  FontPruner,
9
9
  precompressArtifacts,
10
10
  SsrBaseArtifactBuilder
11
- } from "./index-jydtyzva.js";
11
+ } from "./index-p5neav9b.js";
12
12
  import"./index-w8kmx1b6.js";
13
13
  import"./index-q0y2jq9j.js";
14
14
  import"./index-hwkygn9s.js";
@@ -4,7 +4,7 @@ import {
4
4
  } from "./index-q0y2jq9j.js";
5
5
  import {
6
6
  Spinner
7
- } from "./index-q8sn827n.js";
7
+ } from "./index-qsq3q8fy.js";
8
8
 
9
9
  // pkgs/@akanjs/devkit/applicationReleasePackager.ts
10
10
  import { cp, mkdir, rm } from "fs/promises";
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  WorkspaceExecutor,
4
4
  AppExecutor
5
- } from "./index-q8sn827n.js";
5
+ } from "./index-qsq3q8fy.js";
6
6
  import"./index-q0y2jq9j.js";
7
7
  import"./index-6wwzs1bc.js";
8
8
  import {
@@ -11,7 +11,7 @@ import {
11
11
  CsrArtifactBuilder,
12
12
  FontOptimizer,
13
13
  SsrBaseArtifactBuilder
14
- } from "./index-jydtyzva.js";
14
+ } from "./index-p5neav9b.js";
15
15
  import"./index-w8kmx1b6.js";
16
16
  import"./index-hwkygn9s.js";
17
17
  import"./index-n68jx79w.js";
@@ -2,8 +2,8 @@
2
2
  import {
3
3
  isPlaceholderAppId2,
4
4
  CapacitorApp2
5
- } from "./index-pgsswppj.js";
6
- import"./index-q8sn827n.js";
5
+ } from "./index-1yxtbmbj.js";
6
+ import"./index-qsq3q8fy.js";
7
7
  import"./index-6wwzs1bc.js";
8
8
  import"./index-q0y2jq9j.js";
9
9
  export {
@@ -2,23 +2,23 @@
2
2
  import"./index-q0y2jq9j.js";
3
3
  import {
4
4
  GlobalConfig
5
- } from "./index-n85fer99.js";
5
+ } from "./index-c69j78kk.js";
6
6
  import {
7
7
  Workspace,
8
8
  command
9
- } from "./index-cezy7yb3.js";
10
- import"./index-q8sn827n.js";
9
+ } from "./index-znynzt5w.js";
10
+ import"./index-qsq3q8fy.js";
11
11
  import"./index-6wwzs1bc.js";
12
- import"./index-8qcydz5h.js";
13
- import"./index-zkvpaggp.js";
12
+ import"./index-5wd728df.js";
13
+ import"./index-gq44bqjt.js";
14
14
  import"./index-hwkygn9s.js";
15
15
  import"./index-kcxmv48c.js";
16
- import"./index-sjak5v5b.js";
17
- import"./index-vp0509kc.js";
16
+ import"./index-7d6vny25.js";
17
+ import"./index-b9rkcrx8.js";
18
18
  import {
19
19
  CloudScript
20
- } from "./index-4ravxy65.js";
21
- import"./index-pvb4vdwr.js";
20
+ } from "./index-gkkdx9kp.js";
21
+ import"./index-5svjba73.js";
22
22
 
23
23
  // pkgs/@akanjs/cli/cloud/cloud.command.ts
24
24
  var localRegistryUrl = () => process.env.AKAN_NPM_REGISTRY ?? "http://127.0.0.1:4873";
@@ -2,25 +2,25 @@
2
2
  import {
3
3
  Workspace,
4
4
  command
5
- } from "./index-cezy7yb3.js";
5
+ } from "./index-znynzt5w.js";
6
6
  import"./index-q0y2jq9j.js";
7
- import"./index-q8sn827n.js";
7
+ import"./index-qsq3q8fy.js";
8
8
  import"./index-6wwzs1bc.js";
9
9
  import"./index-by5gpp8x.js";
10
- import"./index-e82dyeqy.js";
11
- import"./index-0emb9eat.js";
10
+ import"./index-fc1bh0a7.js";
11
+ import"./index-gtmz74tj.js";
12
12
  import {
13
13
  ContextScript
14
- } from "./index-r50qen0z.js";
15
- import"./index-pgsswppj.js";
14
+ } from "./index-yza7zkpt.js";
15
+ import"./index-1yxtbmbj.js";
16
16
  import"./index-h7yw2z9n.js";
17
- import"./index-y74k5anj.js";
18
- import"./index-h759vjfa.js";
19
- import"./index-n85fer99.js";
20
- import"./index-9bwhxrqf.js";
21
- import"./index-mpmyqm1y.js";
22
- import"./index-3vvbv974.js";
23
- import"./index-5xdqxbn9.js";
17
+ import"./index-0amdxycf.js";
18
+ import"./index-srdssqj7.js";
19
+ import"./index-c69j78kk.js";
20
+ import"./index-zmjppp25.js";
21
+ import"./index-hyywke0f.js";
22
+ import"./index-qkk27bk6.js";
23
+ import"./index-8p8p0cf8.js";
24
24
 
25
25
  // pkgs/@akanjs/cli/context/context.command.ts
26
26
  class ContextCommand extends command("context", [ContextScript], ({ public: target }) => ({
@@ -1,7 +1,7 @@
1
1
  // @bun
2
2
  import {
3
3
  openBrowser
4
- } from "./index-8qcydz5h.js";
4
+ } from "./index-5wd728df.js";
5
5
 
6
6
  // pkgs/@akanjs/cli/application/devTui.tsx
7
7
  import { render } from "ink";
@@ -1,7 +1,7 @@
1
1
  // @bun
2
2
  // pkgs/@akanjs/cli/application/devTuiView.ts
3
3
  var createDevTuiView = async (supervisor) => {
4
- const { DevTui } = await import("./devTui-jbn7cjfg.js");
4
+ const { DevTui } = await import("./devTui-tnj2hh4f.js");
5
5
  return new DevTui(supervisor);
6
6
  };
7
7
  export {
@@ -4,11 +4,11 @@ import {
4
4
  runner,
5
5
  script,
6
6
  command
7
- } from "./index-cezy7yb3.js";
7
+ } from "./index-znynzt5w.js";
8
8
  import {
9
9
  FileSys
10
10
  } from "./index-q0y2jq9j.js";
11
- import"./index-q8sn827n.js";
11
+ import"./index-qsq3q8fy.js";
12
12
  import {
13
13
  getDirname2
14
14
  } from "./index-6wwzs1bc.js";
@@ -17,7 +17,7 @@ import {
17
17
  } from "./index-h7yw2z9n.js";
18
18
  import {
19
19
  AiSession
20
- } from "./index-n85fer99.js";
20
+ } from "./index-c69j78kk.js";
21
21
 
22
22
  // pkgs/@akanjs/cli/guideline/guideline.script.ts
23
23
  import { Logger } from "akanjs/common";
@@ -875,10 +875,14 @@ when two shapes disagree.
875
875
  `/` greps, `e` shows stderr only, `c` clears, `o` opens the browser, `r` restarts that app, `q` quits.
876
876
  **`--plain` prints prefixed interleaved lines instead**, and a pipe, a redirect or an unsized terminal
877
877
  downgrades to that on its own.
878
- - `--concurrency <n>` boots more than one app at a time; the default of 1 is what keeps two cold builder peaks
879
- from overlapping. `--kill` frees the dev ports first — it resolves each port's listener, walks up to the top
880
- of that akan dev tree and signals it, so another checkout's server or a stale orphan on the same port is
881
- reclaimed. A holder that is not recognisably an akan process is reported and left alone.
878
+ - **How many apps boot at once is the machine's answer, not a constant.** A cold boot build is the builder's
879
+ RSS peak (~900MB per app), so the default wave is what memory and cores allow — half the memory budget
880
+ divided by that peak, and one app per four cores — which boots a laptop's apps together and still staggers
881
+ them inside a small container. The session says which in one line. `--concurrency <n>` overrides it, and
882
+ `AKAN_MEMORY_LIMIT` lowers the budget it derives from.
883
+ - `--kill` frees the dev ports first — it resolves each port's listener, walks up to the top of that akan dev
884
+ tree and signals it, so another checkout's server or a stale orphan on the same port is reclaimed. A holder
885
+ that is not recognisably an akan process is reported and left alone.
882
886
  - **A dev server watches its own app directory and the libs it actually depends on**, transitively, resolved
883
887
  once at boot from the synced manifests — so a save under a lib the app never imports rebuilds and reloads
884
888
  nothing, and neither does a save in a sibling app. An import that makes a new lib a dependency needs a
@@ -103,6 +103,13 @@ worker per web-serving replica.
103
103
  rotating log file the gateway would otherwise write, in the same `runtime/logs` directory.
104
104
  - **Nothing supervises a solo process but the orchestrator**, since the gateway's crash-restart-with-backoff went
105
105
  with it. `infra/app/templates/app.yaml` carries the liveness, readiness and startup probes that replace it.
106
+ - **`PORT` is the whole tree's port, and a server-side self-call follows it.** `AkanApp` resolves it once
107
+ (`new AkanApp({ port })`, else `PORT`, else 8282) and publishes it to the replica it runs in-process and to
108
+ every child it spawns — a federation child listens on a unix socket, but the loopback fetches its SSR and RSC
109
+ worker make still come back through the gateway. `getEnv().serverPort` reads it whenever the origin resolved to
110
+ `localhost`, so a container run with `PORT=80` calls itself on 80. Override the origin only when it is genuinely
111
+ not this process: `AKAN_PUBLIC_SERVER_PORT` outranks `PORT`, and a `SERVER_HOST` naming another host is not a
112
+ self-call and keeps its explicit port.
106
113
  - **`main.ts` imports `AkanApp` from `akanjs/server/akanApp`, not the barrel.** The barrel re-exports
107
114
  `AkanServer`, whose graph the gateway never runs; through it the process evaluated 35MB of SSR renderer and
108
115
  SQLite driver to spawn children and relay bytes. Keep entrypoint imports at the leaf.
@@ -3,7 +3,7 @@ import {
3
3
  CodegenLock,
4
4
  WorkspaceExecutor,
5
5
  AppExecutor
6
- } from "./index-q8sn827n.js";
6
+ } from "./index-qsq3q8fy.js";
7
7
  import"./index-q0y2jq9j.js";
8
8
  import"./index-6wwzs1bc.js";
9
9
  import {
@@ -5,13 +5,13 @@ import {
5
5
  writeGeneratedSyncState,
6
6
  createRepairReport,
7
7
  renderRepairReport
8
- } from "./index-e82dyeqy.js";
8
+ } from "./index-fc1bh0a7.js";
9
9
  import {
10
10
  AkanContextAnalyzer
11
- } from "./index-0emb9eat.js";
11
+ } from "./index-gtmz74tj.js";
12
12
  import {
13
13
  runner
14
- } from "./index-cezy7yb3.js";
14
+ } from "./index-znynzt5w.js";
15
15
 
16
16
  // pkgs/@akanjs/cli/repair/repair.runner.ts
17
17
  var commandForShell = (command) => command.startsWith("akan ") ? `bun run ${command}` : command;
@@ -1,7 +1,7 @@
1
1
  // @bun
2
2
  import {
3
3
  CommandExecutionError
4
- } from "./index-q8sn827n.js";
4
+ } from "./index-qsq3q8fy.js";
5
5
  import {
6
6
  resolveMobilePath,
7
7
  targetHtmlFilename
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  runner,
4
4
  script
5
- } from "./index-cezy7yb3.js";
5
+ } from "./index-znynzt5w.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-q8sn827n.js";
16
+ } from "./index-qsq3q8fy.js";
17
17
  import {
18
18
  collectRecipeSources2,
19
19
  scanRecipes2
20
20
  } from "./index-by5gpp8x.js";
21
21
  import {
22
22
  AkanContextAnalyzer
23
- } from "./index-0emb9eat.js";
23
+ } from "./index-gtmz74tj.js";
24
24
  import {
25
25
  Prompter
26
26
  } from "./index-h7yw2z9n.js";
@@ -1,7 +1,7 @@
1
1
  // @bun
2
2
  import {
3
3
  AppInfo
4
- } from "./index-q8sn827n.js";
4
+ } from "./index-qsq3q8fy.js";
5
5
 
6
6
  // pkgs/@akanjs/devkit/slicePlanner.ts
7
7
  class SlicePlanner {
@@ -2,16 +2,16 @@
2
2
  import {
3
3
  runner,
4
4
  script
5
- } from "./index-cezy7yb3.js";
5
+ } from "./index-znynzt5w.js";
6
6
  import {
7
7
  WorkspaceExecutor,
8
8
  AppExecutor,
9
9
  LibExecutor,
10
10
  PkgExecutor
11
- } from "./index-q8sn827n.js";
11
+ } from "./index-qsq3q8fy.js";
12
12
  import {
13
13
  LibraryScript
14
- } from "./index-zkvpaggp.js";
14
+ } from "./index-gq44bqjt.js";
15
15
  import {
16
16
  HmrWatcher,
17
17
  WatchRootResolver
@@ -19,7 +19,7 @@ import {
19
19
  import {
20
20
  SlicePlanner,
21
21
  formatSlicePlan
22
- } from "./index-pvb4vdwr.js";
22
+ } from "./index-5svjba73.js";
23
23
  import {
24
24
  resolveMobileTargets
25
25
  } from "./index-47pj3aee.js";
@@ -1964,10 +1964,10 @@ ${uniqueCandidates.map((candidate) => ` - ${candidate}`).join(`
1964
1964
  // pkgs/@akanjs/cli/application/application.runner.ts
1965
1965
  import { Logger as Logger4 } from "akanjs/common";
1966
1966
  import ora from "ora";
1967
- var loadBuildRunner = async () => (await import("./applicationBuildRunner-nqvj15x7.js")).ApplicationBuildRunner;
1968
- var loadReleasePackager = async () => (await import("./applicationReleasePackager-3wh58n2m.js")).ApplicationReleasePackager;
1969
- var loadCapacitorApp = async () => (await import("./capacitorApp-gzcx6txb.js")).CapacitorApp;
1970
- var loadAbstractCompactor = async () => (await import("./abstractCompactor-cefxzggj.js")).AbstractCompactor;
1967
+ var loadBuildRunner = async () => (await import("./applicationBuildRunner-s4gsk728.js")).ApplicationBuildRunner;
1968
+ var loadReleasePackager = async () => (await import("./applicationReleasePackager-28v9vbzk.js")).ApplicationReleasePackager;
1969
+ var loadCapacitorApp = async () => (await import("./capacitorApp-8d6d4zkm.js")).CapacitorApp;
1970
+ var loadAbstractCompactor = async () => (await import("./abstractCompactor-byytxs22.js")).AbstractCompactor;
1971
1971
  var loadPrompts = async () => await import("@inquirer/prompts");
1972
1972
 
1973
1973
  class ApplicationRunner extends runner("application") {
@@ -2566,6 +2566,43 @@ class DevStreamView {
2566
2566
  }
2567
2567
  }
2568
2568
 
2569
+ // pkgs/@akanjs/cli/application/devBootConcurrency.ts
2570
+ import os from "os";
2571
+ import { MemoryLimit as MemoryLimit2 } from "akanjs/server/memoryLimit";
2572
+
2573
+ class DevBootConcurrency {
2574
+ static perAppBytes = 900 * 1024 * 1024;
2575
+ static memoryShare = 0.5;
2576
+ static coresPerApp = 4;
2577
+ static budget() {
2578
+ const hostBytes = os.totalmem();
2579
+ const declaredBytes = MemoryLimit2.parseBytesEnv("AKAN_MEMORY_LIMIT") ?? MemoryLimit2.readCgroupBytes();
2580
+ return { memoryBytes: Math.min(hostBytes, declaredBytes ?? hostBytes), cores: os.availableParallelism() };
2581
+ }
2582
+ static resolve(appCount, requested, budget = DevBootConcurrency.budget()) {
2583
+ const apps = Math.max(1, Math.trunc(appCount));
2584
+ if (requested !== null && Number.isFinite(requested)) {
2585
+ const asked = Math.max(1, Math.trunc(requested));
2586
+ return { concurrency: Math.min(apps, asked), reason: `--concurrency ${asked}` };
2587
+ }
2588
+ const byMemory = Math.floor(budget.memoryBytes * DevBootConcurrency.memoryShare / DevBootConcurrency.perAppBytes);
2589
+ const byCores = Math.floor(budget.cores / DevBootConcurrency.coresPerApp);
2590
+ return {
2591
+ concurrency: Math.max(1, Math.min(apps, byMemory, byCores)),
2592
+ reason: `${budget.cores} cores, ${DevBootConcurrency.#formatBytes(budget.memoryBytes)} memory`
2593
+ };
2594
+ }
2595
+ static describe(appCount, plan) {
2596
+ if (plan.concurrency >= appCount)
2597
+ return `booting all ${appCount} apps at once (${plan.reason})`;
2598
+ return `booting ${plan.concurrency} of ${appCount} apps at a time (${plan.reason}) \u2014 --concurrency raises it`;
2599
+ }
2600
+ static #formatBytes(bytes) {
2601
+ const gigabytes = bytes / 1024 ** 3;
2602
+ return gigabytes >= 10 ? `${Math.round(gigabytes)}GB` : `${gigabytes.toFixed(1)}GB`;
2603
+ }
2604
+ }
2605
+
2569
2606
  // pkgs/@akanjs/cli/application/devSupervisor.ts
2570
2607
  class DevSupervisor {
2571
2608
  static supervisedEnvKey = "AKAN_DEV_SUPERVISED";
@@ -2640,8 +2677,11 @@ class DevSupervisor {
2640
2677
  };
2641
2678
  }
2642
2679
  async#bootInOrder() {
2643
- const concurrency = Math.max(1, Math.trunc(this.#options.concurrency ?? 1));
2644
2680
  const queue = [...this.#children.values()];
2681
+ const plan = DevBootConcurrency.resolve(queue.length, this.#options.concurrency ?? null);
2682
+ const concurrency = plan.concurrency;
2683
+ if (queue.length > 1)
2684
+ this.#note(DevBootConcurrency.describe(queue.length, plan), "info");
2645
2685
  const waves = [];
2646
2686
  for (let idx = 0;idx < queue.length; idx += concurrency)
2647
2687
  waves.push(queue.slice(idx, idx + concurrency));
@@ -2987,7 +3027,7 @@ class ApplicationScript extends script("application", [ApplicationRunner, Librar
2987
3027
  }
2988
3028
  await this.applicationRunner.test(exec);
2989
3029
  }
2990
- async start(apps, { open = false, dbup = true, write = true, plain = false, kill = false, concurrency = 1 } = {}) {
3030
+ async start(apps, { open = false, dbup = true, write = true, plain = false, kill = false, concurrency = null } = {}) {
2991
3031
  const first = apps[0];
2992
3032
  if (!first)
2993
3033
  throw new Error("No app selected to start");
@@ -3040,7 +3080,7 @@ class ApplicationScript extends script("application", [ApplicationRunner, Librar
3040
3080
  throw new Error("No app selected to start");
3041
3081
  const startedDatabase = dbup ? await this.#prepareSharedDatabase(apps) : false;
3042
3082
  const supervisor = new DevSupervisor({ apps, mode, concurrency, open, write });
3043
- const view = mode === "tui" ? await (await import("./devTuiView-2jffndk4.js")).createDevTuiView(supervisor) : new DevStreamView(apps.map((app) => app.name));
3083
+ const view = mode === "tui" ? await (await import("./devTuiView-xzed2pd6.js")).createDevTuiView(supervisor) : new DevStreamView(apps.map((app) => app.name));
3044
3084
  await supervisor.run(view);
3045
3085
  if (startedDatabase)
3046
3086
  await this.#stopDatabase(workspace);
@@ -2,13 +2,13 @@
2
2
  import {
3
3
  runner,
4
4
  script
5
- } from "./index-cezy7yb3.js";
5
+ } from "./index-znynzt5w.js";
6
6
  import {
7
7
  FileSys
8
8
  } from "./index-q0y2jq9j.js";
9
9
  import {
10
10
  PkgExecutor
11
- } from "./index-q8sn827n.js";
11
+ } from "./index-qsq3q8fy.js";
12
12
  import {
13
13
  TypeScriptDependencyScanner2
14
14
  } from "./index-kcxmv48c.js";
@@ -2,15 +2,15 @@
2
2
  import {
3
3
  runner,
4
4
  script
5
- } from "./index-cezy7yb3.js";
5
+ } from "./index-znynzt5w.js";
6
6
  import {
7
7
  generatedFilesForSync,
8
8
  createPassedPrimitiveReport,
9
9
  scalarChangedFiles
10
- } from "./index-e82dyeqy.js";
10
+ } from "./index-fc1bh0a7.js";
11
11
  import {
12
12
  AiSession
13
- } from "./index-n85fer99.js";
13
+ } from "./index-c69j78kk.js";
14
14
  import {
15
15
  Prompter
16
16
  } from "./index-h7yw2z9n.js";
@@ -4,17 +4,17 @@ import {
4
4
  GlobalConfig,
5
5
  CloudApi,
6
6
  AiSession
7
- } from "./index-n85fer99.js";
7
+ } from "./index-c69j78kk.js";
8
8
  import {
9
9
  WorkspaceExecutor,
10
10
  AppExecutor
11
- } from "./index-q8sn827n.js";
11
+ } from "./index-qsq3q8fy.js";
12
12
  import {
13
13
  runner
14
- } from "./index-cezy7yb3.js";
14
+ } from "./index-znynzt5w.js";
15
15
  import {
16
16
  openBrowser
17
- } from "./index-8qcydz5h.js";
17
+ } from "./index-5wd728df.js";
18
18
 
19
19
  // pkgs/@akanjs/cli/npmRegistry.ts
20
20
  var defaultNpmRegistry = "https://registry.npmjs.org";
@@ -4,7 +4,7 @@ import {
4
4
  } from "./index-q0y2jq9j.js";
5
5
  import {
6
6
  Spinner
7
- } from "./index-q8sn827n.js";
7
+ } from "./index-qsq3q8fy.js";
8
8
 
9
9
  // pkgs/@akanjs/devkit/cloud/globalConfig.ts
10
10
  import { chmod, mkdir } from "fs/promises";
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  AppExecutor,
4
4
  LibExecutor
5
- } from "./index-q8sn827n.js";
5
+ } from "./index-qsq3q8fy.js";
6
6
 
7
7
  // pkgs/@akanjs/devkit/workflow/utils.ts
8
8
  var jsonText = (value, { trailingNewline = true } = {}) => `${JSON.stringify(value, null, 2)}${trailingNewline ? `
@@ -3,22 +3,22 @@ import {
3
3
  GlobalConfig,
4
4
  CloudApi,
5
5
  AiSession
6
- } from "./index-n85fer99.js";
6
+ } from "./index-c69j78kk.js";
7
7
  import {
8
8
  PkgExecutor
9
- } from "./index-q8sn827n.js";
9
+ } from "./index-qsq3q8fy.js";
10
10
  import {
11
11
  script
12
- } from "./index-cezy7yb3.js";
12
+ } from "./index-znynzt5w.js";
13
13
  import {
14
14
  ApplicationScript
15
- } from "./index-8qcydz5h.js";
15
+ } from "./index-5wd728df.js";
16
16
  import {
17
17
  PackageScript
18
- } from "./index-sjak5v5b.js";
18
+ } from "./index-7d6vny25.js";
19
19
  import {
20
20
  CloudRunner
21
- } from "./index-vp0509kc.js";
21
+ } from "./index-b9rkcrx8.js";
22
22
 
23
23
  // pkgs/@akanjs/cli/cloud/cloud.script.ts
24
24
  import { Logger } from "akanjs/common";
@@ -2,10 +2,10 @@
2
2
  import {
3
3
  runner,
4
4
  script
5
- } from "./index-cezy7yb3.js";
5
+ } from "./index-znynzt5w.js";
6
6
  import {
7
7
  LibExecutor
8
- } from "./index-q8sn827n.js";
8
+ } from "./index-qsq3q8fy.js";
9
9
  import {
10
10
  LibSource,
11
11
  formatLibStatuses
@@ -7,7 +7,7 @@ import {
7
7
  isScannedRootEntry,
8
8
  AppExecutor,
9
9
  LibExecutor
10
- } from "./index-q8sn827n.js";
10
+ } from "./index-qsq3q8fy.js";
11
11
  import {
12
12
  FileSys
13
13
  } from "./index-q0y2jq9j.js";
@@ -19,7 +19,7 @@ import {
19
19
  import {
20
20
  workflowRunArtifactPath,
21
21
  workflowSyncDir
22
- } from "./index-e82dyeqy.js";
22
+ } from "./index-fc1bh0a7.js";
23
23
 
24
24
  // pkgs/@akanjs/devkit/akanContext.ts
25
25
  import { readdir } from "fs/promises";
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  runner,
4
4
  script
5
- } from "./index-cezy7yb3.js";
5
+ } from "./index-znynzt5w.js";
6
6
 
7
7
  // pkgs/@akanjs/cli/page/page.runner.ts
8
8
  class PageRunner extends runner("page") {
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  AsyncDefaultExportDetector,
4
4
  resolveSsrPageEntriesForApp
5
- } from "./index-q8sn827n.js";
5
+ } from "./index-qsq3q8fy.js";
6
6
  import {
7
7
  BarrelAnalyzer,
8
8
  createBarrelImportsPlugin,