@akanjs/cli 3.1.0-rc.26 → 3.1.0-rc.27
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-qrhqfc5s.js → CodeAgent-c53dm40p.js} +2 -2
- package/{CodeTui-k2c7wzhf.js → CodeTui-xz9jtrn3.js} +1 -1
- package/TunnelShare-59zd4j8n.js +14 -0
- package/{agent.command-8sma9jnd.js → agent.command-qawf7z4s.js} +5 -5
- package/akanCode.js +2 -2
- package/{application.command-v7xbe18e.js → application.command-jqrgqk6j.js} +9 -9
- package/{applicationBuildRunner-qaxt8try.js → applicationBuildRunner-grgrey5c.js} +7 -6
- package/buildBatch.proc.js +5 -5
- package/{cloud.command-gxspyqpr.js → cloud.command-p9067ssj.js} +13 -13
- package/cloud.script-f0r4ce7j.js +24 -0
- package/{code.command-ds7sr16b.js → code.command-t6j55sbk.js} +6 -6
- package/{context.command-ytr0n79h.js → context.command-eqbzbgth.js} +16 -16
- package/context.runner-1cs88ags.js +25 -0
- package/{guideline.command-6tnmtn4w.js → guideline.command-w905q73w.js} +2 -2
- package/guidelines/conventions/conventions.instruction.md +15 -11
- package/guidelines/modelDocument/modelDocument.instruction.md +2 -1
- package/guidelines/queryRule/queryRule.instruction.md +9 -7
- package/guidelines/runtimeRule/runtimeRule.instruction.md +4 -3
- package/guidelines/ssrRule/ssrRule.instruction.md +9 -9
- package/guidelines/transportRule/transportRule.instruction.md +5 -5
- package/guidelines/workspaceOnboarding/workspaceOnboarding.instruction.md +5 -3
- package/guidelines/workspaceRecipes/workspaceRecipes.instruction.md +6 -4
- package/incrementalBuilder.proc.js +3 -3
- package/{index-cj3md29d.js → index-0dd6z4b9.js} +3 -3
- package/{index-mt611jnw.js → index-1de5f0qq.js} +7 -7
- package/{index-zjfz6rvx.js → index-1enc9rga.js} +2 -2
- package/{index-c090a8wn.js → index-25ks6x4k.js} +2 -2
- package/{index-32hkenqb.js → index-3aynkpf8.js} +1 -1
- package/{index-6a64svwc.js → index-3hvmytbs.js} +1 -1
- package/{index-3xm8hm4f.js → index-45c0mxb6.js} +2 -2
- package/{index-mzenhe26.js → index-48n4yhm4.js} +3 -3
- package/{index-5q6tyqv5.js → index-64pjry21.js} +1 -1
- package/{index-0jxja6c2.js → index-aqwdjn4x.js} +2 -2
- package/{index-q3kddxxd.js → index-avjqbtkj.js} +3 -3
- package/{index-s2g91tgy.js → index-bs9yr4we.js} +1 -1
- package/{index-bm5ed553.js → index-cgexcnwd.js} +8 -8
- package/{index-vt87d6kx.js → index-dkfadmrx.js} +7 -7
- package/{index-gzjpj0sw.js → index-eabfsarf.js} +1 -1
- package/{index-hgeq1wpr.js → index-er62k6w3.js} +35 -9
- package/{index-d5kf5rct.js → index-f2gfq0yh.js} +2 -2
- package/{index-k8zer3t3.js → index-fbw3kmt5.js} +2 -2
- package/{index-tq0mjh8w.js → index-fnqj2d2w.js} +4 -4
- package/{index-arwtza6k.js → index-hqh4mpgt.js} +4 -4
- package/{index-khefnpqw.js → index-j4dzazmw.js} +4 -4
- package/{index-hzsmeevh.js → index-n8dsax1f.js} +10 -5
- package/{index-k1s1ps6r.js → index-nr8m4j21.js} +3 -3
- package/{index-60gryg73.js → index-qh73jnyb.js} +1 -1
- package/{index-37gfh3nw.js → index-vtj332gj.js} +36 -13
- package/{index-pkg6bhgc.js → index-wt7m1hfc.js} +3 -3
- package/{index-9f2bkqpf.js → index-yfy3t4kw.js} +2 -2
- package/{index-6tkzmfze.js → index-yyxy7aff.js} +1 -1
- package/{index-1g5atn4s.js → index-z5cxrbvv.js} +13 -10
- package/index.js +40 -22
- package/{library.command-d29mkrn1.js → library.command-z1v7zepj.js} +3 -3
- package/{localRegistry.command-e1d1sm2q.js → localRegistry.command-48n23bjy.js} +12 -12
- package/{module.command-7kgfp688.js → module.command-rv307dk7.js} +5 -5
- package/{package.command-9r2215cr.js → package.command-7xkzc8m1.js} +3 -3
- package/package.json +2 -2
- package/{page.command-2jhwcye7.js → page.command-34hpdt7v.js} +3 -3
- package/{pipeline.command-gcbxwwng.js → pipeline.command-ckvhrpyg.js} +2 -2
- package/{primitive.command-dzjh98t1.js → primitive.command-em0twr5a.js} +6 -6
- package/{projectTypecheck-wkbzjpry.js → projectTypecheck-fy6hn05y.js} +1 -1
- package/{quality.command-3yg6gt8j.js → quality.command-c6p2819k.js} +2 -2
- package/{repair.command-d1gm1hqc.js → repair.command-j6czdgrv.js} +5 -5
- package/{scalar.command-ntd52q4x.js → scalar.command-17e20sj2.js} +4 -4
- package/skills/akan-store/SKILL.md +2 -1
- package/{subspace.command-w7540907.js → subspace.command-n3j7vv0w.js} +8 -17
- package/{tunnel.command-61gd7btn.js → tunnel.command-cm578f4s.js} +7 -7
- package/{workflow.command-fykqj11r.js → workflow.command-h9vkr6jb.js} +10 -10
- package/{workspace.command-fabmw1hc.js → workspace.command-tp8ysvjs.js} +29 -27
- package/TunnelShare-necyr77h.js +0 -14
- package/cloud.script-0trnvgbv.js +0 -24
- package/context.runner-cjkadr7r.js +0 -25
package/.build-stamp
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
5f41da17e0d948de708c67c2c1b7957966f7e1eb77fdb8c06e22c1aec0be7604
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import {
|
|
3
|
+
TunnelShare2
|
|
4
|
+
} from "./index-3aynkpf8.js";
|
|
5
|
+
import"./index-yfy3t4kw.js";
|
|
6
|
+
import"./index-nr8m4j21.js";
|
|
7
|
+
import"./index-m9jj544v.js";
|
|
8
|
+
import"./index-25ks6x4k.js";
|
|
9
|
+
import"./index-64pjry21.js";
|
|
10
|
+
import"./index-n8dsax1f.js";
|
|
11
|
+
import"./index-52w0fvh8.js";
|
|
12
|
+
export {
|
|
13
|
+
TunnelShare2 as TunnelShare
|
|
14
|
+
};
|
|
@@ -2,16 +2,16 @@
|
|
|
2
2
|
import {
|
|
3
3
|
Workspace,
|
|
4
4
|
command
|
|
5
|
-
} from "./index-
|
|
5
|
+
} from "./index-fbw3kmt5.js";
|
|
6
6
|
import"./index-52w0fvh8.js";
|
|
7
|
-
import"./index-
|
|
7
|
+
import"./index-n8dsax1f.js";
|
|
8
8
|
import"./index-hj6w4ka1.js";
|
|
9
|
-
import"./index-
|
|
10
|
-
import"./index-
|
|
9
|
+
import"./index-yyxy7aff.js";
|
|
10
|
+
import"./index-aqwdjn4x.js";
|
|
11
11
|
import"./index-zzvvc845.js";
|
|
12
12
|
import {
|
|
13
13
|
AgentScript
|
|
14
|
-
} from "./index-
|
|
14
|
+
} from "./index-wt7m1hfc.js";
|
|
15
15
|
|
|
16
16
|
// pkgs/@akanjs/cli/agent/agent.command.ts
|
|
17
17
|
class AgentCommand extends command("agent", [AgentScript], ({ public: target }) => ({
|
package/akanCode.js
CHANGED
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
CodeMailbox2,
|
|
29
29
|
CodeSessionFork2,
|
|
30
30
|
CodeAgent2
|
|
31
|
-
} from "./index-
|
|
31
|
+
} from "./index-vtj332gj.js";
|
|
32
32
|
import {
|
|
33
33
|
akanCodeDefaultModel2,
|
|
34
34
|
akanCodeModel2,
|
|
@@ -40,7 +40,7 @@ import {
|
|
|
40
40
|
SubagentPool2,
|
|
41
41
|
akanCodePaths2,
|
|
42
42
|
AkanCodeCompaction2
|
|
43
|
-
} from "./index-
|
|
43
|
+
} from "./index-bs9yr4we.js";
|
|
44
44
|
import"./index-7md2g9vw.js";
|
|
45
45
|
import {
|
|
46
46
|
CodeAgentRpcHost2
|
|
@@ -7,19 +7,19 @@ import {
|
|
|
7
7
|
Exec,
|
|
8
8
|
Workspace,
|
|
9
9
|
command
|
|
10
|
-
} from "./index-
|
|
10
|
+
} from "./index-fbw3kmt5.js";
|
|
11
11
|
import"./index-52w0fvh8.js";
|
|
12
|
-
import"./index-
|
|
12
|
+
import"./index-n8dsax1f.js";
|
|
13
13
|
import"./index-5nd1wtkv.js";
|
|
14
|
-
import"./index-
|
|
14
|
+
import"./index-3hvmytbs.js";
|
|
15
15
|
import"./index-m9jj544v.js";
|
|
16
|
-
import"./index-
|
|
17
|
-
import"./index-
|
|
18
|
-
import"./index-
|
|
19
|
-
import"./index-
|
|
16
|
+
import"./index-nr8m4j21.js";
|
|
17
|
+
import"./index-25ks6x4k.js";
|
|
18
|
+
import"./index-64pjry21.js";
|
|
19
|
+
import"./index-er62k6w3.js";
|
|
20
20
|
import {
|
|
21
21
|
ApplicationScript
|
|
22
|
-
} from "./index-
|
|
22
|
+
} from "./index-z5cxrbvv.js";
|
|
23
23
|
import"./index-7md2g9vw.js";
|
|
24
24
|
import {
|
|
25
25
|
writeOption,
|
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
allowLocalOption,
|
|
29
29
|
publicEnvOption
|
|
30
30
|
} from "./index-mdjc93e1.js";
|
|
31
|
-
import"./index-
|
|
31
|
+
import"./index-eabfsarf.js";
|
|
32
32
|
|
|
33
33
|
// pkgs/@akanjs/cli/application/application.command.ts
|
|
34
34
|
import { MigrationCommand } from "akanjs/server/migration/migrationCommand";
|
|
@@ -4,19 +4,19 @@ import {
|
|
|
4
4
|
Spinner,
|
|
5
5
|
ProjectTypecheck2,
|
|
6
6
|
WorkspaceExecutor
|
|
7
|
-
} from "./index-
|
|
7
|
+
} from "./index-n8dsax1f.js";
|
|
8
8
|
import"./index-52w0fvh8.js";
|
|
9
|
-
import"./index-
|
|
10
|
-
import"./index-
|
|
9
|
+
import"./index-45c0mxb6.js";
|
|
10
|
+
import"./index-64pjry21.js";
|
|
11
11
|
import {
|
|
12
12
|
AllRoutesBuilder,
|
|
13
13
|
FontPruner,
|
|
14
14
|
precompressArtifacts,
|
|
15
15
|
SsrBaseArtifactBuilder
|
|
16
|
-
} from "./index-
|
|
16
|
+
} from "./index-avjqbtkj.js";
|
|
17
17
|
import {
|
|
18
18
|
CsrArtifactBuilder
|
|
19
|
-
} from "./index-
|
|
19
|
+
} from "./index-25ks6x4k.js";
|
|
20
20
|
import"./index-62md4dwy.js";
|
|
21
21
|
|
|
22
22
|
// pkgs/@akanjs/devkit/applicationBuildRunner.ts
|
|
@@ -331,7 +331,8 @@ void run().catch((error) => {
|
|
|
331
331
|
return { base, allRoutes };
|
|
332
332
|
}
|
|
333
333
|
async#buildOrThrow(label, config) {
|
|
334
|
-
const
|
|
334
|
+
const flag = process.env.AKAN_BUILD_METAFILE;
|
|
335
|
+
const metafileDir = flag && flag !== "0" && flag !== "false" ? path2.join(this.#app.workspace.workspaceRoot, "local", "build-meta", path2.basename(this.#app.cwdPath)) : null;
|
|
335
336
|
const result = await Bun.build(metafileDir ? { ...config, metafile: true } : config);
|
|
336
337
|
if (!result.success)
|
|
337
338
|
throw new AggregateError(result.logs, `[${label}] Bun.build failed`);
|
package/buildBatch.proc.js
CHANGED
|
@@ -6,26 +6,26 @@ import {
|
|
|
6
6
|
resolveSsrPageEntriesForApp,
|
|
7
7
|
WorkspaceExecutor,
|
|
8
8
|
AppExecutor
|
|
9
|
-
} from "./index-
|
|
9
|
+
} from "./index-n8dsax1f.js";
|
|
10
10
|
import {
|
|
11
11
|
computeRouteSeedIndex,
|
|
12
12
|
saveRouteSeedIndex,
|
|
13
13
|
CsrDevBundler,
|
|
14
14
|
SsrDevBundler
|
|
15
|
-
} from "./index-
|
|
15
|
+
} from "./index-45c0mxb6.js";
|
|
16
16
|
import"./index-52w0fvh8.js";
|
|
17
17
|
import {
|
|
18
18
|
ServerGraphFile,
|
|
19
19
|
PagesBundleBuilder
|
|
20
|
-
} from "./index-
|
|
20
|
+
} from "./index-64pjry21.js";
|
|
21
21
|
import {
|
|
22
22
|
CssCompiler,
|
|
23
23
|
FontOptimizer,
|
|
24
24
|
SsrBaseArtifactBuilder
|
|
25
|
-
} from "./index-
|
|
25
|
+
} from "./index-avjqbtkj.js";
|
|
26
26
|
import {
|
|
27
27
|
CsrArtifactBuilder
|
|
28
|
-
} from "./index-
|
|
28
|
+
} from "./index-25ks6x4k.js";
|
|
29
29
|
import"./index-62md4dwy.js";
|
|
30
30
|
|
|
31
31
|
// pkgs/@akanjs/devkit/incrementalBuilder/buildBatch.proc.ts
|
|
@@ -3,27 +3,27 @@ import {
|
|
|
3
3
|
App,
|
|
4
4
|
Workspace,
|
|
5
5
|
command
|
|
6
|
-
} from "./index-
|
|
6
|
+
} from "./index-fbw3kmt5.js";
|
|
7
7
|
import"./index-52w0fvh8.js";
|
|
8
|
-
import"./index-
|
|
9
|
-
import"./index-
|
|
8
|
+
import"./index-n8dsax1f.js";
|
|
9
|
+
import"./index-yfy3t4kw.js";
|
|
10
10
|
import {
|
|
11
11
|
PlatformTestRun
|
|
12
|
-
} from "./index-
|
|
13
|
-
import"./index-
|
|
12
|
+
} from "./index-48n4yhm4.js";
|
|
13
|
+
import"./index-3hvmytbs.js";
|
|
14
14
|
import"./index-m9jj544v.js";
|
|
15
|
-
import"./index-
|
|
16
|
-
import"./index-
|
|
17
|
-
import"./index-
|
|
15
|
+
import"./index-nr8m4j21.js";
|
|
16
|
+
import"./index-25ks6x4k.js";
|
|
17
|
+
import"./index-64pjry21.js";
|
|
18
18
|
import"./index-5nd1wtkv.js";
|
|
19
|
-
import"./index-
|
|
20
|
-
import"./index-
|
|
19
|
+
import"./index-er62k6w3.js";
|
|
20
|
+
import"./index-z5cxrbvv.js";
|
|
21
21
|
import"./index-7md2g9vw.js";
|
|
22
22
|
import"./index-tvehn2sp.js";
|
|
23
|
-
import"./index-
|
|
23
|
+
import"./index-1enc9rga.js";
|
|
24
24
|
import {
|
|
25
25
|
CloudScript2
|
|
26
|
-
} from "./index-
|
|
26
|
+
} from "./index-1de5f0qq.js";
|
|
27
27
|
import {
|
|
28
28
|
writeOption,
|
|
29
29
|
oneNativeTargetOption,
|
|
@@ -34,7 +34,7 @@ import {
|
|
|
34
34
|
hostOption,
|
|
35
35
|
subspaceOption
|
|
36
36
|
} from "./index-mdjc93e1.js";
|
|
37
|
-
import"./index-
|
|
37
|
+
import"./index-eabfsarf.js";
|
|
38
38
|
|
|
39
39
|
// pkgs/@akanjs/cli/cloud/cloud.command.ts
|
|
40
40
|
var localRegistryUrl = () => process.env.AKAN_NPM_REGISTRY ?? "http://127.0.0.1:4873";
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import {
|
|
3
|
+
CloudScript2
|
|
4
|
+
} from "./index-1de5f0qq.js";
|
|
5
|
+
import"./index-48n4yhm4.js";
|
|
6
|
+
import"./index-z5cxrbvv.js";
|
|
7
|
+
import"./index-eabfsarf.js";
|
|
8
|
+
import"./index-er62k6w3.js";
|
|
9
|
+
import"./index-1enc9rga.js";
|
|
10
|
+
import"./index-3hvmytbs.js";
|
|
11
|
+
import"./index-yfy3t4kw.js";
|
|
12
|
+
import"./index-nr8m4j21.js";
|
|
13
|
+
import"./index-m9jj544v.js";
|
|
14
|
+
import"./index-fbw3kmt5.js";
|
|
15
|
+
import"./index-7md2g9vw.js";
|
|
16
|
+
import"./index-25ks6x4k.js";
|
|
17
|
+
import"./index-5nd1wtkv.js";
|
|
18
|
+
import"./index-64pjry21.js";
|
|
19
|
+
import"./index-n8dsax1f.js";
|
|
20
|
+
import"./index-tvehn2sp.js";
|
|
21
|
+
import"./index-52w0fvh8.js";
|
|
22
|
+
export {
|
|
23
|
+
CloudScript2 as CloudScript
|
|
24
|
+
};
|
|
@@ -4,9 +4,9 @@ import {
|
|
|
4
4
|
runner,
|
|
5
5
|
script,
|
|
6
6
|
command
|
|
7
|
-
} from "./index-
|
|
7
|
+
} from "./index-fbw3kmt5.js";
|
|
8
8
|
import"./index-52w0fvh8.js";
|
|
9
|
-
import"./index-
|
|
9
|
+
import"./index-n8dsax1f.js";
|
|
10
10
|
import {
|
|
11
11
|
akanCodeDefaultModel2,
|
|
12
12
|
CodeAgentStreamPrinter2
|
|
@@ -19,7 +19,7 @@ class CodeRunner extends runner("code") {
|
|
|
19
19
|
async serve(options, listen) {
|
|
20
20
|
await import("./consoleToStderr-h5bryj94.js");
|
|
21
21
|
const [{ CodeAgent }, { CodeAgentRpcHost }, { CodeAgentRpcListener }] = await Promise.all([
|
|
22
|
-
import("./CodeAgent-
|
|
22
|
+
import("./CodeAgent-c53dm40p.js"),
|
|
23
23
|
import("./CodeAgentRpcHost-9g27hmer.js"),
|
|
24
24
|
import("./CodeAgentRpcListener-7p7z5dd7.js")
|
|
25
25
|
]);
|
|
@@ -34,8 +34,8 @@ class CodeRunner extends runner("code") {
|
|
|
34
34
|
}
|
|
35
35
|
async tui(options, seed) {
|
|
36
36
|
const [{ CodeAgent }, { CodeTui }] = await Promise.all([
|
|
37
|
-
import("./CodeAgent-
|
|
38
|
-
import("./CodeTui-
|
|
37
|
+
import("./CodeAgent-c53dm40p.js"),
|
|
38
|
+
import("./CodeTui-xz9jtrn3.js")
|
|
39
39
|
]);
|
|
40
40
|
const agentOptions = await CodeRunner.#agentOptions(options, false);
|
|
41
41
|
let resume = options.resume;
|
|
@@ -67,7 +67,7 @@ class CodeRunner extends runner("code") {
|
|
|
67
67
|
}
|
|
68
68
|
}
|
|
69
69
|
async run(prompt, options) {
|
|
70
|
-
const { CodeAgent } = await import("./CodeAgent-
|
|
70
|
+
const { CodeAgent } = await import("./CodeAgent-c53dm40p.js");
|
|
71
71
|
const agent = await CodeAgent.create(await CodeRunner.#agentOptions(options, false));
|
|
72
72
|
const printer = new CodeAgentStreamPrinter2({ json: options.json, thinking: options.thinking });
|
|
73
73
|
agent.on((event) => printer.print(event));
|
|
@@ -2,28 +2,28 @@
|
|
|
2
2
|
import {
|
|
3
3
|
Workspace,
|
|
4
4
|
command
|
|
5
|
-
} from "./index-
|
|
5
|
+
} from "./index-fbw3kmt5.js";
|
|
6
6
|
import"./index-52w0fvh8.js";
|
|
7
|
-
import"./index-
|
|
7
|
+
import"./index-n8dsax1f.js";
|
|
8
8
|
import"./index-hj6w4ka1.js";
|
|
9
|
-
import"./index-
|
|
10
|
-
import"./index-
|
|
11
|
-
import"./index-
|
|
12
|
-
import"./index-
|
|
9
|
+
import"./index-yyxy7aff.js";
|
|
10
|
+
import"./index-aqwdjn4x.js";
|
|
11
|
+
import"./index-cgexcnwd.js";
|
|
12
|
+
import"./index-3hvmytbs.js";
|
|
13
13
|
import"./index-m9jj544v.js";
|
|
14
|
-
import"./index-
|
|
15
|
-
import"./index-
|
|
16
|
-
import"./index-
|
|
14
|
+
import"./index-nr8m4j21.js";
|
|
15
|
+
import"./index-25ks6x4k.js";
|
|
16
|
+
import"./index-64pjry21.js";
|
|
17
17
|
import"./index-zzvvc845.js";
|
|
18
|
-
import"./index-
|
|
19
|
-
import"./index-
|
|
20
|
-
import"./index-
|
|
21
|
-
import"./index-
|
|
22
|
-
import"./index-
|
|
23
|
-
import"./index-
|
|
18
|
+
import"./index-0dd6z4b9.js";
|
|
19
|
+
import"./index-qh73jnyb.js";
|
|
20
|
+
import"./index-j4dzazmw.js";
|
|
21
|
+
import"./index-hqh4mpgt.js";
|
|
22
|
+
import"./index-f2gfq0yh.js";
|
|
23
|
+
import"./index-dkfadmrx.js";
|
|
24
24
|
import {
|
|
25
25
|
ContextScript
|
|
26
|
-
} from "./index-
|
|
26
|
+
} from "./index-fnqj2d2w.js";
|
|
27
27
|
|
|
28
28
|
// pkgs/@akanjs/cli/context/context.command.ts
|
|
29
29
|
class ContextCommand extends command("context", [ContextScript], ({ public: target }) => ({
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import {
|
|
3
|
+
ContextRunner2
|
|
4
|
+
} from "./index-cgexcnwd.js";
|
|
5
|
+
import"./index-dkfadmrx.js";
|
|
6
|
+
import"./index-f2gfq0yh.js";
|
|
7
|
+
import"./index-hqh4mpgt.js";
|
|
8
|
+
import"./index-0dd6z4b9.js";
|
|
9
|
+
import"./index-j4dzazmw.js";
|
|
10
|
+
import"./index-qh73jnyb.js";
|
|
11
|
+
import"./index-3hvmytbs.js";
|
|
12
|
+
import"./index-nr8m4j21.js";
|
|
13
|
+
import"./index-m9jj544v.js";
|
|
14
|
+
import"./index-aqwdjn4x.js";
|
|
15
|
+
import"./index-yyxy7aff.js";
|
|
16
|
+
import"./index-zzvvc845.js";
|
|
17
|
+
import"./index-fbw3kmt5.js";
|
|
18
|
+
import"./index-25ks6x4k.js";
|
|
19
|
+
import"./index-64pjry21.js";
|
|
20
|
+
import"./index-n8dsax1f.js";
|
|
21
|
+
import"./index-hj6w4ka1.js";
|
|
22
|
+
import"./index-52w0fvh8.js";
|
|
23
|
+
export {
|
|
24
|
+
ContextRunner2 as ContextRunner
|
|
25
|
+
};
|
|
@@ -90,10 +90,12 @@ not "fix" it back.
|
|
|
90
90
|
- **Never wrap a form setter in a pass-through arrow** — `(v) => st.do.setTypeOnTicket(v)` emits no
|
|
91
91
|
`data-akan-action` and publishes no agent tool. A wrapper that transforms, adds a statement, or calls `writeOnX`
|
|
92
92
|
is legal; publish it with an explicit `st.tool`.
|
|
93
|
-
- **Never call
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
93
|
+
- **Never call a hook conditionally** — a skipped call shifts every later hook, and production React crashes
|
|
94
|
+
elsewhere. Biome's `useHookAtTopLevel` checks plain hooks (`useState`, `useEffect`), early returns included.
|
|
95
|
+
`no-conditional-st-hook` checks the `st` hooks it cannot see — `st.use.*`, `st.slice.<x>.use.*`, `st.sel`, `st.ref`,
|
|
96
|
+
`st.tool(…).exec()` / `.card()`, `st.useState(…).init()`, `st.expose(…).value()` — behind `||` / `&&` / `??`, in a
|
|
97
|
+
ternary, an `if`, a `switch`, a loop, a `catch`, a default value, an optional call or a callback; not after an early
|
|
98
|
+
`return` or inside a helper the component calls. Read each into its own `const` at the top, then combine.
|
|
97
99
|
- **No deep imports past a barrel**, except cross-module constants (`../map/map.constant`).
|
|
98
100
|
- **Never import across the client/server boundary** (`apps/**`, `libs/**`). Client files (`ui/`, `webkit/`,
|
|
99
101
|
`page/`, `*.store.ts`, every `.tsx`) never import a `*.document|dictionary|service|signal.ts`, `srvkit/`, a
|
|
@@ -160,7 +162,7 @@ not "fix" it back.
|
|
|
160
162
|
security-relevant behaviour gets a real suite.
|
|
161
163
|
- Run `bun run akan test <pkg>` from the root, or `cd <pkg> && bun test --isolate`. Plain `bun test` shares one
|
|
162
164
|
global object across files and fails dozens of tests from that pollution (`bunfig.toml` `[test] isolate` is not
|
|
163
|
-
honored as of Bun 1.
|
|
165
|
+
honored as of Bun 1.4.4); from the repo root it breaks subprocess stdio pipes.
|
|
164
166
|
- Signal tests split in two: `<model>.signal.spec.ts` holds fixtures on `sampleOf(cnst.XInput)` with explicit
|
|
165
167
|
`Promise<cnst.X>` returns and **no assertions**; `<model>.signal.test.ts` holds `describe("<Model> Signal")`,
|
|
166
168
|
describe-scope `let` fixtures, one `beforeAll`, story-ordered `it`s, negatives via
|
|
@@ -228,9 +230,10 @@ Playbook (warning table, code, checklist: `ssrRule`): ① wrap the interaction a
|
|
|
228
230
|
`useEffect(…, [])` load; ④ a store-reading `Zone` holds no markup and delegates to a server `View`; ⑤ hand each
|
|
229
231
|
promise across — `const { xInitInY, xListInY } = fetch.initXInY(id)`, `xInitInY` to a `Zone`, `xListInY` to
|
|
230
232
|
`<Load.Stream>` (model instances, server-only) — and `await` only what the shell must contain; ⑥ named `ReactNode`
|
|
231
|
-
slots (`Layout.Navbar`); ⑦ derived display logic on `Light<Model>`; ⑧ `.guard(() => signedIn())`
|
|
232
|
-
`_layout.tsx` (a real 3xx before anything renders; `getSelf({ unauthorize })` in a body
|
|
233
|
-
`group-data-[…]`, `<details>`) over client state for visibility;
|
|
233
|
+
slots (`Layout.Navbar`); ⑦ derived display logic on `Light<Model>`; ⑧ `.guard(() => signedIn())`
|
|
234
|
+
(`@libs/shared/webkit`) on `_layout.tsx` (a real 3xx before anything renders; `getSelf({ unauthorize })` in a body
|
|
235
|
+
redirects in-page after I/O); ⑨ CSS (`data-*` + `group-data-[…]`, `<details>`) over client state for visibility;
|
|
236
|
+
⑩ heavy islands behind `index_.tsx` + `lazy()`.
|
|
234
237
|
|
|
235
238
|
## Runtime & Build Configuration
|
|
236
239
|
|
|
@@ -502,9 +505,10 @@ export default page()
|
|
|
502
505
|
- `.render()` gets the declared args flat and typed (no `PageProps`, no `loader=` prop). Order: `usePage()`, fetch,
|
|
503
506
|
return; auth is the chain's `.guard()`, which runs before anything renders. Hand `fetch.init*` / `view*` / `edit*` fields to sections unawaited; await only what the shell reads
|
|
504
507
|
(title, redirect, link id) in one `Promise.all`.
|
|
505
|
-
- Gate auth with `.guard(() => signedIn())` (`@libs/shared/webkit
|
|
506
|
-
|
|
507
|
-
|
|
508
|
+
- Gate auth with `.guard(() => signedIn())` (`@libs/shared/webkit`; a new workspace has that lib only with
|
|
509
|
+
`create-workspace --libs true`) at `_layout.tsx`, and repeat it on a page that needs more; it is a courtesy, the
|
|
510
|
+
endpoint guards are the gate. `getSelf({ unauthorize })` in a body still works. `async` only when the body awaits;
|
|
511
|
+
the callback is not a React component, so it takes no name and no return type. No `useState`, `useEffect`, or
|
|
508
512
|
comments in page files.
|
|
509
513
|
|
|
510
514
|
## Akan Sync Conventions (`apps/**`, `libs/**`)
|
|
@@ -13,7 +13,8 @@ Generate persistence behavior for a collection-backed Akan module. This file tur
|
|
|
13
13
|
## Current Akan Patterns
|
|
14
14
|
- Query names become generated helpers such as list, find, pick, exists, count, and insight variants.
|
|
15
15
|
- Use filter args for required query inputs and optional args only when absence has a clear query meaning.
|
|
16
|
-
- Use schema indexes for fields that are frequently filtered, sorted, uniquely constrained
|
|
16
|
+
- Use schema indexes for fields that are frequently filtered, sorted, or uniquely constrained; a `"text"` index builds
|
|
17
|
+
nothing, so give a searched field a `text` role (`field(String, { text: "title" })`) instead.
|
|
17
18
|
- Use hooks for persistence lifecycle behavior that must always run with document saves.
|
|
18
19
|
|
|
19
20
|
## Codegen Rules
|
|
@@ -59,10 +59,10 @@ this is the full contract behind them.
|
|
|
59
59
|
`Unknown document field path`. The facade's third argument is the scope (`{ withRemoved: true }`), never a field.
|
|
60
60
|
This is the only way to read a `field.secret(...)` value, which is otherwise stripped.
|
|
61
61
|
- **Hydrated vs raw:** server queries return hydrated `cnst.<Model>` instances (with `set`/`save`/`refresh`), and so do client fetch results — `FetchClient` parses every return with `crystalize` defaulting to **true** (`pkgs/akanjs/fetch/client/fetchClient.ts`). The raw `GetStateObject` shape (functions stripped, `pkgs/akanjs/base/types.ts`) is what the `<ref>Obj` / `<ref>ObjList` / `<ref>ObjInsight` handles carry, because those pass `crystalize: false` on purpose so the value can cross the RSC boundary as a client prop.
|
|
62
|
-
- Every filter generates
|
|
63
|
-
`count` · `insight` · `query` · **`remove`** · **`removeOne`** · **`update`** · **`updateOne`**. The
|
|
64
|
-
query-level writes — one atomic UPDATE, **no hooks**,
|
|
65
|
-
model that carries no removal side effect; otherwise remove documents one at a time.
|
|
62
|
+
- Every filter generates fifteen methods: `list` · `listIds` · `find` · `findId` · `pick` · `pickId` · `exists` ·
|
|
63
|
+
`count` · `insight` · `query` · **`remove`** · **`removeOne`** · **`purge`** · **`update`** · **`updateOne`**. The
|
|
64
|
+
last five are query-level writes — one atomic UPDATE, a DELETE for `purge` — with **no hooks**, so no `_postRemove`
|
|
65
|
+
and no cascade. Use them on a model that carries no removal side effect; otherwise remove documents one at a time.
|
|
66
66
|
- **`update<Filter>` / `updateOne<Filter>` are chains, not calls:** `await updateInRoot(rootId).set({ status:
|
|
67
67
|
"archived" })`. The patch cannot trail the filter args — a filter's own args may be optional and no tuple type
|
|
68
68
|
puts a required element after those — so it lands on a terminal `.set()`, mirroring the `UPDATE … SET …` it
|
|
@@ -88,12 +88,14 @@ this is the full contract behind them.
|
|
|
88
88
|
|
|
89
89
|
## Soft Removal And The Facade's Writes
|
|
90
90
|
|
|
91
|
-
- **Removal is soft** — every remove stamps `removedAt`, and every read and query-level write
|
|
92
|
-
(`removedAt IS NULL`).
|
|
91
|
+
- **Removal is soft** — every remove stamps `removedAt`, and every read and every query-level write but `purge` sees
|
|
92
|
+
live rows only (`removedAt IS NULL`).
|
|
93
93
|
- **`purge<Filter>(...)` / `purgeMany(query)` is the one hard delete**, for data you mean to lose, such as logs past
|
|
94
94
|
their retention. It deletes every row the query matches, removed rows too (`{ removedAt: q.lt(cutoff) }` clears old
|
|
95
95
|
removals), and returns the count. The search mirror's rows go with each row, and it runs no hook, cascade or live
|
|
96
|
-
event and has no undo. It deletes 1,000 rows per statement
|
|
96
|
+
event and has no undo. It deletes 1,000 rows per statement and refuses `q.search()` and a query empty in shape —
|
|
97
|
+
`{}` (a fallen-through `q.when` builds one), a `q.all()` of only those or nothing, a `q.any()` holding one or
|
|
98
|
+
nothing — but not a condition that happens to match every row: `{ id: q.notOneOf([]) }` deletes them all.
|
|
97
99
|
- **`{ withRemoved: true }` reaches removed rows**: the third argument of `find` / `findOne` / `findById`
|
|
98
100
|
(projection second, `null` when none), the last of `count` / `exists` / `updateMany`, or inside `updateOne` /
|
|
99
101
|
`updateById`'s options. Without it, a `removedAt` condition only a removed row can meet (`q.exists("removedAt")`,
|
|
@@ -228,7 +228,7 @@ assembles one from. There is no `content` field; the string *is* the content.
|
|
|
228
228
|
const config: AppConfig = {
|
|
229
229
|
docker: { preRuns: ["apt-get update && apt-get install -y --no-install-recommends ffmpeg"] },
|
|
230
230
|
};
|
|
231
|
-
const config: AppConfig = { docker: "FROM oven/bun:1-slim\n…" }; // verbatim, nothing merged in
|
|
231
|
+
const config: AppConfig = { docker: "FROM oven/bun:1.4.4-slim\n…" }; // verbatim, nothing merged in
|
|
232
232
|
```
|
|
233
233
|
|
|
234
234
|
- `image` and each run entry take `string | { amd64?, arm64? }`; the object form compiles to a
|
|
@@ -618,8 +618,9 @@ serving without a key. Everything else is behind the ops channel.
|
|
|
618
618
|
- **`buildId` is `AKAN_BUILD_ID` when the deployment sets it**, else the git sha `akan build` wrote into
|
|
619
619
|
`akan.build.json` beside `main.js` (`-dirty` when the tree was).
|
|
620
620
|
- **`operationMode` does not gate any of this** — the key does. `edge` means a production host outside the
|
|
621
|
-
cluster: the console refuses it like `cloud`,
|
|
622
|
-
|
|
621
|
+
cluster: the console refuses it like `cloud`, `/mcp` starts off unless `AKAN_MCP=true` or `setMcp(true)`, and
|
|
622
|
+
`operationMode: ["edge"]` on a `serve()` (the whole module, endpoints included) or an `init` / `interval` / `cron`
|
|
623
|
+
runs it only there; `local` is a developer machine.
|
|
623
624
|
|
|
624
625
|
## Shipped Assets — `assets` In `akan.config.ts`
|
|
625
626
|
|
|
@@ -141,11 +141,11 @@ eight queries threw; per-section boundaries put each rejection at its own bounda
|
|
|
141
141
|
**Know which redirects are real.** A streaming response starts while layout and page bodies still run, so a redirect
|
|
142
142
|
is a real 3xx only when it was raised before any I/O was awaited, the body's own or a layout's above it (a layout that
|
|
143
143
|
awaits `fetch.viewOrg` makes every page under it late); after one — `getSelf({ unauthorize: "/signin" })` fetches —
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
so a redirect from it is a real 3xx even after the guard's own awaited query:
|
|
147
|
-
real 3xx from its body after I/O — a moved URL found by a query — takes
|
|
148
|
-
waits for the whole render. Never redirect from inside a streamed section.
|
|
144
|
+
a browser gets an HTTP 200 that navigates in the page, which `curl` does not follow, while a crawler, whose response
|
|
145
|
+
waits for the whole render, gets the real 3xx. Either way no markup below the redirect is sent. A route's `.guard()`
|
|
146
|
+
runs before any layout body starts, so a redirect from it is a real 3xx even after the guard's own awaited query:
|
|
147
|
+
gate there. A route that must answer a real 3xx from its body after I/O — a moved URL found by a query — takes
|
|
148
|
+
`.config({ ssr: "block" })`: the response waits for the whole render. Never redirect from inside a streamed section.
|
|
149
149
|
|
|
150
150
|
**⑥ Use named `ReactNode` slots, not just `children`.** A client shell that takes one slot per region lets a
|
|
151
151
|
server component supply each of them, instead of absorbing the whole subtree into the bundle. `Layout.Navbar`
|
|
@@ -155,10 +155,10 @@ is the shape: `title` / `left` / `right` beside `back` and `children`, each fill
|
|
|
155
155
|
`canWrite(user?)`, `formatTimes()`), and enum→class lookups belong in a module-scope `as const` map. Both sides call
|
|
156
156
|
the same method, so a client component that exists only to compute a label is markup in the wrong place.
|
|
157
157
|
|
|
158
|
-
**⑧ Gate auth on the server.** `.guard(() => signedIn())` (`@libs/shared/webkit
|
|
159
|
-
of the route renders, so the redirect is a
|
|
160
|
-
|
|
161
|
-
flashes the wrong UI first.
|
|
158
|
+
**⑧ Gate auth on the server.** `.guard(() => signedIn())` (`@libs/shared/webkit`, which a new workspace has only
|
|
159
|
+
with `create-workspace --libs true`) on `_layout.tsx` runs before any of the route renders, so the redirect is a
|
|
160
|
+
real 3xx; `getSelf({ unauthorize: "/signin" })` in a layout body still redirects before any of the page's markup,
|
|
161
|
+
in-page after I/O. A client-side check costs a hydration round-trip and flashes the wrong UI first.
|
|
162
162
|
|
|
163
163
|
**⑨ Prefer CSS over client state for pure visibility.** A `data-*` attribute plus `group-data-[…]` variants (see
|
|
164
164
|
`libs/util/ui/Grid/*`) or `<details>`/`<summary>` keeps both branches server-rendered. Reach for `useState` when the
|
|
@@ -226,11 +226,11 @@ HTTP verb a mutation is mounted under. `conventions` carries the invariants —
|
|
|
226
226
|
nobody to close it. It never carries the visitor's session either: a call to another origin sends only the `jwt`
|
|
227
227
|
its caller gave the clone.
|
|
228
228
|
- **Retry a call with `retry`, never with a loop of your own.** `fetch.clone({ origin, retry: {} })` (or a call's
|
|
229
|
-
own `{ retry }`) tries again on an unreachable server, a 502/503/504
|
|
230
|
-
with jitter until the call's one deadline runs out. A mutation retries under
|
|
231
|
-
the `idempotencyKey` you name, and the server runs it once per key, caller and
|
|
232
|
-
above); a signed-out call, one whose handler returns a `Response`, and a call
|
|
233
|
-
is
|
|
229
|
+
own `{ retry }`) tries again on an unreachable server, a 408/502/503/504, a 429 after its Retry-After and a 409
|
|
230
|
+
`idempotencyInFlight`, backing off with jitter until the call's one deadline runs out. A mutation retries under
|
|
231
|
+
one `Idempotency-Key` it mints, or the `idempotencyKey` you name, and the server runs it once per key, caller and
|
|
232
|
+
arguments (Repeated Mutations above); a signed-out call, one whose handler returns a `Response`, and a call
|
|
233
|
+
through MCP run every time. No other error is retried.
|
|
234
234
|
- **A failure another process reported travels as itself.** A server-to-server `fetch.<endpoint>(..., { origin })`
|
|
235
235
|
restores the remote `Err` — the same class, key and `data` — so a hop that rethrows it answers its own caller
|
|
236
236
|
with that error and the dictionary translates it. Never wrap the catch in a `new Error`, and never re-key it as a
|
|
@@ -127,7 +127,7 @@ akan start-ios <%= appName %> # Run it in a simulator or o
|
|
|
127
127
|
akan build-desktop <%= appName %> # Build it for this computer into dist/native/<%= appName %>/<target>/build
|
|
128
128
|
akan build-desktop <%= appName %> --installer true # Windows: add a per-user setup program
|
|
129
129
|
akan update-keygen <%= appName %> # Make the update signing key once; print its public key
|
|
130
|
-
akan publish-update <%= appName %> # Build
|
|
130
|
+
akan publish-update <%= appName %> # Build a key-signed release for updates.url; --sign true also code-signs it
|
|
131
131
|
```
|
|
132
132
|
|
|
133
133
|
### The Essential Loop: Workflow -> Sync -> Check
|
|
@@ -283,6 +283,8 @@ core framework. The core framework gives you the composition points below; wire
|
|
|
283
283
|
- **Auto-generated CRUD and `serve()` service methods / lifecycle hooks do not receive session context.** If an
|
|
284
284
|
operation needs the acting user, expose a custom endpoint that takes it via `.with(CurrentUserId)` — never trust a
|
|
285
285
|
client-supplied user id.
|
|
286
|
-
- **SSR auth-gated pages: guard at the layout.**
|
|
287
|
-
|
|
286
|
+
- **SSR auth-gated pages: guard at the layout.** `.guard(() => signedIn())` on the `_layout.tsx` chain answers a
|
|
287
|
+
real 307 before any of it renders, so nested pages never render for signed-out users; a check in `.render()`
|
|
288
|
+
after awaited I/O redirects in-page, as an HTTP 200. `signedIn()` comes from `@libs/shared/webkit`, which a new
|
|
289
|
+
workspace has only with `create-workspace --libs true`.
|
|
288
290
|
|
|
@@ -426,9 +426,9 @@ export default page()
|
|
|
426
426
|
.config({ transition: "stack" })
|
|
427
427
|
.head(({ projectId }) => <title>{projectId}</title>)
|
|
428
428
|
.prompt("briefProject", "Brief one project: its status and what is due.")
|
|
429
|
-
.render(
|
|
429
|
+
.render(({ projectId, tab }) => {
|
|
430
430
|
const { l } = usePage();
|
|
431
|
-
const { projectView } =
|
|
431
|
+
const { projectView } = fetch.viewProject(projectId);
|
|
432
432
|
return <Project.Zone.View view={projectView} tab={tab} />;
|
|
433
433
|
});
|
|
434
434
|
```
|
|
@@ -570,6 +570,7 @@ akan sync automatically generates APIs across all layers. Only write custom logi
|
|
|
570
570
|
| `new[Model](partial)`, `edit[Model](model)`, `view[Model](model)` | Form/view state actions |
|
|
571
571
|
| `[slice]List`, `[slice]InitList`, `[slice]Insight`, `[slice]Selection`, `hasMoreOf[Slice]` | Slice states |
|
|
572
572
|
| `init[Slice](args)`, `refresh[Slice]()`, `setPageOf[Slice](page)`, `loadMoreOf[Slice]()` | Slice actions |
|
|
573
|
+
| `invalidate[Model]()` | Marks every slice stale without a request, so the next `Load.Units` / `Load.View` mount refetches — for a custom mutation whose changed rows the store never received |
|
|
573
574
|
| `set[Field]On[Model](value)` | Auto-setters for each model field |
|
|
574
575
|
| `upload[Field]On[Model](fileList, idx?)` | Upload into a `File` field, scoped to the form that started it |
|
|
575
576
|
| `[model]FormUploading` | Pending uploads per `File` field (`{}` when idle); submits save nothing until empty |
|
|
@@ -586,8 +587,9 @@ akan sync automatically generates APIs across all layers. Only write custom logi
|
|
|
586
587
|
| `exists[Query](args)`, `count[Query](args)` | Existence check and count |
|
|
587
588
|
| `insight[Query](args)`, `query[Query](args)` | Insight and raw query |
|
|
588
589
|
| `remove[Query](args)`, `removeOne[Query](args)` | Query-level soft remove — all matches, or the newest one (`createdAt` desc, not caller-chosen) |
|
|
590
|
+
| `purge[Query](args)` | Hard delete of every match, removed rows too, returning the count — no undo |
|
|
589
591
|
| `update[Query](args).set(patch)`, `updateOne[Query](args).set(patch)` | Query-level update — the patch lands on a terminal `.set()`, because a filter's trailing args may be optional |
|
|
590
592
|
|
|
591
|
-
**Rule**: Define `Filter` with `.query()` conditions in `document.ts`. akan sync auto-generates all
|
|
593
|
+
**Rule**: Define `Filter` with `.query()` conditions in `document.ts`. akan sync auto-generates all 15 query helper methods per filter. Write `Document` chain methods only for state transitions with validation.
|
|
592
594
|
|
|
593
|
-
**The
|
|
595
|
+
**The five query-level writes fire no hooks**, so no `_pre`/`_postRemove` and no cascade run — same as `updateManyByQuery`. Reach for them when the model carries no removal side effect; otherwise remove documents one at a time. A filter keyed after its own model (filter `chat` on model `chat`) is rejected at boot, because `removeChat`/`updateChat` would otherwise shadow the generated single-document CRUD.
|