@akanjs/cli 3.1.0-rc.9 → 3.1.1-rc.0
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-rkjyxgec.js → CodeAgent-4pnxwptq.js} +2 -2
- package/{CodeAgentRpcHost-p7h6n2hp.js → CodeAgentRpcHost-9g27hmer.js} +1 -1
- package/{CodeTui-h7pyj6xa.js → CodeTui-hhndze8h.js} +47 -4
- package/README.ko.md +1 -1
- package/README.md +1 -1
- package/TunnelShare-zmq6bbar.js +14 -0
- package/{agent.command-3qxf4xcj.js → agent.command-p02330r6.js} +5 -5
- package/akanCode.js +7 -5
- package/{application.command-m1kcd7jf.js → application.command-ywks5ywm.js} +35 -9
- package/{applicationBuildRunner-dj0xkrep.js → applicationBuildRunner-9cnnsdm5.js} +23 -8
- package/buildBatch.proc.js +9 -9
- package/{cloud.command-9cp1t0f5.js → cloud.command-1tzkvje1.js} +13 -13
- package/cloud.script-8g83xqdg.js +24 -0
- package/{code.command-0ad6gw2a.js → code.command-16pm1p2v.js} +25 -12
- package/commandManifest.json +1 -1
- package/{context.command-0qx447mb.js → context.command-6ys86sqf.js} +16 -16
- package/context.runner-3jrypwe3.js +25 -0
- package/{guideline.command-cv5bmrx2.js → guideline.command-3zay3d8g.js} +2 -2
- package/guidelines/agentRule/agentRule.instruction.md +25 -10
- package/guidelines/conventions/conventions.instruction.md +71 -24
- package/guidelines/fieldRule/fieldRule.instruction.md +17 -0
- package/guidelines/mcpRule/mcpRule.instruction.md +93 -48
- package/guidelines/modelDocument/modelDocument.instruction.md +2 -1
- package/guidelines/modelStore/modelStore.instruction.md +7 -0
- package/guidelines/pageRule/pageRule.instruction.md +55 -8
- package/guidelines/queryRule/queryRule.instruction.md +24 -10
- package/guidelines/runtimeRule/runtimeRule.instruction.md +12 -4
- package/guidelines/ssrRule/ssrRule.instruction.md +9 -6
- package/guidelines/transportRule/transportRule.instruction.md +36 -5
- package/guidelines/workspaceOnboarding/workspaceOnboarding.instruction.md +5 -3
- package/guidelines/workspaceRecipes/workspaceRecipes.instruction.md +28 -8
- package/incrementalBuilder.proc.js +3 -3
- package/{index-cpb3nvma.js → index-1f33g2z5.js} +2 -2
- package/{index-tamvyvj3.js → index-1mfyyxh5.js} +3 -3
- package/{index-wa5jbxj1.js → index-2mrn1mrg.js} +1 -0
- package/{index-8fp3b47h.js → index-4w3skd33.js} +281 -46
- package/{index-bspm21y1.js → index-68c3gzvg.js} +7 -7
- package/{index-20bxxyvn.js → index-9hbhm6cs.js} +40 -2
- package/{index-d2242ksy.js → index-at7bz0xq.js} +3 -0
- package/{index-fmzcs8v6.js → index-b5vptvnt.js} +4 -4
- package/{index-d72hfmdm.js → index-bb4hj03s.js} +8 -8
- package/{index-9z426msb.js → index-e9e9cebg.js} +78 -27
- package/{index-vk0pa0mn.js → index-ekpp5tax.js} +2 -1
- package/{index-35hc95h5.js → index-fmder14z.js} +1 -1
- package/{index-86jt2a0e.js → index-g2s33373.js} +1 -1
- package/{index-4mhy6qme.js → index-jaa81e9r.js} +4 -4
- package/{index-192ha4xh.js → index-jgs8z8xb.js} +3 -3
- package/{index-qwa5k1j8.js → index-kcbq2qcf.js} +1 -1
- package/{index-w44cy4vs.js → index-ngpn9hzy.js} +6 -4
- package/{index-jw1zm273.js → index-p4dnj2wc.js} +54 -10
- package/index-q8age5az.js +643 -0
- package/{index-j4mkhz93.js → index-qfzfaq96.js} +3 -3
- package/{index-pydbnfez.js → index-qkcwsg6r.js} +35 -9
- package/{index-d47ypebv.js → index-qtkycaqn.js} +75 -19
- package/{index-va06nr10.js → index-rr7jk14m.js} +65 -20
- package/{index-1xj2t7cb.js → index-sh9mmp5v.js} +7 -7
- package/{index-1p98exm2.js → index-sng3vt0p.js} +2 -2
- package/{index-j237xtew.js → index-tk3jg2bm.js} +25 -8
- package/{index-fyq1z6kt.js → index-vg28jsf9.js} +3 -3
- package/{index-trpasv9q.js → index-ynqxpwx6.js} +1 -1
- package/{index-5edzv8fn.js → index-z6v7k9sb.js} +2 -2
- package/{index-g1mbppa9.js → index-z9xepn8t.js} +5 -5
- package/{index-awbdfcf2.js → index-zn6bn1s2.js} +4 -4
- package/index.js +40 -22
- package/{library.command-erp2f56n.js → library.command-a8n9h8j4.js} +3 -3
- package/{localRegistry.command-y176p558.js → localRegistry.command-1e6m7w2f.js} +12 -12
- package/{module.command-gs2r615e.js → module.command-b6f1p1xa.js} +5 -5
- package/{package.command-j10r76ax.js → package.command-tc27ftmy.js} +3 -3
- package/package.json +16 -16
- package/{page.command-4h4a8pnh.js → page.command-m5wyqfkd.js} +3 -3
- package/{pipeline.command-a2nrk26m.js → pipeline.command-4qxyafpz.js} +2 -2
- package/{primitive.command-w6t0asqz.js → primitive.command-9yaatk0d.js} +6 -6
- package/{projectTypecheck-f534enqj.js → projectTypecheck-87k6z6ab.js} +1 -1
- package/{quality.command-77x7vbbx.js → quality.command-ht1wjhv8.js} +2 -2
- package/{repair.command-y6sstev7.js → repair.command-evg9g911.js} +5 -5
- package/{routeSourceValidator-7ycnfz0e.js → routeSourceValidator-6jd0q6r6.js} +47 -14
- package/{scalar.command-20b8cy0k.js → scalar.command-xsejjeq1.js} +4 -4
- package/skills/akan-code/SKILL.md +4 -0
- package/skills/akan-store/SKILL.md +4 -2
- package/{subspace.command-5c7yasd7.js → subspace.command-ps12q5y7.js} +8 -17
- package/templates/migration/__migrationId__.ts +23 -0
- package/templates/server.ts +8 -1
- package/templates/workspaceRoot/biome.json.template +1 -1
- package/{tunnel.command-2kw8vt9g.js → tunnel.command-khzgvrj8.js} +7 -7
- package/{workflow.command-2djwmpqf.js → workflow.command-qpyq0ya5.js} +10 -10
- package/{workspace.command-ms84ykse.js → workspace.command-3dq7e9g2.js} +30 -28
- package/TunnelShare-661cxz5e.js +0 -14
- package/cloud.script-dgstqt1m.js +0 -24
- package/context.runner-1vsjztjg.js +0 -25
- package/index-665zp9rs.js +0 -271
|
@@ -4,17 +4,17 @@ import {
|
|
|
4
4
|
ServerEnvProfile,
|
|
5
5
|
Executor,
|
|
6
6
|
WorkspaceExecutor
|
|
7
|
-
} from "./index-
|
|
7
|
+
} from "./index-rr7jk14m.js";
|
|
8
8
|
import {
|
|
9
9
|
resolveAppId,
|
|
10
10
|
targetHtmlFilename
|
|
11
11
|
} from "./index-m9jj544v.js";
|
|
12
|
-
import {
|
|
13
|
-
ExitCodeError
|
|
14
|
-
} from "./index-jw1zm273.js";
|
|
15
12
|
import {
|
|
16
13
|
CsrArtifactBuilder
|
|
17
|
-
} from "./index-
|
|
14
|
+
} from "./index-q8age5az.js";
|
|
15
|
+
import {
|
|
16
|
+
ExitCodeError
|
|
17
|
+
} from "./index-p4dnj2wc.js";
|
|
18
18
|
|
|
19
19
|
// pkgs/@akanjs/devkit/mobile/desktopBin.ts
|
|
20
20
|
import { chmod, mkdir, rename, rm, writeFile } from "fs/promises";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
script
|
|
4
|
-
} from "./index-
|
|
4
|
+
} from "./index-p4dnj2wc.js";
|
|
5
5
|
import {
|
|
6
6
|
AppExecutor,
|
|
7
7
|
LibExecutor,
|
|
8
8
|
ModuleExecutor
|
|
9
|
-
} from "./index-
|
|
9
|
+
} from "./index-rr7jk14m.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-
|
|
44
|
+
} from "./index-ynqxpwx6.js";
|
|
45
45
|
import {
|
|
46
46
|
ModuleScript
|
|
47
|
-
} from "./index-
|
|
47
|
+
} from "./index-b5vptvnt.js";
|
|
48
48
|
|
|
49
49
|
// pkgs/@akanjs/cli/primitive/primitive.script.ts
|
|
50
50
|
import { capitalize, lowerlize } from "akanjs/common";
|
package/index.js
CHANGED
|
@@ -4,35 +4,44 @@ import {
|
|
|
4
4
|
getTargetMetas,
|
|
5
5
|
getTargetCommandNames,
|
|
6
6
|
runCommands
|
|
7
|
-
} from "./index-
|
|
7
|
+
} from "./index-p4dnj2wc.js";
|
|
8
8
|
import"./index-52w0fvh8.js";
|
|
9
|
-
import"./index-
|
|
9
|
+
import"./index-rr7jk14m.js";
|
|
10
|
+
|
|
11
|
+
// pkgs/@akanjs/cli/bunVersionGuard.ts
|
|
12
|
+
class BunVersionGuard {
|
|
13
|
+
static refusal(bunVersion, range) {
|
|
14
|
+
if (Bun.semver.satisfies(bunVersion.replace(/-.*$/, ""), range))
|
|
15
|
+
return null;
|
|
16
|
+
return `akan requires Bun ${range}, but this is Bun ${bunVersion}. Run \`bun upgrade\`, then try again.`;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
10
19
|
|
|
11
20
|
// pkgs/@akanjs/cli/commandManifest.ts
|
|
12
21
|
import path from "path";
|
|
13
22
|
|
|
14
23
|
// pkgs/@akanjs/cli/commandModules.ts
|
|
15
24
|
var commandModules = {
|
|
16
|
-
workspace: async () => (await import("./workspace.command-
|
|
17
|
-
agent: async () => (await import("./agent.command-
|
|
18
|
-
code: async () => (await import("./code.command-
|
|
19
|
-
application: async () => (await import("./application.command-
|
|
20
|
-
library: async () => (await import("./library.command-
|
|
21
|
-
localRegistry: async () => (await import("./localRegistry.command-
|
|
22
|
-
package: async () => (await import("./package.command-
|
|
23
|
-
module: async () => (await import("./module.command-
|
|
24
|
-
page: async () => (await import("./page.command-
|
|
25
|
-
context: async () => (await import("./context.command-
|
|
26
|
-
cloud: async () => (await import("./cloud.command-
|
|
27
|
-
subspace: async () => (await import("./subspace.command-
|
|
28
|
-
guideline: async () => (await import("./guideline.command-
|
|
29
|
-
scalar: async () => (await import("./scalar.command-
|
|
30
|
-
primitive: async () => (await import("./primitive.command-
|
|
31
|
-
quality: async () => (await import("./quality.command-
|
|
32
|
-
repair: async () => (await import("./repair.command-
|
|
33
|
-
workflow: async () => (await import("./workflow.command-
|
|
34
|
-
pipeline: async () => (await import("./pipeline.command-
|
|
35
|
-
tunnel: async () => (await import("./tunnel.command-
|
|
25
|
+
workspace: async () => (await import("./workspace.command-3dq7e9g2.js")).WorkspaceCommand,
|
|
26
|
+
agent: async () => (await import("./agent.command-p02330r6.js")).AgentCommand,
|
|
27
|
+
code: async () => (await import("./code.command-16pm1p2v.js")).CodeCommand,
|
|
28
|
+
application: async () => (await import("./application.command-ywks5ywm.js")).ApplicationCommand,
|
|
29
|
+
library: async () => (await import("./library.command-a8n9h8j4.js")).LibraryCommand,
|
|
30
|
+
localRegistry: async () => (await import("./localRegistry.command-1e6m7w2f.js")).LocalRegistryCommand,
|
|
31
|
+
package: async () => (await import("./package.command-tc27ftmy.js")).PackageCommand,
|
|
32
|
+
module: async () => (await import("./module.command-b6f1p1xa.js")).ModuleCommand,
|
|
33
|
+
page: async () => (await import("./page.command-m5wyqfkd.js")).PageCommand,
|
|
34
|
+
context: async () => (await import("./context.command-6ys86sqf.js")).ContextCommand,
|
|
35
|
+
cloud: async () => (await import("./cloud.command-1tzkvje1.js")).CloudCommand,
|
|
36
|
+
subspace: async () => (await import("./subspace.command-ps12q5y7.js")).SubspaceCommand,
|
|
37
|
+
guideline: async () => (await import("./guideline.command-3zay3d8g.js")).GuidelineCommand,
|
|
38
|
+
scalar: async () => (await import("./scalar.command-xsejjeq1.js")).ScalarCommand,
|
|
39
|
+
primitive: async () => (await import("./primitive.command-9yaatk0d.js")).PrimitiveCommand,
|
|
40
|
+
quality: async () => (await import("./quality.command-ht1wjhv8.js")).QualityCommand,
|
|
41
|
+
repair: async () => (await import("./repair.command-evg9g911.js")).RepairCommand,
|
|
42
|
+
workflow: async () => (await import("./workflow.command-qpyq0ya5.js")).WorkflowCommand,
|
|
43
|
+
pipeline: async () => (await import("./pipeline.command-4qxyafpz.js")).PipelineCommand,
|
|
44
|
+
tunnel: async () => (await import("./tunnel.command-khzgvrj8.js")).TunnelCommand
|
|
36
45
|
};
|
|
37
46
|
var commandModuleIds = Object.keys(commandModules);
|
|
38
47
|
|
|
@@ -66,8 +75,17 @@ class CommandManifest {
|
|
|
66
75
|
return id ? [id] : null;
|
|
67
76
|
}
|
|
68
77
|
}
|
|
78
|
+
// pkgs/@akanjs/cli/package.json
|
|
79
|
+
var engines = {
|
|
80
|
+
bun: ">=1.4.4"
|
|
81
|
+
};
|
|
69
82
|
|
|
70
83
|
// pkgs/@akanjs/cli/index.ts
|
|
84
|
+
var bunRefusal = BunVersionGuard.refusal(Bun.version, engines.bun);
|
|
85
|
+
if (bunRefusal) {
|
|
86
|
+
console.error(bunRefusal);
|
|
87
|
+
process.exit(1);
|
|
88
|
+
}
|
|
71
89
|
var ids = CommandManifest.resolve(await CommandManifest.read(), process.argv) ?? commandModuleIds;
|
|
72
90
|
var commands = await Promise.all(ids.map(async (id) => await commandModules[id]()));
|
|
73
91
|
await runCommands(...commands);
|
|
@@ -3,12 +3,12 @@ import {
|
|
|
3
3
|
Lib,
|
|
4
4
|
Workspace,
|
|
5
5
|
command
|
|
6
|
-
} from "./index-
|
|
6
|
+
} from "./index-p4dnj2wc.js";
|
|
7
7
|
import"./index-52w0fvh8.js";
|
|
8
|
-
import"./index-
|
|
8
|
+
import"./index-rr7jk14m.js";
|
|
9
9
|
import {
|
|
10
10
|
LibraryScript
|
|
11
|
-
} from "./index-
|
|
11
|
+
} from "./index-qkcwsg6r.js";
|
|
12
12
|
|
|
13
13
|
// pkgs/@akanjs/cli/library/library.command.ts
|
|
14
14
|
class LibraryCommand extends command("library", [LibraryScript], ({ public: target }) => ({
|
|
@@ -4,32 +4,32 @@ import {
|
|
|
4
4
|
runner,
|
|
5
5
|
script,
|
|
6
6
|
command
|
|
7
|
-
} from "./index-
|
|
7
|
+
} from "./index-p4dnj2wc.js";
|
|
8
8
|
import"./index-52w0fvh8.js";
|
|
9
9
|
import {
|
|
10
10
|
PkgExecutor
|
|
11
|
-
} from "./index-
|
|
11
|
+
} from "./index-rr7jk14m.js";
|
|
12
12
|
import"./index-5nd1wtkv.js";
|
|
13
|
-
import"./index-
|
|
13
|
+
import"./index-ekpp5tax.js";
|
|
14
14
|
import"./index-m9jj544v.js";
|
|
15
|
-
import"./index-
|
|
16
|
-
import"./index-
|
|
17
|
-
import"./index-
|
|
15
|
+
import"./index-z9xepn8t.js";
|
|
16
|
+
import"./index-q8age5az.js";
|
|
17
|
+
import"./index-jgs8z8xb.js";
|
|
18
|
+
import"./index-qkcwsg6r.js";
|
|
18
19
|
import {
|
|
19
20
|
ApplicationScript
|
|
20
|
-
} from "./index-
|
|
21
|
+
} from "./index-qtkycaqn.js";
|
|
21
22
|
import"./index-7md2g9vw.js";
|
|
22
|
-
import"./index-
|
|
23
|
+
import"./index-1f33g2z5.js";
|
|
23
24
|
import {
|
|
24
25
|
getNpmRegistryUrl,
|
|
25
26
|
CloudRunner
|
|
26
|
-
} from "./index-
|
|
27
|
+
} from "./index-vg28jsf9.js";
|
|
27
28
|
import"./index-tvehn2sp.js";
|
|
28
29
|
import {
|
|
29
30
|
PackageScript
|
|
30
|
-
} from "./index-
|
|
31
|
-
import"./index-
|
|
32
|
-
import"./index-665zp9rs.js";
|
|
31
|
+
} from "./index-tk3jg2bm.js";
|
|
32
|
+
import"./index-fmder14z.js";
|
|
33
33
|
|
|
34
34
|
// pkgs/@akanjs/cli/localRegistry/localRegistry.runner.ts
|
|
35
35
|
import { mkdir, rm } from "fs/promises";
|
|
@@ -3,16 +3,16 @@ import {
|
|
|
3
3
|
Sys,
|
|
4
4
|
Module,
|
|
5
5
|
command
|
|
6
|
-
} from "./index-
|
|
6
|
+
} from "./index-p4dnj2wc.js";
|
|
7
7
|
import"./index-52w0fvh8.js";
|
|
8
|
-
import"./index-
|
|
8
|
+
import"./index-rr7jk14m.js";
|
|
9
9
|
import {
|
|
10
10
|
renderPrimitiveReport
|
|
11
|
-
} from "./index-
|
|
12
|
-
import"./index-
|
|
11
|
+
} from "./index-ynqxpwx6.js";
|
|
12
|
+
import"./index-g2s33373.js";
|
|
13
13
|
import {
|
|
14
14
|
ModuleScript
|
|
15
|
-
} from "./index-
|
|
15
|
+
} from "./index-b5vptvnt.js";
|
|
16
16
|
|
|
17
17
|
// pkgs/@akanjs/cli/module/module.command.ts
|
|
18
18
|
import { Logger, lowerlize } from "akanjs/common";
|
|
@@ -3,13 +3,13 @@ import {
|
|
|
3
3
|
Pkg,
|
|
4
4
|
Workspace,
|
|
5
5
|
command
|
|
6
|
-
} from "./index-
|
|
6
|
+
} from "./index-p4dnj2wc.js";
|
|
7
7
|
import"./index-52w0fvh8.js";
|
|
8
|
-
import"./index-
|
|
8
|
+
import"./index-rr7jk14m.js";
|
|
9
9
|
import"./index-tvehn2sp.js";
|
|
10
10
|
import {
|
|
11
11
|
PackageScript
|
|
12
|
-
} from "./index-
|
|
12
|
+
} from "./index-tk3jg2bm.js";
|
|
13
13
|
|
|
14
14
|
// pkgs/@akanjs/cli/package/package.command.ts
|
|
15
15
|
class PackageCommand extends command("package", [PackageScript], ({ public: target }) => ({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@akanjs/cli",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.1-rc.0",
|
|
4
4
|
"sourceType": "module",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"publishConfig": {
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"directory": "pkgs/@akanjs/cli"
|
|
15
15
|
},
|
|
16
16
|
"engines": {
|
|
17
|
-
"bun": ">=1.4.
|
|
17
|
+
"bun": ">=1.4.4"
|
|
18
18
|
},
|
|
19
19
|
"bin": {
|
|
20
20
|
"akan": "./index.js"
|
|
@@ -37,25 +37,25 @@
|
|
|
37
37
|
"@earendil-works/pi-coding-agent": "1.3.0",
|
|
38
38
|
"@earendil-works/pi-mcp": "1.3.0",
|
|
39
39
|
"@earendil-works/pi-tui": "1.3.0",
|
|
40
|
-
"@inquirer/prompts": "^8.
|
|
41
|
-
"@tailwindcss/node": "^4.3.
|
|
42
|
-
"akanjs": "3.1.
|
|
43
|
-
"chalk": "^
|
|
44
|
-
"commander": "^
|
|
45
|
-
"dayjs": "^1.11.
|
|
46
|
-
"fontaine": "^0.
|
|
40
|
+
"@inquirer/prompts": "^8.7.3",
|
|
41
|
+
"@tailwindcss/node": "^4.3.3",
|
|
42
|
+
"akanjs": "3.1.1-rc.0",
|
|
43
|
+
"chalk": "^6.0.1",
|
|
44
|
+
"commander": "^15.0.0",
|
|
45
|
+
"dayjs": "^1.11.23",
|
|
46
|
+
"fontaine": "^1.0.1",
|
|
47
47
|
"fonteditor-core": "^2.6.3",
|
|
48
|
-
"ignore": "^7.0.
|
|
48
|
+
"ignore": "^7.0.12",
|
|
49
49
|
"ink": "^6.8.0",
|
|
50
|
-
"ora": "^9.4.
|
|
50
|
+
"ora": "^9.4.1",
|
|
51
51
|
"qrcode": "^1.5.4",
|
|
52
|
-
"react": "19.3.
|
|
52
|
+
"react": "19.3.1",
|
|
53
53
|
"ssh2": "^1.17.0",
|
|
54
|
-
"string-width": "^8.
|
|
55
|
-
"subset-font": "^2.
|
|
54
|
+
"string-width": "^8.3.0",
|
|
55
|
+
"subset-font": "^2.9.0",
|
|
56
56
|
"tailwind-scrollbar": "^4.0.2",
|
|
57
|
-
"tailwindcss": "^4.3.
|
|
58
|
-
"typebox": "1.
|
|
57
|
+
"tailwindcss": "^4.3.3",
|
|
58
|
+
"typebox": "1.3.37",
|
|
59
59
|
"typescript": "^6.0.3"
|
|
60
60
|
},
|
|
61
61
|
"devDependencies": {},
|
|
@@ -3,12 +3,12 @@ import {
|
|
|
3
3
|
App,
|
|
4
4
|
Module,
|
|
5
5
|
command
|
|
6
|
-
} from "./index-
|
|
6
|
+
} from "./index-p4dnj2wc.js";
|
|
7
7
|
import"./index-52w0fvh8.js";
|
|
8
|
-
import"./index-
|
|
8
|
+
import"./index-rr7jk14m.js";
|
|
9
9
|
import {
|
|
10
10
|
PageScript
|
|
11
|
-
} from "./index-
|
|
11
|
+
} from "./index-g2s33373.js";
|
|
12
12
|
|
|
13
13
|
// pkgs/@akanjs/cli/page/page.command.ts
|
|
14
14
|
class PageCommand extends command("page", [PageScript], ({ public: target }) => ({
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
runner,
|
|
5
5
|
script,
|
|
6
6
|
command
|
|
7
|
-
} from "./index-
|
|
7
|
+
} from "./index-p4dnj2wc.js";
|
|
8
8
|
import {
|
|
9
9
|
FileSys2
|
|
10
10
|
} from "./index-52w0fvh8.js";
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
AkanAppConfig,
|
|
13
13
|
AkanWorkspaceConfig,
|
|
14
14
|
AppExecutor
|
|
15
|
-
} from "./index-
|
|
15
|
+
} from "./index-rr7jk14m.js";
|
|
16
16
|
import {
|
|
17
17
|
resolveMobileTargets
|
|
18
18
|
} from "./index-m9jj544v.js";
|
|
@@ -2,17 +2,17 @@
|
|
|
2
2
|
import {
|
|
3
3
|
Workspace,
|
|
4
4
|
command
|
|
5
|
-
} from "./index-
|
|
5
|
+
} from "./index-p4dnj2wc.js";
|
|
6
6
|
import"./index-52w0fvh8.js";
|
|
7
|
-
import"./index-
|
|
7
|
+
import"./index-rr7jk14m.js";
|
|
8
8
|
import {
|
|
9
9
|
renderPrimitiveReport
|
|
10
|
-
} from "./index-
|
|
11
|
-
import"./index-
|
|
12
|
-
import"./index-
|
|
10
|
+
} from "./index-ynqxpwx6.js";
|
|
11
|
+
import"./index-g2s33373.js";
|
|
12
|
+
import"./index-b5vptvnt.js";
|
|
13
13
|
import {
|
|
14
14
|
PrimitiveScript
|
|
15
|
-
} from "./index-
|
|
15
|
+
} from "./index-zn6bn1s2.js";
|
|
16
16
|
|
|
17
17
|
// pkgs/@akanjs/cli/primitive/primitive.command.ts
|
|
18
18
|
import { Logger } from "akanjs/common";
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
Workspace,
|
|
4
4
|
script,
|
|
5
5
|
command
|
|
6
|
-
} from "./index-
|
|
6
|
+
} from "./index-p4dnj2wc.js";
|
|
7
7
|
import"./index-52w0fvh8.js";
|
|
8
8
|
import {
|
|
9
9
|
rootAllowedFiles,
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
libFacetRootHintOf,
|
|
13
13
|
facetIndexShadowOf,
|
|
14
14
|
rootEntryHintOf
|
|
15
|
-
} from "./index-
|
|
15
|
+
} from "./index-rr7jk14m.js";
|
|
16
16
|
|
|
17
17
|
// pkgs/@akanjs/devkit/qualityScanner.ts
|
|
18
18
|
import { createHash } from "crypto";
|
|
@@ -3,15 +3,15 @@ import {
|
|
|
3
3
|
Workspace,
|
|
4
4
|
script,
|
|
5
5
|
command
|
|
6
|
-
} from "./index-
|
|
6
|
+
} from "./index-p4dnj2wc.js";
|
|
7
7
|
import"./index-52w0fvh8.js";
|
|
8
|
-
import"./index-
|
|
8
|
+
import"./index-rr7jk14m.js";
|
|
9
9
|
import"./index-hj6w4ka1.js";
|
|
10
|
-
import"./index-
|
|
11
|
-
import"./index-
|
|
10
|
+
import"./index-ynqxpwx6.js";
|
|
11
|
+
import"./index-z6v7k9sb.js";
|
|
12
12
|
import {
|
|
13
13
|
RepairRunner
|
|
14
|
-
} from "./index-
|
|
14
|
+
} from "./index-qfzfaq96.js";
|
|
15
15
|
|
|
16
16
|
// pkgs/@akanjs/cli/repair/repair.script.ts
|
|
17
17
|
import { Logger } from "akanjs/common";
|
|
@@ -58,6 +58,8 @@ class RouteSourceValidator {
|
|
|
58
58
|
throw new Error(`[route-convention] head and generateHead cannot both be exported in ${filePath}`);
|
|
59
59
|
}
|
|
60
60
|
const chain = RouteSourceValidator.#readChain(sourceFile, filePath);
|
|
61
|
+
if (!chain && exported.has("guard"))
|
|
62
|
+
throw new Error(`[route-convention] ${filePath} exports guard beside a legacy default; declare it with .guard() on its chain`);
|
|
61
63
|
if (!chain)
|
|
62
64
|
return { devOnly: RouteSourceValidator.#readDevOnly(sourceFile, filePath) };
|
|
63
65
|
const named = [...exported].filter((name) => name !== "default");
|
|
@@ -71,32 +73,61 @@ class RouteSourceValidator {
|
|
|
71
73
|
RouteSourceValidator.#assertChainParams(chain, options.pattern, filePath);
|
|
72
74
|
return {
|
|
73
75
|
devOnly: chain.devOnly,
|
|
74
|
-
chain: {
|
|
76
|
+
chain: {
|
|
77
|
+
kind: chain.kind,
|
|
78
|
+
params: chain.params,
|
|
79
|
+
...chain.prompt ? { prompt: chain.prompt } : {},
|
|
80
|
+
apps: chain.apps
|
|
81
|
+
}
|
|
75
82
|
};
|
|
76
83
|
}
|
|
77
84
|
static #readChain(sourceFile, filePath) {
|
|
78
85
|
for (const statement of sourceFile.statements) {
|
|
86
|
+
const local = RouteSourceValidator.#defaultLocalOf(statement);
|
|
87
|
+
if (local && RouteSourceValidator.#bindsChain(sourceFile, local))
|
|
88
|
+
throw new Error(`[route-convention] ${filePath} exports its chain through "${local}"; write \`export default page()\u2026\` \u2014 the build reads the chain without evaluating the module`);
|
|
79
89
|
if (!ts.isExportAssignment(statement) || statement.isExportEquals)
|
|
80
90
|
continue;
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
91
|
+
const walked = RouteSourceValidator.#walkChain(RouteSourceValidator.#unwrapExpression(statement.expression));
|
|
92
|
+
return walked ? RouteSourceValidator.#chainOf(walked.kind, walked.stages, filePath) : null;
|
|
93
|
+
}
|
|
94
|
+
return null;
|
|
95
|
+
}
|
|
96
|
+
static #defaultLocalOf(statement) {
|
|
97
|
+
if (ts.isExportAssignment(statement) && !statement.isExportEquals) {
|
|
98
|
+
const node = RouteSourceValidator.#unwrapExpression(statement.expression);
|
|
99
|
+
return node && ts.isIdentifier(node) ? node.text : undefined;
|
|
100
|
+
}
|
|
101
|
+
if (!ts.isExportDeclaration(statement) || statement.moduleSpecifier || statement.isTypeOnly)
|
|
102
|
+
return;
|
|
103
|
+
const clause = statement.exportClause;
|
|
104
|
+
if (!clause || !ts.isNamedExports(clause))
|
|
105
|
+
return;
|
|
106
|
+
const element = clause.elements.find((element) => !element.isTypeOnly && element.name.text === "default");
|
|
107
|
+
return element?.propertyName && ts.isIdentifier(element.propertyName) ? element.propertyName.text : undefined;
|
|
108
|
+
}
|
|
109
|
+
static #walkChain(start) {
|
|
110
|
+
let node = start;
|
|
111
|
+
const stages = [];
|
|
112
|
+
while (node && ts.isCallExpression(node)) {
|
|
113
|
+
const callee = node.expression;
|
|
114
|
+
if (ts.isPropertyAccessExpression(callee)) {
|
|
115
|
+
stages.unshift({ name: callee.name.text, args: node.arguments });
|
|
116
|
+
node = callee.expression;
|
|
117
|
+
continue;
|
|
93
118
|
}
|
|
119
|
+
if (ts.isIdentifier(callee) && chainRoots.has(callee.text))
|
|
120
|
+
return { kind: callee.text, stages };
|
|
94
121
|
return null;
|
|
95
122
|
}
|
|
96
123
|
return null;
|
|
97
124
|
}
|
|
125
|
+
static #bindsChain(sourceFile, name) {
|
|
126
|
+
return sourceFile.statements.some((statement) => ts.isVariableStatement(statement) && statement.declarationList.declarations.some((declaration) => ts.isIdentifier(declaration.name) && declaration.name.text === name && !!RouteSourceValidator.#walkChain(RouteSourceValidator.#unwrapExpression(declaration.initializer))));
|
|
127
|
+
}
|
|
98
128
|
static #chainOf(kind, stages, filePath) {
|
|
99
129
|
const params = [];
|
|
130
|
+
const apps = [];
|
|
100
131
|
let prompt;
|
|
101
132
|
let devOnly = false;
|
|
102
133
|
const literal = (stage) => {
|
|
@@ -110,10 +141,12 @@ class RouteSourceValidator {
|
|
|
110
141
|
params.push(literal(stage));
|
|
111
142
|
else if (stage.name === "prompt")
|
|
112
143
|
prompt = literal(stage);
|
|
144
|
+
else if (stage.name === "app")
|
|
145
|
+
apps.push(literal(stage));
|
|
113
146
|
else if (stage.name === "config")
|
|
114
147
|
devOnly = RouteSourceValidator.#devOnlyOf(RouteSourceValidator.#unwrapExpression(stage.args[0]), filePath);
|
|
115
148
|
}
|
|
116
|
-
return { kind, params, prompt, devOnly };
|
|
149
|
+
return { kind, params, prompt, apps, devOnly };
|
|
117
150
|
}
|
|
118
151
|
static #assertChainParams(chain, pattern, filePath) {
|
|
119
152
|
const inPath = pattern.split("/").filter((part) => part.startsWith(":")).map((part) => part.slice(1)).filter((name) => name !== "lang");
|
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
import {
|
|
3
3
|
Sys,
|
|
4
4
|
command
|
|
5
|
-
} from "./index-
|
|
5
|
+
} from "./index-p4dnj2wc.js";
|
|
6
6
|
import"./index-52w0fvh8.js";
|
|
7
|
-
import"./index-
|
|
7
|
+
import"./index-rr7jk14m.js";
|
|
8
8
|
import {
|
|
9
9
|
renderPrimitiveReport
|
|
10
|
-
} from "./index-
|
|
10
|
+
} from "./index-ynqxpwx6.js";
|
|
11
11
|
import {
|
|
12
12
|
ScalarScript
|
|
13
|
-
} from "./index-
|
|
13
|
+
} from "./index-sng3vt0p.js";
|
|
14
14
|
|
|
15
15
|
// pkgs/@akanjs/cli/scalar/scalar.command.ts
|
|
16
16
|
import { Logger, lowerlize } from "akanjs/common";
|
|
@@ -78,6 +78,9 @@ Stored under `.akan/code/sessions` — project history, so a second checkout of
|
|
|
78
78
|
- `/peers` lists other `akan code` sessions running in this workspace; `/msg <peer> <text>` hands one a
|
|
79
79
|
message.
|
|
80
80
|
- `/clear` wipes the screen and keeps the conversation; `/compact [notes]` shortens what the model carries.
|
|
81
|
+
- `/autocompact <percent>` compacts on its own once the window is that full, in steps of 10 (`/autocompact 60`);
|
|
82
|
+
`100` is the default, which waits until 32k remain for the reply. `akan code --compact-at 60` (`-c`) starts
|
|
83
|
+
with it, and a share under the 20k every compaction keeps is refused.
|
|
81
84
|
|
|
82
85
|
## Model, effort, keys
|
|
83
86
|
|
|
@@ -119,6 +122,7 @@ akan code -i "<prompt>" open the session with the prompt already sent
|
|
|
119
122
|
--app <name> narrow the agent to one app
|
|
120
123
|
--profile local|pod|review|web what it may do (default local)
|
|
121
124
|
--model <provider>/<id> --thinking, --json, --rpc, --resume <id>
|
|
125
|
+
--compact-at <percent> compact once the window is this full (10, 20, … 100)
|
|
122
126
|
```
|
|
123
127
|
|
|
124
128
|
`review` reads and never writes, loads no project context files, and keeps no session on disk. `pod` has
|
|
@@ -19,14 +19,16 @@ For a model `comment` (`<Slice>` is a signal slice suffix, e.g. `InPublic`):
|
|
|
19
19
|
`add<Field>OnComment(value)` / `sub<Field>OnComment(idx)` for arrays, `upload<Field>OnComment(fileList)`
|
|
20
20
|
for file fields, `checkCommentSubmitable()`, `submitComment()`, `createCommentInForm()`,
|
|
21
21
|
`updateCommentInForm()`
|
|
22
|
-
- single: `viewComment(model)`, `mergeComment(model, data)`, `setComment(...models)`, `resetComment()
|
|
22
|
+
- single: `viewComment(model)`, `mergeComment(model, data)`, `setComment(...models)`, `resetComment()`,
|
|
23
|
+
`invalidateComment()` (marks every slice stale after a custom mutation, so the next mount refetches)
|
|
23
24
|
- per slice: `initComment<Slice>(...args)`, `refreshComment<Slice>()`, `selectComment<Slice>(model)`,
|
|
24
25
|
`setPageOfComment<Slice>(page)`, `loadMoreOfComment<Slice>()`, `setLimitOfComment<Slice>(limit)`,
|
|
25
26
|
`setQueryArgsOfComment<Slice>(...)`, `setSortOfComment<Slice>(sort)`
|
|
26
27
|
|
|
27
28
|
## Generated state — `st.use.*`
|
|
28
29
|
|
|
29
|
-
`comment`, `commentLoading`, `commentForm`, `commentFormLoading`, `
|
|
30
|
+
`comment`, `commentLoading`, `commentForm`, `commentFormLoading`, `commentFormUploading` (uploads in flight, per
|
|
31
|
+
`File` field — non-empty means do not submit), `commentSubmit`, `commentModal`,
|
|
30
32
|
`commentViewAt`, `commentOperation`; per slice `commentList<Slice>`, `commentListLoading<Slice>`,
|
|
31
33
|
`commentInitList<Slice>`, `commentSelection<Slice>`, `commentInsight<Slice>`, `pageOfComment<Slice>`,
|
|
32
34
|
`lastPageOfComment<Slice>`, `hasMoreOfComment<Slice>`, `limitOfComment<Slice>`, `sortOfComment<Slice>`.
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
runner,
|
|
6
6
|
script,
|
|
7
7
|
command
|
|
8
|
-
} from "./index-
|
|
8
|
+
} from "./index-p4dnj2wc.js";
|
|
9
9
|
import {
|
|
10
10
|
FileSys2
|
|
11
11
|
} from "./index-52w0fvh8.js";
|
|
@@ -14,20 +14,20 @@ import {
|
|
|
14
14
|
Executor,
|
|
15
15
|
WorkspaceExecutor,
|
|
16
16
|
AppExecutor
|
|
17
|
-
} from "./index-
|
|
17
|
+
} from "./index-rr7jk14m.js";
|
|
18
18
|
import {
|
|
19
19
|
GlobalConfig
|
|
20
|
-
} from "./index-
|
|
20
|
+
} from "./index-1f33g2z5.js";
|
|
21
21
|
import"./index-m9jj544v.js";
|
|
22
|
-
import"./index-
|
|
23
|
-
import"./index-
|
|
22
|
+
import"./index-z9xepn8t.js";
|
|
23
|
+
import"./index-q8age5az.js";
|
|
24
|
+
import"./index-jgs8z8xb.js";
|
|
24
25
|
import {
|
|
25
26
|
SubspaceConfig
|
|
26
27
|
} from "./index-4pf8g7ff.js";
|
|
27
28
|
import {
|
|
28
29
|
SlicePlanner
|
|
29
|
-
} from "./index-
|
|
30
|
-
import"./index-665zp9rs.js";
|
|
30
|
+
} from "./index-fmder14z.js";
|
|
31
31
|
|
|
32
32
|
// pkgs/@akanjs/devkit/subspace.ts
|
|
33
33
|
import { mkdir as mkdir2 } from "fs/promises";
|
|
@@ -67,9 +67,6 @@ class SubspaceClone {
|
|
|
67
67
|
this.#clonePath = path.join(workspace.workspaceRoot, ".akan/subspace", declaration.name);
|
|
68
68
|
this.#clone = new Executor(`subspace-${declaration.name}`, this.#clonePath);
|
|
69
69
|
}
|
|
70
|
-
async#cloneGit(args) {
|
|
71
|
-
return await this.#workspace.spawn("git", ["-C", this.#clonePath, ...args]);
|
|
72
|
-
}
|
|
73
70
|
async#ensure(branch) {
|
|
74
71
|
if (!await FileSys2.dirExists(path.join(this.#clonePath, ".git"))) {
|
|
75
72
|
await rm(this.#clonePath, { recursive: true, force: true });
|
|
@@ -171,8 +168,6 @@ class SubspaceClone {
|
|
|
171
168
|
const from = path.join(this.#clonePath, entry);
|
|
172
169
|
if (!await FileSys2.entryExists(from))
|
|
173
170
|
continue;
|
|
174
|
-
if (await this.#isPushedCopy(entry))
|
|
175
|
-
continue;
|
|
176
171
|
await mkdir(holdRoot, { recursive: true });
|
|
177
172
|
await rename(from, path.join(holdRoot, entry));
|
|
178
173
|
held.push(entry);
|
|
@@ -188,10 +183,6 @@ class SubspaceClone {
|
|
|
188
183
|
await rename(path.join(holdRoot, entry), target);
|
|
189
184
|
}
|
|
190
185
|
}
|
|
191
|
-
async#isPushedCopy(entry) {
|
|
192
|
-
const subject = await this.#cloneGit(["log", "-1", "--format=%s", "--", entry]).catch(() => "");
|
|
193
|
-
return subject.trim().startsWith(SubspaceClone.syncSubjectPrefix);
|
|
194
|
-
}
|
|
195
186
|
static async#copyMissing(from, to) {
|
|
196
187
|
await mkdir(to, { recursive: true });
|
|
197
188
|
for (const entry of await readdir(from, { withFileTypes: true })) {
|
|
@@ -825,7 +816,7 @@ class SubspaceRunner extends runner("subspace") {
|
|
|
825
816
|
if (!asked)
|
|
826
817
|
return { name: subspace.name, workspaceId, host, apps, libs: [], outcome: "cancelled", files: [] };
|
|
827
818
|
const { libs } = await subspace.slice();
|
|
828
|
-
const { CloudScript } = await import("./cloud.script-
|
|
819
|
+
const { CloudScript } = await import("./cloud.script-8g83xqdg.js");
|
|
829
820
|
const { files } = await CommandContainer.get(CloudScript).uploadEnv(workspace, {
|
|
830
821
|
host,
|
|
831
822
|
workspaceId,
|