@akanjs/cli 3.1.0-rc.2 → 3.1.0-rc.20

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 (100) hide show
  1. package/.build-stamp +1 -1
  2. package/{CodeAgent-q50k4s45.js → CodeAgent-n3tzjm91.js} +2 -2
  3. package/{CodeAgentRpcHost-p7h6n2hp.js → CodeAgentRpcHost-9g27hmer.js} +1 -1
  4. package/{CodeTui-62g35ztk.js → CodeTui-fnm9ft4d.js} +47 -4
  5. package/TunnelShare-661cxz5e.js +14 -0
  6. package/{agent.command-adfd5299.js → agent.command-3qxf4xcj.js} +5 -5
  7. package/akanCode.js +7 -5
  8. package/{application.command-hj3gv1rx.js → application.command-zfja7x4r.js} +12 -11
  9. package/{applicationBuildRunner-by10r9gf.js → applicationBuildRunner-vh4j6vdv.js} +16 -9
  10. package/buildBatch.proc.js +7 -7
  11. package/{cloud.command-k2fhaape.js → cloud.command-fcc8e8tp.js} +17 -16
  12. package/cloud.script-1xt3tnts.js +24 -0
  13. package/{code.command-kt5zgcc2.js → code.command-130bdmhe.js} +25 -12
  14. package/{context.command-8fgn42jw.js → context.command-0qx447mb.js} +17 -16
  15. package/context.runner-1vsjztjg.js +25 -0
  16. package/{dependencyScanner-06z2dmrr.js → dependencyScanner-3afj2vt1.js} +1 -1
  17. package/{guideline.command-3yxxr2mm.js → guideline.command-cv5bmrx2.js} +2 -2
  18. package/guidelines/agentRule/agentRule.instruction.md +25 -10
  19. package/guidelines/conventions/conventions.instruction.md +463 -1084
  20. package/guidelines/cssRule/cssRule.instruction.md +16 -1
  21. package/guidelines/fieldRule/fieldRule.instruction.md +74 -0
  22. package/guidelines/framework/framework.instruction.md +4 -7
  23. package/guidelines/mcpRule/mcpRule.instruction.md +16 -9
  24. package/guidelines/modelConstant/modelConstant.instruction.md +2 -1
  25. package/guidelines/modelStore/modelStore.instruction.md +16 -0
  26. package/guidelines/pageRule/pageRule.instruction.md +80 -0
  27. package/guidelines/queryRule/queryRule.instruction.md +47 -12
  28. package/guidelines/runtimeRule/runtimeRule.instruction.md +89 -2
  29. package/guidelines/ssrRule/ssrRule.instruction.md +13 -0
  30. package/guidelines/transportRule/transportRule.instruction.md +107 -8
  31. package/guidelines/workspaceOnboarding/workspaceOnboarding.instruction.md +4 -4
  32. package/guidelines/workspaceRecipes/workspaceRecipes.instruction.md +70 -7
  33. package/incrementalBuilder.proc.js +4 -4
  34. package/{index-nq045px5.js → index-192ha4xh.js} +356 -307
  35. package/{index-t7nws9mx.js → index-1djcjcre.js} +661 -448
  36. package/{index-h85cxfkg.js → index-1p98exm2.js} +2 -2
  37. package/{index-hnby7p9n.js → index-1xj2t7cb.js} +7 -7
  38. package/{index-wa5jbxj1.js → index-2mrn1mrg.js} +1 -0
  39. package/{index-58vvz603.js → index-35hc95h5.js} +1 -1
  40. package/{index-tv8fjaba.js → index-4mhy6qme.js} +4 -4
  41. package/{index-rk9sdys3.js → index-5edzv8fn.js} +5 -5
  42. package/{index-k9rrten6.js → index-5nd1wtkv.js} +92 -94
  43. package/index-62md4dwy.js +260 -0
  44. package/{index-kc8z134d.js → index-665zp9rs.js} +38 -15
  45. package/{index-jwqtchha.js → index-86jt2a0e.js} +1 -1
  46. package/{index-d2242ksy.js → index-at7bz0xq.js} +3 -0
  47. package/{index-sqfdmb5b.js → index-awbdfcf2.js} +4 -4
  48. package/{index-azh29dc8.js → index-axs61rna.js} +19 -14
  49. package/{index-3hx1z96c.js → index-bqbf654f.js} +1 -1
  50. package/{index-6726qr1m.js → index-cpb3nvma.js} +57 -58
  51. package/{index-pyxn1b53.js → index-d72hfmdm.js} +13 -13
  52. package/{index-8zdwpxef.js → index-dye8pnxx.js} +119 -81
  53. package/{index-z507nzhg.js → index-fmzcs8v6.js} +4 -4
  54. package/{index-3reaaa1h.js → index-fyq1z6kt.js} +29 -27
  55. package/{index-0909wckt.js → index-g1mbppa9.js} +238 -236
  56. package/{index-fjsv10hd.js → index-hsadfb6c.js} +7 -7
  57. package/{index-tz5evhdr.js → index-j237xtew.js} +6 -6
  58. package/{index-nq2ja5e0.js → index-j4mkhz93.js} +3 -3
  59. package/{index-31ce9vhg.js → index-jw1zm273.js} +28 -30
  60. package/{index-q958tqqg.js → index-m9jj544v.js} +1 -1
  61. package/{index-8935h3n1.js → index-mdjc93e1.js} +1 -1
  62. package/{index-bea2gwc6.js → index-pydbnfez.js} +2 -2
  63. package/{index-20cebtth.js → index-qtfmtcrw.js} +17 -15
  64. package/{index-sby8fe1p.js → index-qwa5k1j8.js} +1 -1
  65. package/{index-e9prnmyt.js → index-tamvyvj3.js} +3 -3
  66. package/{index-rhbabmja.js → index-trpasv9q.js} +260 -259
  67. package/{index-2ahj896a.js → index-tvehn2sp.js} +1 -1
  68. package/{index-2etqq75t.js → index-va06nr10.js} +1090 -1078
  69. package/{index-g0vwzy9m.js → index-vk0pa0mn.js} +20 -21
  70. package/{index-xpdgxsj5.js → index-w44cy4vs.js} +2216 -2216
  71. package/index.js +22 -22
  72. package/{library.command-8tw59xzj.js → library.command-erp2f56n.js} +3 -3
  73. package/{localRegistry.command-tf3dmznd.js → localRegistry.command-hj3p16p5.js} +15 -14
  74. package/{module.command-9vm8hffy.js → module.command-gs2r615e.js} +5 -5
  75. package/{package.command-erbxe2tz.js → package.command-j10r76ax.js} +4 -4
  76. package/package.json +21 -21
  77. package/{page.command-jpavcj0p.js → page.command-4h4a8pnh.js} +3 -3
  78. package/{pipeline.command-b8rzvjvv.js → pipeline.command-a2nrk26m.js} +3 -3
  79. package/{primitive.command-sm32chzk.js → primitive.command-w6t0asqz.js} +6 -6
  80. package/{projectTypecheck-jamtx95x.js → projectTypecheck-f534enqj.js} +1 -1
  81. package/{quality.command-pkd17n6y.js → quality.command-77x7vbbx.js} +4 -4
  82. package/{repair.command-8y4mq6hs.js → repair.command-y6sstev7.js} +5 -5
  83. package/{scalar.command-q8khmyx5.js → scalar.command-20b8cy0k.js} +4 -4
  84. package/skills/akan-code/SKILL.md +4 -0
  85. package/skills/akan-store/SKILL.md +2 -1
  86. package/{subspace.command-51n0ykbx.js → subspace.command-baz73jpk.js} +11 -10
  87. package/templates/appSample/lib/task/Task.Util.tsx +7 -7
  88. package/templates/appSample/lib/task/Task.Zone.tsx +1 -1
  89. package/templates/appSample/ui/QuantityControl.tsx +2 -2
  90. package/templates/crudSinglePage/page.tsx +1 -1
  91. package/templates/lib/cnst.ts +0 -1
  92. package/templates/workspaceRoot/.gitignore.template +23 -52
  93. package/templates/workspaceRoot/biome.json.template +1 -1
  94. package/{tunnel.command-7820vtxq.js → tunnel.command-2kw8vt9g.js} +8 -7
  95. package/{workflow.command-n5sv4wqz.js → workflow.command-2djwmpqf.js} +10 -10
  96. package/{workspace.command-zdy60jh8.js → workspace.command-jqs7vjhe.js} +29 -28
  97. package/TunnelShare-f1egrktx.js +0 -13
  98. package/cloud.script-z8p5dz7e.js +0 -23
  99. package/context.runner-hnh0rg7m.js +0 -24
  100. package/index-n68jx79w.js +0 -120
@@ -1,7 +1,70 @@
1
1
  // @bun
2
2
  import {
3
3
  ConfigLock
4
- } from "./index-3hx1z96c.js";
4
+ } from "./index-bqbf654f.js";
5
+
6
+ // pkgs/@akanjs/devkit/codeAgent/agent/AkanCodeCompaction.ts
7
+ class AkanCodeCompaction2 {
8
+ static reserveFloor = 32768;
9
+ static steps = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100];
10
+ static isStep(percent) {
11
+ return AkanCodeCompaction2.steps.some((step) => step === percent);
12
+ }
13
+ static normalize(percent) {
14
+ if (percent === undefined)
15
+ return;
16
+ if (!AkanCodeCompaction2.isStep(percent))
17
+ throw new Error(`Autocompact takes a percent in steps of 10: ${AkanCodeCompaction2.steps.join(", ")}.`);
18
+ return percent === 100 ? undefined : percent;
19
+ }
20
+ static thresholdOf(contextWindow, percent) {
21
+ const share = percent ? Math.floor(contextWindow * percent / 100) : contextWindow;
22
+ return Math.min(share, contextWindow - AkanCodeCompaction2.reserveFloor);
23
+ }
24
+ static apply(settings, model, percent) {
25
+ const threshold = AkanCodeCompaction2.thresholdOf(model.contextWindow, percent);
26
+ settings.applyOverrides({
27
+ compaction: {
28
+ modelOverrides: { [`${model.provider}/${model.id}`]: { reserveTokens: model.contextWindow - threshold } }
29
+ }
30
+ });
31
+ }
32
+ static problemOf(model, percent, keepRecentTokens) {
33
+ const name = `${model.provider}/${model.id}`;
34
+ if (model.contextWindow <= 0)
35
+ return `${name} declares no context window, so it has no share to compact at.`;
36
+ const threshold = AkanCodeCompaction2.thresholdOf(model.contextWindow, percent);
37
+ if (threshold >= keepRecentTokens)
38
+ return;
39
+ const k = (tokens) => `${Math.round(tokens / 1000)}k`;
40
+ return `Compacting at ${percent}% of the ${k(model.contextWindow)} window of ${name} starts at ${k(threshold)}, under the ${k(keepRecentTokens)} of recent turns every compaction keeps, so every turn would compact again.`;
41
+ }
42
+ }
43
+
44
+ // pkgs/@akanjs/devkit/codeAgent/agent/akanCodePaths.ts
45
+ import { existsSync } from "fs";
46
+ import { homedir } from "os";
47
+ import path from "path";
48
+ var builtinSkillsDir = () => {
49
+ const candidates = [path.join(import.meta.dir, "skills"), path.join(import.meta.dir, "..", "skills")];
50
+ return candidates.find((candidate) => existsSync(candidate));
51
+ };
52
+ var globalDir = () => process.env.AKAN_CODE_HOME ?? path.join(homedir(), ".akan", "code");
53
+ var akanCodePaths2 = {
54
+ workspaceDir: (workspaceRoot) => path.join(workspaceRoot, ".akan", "code"),
55
+ sessionsDir: (workspaceRoot) => path.join(workspaceRoot, ".akan", "code", "sessions"),
56
+ extensionsDir: (workspaceRoot) => path.join(workspaceRoot, ".akan", "code", "extensions"),
57
+ skillsDir: (workspaceRoot) => path.join(workspaceRoot, ".akan", "code", "skills"),
58
+ mailDir: (workspaceRoot) => path.join(workspaceRoot, ".akan", "code", "mail"),
59
+ builtinSkillsDir,
60
+ mcpFile: (workspaceRoot) => path.join(workspaceRoot, ".akan", "code", "mcp.json"),
61
+ globalMcpFile: () => path.join(globalDir(), "mcp.json"),
62
+ globalSkillsDir: () => path.join(globalDir(), "skills"),
63
+ globalDir,
64
+ authFile: () => path.join(globalDir(), "auth.json"),
65
+ mcpAuthFile: () => path.join(globalDir(), "mcpAuth.json"),
66
+ modelsFile: () => path.join(globalDir(), "models.json")
67
+ };
5
68
 
6
69
  // pkgs/@akanjs/devkit/codeAgent/agent/SubagentPool.ts
7
70
  import { codeAgentReadOnlyBuiltins } from "akanjs/common";
@@ -116,7 +179,7 @@ class SubagentPool2 {
116
179
  }
117
180
  }
118
181
  async#run(id, kind, prompt, signal) {
119
- const { CodeAgent } = await import("./CodeAgent-q50k4s45.js");
182
+ const { CodeAgent } = await import("./CodeAgent-n3tzjm91.js");
120
183
  const budget = this.#options.parent.tools.subagent;
121
184
  const child = SubagentPool2.childOf(this.#options.parent, kind);
122
185
  const agent = await CodeAgent.create({
@@ -166,31 +229,6 @@ class SubagentPool2 {
166
229
  }
167
230
  }
168
231
 
169
- // pkgs/@akanjs/devkit/codeAgent/agent/akanCodePaths.ts
170
- import { existsSync } from "fs";
171
- import { homedir } from "os";
172
- import path from "path";
173
- var builtinSkillsDir = () => {
174
- const candidates = [path.join(import.meta.dir, "skills"), path.join(import.meta.dir, "..", "skills")];
175
- return candidates.find((candidate) => existsSync(candidate));
176
- };
177
- var globalDir = () => process.env.AKAN_CODE_HOME ?? path.join(homedir(), ".akan", "code");
178
- var akanCodePaths2 = {
179
- workspaceDir: (workspaceRoot) => path.join(workspaceRoot, ".akan", "code"),
180
- sessionsDir: (workspaceRoot) => path.join(workspaceRoot, ".akan", "code", "sessions"),
181
- extensionsDir: (workspaceRoot) => path.join(workspaceRoot, ".akan", "code", "extensions"),
182
- skillsDir: (workspaceRoot) => path.join(workspaceRoot, ".akan", "code", "skills"),
183
- mailDir: (workspaceRoot) => path.join(workspaceRoot, ".akan", "code", "mail"),
184
- builtinSkillsDir,
185
- mcpFile: (workspaceRoot) => path.join(workspaceRoot, ".akan", "code", "mcp.json"),
186
- globalMcpFile: () => path.join(globalDir(), "mcp.json"),
187
- globalSkillsDir: () => path.join(globalDir(), "skills"),
188
- globalDir,
189
- authFile: () => path.join(globalDir(), "auth.json"),
190
- mcpAuthFile: () => path.join(globalDir(), "mcpAuth.json"),
191
- modelsFile: () => path.join(globalDir(), "models.json")
192
- };
193
-
194
232
  // pkgs/@akanjs/devkit/codeAgent/tools/McpServerConfig.ts
195
233
  import { existsSync as existsSync2, mkdirSync, readFileSync, writeFileSync } from "fs";
196
234
  import path2 from "path";
@@ -283,59 +321,6 @@ class McpServerConfig {
283
321
  }
284
322
  }
285
323
 
286
- // pkgs/@akanjs/devkit/codeAgent/tools/McpTokenStore.ts
287
- import { chmodSync, existsSync as existsSync3, mkdirSync as mkdirSync2, readFileSync as readFileSync2, renameSync, writeFileSync as writeFileSync2 } from "fs";
288
- import path3 from "path";
289
- class McpTokenStore {
290
- static file() {
291
- return akanCodePaths2.mcpAuthFile();
292
- }
293
- static lockFile() {
294
- return `${McpTokenStore.file()}.lock`;
295
- }
296
- static read(name) {
297
- return McpTokenStore.#all()[name];
298
- }
299
- static names() {
300
- return Object.keys(McpTokenStore.#all());
301
- }
302
- static write(name, auth) {
303
- McpTokenStore.#save({ ...McpTokenStore.#all(), [name]: auth });
304
- }
305
- static clear(name) {
306
- const all = McpTokenStore.#all();
307
- if (!(name in all))
308
- return false;
309
- delete all[name];
310
- McpTokenStore.#save(all);
311
- return true;
312
- }
313
- static isExpired(auth) {
314
- return auth.expiresAt !== undefined && auth.expiresAt <= Date.now() + McpTokenStore.skewMs;
315
- }
316
- static skewMs = 60000;
317
- static #all() {
318
- const file = McpTokenStore.file();
319
- if (!existsSync3(file))
320
- return {};
321
- try {
322
- const parsed = JSON.parse(readFileSync2(file, "utf8"));
323
- return parsed.servers ?? {};
324
- } catch {
325
- return {};
326
- }
327
- }
328
- static #save(servers) {
329
- const file = McpTokenStore.file();
330
- mkdirSync2(path3.dirname(file), { recursive: true, mode: 448 });
331
- const temp = `${file}.${process.pid}.tmp`;
332
- writeFileSync2(temp, `${JSON.stringify({ servers }, null, 2)}
333
- `, { mode: 384 });
334
- renameSync(temp, file);
335
- chmodSync(file, 384);
336
- }
337
- }
338
-
339
324
  // pkgs/@akanjs/devkit/codeAgent/tools/McpOAuth.ts
340
325
  import { createHash, randomBytes } from "crypto";
341
326
 
@@ -560,6 +545,59 @@ class McpOAuthLoopback {
560
545
  }
561
546
  }
562
547
 
548
+ // pkgs/@akanjs/devkit/codeAgent/tools/McpTokenStore.ts
549
+ import { chmodSync, existsSync as existsSync3, mkdirSync as mkdirSync2, readFileSync as readFileSync2, renameSync, writeFileSync as writeFileSync2 } from "fs";
550
+ import path3 from "path";
551
+ class McpTokenStore {
552
+ static file() {
553
+ return akanCodePaths2.mcpAuthFile();
554
+ }
555
+ static lockFile() {
556
+ return `${McpTokenStore.file()}.lock`;
557
+ }
558
+ static read(name) {
559
+ return McpTokenStore.#all()[name];
560
+ }
561
+ static names() {
562
+ return Object.keys(McpTokenStore.#all());
563
+ }
564
+ static write(name, auth) {
565
+ McpTokenStore.#save({ ...McpTokenStore.#all(), [name]: auth });
566
+ }
567
+ static clear(name) {
568
+ const all = McpTokenStore.#all();
569
+ if (!(name in all))
570
+ return false;
571
+ delete all[name];
572
+ McpTokenStore.#save(all);
573
+ return true;
574
+ }
575
+ static isExpired(auth) {
576
+ return auth.expiresAt !== undefined && auth.expiresAt <= Date.now() + McpTokenStore.skewMs;
577
+ }
578
+ static skewMs = 60000;
579
+ static #all() {
580
+ const file = McpTokenStore.file();
581
+ if (!existsSync3(file))
582
+ return {};
583
+ try {
584
+ const parsed = JSON.parse(readFileSync2(file, "utf8"));
585
+ return parsed.servers ?? {};
586
+ } catch {
587
+ return {};
588
+ }
589
+ }
590
+ static #save(servers) {
591
+ const file = McpTokenStore.file();
592
+ mkdirSync2(path3.dirname(file), { recursive: true, mode: 448 });
593
+ const temp = `${file}.${process.pid}.tmp`;
594
+ writeFileSync2(temp, `${JSON.stringify({ servers }, null, 2)}
595
+ `, { mode: 384 });
596
+ renameSync(temp, file);
597
+ chmodSync(file, 384);
598
+ }
599
+ }
600
+
563
601
  // pkgs/@akanjs/devkit/codeAgent/tools/McpSignIn.ts
564
602
  class McpSignIn {
565
603
  static #refreshing = new Map;
@@ -697,4 +735,4 @@ ${stored.refreshToken}`;
697
735
  }
698
736
  }
699
737
 
700
- export { SubagentPool2, akanCodePaths2, McpServerConfig, McpTokenStore, McpSignIn };
738
+ export { SubagentPool2, akanCodePaths2, McpServerConfig, McpTokenStore, McpSignIn, AkanCodeCompaction2 };
@@ -2,10 +2,10 @@
2
2
  import {
3
3
  runner,
4
4
  script
5
- } from "./index-31ce9vhg.js";
5
+ } from "./index-jw1zm273.js";
6
6
  import {
7
7
  ModuleExecutor
8
- } from "./index-2etqq75t.js";
8
+ } from "./index-va06nr10.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-rhbabmja.js";
16
+ } from "./index-trpasv9q.js";
17
17
  import {
18
18
  PageScript
19
- } from "./index-jwqtchha.js";
19
+ } from "./index-86jt2a0e.js";
20
20
  import {
21
21
  pluralizeName
22
22
  } from "./index-nz8prx9g.js";
@@ -5,15 +5,15 @@ import {
5
5
  CloudApi,
6
6
  CloudUpdates,
7
7
  PipelineSecrets
8
- } from "./index-6726qr1m.js";
8
+ } from "./index-cpb3nvma.js";
9
9
  import {
10
10
  WorkspaceExecutor,
11
11
  AppExecutor
12
- } from "./index-2etqq75t.js";
12
+ } from "./index-va06nr10.js";
13
13
  import {
14
14
  runner,
15
15
  assertPromptable
16
- } from "./index-31ce9vhg.js";
16
+ } from "./index-jw1zm273.js";
17
17
  import {
18
18
  SubspaceConfig
19
19
  } from "./index-4pf8g7ff.js";
@@ -21,6 +21,25 @@ import {
21
21
  openBrowser
22
22
  } from "./index-9dp031by.js";
23
23
 
24
+ // pkgs/@akanjs/cli/npmRegistry.ts
25
+ var defaultNpmRegistry = "https://registry.npmjs.org";
26
+ var getNpmRegistryUrl = (registryUrl = process.env.AKAN_NPM_REGISTRY ?? defaultNpmRegistry) => registryUrl.replace(/\/+$/, "");
27
+ async function getLatestPackageVersion(packageName, tag = "latest", registryUrl) {
28
+ const registry = getNpmRegistryUrl(registryUrl);
29
+ const url = `${registry}/${encodeURIComponent(packageName).replace(/^%40/, "@")}`;
30
+ const res = await fetch(url);
31
+ if (!res.ok)
32
+ throw new Error(`Failed to fetch ${packageName} metadata from ${registry}`);
33
+ const metadata = await res.json();
34
+ const version = metadata["dist-tags"]?.[tag];
35
+ if (!version)
36
+ throw new Error(`No npm dist-tag "${tag}" found for ${packageName}`);
37
+ return version;
38
+ }
39
+
40
+ // pkgs/@akanjs/cli/cloud/cloud.runner.ts
41
+ import path7 from "path";
42
+
24
43
  // pkgs/@akanjs/devkit/platformTest/PlatformTestRun.ts
25
44
  import path6 from "path";
26
45
  import chalk from "chalk";
@@ -208,11 +227,13 @@ class PlatformTestTarget {
208
227
  const install = await this.exec("bun install --frozen-lockfile", logPath, PlatformTestTarget.installIdleMs);
209
228
  if (install.exitCode === 0)
210
229
  return;
211
- const failedScripts = [...install.output.matchAll(/(?:pre|post)?install script from "([^"]+)" exited/g)].map((match) => match[1] ?? "");
212
- const tolerable = failedScripts.length > 0 && failedScripts.every((pkg) => this.tolerateScriptFailures.includes(pkg));
230
+ const failedPackages = [
231
+ ...install.output.matchAll(/(?:pre|post)?install script from "([^"]+)" exited|failed to link binaries for package: (@?[^@\s]+)@/g)
232
+ ].map((match) => match[1] ?? match[2] ?? "");
233
+ const tolerable = failedPackages.length > 0 && failedPackages.every((pkg) => this.tolerateScriptFailures.includes(pkg));
213
234
  if (!tolerable)
214
235
  throw new Error(`bun install failed \u2014 see ${logPath}`);
215
- envWarnings.push(`install script failed for ${failedScripts.join(", ")} \u2014 tolerated on ${this.platform}`);
236
+ envWarnings.push(`install failed for ${failedPackages.join(", ")} \u2014 tolerated on ${this.platform}`);
216
237
  const relink = await this.exec("bun install --frozen-lockfile --ignore-scripts", this.#logPath(context, "install-relink"), PlatformTestTarget.installIdleMs);
217
238
  if (relink.exitCode !== 0)
218
239
  throw new Error(`bun install --ignore-scripts failed \u2014 see ${logPath}`);
@@ -249,7 +270,7 @@ class LinuxDockerTarget extends PlatformTestTarget {
249
270
  }
250
271
  static dockerfile = [
251
272
  `FROM oven/bun:${Bun.version}-slim`,
252
- "RUN apt-get update && apt-get install -y --no-install-recommends git ca-certificates procps lsof && rm -rf /var/lib/apt/lists/*"
273
+ "RUN sed -i 's|http://|https://|g' /etc/apt/sources.list.d/debian.sources && apt-get update && apt-get install -y --no-install-recommends git ca-certificates procps lsof && rm -rf /var/lib/apt/lists/*"
253
274
  ].join(`
254
275
  `);
255
276
  get image() {
@@ -412,7 +433,7 @@ import path5 from "path";
412
433
  class WindowsSshTarget extends PlatformTestTarget {
413
434
  static utmctlPath = "/Applications/UTM.app/Contents/MacOS/utmctl";
414
435
  static defaultWorkRoot = "C:\\akan-test";
415
- static defaultTolerateScriptFailures = ["sharp", "puppeteer"];
436
+ static defaultTolerateScriptFailures = ["sharp", "puppeteer", "msgpackr"];
416
437
  static #runDirPattern = "^\\d{8}-\\d{6}$";
417
438
  static #keptRuns = 2;
418
439
  platform = "windows";
@@ -653,29 +674,10 @@ class PlatformTestRun {
653
674
  }
654
675
 
655
676
  // pkgs/@akanjs/cli/cloud/cloud.runner.ts
656
- import path7 from "path";
657
677
  import { confirm, input, select } from "@inquirer/prompts";
658
678
  import { Logger, sleep } from "akanjs/common";
659
679
  import chalk2 from "chalk";
660
680
  import * as QRcode from "qrcode";
661
-
662
- // pkgs/@akanjs/cli/npmRegistry.ts
663
- var defaultNpmRegistry = "https://registry.npmjs.org";
664
- var getNpmRegistryUrl = (registryUrl = process.env.AKAN_NPM_REGISTRY ?? defaultNpmRegistry) => registryUrl.replace(/\/+$/, "");
665
- async function getLatestPackageVersion(packageName, tag = "latest", registryUrl) {
666
- const registry = getNpmRegistryUrl(registryUrl);
667
- const url = `${registry}/${encodeURIComponent(packageName).replace(/^%40/, "@")}`;
668
- const res = await fetch(url);
669
- if (!res.ok)
670
- throw new Error(`Failed to fetch ${packageName} metadata from ${registry}`);
671
- const metadata = await res.json();
672
- const version = metadata["dist-tags"]?.[tag];
673
- if (!version)
674
- throw new Error(`No npm dist-tag "${tag}" found for ${packageName}`);
675
- return version;
676
- }
677
-
678
- // pkgs/@akanjs/cli/cloud/cloud.runner.ts
679
681
  var addRemoteEnvServerValue = "__addRemoteEnvServer";
680
682
  var removeRemoteEnvServerValue = "__removeRemoteEnvServer";
681
683