@akanjs/cli 3.1.0-rc.21 → 3.1.0-rc.23
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-gzfc5t52.js → CodeAgent-fee0pnwp.js} +2 -2
- package/{CodeTui-bpsjs8wz.js → CodeTui-xh71b2k8.js} +1 -1
- package/TunnelShare-s7bpe55e.js +14 -0
- package/{agent.command-67ysh3n6.js → agent.command-tge9rvmt.js} +5 -5
- package/akanCode.js +2 -2
- package/{application.command-q0tqw5pc.js → application.command-j5b8yrcf.js} +9 -9
- package/{applicationBuildRunner-wsszr305.js → applicationBuildRunner-s41mgz21.js} +21 -7
- package/buildBatch.proc.js +9 -9
- package/{cloud.command-e7tkxyx6.js → cloud.command-q9srng6e.js} +13 -13
- package/cloud.script-vfsd4gxs.js +24 -0
- package/{code.command-ttk8tje2.js → code.command-n6r6zt97.js} +6 -6
- package/{context.command-bdsk2z2r.js → context.command-1je84w1b.js} +16 -16
- package/context.runner-xg0ngz93.js +25 -0
- package/{guideline.command-man90n70.js → guideline.command-0e0sx2vg.js} +2 -2
- package/guidelines/conventions/conventions.instruction.md +18 -12
- package/guidelines/mcpRule/mcpRule.instruction.md +88 -47
- package/guidelines/pageRule/pageRule.instruction.md +55 -8
- package/guidelines/runtimeRule/runtimeRule.instruction.md +8 -1
- package/guidelines/ssrRule/ssrRule.instruction.md +8 -5
- package/guidelines/workspaceRecipes/workspaceRecipes.instruction.md +1 -1
- package/incrementalBuilder.proc.js +3 -3
- package/{index-p2r64bpa.js → index-1bhv9dh4.js} +4 -4
- package/{index-h6czey01.js → index-1xqq3va9.js} +9 -9
- package/{index-27y8t17p.js → index-3xhak9e0.js} +1 -1
- package/{index-ta1dychm.js → index-4fe4qqgn.js} +3 -3
- package/{index-35m6bzm7.js → index-551gh8h2.js} +5 -5
- package/{index-033wne2j.js → index-5m0s0gdv.js} +1 -1
- package/index-6mprvdt8.js +566 -0
- package/{index-h3r3nr9y.js → index-6nqnqzv1.js} +1 -1
- package/{index-cae9m5jz.js → index-73esn3y2.js} +1 -1
- package/{index-8jehkey8.js → index-7xy30jev.js} +4 -4
- package/{index-75n5q4ph.js → index-85h3dhe0.js} +7 -7
- package/{index-54wc2phm.js → index-8abyrfw8.js} +5 -4
- package/{index-g9ks2k8c.js → index-94jq9cbz.js} +2 -2
- package/{index-jrmzcp66.js → index-9h0z0tjr.js} +2 -2
- package/{index-844q7f8z.js → index-c9rfak6r.js} +7 -7
- package/{index-1r5a8bzx.js → index-cgyqx6q1.js} +2 -2
- package/{index-zv5s8x58.js → index-cq5x7a9k.js} +8 -8
- package/{index-ebarbgba.js → index-deckcwbg.js} +2 -2
- package/{index-4v43h00g.js → index-ex35dg39.js} +2 -1
- package/{index-xsd96yzw.js → index-f9118j70.js} +1 -1
- package/{index-vkb9m4z7.js → index-g5px5pxd.js} +1 -1
- package/{index-g6ax17x4.js → index-gxqvev8w.js} +28 -8
- package/{index-rc51f9ht.js → index-hagw9c94.js} +3 -3
- package/{index-9mt4smfy.js → index-p44jnjfr.js} +2 -2
- package/{index-4393nb4b.js → index-rp9anyeb.js} +4 -4
- package/{index-pg1t468s.js → index-t8npm331.js} +3 -3
- package/{index-nv79n88g.js → index-tbmtmkhx.js} +2 -2
- package/{index-2w8j2fnv.js → index-vyh8kemm.js} +3 -3
- package/{index-48edp6q4.js → index-x7bny3wv.js} +1 -1
- package/index.js +22 -22
- package/{library.command-6amzsrb8.js → library.command-ys9s0mtc.js} +3 -3
- package/{localRegistry.command-yqc0nyhh.js → localRegistry.command-kmp3sd47.js} +12 -12
- package/{module.command-10x6jv6c.js → module.command-5sx9453y.js} +5 -5
- package/{package.command-pwfvecjf.js → package.command-s0d3417k.js} +3 -3
- package/package.json +2 -2
- package/{page.command-ahhgx9y1.js → page.command-zsa03pmc.js} +3 -3
- package/{pipeline.command-1ptr3e9y.js → pipeline.command-j8h6qsha.js} +2 -2
- package/{primitive.command-g5xwv6tj.js → primitive.command-n2978nmw.js} +6 -6
- package/{projectTypecheck-fx8x7cat.js → projectTypecheck-qg2jf80j.js} +1 -1
- package/{quality.command-fw9ck061.js → quality.command-7kgz46st.js} +2 -2
- package/{repair.command-g8kecj96.js → repair.command-2sszcckw.js} +5 -5
- package/{routeSourceValidator-7ycnfz0e.js → routeSourceValidator-6jd0q6r6.js} +47 -14
- package/{scalar.command-fprap51w.js → scalar.command-230jrhzf.js} +4 -4
- package/{subspace.command-sc0t527y.js → subspace.command-y5v4ypd3.js} +8 -8
- package/{tunnel.command-mqnsqbwf.js → tunnel.command-ja29zghd.js} +7 -7
- package/{workflow.command-j0jgkr13.js → workflow.command-0eg8czt5.js} +10 -10
- package/{workspace.command-1r9hvvw0.js → workspace.command-zcym1dk5.js} +24 -24
- package/TunnelShare-tfrnftgr.js +0 -14
- package/cloud.script-krzh3d7k.js +0 -24
- package/context.runner-bxzv0gm0.js +0 -25
- package/index-nx64dz92.js +0 -271
package/.build-stamp
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
0b08571b982fd7b2ccd3720c27f960eb948650e831ba3250f05dad12484f7c8f
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import {
|
|
3
|
+
TunnelShare2
|
|
4
|
+
} from "./index-x7bny3wv.js";
|
|
5
|
+
import"./index-9h0z0tjr.js";
|
|
6
|
+
import"./index-551gh8h2.js";
|
|
7
|
+
import"./index-m9jj544v.js";
|
|
8
|
+
import"./index-6mprvdt8.js";
|
|
9
|
+
import"./index-6nqnqzv1.js";
|
|
10
|
+
import"./index-gxqvev8w.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-g5px5pxd.js";
|
|
6
6
|
import"./index-52w0fvh8.js";
|
|
7
|
-
import"./index-
|
|
7
|
+
import"./index-gxqvev8w.js";
|
|
8
8
|
import"./index-hj6w4ka1.js";
|
|
9
|
-
import"./index-
|
|
10
|
-
import"./index-
|
|
9
|
+
import"./index-5m0s0gdv.js";
|
|
10
|
+
import"./index-tbmtmkhx.js";
|
|
11
11
|
import"./index-zzvvc845.js";
|
|
12
12
|
import {
|
|
13
13
|
AgentScript
|
|
14
|
-
} from "./index-
|
|
14
|
+
} from "./index-4fe4qqgn.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-vyh8kemm.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-73esn3y2.js";
|
|
44
44
|
import"./index-7md2g9vw.js";
|
|
45
45
|
import {
|
|
46
46
|
CodeAgentRpcHost2
|
|
@@ -7,18 +7,19 @@ import {
|
|
|
7
7
|
Exec,
|
|
8
8
|
Workspace,
|
|
9
9
|
command
|
|
10
|
-
} from "./index-
|
|
10
|
+
} from "./index-g5px5pxd.js";
|
|
11
11
|
import"./index-52w0fvh8.js";
|
|
12
|
-
import"./index-
|
|
12
|
+
import"./index-gxqvev8w.js";
|
|
13
13
|
import"./index-5nd1wtkv.js";
|
|
14
|
-
import"./index-
|
|
14
|
+
import"./index-ex35dg39.js";
|
|
15
15
|
import"./index-m9jj544v.js";
|
|
16
|
-
import"./index-
|
|
17
|
-
import"./index-
|
|
18
|
-
import"./index-
|
|
16
|
+
import"./index-551gh8h2.js";
|
|
17
|
+
import"./index-6mprvdt8.js";
|
|
18
|
+
import"./index-6nqnqzv1.js";
|
|
19
|
+
import"./index-p44jnjfr.js";
|
|
19
20
|
import {
|
|
20
21
|
ApplicationScript
|
|
21
|
-
} from "./index-
|
|
22
|
+
} from "./index-1xqq3va9.js";
|
|
22
23
|
import"./index-7md2g9vw.js";
|
|
23
24
|
import {
|
|
24
25
|
writeOption,
|
|
@@ -27,8 +28,7 @@ import {
|
|
|
27
28
|
allowLocalOption,
|
|
28
29
|
publicEnvOption
|
|
29
30
|
} from "./index-mdjc93e1.js";
|
|
30
|
-
import"./index-
|
|
31
|
-
import"./index-nx64dz92.js";
|
|
31
|
+
import"./index-f9118j70.js";
|
|
32
32
|
|
|
33
33
|
// pkgs/@akanjs/cli/application/application.command.ts
|
|
34
34
|
import { MigrationCommand } from "akanjs/server/migration/migrationCommand";
|
|
@@ -4,20 +4,20 @@ import {
|
|
|
4
4
|
Spinner,
|
|
5
5
|
ProjectTypecheck2,
|
|
6
6
|
WorkspaceExecutor
|
|
7
|
-
} from "./index-
|
|
7
|
+
} from "./index-gxqvev8w.js";
|
|
8
8
|
import"./index-52w0fvh8.js";
|
|
9
|
-
import"./index-
|
|
10
|
-
import"./index-
|
|
9
|
+
import"./index-cgyqx6q1.js";
|
|
10
|
+
import"./index-6nqnqzv1.js";
|
|
11
11
|
import {
|
|
12
12
|
AllRoutesBuilder,
|
|
13
13
|
FontPruner,
|
|
14
14
|
precompressArtifacts,
|
|
15
15
|
SsrBaseArtifactBuilder
|
|
16
|
-
} from "./index-
|
|
17
|
-
import"./index-62md4dwy.js";
|
|
16
|
+
} from "./index-8abyrfw8.js";
|
|
18
17
|
import {
|
|
19
18
|
CsrArtifactBuilder
|
|
20
|
-
} from "./index-
|
|
19
|
+
} from "./index-6mprvdt8.js";
|
|
20
|
+
import"./index-62md4dwy.js";
|
|
21
21
|
|
|
22
22
|
// pkgs/@akanjs/devkit/applicationBuildRunner.ts
|
|
23
23
|
import path2 from "path";
|
|
@@ -124,12 +124,26 @@ class ApplicationBuildRunner {
|
|
|
124
124
|
get #envDir() {
|
|
125
125
|
return path2.join(this.#app.cwdPath, "env");
|
|
126
126
|
}
|
|
127
|
+
#pinImageEnv(baseDevEnv, environment) {
|
|
128
|
+
const imageEnv = {
|
|
129
|
+
AKAN_PUBLIC_ENV: environment,
|
|
130
|
+
AKAN_PUBLIC_REPO_NAME: baseDevEnv.repoName,
|
|
131
|
+
AKAN_PUBLIC_SERVE_DOMAIN: baseDevEnv.serveDomain
|
|
132
|
+
};
|
|
133
|
+
const outranked = Object.entries(imageEnv).filter(([key, value]) => {
|
|
134
|
+
const given = process.env[key];
|
|
135
|
+
return !!given && given !== value && !(key === "AKAN_PUBLIC_ENV" && this.#environment);
|
|
136
|
+
});
|
|
137
|
+
if (outranked.length)
|
|
138
|
+
this.#app.logger.warn(`The workspace .env outranks this process's environment: the bundles and the image take ${outranked.map(([key, value]) => `${key}=${value} (not ${process.env[key]})`).join(", ")}.`);
|
|
139
|
+
Object.assign(process.env, imageEnv);
|
|
140
|
+
}
|
|
127
141
|
async build({ spinner = false } = {}) {
|
|
128
142
|
this.#spinner = spinner;
|
|
129
143
|
const { web, assets, baseDevEnv } = await this.#app.getConfig();
|
|
130
144
|
const environment = this.#environment ?? baseDevEnv.env;
|
|
131
145
|
WorkspaceExecutor.assertDeployableEnv(baseDevEnv, environment, "akan build");
|
|
132
|
-
|
|
146
|
+
this.#pinImageEnv(baseDevEnv, environment);
|
|
133
147
|
if (this.#profile)
|
|
134
148
|
await ServerEnvProfile.assertShippable({ envDir: this.#envDir, environment, profile: this.#profile });
|
|
135
149
|
await this.#runPhase("prepare", "Preparing output directory", () => this.#app.prepareCommand("build"));
|
package/buildBatch.proc.js
CHANGED
|
@@ -6,27 +6,27 @@ import {
|
|
|
6
6
|
resolveSsrPageEntriesForApp,
|
|
7
7
|
WorkspaceExecutor,
|
|
8
8
|
AppExecutor
|
|
9
|
-
} from "./index-
|
|
9
|
+
} from "./index-gxqvev8w.js";
|
|
10
10
|
import {
|
|
11
11
|
computeRouteSeedIndex,
|
|
12
12
|
saveRouteSeedIndex,
|
|
13
13
|
CsrDevBundler,
|
|
14
14
|
SsrDevBundler
|
|
15
|
-
} from "./index-
|
|
15
|
+
} from "./index-cgyqx6q1.js";
|
|
16
16
|
import"./index-52w0fvh8.js";
|
|
17
17
|
import {
|
|
18
18
|
ServerGraphFile,
|
|
19
19
|
PagesBundleBuilder
|
|
20
|
-
} from "./index-
|
|
20
|
+
} from "./index-6nqnqzv1.js";
|
|
21
21
|
import {
|
|
22
22
|
CssCompiler,
|
|
23
23
|
FontOptimizer,
|
|
24
24
|
SsrBaseArtifactBuilder
|
|
25
|
-
} from "./index-
|
|
26
|
-
import"./index-62md4dwy.js";
|
|
25
|
+
} from "./index-8abyrfw8.js";
|
|
27
26
|
import {
|
|
28
27
|
CsrArtifactBuilder
|
|
29
|
-
} from "./index-
|
|
28
|
+
} from "./index-6mprvdt8.js";
|
|
29
|
+
import"./index-62md4dwy.js";
|
|
30
30
|
|
|
31
31
|
// pkgs/@akanjs/devkit/incrementalBuilder/buildBatch.proc.ts
|
|
32
32
|
import path from "path";
|
|
@@ -116,10 +116,10 @@ class BuildBatch {
|
|
|
116
116
|
async#buildShell() {
|
|
117
117
|
const started = Date.now();
|
|
118
118
|
try {
|
|
119
|
-
await new CsrArtifactBuilder(this.#app, "start", "en", { cssAssets: this.#request.cssAssets }).
|
|
120
|
-
this.#logger.verbose(`
|
|
119
|
+
await new CsrArtifactBuilder(this.#app, "start", "en", { cssAssets: this.#request.cssAssets }).buildMcpAppViews();
|
|
120
|
+
this.#logger.verbose(`mcp-app-views ok (${Date.now() - started}ms)`);
|
|
121
121
|
} catch (err) {
|
|
122
|
-
this.#fail("shell", "
|
|
122
|
+
this.#fail("shell", "mcp-app-views", err);
|
|
123
123
|
}
|
|
124
124
|
}
|
|
125
125
|
async#rebuildCsrArtifact(started) {
|
|
@@ -3,26 +3,27 @@ import {
|
|
|
3
3
|
App,
|
|
4
4
|
Workspace,
|
|
5
5
|
command
|
|
6
|
-
} from "./index-
|
|
6
|
+
} from "./index-g5px5pxd.js";
|
|
7
7
|
import"./index-52w0fvh8.js";
|
|
8
|
-
import"./index-
|
|
9
|
-
import"./index-
|
|
8
|
+
import"./index-gxqvev8w.js";
|
|
9
|
+
import"./index-9h0z0tjr.js";
|
|
10
10
|
import {
|
|
11
11
|
PlatformTestRun
|
|
12
|
-
} from "./index-
|
|
13
|
-
import"./index-
|
|
12
|
+
} from "./index-hagw9c94.js";
|
|
13
|
+
import"./index-ex35dg39.js";
|
|
14
14
|
import"./index-m9jj544v.js";
|
|
15
|
-
import"./index-
|
|
16
|
-
import"./index-
|
|
15
|
+
import"./index-551gh8h2.js";
|
|
16
|
+
import"./index-6mprvdt8.js";
|
|
17
|
+
import"./index-6nqnqzv1.js";
|
|
17
18
|
import"./index-5nd1wtkv.js";
|
|
18
|
-
import"./index-
|
|
19
|
-
import"./index-
|
|
19
|
+
import"./index-p44jnjfr.js";
|
|
20
|
+
import"./index-1xqq3va9.js";
|
|
20
21
|
import"./index-7md2g9vw.js";
|
|
21
22
|
import"./index-tvehn2sp.js";
|
|
22
|
-
import"./index-
|
|
23
|
+
import"./index-deckcwbg.js";
|
|
23
24
|
import {
|
|
24
25
|
CloudScript2
|
|
25
|
-
} from "./index-
|
|
26
|
+
} from "./index-c9rfak6r.js";
|
|
26
27
|
import {
|
|
27
28
|
writeOption,
|
|
28
29
|
oneNativeTargetOption,
|
|
@@ -33,8 +34,7 @@ import {
|
|
|
33
34
|
hostOption,
|
|
34
35
|
subspaceOption
|
|
35
36
|
} from "./index-mdjc93e1.js";
|
|
36
|
-
import"./index-
|
|
37
|
-
import"./index-nx64dz92.js";
|
|
37
|
+
import"./index-f9118j70.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-c9rfak6r.js";
|
|
5
|
+
import"./index-hagw9c94.js";
|
|
6
|
+
import"./index-1xqq3va9.js";
|
|
7
|
+
import"./index-f9118j70.js";
|
|
8
|
+
import"./index-p44jnjfr.js";
|
|
9
|
+
import"./index-deckcwbg.js";
|
|
10
|
+
import"./index-ex35dg39.js";
|
|
11
|
+
import"./index-9h0z0tjr.js";
|
|
12
|
+
import"./index-551gh8h2.js";
|
|
13
|
+
import"./index-m9jj544v.js";
|
|
14
|
+
import"./index-g5px5pxd.js";
|
|
15
|
+
import"./index-7md2g9vw.js";
|
|
16
|
+
import"./index-6mprvdt8.js";
|
|
17
|
+
import"./index-5nd1wtkv.js";
|
|
18
|
+
import"./index-6nqnqzv1.js";
|
|
19
|
+
import"./index-gxqvev8w.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-g5px5pxd.js";
|
|
8
8
|
import"./index-52w0fvh8.js";
|
|
9
|
-
import"./index-
|
|
9
|
+
import"./index-gxqvev8w.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-fee0pnwp.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-fee0pnwp.js"),
|
|
38
|
+
import("./CodeTui-xh71b2k8.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-fee0pnwp.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-g5px5pxd.js";
|
|
6
6
|
import"./index-52w0fvh8.js";
|
|
7
|
-
import"./index-
|
|
7
|
+
import"./index-gxqvev8w.js";
|
|
8
8
|
import"./index-hj6w4ka1.js";
|
|
9
|
-
import"./index-
|
|
10
|
-
import"./index-
|
|
11
|
-
import"./index-
|
|
12
|
-
import"./index-
|
|
9
|
+
import"./index-5m0s0gdv.js";
|
|
10
|
+
import"./index-tbmtmkhx.js";
|
|
11
|
+
import"./index-cq5x7a9k.js";
|
|
12
|
+
import"./index-ex35dg39.js";
|
|
13
13
|
import"./index-m9jj544v.js";
|
|
14
|
-
import"./index-
|
|
15
|
-
import"./index-
|
|
14
|
+
import"./index-551gh8h2.js";
|
|
15
|
+
import"./index-6mprvdt8.js";
|
|
16
|
+
import"./index-6nqnqzv1.js";
|
|
16
17
|
import"./index-zzvvc845.js";
|
|
17
|
-
import"./index-
|
|
18
|
-
import"./index-
|
|
19
|
-
import"./index-
|
|
20
|
-
import"./index-
|
|
21
|
-
import"./index-
|
|
22
|
-
import"./index-
|
|
18
|
+
import"./index-t8npm331.js";
|
|
19
|
+
import"./index-3xhak9e0.js";
|
|
20
|
+
import"./index-1bhv9dh4.js";
|
|
21
|
+
import"./index-rp9anyeb.js";
|
|
22
|
+
import"./index-94jq9cbz.js";
|
|
23
|
+
import"./index-85h3dhe0.js";
|
|
23
24
|
import {
|
|
24
25
|
ContextScript
|
|
25
|
-
} from "./index-
|
|
26
|
-
import"./index-nx64dz92.js";
|
|
26
|
+
} from "./index-7xy30jev.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-cq5x7a9k.js";
|
|
5
|
+
import"./index-85h3dhe0.js";
|
|
6
|
+
import"./index-94jq9cbz.js";
|
|
7
|
+
import"./index-rp9anyeb.js";
|
|
8
|
+
import"./index-t8npm331.js";
|
|
9
|
+
import"./index-1bhv9dh4.js";
|
|
10
|
+
import"./index-3xhak9e0.js";
|
|
11
|
+
import"./index-ex35dg39.js";
|
|
12
|
+
import"./index-551gh8h2.js";
|
|
13
|
+
import"./index-m9jj544v.js";
|
|
14
|
+
import"./index-tbmtmkhx.js";
|
|
15
|
+
import"./index-5m0s0gdv.js";
|
|
16
|
+
import"./index-zzvvc845.js";
|
|
17
|
+
import"./index-g5px5pxd.js";
|
|
18
|
+
import"./index-6mprvdt8.js";
|
|
19
|
+
import"./index-6nqnqzv1.js";
|
|
20
|
+
import"./index-gxqvev8w.js";
|
|
21
|
+
import"./index-hj6w4ka1.js";
|
|
22
|
+
import"./index-52w0fvh8.js";
|
|
23
|
+
export {
|
|
24
|
+
ContextRunner2 as ContextRunner
|
|
25
|
+
};
|
|
@@ -90,6 +90,10 @@ 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 an `st` hook conditionally** — `st.use.*`, `st.sel`, `st.ref` and the last step of `st.tool` /
|
|
94
|
+
`st.useState` / `st.expose` are hooks Biome's `useHookAtTopLevel` cannot see. Behind `||` / `&&` / `??`, a ternary,
|
|
95
|
+
an `if`, a loop or a callback, a skipped call shifts every later hook, and production React crashes elsewhere. Read
|
|
96
|
+
each into its own `const` at the top of the component, then combine.
|
|
93
97
|
- **No deep imports past a barrel**, except cross-module constants (`../map/map.constant`).
|
|
94
98
|
- **Never import across the client/server boundary** (`apps/**`, `libs/**`). Client files (`ui/`, `webkit/`,
|
|
95
99
|
`page/`, `*.store.ts`, every `.tsx`) never import a `*.document|dictionary|service|signal.ts`, `srvkit/`, a
|
|
@@ -224,8 +228,8 @@ Playbook (warning table, code, checklist: `ssrRule`): ① wrap the interaction a
|
|
|
224
228
|
`useEffect(…, [])` load; ④ a store-reading `Zone` holds no markup and delegates to a server `View`; ⑤ hand each
|
|
225
229
|
promise across — `const { xInitInY, xListInY } = fetch.initXInY(id)`, `xInitInY` to a `Zone`, `xListInY` to
|
|
226
230
|
`<Load.Stream>` (model instances, server-only) — and `await` only what the shell must contain; ⑥ named `ReactNode`
|
|
227
|
-
slots (`Layout.Navbar`); ⑦ derived display logic on `Light<Model>`; ⑧
|
|
228
|
-
`_layout.tsx` (
|
|
231
|
+
slots (`Layout.Navbar`); ⑦ derived display logic on `Light<Model>`; ⑧ `.guard(() => signedIn())` on
|
|
232
|
+
`_layout.tsx` (a real 3xx before anything renders; `getSelf({ unauthorize })` in a body redirects in-page after I/O); ⑨ CSS (`data-*` +
|
|
229
233
|
`group-data-[…]`, `<details>`) over client state for visibility; ⑩ heavy islands behind `index_.tsx` + `lazy()`.
|
|
230
234
|
|
|
231
235
|
## Runtime & Build Configuration
|
|
@@ -402,8 +406,9 @@ orchestration in `service`, client state in `store`; `Template` is forms, `Unit`
|
|
|
402
406
|
- **MCP (`mcpRule`)**: `/mcp` publishes every guarded endpoint by default; `mcp: false` (or a `slice()` `mcp` map
|
|
403
407
|
mirroring `guards`) is curation, not authorization. `guards: [Every, Person]` reserves an act for a person;
|
|
404
408
|
`.with(AgentCall)` narrows an agent's call. Settings are `option.setMcp` in `lib/option.ts`; `JWT_SECRET` is
|
|
405
|
-
required outside `local`. Never make a refusal message more helpful. Every entry needs a `.desc()`;
|
|
406
|
-
screen with `page().prompt(name, description)
|
|
409
|
+
required outside `local`. Never make a refusal message more helpful. Every entry needs a `.desc()`; brief a
|
|
410
|
+
screen with `page().prompt(name, description)`, and publish one component a host draws with
|
|
411
|
+
`page().app(name, description, load)` — a read-only tool whose `load` may only query.
|
|
407
412
|
- **In-page agent (`agentRule`)**: mount `<Agent.Chat />` once in a layout; it never executes tools and refuses
|
|
408
413
|
every call until `option.setAgentAccess(<guard>)`; the LLM is `option.setLlm({ apiKey, model, host })`, never env.
|
|
409
414
|
The surface is what components declare — `st.tool(…).exec(fn)` beside its control, `st.use` / `st.sel` /
|
|
@@ -461,15 +466,15 @@ orchestration in `service`, client state in `store`; `Template` is forms, `Unit`
|
|
|
461
466
|
|
|
462
467
|
## Akan Page Routing (`apps/**/page/**`)
|
|
463
468
|
|
|
464
|
-
Full contract — heads, CSR root layouts, typed params, lib pages, `devOnly`: `pageRule`.
|
|
469
|
+
Full contract — guards, apps, heads, CSR root layouts, typed params, lib pages, `devOnly`: `pageRule`.
|
|
465
470
|
|
|
466
471
|
- `page/` holds `.tsx` route modules only: `<routeName>.tsx` or `_index.tsx`, `_layout.tsx`, `_overrides.tsx` — no
|
|
467
472
|
other `_*.tsx`, helpers, `.ts` / `.js` files, or uppercase filenames. `[id]` is a dynamic segment, `(group)` a
|
|
468
473
|
route group.
|
|
469
474
|
- **A route file exports one chain** — `page()`, `layout()` in a `_layout.tsx`, `rootLayout()` in a root
|
|
470
|
-
`_layout.tsx` — and every setting is a stage (`.param`, `.search`, `.config`, `.head`, `.loading`;
|
|
471
|
-
`.error` on layouts; `.fonts` / `.theme` / `.manifest` / … on the root; `.prompt` on a page).
|
|
472
|
-
beside it fails the build.
|
|
475
|
+
`_layout.tsx` — and every setting is a stage (`.param`, `.search`, `.config`, `.guard`, `.head`, `.loading`;
|
|
476
|
+
`.notFound` / `.error` on layouts; `.fonts` / `.theme` / `.manifest` / … on the root; `.prompt` / `.app` on a page).
|
|
477
|
+
A named export beside it fails the build.
|
|
473
478
|
- **Name every `[x]` segment with `.param("x", Type)`** and read query keys only via `.search("k", Type)`; values
|
|
474
479
|
arrive typed. `lang` is never declared — every stage receives it.
|
|
475
480
|
- `.head()` takes JSX or a function returning it — never a metadata object; deeper heads replace by tag identity,
|
|
@@ -485,18 +490,19 @@ Full contract — heads, CSR root layouts, typed params, lib pages, `devOnly`: `
|
|
|
485
490
|
export default page()
|
|
486
491
|
.param("orgId", ID)
|
|
487
492
|
.config({ transition: "stack" })
|
|
493
|
+
.guard(() => signedIn())
|
|
488
494
|
.render(({ orgId }) => {
|
|
489
495
|
const { l } = usePage();
|
|
490
|
-
getSelf({ unauthorize: "/signin" });
|
|
491
496
|
const { taskInitInOrg } = fetch.initTaskInOrg(orgId);
|
|
492
497
|
return <Task.Zone.Card init={taskInitInOrg} prefix={`/org/${orgId}`} />;
|
|
493
498
|
});
|
|
494
499
|
```
|
|
495
500
|
|
|
496
|
-
- `.render()` gets the declared args flat and typed (no `PageProps`, no `loader=` prop). Order: `usePage()`,
|
|
497
|
-
|
|
501
|
+
- `.render()` gets the declared args flat and typed (no `PageProps`, no `loader=` prop). Order: `usePage()`, fetch,
|
|
502
|
+
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
|
|
498
503
|
(title, redirect, link id) in one `Promise.all`.
|
|
499
|
-
- Gate auth
|
|
504
|
+
- Gate auth with `.guard(() => signedIn())` (`@libs/shared/webkit`) at `_layout.tsx`, and repeat it on a page that
|
|
505
|
+
needs more; it is a courtesy, the endpoint guards are the gate. `getSelf({ unauthorize })` in a body still works. `async` only when the body awaits; the
|
|
500
506
|
callback is not a React component, so it takes no name and no return type. No `useState`, `useEffect`, or
|
|
501
507
|
comments in page files.
|
|
502
508
|
|