@akanjs/cli 3.1.0-rc.1 → 3.1.0-rc.3
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.
- package/.build-stamp +1 -1
- package/{CodeAgent-kyprmy06.js → CodeAgent-ctk4fh2b.js} +2 -2
- package/{CodeTui-21mtze3j.js → CodeTui-mrxtrdzw.js} +1 -1
- package/TunnelShare-rj74jd6x.js +13 -0
- package/{agent.command-f3gsc1gd.js → agent.command-ncre6kwz.js} +5 -5
- package/akanCode.js +2 -2
- package/{application.command-5s780vnz.js → application.command-54mawreg.js} +52 -41
- package/{applicationBuildRunner-1yaqsrdq.js → applicationBuildRunner-8573zr2w.js} +16 -30
- package/buildBatch.proc.js +22 -13
- package/{cloud.command-yj6xb2a7.js → cloud.command-nyemv0m3.js} +57 -65
- package/cloud.script-ht6yb203.js +23 -0
- package/{code.command-3wkn4ja5.js → code.command-spsrzg63.js} +6 -6
- package/{context.command-9jjn3gcw.js → context.command-768zv7z4.js} +16 -13
- package/context.runner-tf1b53qq.js +24 -0
- package/{guideline.command-dtczrqpf.js → guideline.command-4ycwc51q.js} +2 -2
- package/guidelines/conventions/conventions.instruction.md +28 -15
- package/guidelines/cssRule/cssRule.instruction.md +12 -6
- package/guidelines/mcpRule/mcpRule.instruction.md +27 -11
- package/guidelines/runtimeRule/runtimeRule.instruction.md +24 -15
- package/guidelines/transportRule/transportRule.instruction.md +28 -5
- package/incrementalBuilder.proc.js +9 -6
- package/{index-2etcv0sc.js → index-00seamy5.js} +1 -1
- package/{index-jx4bzvwg.js → index-1a7nhq56.js} +92 -52
- package/{index-e0cvze1s.js → index-1nyxvz8j.js} +4 -4
- package/index-2z3kykvd.js +248 -0
- package/{index-rtct7d43.js → index-3675mvjw.js} +1 -1
- package/{index-56d2g8ms.js → index-3ddt3qjg.js} +1 -1
- package/{index-6jjtnhkw.js → index-3x7yeecy.js} +51 -9
- package/{index-ww9bhp67.js → index-4pf8g7ff.js} +1 -1
- package/index-8935h3n1.js +33 -0
- package/{index-v29746vb.js → index-8eqkxwsx.js} +3 -3
- package/{index-c2yrsxdh.js → index-91rt5bye.js} +96 -320
- package/{index-55mynnqs.js → index-bv210r6t.js} +459 -210
- package/{index-c76k723e.js → index-c4h5b5nq.js} +2 -2
- package/{index-qt22xstj.js → index-c9zjb3tw.js} +5 -3
- package/{index-c1x0be5j.js → index-dmsvd2rv.js} +2 -2
- package/index-ec080x99.js +1124 -0
- package/{index-ctanya41.js → index-fjqvd5mx.js} +4 -4
- package/{index-aprt7pkz.js → index-fvn6f5wx.js} +229 -1327
- package/{index-rc5rwyps.js → index-jj7yapwq.js} +71 -60
- package/index-kmamh5bv.js +241 -0
- package/{index-fm46xrf1.js → index-q5abh0jq.js} +3 -3
- package/{index-1w2qaee2.js → index-qf8g88j9.js} +361 -291
- package/{index-gnyf1fqy.js → index-qvghfv6v.js} +2 -2
- package/{index-ae5pwhgs.js → index-r5d6rq19.js} +10 -8
- package/{index-2mx692qq.js → index-vhfjzda3.js} +2 -2
- package/{index-8r4d7cmt.js → index-w9b71b6y.js} +4 -4
- package/{index-8ggztp8k.js → index-wanhh011.js} +42 -177
- package/{index-05g3jayg.js → index-wdze51wz.js} +1 -1
- package/index-wjqbc7sf.js +668 -0
- package/{index-rwq3ekqc.js → index-xf40a295.js} +7 -7
- package/{index-krq7btbt.js → index-xm5tmpv0.js} +3 -3
- package/index.js +22 -22
- package/{library.command-gaga5bmq.js → library.command-88ahgych.js} +3 -3
- package/{localRegistry.command-vsreyy42.js → localRegistry.command-ykea1m7b.js} +12 -9
- package/{module.command-7vpf6db4.js → module.command-zky4b7m9.js} +5 -5
- package/{package.command-twmvvf69.js → package.command-vh8pcedh.js} +3 -3
- package/package.json +2 -2
- package/{page.command-5asq7fdf.js → page.command-fyqeqxc3.js} +3 -3
- package/{pipeline.command-d0v38572.js → pipeline.command-r5t30py6.js} +220 -219
- package/{primitive.command-dyrs2fm8.js → primitive.command-a0516zfk.js} +6 -6
- package/{projectTypecheck-cvtkrzp2.js → projectTypecheck-7djd4z50.js} +1 -1
- package/{quality.command-6emsqpbg.js → quality.command-k7jcnfn0.js} +2 -2
- package/{repair.command-8t6aegv5.js → repair.command-85zg2an3.js} +5 -5
- package/{scalar.command-bnggy1x7.js → scalar.command-g5vmqwca.js} +4 -4
- package/{subspace.command-md2teygq.js → subspace.command-mp4evgsj.js} +421 -362
- package/{tunnel.command-jx3tdm2d.js → tunnel.command-kbnr99sj.js} +7 -4
- package/{workflow.command-jx0wag5r.js → workflow.command-9y9p1n8y.js} +10 -10
- package/{workspace.command-yxd7rr7g.js → workspace.command-jmec2kjg.js} +33 -30
- package/TunnelShare-q4jq08qg.js +0 -9
- package/cloud.script-h6pvcpa2.js +0 -20
- package/context.runner-atcrzz5b.js +0 -21
- package/index-6w0rbr9d.js +0 -68
- package/index-pgj2rt78.js +0 -404
|
@@ -4,21 +4,24 @@ import {
|
|
|
4
4
|
runner,
|
|
5
5
|
script,
|
|
6
6
|
command
|
|
7
|
-
} from "./index-
|
|
7
|
+
} from "./index-3x7yeecy.js";
|
|
8
8
|
import"./index-52w0fvh8.js";
|
|
9
9
|
import {
|
|
10
10
|
AppExecutor
|
|
11
|
-
} from "./index-
|
|
11
|
+
} from "./index-bv210r6t.js";
|
|
12
12
|
import {
|
|
13
13
|
GlobalConfig,
|
|
14
14
|
CloudApi
|
|
15
|
-
} from "./index-
|
|
15
|
+
} from "./index-wjqbc7sf.js";
|
|
16
|
+
import"./index-qf8g88j9.js";
|
|
17
|
+
import"./index-ec080x99.js";
|
|
16
18
|
import {
|
|
17
19
|
TunnelShare2
|
|
18
|
-
} from "./index-
|
|
20
|
+
} from "./index-3ddt3qjg.js";
|
|
19
21
|
import {
|
|
20
22
|
writeClipboard
|
|
21
23
|
} from "./index-p6pbz9n5.js";
|
|
24
|
+
import"./index-2z3kykvd.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-
|
|
6
|
+
} from "./index-3x7yeecy.js";
|
|
7
7
|
import"./index-52w0fvh8.js";
|
|
8
|
-
import"./index-
|
|
8
|
+
import"./index-bv210r6t.js";
|
|
9
9
|
import"./index-hj6w4ka1.js";
|
|
10
|
-
import"./index-
|
|
11
|
-
import"./index-
|
|
12
|
-
import"./index-
|
|
13
|
-
import"./index-
|
|
14
|
-
import"./index-
|
|
15
|
-
import"./index-
|
|
16
|
-
import"./index-
|
|
10
|
+
import"./index-wdze51wz.js";
|
|
11
|
+
import"./index-vhfjzda3.js";
|
|
12
|
+
import"./index-00seamy5.js";
|
|
13
|
+
import"./index-1nyxvz8j.js";
|
|
14
|
+
import"./index-fjqvd5mx.js";
|
|
15
|
+
import"./index-q5abh0jq.js";
|
|
16
|
+
import"./index-c4h5b5nq.js";
|
|
17
17
|
import {
|
|
18
18
|
WorkflowRunner
|
|
19
|
-
} from "./index-
|
|
19
|
+
} from "./index-xf40a295.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-
|
|
8
|
+
} from "./index-3x7yeecy.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-
|
|
22
|
+
} from "./index-bv210r6t.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-
|
|
33
|
-
import"./index-
|
|
32
|
+
import"./index-wdze51wz.js";
|
|
33
|
+
import"./index-vhfjzda3.js";
|
|
34
34
|
import"./index-zzvvc845.js";
|
|
35
35
|
import {
|
|
36
36
|
AgentScript
|
|
37
|
-
} from "./index-
|
|
37
|
+
} from "./index-8eqkxwsx.js";
|
|
38
38
|
import"./index-k9rrten6.js";
|
|
39
|
-
import"./index-
|
|
39
|
+
import"./index-kmamh5bv.js";
|
|
40
|
+
import"./index-qf8g88j9.js";
|
|
41
|
+
import"./index-ec080x99.js";
|
|
40
42
|
import {
|
|
41
43
|
LibraryScript
|
|
42
|
-
} from "./index-
|
|
44
|
+
} from "./index-dmsvd2rv.js";
|
|
43
45
|
import {
|
|
44
46
|
ApplicationScript
|
|
45
|
-
} from "./index-
|
|
47
|
+
} from "./index-1a7nhq56.js";
|
|
46
48
|
import"./index-7md2g9vw.js";
|
|
47
|
-
import"./index-
|
|
49
|
+
import"./index-wjqbc7sf.js";
|
|
48
50
|
import"./index-2ahj896a.js";
|
|
49
51
|
import {
|
|
50
52
|
PackageScript
|
|
51
|
-
} from "./index-
|
|
53
|
+
} from "./index-qvghfv6v.js";
|
|
52
54
|
import {
|
|
53
55
|
getNpmRegistryUrl,
|
|
54
56
|
getLatestPackageVersion
|
|
55
|
-
} from "./index-
|
|
57
|
+
} from "./index-wanhh011.js";
|
|
56
58
|
import {
|
|
57
59
|
CloudScript2
|
|
58
|
-
} from "./index-
|
|
59
|
-
import"./index-
|
|
60
|
-
import"./index-
|
|
61
|
-
import"./index-
|
|
62
|
-
import"./index-
|
|
63
|
-
import"./index-
|
|
64
|
-
import"./index-
|
|
65
|
-
import"./index-
|
|
60
|
+
} from "./index-jj7yapwq.js";
|
|
61
|
+
import"./index-r5d6rq19.js";
|
|
62
|
+
import"./index-q5abh0jq.js";
|
|
63
|
+
import"./index-00seamy5.js";
|
|
64
|
+
import"./index-1nyxvz8j.js";
|
|
65
|
+
import"./index-fjqvd5mx.js";
|
|
66
|
+
import"./index-c4h5b5nq.js";
|
|
67
|
+
import"./index-xf40a295.js";
|
|
66
68
|
import {
|
|
67
69
|
ContextScript
|
|
68
|
-
} from "./index-
|
|
69
|
-
import"./index-
|
|
70
|
+
} from "./index-w9b71b6y.js";
|
|
71
|
+
import"./index-c9zjb3tw.js";
|
|
72
|
+
import"./index-2z3kykvd.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 {
|
|
103
|
+
const { privatePem, publicKey } = Ed25519Key.generate();
|
|
101
104
|
await mkdir(path.dirname(file), { recursive: true });
|
|
102
105
|
try {
|
|
103
|
-
await writeFile(file,
|
|
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
|
|
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
|
-
|
|
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, {
|
|
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) {
|
package/TunnelShare-q4jq08qg.js
DELETED
package/cloud.script-h6pvcpa2.js
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import {
|
|
3
|
-
CloudScript2
|
|
4
|
-
} from "./index-rc5rwyps.js";
|
|
5
|
-
import"./index-8ggztp8k.js";
|
|
6
|
-
import"./index-jx4bzvwg.js";
|
|
7
|
-
import"./index-qt22xstj.js";
|
|
8
|
-
import"./index-c1x0be5j.js";
|
|
9
|
-
import"./index-gnyf1fqy.js";
|
|
10
|
-
import"./index-1w2qaee2.js";
|
|
11
|
-
import"./index-pgj2rt78.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-ae5pwhgs.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-1w2qaee2.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 };
|