@akanjs/cli 3.0.0-alpha.65 → 3.0.0-alpha.66

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 (43) hide show
  1. package/.build-stamp +1 -1
  2. package/{agent.command-99yaptk3.js → agent.command-7vr15vkn.js} +5 -5
  3. package/{application.command-77nxchr4.js → application.command-nrq6qvkh.js} +4 -4
  4. package/{applicationBuildRunner-k6dna8sz.js → applicationBuildRunner-jnjag4ay.js} +1 -1
  5. package/buildBatch.proc.js +1 -1
  6. package/{capacitorApp-4g1s9n37.js → capacitorApp-w1ryppdw.js} +2 -2
  7. package/{cloud.command-gegy1qxv.js → cloud.command-crwf7emx.js} +7 -7
  8. package/{context.command-a0pwgc3v.js → context.command-xbsgta4f.js} +12 -12
  9. package/{guideline.command-83p3y9w7.js → guideline.command-mm19n009.js} +2 -2
  10. package/guidelines/conventions/conventions.instruction.md +63 -5
  11. package/incrementalBuilder.proc.js +1 -1
  12. package/{index-wxc9p0n0.js → index-0jn016vv.js} +3 -3
  13. package/{index-qch3r961.js → index-1f34snpd.js} +1 -1
  14. package/{index-rm7xj6bc.js → index-639mgtfm.js} +2 -2
  15. package/{index-j35ceh2c.js → index-6s8snbb8.js} +2 -2
  16. package/{index-4etexq7j.js → index-7kxz2z5t.js} +1 -1
  17. package/{index-mr02v9xp.js → index-8vv6xtm5.js} +1 -1
  18. package/{index-ejr3h3wc.js → index-8xeg8ehr.js} +3 -3
  19. package/{index-rzekxec9.js → index-9ppq2sx0.js} +4 -4
  20. package/{index-m285dkby.js → index-a6k0b1b5.js} +5 -5
  21. package/{index-db89awmp.js → index-bzthvy50.js} +5 -5
  22. package/{index-wm5hw5mr.js → index-cnyeq88g.js} +3 -3
  23. package/{index-27jj517n.js → index-d5ef8n21.js} +4 -4
  24. package/{index-1t5r09v4.js → index-gkg6e6cx.js} +10 -10
  25. package/{index-4sgv0wcr.js → index-hpbf1b1e.js} +3 -3
  26. package/{index-cwa0jvjt.js → index-jbhecvr9.js} +1 -1
  27. package/{index-emsw8h3b.js → index-k8k45qfk.js} +2 -2
  28. package/{index-n57kkvtg.js → index-w008bx1p.js} +49 -31
  29. package/{index-v76gy4dn.js → index-xda7qe2j.js} +2 -2
  30. package/index.js +18 -18
  31. package/{library.command-2b20rx36.js → library.command-afjd6ex4.js} +3 -3
  32. package/{localRegistry.command-tdn3373t.js → localRegistry.command-6zadvx6z.js} +6 -6
  33. package/{module.command-ez5psv7q.js → module.command-rh01pbz3.js} +5 -5
  34. package/{package.command-dcdya2hn.js → package.command-g4s1y1wn.js} +3 -3
  35. package/package.json +2 -2
  36. package/{page.command-he49r0vd.js → page.command-9bw6sz1r.js} +3 -3
  37. package/{primitive.command-w2hyrf9c.js → primitive.command-pg1j3gm3.js} +6 -6
  38. package/{quality.command-8xewbve2.js → quality.command-rt1z7je9.js} +2 -2
  39. package/{repair.command-9f9wy32e.js → repair.command-pg54yhgc.js} +5 -5
  40. package/{scalar.command-q4ravcd9.js → scalar.command-t0akqh1r.js} +4 -4
  41. package/templates/app/main.ts +3 -1
  42. package/{workflow.command-3stj54ek.js → workflow.command-se886yew.js} +9 -9
  43. package/{workspace.command-2pfnrhmw.js → workspace.command-q17atzha.js} +18 -18
package/.build-stamp CHANGED
@@ -1 +1 @@
1
- d9a9cb283fc6902d147352f88eeb5fbd6d7ea8772a5b896f6abb475c2581fb44
1
+ 9aa6bbc9a3c9ef9ff25aa95015f54834f3a9f39d7f76d5b9cc7704a55a0f57b8
@@ -1,15 +1,15 @@
1
1
  // @bun
2
2
  import {
3
3
  AgentScript
4
- } from "./index-wxc9p0n0.js";
5
- import"./index-v76gy4dn.js";
6
- import"./index-mr02v9xp.js";
4
+ } from "./index-0jn016vv.js";
5
+ import"./index-xda7qe2j.js";
6
+ import"./index-8vv6xtm5.js";
7
7
  import"./index-j37qq1f2.js";
8
8
  import {
9
9
  Workspace,
10
10
  command
11
- } from "./index-qch3r961.js";
12
- import"./index-n57kkvtg.js";
11
+ } from "./index-1f34snpd.js";
12
+ import"./index-w008bx1p.js";
13
13
  import"./index-f39512t6.js";
14
14
  import"./index-mxvakhsm.js";
15
15
  import"./index-xys926f2.js";
@@ -4,8 +4,8 @@ import {
4
4
  } from "./index-0wae5ebk.js";
5
5
  import {
6
6
  ApplicationScript
7
- } from "./index-m285dkby.js";
8
- import"./index-emsw8h3b.js";
7
+ } from "./index-a6k0b1b5.js";
8
+ import"./index-k8k45qfk.js";
9
9
  import {
10
10
  getMobileTargetChoices
11
11
  } from "./index-76rn3g2c.js";
@@ -15,10 +15,10 @@ import {
15
15
  Sys,
16
16
  Workspace,
17
17
  command
18
- } from "./index-qch3r961.js";
18
+ } from "./index-1f34snpd.js";
19
19
  import"./index-fgc8r6dj.js";
20
20
  import"./index-5vy2jzar.js";
21
- import"./index-n57kkvtg.js";
21
+ import"./index-w008bx1p.js";
22
22
  import"./index-f39512t6.js";
23
23
  import"./index-mxvakhsm.js";
24
24
  import"./index-1577bej2.js";
@@ -108,7 +108,7 @@ class ApplicationBuildRunner {
108
108
  const akanConfig = await this.#app.getConfig();
109
109
  await Promise.all([
110
110
  this.#app.dist.writeJson("package.json", akanConfig.getProductionPackageJson()),
111
- this.#app.dist.writeFile(`${this.#app.dist.cwdPath}/Dockerfile`, akanConfig.docker.content)
111
+ this.#app.dist.writeFile(`${this.#app.dist.cwdPath}/Dockerfile`, akanConfig.dockerfile)
112
112
  ]);
113
113
  }
114
114
  async#buildBackend() {
@@ -12,7 +12,7 @@ import"./index-5vy2jzar.js";
12
12
  import {
13
13
  AppExecutor,
14
14
  WorkspaceExecutor
15
- } from "./index-n57kkvtg.js";
15
+ } from "./index-w008bx1p.js";
16
16
  import"./index-f39512t6.js";
17
17
  import"./index-mxvakhsm.js";
18
18
  import"./index-1577bej2.js";
@@ -25,9 +25,9 @@ import {
25
25
  selectLocalDevHost,
26
26
  sortIosRunTargets,
27
27
  writeRootCapacitorConfig
28
- } from "./index-cwa0jvjt.js";
28
+ } from "./index-jbhecvr9.js";
29
29
  import"./index-76rn3g2c.js";
30
- import"./index-n57kkvtg.js";
30
+ import"./index-w008bx1p.js";
31
31
  import"./index-f39512t6.js";
32
32
  import"./index-mxvakhsm.js";
33
33
  import"./index-1577bej2.js";
@@ -1,22 +1,22 @@
1
1
  // @bun
2
2
  import {
3
3
  CloudScript
4
- } from "./index-db89awmp.js";
5
- import"./index-wm5hw5mr.js";
6
- import"./index-j35ceh2c.js";
4
+ } from "./index-bzthvy50.js";
5
+ import"./index-cnyeq88g.js";
6
+ import"./index-6s8snbb8.js";
7
7
  import {
8
8
  GlobalConfig
9
9
  } from "./index-sh01r3pm.js";
10
- import"./index-m285dkby.js";
11
- import"./index-emsw8h3b.js";
10
+ import"./index-a6k0b1b5.js";
11
+ import"./index-k8k45qfk.js";
12
12
  import"./index-76rn3g2c.js";
13
13
  import {
14
14
  Workspace,
15
15
  command
16
- } from "./index-qch3r961.js";
16
+ } from "./index-1f34snpd.js";
17
17
  import"./index-fgc8r6dj.js";
18
18
  import"./index-5vy2jzar.js";
19
- import"./index-n57kkvtg.js";
19
+ import"./index-w008bx1p.js";
20
20
  import"./index-f39512t6.js";
21
21
  import"./index-mxvakhsm.js";
22
22
  import"./index-1577bej2.js";
@@ -1,25 +1,25 @@
1
1
  // @bun
2
2
  import {
3
3
  ContextScript
4
- } from "./index-1t5r09v4.js";
5
- import"./index-4sgv0wcr.js";
6
- import"./index-ejr3h3wc.js";
7
- import"./index-rm7xj6bc.js";
8
- import"./index-rzekxec9.js";
9
- import"./index-27jj517n.js";
4
+ } from "./index-gkg6e6cx.js";
5
+ import"./index-hpbf1b1e.js";
6
+ import"./index-8xeg8ehr.js";
7
+ import"./index-639mgtfm.js";
8
+ import"./index-9ppq2sx0.js";
9
+ import"./index-d5ef8n21.js";
10
10
  import"./index-ss469dec.js";
11
- import"./index-4etexq7j.js";
12
- import"./index-cwa0jvjt.js";
11
+ import"./index-7kxz2z5t.js";
12
+ import"./index-jbhecvr9.js";
13
13
  import"./index-sh01r3pm.js";
14
- import"./index-v76gy4dn.js";
15
- import"./index-mr02v9xp.js";
14
+ import"./index-xda7qe2j.js";
15
+ import"./index-8vv6xtm5.js";
16
16
  import"./index-j37qq1f2.js";
17
17
  import"./index-76rn3g2c.js";
18
18
  import {
19
19
  Workspace,
20
20
  command
21
- } from "./index-qch3r961.js";
22
- import"./index-n57kkvtg.js";
21
+ } from "./index-1f34snpd.js";
22
+ import"./index-w008bx1p.js";
23
23
  import"./index-f39512t6.js";
24
24
  import"./index-mxvakhsm.js";
25
25
  import"./index-xys926f2.js";
@@ -10,8 +10,8 @@ import {
10
10
  command,
11
11
  runner,
12
12
  script
13
- } from "./index-qch3r961.js";
14
- import"./index-n57kkvtg.js";
13
+ } from "./index-1f34snpd.js";
14
+ import"./index-w008bx1p.js";
15
15
  import"./index-f39512t6.js";
16
16
  import"./index-mxvakhsm.js";
17
17
  import {
@@ -309,6 +309,63 @@ const config: AppConfig = { web: false }; // api only
309
309
  reached for any of them. An app that needs one declares it in `docker.preRuns` / `docker.postRuns`, which are
310
310
  emitted around the `bun install` — that is the migration for a `puppeteer` or `ffmpeg` app.
311
311
 
312
+ ## The Process Model — Gateway And Solo
313
+
314
+ A container runs one process per replica, a gateway in front of them when there is more than one, and one RSC
315
+ worker per web-serving replica.
316
+
317
+ - **One traffic replica runs in the container's only process.** `AKAN_REPLICA=0,0,1` — the default, and what
318
+ every environment in `infra/app/values` sets — means there is nothing to balance and nothing to fan pubsub out
319
+ to, so `AkanApp` starts that replica in-process rather than spawning it. Measured on `apps/akan`: 28MB less RSS
320
+ and twice the requests per second, because every request used to cross a unix-socket proxy hop. Declare two or
321
+ more and the gateway is back, spawning and proxying them.
322
+ - **`AKAN_SOLO=false` forces the gateway** for a single replica. Like `AKAN_SSR`, the env only narrows — it
323
+ cannot fold a real gateway's replicas into one process. Passing `replica` to `new AkanApp(...)` also keeps the
324
+ gateway: code that states a topology is asking for the thing that serves it.
325
+ - **`akan start` always runs the gateway**, whatever the replica count. It is also the dev host's builder relay,
326
+ its crash page, and what holds the port across a child restart.
327
+ - **A batch-only replica (`0,1,0`) keeps the gateway too**, because a batch server never listens and the gateway
328
+ is then the only thing bound to answer `/_akan/app/health`.
329
+ - **The RSC worker is never folded in.** It runs under `--conditions react-server`, which resolves the same
330
+ module graph differently, so it cannot share a process with the server that renders client components.
331
+ - **A solo process answers `/_akan/app/health`, `/_akan/app/metrics` and `/_akan/bench/ping` itself**, in the
332
+ gateway's own shape — a `children` array with one entry — so a probe reads one contract either way. It owns the
333
+ rotating log file the gateway would otherwise write, in the same `runtime/logs` directory.
334
+ - **Nothing supervises a solo process but the orchestrator**, since the gateway's crash-restart-with-backoff went
335
+ with it. `infra/app/templates/app.yaml` carries the liveness, readiness and startup probes that replace it.
336
+ - **`main.ts` imports `AkanApp` from `akanjs/server/akanApp`, not the barrel.** The barrel re-exports
337
+ `AkanServer`, whose graph the gateway never runs; through it the process evaluated 35MB of SSR renderer and
338
+ SQLite driver to spawn children and relay bytes. Keep entrypoint imports at the leaf.
339
+
340
+ ## The Generated Image — `docker` In `akan.config.ts`
341
+
342
+ **`docker` is `string | { image, preRuns, postRuns, command }`** — a whole Dockerfile, or the parts Akan
343
+ assembles one from. There is no `content` field; the string *is* the content.
344
+
345
+ ```ts
346
+ const config: AppConfig = {
347
+ docker: { preRuns: ["apt-get update && apt-get install -y --no-install-recommends ffmpeg"] },
348
+ };
349
+ const config: AppConfig = { docker: "FROM oven/bun:1-slim\n…" }; // verbatim, nothing merged in
350
+ ```
351
+
352
+ - `image` and each run entry take `string | { amd64?, arm64? }`; the object form compiles to a
353
+ `RUN if [ "$TARGETARCH" = "<arch>" ]` guard, so a multi-arch build runs it on one leg only. `preRuns` land
354
+ before `bun install --production` (where a native dependency's build tools have to be), `postRuns` after it
355
+ and before the app files are copied.
356
+ - **A lib declares the steps its own runtime needs**, and every app that mounts it inherits them:
357
+ `libs/<lib>/akan.config.ts` takes `docker: { preRuns, postRuns }` and nothing else — the base image and the
358
+ command belong to the app. Lib steps are emitted before the app's own, and an identical step declared twice
359
+ becomes one layer.
360
+ - **The string form takes no contributions.** A Dockerfile handed over whole is used exactly as written, so a
361
+ lib's `preRuns` are dropped rather than spliced into a file Akan does not own. An app that needs both writes
362
+ the parts instead.
363
+ - Like `externalLibs`, lib steps are collected from **every lib in the workspace**, not just this app's
364
+ dependency closure — narrowing that set needs the dependency scan, and this config is re-read on every file
365
+ change in dev. Keep a lib's steps to what its runtime genuinely requires.
366
+ - `AkanAppConfig.docker` is the resolved declaration; `AkanAppConfig.dockerfile` is the text `akan build` writes
367
+ to `dist/apps/<app>/Dockerfile`.
368
+
312
369
  ## React Components And Styling (`**/*.tsx`)
313
370
 
314
371
  - Components are `export const X = ({ … }: XProps) => { return (…); };` — arrow const with a block body. `export default` is reserved for pages, layouts, and `lazy()` targets.
@@ -407,11 +464,12 @@ workflow changes.
407
464
  - Slice-level `guards` only reach the generated query/mutation endpoints. A `pubsub`/`message` endpoint is unguarded unless it declares its own `guards` in its signal option.
408
465
  - A pubsub room is authorized once, at subscribe. When a socket's credential changes the framework re-runs each room's guards and unsubscribes the ones that now fail (`SignalResolver.revalidateWsRooms`), so guards must stay side-effect free and safe to re-run.
409
466
  - A websocket carries its credential in the handshake snapshot on `ws.data` (`AppWsData`); clients that hold the token in memory send it with `fetch.setJwt(...)`, which forwards an auth frame over the socket.
410
- - **Never read the caller's IP off the socket or the request peer — take `.with(Ip)`.** Every app runs behind
411
- the federation gateway, so `ws.remoteAddress` and the child's own peer are the *gateway* (`127.0.0.1`) for
412
- every caller and for the whole life of every socket. `Ip` reads what the gateway recorded
413
- (`x-real-ip`, then the first `x-forwarded-for` entry) and falls back to the peer only when nothing proxied
414
- the call; `context.getClientIp()` is the same answer inside a guard or middleware. It arrives unwrapped from
467
+ - **Never read the caller's IP off the socket or the request peer — take `.with(Ip)`.** Whenever a federation
468
+ gateway is in front, `ws.remoteAddress` and the child's own peer are the *gateway* (`127.0.0.1`) for every
469
+ caller and for the whole life of every socket. `Ip` reads what a proxy recorded (`x-real-ip`, then the first
470
+ `x-forwarded-for` entry) and falls back to the peer only when nothing proxied the call — which is the answer
471
+ for a solo process behind an ingress that sets neither; `context.getClientIp()` is the same answer inside a
472
+ guard or middleware. It arrives unwrapped from
415
473
  its `::ffff:` IPv4-mapped form, so it can address a `udp4` socket as well as identify a caller, and it is
416
474
  `null` rather than a placeholder when genuinely unknown — a loopback-looking address for an unknown caller
417
475
  is the failure this replaced. The gateway also forwards the client port (`x-forwarded-port`, read with
@@ -16,7 +16,7 @@ import {
16
16
  import {
17
17
  AppExecutor,
18
18
  WorkspaceExecutor
19
- } from "./index-n57kkvtg.js";
19
+ } from "./index-w008bx1p.js";
20
20
  import"./index-f39512t6.js";
21
21
  import"./index-mxvakhsm.js";
22
22
  import"./index-1577bej2.js";
@@ -1,14 +1,14 @@
1
1
  // @bun
2
2
  import {
3
3
  AkanContextAnalyzer
4
- } from "./index-v76gy4dn.js";
4
+ } from "./index-xda7qe2j.js";
5
5
  import {
6
6
  Prompter
7
7
  } from "./index-j37qq1f2.js";
8
8
  import {
9
9
  runner,
10
10
  script
11
- } from "./index-qch3r961.js";
11
+ } from "./index-1f34snpd.js";
12
12
  import {
13
13
  AGENT_BLOCK_END,
14
14
  AGENT_BLOCK_START,
@@ -19,7 +19,7 @@ import {
19
19
  renderRecipeEntries,
20
20
  stampBlockVersion,
21
21
  upsertAgentBlock
22
- } from "./index-n57kkvtg.js";
22
+ } from "./index-w008bx1p.js";
23
23
  import {
24
24
  collectRecipeSources,
25
25
  scanRecipes
@@ -6,7 +6,7 @@ import {
6
6
  ModuleExecutor,
7
7
  PkgExecutor,
8
8
  WorkspaceExecutor
9
- } from "./index-n57kkvtg.js";
9
+ } from "./index-w008bx1p.js";
10
10
  import {
11
11
  getDirname
12
12
  } from "./index-1577bej2.js";
@@ -9,14 +9,14 @@ import {
9
9
  createPassedPrimitiveReport,
10
10
  generatedFilesForSync,
11
11
  scalarChangedFiles
12
- } from "./index-mr02v9xp.js";
12
+ } from "./index-8vv6xtm5.js";
13
13
  import {
14
14
  Prompter
15
15
  } from "./index-j37qq1f2.js";
16
16
  import {
17
17
  runner,
18
18
  script
19
- } from "./index-qch3r961.js";
19
+ } from "./index-1f34snpd.js";
20
20
 
21
21
  // pkgs/@akanjs/cli/scalar/scalar.prompt.ts
22
22
  import { input } from "@inquirer/prompts";
@@ -2,10 +2,10 @@
2
2
  import {
3
3
  runner,
4
4
  script
5
- } from "./index-qch3r961.js";
5
+ } from "./index-1f34snpd.js";
6
6
  import {
7
7
  PkgExecutor
8
- } from "./index-n57kkvtg.js";
8
+ } from "./index-w008bx1p.js";
9
9
  import {
10
10
  TypeScriptDependencyScanner
11
11
  } from "./index-46tjzh6s.js";
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  runner,
4
4
  script
5
- } from "./index-qch3r961.js";
5
+ } from "./index-1f34snpd.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
  AppExecutor,
4
4
  LibExecutor
5
- } from "./index-n57kkvtg.js";
5
+ } from "./index-w008bx1p.js";
6
6
 
7
7
  // pkgs/@akanjs/devkit/workflow/utils.ts
8
8
  var jsonText = (value, { trailingNewline = true } = {}) => `${JSON.stringify(value, null, 2)}${trailingNewline ? `
@@ -1,7 +1,7 @@
1
1
  // @bun
2
2
  import {
3
3
  AkanContextAnalyzer
4
- } from "./index-v76gy4dn.js";
4
+ } from "./index-xda7qe2j.js";
5
5
  import {
6
6
  WorkflowExecutor,
7
7
  compactWorkflowInputs,
@@ -23,10 +23,10 @@ import {
23
23
  workflowCommandsForPlan,
24
24
  workflowPlanApproval,
25
25
  writeWorkflowRunArtifact
26
- } from "./index-mr02v9xp.js";
26
+ } from "./index-8vv6xtm5.js";
27
27
  import {
28
28
  runner
29
- } from "./index-qch3r961.js";
29
+ } from "./index-1f34snpd.js";
30
30
 
31
31
  // pkgs/@akanjs/cli/workflow/workflow.runner.ts
32
32
  import { mkdir, readFile, writeFile } from "fs/promises";
@@ -1,7 +1,7 @@
1
1
  // @bun
2
2
  import {
3
3
  ModuleScript
4
- } from "./index-27jj517n.js";
4
+ } from "./index-d5ef8n21.js";
5
5
  import {
6
6
  addFieldUiPolicyForType,
7
7
  coerceFieldDefault,
@@ -34,15 +34,15 @@ import {
34
34
  sourceFile,
35
35
  validationCommandsForTarget,
36
36
  viaBuilderParameterName
37
- } from "./index-mr02v9xp.js";
37
+ } from "./index-8vv6xtm5.js";
38
38
  import {
39
39
  script
40
- } from "./index-qch3r961.js";
40
+ } from "./index-1f34snpd.js";
41
41
  import {
42
42
  AppExecutor,
43
43
  LibExecutor,
44
44
  ModuleExecutor
45
- } from "./index-n57kkvtg.js";
45
+ } from "./index-w008bx1p.js";
46
46
 
47
47
  // pkgs/@akanjs/cli/primitive/primitive.script.ts
48
48
  import { capitalize } from "akanjs/common";
@@ -1,14 +1,14 @@
1
1
  // @bun
2
2
  import {
3
3
  LibraryScript
4
- } from "./index-emsw8h3b.js";
4
+ } from "./index-k8k45qfk.js";
5
5
  import {
6
6
  resolveMobileTargets
7
7
  } from "./index-76rn3g2c.js";
8
8
  import {
9
9
  runner,
10
10
  script
11
- } from "./index-qch3r961.js";
11
+ } from "./index-1f34snpd.js";
12
12
  import {
13
13
  HmrWatcher,
14
14
  WatchRootResolver
@@ -18,7 +18,7 @@ import {
18
18
  LibExecutor,
19
19
  PkgExecutor,
20
20
  WorkspaceExecutor
21
- } from "./index-n57kkvtg.js";
21
+ } from "./index-w008bx1p.js";
22
22
  import {
23
23
  __require
24
24
  } from "./index-yb2wsc7f.js";
@@ -1898,9 +1898,9 @@ function openBrowser(url) {
1898
1898
  }
1899
1899
 
1900
1900
  // pkgs/@akanjs/cli/application/application.runner.ts
1901
- var loadBuildRunner = async () => (await import("./applicationBuildRunner-k6dna8sz.js")).ApplicationBuildRunner;
1901
+ var loadBuildRunner = async () => (await import("./applicationBuildRunner-jnjag4ay.js")).ApplicationBuildRunner;
1902
1902
  var loadReleasePackager = async () => (await import("./applicationReleasePackager-93nzdfsy.js")).ApplicationReleasePackager;
1903
- var loadCapacitorApp = async () => (await import("./capacitorApp-4g1s9n37.js")).CapacitorApp;
1903
+ var loadCapacitorApp = async () => (await import("./capacitorApp-w1ryppdw.js")).CapacitorApp;
1904
1904
  var loadAbstractCompactor = async () => (await import("./abstractCompactor-20e0cwbs.js")).AbstractCompactor;
1905
1905
  var loadPrompts = async () => await import("@inquirer/prompts");
1906
1906
 
@@ -1,10 +1,10 @@
1
1
  // @bun
2
2
  import {
3
3
  CloudRunner
4
- } from "./index-wm5hw5mr.js";
4
+ } from "./index-cnyeq88g.js";
5
5
  import {
6
6
  PackageScript
7
- } from "./index-j35ceh2c.js";
7
+ } from "./index-6s8snbb8.js";
8
8
  import {
9
9
  AiSession,
10
10
  CloudApi,
@@ -12,13 +12,13 @@ import {
12
12
  } from "./index-sh01r3pm.js";
13
13
  import {
14
14
  ApplicationScript
15
- } from "./index-m285dkby.js";
15
+ } from "./index-a6k0b1b5.js";
16
16
  import {
17
17
  script
18
- } from "./index-qch3r961.js";
18
+ } from "./index-1f34snpd.js";
19
19
  import {
20
20
  PkgExecutor
21
- } from "./index-n57kkvtg.js";
21
+ } from "./index-w008bx1p.js";
22
22
 
23
23
  // pkgs/@akanjs/cli/cloud/cloud.script.ts
24
24
  import { Logger } from "akanjs/common";
@@ -7,14 +7,14 @@ import {
7
7
  } from "./index-sh01r3pm.js";
8
8
  import {
9
9
  openBrowser
10
- } from "./index-m285dkby.js";
10
+ } from "./index-a6k0b1b5.js";
11
11
  import {
12
12
  runner
13
- } from "./index-qch3r961.js";
13
+ } from "./index-1f34snpd.js";
14
14
  import {
15
15
  AppExecutor,
16
16
  WorkspaceExecutor
17
- } from "./index-n57kkvtg.js";
17
+ } from "./index-w008bx1p.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-ss469dec.js";
5
5
  import {
6
6
  PageScript
7
- } from "./index-4etexq7j.js";
7
+ } from "./index-7kxz2z5t.js";
8
8
  import {
9
9
  AiSession
10
10
  } from "./index-sh01r3pm.js";
@@ -15,17 +15,17 @@ import {
15
15
  generatedFilesForSync,
16
16
  moduleSourcePaths,
17
17
  sourceFile
18
- } from "./index-mr02v9xp.js";
18
+ } from "./index-8vv6xtm5.js";
19
19
  import {
20
20
  Prompter
21
21
  } from "./index-j37qq1f2.js";
22
22
  import {
23
23
  runner,
24
24
  script
25
- } from "./index-qch3r961.js";
25
+ } from "./index-1f34snpd.js";
26
26
  import {
27
27
  ModuleExecutor
28
- } from "./index-n57kkvtg.js";
28
+ } from "./index-w008bx1p.js";
29
29
  import {
30
30
  FileSys
31
31
  } from "./index-67546d0j.js";
@@ -1,22 +1,22 @@
1
1
  // @bun
2
2
  import {
3
3
  RepairRunner
4
- } from "./index-4sgv0wcr.js";
4
+ } from "./index-hpbf1b1e.js";
5
5
  import {
6
6
  WorkflowRunner
7
- } from "./index-ejr3h3wc.js";
7
+ } from "./index-8xeg8ehr.js";
8
8
  import {
9
9
  ScalarScript
10
- } from "./index-rm7xj6bc.js";
10
+ } from "./index-639mgtfm.js";
11
11
  import {
12
12
  PrimitiveScript
13
- } from "./index-rzekxec9.js";
13
+ } from "./index-9ppq2sx0.js";
14
14
  import {
15
15
  ModuleScript
16
- } from "./index-27jj517n.js";
16
+ } from "./index-d5ef8n21.js";
17
17
  import {
18
18
  isPlaceholderAppId
19
- } from "./index-cwa0jvjt.js";
19
+ } from "./index-jbhecvr9.js";
20
20
  import {
21
21
  AkanContextAnalyzer,
22
22
  akanMcpInstallConfigPaths,
@@ -27,14 +27,14 @@ import {
27
27
  renderDoctorText,
28
28
  resourceList,
29
29
  upsertCodexMcpServerBlock
30
- } from "./index-v76gy4dn.js";
30
+ } from "./index-xda7qe2j.js";
31
31
  import {
32
32
  buildAkanModuleContextIndex,
33
33
  createWorkflowBaselineSummary,
34
34
  createWorkflowStepRegistry,
35
35
  jsonText,
36
36
  toolingRolloutGate
37
- } from "./index-mr02v9xp.js";
37
+ } from "./index-8vv6xtm5.js";
38
38
  import {
39
39
  Prompter
40
40
  } from "./index-j37qq1f2.js";
@@ -45,10 +45,10 @@ import {
45
45
  CommandContainer,
46
46
  runner,
47
47
  script
48
- } from "./index-qch3r961.js";
48
+ } from "./index-1f34snpd.js";
49
49
  import {
50
50
  AppExecutor
51
- } from "./index-n57kkvtg.js";
51
+ } from "./index-w008bx1p.js";
52
52
 
53
53
  // pkgs/@akanjs/cli/context/context.script.ts
54
54
  import { Logger } from "akanjs/common";
@@ -1,17 +1,17 @@
1
1
  // @bun
2
2
  import {
3
3
  AkanContextAnalyzer
4
- } from "./index-v76gy4dn.js";
4
+ } from "./index-xda7qe2j.js";
5
5
  import {
6
6
  createRepairReport,
7
7
  generatedFilePathsForTarget,
8
8
  renderRepairReport,
9
9
  writeGeneratedSyncState,
10
10
  writeWorkflowRunArtifact
11
- } from "./index-mr02v9xp.js";
11
+ } from "./index-8vv6xtm5.js";
12
12
  import {
13
13
  runner
14
- } from "./index-qch3r961.js";
14
+ } from "./index-1f34snpd.js";
15
15
 
16
16
  // pkgs/@akanjs/cli/repair/repair.runner.ts
17
17
  var commandForShell = (command) => command.startsWith("akan ") ? `bun run ${command}` : command;
@@ -5,7 +5,7 @@ import {
5
5
  } from "./index-76rn3g2c.js";
6
6
  import {
7
7
  CommandExecutionError
8
- } from "./index-n57kkvtg.js";
8
+ } from "./index-w008bx1p.js";
9
9
 
10
10
  // pkgs/@akanjs/devkit/capacitorApp.ts
11
11
  import { cp, mkdir, readFile, rm, writeFile } from "fs/promises";
@@ -2,10 +2,10 @@
2
2
  import {
3
3
  runner,
4
4
  script
5
- } from "./index-qch3r961.js";
5
+ } from "./index-1f34snpd.js";
6
6
  import {
7
7
  LibExecutor
8
- } from "./index-n57kkvtg.js";
8
+ } from "./index-w008bx1p.js";
9
9
 
10
10
  // pkgs/@akanjs/cli/semver.ts
11
11
  var stripRangeOperator = (version) => version.replace(/^[\s^~>=<v]+/, "").trim();
@@ -224,6 +224,7 @@ var DEFAULT_OPTIMIZE_IMPORTS = [
224
224
  "react-icons/*"
225
225
  ];
226
226
  var WORKSPACE_BARREL_FACETS = ["ui", "webkit", "common", "client", "server"];
227
+ var DEFAULT_DOCKER_IMAGE = "oven/bun:1-slim";
227
228
  var SSR_RUNTIME_PACKAGES = ["react", "react-dom", "react-server-dom-webpack"];
228
229
  var MOBILE_RUNTIME_PACKAGES = [
229
230
  "@capacitor/cli",
@@ -314,11 +315,22 @@ var normalizeDeepLinks = (deepLinks) => {
314
315
  ...sha256CertFingerprints ? { android: { sha256CertFingerprints } } : {}
315
316
  };
316
317
  };
318
+ var emptyLibContributions = () => ({
319
+ externalLibs: [],
320
+ docker: { preRuns: [], postRuns: [] }
321
+ });
322
+ var dedupeDockerRuns = (runs) => {
323
+ const byKey = new Map;
324
+ for (const run of runs)
325
+ byKey.set(typeof run === "string" ? run : JSON.stringify(run), run);
326
+ return [...byKey.values()];
327
+ };
317
328
 
318
329
  class AkanAppConfig {
319
330
  app;
320
331
  rootPackageJson;
321
332
  docker;
333
+ dockerfile;
322
334
  defaultDatabaseMode;
323
335
  web;
324
336
  externalLibs;
@@ -338,7 +350,7 @@ class AkanAppConfig {
338
350
  subRoutes = new Map;
339
351
  basePaths = new Set;
340
352
  branches = new Set(["debug", "develop", "main"]);
341
- constructor(app, libs, rootPackageJson, config, baseDevEnv, plugins = [], libExternalLibs = []) {
353
+ constructor(app, libs, rootPackageJson, config, baseDevEnv, plugins = [], libContributions = emptyLibContributions()) {
342
354
  this.app = app;
343
355
  this.rootPackageJson = rootPackageJson;
344
356
  this.libs = libs;
@@ -346,7 +358,7 @@ class AkanAppConfig {
346
358
  this.plugins = plugins;
347
359
  this.#applyRoutes(config?.routes);
348
360
  this.defaultDatabaseMode = config?.defaultDatabaseMode ?? "single";
349
- this.externalLibs = [...new Set([...config?.externalLibs ?? [], ...libExternalLibs])];
361
+ this.externalLibs = [...new Set([...config?.externalLibs ?? [], ...libContributions.externalLibs])];
350
362
  this.barrelImports = [
351
363
  ...DEFAULT_BARREL_IMPORTS,
352
364
  ...WORKSPACE_BARREL_FACETS.map((facet) => `@apps/${app.name}/${facet}`),
@@ -364,7 +376,8 @@ class AkanAppConfig {
364
376
  this.hasMobileConfig = Boolean(config.mobile);
365
377
  this.mobile = this.#resolveMobileConfig(config.mobile);
366
378
  this.web = this.#resolveWebConfig(config.web);
367
- this.docker = this.#makeDockerContent(config?.docker ?? {});
379
+ this.docker = AkanAppConfig.#resolveDocker(config.docker, libContributions.docker);
380
+ this.dockerfile = this.#makeDockerfile();
368
381
  }
369
382
  #resolveWebConfig(web) {
370
383
  const resolved = typeof web === "object" ? { ssr: true, csr: web.csr } : { ssr: web ?? true, csr: web ?? true };
@@ -480,25 +493,29 @@ class AkanAppConfig {
480
493
  return archs.map((arch) => `FROM ${image[arch] ?? defaultImage} AS ${arch}`).join(`
481
494
  `);
482
495
  }
483
- #makeDockerContent(docker) {
484
- if (docker.content)
485
- return {
486
- content: docker.content,
487
- image: {},
488
- preRuns: [],
489
- postRuns: [],
490
- command: []
491
- };
492
- const preRunScripts = this.#getDockerRunScripts(docker.preRuns ?? []);
493
- const postRunScripts = this.#getDockerRunScripts(docker.postRuns ?? []);
494
- const imageScript = docker.image ? this.#getDockerImageScript(docker.image, "oven/bun:1-slim") : "FROM oven/bun:1-slim";
495
- const command = docker.command ?? ["bun", "main.js"];
496
+ static #resolveDocker(docker, libDocker) {
497
+ if (typeof docker === "string")
498
+ return docker;
499
+ return {
500
+ image: docker?.image ?? DEFAULT_DOCKER_IMAGE,
501
+ preRuns: dedupeDockerRuns([...libDocker.preRuns, ...docker?.preRuns ?? []]),
502
+ postRuns: dedupeDockerRuns([...libDocker.postRuns, ...docker?.postRuns ?? []]),
503
+ command: docker?.command ?? ["bun", "main.js"]
504
+ };
505
+ }
506
+ #makeDockerfile() {
507
+ if (typeof this.docker === "string")
508
+ return this.docker;
509
+ const { image, preRuns, postRuns, command } = this.docker;
510
+ const preRunScripts = this.#getDockerRunScripts(preRuns);
511
+ const postRunScripts = this.#getDockerRunScripts(postRuns);
512
+ const imageScript = this.#getDockerImageScript(image, DEFAULT_DOCKER_IMAGE);
496
513
  const webEnvLines = [
497
514
  ...this.web.ssr ? [] : ["ENV AKAN_SSR=false"],
498
515
  ...this.web.csr ? [] : ["ENV AKAN_CSR=false"]
499
516
  ].join(`
500
517
  `);
501
- const content = `${imageScript}
518
+ return `${imageScript}
502
519
  RUN apt-get update && apt-get upgrade -y && apt-get install -y --no-install-recommends ca-certificates tzdata && rm -rf /var/lib/apt/lists/*
503
520
  RUN ln -sf /usr/share/zoneinfo/Asia/Seoul /etc/localtime
504
521
  ARG TARGETARCH
@@ -523,13 +540,6 @@ ENV AKAN_PUBLIC_LOCALES=${this.i18n.locales.join(",")}
523
540
  ENV AKAN_PUBLIC_OPERATION_MODE=cloud
524
541
  ${webEnvLines}
525
542
  CMD [${command.map((c) => `"${c}"`).join(",")}]`;
526
- return {
527
- content,
528
- image: imageScript,
529
- preRuns: docker.preRuns ?? [],
530
- postRuns: docker.postRuns ?? [],
531
- command
532
- };
533
543
  }
534
544
  static #importGeneration = 0;
535
545
  static async importConfigModule(cwdPath, { bustImportCache = false } = {}) {
@@ -546,15 +556,21 @@ CMD [${command.map((c) => `"${c}"`).join(",")}]`;
546
556
  ]);
547
557
  const resolved = typeof configImp === "function" ? configImp(app) : configImp;
548
558
  const { plugins, ...config } = resolved ?? {};
549
- const libExternalLibs = await AkanAppConfig.#collectLibExternalLibs(app, libs, bustImportCache);
550
- return new AkanAppConfig(app, libs, rootPackageJson, config, baseDevEnv, plugins ?? [], libExternalLibs);
559
+ const libContributions = await AkanAppConfig.#collectLibContributions(app, libs, bustImportCache);
560
+ return new AkanAppConfig(app, libs, rootPackageJson, config, baseDevEnv, plugins ?? [], libContributions);
551
561
  }
552
- static async#collectLibExternalLibs(app, libs, bustImportCache) {
562
+ static async#collectLibContributions(app, libs, bustImportCache) {
553
563
  const libConfigs = await Promise.all(libs.map(async (libName) => LibExecutor.from(app, libName).getConfig({ refresh: bustImportCache }).catch((error) => {
554
- app.logger.warn(`Skipped libs/${libName}/akan.config.ts externalLibs: ${String(error)}`);
564
+ app.logger.warn(`Skipped libs/${libName}/akan.config.ts contributions: ${String(error)}`);
555
565
  return null;
556
566
  })));
557
- return libConfigs.flatMap((libConfig) => libConfig?.externalLibs ?? []);
567
+ return {
568
+ externalLibs: libConfigs.flatMap((libConfig) => libConfig?.externalLibs ?? []),
569
+ docker: {
570
+ preRuns: libConfigs.flatMap((libConfig) => libConfig?.docker.preRuns ?? []),
571
+ postRuns: libConfigs.flatMap((libConfig) => libConfig?.docker.postRuns ?? [])
572
+ }
573
+ };
558
574
  }
559
575
  #resolveProductionDependencyVersion(lib) {
560
576
  const rootVersion = this.rootPackageJson.dependencies?.[lib] ?? this.rootPackageJson.devDependencies?.[lib];
@@ -652,10 +668,12 @@ function mergeImageConfig(config = {}) {
652
668
  class AkanLibConfig {
653
669
  lib;
654
670
  externalLibs;
671
+ docker;
655
672
  plugins;
656
673
  constructor(lib, config, plugins = []) {
657
674
  this.lib = lib;
658
675
  this.externalLibs = config?.externalLibs ?? [];
676
+ this.docker = { preRuns: config?.docker?.preRuns ?? [], postRuns: config?.docker?.postRuns ?? [] };
659
677
  this.plugins = plugins;
660
678
  }
661
679
  static async from(lib, { bustImportCache = false } = {}) {
@@ -1303,12 +1321,11 @@ class ScanInfo {
1303
1321
  })
1304
1322
  ]);
1305
1323
  const routes = exec.type === "lib" ? [] : await exec.getPageKeys();
1306
- const scanResult = {
1324
+ const common = {
1307
1325
  name: exec.name,
1308
1326
  type: exec.type,
1309
1327
  repoName: exec.workspace.repoName,
1310
1328
  serveDomain: WorkspaceExecutor.getBaseDevEnv(path4.join(exec.workspace.workspaceRoot, ".env")).serveDomain,
1311
- akanConfig: akanConfig2,
1312
1329
  files,
1313
1330
  libDeps,
1314
1331
  pkgDeps,
@@ -1316,6 +1333,7 @@ class ScanInfo {
1316
1333
  devDependencies: npmDevDeps.filter((dep) => !isAkanFrameworkDependency(dep)),
1317
1334
  routes
1318
1335
  };
1336
+ const scanResult = akanConfig2 instanceof AkanAppConfig ? { ...common, akanConfig: akanConfig2 } : { ...common, akanConfig: akanConfig2 };
1319
1337
  return scanResult;
1320
1338
  }
1321
1339
  constructor(scanResult) {
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  workflowRunArtifactPath,
4
4
  workflowSyncDir
5
- } from "./index-mr02v9xp.js";
5
+ } from "./index-8vv6xtm5.js";
6
6
  import {
7
7
  AppExecutor,
8
8
  LibExecutor,
@@ -11,7 +11,7 @@ import {
11
11
  readDevkitVersion,
12
12
  rootAllowedDirs,
13
13
  rootAllowedFiles
14
- } from "./index-n57kkvtg.js";
14
+ } from "./index-w008bx1p.js";
15
15
  import {
16
16
  collectRecipeSources,
17
17
  findInlineRecipeDuplicates,
package/index.js CHANGED
@@ -4,8 +4,8 @@ import {
4
4
  getTargetCommandNames,
5
5
  getTargetMetas,
6
6
  runCommands
7
- } from "./index-qch3r961.js";
8
- import"./index-n57kkvtg.js";
7
+ } from "./index-1f34snpd.js";
8
+ import"./index-w008bx1p.js";
9
9
  import"./index-f39512t6.js";
10
10
  import"./index-mxvakhsm.js";
11
11
  import"./index-1577bej2.js";
@@ -19,22 +19,22 @@ import path from "path";
19
19
 
20
20
  // pkgs/@akanjs/cli/commandModules.ts
21
21
  var commandModules = {
22
- workspace: async () => (await import("./workspace.command-2pfnrhmw.js")).WorkspaceCommand,
23
- agent: async () => (await import("./agent.command-99yaptk3.js")).AgentCommand,
24
- application: async () => (await import("./application.command-77nxchr4.js")).ApplicationCommand,
25
- library: async () => (await import("./library.command-2b20rx36.js")).LibraryCommand,
26
- localRegistry: async () => (await import("./localRegistry.command-tdn3373t.js")).LocalRegistryCommand,
27
- package: async () => (await import("./package.command-dcdya2hn.js")).PackageCommand,
28
- module: async () => (await import("./module.command-ez5psv7q.js")).ModuleCommand,
29
- page: async () => (await import("./page.command-he49r0vd.js")).PageCommand,
30
- context: async () => (await import("./context.command-a0pwgc3v.js")).ContextCommand,
31
- cloud: async () => (await import("./cloud.command-gegy1qxv.js")).CloudCommand,
32
- guideline: async () => (await import("./guideline.command-83p3y9w7.js")).GuidelineCommand,
33
- scalar: async () => (await import("./scalar.command-q4ravcd9.js")).ScalarCommand,
34
- primitive: async () => (await import("./primitive.command-w2hyrf9c.js")).PrimitiveCommand,
35
- quality: async () => (await import("./quality.command-8xewbve2.js")).QualityCommand,
36
- repair: async () => (await import("./repair.command-9f9wy32e.js")).RepairCommand,
37
- workflow: async () => (await import("./workflow.command-3stj54ek.js")).WorkflowCommand
22
+ workspace: async () => (await import("./workspace.command-q17atzha.js")).WorkspaceCommand,
23
+ agent: async () => (await import("./agent.command-7vr15vkn.js")).AgentCommand,
24
+ application: async () => (await import("./application.command-nrq6qvkh.js")).ApplicationCommand,
25
+ library: async () => (await import("./library.command-afjd6ex4.js")).LibraryCommand,
26
+ localRegistry: async () => (await import("./localRegistry.command-6zadvx6z.js")).LocalRegistryCommand,
27
+ package: async () => (await import("./package.command-g4s1y1wn.js")).PackageCommand,
28
+ module: async () => (await import("./module.command-rh01pbz3.js")).ModuleCommand,
29
+ page: async () => (await import("./page.command-9bw6sz1r.js")).PageCommand,
30
+ context: async () => (await import("./context.command-xbsgta4f.js")).ContextCommand,
31
+ cloud: async () => (await import("./cloud.command-crwf7emx.js")).CloudCommand,
32
+ guideline: async () => (await import("./guideline.command-mm19n009.js")).GuidelineCommand,
33
+ scalar: async () => (await import("./scalar.command-t0akqh1r.js")).ScalarCommand,
34
+ primitive: async () => (await import("./primitive.command-pg1j3gm3.js")).PrimitiveCommand,
35
+ quality: async () => (await import("./quality.command-rt1z7je9.js")).QualityCommand,
36
+ repair: async () => (await import("./repair.command-pg54yhgc.js")).RepairCommand,
37
+ workflow: async () => (await import("./workflow.command-se886yew.js")).WorkflowCommand
38
38
  };
39
39
  var commandModuleIds = Object.keys(commandModules);
40
40
 
@@ -1,13 +1,13 @@
1
1
  // @bun
2
2
  import {
3
3
  LibraryScript
4
- } from "./index-emsw8h3b.js";
4
+ } from "./index-k8k45qfk.js";
5
5
  import {
6
6
  Lib,
7
7
  Workspace,
8
8
  command
9
- } from "./index-qch3r961.js";
10
- import"./index-n57kkvtg.js";
9
+ } from "./index-1f34snpd.js";
10
+ import"./index-w008bx1p.js";
11
11
  import"./index-f39512t6.js";
12
12
  import"./index-mxvakhsm.js";
13
13
  import"./index-1577bej2.js";
@@ -2,27 +2,27 @@
2
2
  import {
3
3
  CloudRunner,
4
4
  getNpmRegistryUrl
5
- } from "./index-wm5hw5mr.js";
5
+ } from "./index-cnyeq88g.js";
6
6
  import {
7
7
  PackageScript
8
- } from "./index-j35ceh2c.js";
8
+ } from "./index-6s8snbb8.js";
9
9
  import"./index-sh01r3pm.js";
10
10
  import {
11
11
  ApplicationScript
12
- } from "./index-m285dkby.js";
13
- import"./index-emsw8h3b.js";
12
+ } from "./index-a6k0b1b5.js";
13
+ import"./index-k8k45qfk.js";
14
14
  import"./index-76rn3g2c.js";
15
15
  import {
16
16
  Workspace,
17
17
  command,
18
18
  runner,
19
19
  script
20
- } from "./index-qch3r961.js";
20
+ } from "./index-1f34snpd.js";
21
21
  import"./index-fgc8r6dj.js";
22
22
  import"./index-5vy2jzar.js";
23
23
  import {
24
24
  PkgExecutor
25
- } from "./index-n57kkvtg.js";
25
+ } from "./index-w008bx1p.js";
26
26
  import"./index-f39512t6.js";
27
27
  import"./index-mxvakhsm.js";
28
28
  import"./index-1577bej2.js";
@@ -1,20 +1,20 @@
1
1
  // @bun
2
2
  import {
3
3
  ModuleScript
4
- } from "./index-27jj517n.js";
4
+ } from "./index-d5ef8n21.js";
5
5
  import"./index-ss469dec.js";
6
- import"./index-4etexq7j.js";
6
+ import"./index-7kxz2z5t.js";
7
7
  import"./index-sh01r3pm.js";
8
8
  import {
9
9
  renderPrimitiveReport
10
- } from "./index-mr02v9xp.js";
10
+ } from "./index-8vv6xtm5.js";
11
11
  import"./index-j37qq1f2.js";
12
12
  import {
13
13
  Module,
14
14
  Sys,
15
15
  command
16
- } from "./index-qch3r961.js";
17
- import"./index-n57kkvtg.js";
16
+ } from "./index-1f34snpd.js";
17
+ import"./index-w008bx1p.js";
18
18
  import"./index-f39512t6.js";
19
19
  import"./index-mxvakhsm.js";
20
20
  import"./index-1577bej2.js";
@@ -1,13 +1,13 @@
1
1
  // @bun
2
2
  import {
3
3
  PackageScript
4
- } from "./index-j35ceh2c.js";
4
+ } from "./index-6s8snbb8.js";
5
5
  import {
6
6
  Pkg,
7
7
  Workspace,
8
8
  command
9
- } from "./index-qch3r961.js";
10
- import"./index-n57kkvtg.js";
9
+ } from "./index-1f34snpd.js";
10
+ import"./index-w008bx1p.js";
11
11
  import"./index-f39512t6.js";
12
12
  import"./index-mxvakhsm.js";
13
13
  import"./index-1577bej2.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@akanjs/cli",
3
- "version": "3.0.0-alpha.65",
3
+ "version": "3.0.0-alpha.66",
4
4
  "sourceType": "module",
5
5
  "type": "module",
6
6
  "publishConfig": {
@@ -34,7 +34,7 @@
34
34
  "@langchain/openai": "^1.4.6",
35
35
  "@tailwindcss/node": "^4.3.0",
36
36
  "@trapezedev/project": "^7.1.4",
37
- "akanjs": "3.0.0-alpha.65",
37
+ "akanjs": "3.0.0-alpha.66",
38
38
  "chalk": "^5.6.2",
39
39
  "commander": "^14.0.3",
40
40
  "dayjs": "^1.11.20",
@@ -1,13 +1,13 @@
1
1
  // @bun
2
2
  import {
3
3
  PageScript
4
- } from "./index-4etexq7j.js";
4
+ } from "./index-7kxz2z5t.js";
5
5
  import {
6
6
  App,
7
7
  Module,
8
8
  command
9
- } from "./index-qch3r961.js";
10
- import"./index-n57kkvtg.js";
9
+ } from "./index-1f34snpd.js";
10
+ import"./index-w008bx1p.js";
11
11
  import"./index-f39512t6.js";
12
12
  import"./index-mxvakhsm.js";
13
13
  import"./index-1577bej2.js";
@@ -1,20 +1,20 @@
1
1
  // @bun
2
2
  import {
3
3
  PrimitiveScript
4
- } from "./index-rzekxec9.js";
5
- import"./index-27jj517n.js";
4
+ } from "./index-9ppq2sx0.js";
5
+ import"./index-d5ef8n21.js";
6
6
  import"./index-ss469dec.js";
7
- import"./index-4etexq7j.js";
7
+ import"./index-7kxz2z5t.js";
8
8
  import"./index-sh01r3pm.js";
9
9
  import {
10
10
  renderPrimitiveReport
11
- } from "./index-mr02v9xp.js";
11
+ } from "./index-8vv6xtm5.js";
12
12
  import"./index-j37qq1f2.js";
13
13
  import {
14
14
  Workspace,
15
15
  command
16
- } from "./index-qch3r961.js";
17
- import"./index-n57kkvtg.js";
16
+ } from "./index-1f34snpd.js";
17
+ import"./index-w008bx1p.js";
18
18
  import"./index-f39512t6.js";
19
19
  import"./index-mxvakhsm.js";
20
20
  import"./index-1577bej2.js";
@@ -7,12 +7,12 @@ import {
7
7
  command,
8
8
  runner,
9
9
  script
10
- } from "./index-qch3r961.js";
10
+ } from "./index-1f34snpd.js";
11
11
  import {
12
12
  isAllowedLibFacetRootFile,
13
13
  rootAllowedDirs,
14
14
  rootAllowedFiles
15
- } from "./index-n57kkvtg.js";
15
+ } from "./index-w008bx1p.js";
16
16
  import"./index-f39512t6.js";
17
17
  import"./index-mxvakhsm.js";
18
18
  import"./index-1577bej2.js";
@@ -1,15 +1,15 @@
1
1
  // @bun
2
2
  import {
3
3
  RepairRunner
4
- } from "./index-4sgv0wcr.js";
5
- import"./index-v76gy4dn.js";
6
- import"./index-mr02v9xp.js";
4
+ } from "./index-hpbf1b1e.js";
5
+ import"./index-xda7qe2j.js";
6
+ import"./index-8vv6xtm5.js";
7
7
  import {
8
8
  Workspace,
9
9
  command,
10
10
  script
11
- } from "./index-qch3r961.js";
12
- import"./index-n57kkvtg.js";
11
+ } from "./index-1f34snpd.js";
12
+ import"./index-w008bx1p.js";
13
13
  import"./index-f39512t6.js";
14
14
  import"./index-mxvakhsm.js";
15
15
  import"./index-xys926f2.js";
@@ -1,18 +1,18 @@
1
1
  // @bun
2
2
  import {
3
3
  ScalarScript
4
- } from "./index-rm7xj6bc.js";
4
+ } from "./index-639mgtfm.js";
5
5
  import"./index-ss469dec.js";
6
6
  import"./index-sh01r3pm.js";
7
7
  import {
8
8
  renderPrimitiveReport
9
- } from "./index-mr02v9xp.js";
9
+ } from "./index-8vv6xtm5.js";
10
10
  import"./index-j37qq1f2.js";
11
11
  import {
12
12
  Sys,
13
13
  command
14
- } from "./index-qch3r961.js";
15
- import"./index-n57kkvtg.js";
14
+ } from "./index-1f34snpd.js";
15
+ import"./index-w008bx1p.js";
16
16
  import"./index-f39512t6.js";
17
17
  import"./index-mxvakhsm.js";
18
18
  import"./index-1577bej2.js";
@@ -5,7 +5,9 @@ interface Dict {
5
5
  }
6
6
  export default function getContent(scanInfo: AppInfo | LibInfo | null, dict: Dict) {
7
7
  return `
8
- import { AkanApp } from "akanjs/server";
8
+ // Not the \`akanjs/server\` barrel: it re-exports AkanServer, whose graph the gateway never runs. Through the
9
+ // barrel this process evaluates 35MB of SSR renderer and DB driver to spawn children and relay bytes.
10
+ import { AkanApp } from "akanjs/server/akanApp";
9
11
 
10
12
  const run = async () => {
11
13
  await new AkanApp().start();
@@ -1,30 +1,30 @@
1
1
  // @bun
2
2
  import {
3
3
  WorkflowRunner
4
- } from "./index-ejr3h3wc.js";
4
+ } from "./index-8xeg8ehr.js";
5
5
  import {
6
6
  ScalarScript
7
- } from "./index-rm7xj6bc.js";
7
+ } from "./index-639mgtfm.js";
8
8
  import {
9
9
  PrimitiveScript
10
- } from "./index-rzekxec9.js";
10
+ } from "./index-9ppq2sx0.js";
11
11
  import {
12
12
  ModuleScript
13
- } from "./index-27jj517n.js";
13
+ } from "./index-d5ef8n21.js";
14
14
  import"./index-ss469dec.js";
15
- import"./index-4etexq7j.js";
15
+ import"./index-7kxz2z5t.js";
16
16
  import"./index-sh01r3pm.js";
17
- import"./index-v76gy4dn.js";
17
+ import"./index-xda7qe2j.js";
18
18
  import {
19
19
  createWorkflowStepRegistry
20
- } from "./index-mr02v9xp.js";
20
+ } from "./index-8vv6xtm5.js";
21
21
  import"./index-j37qq1f2.js";
22
22
  import {
23
23
  Workspace,
24
24
  command,
25
25
  script
26
- } from "./index-qch3r961.js";
27
- import"./index-n57kkvtg.js";
26
+ } from "./index-1f34snpd.js";
27
+ import"./index-w008bx1p.js";
28
28
  import"./index-f39512t6.js";
29
29
  import"./index-mxvakhsm.js";
30
30
  import"./index-xys926f2.js";
@@ -1,40 +1,40 @@
1
1
  // @bun
2
2
  import {
3
3
  ContextScript
4
- } from "./index-1t5r09v4.js";
5
- import"./index-4sgv0wcr.js";
6
- import"./index-ejr3h3wc.js";
7
- import"./index-rm7xj6bc.js";
8
- import"./index-rzekxec9.js";
9
- import"./index-27jj517n.js";
4
+ } from "./index-gkg6e6cx.js";
5
+ import"./index-hpbf1b1e.js";
6
+ import"./index-8xeg8ehr.js";
7
+ import"./index-639mgtfm.js";
8
+ import"./index-9ppq2sx0.js";
9
+ import"./index-d5ef8n21.js";
10
10
  import"./index-ss469dec.js";
11
- import"./index-4etexq7j.js";
11
+ import"./index-7kxz2z5t.js";
12
12
  import {
13
13
  CloudScript
14
- } from "./index-db89awmp.js";
14
+ } from "./index-bzthvy50.js";
15
15
  import {
16
16
  getLatestPackageVersion,
17
17
  getNpmRegistryUrl
18
- } from "./index-wm5hw5mr.js";
18
+ } from "./index-cnyeq88g.js";
19
19
  import {
20
20
  PackageScript
21
- } from "./index-j35ceh2c.js";
22
- import"./index-cwa0jvjt.js";
21
+ } from "./index-6s8snbb8.js";
22
+ import"./index-jbhecvr9.js";
23
23
  import {
24
24
  GlobalConfig
25
25
  } from "./index-sh01r3pm.js";
26
26
  import {
27
27
  AgentScript
28
- } from "./index-wxc9p0n0.js";
29
- import"./index-v76gy4dn.js";
30
- import"./index-mr02v9xp.js";
28
+ } from "./index-0jn016vv.js";
29
+ import"./index-xda7qe2j.js";
30
+ import"./index-8vv6xtm5.js";
31
31
  import"./index-j37qq1f2.js";
32
32
  import {
33
33
  ApplicationScript
34
- } from "./index-m285dkby.js";
34
+ } from "./index-a6k0b1b5.js";
35
35
  import {
36
36
  LibraryScript
37
- } from "./index-emsw8h3b.js";
37
+ } from "./index-k8k45qfk.js";
38
38
  import"./index-76rn3g2c.js";
39
39
  import {
40
40
  Exec,
@@ -42,7 +42,7 @@ import {
42
42
  command,
43
43
  runner,
44
44
  script
45
- } from "./index-qch3r961.js";
45
+ } from "./index-1f34snpd.js";
46
46
  import"./index-fgc8r6dj.js";
47
47
  import {
48
48
  ThemeValidator,
@@ -59,7 +59,7 @@ import {
59
59
  collectScopeRecipeSources,
60
60
  extractAgentBlock,
61
61
  renderScopeAgentBlock
62
- } from "./index-n57kkvtg.js";
62
+ } from "./index-w008bx1p.js";
63
63
  import"./index-f39512t6.js";
64
64
  import"./index-mxvakhsm.js";
65
65
  import {