@akanjs/cli 3.1.1-rc.1 → 3.1.1-rc.11

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 (75) hide show
  1. package/.build-stamp +1 -1
  2. package/{CodeAgent-4pnxwptq.js → CodeAgent-5t8m16w8.js} +2 -2
  3. package/{CodeTui-hhndze8h.js → CodeTui-drgacyvs.js} +1 -1
  4. package/TunnelShare-26ty9skr.js +14 -0
  5. package/{agent.command-p02330r6.js → agent.command-h82gepwn.js} +5 -5
  6. package/akanCode.js +2 -2
  7. package/{application.command-1117fgq9.js → application.command-j1reb9p1.js} +11 -11
  8. package/{applicationBuildRunner-9cnnsdm5.js → applicationBuildRunner-w20x63mz.js} +74 -26
  9. package/buildBatch.proc.js +5 -5
  10. package/{cloud.command-ttb2s2x6.js → cloud.command-zd2mfkm0.js} +22 -17
  11. package/cloud.script-vdj8ymch.js +24 -0
  12. package/{code.command-16pm1p2v.js → code.command-w1rt357h.js} +6 -6
  13. package/{context.command-6ys86sqf.js → context.command-d35ppstw.js} +16 -16
  14. package/context.runner-azvkkzdr.js +25 -0
  15. package/{guideline.command-3zay3d8g.js → guideline.command-xwkskvky.js} +2 -2
  16. package/guidelines/agentRule/agentRule.instruction.md +21 -4
  17. package/guidelines/conventions/conventions.instruction.md +10 -7
  18. package/guidelines/pageRule/pageRule.instruction.md +9 -0
  19. package/guidelines/queryRule/queryRule.instruction.md +13 -1
  20. package/guidelines/runtimeRule/runtimeRule.instruction.md +12 -0
  21. package/guidelines/workspaceOnboarding/workspaceOnboarding.instruction.md +2 -1
  22. package/incrementalBuilder.proc.js +3 -3
  23. package/{index-rr7jk14m.js → index-1e2955yd.js} +23 -10
  24. package/{index-z9xepn8t.js → index-2qzzp0c9.js} +557 -142
  25. package/{index-e9e9cebg.js → index-4rwfh2de.js} +3 -3
  26. package/{index-fmder14z.js → index-553xyb55.js} +1 -1
  27. package/{index-9hbhm6cs.js → index-657908e5.js} +1 -1
  28. package/{index-1mfyyxh5.js → index-6pzt55w3.js} +3 -3
  29. package/{index-4w3skd33.js → index-6y1991s6.js} +3 -3
  30. package/{index-zn6bn1s2.js → index-7abjzny1.js} +4 -4
  31. package/{index-2ar6tffh.js → index-7ktk2hnz.js} +67 -19
  32. package/{index-bb4hj03s.js → index-7yzcaymm.js} +10 -10
  33. package/{index-ngpn9hzy.js → index-8jb5ep2e.js} +2 -2
  34. package/{index-ekpp5tax.js → index-8rvwgd1r.js} +4 -97
  35. package/{index-sww1x1mv.js → index-brpk7gd8.js} +56 -9
  36. package/{index-7f0edwsj.js → index-ch1sv7ke.js} +57 -12
  37. package/{index-jgs8z8xb.js → index-cz9g85xh.js} +1 -1
  38. package/{index-tk3jg2bm.js → index-hdzjaq7s.js} +4 -3
  39. package/{index-sng3vt0p.js → index-kbbyzs6j.js} +2 -2
  40. package/{index-z6v7k9sb.js → index-kr62ph5a.js} +24 -2
  41. package/{index-b5vptvnt.js → index-nmy1rana.js} +4 -4
  42. package/{index-ynqxpwx6.js → index-pqdz7rat.js} +1 -1
  43. package/{index-p4dnj2wc.js → index-qmeh0s05.js} +63 -8
  44. package/{index-qkcwsg6r.js → index-rshwdv9w.js} +2 -2
  45. package/{index-jaa81e9r.js → index-trvk51ht.js} +4 -4
  46. package/{index-1cq1hq12.js → index-tzzs52h0.js} +26 -15
  47. package/{index-qfzfaq96.js → index-wvvwdzfw.js} +3 -3
  48. package/{index-vcpbrrf2.js → index-xeh7m2j5.js} +1 -1
  49. package/{index-sh9mmp5v.js → index-y5m4j2w6.js} +7 -7
  50. package/{index-g2s33373.js → index-ygy8c12j.js} +1 -1
  51. package/{index-q8age5az.js → index-yknrmkmt.js} +2 -2
  52. package/index.js +22 -22
  53. package/{library.command-a8n9h8j4.js → library.command-td8t85kb.js} +3 -3
  54. package/{localRegistry.command-c2mxqf4h.js → localRegistry.command-jx9zkmxf.js} +12 -12
  55. package/{module.command-b6f1p1xa.js → module.command-j70mqgpp.js} +5 -5
  56. package/{package.command-tc27ftmy.js → package.command-1b1v6k5v.js} +3 -3
  57. package/package.json +2 -2
  58. package/{page.command-m5wyqfkd.js → page.command-m31w2tsz.js} +3 -3
  59. package/{pipeline.command-4qxyafpz.js → pipeline.command-q7b8wy55.js} +2 -2
  60. package/{primitive.command-9yaatk0d.js → primitive.command-4zrbhkb9.js} +6 -6
  61. package/{projectTypecheck-87k6z6ab.js → projectTypecheck-synx6qff.js} +1 -1
  62. package/{quality.command-fxn07zwp.js → quality.command-cy0pgqjz.js} +3 -3
  63. package/{repair.command-evg9g911.js → repair.command-98n6zxg7.js} +5 -5
  64. package/{scalar.command-xsejjeq1.js → scalar.command-rak5pjk3.js} +4 -4
  65. package/{subspace.command-4mjjxgmf.js → subspace.command-ej0rk116.js} +8 -8
  66. package/templates/app/tsconfig.json.template +2 -7
  67. package/templates/env/_env.server.type.ts +10 -5
  68. package/templates/facetIndex/index.ts +2 -2
  69. package/templates/workspaceRoot/bunfig.toml.template +0 -4
  70. package/{tunnel.command-7f41pm7y.js → tunnel.command-kdx3amrc.js} +7 -7
  71. package/{workflow.command-qpyq0ya5.js → workflow.command-gffk9nj9.js} +10 -10
  72. package/{workspace.command-qvwdqmnd.js → workspace.command-j1680trm.js} +33 -32
  73. package/TunnelShare-8qtffcex.js +0 -14
  74. package/cloud.script-fqp3zh02.js +0 -24
  75. package/context.runner-3jrypwe3.js +0 -25
package/.build-stamp CHANGED
@@ -1 +1 @@
1
- 4e07945002ba6c7838958e756962089818391ddc6edea12f054aeba00c6cbdad
1
+ a2f300f83a05e64bcb0f02438d7a36b18e2af13d66710cdbbcae0b5e66b69613
@@ -1,8 +1,8 @@
1
1
  // @bun
2
2
  import {
3
3
  CodeAgent2
4
- } from "./index-4w3skd33.js";
5
- import"./index-9hbhm6cs.js";
4
+ } from "./index-6y1991s6.js";
5
+ import"./index-657908e5.js";
6
6
  import"./index-7md2g9vw.js";
7
7
  export {
8
8
  CodeAgent2 as CodeAgent
@@ -5,7 +5,7 @@ import {
5
5
  McpTokenStore,
6
6
  McpSignIn,
7
7
  AkanCodeCompaction2
8
- } from "./index-9hbhm6cs.js";
8
+ } from "./index-657908e5.js";
9
9
  import {
10
10
  CodeTuiLines2,
11
11
  CodeTuiAgents2,
@@ -0,0 +1,14 @@
1
+ // @bun
2
+ import {
3
+ TunnelShare2
4
+ } from "./index-xeh7m2j5.js";
5
+ import"./index-7ktk2hnz.js";
6
+ import"./index-2qzzp0c9.js";
7
+ import"./index-m9jj544v.js";
8
+ import"./index-yknrmkmt.js";
9
+ import"./index-cz9g85xh.js";
10
+ import"./index-1e2955yd.js";
11
+ import"./index-52w0fvh8.js";
12
+ export {
13
+ TunnelShare2 as TunnelShare
14
+ };
@@ -2,16 +2,16 @@
2
2
  import {
3
3
  Workspace,
4
4
  command
5
- } from "./index-p4dnj2wc.js";
5
+ } from "./index-qmeh0s05.js";
6
6
  import"./index-52w0fvh8.js";
7
- import"./index-rr7jk14m.js";
7
+ import"./index-1e2955yd.js";
8
8
  import"./index-hj6w4ka1.js";
9
- import"./index-ynqxpwx6.js";
10
- import"./index-z6v7k9sb.js";
9
+ import"./index-pqdz7rat.js";
10
+ import"./index-kr62ph5a.js";
11
11
  import"./index-zzvvc845.js";
12
12
  import {
13
13
  AgentScript
14
- } from "./index-1mfyyxh5.js";
14
+ } from "./index-6pzt55w3.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-4w3skd33.js";
31
+ } from "./index-6y1991s6.js";
32
32
  import {
33
33
  akanCodeDefaultModel2,
34
34
  akanCodeModel2,
@@ -40,7 +40,7 @@ import {
40
40
  SubagentPool2,
41
41
  akanCodePaths2,
42
42
  AkanCodeCompaction2
43
- } from "./index-9hbhm6cs.js";
43
+ } from "./index-657908e5.js";
44
44
  import"./index-7md2g9vw.js";
45
45
  import {
46
46
  CodeAgentRpcHost2
@@ -7,19 +7,19 @@ import {
7
7
  Exec,
8
8
  Workspace,
9
9
  command
10
- } from "./index-p4dnj2wc.js";
10
+ } from "./index-qmeh0s05.js";
11
11
  import"./index-52w0fvh8.js";
12
- import"./index-rr7jk14m.js";
12
+ import"./index-1e2955yd.js";
13
13
  import"./index-5nd1wtkv.js";
14
- import"./index-ekpp5tax.js";
14
+ import"./index-2qzzp0c9.js";
15
+ import"./index-8rvwgd1r.js";
15
16
  import"./index-m9jj544v.js";
16
- import"./index-z9xepn8t.js";
17
- import"./index-q8age5az.js";
18
- import"./index-jgs8z8xb.js";
19
- import"./index-qkcwsg6r.js";
17
+ import"./index-yknrmkmt.js";
18
+ import"./index-cz9g85xh.js";
19
+ import"./index-rshwdv9w.js";
20
20
  import {
21
21
  ApplicationScript
22
- } from "./index-1cq1hq12.js";
22
+ } from "./index-tzzs52h0.js";
23
23
  import"./index-7md2g9vw.js";
24
24
  import {
25
25
  writeOption,
@@ -28,7 +28,7 @@ import {
28
28
  allowLocalOption,
29
29
  publicEnvOption
30
30
  } from "./index-mdjc93e1.js";
31
- import"./index-fmder14z.js";
31
+ import"./index-553xyb55.js";
32
32
 
33
33
  // pkgs/@akanjs/cli/application/application.command.ts
34
34
  import { MigrationCommand } from "akanjs/server/migration/migrationCommand";
@@ -266,11 +266,11 @@ class ApplicationCommand extends command("application", [ApplicationScript], ({
266
266
  desc: `${signDesc}; a signed app takes only a release signed the same way`,
267
267
  default: false
268
268
  }).option("notarize", Boolean, { desc: notarizeDesc, default: false }).option("revoke", String, {
269
- desc: "android, ios: keyIds of updates.publicKeys this release starts revoking, comma-separated (update-keygen prints a key's); it is signed with a key listed after them",
269
+ desc: "keyIds of updates.publicKeys this release starts revoking, comma-separated (update-keygen prints a key's); it is signed with a key listed after them",
270
270
  nullable: true
271
271
  }).option("resetSequence", Boolean, {
272
272
  flag: "R",
273
- desc: "android, ios: with --revoke, phones compare the release with their own bundle instead of the running one",
273
+ desc: "with --revoke, apps compare the release with their own build instead of the running release",
274
274
  default: false
275
275
  }).option("write", Boolean, writeOption).option("allowLocalRelease", Boolean, allowLocalOption("release")).exec(async function(app, platform, target, env, channel, upload, arch, sign, notarize, revoke, resetSequence, write, allowLocalRelease) {
276
276
  const revoked = revoke?.split(",").map((keyId) => keyId.trim()).filter(Boolean);
@@ -4,27 +4,62 @@ import {
4
4
  Spinner,
5
5
  ProjectTypecheck2,
6
6
  WorkspaceExecutor
7
- } from "./index-rr7jk14m.js";
7
+ } from "./index-1e2955yd.js";
8
8
  import"./index-52w0fvh8.js";
9
- import"./index-ngpn9hzy.js";
10
- import"./index-jgs8z8xb.js";
9
+ import"./index-8jb5ep2e.js";
10
+ import"./index-cz9g85xh.js";
11
11
  import {
12
12
  AllRoutesBuilder,
13
13
  FontPruner,
14
14
  precompressArtifacts,
15
15
  SsrBaseArtifactBuilder
16
- } from "./index-e9e9cebg.js";
16
+ } from "./index-4rwfh2de.js";
17
17
  import {
18
18
  CsrArtifactBuilder
19
- } from "./index-q8age5az.js";
19
+ } from "./index-yknrmkmt.js";
20
20
  import"./index-62md4dwy.js";
21
21
 
22
22
  // pkgs/@akanjs/devkit/applicationBuildRunner.ts
23
- import path2 from "path";
23
+ import path3 from "path";
24
+ import { toError } from "akanjs/common";
25
+
26
+ // pkgs/@akanjs/devkit/akanConfig/productionLockfile.ts
27
+ import { mkdtemp, rm } from "fs/promises";
28
+ import os from "os";
29
+ import path from "path";
30
+
31
+ class ProductionLockfile {
32
+ static fileName = "bun.lock";
33
+ static async prune(workspaceRoot, packageJson) {
34
+ const workspaceLock = Bun.file(path.join(workspaceRoot, ProductionLockfile.fileName));
35
+ if (!await workspaceLock.exists())
36
+ throw new Error(`the workspace root has no ${ProductionLockfile.fileName}`);
37
+ const dir = await mkdtemp(path.join(os.tmpdir(), "akan-production-lock-"));
38
+ try {
39
+ const npmrc = Bun.file(path.join(workspaceRoot, ".npmrc"));
40
+ await Promise.all([
41
+ Bun.write(path.join(dir, "package.json"), JSON.stringify(packageJson, null, 2)),
42
+ Bun.write(path.join(dir, ProductionLockfile.fileName), workspaceLock),
43
+ ...await npmrc.exists() ? [Bun.write(path.join(dir, ".npmrc"), npmrc)] : []
44
+ ]);
45
+ const install = Bun.spawn([process.execPath, "install", "--lockfile-only", "--no-progress"], {
46
+ cwd: dir,
47
+ stdout: "ignore",
48
+ stderr: "pipe"
49
+ });
50
+ const [exitCode, stderr] = await Promise.all([install.exited, new Response(install.stderr).text()]);
51
+ if (exitCode !== 0)
52
+ throw new Error(stderr.trim() || `bun install --lockfile-only exited with ${exitCode}`);
53
+ return await Bun.file(path.join(dir, ProductionLockfile.fileName)).text();
54
+ } finally {
55
+ await rm(dir, { recursive: true, force: true });
56
+ }
57
+ }
58
+ }
24
59
 
25
60
  // pkgs/@akanjs/devkit/transforms/serverEnvPlugin.ts
26
61
  import { existsSync, realpathSync } from "fs";
27
- import path from "path";
62
+ import path2 from "path";
28
63
  var escapeRegExp = (value) => value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
29
64
  var createServerEnvPlugin = ({
30
65
  envDir,
@@ -34,7 +69,7 @@ var createServerEnvPlugin = ({
34
69
  onLibEnv
35
70
  }) => {
36
71
  const others = [...new Set(environments)].filter((name) => name !== environment);
37
- const dirs = new Set([path.resolve(envDir), existsSync(envDir) ? realpathSync.native(envDir) : envDir]);
72
+ const dirs = new Set([path2.resolve(envDir), existsSync(envDir) ? realpathSync.native(envDir) : envDir]);
38
73
  const folder = `^(?:${[...dirs].map(escapeRegExp).join("|")})[\\\\/]env\\.server\\.`;
39
74
  const filter = new RegExp(`${folder}(?:${others.map(escapeRegExp).join("|")})\\.ts$`);
40
75
  const own = new RegExp(`${folder}${escapeRegExp(environment)}\\.ts$`);
@@ -50,11 +85,11 @@ var createServerEnvPlugin = ({
50
85
  if (profile)
51
86
  build.onLoad({ filter: own }, async (args) => ({
52
87
  loader: "ts",
53
- contents: await ServerEnvProfile.sourceInPlaceOf(path.join(path.dirname(args.path), ServerEnvProfile.fileName(environment, profile)), args.path, profile)
88
+ contents: await ServerEnvProfile.sourceInPlaceOf(path2.join(path2.dirname(args.path), ServerEnvProfile.fileName(environment, profile)), args.path, profile)
54
89
  }));
55
90
  if (others.length)
56
91
  build.onLoad({ filter }, async (args) => {
57
- const name = path.basename(args.path, ".ts").slice("env.server.".length);
92
+ const name = path2.basename(args.path, ".ts").slice("env.server.".length);
58
93
  const { exports } = new Bun.Transpiler({ loader: "ts" }).scan(await Bun.file(args.path).text());
59
94
  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.`;
60
95
  return {
@@ -69,8 +104,8 @@ var createServerEnvPlugin = ({
69
104
  });
70
105
  if (profile)
71
106
  build.onLoad({ filter: ServerEnvProfile.envFilePattern }, async (args) => {
72
- const name = path.basename(args.path, ".ts").slice("env.server.".length);
73
- if (dirs.has(path.dirname(args.path)) || name === "type" || name === "example")
107
+ const name = path2.basename(args.path, ".ts").slice("env.server.".length);
108
+ if (dirs.has(path2.dirname(args.path)) || name === "type" || name === "example")
74
109
  return { loader: "ts", contents: await Bun.file(args.path).text() };
75
110
  if (!libEnvs.has(args.path))
76
111
  libEnvs.set(args.path, libEnv(args.path));
@@ -122,7 +157,7 @@ class ApplicationBuildRunner {
122
157
  this.#profile = profile;
123
158
  }
124
159
  get #envDir() {
125
- return path2.join(this.#app.cwdPath, "env");
160
+ return path3.join(this.#app.cwdPath, "env");
126
161
  }
127
162
  #pinImageEnv(baseDevEnv, environment) {
128
163
  const imageEnv = {
@@ -159,14 +194,14 @@ class ApplicationBuildRunner {
159
194
  phases: this.#phases,
160
195
  durationMs: Date.now() - this.#startedAt,
161
196
  outputDir: this.#app.dist.cwdPath,
162
- artifactDir: path2.join(this.#app.dist.cwdPath, ".akan/artifact")
197
+ artifactDir: path3.join(this.#app.dist.cwdPath, ".akan/artifact")
163
198
  };
164
199
  }
165
200
  async typecheck(options = {}) {
166
201
  await this.#app.getPageKeys({ refresh: true });
167
202
  const typecheck = new ProjectTypecheck2(this.#app.cwdPath, this.#app.workspace.workspaceRoot, this.#app.getCommandEnv());
168
203
  const libPageIncludes = (await this.#app.getPageRoots()).filter((root) => root.keyPrefix).flatMap((root) => {
169
- const rel = path2.relative(typecheck.typecheckDir, root.realDir).split(path2.sep).join("/");
204
+ const rel = path3.relative(typecheck.typecheckDir, root.realDir).split(path3.sep).join("/");
170
205
  return [`${rel}/**/*.ts`, `${rel}/**/*.tsx`];
171
206
  });
172
207
  await typecheck.run([
@@ -198,9 +233,14 @@ class ApplicationBuildRunner {
198
233
  }
199
234
  async buildAppMeta() {
200
235
  const akanConfig = await this.#app.getConfig();
201
- const dockerfile = akanConfig.dockerfileFor(this.#environment ?? akanConfig.baseDevEnv.env);
236
+ const packageJson = akanConfig.getProductionPackageJson();
237
+ const lockfile = await this.#pruneLockfile(packageJson);
238
+ const dockerfile = akanConfig.dockerfileFor(this.#environment ?? akanConfig.baseDevEnv.env, {
239
+ lockfile: lockfile !== null
240
+ });
202
241
  await Promise.all([
203
- this.#app.dist.writeJson("package.json", akanConfig.getProductionPackageJson()),
242
+ this.#app.dist.writeJson("package.json", packageJson),
243
+ ...lockfile !== null ? [this.#app.dist.writeFile(`${this.#app.dist.cwdPath}/${ProductionLockfile.fileName}`, lockfile)] : [],
204
244
  this.#app.dist.writeFile(`${this.#app.dist.cwdPath}/Dockerfile`, dockerfile),
205
245
  this.#app.dist.writeJson("akan.build.json", {
206
246
  buildId: await this.#resolveBuildId(),
@@ -209,6 +249,14 @@ class ApplicationBuildRunner {
209
249
  })
210
250
  ]);
211
251
  }
252
+ async#pruneLockfile(packageJson) {
253
+ try {
254
+ return await ProductionLockfile.prune(this.#app.workspace.workspaceRoot, packageJson);
255
+ } catch (error) {
256
+ this.#app.logger.warn(`The image installs its dependencies unlocked, at the newest versions package.json allows: ${toError(error).message}`);
257
+ return null;
258
+ }
259
+ }
212
260
  async#resolveBuildId() {
213
261
  const fromEnv = process.env.AKAN_BUILD_ID?.trim();
214
262
  if (fromEnv)
@@ -236,8 +284,8 @@ class ApplicationBuildRunner {
236
284
  if (profileFile || !stripped.length || this.#warnedLibEnvs.has(file))
237
285
  return;
238
286
  this.#warnedLibEnvs.add(file);
239
- const lib = path2.relative(this.#app.workspace.workspaceRoot, file);
240
- this.#app.logger.warn(`${lib}: the "${this.#profile}" build leaves out ${stripped.join(", ")}. Give the lib ${path2.basename(ServerEnvProfile.profileFileOf(file, this.#profile ?? ""))} to say what this profile runs with.`);
287
+ const lib = path3.relative(this.#app.workspace.workspaceRoot, file);
288
+ this.#app.logger.warn(`${lib}: the "${this.#profile}" build leaves out ${stripped.join(", ")}. Give the lib ${path3.basename(ServerEnvProfile.profileFileOf(file, this.#profile ?? ""))} to say what this profile runs with.`);
241
289
  }
242
290
  });
243
291
  return this.#serverEnv;
@@ -283,7 +331,7 @@ class ApplicationBuildRunner {
283
331
  };
284
332
  }
285
333
  async#writeConsoleShim() {
286
- await Bun.write(path2.join(this.#app.dist.cwdPath, "console.js"), `process.env.AKAN_COMMAND_TYPE = "console";
334
+ await Bun.write(path3.join(this.#app.dist.cwdPath, "console.js"), `process.env.AKAN_COMMAND_TYPE = "console";
287
335
  const { cnst, db, dict, option, server, sig, srv } = await import("./server.js");
288
336
  const { assertAkanConsoleAllowed, startAkanConsole } = await import("./console-runtime.js");
289
337
 
@@ -307,14 +355,14 @@ void run().catch((error) => {
307
355
  try {
308
356
  return Bun.resolveSync("akanjs/server/rsc-worker", import.meta.dir);
309
357
  } catch {
310
- return path2.join(this.#app.workspace.workspaceRoot, "pkgs/akanjs/server/rscWorker.tsx");
358
+ return path3.join(this.#app.workspace.workspaceRoot, "pkgs/akanjs/server/rscWorker.tsx");
311
359
  }
312
360
  }
313
361
  #resolveConsoleRuntimeBuildEntry() {
314
362
  try {
315
- return path2.join(path2.dirname(Bun.resolveSync("akanjs/server", import.meta.dir)), "console.ts");
363
+ return path3.join(path3.dirname(Bun.resolveSync("akanjs/server", import.meta.dir)), "console.ts");
316
364
  } catch {
317
- return path2.join(this.#app.workspace.workspaceRoot, "pkgs/akanjs/server/console.ts");
365
+ return path3.join(this.#app.workspace.workspaceRoot, "pkgs/akanjs/server/console.ts");
318
366
  }
319
367
  }
320
368
  async#buildSsr() {
@@ -332,13 +380,13 @@ void run().catch((error) => {
332
380
  }
333
381
  async#buildOrThrow(label, config) {
334
382
  const flag = process.env.AKAN_BUILD_METAFILE;
335
- const metafileDir = flag && flag !== "0" && flag !== "false" ? path2.join(this.#app.workspace.workspaceRoot, "local", "build-meta", path2.basename(this.#app.cwdPath)) : null;
383
+ const metafileDir = flag && flag !== "0" && flag !== "false" ? path3.join(this.#app.workspace.workspaceRoot, "local", "build-meta", path3.basename(this.#app.cwdPath)) : null;
336
384
  const result = await Bun.build(metafileDir ? { ...config, metafile: true } : config);
337
385
  if (!result.success)
338
386
  throw new AggregateError(result.logs, `[${label}] Bun.build failed`);
339
387
  if (metafileDir && result.metafile) {
340
- const entry = path2.parse(String(config.entrypoints[0] ?? label)).name;
341
- await Bun.write(path2.join(metafileDir, `${entry}.json`), JSON.stringify(result.metafile));
388
+ const entry = path3.parse(String(config.entrypoints[0] ?? label)).name;
389
+ await Bun.write(path3.join(metafileDir, `${entry}.json`), JSON.stringify(result.metafile));
342
390
  }
343
391
  return result;
344
392
  }
@@ -6,26 +6,26 @@ import {
6
6
  resolveSsrPageEntriesForApp,
7
7
  WorkspaceExecutor,
8
8
  AppExecutor
9
- } from "./index-rr7jk14m.js";
9
+ } from "./index-1e2955yd.js";
10
10
  import {
11
11
  computeRouteSeedIndex,
12
12
  saveRouteSeedIndex,
13
13
  CsrDevBundler,
14
14
  SsrDevBundler
15
- } from "./index-ngpn9hzy.js";
15
+ } from "./index-8jb5ep2e.js";
16
16
  import"./index-52w0fvh8.js";
17
17
  import {
18
18
  ServerGraphFile,
19
19
  PagesBundleBuilder
20
- } from "./index-jgs8z8xb.js";
20
+ } from "./index-cz9g85xh.js";
21
21
  import {
22
22
  CssCompiler,
23
23
  FontOptimizer,
24
24
  SsrBaseArtifactBuilder
25
- } from "./index-e9e9cebg.js";
25
+ } from "./index-4rwfh2de.js";
26
26
  import {
27
27
  CsrArtifactBuilder
28
- } from "./index-q8age5az.js";
28
+ } from "./index-yknrmkmt.js";
29
29
  import"./index-62md4dwy.js";
30
30
 
31
31
  // pkgs/@akanjs/devkit/incrementalBuilder/buildBatch.proc.ts
@@ -3,27 +3,27 @@ import {
3
3
  App,
4
4
  Workspace,
5
5
  command
6
- } from "./index-p4dnj2wc.js";
6
+ } from "./index-qmeh0s05.js";
7
7
  import"./index-52w0fvh8.js";
8
- import"./index-rr7jk14m.js";
9
- import"./index-2ar6tffh.js";
8
+ import"./index-1e2955yd.js";
9
+ import"./index-7ktk2hnz.js";
10
10
  import {
11
11
  PlatformTestRun
12
- } from "./index-7f0edwsj.js";
13
- import"./index-ekpp5tax.js";
12
+ } from "./index-ch1sv7ke.js";
13
+ import"./index-2qzzp0c9.js";
14
+ import"./index-8rvwgd1r.js";
14
15
  import"./index-m9jj544v.js";
15
- import"./index-z9xepn8t.js";
16
- import"./index-q8age5az.js";
17
- import"./index-jgs8z8xb.js";
16
+ import"./index-yknrmkmt.js";
17
+ import"./index-cz9g85xh.js";
18
18
  import"./index-5nd1wtkv.js";
19
- import"./index-qkcwsg6r.js";
20
- import"./index-1cq1hq12.js";
19
+ import"./index-rshwdv9w.js";
20
+ import"./index-tzzs52h0.js";
21
21
  import"./index-7md2g9vw.js";
22
22
  import"./index-tvehn2sp.js";
23
- import"./index-tk3jg2bm.js";
23
+ import"./index-hdzjaq7s.js";
24
24
  import {
25
25
  CloudScript2
26
- } from "./index-sww1x1mv.js";
26
+ } from "./index-brpk7gd8.js";
27
27
  import {
28
28
  writeOption,
29
29
  oneNativeTargetOption,
@@ -34,7 +34,7 @@ import {
34
34
  hostOption,
35
35
  subspaceOption
36
36
  } from "./index-mdjc93e1.js";
37
- import"./index-fmder14z.js";
37
+ import"./index-553xyb55.js";
38
38
 
39
39
  // pkgs/@akanjs/cli/cloud/cloud.command.ts
40
40
  var localRegistryUrl = () => process.env.AKAN_NPM_REGISTRY ?? "http://127.0.0.1:4873";
@@ -96,10 +96,14 @@ class CloudCommand extends command("cloud", [CloudScript2], ({ public: target })
96
96
  await this.cloudScript.update(workspace, tag, { registryUrl: resolveRegistryUrl(registry) });
97
97
  }),
98
98
  pushUpdate: target({
99
- desc: "Pack an over-the-air update of a phone's web bundle, or take the folder `akan pack-update` wrote, and upload it to the Akan Cloud project, which signs and publishes it. Exits 2 when the pack needs a new store build or the project rejects it, 1 on any other failure"
99
+ desc: "Pack an over-the-air update of a phone's web bundle, or take the folder `akan pack-update` wrote, and upload it to the Akan Cloud project, which signs and publishes it; or upload the desktop release `akan publish-update` signed, as it is. Exits 2 when the pack needs a new store build or the project rejects it, 1 on any other failure"
100
100
  }).with(App).option("platform", String, {
101
- enum: ["ios", "android"],
102
- desc: "the app it updates (with --pack, default: the pack's)",
101
+ enum: ["ios", "android", "desktop", "macos", "windows", "linux"],
102
+ desc: "the app it updates; desktop is this computer's OS (with --pack, default: the pack's)",
103
+ nullable: true
104
+ }).option("arch", String, {
105
+ desc: "desktop: the CPU of the release, arm64 or x64 (default this computer's)",
106
+ enum: ["arm64", "x64"],
103
107
  nullable: true
104
108
  }).option("target", String, {
105
109
  desc: "native target name, a key of native.targets (default: the only one; with --pack, the pack's)",
@@ -116,9 +120,10 @@ class CloudCommand extends command("cloud", [CloudScript2], ({ public: target })
116
120
  flag: "d",
117
121
  desc: "a folder `akan pack-update` wrote, uploaded instead of packing; --platform, --target and --env must match it",
118
122
  nullable: true
119
- }).option("publicEnv", String, publicEnvOption("the update")).with(Workspace).exec(async function(app, platform, target, env, channel, notes, subspace, host, write, allowLocalRelease, pack, publicEnv, workspace) {
123
+ }).option("publicEnv", String, publicEnvOption("the update")).with(Workspace).exec(async function(app, platform, arch, target, env, channel, notes, subspace, host, write, allowLocalRelease, pack, publicEnv, workspace) {
120
124
  await this.cloudScript.pushUpdate(workspace, app, {
121
125
  platform,
126
+ arch,
122
127
  target,
123
128
  env,
124
129
  channel,
@@ -0,0 +1,24 @@
1
+ // @bun
2
+ import {
3
+ CloudScript2
4
+ } from "./index-brpk7gd8.js";
5
+ import"./index-ch1sv7ke.js";
6
+ import"./index-tzzs52h0.js";
7
+ import"./index-553xyb55.js";
8
+ import"./index-rshwdv9w.js";
9
+ import"./index-hdzjaq7s.js";
10
+ import"./index-8rvwgd1r.js";
11
+ import"./index-7ktk2hnz.js";
12
+ import"./index-2qzzp0c9.js";
13
+ import"./index-m9jj544v.js";
14
+ import"./index-qmeh0s05.js";
15
+ import"./index-7md2g9vw.js";
16
+ import"./index-yknrmkmt.js";
17
+ import"./index-5nd1wtkv.js";
18
+ import"./index-cz9g85xh.js";
19
+ import"./index-1e2955yd.js";
20
+ import"./index-tvehn2sp.js";
21
+ import"./index-52w0fvh8.js";
22
+ export {
23
+ CloudScript2 as CloudScript
24
+ };
@@ -4,9 +4,9 @@ import {
4
4
  runner,
5
5
  script,
6
6
  command
7
- } from "./index-p4dnj2wc.js";
7
+ } from "./index-qmeh0s05.js";
8
8
  import"./index-52w0fvh8.js";
9
- import"./index-rr7jk14m.js";
9
+ import"./index-1e2955yd.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-4pnxwptq.js"),
22
+ import("./CodeAgent-5t8m16w8.js"),
23
23
  import("./CodeAgentRpcHost-9g27hmer.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-4pnxwptq.js"),
38
- import("./CodeTui-hhndze8h.js")
37
+ import("./CodeAgent-5t8m16w8.js"),
38
+ import("./CodeTui-drgacyvs.js")
39
39
  ]);
40
40
  const agentOptions = await CodeRunner.#agentOptions(options, false);
41
41
  let resume = options.resume;
@@ -67,7 +67,7 @@ class CodeRunner extends runner("code") {
67
67
  }
68
68
  }
69
69
  async run(prompt, options) {
70
- const { CodeAgent } = await import("./CodeAgent-4pnxwptq.js");
70
+ const { CodeAgent } = await import("./CodeAgent-5t8m16w8.js");
71
71
  const agent = await CodeAgent.create(await CodeRunner.#agentOptions(options, false));
72
72
  const printer = new CodeAgentStreamPrinter2({ json: options.json, thinking: options.thinking });
73
73
  agent.on((event) => printer.print(event));
@@ -2,28 +2,28 @@
2
2
  import {
3
3
  Workspace,
4
4
  command
5
- } from "./index-p4dnj2wc.js";
5
+ } from "./index-qmeh0s05.js";
6
6
  import"./index-52w0fvh8.js";
7
- import"./index-rr7jk14m.js";
7
+ import"./index-1e2955yd.js";
8
8
  import"./index-hj6w4ka1.js";
9
- import"./index-ynqxpwx6.js";
10
- import"./index-z6v7k9sb.js";
11
- import"./index-bb4hj03s.js";
12
- import"./index-ekpp5tax.js";
9
+ import"./index-pqdz7rat.js";
10
+ import"./index-kr62ph5a.js";
11
+ import"./index-7yzcaymm.js";
12
+ import"./index-2qzzp0c9.js";
13
+ import"./index-8rvwgd1r.js";
13
14
  import"./index-m9jj544v.js";
14
- import"./index-z9xepn8t.js";
15
- import"./index-q8age5az.js";
16
- import"./index-jgs8z8xb.js";
15
+ import"./index-yknrmkmt.js";
16
+ import"./index-cz9g85xh.js";
17
17
  import"./index-zzvvc845.js";
18
- import"./index-qfzfaq96.js";
19
- import"./index-g2s33373.js";
20
- import"./index-b5vptvnt.js";
21
- import"./index-zn6bn1s2.js";
22
- import"./index-sng3vt0p.js";
23
- import"./index-sh9mmp5v.js";
18
+ import"./index-wvvwdzfw.js";
19
+ import"./index-ygy8c12j.js";
20
+ import"./index-nmy1rana.js";
21
+ import"./index-7abjzny1.js";
22
+ import"./index-kbbyzs6j.js";
23
+ import"./index-y5m4j2w6.js";
24
24
  import {
25
25
  ContextScript
26
- } from "./index-jaa81e9r.js";
26
+ } from "./index-trvk51ht.js";
27
27
 
28
28
  // pkgs/@akanjs/cli/context/context.command.ts
29
29
  class ContextCommand extends command("context", [ContextScript], ({ public: target }) => ({
@@ -0,0 +1,25 @@
1
+ // @bun
2
+ import {
3
+ ContextRunner2
4
+ } from "./index-7yzcaymm.js";
5
+ import"./index-y5m4j2w6.js";
6
+ import"./index-kbbyzs6j.js";
7
+ import"./index-7abjzny1.js";
8
+ import"./index-wvvwdzfw.js";
9
+ import"./index-nmy1rana.js";
10
+ import"./index-ygy8c12j.js";
11
+ import"./index-8rvwgd1r.js";
12
+ import"./index-2qzzp0c9.js";
13
+ import"./index-m9jj544v.js";
14
+ import"./index-kr62ph5a.js";
15
+ import"./index-pqdz7rat.js";
16
+ import"./index-zzvvc845.js";
17
+ import"./index-qmeh0s05.js";
18
+ import"./index-yknrmkmt.js";
19
+ import"./index-cz9g85xh.js";
20
+ import"./index-1e2955yd.js";
21
+ import"./index-hj6w4ka1.js";
22
+ import"./index-52w0fvh8.js";
23
+ export {
24
+ ContextRunner2 as ContextRunner
25
+ };
@@ -2,9 +2,9 @@
2
2
  import {
3
3
  script,
4
4
  command
5
- } from "./index-p4dnj2wc.js";
5
+ } from "./index-qmeh0s05.js";
6
6
  import"./index-52w0fvh8.js";
7
- import"./index-rr7jk14m.js";
7
+ import"./index-1e2955yd.js";
8
8
  import {
9
9
  Prompter2
10
10
  } from "./index-zzvvc845.js";