@akanjs/cli 3.0.0-beta.20 → 3.0.0-beta.22

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 (64) hide show
  1. package/.build-stamp +1 -1
  2. package/{CodeAgent-awv258wb.js → CodeAgent-0dh9fzzg.js} +2 -2
  3. package/{CodeTui-1nqh35ez.js → CodeTui-drwdvwg9.js} +1 -1
  4. package/{agent.command-1s9ag7sb.js → agent.command-ttn09rx3.js} +5 -5
  5. package/akanCode.js +2 -2
  6. package/{application.command-49hwy6va.js → application.command-mm5v2gzp.js} +43 -41
  7. package/{applicationBuildRunner-ybyp97pv.js → applicationBuildRunner-38exmejd.js} +2 -2
  8. package/buildBatch.proc.js +10 -4
  9. package/{cloud.command-d7rqtzt9.js → cloud.command-f1pnvp2a.js} +9 -8
  10. package/cloud.script-d61mcf0q.js +20 -0
  11. package/{code.command-nn48xzej.js → code.command-1jgk14tc.js} +6 -6
  12. package/commandManifest.json +1 -1
  13. package/{context.command-s3mcmvpa.js → context.command-4vpjmg22.js} +13 -13
  14. package/context.runner-ehjs419v.js +21 -0
  15. package/{guideline.command-sct4qnt5.js → guideline.command-7jk47fgq.js} +2 -2
  16. package/guidelines/agentRule/agentRule.instruction.md +3 -3
  17. package/guidelines/conventions/conventions.instruction.md +17 -5
  18. package/guidelines/runtimeRule/runtimeRule.instruction.md +3 -3
  19. package/incrementalBuilder.proc.js +1 -1
  20. package/{index-5pc1qrbv.js → index-1db2cw0y.js} +2 -2
  21. package/{index-13ffe9wp.js → index-2gh9sndr.js} +4 -4
  22. package/{index-ahemdr5n.js → index-4dn1p115.js} +3 -3
  23. package/{index-ygn77a5w.js → index-9629w7ns.js} +5 -3
  24. package/{index-ddxvdd1p.js → index-aadpbnt2.js} +5 -5
  25. package/{index-xsjh6nzh.js → index-aaz7n8s2.js} +3 -3
  26. package/{index-9d9bgcx4.js → index-ga6hygxr.js} +514 -480
  27. package/{index-ztp3e73t.js → index-hb8sgepf.js} +1 -1
  28. package/{index-xqpzbab5.js → index-m0ms3n1c.js} +7 -7
  29. package/{index-ww4z397j.js → index-m79y8b2h.js} +82 -168
  30. package/{index-as7xmyz8.js → index-mgfx3mfs.js} +5 -4
  31. package/{index-3sq321ak.js → index-pp54p5zk.js} +2 -2
  32. package/{index-xqjwd384.js → index-q44jbw48.js} +1 -1
  33. package/{index-w2zdcw3k.js → index-rmcw8yc8.js} +1 -1
  34. package/{index-dzf3r49a.js → index-rnt66vym.js} +1 -1
  35. package/{index-8sf7wmdr.js → index-sz0myv9k.js} +5 -5
  36. package/{index-8mna0947.js → index-tgjy8xf3.js} +4 -4
  37. package/{index-nv5976x3.js → index-vj1cwwy5.js} +24 -13
  38. package/{index-przybvy5.js → index-wp43xrjv.js} +4 -4
  39. package/{index-31yr441d.js → index-ya5qbmyg.js} +3 -3
  40. package/{index-axzjaqve.js → index-yjkte9aj.js} +5 -4
  41. package/index-ys6f0bvh.js +471 -0
  42. package/{index-myhc3c1j.js → index-yy4s1j72.js} +1 -1
  43. package/index.js +21 -21
  44. package/{library.command-1gx04jgn.js → library.command-ccb1cp92.js} +3 -3
  45. package/{localRegistry.command-zndxj1q6.js → localRegistry.command-pgbr7vjj.js} +8 -7
  46. package/{module.command-3waddk95.js → module.command-5k6h407d.js} +5 -5
  47. package/{package.command-zrc7br1y.js → package.command-e6ntvpez.js} +3 -3
  48. package/package.json +2 -3
  49. package/{page.command-vpjgardh.js → page.command-v4f90wb8.js} +3 -3
  50. package/{primitive.command-sz84tk4t.js → primitive.command-g6km57q5.js} +6 -6
  51. package/{quality.command-g869hafs.js → quality.command-de3p36pz.js} +5 -4
  52. package/{repair.command-chsnjvvv.js → repair.command-d3x1javq.js} +5 -5
  53. package/{scalar.command-2v21newx.js → scalar.command-7ezrac2b.js} +4 -4
  54. package/{subspace.command-ckcbwfp1.js → subspace.command-g2tq9nrn.js} +4 -4
  55. package/templates/workspaceRoot/.gitignore.template +0 -1
  56. package/{tunnel.command-kd2yr4fx.js → tunnel.command-hsrv2mny.js} +2 -2
  57. package/{workflow.command-44252cqv.js → workflow.command-z2p32nmf.js} +10 -10
  58. package/{workspace.command-fqcztt5p.js → workspace.command-s82wd61q.js} +20 -20
  59. package/applicationReleasePackager-esnrphw8.js +0 -224
  60. package/capacitorApp-1synz4en.js +0 -11
  61. package/cloud.script-bkbpcr96.js +0 -19
  62. package/context.runner-k99nb5pk.js +0 -21
  63. package/index-5e0n4hqx.js +0 -75
  64. package/index-mxav6j3c.js +0 -1377
@@ -116,7 +116,7 @@ class SubagentPool2 {
116
116
  }
117
117
  }
118
118
  async#run(id, kind, prompt, signal) {
119
- const { CodeAgent } = await import("./CodeAgent-awv258wb.js");
119
+ const { CodeAgent } = await import("./CodeAgent-0dh9fzzg.js");
120
120
  const budget = this.#options.parent.tools.subagent;
121
121
  const child = SubagentPool2.childOf(this.#options.parent, kind);
122
122
  const agent = await CodeAgent.create({
@@ -22,26 +22,26 @@ import {
22
22
  renderWorkflowApply,
23
23
  renderWorkflowValidation,
24
24
  renderWorkflowRunArtifact
25
- } from "./index-myhc3c1j.js";
25
+ } from "./index-yy4s1j72.js";
26
26
  import {
27
27
  AkanContextAnalyzer
28
- } from "./index-ygn77a5w.js";
28
+ } from "./index-9629w7ns.js";
29
29
  import {
30
30
  CommandContainer,
31
31
  runner
32
- } from "./index-w2zdcw3k.js";
32
+ } from "./index-rmcw8yc8.js";
33
33
  import {
34
34
  ModuleScript
35
- } from "./index-8mna0947.js";
35
+ } from "./index-tgjy8xf3.js";
36
36
  import {
37
37
  PrimitiveScript
38
- } from "./index-przybvy5.js";
38
+ } from "./index-wp43xrjv.js";
39
39
  import {
40
40
  spawnShell
41
- } from "./index-31yr441d.js";
41
+ } from "./index-ya5qbmyg.js";
42
42
  import {
43
43
  ScalarScript
44
- } from "./index-3sq321ak.js";
44
+ } from "./index-pp54p5zk.js";
45
45
 
46
46
  // pkgs/@akanjs/cli/workflow/workflow.runner.ts
47
47
  import { mkdir, readFile, writeFile } from "fs/promises";
@@ -36,26 +36,27 @@ import {
36
36
  import {
37
37
  runner,
38
38
  script
39
- } from "./index-w2zdcw3k.js";
39
+ } from "./index-rmcw8yc8.js";
40
40
  import {
41
41
  WorkspaceExecutor,
42
42
  AppExecutor,
43
43
  LibExecutor,
44
44
  PkgExecutor
45
- } from "./index-9d9bgcx4.js";
45
+ } from "./index-ga6hygxr.js";
46
46
  import {
47
47
  LibraryScript
48
- } from "./index-5pc1qrbv.js";
48
+ } from "./index-1db2cw0y.js";
49
+ import {
50
+ resolveMobileTargets,
51
+ NativeApp
52
+ } from "./index-ys6f0bvh.js";
49
53
  import {
50
54
  stripAnsi
51
55
  } from "./index-7md2g9vw.js";
52
56
  import {
53
57
  SlicePlanner,
54
58
  formatSlicePlan
55
- } from "./index-xqjwd384.js";
56
- import {
57
- resolveMobileTargets
58
- } from "./index-5e0n4hqx.js";
59
+ } from "./index-q44jbw48.js";
59
60
  import {
60
61
  openBrowser
61
62
  } from "./index-9dp031by.js";
@@ -1695,9 +1696,7 @@ ${uniqueCandidates.map((candidate) => ` - ${candidate}`).join(`
1695
1696
 
1696
1697
  // pkgs/@akanjs/cli/application/application.runner.ts
1697
1698
  import { Logger as Logger3 } from "akanjs/common";
1698
- var loadBuildRunner = async () => (await import("./applicationBuildRunner-ybyp97pv.js")).ApplicationBuildRunner;
1699
- var loadReleasePackager = async () => (await import("./applicationReleasePackager-esnrphw8.js")).ApplicationReleasePackager;
1700
- var loadCapacitorApp = async () => (await import("./capacitorApp-1synz4en.js")).CapacitorApp;
1699
+ var loadBuildRunner = async () => (await import("./applicationBuildRunner-38exmejd.js")).ApplicationBuildRunner;
1701
1700
  var loadPrompts = async () => await import("@inquirer/prompts");
1702
1701
 
1703
1702
  class ApplicationRunner extends runner("application") {
@@ -1889,65 +1888,68 @@ try {
1889
1888
  setTimeout(() => openBrowser(`http://localhost:${env.AKAN_PUBLIC_CLIENT_PORT ?? env.PORT ?? "8282"}`), 3000);
1890
1889
  return appHost;
1891
1890
  }
1892
- async buildIos(app, { target, env = "debug", regenerate = false } = {}) {
1891
+ async buildMobile(app, platform, { target, env = "debug", profile = "release" } = {}) {
1893
1892
  const targets = await resolveMobileTargets(app, target);
1894
1893
  await this.#buildMobileCsr(app, env);
1895
1894
  await this.#runMobileTargets(targets, async (mobileTarget) => {
1896
- await new (await loadCapacitorApp())(app, mobileTarget.config).buildIos({ env, regenerate });
1895
+ this.#reportBuild(app, mobileTarget, await new NativeApp(app, mobileTarget).build(platform, { profile }));
1897
1896
  });
1898
1897
  }
1899
- async startIos(app, {
1900
- open = false,
1901
- operation = "local",
1902
- env = "local",
1903
- target,
1904
- device,
1905
- regenerate = false,
1906
- noAllowProvisioningUpdates = false
1907
- } = {}) {
1898
+ async startMobile(app, platform, { target, env = "local", operation = "local", device, teamId } = {}) {
1908
1899
  const targets = await resolveMobileTargets(app, target);
1909
- if (operation === "release")
1900
+ const [mobileTarget] = targets;
1901
+ if (!mobileTarget || targets.length > 1)
1902
+ throw new Error(`start-${platform === "ios" || platform === "android" ? platform : "desktop"} runs one mobile target at a time; pass --target <name>.`);
1903
+ const nativeApp = new NativeApp(app, mobileTarget);
1904
+ const selection = { ...device ? { device } : {}, ...teamId ? { teamId } : {} };
1905
+ if (operation === "release") {
1910
1906
  await this.#buildMobileCsr(app, env);
1911
- await this.#runMobileTargets(targets, async (mobileTarget) => {
1912
- const capacitorApp = new (await loadCapacitorApp())(app, mobileTarget.config);
1913
- await capacitorApp.runIos({ operation, env, regenerate, noAllowProvisioningUpdates, iosDeviceId: device });
1914
- if (open)
1915
- await capacitorApp.openIos();
1907
+ const running = await nativeApp.run(platform, { ...selection, profile: "release" });
1908
+ await running.exited;
1909
+ return;
1910
+ }
1911
+ const upstream = `http://localhost:${await app.getDevPort()}`;
1912
+ if (!await ApplicationRunner.#answers(upstream))
1913
+ throw new Error(`No dev server answers on ${upstream}; run \`akan start ${app.name}\` first.`);
1914
+ const { i18n } = await app.getConfig();
1915
+ const session = await nativeApp.dev(platform, { upstream, lang: i18n.defaultLocale, ...selection });
1916
+ app.log(`${app.name}/${mobileTarget.name} on ${platform} follows ${upstream} through ${session.gateway}.`);
1917
+ process.once("SIGINT", () => {
1918
+ session.stop().finally(() => process.exit(130));
1916
1919
  });
1920
+ await session.exited;
1917
1921
  }
1918
- async releaseIos(app, { target, env = "main", regenerate = false } = {}) {
1919
- const targets = await resolveMobileTargets(app, target);
1920
- await this.#buildMobileCsr(app, env);
1921
- for (const mobileTarget of targets) {
1922
- await new (await loadCapacitorApp())(app, mobileTarget.config).buildIos({ env, regenerate });
1922
+ async startDesktop(app, options = {}) {
1923
+ await this.startMobile(app, NativeApp.desktopPlatform(), options);
1924
+ }
1925
+ static async#answers(url) {
1926
+ try {
1927
+ await fetch(url, { signal: AbortSignal.timeout(3000) });
1928
+ return true;
1929
+ } catch {
1930
+ return false;
1923
1931
  }
1924
1932
  }
1925
- async buildAndroid(app, { target, env = "debug", regenerate = false } = {}) {
1933
+ async releaseIos(app, { target, env = "main", teamId, adHoc = false } = {}) {
1926
1934
  const targets = await resolveMobileTargets(app, target);
1927
1935
  await this.#buildMobileCsr(app, env);
1928
- await this.#runMobileTargets(targets, async (mobileTarget) => {
1929
- await new (await loadCapacitorApp())(app, mobileTarget.config).buildAndroid("apk", { env, regenerate });
1930
- });
1931
- }
1932
- async startAndroid(app, { open = false, operation = "local", env = "local", target, regenerate = false } = {}) {
1933
- const targets = await resolveMobileTargets(app, target);
1934
- if (operation === "release")
1935
- await this.#buildMobileCsr(app, env);
1936
- await this.#runMobileTargets(targets, async (mobileTarget) => {
1937
- const capacitorApp = new (await loadCapacitorApp())(app, mobileTarget.config);
1938
- await capacitorApp.runAndroid({ operation, env, regenerate });
1939
- if (open)
1940
- await capacitorApp.openAndroid();
1941
- });
1936
+ for (const mobileTarget of targets)
1937
+ this.#reportBuild(app, mobileTarget, await new NativeApp(app, mobileTarget).releaseIos({ teamId, adHoc }));
1942
1938
  }
1943
- async releaseAndroid(app, assembleType, { target, env = "main", regenerate = false } = {}) {
1939
+ async releaseAndroid(app, format, { target, env = "main" } = {}) {
1944
1940
  const targets = await resolveMobileTargets(app, target);
1941
+ NativeApp.androidSigning();
1945
1942
  await this.#buildMobileCsr(app, env);
1946
- for (const mobileTarget of targets) {
1947
- await new (await loadCapacitorApp())(app, mobileTarget.config).buildAndroid(assembleType, { env, regenerate });
1948
- app.log(`Release Android ${app.name}/${mobileTarget.name} ${assembleType} Completed.`);
1949
- app.log(`Path : ${app.cwdPath}/android/app/build/outputs/${assembleType === "apk" ? "apk" : "bundle"}/release`);
1950
- }
1943
+ for (const mobileTarget of targets)
1944
+ this.#reportBuild(app, mobileTarget, await new NativeApp(app, mobileTarget).releaseAndroid({ formats: [format] }));
1945
+ }
1946
+ #reportBuild(app, mobileTarget, { artifacts, warnings, signing }) {
1947
+ for (const warning of warnings)
1948
+ app.logger.warn(warning);
1949
+ if (signing)
1950
+ app.log(`Signed with ${signing.identity} (${signing.profile}, team ${signing.teamId})`);
1951
+ for (const artifact of artifacts)
1952
+ app.log(`${app.name}/${mobileTarget.name} ${artifact.kind}: ${artifact.path}`);
1951
1953
  }
1952
1954
  async#buildMobileCsr(app, env) {
1953
1955
  const prevEnv = {
@@ -1990,17 +1992,6 @@ try {
1990
1992
  }
1991
1993
  throw new Error(`${failures.length}/${results.length} mobile targets failed`);
1992
1994
  }
1993
- async codepush(app) {
1994
- throw new Error(`akan codepush is still in development and deploys nothing yet, so ${app.name} was not updated. To release the app's source with OTA update support, run \`akan release-source ${app.name}\`.`);
1995
- }
1996
- async#initCapacitorApp(app) {
1997
- const [target] = await resolveMobileTargets(app, undefined);
1998
- if (!target)
1999
- throw new Error(`No mobile target configured for ${app.name}`);
2000
- const capacitorApp = new (await loadCapacitorApp())(app, target.config);
2001
- await capacitorApp.init();
2002
- return capacitorApp;
2003
- }
2004
1995
  #getLocalDatabaseServices(mode) {
2005
1996
  if (mode === "single")
2006
1997
  return [];
@@ -2056,22 +2047,6 @@ ${detail}`
2056
2047
  async dbdown(workspace) {
2057
2048
  await workspace.spawn(`docker`, ["compose", "down"], { cwd: `${workspace.workspaceRoot}/local` });
2058
2049
  }
2059
- async configureApp(app) {
2060
- const capacitorApp = await this.#initCapacitorApp(app);
2061
- if (await (await loadPrompts()).confirm({ message: "want to add camera permission?" }))
2062
- await capacitorApp.addCamera();
2063
- if (await (await loadPrompts()).confirm({ message: "want to add contact permission?" }))
2064
- await capacitorApp.addContact();
2065
- if (await (await loadPrompts()).confirm({ message: "want to add location permission?" }))
2066
- await capacitorApp.addLocation();
2067
- await capacitorApp.save();
2068
- }
2069
- async releaseSource(app, { rebuild, buildNum = 0, environment = "debug", local = true } = {}) {
2070
- const packager = new (await loadReleasePackager())(app, { build: () => this.build(app).then(() => {
2071
- return;
2072
- }) });
2073
- await packager.releaseSource({ rebuild, buildNum, environment, local });
2074
- }
2075
2050
  }
2076
2051
 
2077
2052
  // pkgs/@akanjs/cli/application/hostProcessProbe.ts
@@ -2884,21 +2859,6 @@ class ApplicationScript extends script("application", [ApplicationRunner, Librar
2884
2859
  throw new Error(`Database mode '${databaseMode}' requires missing dependencies: ${installSpecs.join(", ")}.`);
2885
2860
  await this.#addDependencies(app, installSpecs, `database dependencies for ${databaseMode} mode`);
2886
2861
  }
2887
- async confirmMobileDependencyInstall(installSpecs) {
2888
- return await confirm({
2889
- message: `Mobile builds require missing dependencies: ${installSpecs.join(", ")}. Install them now?`,
2890
- default: true
2891
- });
2892
- }
2893
- async syncMobileDependencies(app, akanConfig) {
2894
- const installSpecs = akanConfig.getMissingMobileDependencySpecs();
2895
- if (installSpecs.length === 0)
2896
- return;
2897
- const shouldInstall = await this.confirmMobileDependencyInstall(installSpecs);
2898
- if (!shouldInstall)
2899
- throw new Error(`Mobile builds require missing dependencies: ${installSpecs.join(", ")}.`);
2900
- await this.#addDependencies(app, installSpecs, "mobile dependencies");
2901
- }
2902
2862
  async#addDependencies(app, installSpecs, what) {
2903
2863
  const spinner = app.workspace.spinning(`Installing ${what}...`);
2904
2864
  try {
@@ -2910,27 +2870,6 @@ class ApplicationScript extends script("application", [ApplicationRunner, Librar
2910
2870
  throw error;
2911
2871
  }
2912
2872
  }
2913
- async syncMobileAppCapacitorPlugins(app, akanConfig) {
2914
- const plugins = akanConfig.getMobileAppCapacitorPlugins();
2915
- if (plugins.length === 0)
2916
- return;
2917
- const packageJson = await app.getPackageJson({ refresh: true });
2918
- const dependencies = packageJson.dependencies ?? {};
2919
- const missing = plugins.filter((plugin) => !dependencies[plugin]);
2920
- if (missing.length === 0)
2921
- return;
2922
- const spinner = app.workspace.spinning(`Adding default Capacitor plugins to ${app.name}...`);
2923
- try {
2924
- packageJson.dependencies = { ...dependencies, ...Object.fromEntries(missing.map((plugin) => [plugin, "*"])) };
2925
- await app.setPackageJson(packageJson);
2926
- await app.workspace.spawn("bun", ["install"], { stdio: "inherit" });
2927
- await app.getPackageJson({ refresh: true });
2928
- spinner.succeed(`Added default Capacitor plugins to ${app.name}: ${missing.join(", ")}`);
2929
- } catch (error) {
2930
- spinner.fail(`Failed to add default Capacitor plugins to ${app.name}`);
2931
- throw error;
2932
- }
2933
- }
2934
2873
  async createApplication(appName, workspace, { start = false, libs = [] } = {}) {
2935
2874
  const spinner = workspace.spinning("Creating application...");
2936
2875
  const app = await this.applicationRunner.createApplication(appName, workspace, libs);
@@ -3107,72 +3046,47 @@ class ApplicationScript extends script("application", [ApplicationRunner, Librar
3107
3046
  started = true;
3108
3047
  return started;
3109
3048
  }
3110
- async buildIos(app, { write = true, target, env = "debug", regenerate = false } = {}) {
3049
+ async buildIos(app, { write = true, ...options } = {}) {
3111
3050
  await app.scanSync({ write });
3112
- await this.applicationRunner.buildIos(app, { target, env, regenerate });
3051
+ await this.applicationRunner.buildMobile(app, "ios", options);
3113
3052
  }
3114
- async startIos(app, {
3115
- open = false,
3116
- operation = "local",
3117
- env = "local",
3118
- write = true,
3119
- target,
3120
- device,
3121
- regenerate = false,
3122
- noAllowProvisioningUpdates = false
3123
- } = {}) {
3053
+ async buildAndroid(app, { write = true, ...options } = {}) {
3124
3054
  await app.scanSync({ write });
3125
- const akanConfig = await app.getConfig();
3126
- await this.syncMobileDependencies(app, akanConfig);
3127
- await this.syncMobileAppCapacitorPlugins(app, akanConfig);
3128
- await this.applicationRunner.startIos(app, {
3129
- open,
3130
- operation,
3131
- env,
3132
- target,
3133
- device,
3134
- regenerate,
3135
- noAllowProvisioningUpdates
3136
- });
3055
+ await this.applicationRunner.buildMobile(app, "android", options);
3137
3056
  }
3138
- async releaseIos(app, { write = true, target, env = "main", regenerate = false, allowLocalRelease = false } = {}) {
3057
+ async startIos(app, { write = true, ...options } = {}) {
3139
3058
  await app.scanSync({ write });
3140
- if (env === "local" && !allowLocalRelease)
3141
- throw new Error("releaseIos --env local is blocked. Pass allowLocalRelease only for explicit local release testing.");
3142
- await this.applicationRunner.releaseIos(app, { target, env, regenerate });
3059
+ await this.applicationRunner.startMobile(app, "ios", options);
3143
3060
  }
3144
- async buildAndroid(app, { write = true, target, env = "debug", regenerate = false } = {}) {
3061
+ async startAndroid(app, { write = true, ...options } = {}) {
3145
3062
  await app.scanSync({ write });
3146
- await this.applicationRunner.buildAndroid(app, { target, env, regenerate });
3063
+ await this.applicationRunner.startMobile(app, "android", options);
3147
3064
  }
3148
- async startAndroid(app, {
3149
- open = false,
3150
- operation = "local",
3151
- env = "local",
3065
+ async startDesktop(app, { write = true, ...options } = {}) {
3066
+ await app.scanSync({ write });
3067
+ await this.applicationRunner.startDesktop(app, options);
3068
+ }
3069
+ async releaseIos(app, {
3152
3070
  write = true,
3153
- target,
3154
- regenerate = false
3071
+ allowLocalRelease = false,
3072
+ ...options
3155
3073
  } = {}) {
3156
3074
  await app.scanSync({ write });
3157
- const akanConfig = await app.getConfig();
3158
- await this.syncMobileDependencies(app, akanConfig);
3159
- await this.syncMobileAppCapacitorPlugins(app, akanConfig);
3160
- await this.applicationRunner.startAndroid(app, { open, operation, env, target, regenerate });
3075
+ ApplicationScript.#assertReleaseEnv("releaseIos", options.env ?? "main", allowLocalRelease);
3076
+ await this.applicationRunner.releaseIos(app, options);
3161
3077
  }
3162
- async releaseAndroid(app, assembleType, { write = true, target, env = "main", regenerate = false, allowLocalRelease = false } = {}) {
3078
+ async releaseAndroid(app, format, {
3079
+ write = true,
3080
+ allowLocalRelease = false,
3081
+ ...options
3082
+ } = {}) {
3163
3083
  await app.scanSync({ write });
3164
- if (env === "local" && !allowLocalRelease)
3165
- throw new Error("releaseAndroid --env local is blocked. Pass allowLocalRelease only for explicit local release testing.");
3166
- await this.applicationRunner.releaseAndroid(app, assembleType, { target, env, regenerate });
3084
+ ApplicationScript.#assertReleaseEnv("releaseAndroid", options.env ?? "main", allowLocalRelease);
3085
+ await this.applicationRunner.releaseAndroid(app, format, options);
3167
3086
  }
3168
- async configureApp(app) {
3169
- await this.applicationRunner.configureApp(app);
3170
- }
3171
- async releaseSource(app, options) {
3172
- await this.applicationRunner.releaseSource(app, options);
3173
- }
3174
- async codepush(app) {
3175
- await this.applicationRunner.codepush(app);
3087
+ static #assertReleaseEnv(command, env, allowLocalRelease) {
3088
+ if (env === "local" && !allowLocalRelease)
3089
+ throw new Error(`${command} --env local is blocked. Pass allowLocalRelease only for explicit local release testing.`);
3176
3090
  }
3177
3091
  async transferDatabase(app, direction, dir) {
3178
3092
  await this.applicationRunner.transferDatabase(app, direction, dir);
@@ -2,13 +2,13 @@
2
2
  import {
3
3
  runner,
4
4
  script
5
- } from "./index-w2zdcw3k.js";
5
+ } from "./index-rmcw8yc8.js";
6
6
  import {
7
7
  FileSys2
8
8
  } from "./index-5b6tavv3.js";
9
9
  import {
10
10
  PkgExecutor
11
- } from "./index-9d9bgcx4.js";
11
+ } from "./index-ga6hygxr.js";
12
12
  import {
13
13
  TypeScriptDependencyScanner2
14
14
  } from "./index-3t7g9e4r.js";
@@ -175,8 +175,9 @@ class PackageRunner extends runner("package") {
175
175
  ].filter((dep) => dep !== "akanjs" && dep !== "@akanjs/devkit");
176
176
  }
177
177
  const packageBundledRuntimeDependencies = {
178
- "@akanjs/cli": ["@akanjs/devkit"],
179
- akanjs: ["use-agentic"]
178
+ "@akanjs/cli": ["@akanjs/devkit", "@akanjs/native"],
179
+ "@akanjs/devkit": ["@akanjs/native"],
180
+ akanjs: ["use-agentic", "@akanjs/native"]
180
181
  };
181
182
  const bundledRuntimeDeps = new Set(packageBundledRuntimeDependencies[pkg.name] ?? []);
182
183
  const forcedRuntimeDeps = packageRuntimeDependencies[pkg.name] ?? [];
@@ -2,12 +2,12 @@
2
2
  import {
3
3
  runner,
4
4
  script
5
- } from "./index-w2zdcw3k.js";
5
+ } from "./index-rmcw8yc8.js";
6
6
  import {
7
7
  generatedFilesForSync,
8
8
  createPassedPrimitiveReport,
9
9
  scalarChangedFiles
10
- } from "./index-myhc3c1j.js";
10
+ } from "./index-yy4s1j72.js";
11
11
  import {
12
12
  pluralizeName
13
13
  } from "./index-nz8prx9g.js";
@@ -1,7 +1,7 @@
1
1
  // @bun
2
2
  import {
3
3
  AppInfo
4
- } from "./index-9d9bgcx4.js";
4
+ } from "./index-ga6hygxr.js";
5
5
 
6
6
  // pkgs/@akanjs/devkit/slicePlanner.ts
7
7
  class SlicePlanner {
@@ -10,7 +10,7 @@ import {
10
10
  LibExecutor,
11
11
  PkgExecutor,
12
12
  ModuleExecutor
13
- } from "./index-9d9bgcx4.js";
13
+ } from "./index-ga6hygxr.js";
14
14
 
15
15
  // pkgs/@akanjs/devkit/commandDecorators/camelToKebabCase.ts
16
16
  var camelToKebabCase = (str) => str.replace(/([A-Z])/g, "-$1").toLowerCase();
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  runner,
4
4
  script
5
- } from "./index-w2zdcw3k.js";
5
+ } from "./index-rmcw8yc8.js";
6
6
 
7
7
  // pkgs/@akanjs/cli/page/page.runner.ts
8
8
  class PageRunner extends runner("page") {
@@ -5,19 +5,19 @@ import {
5
5
  } from "./index-22d57v4c.js";
6
6
  import {
7
7
  script
8
- } from "./index-w2zdcw3k.js";
8
+ } from "./index-rmcw8yc8.js";
9
9
  import {
10
10
  PkgExecutor
11
- } from "./index-9d9bgcx4.js";
11
+ } from "./index-ga6hygxr.js";
12
12
  import {
13
13
  ApplicationScript
14
- } from "./index-ww4z397j.js";
14
+ } from "./index-m79y8b2h.js";
15
15
  import {
16
16
  PackageScript
17
- } from "./index-as7xmyz8.js";
17
+ } from "./index-mgfx3mfs.js";
18
18
  import {
19
19
  CloudRunner
20
- } from "./index-axzjaqve.js";
20
+ } from "./index-yjkte9aj.js";
21
21
 
22
22
  // pkgs/@akanjs/cli/cloud/cloud.script.ts
23
23
  import { Logger } from "akanjs/common";
@@ -2,10 +2,10 @@
2
2
  import {
3
3
  runner,
4
4
  script
5
- } from "./index-w2zdcw3k.js";
5
+ } from "./index-rmcw8yc8.js";
6
6
  import {
7
7
  ModuleExecutor
8
- } from "./index-9d9bgcx4.js";
8
+ } from "./index-ga6hygxr.js";
9
9
  import {
10
10
  sourceFile,
11
11
  moduleSourcePaths,
@@ -13,10 +13,10 @@ import {
13
13
  createPassedPrimitiveReport,
14
14
  bilingualLabelForField,
15
15
  bilingualDescriptionForField
16
- } from "./index-myhc3c1j.js";
16
+ } from "./index-yy4s1j72.js";
17
17
  import {
18
18
  PageScript
19
- } from "./index-dzf3r49a.js";
19
+ } from "./index-rnt66vym.js";
20
20
  import {
21
21
  pluralizeName
22
22
  } from "./index-nz8prx9g.js";
@@ -1,13 +1,13 @@
1
1
  // @bun
2
2
  import {
3
3
  AppExecutor
4
- } from "./index-9d9bgcx4.js";
4
+ } from "./index-ga6hygxr.js";
5
5
  import {
6
6
  jsonText,
7
7
  createWorkflowBaselineSummary,
8
8
  buildAkanModuleContextIndex,
9
9
  toolingRolloutGate
10
- } from "./index-myhc3c1j.js";
10
+ } from "./index-yy4s1j72.js";
11
11
  import {
12
12
  buildResourceList,
13
13
  codexMcpConfigPath,
@@ -17,25 +17,24 @@ import {
17
17
  upsertCodexMcpServerBlock,
18
18
  renderDoctorText,
19
19
  AkanContextAnalyzer
20
- } from "./index-ygn77a5w.js";
21
- import {
22
- isPlaceholderAppId2
23
- } from "./index-mxav6j3c.js";
20
+ } from "./index-9629w7ns.js";
24
21
  import {
25
22
  runner
26
- } from "./index-w2zdcw3k.js";
23
+ } from "./index-rmcw8yc8.js";
24
+ import {
25
+ getMobileTargets,
26
+ NativeApp,
27
+ isPlaceholderAppId
28
+ } from "./index-ys6f0bvh.js";
27
29
  import {
28
30
  Prompter2
29
31
  } from "./index-0bq14vr1.js";
30
32
  import {
31
33
  RepairRunner
32
- } from "./index-31yr441d.js";
34
+ } from "./index-ya5qbmyg.js";
33
35
  import {
34
36
  WorkflowRunner
35
- } from "./index-xqpzbab5.js";
36
- import {
37
- getMobileTargets
38
- } from "./index-5e0n4hqx.js";
37
+ } from "./index-m0ms3n1c.js";
39
38
 
40
39
  // pkgs/@akanjs/devkit/akanMcpContract.ts
41
40
  import path from "path";
@@ -589,13 +588,25 @@ class ContextRunner2 extends runner("context") {
589
588
  async#doctorIos(workspace, format) {
590
589
  const appNames = await workspace.getApps();
591
590
  const diagnostics = [];
591
+ let toolchainChecked = false;
592
592
  for (const appName of appNames) {
593
593
  const app = AppExecutor.from(workspace, appName);
594
594
  const config = await app.getConfig();
595
595
  if (!config.hasMobileConfig)
596
596
  continue;
597
+ if (!toolchainChecked) {
598
+ toolchainChecked = true;
599
+ const report = await NativeApp.doctor(app.cwdPath, ["ios"]);
600
+ for (const check of report.checks.filter((check) => !check.ok || check.warn))
601
+ diagnostics.push({
602
+ severity: check.ok ? "warning" : "error",
603
+ code: "native-toolchain",
604
+ path: `${check.group} \u203A ${check.name}`,
605
+ message: [check.detail, check.hint].filter(Boolean).join(" ")
606
+ });
607
+ }
597
608
  for (const { name, config: target } of await getMobileTargets(app)) {
598
- if (!isPlaceholderAppId2(target.appId))
609
+ if (!isPlaceholderAppId(target.appId))
599
610
  continue;
600
611
  diagnostics.push({
601
612
  severity: "warning",
@@ -1,12 +1,12 @@
1
1
  // @bun
2
2
  import {
3
3
  script
4
- } from "./index-w2zdcw3k.js";
4
+ } from "./index-rmcw8yc8.js";
5
5
  import {
6
6
  AppExecutor,
7
7
  LibExecutor,
8
8
  ModuleExecutor
9
- } from "./index-9d9bgcx4.js";
9
+ } from "./index-ga6hygxr.js";
10
10
  import {
11
11
  workflowStatus,
12
12
  compactDiagnostics,
@@ -41,10 +41,10 @@ import {
41
41
  hasSignalFactoryEntry,
42
42
  insertSignalFactoryEntry,
43
43
  addFieldUiPolicyForType
44
- } from "./index-myhc3c1j.js";
44
+ } from "./index-yy4s1j72.js";
45
45
  import {
46
46
  ModuleScript
47
- } from "./index-8mna0947.js";
47
+ } from "./index-tgjy8xf3.js";
48
48
 
49
49
  // pkgs/@akanjs/cli/primitive/primitive.script.ts
50
50
  import { capitalize, lowerlize } from "akanjs/common";
@@ -5,13 +5,13 @@ import {
5
5
  writeGeneratedSyncState,
6
6
  createRepairReport,
7
7
  renderRepairReport
8
- } from "./index-myhc3c1j.js";
8
+ } from "./index-yy4s1j72.js";
9
9
  import {
10
10
  AkanContextAnalyzer
11
- } from "./index-ygn77a5w.js";
11
+ } from "./index-9629w7ns.js";
12
12
  import {
13
13
  runner
14
- } from "./index-w2zdcw3k.js";
14
+ } from "./index-rmcw8yc8.js";
15
15
 
16
16
  // pkgs/@akanjs/cli/repair/repair.runner.ts
17
17
  var spawnShell = async (workspace, command) => await workspace.spawn("bash", ["-lc", command.startsWith("akan ") ? `bun run ${command}` : command], {