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

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 (76) hide show
  1. package/.build-stamp +1 -1
  2. package/{CodeAgent-q7a4srt6.js → CodeAgent-q50k4s45.js} +2 -2
  3. package/{CodeTui-ak23dxc9.js → CodeTui-62g35ztk.js} +1 -1
  4. package/TunnelShare-f1egrktx.js +13 -0
  5. package/{agent.command-f3gsc1gd.js → agent.command-adfd5299.js} +5 -5
  6. package/akanCode.js +2 -2
  7. package/{application.command-3v2d53gd.js → application.command-hj3gv1rx.js} +52 -41
  8. package/{applicationBuildRunner-1yaqsrdq.js → applicationBuildRunner-by10r9gf.js} +16 -30
  9. package/buildBatch.proc.js +22 -13
  10. package/{cloud.command-kk2rwkvw.js → cloud.command-k2fhaape.js} +60 -63
  11. package/cloud.script-z8p5dz7e.js +23 -0
  12. package/{code.command-30sca09d.js → code.command-kt5zgcc2.js} +6 -6
  13. package/{context.command-k7eqacq6.js → context.command-8fgn42jw.js} +16 -13
  14. package/context.runner-hnh0rg7m.js +24 -0
  15. package/{guideline.command-dtczrqpf.js → guideline.command-3yxxr2mm.js} +2 -2
  16. package/guidelines/conventions/conventions.instruction.md +30 -15
  17. package/guidelines/cssRule/cssRule.instruction.md +12 -6
  18. package/guidelines/mcpRule/mcpRule.instruction.md +32 -11
  19. package/guidelines/runtimeRule/runtimeRule.instruction.md +24 -15
  20. package/guidelines/transportRule/transportRule.instruction.md +28 -5
  21. package/incrementalBuilder.proc.js +9 -6
  22. package/{index-kjvrq3nc.js → index-0909wckt.js} +361 -282
  23. package/{index-p9ystjrp.js → index-20cebtth.js} +92 -52
  24. package/{index-55mynnqs.js → index-2etqq75t.js} +455 -206
  25. package/{index-6jjtnhkw.js → index-31ce9vhg.js} +51 -9
  26. package/{index-y8q31011.js → index-3reaaa1h.js} +42 -153
  27. package/{index-ww9bhp67.js → index-4pf8g7ff.js} +1 -1
  28. package/{index-qt22xstj.js → index-58vvz603.js} +5 -3
  29. package/index-6726qr1m.js +668 -0
  30. package/index-8935h3n1.js +33 -0
  31. package/{index-nz15k0b6.js → index-8zdwpxef.js} +1 -1
  32. package/{index-c2yrsxdh.js → index-azh29dc8.js} +96 -320
  33. package/{index-c1x0be5j.js → index-bea2gwc6.js} +2 -2
  34. package/{index-v29746vb.js → index-e9prnmyt.js} +3 -3
  35. package/{index-tn4rpqp1.js → index-fjsv10hd.js} +73 -49
  36. package/index-g0vwzy9m.js +241 -0
  37. package/{index-c76k723e.js → index-h85cxfkg.js} +2 -2
  38. package/{index-rwq3ekqc.js → index-hnby7p9n.js} +7 -7
  39. package/{index-2etcv0sc.js → index-jwqtchha.js} +1 -1
  40. package/index-kc8z134d.js +248 -0
  41. package/index-nq045px5.js +1124 -0
  42. package/{index-fm46xrf1.js → index-nq2ja5e0.js} +3 -3
  43. package/{index-0bm04n5g.js → index-pyxn1b53.js} +10 -8
  44. package/{index-05g3jayg.js → index-rhbabmja.js} +1 -1
  45. package/{index-2mx692qq.js → index-rk9sdys3.js} +2 -2
  46. package/{index-7bymavqk.js → index-sby8fe1p.js} +1 -1
  47. package/{index-ctanya41.js → index-sqfdmb5b.js} +4 -4
  48. package/{index-2t4tqd1c.js → index-t7nws9mx.js} +3 -3
  49. package/{index-jyv387qw.js → index-tv8fjaba.js} +4 -4
  50. package/{index-gnyf1fqy.js → index-tz5evhdr.js} +2 -2
  51. package/{index-aprt7pkz.js → index-xpdgxsj5.js} +229 -1327
  52. package/{index-e0cvze1s.js → index-z507nzhg.js} +4 -4
  53. package/index.js +22 -22
  54. package/{library.command-gaga5bmq.js → library.command-8tw59xzj.js} +3 -3
  55. package/{localRegistry.command-9e84e32q.js → localRegistry.command-tf3dmznd.js} +12 -9
  56. package/{module.command-7vpf6db4.js → module.command-9vm8hffy.js} +5 -5
  57. package/{package.command-twmvvf69.js → package.command-erbxe2tz.js} +3 -3
  58. package/package.json +2 -2
  59. package/{page.command-5asq7fdf.js → page.command-jpavcj0p.js} +3 -3
  60. package/{pipeline.command-d0v38572.js → pipeline.command-b8rzvjvv.js} +220 -219
  61. package/{primitive.command-dyrs2fm8.js → primitive.command-sm32chzk.js} +6 -6
  62. package/{projectTypecheck-cvtkrzp2.js → projectTypecheck-jamtx95x.js} +1 -1
  63. package/{quality.command-6emsqpbg.js → quality.command-pkd17n6y.js} +2 -2
  64. package/{repair.command-8t6aegv5.js → repair.command-8y4mq6hs.js} +5 -5
  65. package/{scalar.command-bnggy1x7.js → scalar.command-q8khmyx5.js} +4 -4
  66. package/{subspace.command-f02j5tge.js → subspace.command-51n0ykbx.js} +421 -362
  67. package/templates/app/env/env.client.type.ts +2 -3
  68. package/templates/app/page/styles.css.template +8 -0
  69. package/{tunnel.command-9x8nfn75.js → tunnel.command-7820vtxq.js} +7 -4
  70. package/{workflow.command-jx0wag5r.js → workflow.command-n5sv4wqz.js} +10 -10
  71. package/{workspace.command-cmj6mqyk.js → workspace.command-zdy60jh8.js} +33 -30
  72. package/TunnelShare-21mm6dr5.js +0 -9
  73. package/cloud.script-r7eyfey4.js +0 -20
  74. package/context.runner-hqd1ppqe.js +0 -21
  75. package/index-6w0rbr9d.js +0 -68
  76. package/index-r2tpeb3n.js +0 -392
@@ -5,8 +5,7 @@ interface Dict {
5
5
  }
6
6
  export default function getContent(scanInfo: AppInfo | LibInfo | null, dict: Dict = {}) {
7
7
  return `
8
- export type AppClientEnv = {
9
- // apply public envs here
10
- };
8
+ // Replace with the public env keys this app reads, e.g. { google?: { mapKey: string } }.
9
+ export type AppClientEnv = Record<never, never>;
11
10
  `;
12
11
  }
@@ -317,3 +317,11 @@
317
317
  margin-block: -0.15em;
318
318
  }
319
319
  }
320
+
321
+ /* A descendant with a surface of its own covers the clipped sugar, so the transparent color it inherits would leave
322
+ it blank. It takes the primary color back; layered under utilities, a text-* class of its own still wins. */
323
+ @layer base {
324
+ .text-primary:not(svg, [class*="bg-"], [class*="jelly"], [class*="glass"], [class*="-current"]) [class*="bg-"]:not([class*="bg-clip"]) {
325
+ color: var(--primary);
326
+ }
327
+ }
@@ -4,21 +4,24 @@ import {
4
4
  runner,
5
5
  script,
6
6
  command
7
- } from "./index-6jjtnhkw.js";
7
+ } from "./index-31ce9vhg.js";
8
8
  import"./index-52w0fvh8.js";
9
9
  import {
10
10
  AppExecutor
11
- } from "./index-55mynnqs.js";
11
+ } from "./index-2etqq75t.js";
12
12
  import {
13
13
  GlobalConfig,
14
14
  CloudApi
15
- } from "./index-r2tpeb3n.js";
15
+ } from "./index-6726qr1m.js";
16
+ import"./index-0909wckt.js";
17
+ import"./index-nq045px5.js";
16
18
  import {
17
19
  TunnelShare2
18
- } from "./index-7bymavqk.js";
20
+ } from "./index-sby8fe1p.js";
19
21
  import {
20
22
  writeClipboard
21
23
  } from "./index-p6pbz9n5.js";
24
+ import"./index-kc8z134d.js";
22
25
 
23
26
  // pkgs/@akanjs/cli/tunnel/tunnel.script.ts
24
27
  import { select } from "@inquirer/prompts";
@@ -3,20 +3,20 @@ import {
3
3
  Workspace,
4
4
  script,
5
5
  command
6
- } from "./index-6jjtnhkw.js";
6
+ } from "./index-31ce9vhg.js";
7
7
  import"./index-52w0fvh8.js";
8
- import"./index-55mynnqs.js";
8
+ import"./index-2etqq75t.js";
9
9
  import"./index-hj6w4ka1.js";
10
- import"./index-05g3jayg.js";
11
- import"./index-2mx692qq.js";
12
- import"./index-2etcv0sc.js";
13
- import"./index-e0cvze1s.js";
14
- import"./index-ctanya41.js";
15
- import"./index-fm46xrf1.js";
16
- import"./index-c76k723e.js";
10
+ import"./index-rhbabmja.js";
11
+ import"./index-rk9sdys3.js";
12
+ import"./index-jwqtchha.js";
13
+ import"./index-z507nzhg.js";
14
+ import"./index-sqfdmb5b.js";
15
+ import"./index-nq2ja5e0.js";
16
+ import"./index-h85cxfkg.js";
17
17
  import {
18
18
  WorkflowRunner
19
- } from "./index-rwq3ekqc.js";
19
+ } from "./index-hnby7p9n.js";
20
20
 
21
21
  // pkgs/@akanjs/cli/workflow/workflow.script.ts
22
22
  import { Logger } from "akanjs/common";
@@ -5,7 +5,7 @@ import {
5
5
  runner,
6
6
  script,
7
7
  command
8
- } from "./index-6jjtnhkw.js";
8
+ } from "./index-31ce9vhg.js";
9
9
  import {
10
10
  FileSys2
11
11
  } from "./index-52w0fvh8.js";
@@ -19,7 +19,7 @@ import {
19
19
  AppExecutor,
20
20
  LibExecutor,
21
21
  PkgExecutor
22
- } from "./index-55mynnqs.js";
22
+ } from "./index-2etqq75t.js";
23
23
  import {
24
24
  countBlocking,
25
25
  formatStyleContract,
@@ -29,47 +29,49 @@ import {
29
29
  collectRecipeSources2,
30
30
  scanRecipes2
31
31
  } from "./index-hj6w4ka1.js";
32
- import"./index-05g3jayg.js";
33
- import"./index-2mx692qq.js";
32
+ import"./index-rhbabmja.js";
33
+ import"./index-rk9sdys3.js";
34
34
  import"./index-zzvvc845.js";
35
35
  import {
36
36
  AgentScript
37
- } from "./index-v29746vb.js";
37
+ } from "./index-e9prnmyt.js";
38
38
  import"./index-k9rrten6.js";
39
- import"./index-kjvrq3nc.js";
39
+ import"./index-g0vwzy9m.js";
40
+ import"./index-0909wckt.js";
41
+ import"./index-nq045px5.js";
40
42
  import {
41
43
  LibraryScript
42
- } from "./index-c1x0be5j.js";
44
+ } from "./index-bea2gwc6.js";
43
45
  import {
44
46
  ApplicationScript
45
- } from "./index-p9ystjrp.js";
47
+ } from "./index-20cebtth.js";
46
48
  import"./index-7md2g9vw.js";
47
- import"./index-r2tpeb3n.js";
49
+ import"./index-6726qr1m.js";
48
50
  import"./index-2ahj896a.js";
49
51
  import {
50
52
  PackageScript
51
- } from "./index-gnyf1fqy.js";
53
+ } from "./index-tz5evhdr.js";
52
54
  import {
53
55
  getNpmRegistryUrl,
54
56
  getLatestPackageVersion
55
- } from "./index-y8q31011.js";
57
+ } from "./index-3reaaa1h.js";
56
58
  import {
57
59
  CloudScript2
58
- } from "./index-tn4rpqp1.js";
59
- import"./index-0bm04n5g.js";
60
- import"./index-fm46xrf1.js";
61
- import"./index-2etcv0sc.js";
62
- import"./index-e0cvze1s.js";
63
- import"./index-ctanya41.js";
64
- import"./index-c76k723e.js";
65
- import"./index-rwq3ekqc.js";
60
+ } from "./index-fjsv10hd.js";
61
+ import"./index-pyxn1b53.js";
62
+ import"./index-nq2ja5e0.js";
63
+ import"./index-jwqtchha.js";
64
+ import"./index-z507nzhg.js";
65
+ import"./index-sqfdmb5b.js";
66
+ import"./index-h85cxfkg.js";
67
+ import"./index-hnby7p9n.js";
66
68
  import {
67
69
  ContextScript
68
- } from "./index-jyv387qw.js";
69
- import"./index-qt22xstj.js";
70
+ } from "./index-tv8fjaba.js";
71
+ import"./index-58vvz603.js";
72
+ import"./index-kc8z134d.js";
70
73
 
71
74
  // pkgs/@akanjs/cli/workspace/workspace.runner.ts
72
- import { generateKeyPairSync } from "crypto";
73
75
  import { mkdir, writeFile } from "fs/promises";
74
76
  import path from "path";
75
77
 
@@ -77,6 +79,7 @@ import path from "path";
77
79
  var biomeVersion = "2.5.12";
78
80
 
79
81
  // pkgs/@akanjs/cli/workspace/workspace.runner.ts
82
+ import { Ed25519Key } from "akanjs/server/ed25519Key";
80
83
  var defaultWorkspacePeerDependencies = new Set([
81
84
  "@react-spring/web",
82
85
  "@use-gesture/react",
@@ -97,19 +100,16 @@ var defaultMaxDiagnostics = 200;
97
100
  class WorkspaceRunner extends runner("workspace") {
98
101
  async machineKeygen(workspace, out) {
99
102
  const file = path.resolve(workspace.workspaceRoot, out);
100
- const { privateKey, publicKey } = generateKeyPairSync("ed25519");
103
+ const { privatePem, publicKey } = Ed25519Key.generate();
101
104
  await mkdir(path.dirname(file), { recursive: true });
102
105
  try {
103
- await writeFile(file, privateKey.export({ format: "pem", type: "pkcs8" }).toString(), {
104
- mode: 384,
105
- flag: "wx"
106
- });
106
+ await writeFile(file, privatePem, { mode: 384, flag: "wx" });
107
107
  } catch (error) {
108
108
  if (error.code === "EEXIST")
109
109
  throw new Error(`${file} exists; machine-keygen never overwrites a key. Name another file.`);
110
110
  throw error;
111
111
  }
112
- return { file, publicKey: publicKey.export({ format: "jwk" }).x ?? "" };
112
+ return { file, publicKey };
113
113
  }
114
114
  async generateAgentRules(workspace, { overwrite = false, cursorRules = true } = {}) {
115
115
  const [appNames] = await workspace.getExecs();
@@ -383,7 +383,8 @@ class WorkspaceScript extends script("workspace", [
383
383
  }
384
384
  async machineKeygen(workspace, out) {
385
385
  const { file, publicKey } = await this.workspaceRunner.machineKeygen(workspace, out);
386
- Logger.rawLog(`Wrote the private key to ${file} (mode 600). Set it as AKAN_MACHINE_PRIVATE_KEY on the server that issues machine tokens; nothing else needs it.`);
386
+ const access = process.platform === "win32" ? "; Windows gives it the permissions of its folder, so keep it in one only you can read" : " (mode 600)";
387
+ Logger.rawLog(`Wrote the private key to ${file}${access}. Set it as AKAN_MACHINE_PRIVATE_KEY on the server that issues machine tokens; nothing else needs it.`);
387
388
  Logger.rawLog(`A server that only verifies them takes the public key:
388
389
  AKAN_MACHINE_PUBLIC_KEY=${publicKey}`);
389
390
  }
@@ -495,7 +496,9 @@ class WorkspaceCommand extends command("workspace", [WorkspaceScript], ({ public
495
496
  }),
496
497
  machineKeygen: target({
497
498
  desc: "Make an Ed25519 key for machine tokens: write the private key to a file, print the public key"
498
- }).arg("out", String, { desc: "file the private key is written to (mode 600); an existing one is refused" }).with(Workspace).exec(async function(out, workspace) {
499
+ }).arg("out", String, {
500
+ desc: "file the private key is written to (mode 600; on Windows, its folder's permissions); an existing one is refused"
501
+ }).with(Workspace).exec(async function(out, workspace) {
499
502
  await this.workspaceScript.machineKeygen(workspace, out);
500
503
  }),
501
504
  syncAll: target({ desc: "Sync dependencies and configuration for all apps and libraries" }).with(Workspace).exec(async function(workspace) {
@@ -1,9 +0,0 @@
1
- // @bun
2
- import {
3
- TunnelShare2
4
- } from "./index-7bymavqk.js";
5
- import"./index-r2tpeb3n.js";
6
- import"./index-52w0fvh8.js";
7
- export {
8
- TunnelShare2 as TunnelShare
9
- };
@@ -1,20 +0,0 @@
1
- // @bun
2
- import {
3
- CloudScript2
4
- } from "./index-tn4rpqp1.js";
5
- import"./index-y8q31011.js";
6
- import"./index-p9ystjrp.js";
7
- import"./index-qt22xstj.js";
8
- import"./index-c1x0be5j.js";
9
- import"./index-gnyf1fqy.js";
10
- import"./index-kjvrq3nc.js";
11
- import"./index-r2tpeb3n.js";
12
- import"./index-6jjtnhkw.js";
13
- import"./index-7md2g9vw.js";
14
- import"./index-k9rrten6.js";
15
- import"./index-55mynnqs.js";
16
- import"./index-2ahj896a.js";
17
- import"./index-52w0fvh8.js";
18
- export {
19
- CloudScript2 as CloudScript
20
- };
@@ -1,21 +0,0 @@
1
- // @bun
2
- import {
3
- ContextRunner2
4
- } from "./index-0bm04n5g.js";
5
- import"./index-rwq3ekqc.js";
6
- import"./index-c76k723e.js";
7
- import"./index-ctanya41.js";
8
- import"./index-fm46xrf1.js";
9
- import"./index-e0cvze1s.js";
10
- import"./index-2etcv0sc.js";
11
- import"./index-kjvrq3nc.js";
12
- import"./index-2mx692qq.js";
13
- import"./index-05g3jayg.js";
14
- import"./index-zzvvc845.js";
15
- import"./index-6jjtnhkw.js";
16
- import"./index-55mynnqs.js";
17
- import"./index-hj6w4ka1.js";
18
- import"./index-52w0fvh8.js";
19
- export {
20
- ContextRunner2 as ContextRunner
21
- };
package/index-6w0rbr9d.js DELETED
@@ -1,68 +0,0 @@
1
- // @bun
2
- // pkgs/@akanjs/devkit/typecheck/projectTypecheck.ts
3
- import { mkdir, rm } from "fs/promises";
4
- import path from "path";
5
-
6
- class ProjectTypecheck2 {
7
- projectDir;
8
- workspaceRoot;
9
- env;
10
- static #testIncludes = ["**/*.test.ts", "**/*.test.tsx", "**/*.spec.ts", "**/*.spec.tsx"];
11
- static #excludes = [".akan/**", "node_modules/**", "local/**"];
12
- constructor(projectDir, workspaceRoot, env) {
13
- this.projectDir = projectDir;
14
- this.workspaceRoot = workspaceRoot;
15
- this.env = env;
16
- }
17
- get typecheckDir() {
18
- return path.join(this.projectDir, ".akan", "typecheck");
19
- }
20
- async run(entries, { clean = false, incremental = true, tests = false } = {}) {
21
- const name = tests ? "tsconfig.tests" : "tsconfig";
22
- await mkdir(this.typecheckDir, { recursive: true });
23
- const tsconfig = {
24
- extends: "../../tsconfig.json",
25
- compilerOptions: { noEmit: true, incremental, tsBuildInfoFile: `./${name}.tsbuildinfo` },
26
- include: [...entries, ...tests ? ProjectTypecheck2.#testIncludes.map((glob) => `../../${glob}`) : []],
27
- ...tests ? { exclude: ProjectTypecheck2.#excludes.map((glob) => `../../${glob}`) } : {},
28
- references: []
29
- };
30
- const tsconfigPath = path.join(this.typecheckDir, `${name}.json`);
31
- await Bun.write(tsconfigPath, `${JSON.stringify(tsconfig, null, 2)}
32
- `);
33
- if (clean)
34
- await rm(path.join(this.typecheckDir, `${name}.tsbuildinfo`), { force: true });
35
- await this.#check(tsconfigPath);
36
- return tsconfigPath;
37
- }
38
- async#check(tsconfigPath) {
39
- const proc = Bun.spawn([process.execPath, await this.#workerEntry()], {
40
- cwd: this.workspaceRoot,
41
- env: { ...this.env, AKAN_COMMAND_TYPE: "typecheck", AKAN_TYPECHECK_TSCONFIG: tsconfigPath },
42
- stdout: "pipe",
43
- stderr: "pipe"
44
- });
45
- const [stdout, stderr, exitCode] = await Promise.all([
46
- new Response(proc.stdout).text(),
47
- new Response(proc.stderr).text(),
48
- proc.exited
49
- ]);
50
- if (exitCode !== 0)
51
- throw new Error((stderr || stdout).trim() || `Typecheck failed with exit code ${exitCode}`);
52
- }
53
- async#workerEntry() {
54
- const candidates = [
55
- path.join(this.workspaceRoot, "pkgs/@akanjs/devkit/typecheck/typecheck.proc.ts"),
56
- path.join(this.workspaceRoot, "node_modules/@akanjs/devkit/typecheck/typecheck.proc.ts"),
57
- path.join(import.meta.dir, "typecheck.proc.js"),
58
- path.join(import.meta.dir, "typecheck.proc.ts"),
59
- path.join(import.meta.dir, "..", "typecheck.proc.js")
60
- ];
61
- for (const candidate of candidates)
62
- if (await Bun.file(candidate).exists())
63
- return candidate;
64
- throw new Error(`[cli] typecheck worker entry not found; looked in: ${candidates.join(", ")}`);
65
- }
66
- }
67
-
68
- export { ProjectTypecheck2 };