@akanjs/cli 3.0.0-beta.27 → 3.0.0-beta.29

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 (63) hide show
  1. package/.build-stamp +1 -1
  2. package/{CodeAgent-h19atbr3.js → CodeAgent-86q8d13j.js} +2 -2
  3. package/{CodeTui-46zygq8p.js → CodeTui-r8tgxsyb.js} +1 -1
  4. package/{agent.command-rp505zxa.js → agent.command-q9bmqrag.js} +5 -5
  5. package/akanCode.js +2 -2
  6. package/{application.command-1p0cpt6y.js → application.command-712jd2z8.js} +70 -8
  7. package/{applicationBuildRunner-r6b9rkb8.js → applicationBuildRunner-ez37p161.js} +67 -22
  8. package/buildBatch.proc.js +3 -3
  9. package/{cloud.command-ps9dabbg.js → cloud.command-8eegwcsc.js} +9 -9
  10. package/cloud.script-55s1cmz9.js +20 -0
  11. package/{code.command-78qw3q3f.js → code.command-n0c2tyzx.js} +6 -6
  12. package/commandManifest.json +1 -1
  13. package/{context.command-x5f7t3gk.js → context.command-vxf6d7q2.js} +13 -13
  14. package/context.runner-70r2fmty.js +21 -0
  15. package/{guideline.command-d5qmxx29.js → guideline.command-ene55fkr.js} +2 -2
  16. package/guidelines/conventions/conventions.instruction.md +27 -7
  17. package/guidelines/runtimeRule/runtimeRule.instruction.md +116 -1
  18. package/incrementalBuilder.proc.js +2 -2
  19. package/{index-hzy4pe24.js → index-0pqzrbpr.js} +2 -2
  20. package/{index-w5pet0nq.js → index-16k7m3cs.js} +11 -9
  21. package/index-1hs6jrys.js +994 -0
  22. package/{index-6dt6zft6.js → index-20r2g1t3.js} +4 -4
  23. package/{index-xfgdmm5d.js → index-2ctqegdm.js} +2 -2
  24. package/{index-d65fzxvd.js → index-2s2e5qnd.js} +1 -1
  25. package/{index-j9z8vg2n.js → index-2yvy9ztj.js} +4 -4
  26. package/{index-t02g6dpn.js → index-2z30v4k5.js} +3 -3
  27. package/{index-vxqe24mp.js → index-8ej6r02m.js} +1 -1
  28. package/{index-58cyna2s.js → index-b68zfsvz.js} +1 -1
  29. package/{index-bp9b1g2r.js → index-fy42hyb9.js} +7 -3
  30. package/{index-tg09x14f.js → index-g44da4r2.js} +5 -5
  31. package/{index-zazvn45w.js → index-genegfnt.js} +4 -4
  32. package/{index-da72pfdv.js → index-h9ed99ax.js} +7 -7
  33. package/{index-per2kqy9.js → index-k7809wmg.js} +2 -2
  34. package/{index-2zcm7fjd.js → index-krwz9ek9.js} +3 -3
  35. package/{index-118vq9dh.js → index-n9gxx7bp.js} +247 -47
  36. package/{index-860zjnr1.js → index-nbg9bfnr.js} +1 -1
  37. package/{index-5mm3g24t.js → index-qtz88kh0.js} +2 -2
  38. package/{index-0n9q1f23.js → index-r8gp8zk3.js} +231 -98
  39. package/{index-ggfhz9ab.js → index-rbeahw6j.js} +3 -3
  40. package/{index-56xwsgyn.js → index-rrt9pnb4.js} +2 -2
  41. package/{index-v4hnkqz9.js → index-ss828r32.js} +1 -1
  42. package/{index-5kjsr2pg.js → index-ttn00pr3.js} +38 -3
  43. package/index.js +21 -21
  44. package/{library.command-sv6g1h2g.js → library.command-tz7vnwea.js} +3 -3
  45. package/{localRegistry.command-zppa6w7q.js → localRegistry.command-7dd85czz.js} +8 -8
  46. package/{module.command-ccdeder9.js → module.command-qhc9ns0s.js} +5 -5
  47. package/{package.command-xmw605b1.js → package.command-z3epnvas.js} +3 -3
  48. package/package.json +3 -3
  49. package/{page.command-ky7vafsn.js → page.command-exd2vakz.js} +3 -3
  50. package/{primitive.command-bh6j8nfs.js → primitive.command-0w6cha4j.js} +6 -6
  51. package/{quality.command-rqqrpe98.js → quality.command-je4kc9yv.js} +2 -2
  52. package/{repair.command-n9nsm9qe.js → repair.command-knvwfgtg.js} +5 -5
  53. package/{scalar.command-t09gmck8.js → scalar.command-60nxfchc.js} +4 -4
  54. package/{subspace.command-gx2cjpnv.js → subspace.command-683qxcw9.js} +4 -4
  55. package/templates/server.ts +1 -1
  56. package/{tunnel.command-4g95vhsn.js → tunnel.command-7m2kxtat.js} +2 -2
  57. package/{workflow.command-b91ph8sx.js → workflow.command-j5tk13ds.js} +10 -10
  58. package/{workspace.command-1r29qzzk.js → workspace.command-jxdm0wrb.js} +20 -20
  59. package/README.ko.md +0 -72
  60. package/README.md +0 -88
  61. package/cloud.script-wrw1kz6k.js +0 -20
  62. package/context.runner-nfs8ksh3.js +0 -21
  63. package/index-y736f42m.js +0 -556
package/.build-stamp CHANGED
@@ -1 +1 @@
1
- 137343070b8b77c5504673de077f386f6ebb2d0432d15afa82b8ce9c822710a2
1
+ 17c8586a89cd04b60d3d62ff58838eecd420ba14c959958abb0d7baf5bd6628c
@@ -1,8 +1,8 @@
1
1
  // @bun
2
2
  import {
3
3
  CodeAgent2
4
- } from "./index-2zcm7fjd.js";
5
- import"./index-vxqe24mp.js";
4
+ } from "./index-krwz9ek9.js";
5
+ import"./index-8ej6r02m.js";
6
6
  import"./index-7md2g9vw.js";
7
7
  export {
8
8
  CodeAgent2 as CodeAgent
@@ -4,7 +4,7 @@ import {
4
4
  McpServerConfig,
5
5
  McpTokenStore,
6
6
  McpSignIn
7
- } from "./index-vxqe24mp.js";
7
+ } from "./index-8ej6r02m.js";
8
8
  import {
9
9
  CodeTuiLines2,
10
10
  CodeTuiAgents2,
@@ -2,16 +2,16 @@
2
2
  import {
3
3
  Workspace,
4
4
  command
5
- } from "./index-58cyna2s.js";
5
+ } from "./index-b68zfsvz.js";
6
6
  import"./index-52w0fvh8.js";
7
- import"./index-0n9q1f23.js";
7
+ import"./index-r8gp8zk3.js";
8
8
  import"./index-hj6w4ka1.js";
9
- import"./index-d65fzxvd.js";
10
- import"./index-hzy4pe24.js";
9
+ import"./index-2s2e5qnd.js";
10
+ import"./index-0pqzrbpr.js";
11
11
  import"./index-zzvvc845.js";
12
12
  import {
13
13
  AgentScript
14
- } from "./index-ggfhz9ab.js";
14
+ } from "./index-rbeahw6j.js";
15
15
 
16
16
  // pkgs/@akanjs/cli/agent/agent.command.ts
17
17
  class AgentCommand extends command("agent", [AgentScript], ({ public: target }) => ({
package/akanCode.js CHANGED
@@ -28,7 +28,7 @@ import {
28
28
  CodeMailbox2,
29
29
  CodeSessionFork2,
30
30
  CodeAgent2
31
- } from "./index-2zcm7fjd.js";
31
+ } from "./index-krwz9ek9.js";
32
32
  import {
33
33
  akanCodeDefaultModel2,
34
34
  akanCodeModel2,
@@ -39,7 +39,7 @@ import {
39
39
  import {
40
40
  SubagentPool2,
41
41
  akanCodePaths2
42
- } from "./index-vxqe24mp.js";
42
+ } from "./index-8ej6r02m.js";
43
43
  import"./index-7md2g9vw.js";
44
44
  import {
45
45
  CodeAgentRpcHost2
@@ -6,19 +6,19 @@ import {
6
6
  Exec,
7
7
  Workspace,
8
8
  command
9
- } from "./index-58cyna2s.js";
9
+ } from "./index-b68zfsvz.js";
10
10
  import"./index-52w0fvh8.js";
11
- import"./index-0n9q1f23.js";
11
+ import"./index-r8gp8zk3.js";
12
12
  import {
13
13
  getMobileTargetChoices
14
- } from "./index-y736f42m.js";
14
+ } from "./index-1hs6jrys.js";
15
15
  import"./index-48k96p55.js";
16
- import"./index-5mm3g24t.js";
16
+ import"./index-qtz88kh0.js";
17
17
  import {
18
18
  ApplicationScript
19
- } from "./index-118vq9dh.js";
19
+ } from "./index-n9gxx7bp.js";
20
20
  import"./index-7md2g9vw.js";
21
- import"./index-860zjnr1.js";
21
+ import"./index-nbg9bfnr.js";
22
22
 
23
23
  // pkgs/@akanjs/cli/application/application.command.ts
24
24
  var mobileTargetOption = {
@@ -33,7 +33,11 @@ var deviceOption = {
33
33
  var teamOption = { flag: "T", desc: "Apple team id the signing is narrowed to", default: "" };
34
34
  var devEnvs = ["local", "debug", "develop", "main"];
35
35
  var buildEnvOption = { enum: devEnvs, desc: "backend environment", default: "debug" };
36
- var startEnvOption = { enum: devEnvs, desc: "backend environment", default: "local" };
36
+ var startEnvOption = {
37
+ enum: devEnvs,
38
+ desc: "backend environment of a --release build; a dev build follows `akan start`, which keeps its own",
39
+ default: "local"
40
+ };
37
41
  var releaseEnvOption = {
38
42
  enum: ["debug", "develop", "main", "local"],
39
43
  desc: "backend environment",
@@ -104,6 +108,18 @@ class ApplicationCommand extends command("application", [ApplicationScript], ({
104
108
  buildAndroid: target({ short: true, desc: "Build the Android app (apk) on the native runtime" }).with(App).option("target", String, mobileTargetOption).option("env", String, buildEnvOption).option("debug", Boolean, { desc: "debug build instead of release", default: false }).option("write", Boolean, { desc: "write code generation", default: true }).exec(async function(app, target, env, debug, write) {
105
109
  await this.applicationScript.buildAndroid(app, { target, env, profile: debug ? "debug" : "release", write });
106
110
  }),
111
+ buildDesktop: target({ short: true, desc: "Build the desktop app for this computer (macOS, Windows or Linux)" }).with(App).option("target", String, mobileTargetOption).option("env", String, buildEnvOption).option("debug", Boolean, { desc: "debug build instead of release", default: false }).option("installer", Boolean, {
112
+ desc: "Windows: also an NSIS setup program (per user, /S for a silent install)",
113
+ default: false
114
+ }).option("write", Boolean, { desc: "write code generation", default: true }).exec(async function(app, target, env, debug, installer, write) {
115
+ await this.applicationScript.buildDesktop(app, {
116
+ target,
117
+ env,
118
+ profile: debug ? "debug" : "release",
119
+ installer,
120
+ write
121
+ });
122
+ }),
107
123
  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, {
108
124
  desc: "apps to boot at a time (default: what this machine's memory and cores allow)",
109
125
  nullable: true
@@ -136,7 +152,12 @@ class ApplicationCommand extends command("application", [ApplicationScript], ({
136
152
  short: true,
137
153
  desc: "Run the desktop app on this computer (macOS, Windows or Linux), following `akan start`"
138
154
  }).with(App).option("target", String, mobileTargetOption).option("env", String, startEnvOption).option("release", Boolean, { desc: "run a release build of its own bundle instead", default: false }).option("write", Boolean, { desc: "write code generation", default: true }).exec(async function(app, target, env, release, write) {
139
- await this.applicationScript.startDesktop(app, { target, env, operation: release ? "release" : "local", write });
155
+ await this.applicationScript.startDesktop(app, {
156
+ target,
157
+ env,
158
+ operation: release ? "release" : "local",
159
+ write
160
+ });
140
161
  }),
141
162
  releaseIos: target({ desc: "Build and sign the iOS app for the App Store (.ipa)" }).with(App).option("target", String, mobileTargetOption).option("env", String, releaseEnvOption).option("team", String, teamOption).option("adHoc", Boolean, { desc: "sign with an ad-hoc profile instead of app-store", default: false }).option("write", Boolean, { desc: "write code generation", default: true }).option("allowLocalRelease", Boolean, { flag: "l", desc: "allow release with --env local", default: false }).exec(async function(app, target, env, team, adHoc, write, allowLocalRelease) {
142
163
  await this.applicationScript.releaseIos(app, {
@@ -156,6 +177,47 @@ class ApplicationCommand extends command("application", [ApplicationScript], ({
156
177
  allowLocalRelease
157
178
  });
158
179
  }),
180
+ packUpdate: target({
181
+ desc: "Pack an unsigned over-the-air update of the mobile web bundle, for the signer to publish"
182
+ }).with(App).option("platform", String, { enum: ["ios", "android"], desc: "the app it updates" }).option("target", String, mobileTargetOption).option("env", String, releaseEnvOption).option("out", String, {
183
+ desc: "output folder (default: .akan/mobile/<target>/updates/<platform>)",
184
+ nullable: true
185
+ }).option("against", String, {
186
+ desc: "bundle.json of the store build it must run in; fails when it needs a new one",
187
+ nullable: true
188
+ }).option("write", Boolean, { desc: "write code generation", default: true }).option("allowLocalRelease", Boolean, { flag: "l", desc: "allow packing with --env local", default: false }).exec(async function(app, platform, target, env, out, against, write, allowLocalRelease) {
189
+ await this.applicationScript.packUpdate(app, platform, {
190
+ target,
191
+ env,
192
+ out: out ?? undefined,
193
+ against: against ?? undefined,
194
+ write,
195
+ allowLocalRelease
196
+ });
197
+ }),
198
+ updateKeygen: target({ desc: "Make (once) the key an app's update releases are signed with; print its public key" }).with(App).option("platform", String, {
199
+ enum: ["desktop", "android", "ios"],
200
+ default: "desktop",
201
+ desc: "the platform whose app id the key signs for (an appId may differ per platform)"
202
+ }).option("target", String, mobileTargetOption).exec(async function(app, platform, target) {
203
+ await this.applicationScript.updateKeygen(app, platform, { target });
204
+ }),
205
+ publishUpdate: target({ desc: "Build and sign an update release installed apps take (desktop, android or ios)" }).with(App).option("platform", String, {
206
+ enum: ["desktop", "android", "ios"],
207
+ default: "desktop",
208
+ desc: "desktop is this computer's OS and CPU; android and ios publish the web bundle"
209
+ }).option("target", String, mobileTargetOption).option("env", String, releaseEnvOption).option("channel", String, {
210
+ desc: "the manifest to publish to (default: the target's updates.channel, else --env)",
211
+ nullable: true
212
+ }).option("write", Boolean, { desc: "write code generation", default: true }).option("allowLocalRelease", Boolean, { flag: "l", desc: "allow release with --env local", default: false }).exec(async function(app, platform, target, env, channel, write, allowLocalRelease) {
213
+ await this.applicationScript.publishUpdate(app, platform, {
214
+ target,
215
+ env,
216
+ ...channel ? { channel } : {},
217
+ write,
218
+ allowLocalRelease
219
+ });
220
+ }),
159
221
  dbup: target({ desc: "Start local database services for a database mode" }).with(Workspace).option("mode", String, {
160
222
  desc: "database mode; left out, every mode the workspace's apps declare",
161
223
  enum: ["single", "multiple", "cluster"],
@@ -1,21 +1,55 @@
1
1
  // @bun
2
2
  import {
3
3
  Spinner
4
- } from "./index-0n9q1f23.js";
5
- import"./index-5kjsr2pg.js";
4
+ } from "./index-r8gp8zk3.js";
5
+ import"./index-ttn00pr3.js";
6
6
  import {
7
7
  AllRoutesBuilder,
8
8
  CsrArtifactBuilder,
9
9
  FontPruner,
10
10
  precompressArtifacts,
11
11
  SsrBaseArtifactBuilder
12
- } from "./index-bp9b1g2r.js";
12
+ } from "./index-fy42hyb9.js";
13
13
  import"./index-52w0fvh8.js";
14
14
  import"./index-n68jx79w.js";
15
15
 
16
16
  // pkgs/@akanjs/devkit/applicationBuildRunner.ts
17
17
  import { mkdir, rm } from "fs/promises";
18
+ import path2 from "path";
19
+
20
+ // pkgs/@akanjs/devkit/transforms/serverEnvPlugin.ts
21
+ import { existsSync, realpathSync } from "fs";
18
22
  import path from "path";
23
+ var escapeRegExp = (value) => value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
24
+ var createServerEnvPlugin = ({ envDir, environment, environments }) => {
25
+ const others = [...new Set(environments)].filter((name) => name !== environment);
26
+ const dirs = new Set([path.resolve(envDir), existsSync(envDir) ? realpathSync.native(envDir) : envDir]);
27
+ const names = others.map(escapeRegExp).join("|");
28
+ const filter = new RegExp(`^(?:${[...dirs].map(escapeRegExp).join("|")})[\\\\/]env\\.server\\.(?:${names})\\.ts$`);
29
+ return {
30
+ name: "akan-server-env",
31
+ setup(build) {
32
+ if (!others.length)
33
+ return;
34
+ build.onLoad({ filter }, async (args) => {
35
+ const name = path.basename(args.path, ".ts").slice("env.server.".length);
36
+ const { exports } = new Bun.Transpiler({ loader: "ts" }).scan(await Bun.file(args.path).text());
37
+ const message = `env/env.server.${name}.ts is not in this build: \`akan build\` bundles the server env of AKAN_PUBLIC_ENV=${environment} alone, the environment its image runs. To run ${name}, build for it: AKAN_PUBLIC_ENV=${name} in the workspace's .env, which outranks the shell, or --env ${name} on a desktop or mobile build.`;
38
+ return {
39
+ loader: "js",
40
+ contents: [
41
+ `const refuse = () => { throw new Error(${JSON.stringify(message)}); };`,
42
+ "const unbuilt = new Proxy({}, { get: refuse, has: refuse, ownKeys: refuse, getOwnPropertyDescriptor: refuse });",
43
+ `export { ${exports.map((exported) => `unbuilt as ${JSON.stringify(exported)}`).join(", ")} };`
44
+ ].join(`
45
+ `)
46
+ };
47
+ });
48
+ }
49
+ };
50
+ };
51
+
52
+ // pkgs/@akanjs/devkit/applicationBuildRunner.ts
19
53
  var BUILD_PHASE_EMOJIS = {
20
54
  prepare: "\uD83E\uDDF9",
21
55
  typecheck: "\uD83D\uDD0E",
@@ -50,13 +84,15 @@ class ApplicationBuildRunner {
50
84
  #app;
51
85
  #fast;
52
86
  #reporter;
87
+ #environment;
53
88
  #spinner;
54
89
  #startedAt = Date.now();
55
90
  #phases = [];
56
- constructor(app, { fast = false, reporter } = {}) {
91
+ constructor(app, { fast = false, reporter, environment } = {}) {
57
92
  this.#app = app;
58
93
  this.#fast = fast;
59
94
  this.#reporter = reporter;
95
+ this.#environment = environment;
60
96
  }
61
97
  async build({ spinner = false } = {}) {
62
98
  this.#spinner = spinner;
@@ -69,12 +105,12 @@ class ApplicationBuildRunner {
69
105
  await this.#runPhase("csr", "Building CSR assets", async () => web.csr ? await new CsrArtifactBuilder(this.#app, "build").build() : null, (result) => result?.outputDir ?? (web.csr ? "skipped" : "disabled by akan.config.ts web.csr"));
70
106
  await this.#runPhase("assets", "Trimming unread static assets", async () => assets.pruneFonts ? await new FontPruner(this.#app, assets).prune() : null, (result) => result ? `${result.removed.length} font file(s) dropped, ${ApplicationBuildRunner.formatBytes(result.freedBytes)} freed; ${result.kept.length} kept` : "disabled by akan.config.ts assets.pruneFonts");
71
107
  await this.#runPhase("compress", "Compressing static assets", () => precompressArtifacts(this.#app), (result) => result.files > 0 ? `${result.files} files, ${ApplicationBuildRunner.formatBytes(result.inputBytes)} -> gzip ${ApplicationBuildRunner.formatBytes(result.outputBytes)} / br ${ApplicationBuildRunner.formatBytes(result.brotliBytes)}` : "no files");
72
- await this.#runPhase("metadata", "Writing production metadata", () => this.#buildAppMeta());
108
+ await this.#runPhase("metadata", "Writing production metadata", () => this.buildAppMeta());
73
109
  return {
74
110
  phases: this.#phases,
75
111
  durationMs: Date.now() - this.#startedAt,
76
112
  outputDir: this.#app.dist.cwdPath,
77
- artifactDir: path.join(this.#app.dist.cwdPath, ".akan/artifact")
113
+ artifactDir: path2.join(this.#app.dist.cwdPath, ".akan/artifact")
78
114
  };
79
115
  }
80
116
  async typecheck(options = {}) {
@@ -82,7 +118,7 @@ class ApplicationBuildRunner {
82
118
  await this.#app.getPageKeys({ refresh: true });
83
119
  const { typecheckDir, tsconfigPath } = await this.#writeTypecheckTsconfig(incremental);
84
120
  if (clean)
85
- await rm(path.join(typecheckDir, "tsconfig.tsbuildinfo"), { force: true });
121
+ await rm(path2.join(typecheckDir, "tsconfig.tsbuildinfo"), { force: true });
86
122
  await this.#checkProjectInChildProcess(tsconfigPath);
87
123
  }
88
124
  async#runPhase(id, label, task, summarize) {
@@ -102,11 +138,12 @@ class ApplicationBuildRunner {
102
138
  throw error;
103
139
  }
104
140
  }
105
- async#buildAppMeta() {
141
+ async buildAppMeta() {
106
142
  const akanConfig = await this.#app.getConfig();
143
+ const dockerfile = akanConfig.dockerfileFor(this.#environment ?? akanConfig.baseDevEnv.env);
107
144
  await Promise.all([
108
145
  this.#app.dist.writeJson("package.json", akanConfig.getProductionPackageJson()),
109
- this.#app.dist.writeFile(`${this.#app.dist.cwdPath}/Dockerfile`, akanConfig.dockerfile),
146
+ this.#app.dist.writeFile(`${this.#app.dist.cwdPath}/Dockerfile`, dockerfile),
110
147
  this.#app.dist.writeJson("akan.build.json", {
111
148
  buildId: await this.#resolveBuildId(),
112
149
  akanVersion: akanConfig.akanVersion,
@@ -130,7 +167,7 @@ class ApplicationBuildRunner {
130
167
  return `${sha.stdout.toString().trim()}${suffix}`;
131
168
  }
132
169
  async#buildBackend() {
133
- const { externalLibs, web } = await this.#app.getConfig();
170
+ const { externalLibs, web, baseDevEnv, branches } = await this.#app.getConfig();
134
171
  const backendEntryPoints = [`${this.#app.cwdPath}/main.ts`, `${this.#app.cwdPath}/server.ts`];
135
172
  for (const entrypoint of backendEntryPoints) {
136
173
  if (!await Bun.file(entrypoint).exists())
@@ -143,7 +180,15 @@ class ApplicationBuildRunner {
143
180
  naming: { entry: "[name].[ext]", chunk: "chunk-[hash].[ext]" },
144
181
  define: { "process.env.NODE_ENV": JSON.stringify("production") }
145
182
  };
146
- const backendConfig = { ...sharedConfig, plugins: [this.#createExternalSpecifiersPlugin(externalLibs)] };
183
+ const serverEnvPlugin = createServerEnvPlugin({
184
+ envDir: path2.join(this.#app.cwdPath, "env"),
185
+ environment: this.#environment ?? baseDevEnv.env,
186
+ environments: ["local", "testing", ...branches]
187
+ });
188
+ const backendConfig = {
189
+ ...sharedConfig,
190
+ plugins: [this.#createExternalSpecifiersPlugin(externalLibs), serverEnvPlugin]
191
+ };
147
192
  const [mainResult, serverResult] = [
148
193
  await this.#buildOrThrow("backend", { ...backendConfig, entrypoints: [backendEntryPoints[0]] }),
149
194
  await this.#buildOrThrow("backend", { ...backendConfig, entrypoints: [backendEntryPoints[1]], splitting: true })
@@ -166,7 +211,7 @@ class ApplicationBuildRunner {
166
211
  };
167
212
  }
168
213
  async#writeConsoleShim() {
169
- await Bun.write(path.join(this.#app.dist.cwdPath, "console.js"), `process.env.AKAN_COMMAND_TYPE = "console";
214
+ await Bun.write(path2.join(this.#app.dist.cwdPath, "console.js"), `process.env.AKAN_COMMAND_TYPE = "console";
170
215
  const { cnst, db, dict, option, server, sig, srv } = await import("./server.js");
171
216
  const { assertAkanConsoleAllowed, startAkanConsole } = await import("./console-runtime.js");
172
217
 
@@ -190,14 +235,14 @@ void run().catch((error) => {
190
235
  try {
191
236
  return Bun.resolveSync("akanjs/server/rsc-worker", import.meta.dir);
192
237
  } catch {
193
- return path.join(this.#app.workspace.workspaceRoot, "pkgs/akanjs/server/rscWorker.tsx");
238
+ return path2.join(this.#app.workspace.workspaceRoot, "pkgs/akanjs/server/rscWorker.tsx");
194
239
  }
195
240
  }
196
241
  #resolveConsoleRuntimeBuildEntry() {
197
242
  try {
198
- return path.join(path.dirname(Bun.resolveSync("akanjs/server", import.meta.dir)), "console.ts");
243
+ return path2.join(path2.dirname(Bun.resolveSync("akanjs/server", import.meta.dir)), "console.ts");
199
244
  } catch {
200
- return path.join(this.#app.workspace.workspaceRoot, "pkgs/akanjs/server/console.ts");
245
+ return path2.join(this.#app.workspace.workspaceRoot, "pkgs/akanjs/server/console.ts");
201
246
  }
202
247
  }
203
248
  async#buildSsr() {
@@ -211,10 +256,10 @@ void run().catch((error) => {
211
256
  return { base, allRoutes };
212
257
  }
213
258
  async#writeTypecheckTsconfig(incremental) {
214
- const typecheckDir = path.join(this.#app.cwdPath, ".akan", "typecheck");
259
+ const typecheckDir = path2.join(this.#app.cwdPath, ".akan", "typecheck");
215
260
  await mkdir(typecheckDir, { recursive: true });
216
261
  const libPageIncludes = (await this.#app.getPageRoots()).filter((root) => root.keyPrefix).flatMap((root) => {
217
- const rel = path.relative(typecheckDir, root.realDir).split(path.sep).join("/");
262
+ const rel = path2.relative(typecheckDir, root.realDir).split(path2.sep).join("/");
218
263
  return [`${rel}/**/*.ts`, `${rel}/**/*.tsx`];
219
264
  });
220
265
  const tsconfig = {
@@ -235,7 +280,7 @@ void run().catch((error) => {
235
280
  ],
236
281
  references: []
237
282
  };
238
- const tsconfigPath = path.join(typecheckDir, "tsconfig.json");
283
+ const tsconfigPath = path2.join(typecheckDir, "tsconfig.json");
239
284
  await Bun.write(tsconfigPath, `${JSON.stringify(tsconfig, null, 2)}
240
285
  `);
241
286
  return { typecheckDir, tsconfigPath };
@@ -261,10 +306,10 @@ void run().catch((error) => {
261
306
  }
262
307
  async#resolveTypecheckWorkerEntry() {
263
308
  const candidates = [
264
- path.join(this.#app.workspace.workspaceRoot, "pkgs/@akanjs/devkit/typecheck/typecheck.proc.ts"),
265
- path.join(this.#app.workspace.workspaceRoot, "node_modules/@akanjs/devkit/typecheck/typecheck.proc.ts"),
266
- path.join(import.meta.dir, "typecheck.proc.js"),
267
- path.join(import.meta.dir, "typecheck.proc.ts")
309
+ path2.join(this.#app.workspace.workspaceRoot, "pkgs/@akanjs/devkit/typecheck/typecheck.proc.ts"),
310
+ path2.join(this.#app.workspace.workspaceRoot, "node_modules/@akanjs/devkit/typecheck/typecheck.proc.ts"),
311
+ path2.join(import.meta.dir, "typecheck.proc.js"),
312
+ path2.join(import.meta.dir, "typecheck.proc.ts")
268
313
  ];
269
314
  for (const candidate of candidates)
270
315
  if (await Bun.file(candidate).exists())
@@ -6,7 +6,7 @@ import {
6
6
  resolveSsrPageEntriesForApp,
7
7
  WorkspaceExecutor,
8
8
  AppExecutor
9
- } from "./index-0n9q1f23.js";
9
+ } from "./index-r8gp8zk3.js";
10
10
  import {
11
11
  computeRouteSeedIndex,
12
12
  saveRouteSeedIndex,
@@ -14,14 +14,14 @@ import {
14
14
  PagesBundleBuilder,
15
15
  CsrDevBundler,
16
16
  SsrDevBundler
17
- } from "./index-5kjsr2pg.js";
17
+ } from "./index-ttn00pr3.js";
18
18
  import"./index-52w0fvh8.js";
19
19
  import {
20
20
  CsrArtifactBuilder,
21
21
  CssCompiler,
22
22
  FontOptimizer,
23
23
  SsrBaseArtifactBuilder
24
- } from "./index-bp9b1g2r.js";
24
+ } from "./index-fy42hyb9.js";
25
25
  import"./index-n68jx79w.js";
26
26
 
27
27
  // pkgs/@akanjs/devkit/incrementalBuilder/buildBatch.proc.ts
@@ -6,22 +6,22 @@ import {
6
6
  import {
7
7
  Workspace,
8
8
  command
9
- } from "./index-58cyna2s.js";
10
- import"./index-0n9q1f23.js";
9
+ } from "./index-b68zfsvz.js";
10
+ import"./index-r8gp8zk3.js";
11
11
  import {
12
12
  PlatformTestRun
13
- } from "./index-56xwsgyn.js";
13
+ } from "./index-rrt9pnb4.js";
14
14
  import"./index-48k96p55.js";
15
- import"./index-5mm3g24t.js";
16
- import"./index-118vq9dh.js";
17
- import"./index-y736f42m.js";
15
+ import"./index-1hs6jrys.js";
16
+ import"./index-qtz88kh0.js";
17
+ import"./index-n9gxx7bp.js";
18
18
  import"./index-7md2g9vw.js";
19
19
  import"./index-2ahj896a.js";
20
- import"./index-per2kqy9.js";
20
+ import"./index-k7809wmg.js";
21
21
  import {
22
22
  CloudScript2
23
- } from "./index-tg09x14f.js";
24
- import"./index-860zjnr1.js";
23
+ } from "./index-g44da4r2.js";
24
+ import"./index-nbg9bfnr.js";
25
25
 
26
26
  // pkgs/@akanjs/cli/cloud/cloud.command.ts
27
27
  var localRegistryUrl = () => process.env.AKAN_NPM_REGISTRY ?? "http://127.0.0.1:4873";
@@ -0,0 +1,20 @@
1
+ // @bun
2
+ import {
3
+ CloudScript2
4
+ } from "./index-g44da4r2.js";
5
+ import"./index-rrt9pnb4.js";
6
+ import"./index-k7809wmg.js";
7
+ import"./index-n9gxx7bp.js";
8
+ import"./index-nbg9bfnr.js";
9
+ import"./index-qtz88kh0.js";
10
+ import"./index-1hs6jrys.js";
11
+ import"./index-94s080qm.js";
12
+ import"./index-b68zfsvz.js";
13
+ import"./index-7md2g9vw.js";
14
+ import"./index-48k96p55.js";
15
+ import"./index-r8gp8zk3.js";
16
+ import"./index-2ahj896a.js";
17
+ import"./index-52w0fvh8.js";
18
+ export {
19
+ CloudScript2 as CloudScript
20
+ };
@@ -4,9 +4,9 @@ import {
4
4
  runner,
5
5
  script,
6
6
  command
7
- } from "./index-58cyna2s.js";
7
+ } from "./index-b68zfsvz.js";
8
8
  import"./index-52w0fvh8.js";
9
- import"./index-0n9q1f23.js";
9
+ import"./index-r8gp8zk3.js";
10
10
  import {
11
11
  akanCodeDefaultModel2,
12
12
  CodeAgentStreamPrinter2
@@ -19,7 +19,7 @@ class CodeRunner extends runner("code") {
19
19
  async serve(options, listen) {
20
20
  await import("./consoleToStderr-h5bryj94.js");
21
21
  const [{ CodeAgent }, { CodeAgentRpcHost }, { CodeAgentRpcListener }] = await Promise.all([
22
- import("./CodeAgent-h19atbr3.js"),
22
+ import("./CodeAgent-86q8d13j.js"),
23
23
  import("./CodeAgentRpcHost-p7h6n2hp.js"),
24
24
  import("./CodeAgentRpcListener-7p7z5dd7.js")
25
25
  ]);
@@ -34,8 +34,8 @@ class CodeRunner extends runner("code") {
34
34
  }
35
35
  async tui(options, seed) {
36
36
  const [{ CodeAgent }, { CodeTui }] = await Promise.all([
37
- import("./CodeAgent-h19atbr3.js"),
38
- import("./CodeTui-46zygq8p.js")
37
+ import("./CodeAgent-86q8d13j.js"),
38
+ import("./CodeTui-r8tgxsyb.js")
39
39
  ]);
40
40
  const agentOptions = await CodeRunner.#agentOptions(options, false);
41
41
  let resume = options.resume;
@@ -60,7 +60,7 @@ class CodeRunner extends runner("code") {
60
60
  }
61
61
  }
62
62
  async run(prompt, options) {
63
- const { CodeAgent } = await import("./CodeAgent-h19atbr3.js");
63
+ const { CodeAgent } = await import("./CodeAgent-86q8d13j.js");
64
64
  const agent = await CodeAgent.create(await CodeRunner.#agentOptions(options, false));
65
65
  const printer = new CodeAgentStreamPrinter2({ json: options.json, thinking: options.thinking });
66
66
  agent.on((event) => printer.print(event));
@@ -1 +1 @@
1
- {"byCommand":{"create-workspace":"workspace","generate-agent-rules":"workspace","lint":"workspace","lint-all":"workspace","sync-all":"workspace","init":"workspace","agent":"agent","code":"code","create-application":"application","remove-application":"application","plan-slice":"application","sync":"application","script":"application","console":"application","logs":"application","build":"application","b":"application","typecheck":"application","t":"application","test":"application","build-ios":"application","bi":"application","build-android":"application","ba":"application","start":"application","s":"application","start-ios":"application","si":"application","start-android":"application","sa":"application","start-desktop":"application","sd":"application","release-ios":"application","release-android":"application","dbup":"application","db-export":"application","db-import":"application","dbdown":"application","create-library":"library","remove-library":"library","sync-library":"library","library-status":"library","install-library":"library","start-registry":"localRegistry","reset-registry":"localRegistry","smoke-registry":"localRegistry","version":"package","create-package":"package","remove-package":"package","sync-package":"package","build-package":"package","verify-dist-package":"package","verify-akan-publish-packages":"package","create-module":"module","remove-module":"module","create-service":"module","create-view":"module","create-unit":"module","create-template":"module","create-crud-page":"page","context":"context","doctor":"context","mcp-install":"context","mcp":"context","mcp-call":"context","login":"cloud","logout":"cloud","deploy-akan":"cloud","test-platforms":"cloud","update":"cloud","download-env":"cloud","upload-env":"cloud","subspace":"subspace","guideline":"guideline","create-scalar":"scalar","remove-scalar":"scalar","create-ui":"primitive","add-field":"primitive","add-enum-field":"primitive","quality":"quality","repair":"repair","workflow":"workflow","tunnel":"tunnel"}}
1
+ {"byCommand":{"create-workspace":"workspace","generate-agent-rules":"workspace","lint":"workspace","lint-all":"workspace","sync-all":"workspace","init":"workspace","agent":"agent","code":"code","create-application":"application","remove-application":"application","plan-slice":"application","sync":"application","script":"application","console":"application","logs":"application","build":"application","b":"application","typecheck":"application","t":"application","test":"application","build-ios":"application","bi":"application","build-android":"application","ba":"application","build-desktop":"application","bd":"application","start":"application","s":"application","start-ios":"application","si":"application","start-android":"application","sa":"application","start-desktop":"application","sd":"application","release-ios":"application","release-android":"application","pack-update":"application","update-keygen":"application","publish-update":"application","dbup":"application","db-export":"application","db-import":"application","dbdown":"application","create-library":"library","remove-library":"library","sync-library":"library","library-status":"library","install-library":"library","start-registry":"localRegistry","reset-registry":"localRegistry","smoke-registry":"localRegistry","version":"package","create-package":"package","remove-package":"package","sync-package":"package","build-package":"package","verify-dist-package":"package","verify-akan-publish-packages":"package","create-module":"module","remove-module":"module","create-service":"module","create-view":"module","create-unit":"module","create-template":"module","create-crud-page":"page","context":"context","doctor":"context","mcp-install":"context","mcp":"context","mcp-call":"context","login":"cloud","logout":"cloud","deploy-akan":"cloud","test-platforms":"cloud","update":"cloud","download-env":"cloud","upload-env":"cloud","subspace":"subspace","guideline":"guideline","create-scalar":"scalar","remove-scalar":"scalar","create-ui":"primitive","add-field":"primitive","add-enum-field":"primitive","quality":"quality","repair":"repair","workflow":"workflow","tunnel":"tunnel"}}
@@ -2,24 +2,24 @@
2
2
  import {
3
3
  Workspace,
4
4
  command
5
- } from "./index-58cyna2s.js";
5
+ } from "./index-b68zfsvz.js";
6
6
  import"./index-52w0fvh8.js";
7
- import"./index-0n9q1f23.js";
7
+ import"./index-r8gp8zk3.js";
8
8
  import"./index-hj6w4ka1.js";
9
- import"./index-d65fzxvd.js";
10
- import"./index-hzy4pe24.js";
11
- import"./index-w5pet0nq.js";
12
- import"./index-y736f42m.js";
9
+ import"./index-2s2e5qnd.js";
10
+ import"./index-0pqzrbpr.js";
11
+ import"./index-16k7m3cs.js";
12
+ import"./index-1hs6jrys.js";
13
13
  import"./index-zzvvc845.js";
14
- import"./index-t02g6dpn.js";
15
- import"./index-v4hnkqz9.js";
16
- import"./index-zazvn45w.js";
17
- import"./index-6dt6zft6.js";
18
- import"./index-xfgdmm5d.js";
19
- import"./index-da72pfdv.js";
14
+ import"./index-2z30v4k5.js";
15
+ import"./index-ss828r32.js";
16
+ import"./index-genegfnt.js";
17
+ import"./index-20r2g1t3.js";
18
+ import"./index-2ctqegdm.js";
19
+ import"./index-h9ed99ax.js";
20
20
  import {
21
21
  ContextScript
22
- } from "./index-j9z8vg2n.js";
22
+ } from "./index-2yvy9ztj.js";
23
23
 
24
24
  // pkgs/@akanjs/cli/context/context.command.ts
25
25
  class ContextCommand extends command("context", [ContextScript], ({ public: target }) => ({
@@ -0,0 +1,21 @@
1
+ // @bun
2
+ import {
3
+ ContextRunner2
4
+ } from "./index-16k7m3cs.js";
5
+ import"./index-h9ed99ax.js";
6
+ import"./index-2ctqegdm.js";
7
+ import"./index-20r2g1t3.js";
8
+ import"./index-2z30v4k5.js";
9
+ import"./index-genegfnt.js";
10
+ import"./index-ss828r32.js";
11
+ import"./index-1hs6jrys.js";
12
+ import"./index-0pqzrbpr.js";
13
+ import"./index-2s2e5qnd.js";
14
+ import"./index-zzvvc845.js";
15
+ import"./index-b68zfsvz.js";
16
+ import"./index-r8gp8zk3.js";
17
+ import"./index-hj6w4ka1.js";
18
+ import"./index-52w0fvh8.js";
19
+ export {
20
+ ContextRunner2 as ContextRunner
21
+ };
@@ -2,9 +2,9 @@
2
2
  import {
3
3
  script,
4
4
  command
5
- } from "./index-58cyna2s.js";
5
+ } from "./index-b68zfsvz.js";
6
6
  import"./index-52w0fvh8.js";
7
- import"./index-0n9q1f23.js";
7
+ import"./index-r8gp8zk3.js";
8
8
  import {
9
9
  Prompter2
10
10
  } from "./index-zzvvc845.js";