@akanjs/cli 3.0.0-beta.16 → 3.0.0-beta.18
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-zgccwajm.js → CodeAgent-0035exh3.js} +2 -2
- package/{CodeTui-993tx7gf.js → CodeTui-eweg1hep.js} +384 -28
- package/{agent.command-n664dtcv.js → agent.command-65zqfkg0.js} +6 -6
- package/akanCode.js +11 -9
- package/{application.command-t5542jte.js → application.command-2wcj5da3.js} +18 -11
- package/{applicationBuildRunner-x4gbfn7y.js → applicationBuildRunner-m0hhgwsx.js} +6 -5
- package/{applicationReleasePackager-z61ep017.js → applicationReleasePackager-vykfzgx3.js} +1 -1
- package/buildBatch.proc.js +2 -2
- package/{capacitorApp-shv3ajh5.js → capacitorApp-2daqhb5h.js} +2 -2
- package/{cloud.command-4x35k1z6.js → cloud.command-960bgbf4.js} +8 -8
- package/{cloud.script-3k8nbbpn.js → cloud.script-qhcnqt1n.js} +8 -8
- package/{code.command-mrfb7a1g.js → code.command-4feh3ef7.js} +7 -7
- package/{context.command-pqsm5jrk.js → context.command-kzehkx48.js} +14 -14
- package/context.runner-z0rrcz7b.js +22 -0
- package/{devTui-gy6mendg.js → devTui-ffjsarqa.js} +3 -3
- package/{devTuiView-y1548wy6.js → devTuiView-1q1mdgrv.js} +1 -1
- package/{guideline.command-rpc2emw8.js → guideline.command-3w2g20x4.js} +8 -13
- package/guidelines/conventions/conventions.instruction.md +37 -22
- package/guidelines/queryRule/queryRule.instruction.md +1 -1
- package/guidelines/ssrRule/ssrRule.instruction.md +4 -2
- package/guidelines/transportRule/transportRule.instruction.md +10 -8
- package/guidelines/workspaceRecipes/workspaceRecipes.instruction.md +4 -3
- package/incrementalBuilder.proc.js +1 -1
- package/{index-sxg87a8f.js → index-14zrtgfa.js} +164 -98
- package/{index-57p9p179.js → index-3hpxeys1.js} +6 -5
- package/{index-sn7dnzq4.js → index-4r42ext5.js} +1 -1
- package/{index-3mg4h788.js → index-6q589y9t.js} +2 -2
- package/index-9dp031by.js +12 -0
- package/{index-p4p9t45x.js → index-bwxpk2cj.js} +4 -18
- package/{index-g9zghs4h.js → index-cjw1sj1x.js} +12 -12
- package/{index-te0y1c0m.js → index-d9fjz06h.js} +12 -7
- package/{index-4n4821gp.js → index-dw943k93.js} +4 -4
- package/{index-4cvpzkq6.js → index-ef228gzf.js} +3 -3
- package/{index-3cymrzsb.js → index-erfc1x40.js} +17 -3
- package/{index-ns128c4q.js → index-h94faz96.js} +13 -20
- package/index-jd01kj5r.js +656 -0
- package/{index-5405kc0x.js → index-jwexzh42.js} +363 -247
- package/{index-wfwknnje.js → index-jwrpsrg3.js} +8 -6
- package/{index-kvzjda3v.js → index-m41ptvat.js} +5 -5
- package/{index-qh7brn20.js → index-mt2154s2.js} +6 -2
- package/{index-xjc7gg65.js → index-pn8mhpps.js} +23 -33
- package/{index-vpx68e4x.js → index-q9c3c0hy.js} +2 -2
- package/{index-v17gj504.js → index-rpgxs245.js} +2 -2
- package/{index-twq9p2sp.js → index-s5rhm04y.js} +0 -6
- package/{index-018dszb3.js → index-sbfk9daf.js} +10 -3
- package/{index-zg0v1zte.js → index-wcg582a8.js} +5 -5
- package/{index-6na0sd2b.js → index-ycy302an.js} +5 -2
- package/{index-qhtj9y6j.js → index-yw6g3bbv.js} +74 -21
- package/{index-2pm1j01n.js → index-zmj143x7.js} +4 -4
- package/{index-zn8qgeqx.js → index-zq0mr3hh.js} +1 -1
- package/index.js +21 -21
- package/{library.command-m8p2r1dh.js → library.command-fp0nhr62.js} +3 -3
- package/{localRegistry.command-tt00nwwg.js → localRegistry.command-8y0ecxb9.js} +7 -7
- package/{module.command-mfzvqt0n.js → module.command-kqkn48t2.js} +5 -5
- package/{package.command-8sy6jjwy.js → package.command-qverjh22.js} +4 -4
- package/package.json +8 -6
- package/{page.command-taenb02b.js → page.command-94bwhd0g.js} +3 -3
- package/{primitive.command-7kpncmkk.js → primitive.command-2ydvtah2.js} +6 -6
- package/{prompter-9mn3kp36.js → prompter-1f8d9pcc.js} +1 -1
- package/{quality.command-1ar94hrw.js → quality.command-fa0gth4p.js} +3 -4
- package/{repair.command-n08t6j8p.js → repair.command-4qng2hpm.js} +5 -5
- package/{routeSourceValidator-apyqw7wk.js → routeSourceValidator-7ycnfz0e.js} +0 -6
- package/{scalar.command-mq8qfp4t.js → scalar.command-pb2y95sh.js} +4 -4
- package/skills/akan-code/SKILL.md +122 -0
- package/skills/akan-module/SKILL.md +2 -2
- package/skills/akan-store/SKILL.md +6 -2
- package/{subspace.command-x9897gj4.js → subspace.command-vkxmwp74.js} +4 -4
- package/templates/__scalar/__model__/__model__.abstract.md.template +8 -0
- package/templates/appSample/lib/__scalar/workHistory/workHistory.abstract.ts +8 -39
- package/templates/appSample/lib/_noti/noti.abstract.ts +6 -29
- package/templates/appSample/lib/task/task.abstract.ts +12 -32
- package/templates/appSample/lib/task/task.signal.spec.ts +15 -18
- package/templates/appSample/lib/task/task.signal.test.ts +14 -0
- package/templates/appSample/lib/task/task.signal.ts +1 -1
- package/templates/appSample/srvkit/AuthGuard.ts +4 -1
- package/templates/appSample/srvkit/SessionInternalArg.ts +3 -1
- package/templates/crudPages/[__model__Id]/edit/page.tsx +2 -1
- package/templates/crudPages/[__model__Id]/page.tsx +2 -1
- package/templates/crudPages/new/page.tsx +2 -1
- package/templates/crudPages/page.tsx +2 -1
- package/templates/crudSinglePage/page.tsx +2 -1
- package/templates/module/__model__.signal.ts +12 -4
- package/templates/pkgRoot/tsconfig.json.template +2 -7
- package/templates/service/__model__.abstract.md.template +8 -0
- package/{tunnel.command-ht2es78c.js → tunnel.command-02cvp9nf.js} +2 -2
- package/{workflow.command-tvz4nm9n.js → workflow.command-132txnrh.js} +9 -9
- package/{workspace.command-ayqa1rgt.js → workspace.command-d5wkswek.js} +21 -21
- package/context.runner-bys6ykcp.js +0 -22
- package/guidelines/agentRule/agentRule.generate.json +0 -31
- package/guidelines/componentRule/componentRule.generate.json +0 -31
- package/guidelines/conventions/conventions.generate.json +0 -25
- package/guidelines/cssRule/cssRule.generate.json +0 -31
- package/guidelines/docPageRule/docPageRule.generate.json +0 -31
- package/guidelines/docPageRule/docPageRule.instruction.md +0 -25
- package/guidelines/docSyncRule/docSyncRule.generate.json +0 -31
- package/guidelines/docSyncRule/docSyncRule.instruction.md +0 -25
- package/guidelines/enumConstant/enumConstant.generate.json +0 -31
- package/guidelines/enumConstant/enumConstant.instruction.md +0 -28
- package/guidelines/fieldRule/fieldRule.generate.json +0 -31
- package/guidelines/framework/framework.generate.json +0 -32
- package/guidelines/mcpRule/mcpRule.generate.json +0 -35
- package/guidelines/modelConstant/modelConstant.generate.json +0 -32
- package/guidelines/modelDictionary/modelDictionary.generate.json +0 -32
- package/guidelines/modelDocument/modelDocument.generate.json +0 -31
- package/guidelines/modelService/modelService.generate.json +0 -31
- package/guidelines/modelSignal/modelSignal.generate.json +0 -31
- package/guidelines/modelStore/modelStore.generate.json +0 -31
- package/guidelines/modelTemplate/modelTemplate.generate.json +0 -31
- package/guidelines/modelUnit/modelUnit.generate.json +0 -31
- package/guidelines/modelUtil/modelUtil.generate.json +0 -31
- package/guidelines/modelView/modelView.generate.json +0 -31
- package/guidelines/modelZone/modelZone.generate.json +0 -31
- package/guidelines/moduleCodegen/moduleCodegen.generate.json +0 -31
- package/guidelines/moduleCodegen/moduleCodegen.instruction.md +0 -28
- package/guidelines/moduleOverview/moduleOverview.generate.json +0 -31
- package/guidelines/queryRule/queryRule.generate.json +0 -31
- package/guidelines/recipeRule/recipeRule.generate.json +0 -31
- package/guidelines/runtimeRule/runtimeRule.generate.json +0 -25
- package/guidelines/scalarConstant/scalarConstant.generate.json +0 -32
- package/guidelines/scalarDictionary/scalarDictionary.generate.json +0 -32
- package/guidelines/scalarModule/scalarModule.generate.json +0 -31
- package/guidelines/sharedUiUsage/sharedUiUsage.generate.json +0 -31
- package/guidelines/sharedUiUsage/sharedUiUsage.instruction.md +0 -25
- package/guidelines/ssrRule/ssrRule.generate.json +0 -31
- package/guidelines/transportRule/transportRule.generate.json +0 -31
- package/guidelines/utilUiUsage/utilUiUsage.generate.json +0 -31
- package/guidelines/utilUiUsage/utilUiUsage.instruction.md +0 -25
- package/guidelines/workspaceOnboarding/workspaceOnboarding.generate.json +0 -24
- package/guidelines/workspaceRecipes/workspaceRecipes.generate.json +0 -34
- package/index-jgrnpt6y.js +0 -121
- package/templates/__scalar/__model__/__model__.abstract.md +0 -28
- package/templates/module/__model__.abstract.md +0 -28
- package/templates/service/__model__.abstract.md +0 -28
package/akanCode.js
CHANGED
|
@@ -11,14 +11,13 @@ import {
|
|
|
11
11
|
VerifyFeedback2,
|
|
12
12
|
AkanToolPack2,
|
|
13
13
|
MailToolPack2,
|
|
14
|
-
|
|
14
|
+
McpUnauthorized2,
|
|
15
15
|
McpClient2,
|
|
16
16
|
McpToolPack2,
|
|
17
17
|
SessionToolPack2,
|
|
18
18
|
WebToolPack2,
|
|
19
19
|
AkanCodePlugins2,
|
|
20
20
|
AkanEnvKeys2,
|
|
21
|
-
AkanAuthStorageBackend2,
|
|
22
21
|
akanSystemPrompt2,
|
|
23
22
|
CodeSessionIndex2,
|
|
24
23
|
AkanCodeServices2,
|
|
@@ -29,32 +28,33 @@ import {
|
|
|
29
28
|
CodeMailbox2,
|
|
30
29
|
CodeSessionFork2,
|
|
31
30
|
CodeAgent2
|
|
32
|
-
} from "./index-
|
|
31
|
+
} from "./index-jwexzh42.js";
|
|
33
32
|
import {
|
|
34
33
|
akanCodeDefaultModel2,
|
|
35
34
|
akanCodeModel2,
|
|
36
35
|
akanCodeModelSupportsImages2,
|
|
37
36
|
akanCodeModelWarnings2,
|
|
38
37
|
CodeAgentStreamPrinter2
|
|
39
|
-
} from "./index-
|
|
38
|
+
} from "./index-jwrpsrg3.js";
|
|
40
39
|
import {
|
|
41
|
-
SubagentPool2
|
|
42
|
-
|
|
40
|
+
SubagentPool2,
|
|
41
|
+
akanCodePaths2
|
|
42
|
+
} from "./index-jd01kj5r.js";
|
|
43
43
|
import"./index-7md2g9vw.js";
|
|
44
44
|
import {
|
|
45
45
|
CodeAgentRpcHost2
|
|
46
46
|
} from "./index-8k16atqy.js";
|
|
47
47
|
import {
|
|
48
|
+
CodeTuiLines2,
|
|
49
|
+
CodeTuiAgents2,
|
|
48
50
|
CodeTuiClipboard2,
|
|
49
51
|
CodeTuiCommands2,
|
|
50
|
-
CodeTuiLines2,
|
|
51
52
|
CodeTuiEditor2,
|
|
52
53
|
CodeTuiFiles2,
|
|
53
54
|
CodeTuiMarkdown2,
|
|
54
55
|
CodeTuiParts2
|
|
55
|
-
} from "./index-
|
|
56
|
+
} from "./index-14zrtgfa.js";
|
|
56
57
|
export {
|
|
57
|
-
AkanAuthStorageBackend2 as AkanAuthStorageBackend,
|
|
58
58
|
AkanCli2 as AkanCli,
|
|
59
59
|
AkanCodePlugins2 as AkanCodePlugins,
|
|
60
60
|
AkanCodeServices2 as AkanCodeServices,
|
|
@@ -72,6 +72,7 @@ export {
|
|
|
72
72
|
CodeMailbox2 as CodeMailbox,
|
|
73
73
|
CodeSessionFork2 as CodeSessionFork,
|
|
74
74
|
CodeSessionIndex2 as CodeSessionIndex,
|
|
75
|
+
CodeTuiAgents2 as CodeTuiAgents,
|
|
75
76
|
CodeTuiClipboard2 as CodeTuiClipboard,
|
|
76
77
|
CodeTuiCommands2 as CodeTuiCommands,
|
|
77
78
|
CodeTuiEditor2 as CodeTuiEditor,
|
|
@@ -83,6 +84,7 @@ export {
|
|
|
83
84
|
MailToolPack2 as MailToolPack,
|
|
84
85
|
McpClient2 as McpClient,
|
|
85
86
|
McpToolPack2 as McpToolPack,
|
|
87
|
+
McpUnauthorized2 as McpUnauthorized,
|
|
86
88
|
PreviewChrome2 as PreviewChrome,
|
|
87
89
|
PreviewFeedback2 as PreviewFeedback,
|
|
88
90
|
PreviewView2 as PreviewView,
|
|
@@ -6,17 +6,17 @@ import {
|
|
|
6
6
|
Exec,
|
|
7
7
|
Workspace,
|
|
8
8
|
command
|
|
9
|
-
} from "./index-
|
|
9
|
+
} from "./index-ycy302an.js";
|
|
10
10
|
import"./index-q0y2jq9j.js";
|
|
11
|
-
import"./index-
|
|
11
|
+
import"./index-bwxpk2cj.js";
|
|
12
12
|
import"./index-6wwzs1bc.js";
|
|
13
13
|
import {
|
|
14
14
|
ApplicationScript
|
|
15
|
-
} from "./index-
|
|
16
|
-
import"./index-
|
|
15
|
+
} from "./index-h94faz96.js";
|
|
16
|
+
import"./index-6q589y9t.js";
|
|
17
17
|
import"./index-hwkygn9s.js";
|
|
18
18
|
import"./index-7md2g9vw.js";
|
|
19
|
-
import"./index-
|
|
19
|
+
import"./index-4r42ext5.js";
|
|
20
20
|
import {
|
|
21
21
|
getMobileTargetChoices
|
|
22
22
|
} from "./index-47pj3aee.js";
|
|
@@ -51,7 +51,14 @@ class ApplicationCommand extends command("application", [ApplicationScript], ({
|
|
|
51
51
|
logs: target({ desc: "Tail the running application's logs, filtered (attaches to akan-control.sock)" }).with(App).option("level", String, { desc: "minimum level: trace, verbose, debug, info, warn, error", nullable: true }).option("grep", String, { desc: "substring the message must contain", nullable: true }).option("endpoint", String, {
|
|
52
52
|
desc: "endpoint glob(s), comma-separated: mutation:*, query:userList",
|
|
53
53
|
nullable: true
|
|
54
|
-
}).option("trace", String, { desc: "one request's traceId", nullable: true }).option("child", String, { desc: "replica index(es), comma-separated", nullable: true }).option("role", String, {
|
|
54
|
+
}).option("trace", String, { desc: "one request's traceId", nullable: true }).option("child", String, { desc: "replica index(es), comma-separated", nullable: true }).option("role", String, {
|
|
55
|
+
flag: "R",
|
|
56
|
+
desc: "process role(s): gateway, federation, batch, all, rsc-worker",
|
|
57
|
+
nullable: true
|
|
58
|
+
}).option("origin", String, { desc: "call origin(s): http, websocket, mcp, internal, page", nullable: true }).option("since", String, {
|
|
59
|
+
desc: "only records newer than this: a duration ago in ms, s, m, h or d (30s, 5m, 2h), or an epoch-ms timestamp",
|
|
60
|
+
nullable: true
|
|
61
|
+
}).option("replay", Number, { flag: "n", desc: "records to replay from the buffer before following", default: 0 }).option("json", Boolean, { desc: "print NDJSON records instead of rendered lines", default: false }).option("follow", Boolean, { desc: "keep streaming; pass --follow false for history only", default: true }).option("runtimeDir", String, {
|
|
55
62
|
flag: "d",
|
|
56
63
|
desc: "runtime dir holding akan-control.sock (default: local/apps/<app>/runtime)",
|
|
57
64
|
nullable: true
|
|
@@ -104,13 +111,13 @@ class ApplicationCommand extends command("application", [ApplicationScript], ({
|
|
|
104
111
|
enum: ["local", "debug", "develop", "main"],
|
|
105
112
|
desc: "backend environment",
|
|
106
113
|
default: "local"
|
|
107
|
-
}).option("open", Boolean, { desc: "open ios simulator", default: false }).option("release", Boolean, { desc: "release mode", default: false }).option("write", Boolean, { desc: "write code generation", default: true }).option("regenerate", Boolean, { flag: "g", desc: "delete and regenerate native project", default: false }).option("
|
|
108
|
-
desc: "
|
|
109
|
-
default:
|
|
114
|
+
}).option("open", Boolean, { desc: "open ios simulator", default: false }).option("release", Boolean, { desc: "release mode", default: false }).option("write", Boolean, { desc: "write code generation", default: true }).option("regenerate", Boolean, { flag: "g", desc: "delete and regenerate native project", default: false }).option("allowProvisioningUpdates", Boolean, {
|
|
115
|
+
desc: "let Xcode create or update provisioning profiles for a physical device",
|
|
116
|
+
default: true
|
|
110
117
|
}).option("device", String, {
|
|
111
118
|
desc: "run target to select non-interactively: udid, device name, or runtime (e.g. 'iPhone 16' or 'iOS 18')",
|
|
112
119
|
default: ""
|
|
113
|
-
}).exec(async function(app, target, env, open, release, write, regenerate,
|
|
120
|
+
}).exec(async function(app, target, env, open, release, write, regenerate, allowProvisioningUpdates, device) {
|
|
114
121
|
await this.applicationScript.startIos(app, {
|
|
115
122
|
target,
|
|
116
123
|
env,
|
|
@@ -118,7 +125,7 @@ class ApplicationCommand extends command("application", [ApplicationScript], ({
|
|
|
118
125
|
operation: release ? "release" : "local",
|
|
119
126
|
write,
|
|
120
127
|
regenerate,
|
|
121
|
-
noAllowProvisioningUpdates,
|
|
128
|
+
noAllowProvisioningUpdates: !allowProvisioningUpdates,
|
|
122
129
|
device: device || undefined
|
|
123
130
|
});
|
|
124
131
|
}),
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
Spinner
|
|
4
|
-
} from "./index-
|
|
4
|
+
} from "./index-bwxpk2cj.js";
|
|
5
5
|
import {
|
|
6
6
|
AllRoutesBuilder,
|
|
7
7
|
CsrArtifactBuilder,
|
|
8
8
|
FontPruner,
|
|
9
9
|
precompressArtifacts,
|
|
10
10
|
SsrBaseArtifactBuilder
|
|
11
|
-
} from "./index-
|
|
11
|
+
} from "./index-zq0mr3hh.js";
|
|
12
12
|
import"./index-w8kmx1b6.js";
|
|
13
13
|
import"./index-q0y2jq9j.js";
|
|
14
14
|
import"./index-hwkygn9s.js";
|
|
@@ -159,11 +159,12 @@ class ApplicationBuildRunner {
|
|
|
159
159
|
};
|
|
160
160
|
}
|
|
161
161
|
async#writeConsoleShim() {
|
|
162
|
-
await Bun.write(path.join(this.#app.dist.cwdPath, "console.js"), `
|
|
163
|
-
|
|
162
|
+
await Bun.write(path.join(this.#app.dist.cwdPath, "console.js"), `process.env.AKAN_COMMAND_TYPE = "console";
|
|
163
|
+
const { cnst, db, dict, option, server, sig, srv } = await import("./server.js");
|
|
164
|
+
const { assertAkanConsoleAllowed, startAkanConsole } = await import("./console-runtime.js");
|
|
164
165
|
|
|
165
166
|
const run = async () => {
|
|
166
|
-
assertAkanConsoleAllowed(
|
|
167
|
+
assertAkanConsoleAllowed();
|
|
167
168
|
await server.start({ listen: false, web: false });
|
|
168
169
|
try {
|
|
169
170
|
await startAkanConsole(server, { globals: { cnst, db, dict, option, sig, srv } });
|
package/buildBatch.proc.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import {
|
|
3
3
|
WorkspaceExecutor,
|
|
4
4
|
AppExecutor
|
|
5
|
-
} from "./index-
|
|
5
|
+
} from "./index-bwxpk2cj.js";
|
|
6
6
|
import"./index-q0y2jq9j.js";
|
|
7
7
|
import"./index-6wwzs1bc.js";
|
|
8
8
|
import {
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
CsrArtifactBuilder,
|
|
12
12
|
FontOptimizer,
|
|
13
13
|
SsrBaseArtifactBuilder
|
|
14
|
-
} from "./index-
|
|
14
|
+
} from "./index-zq0mr3hh.js";
|
|
15
15
|
import"./index-w8kmx1b6.js";
|
|
16
16
|
import"./index-hwkygn9s.js";
|
|
17
17
|
import"./index-n68jx79w.js";
|
|
@@ -6,20 +6,20 @@ import {
|
|
|
6
6
|
import {
|
|
7
7
|
Workspace,
|
|
8
8
|
command
|
|
9
|
-
} from "./index-
|
|
10
|
-
import"./index-
|
|
9
|
+
} from "./index-ycy302an.js";
|
|
10
|
+
import"./index-bwxpk2cj.js";
|
|
11
11
|
import"./index-6wwzs1bc.js";
|
|
12
|
-
import"./index-
|
|
13
|
-
import"./index-
|
|
12
|
+
import"./index-h94faz96.js";
|
|
13
|
+
import"./index-6q589y9t.js";
|
|
14
14
|
import"./index-hwkygn9s.js";
|
|
15
15
|
import"./index-7md2g9vw.js";
|
|
16
16
|
import"./index-kcxmv48c.js";
|
|
17
|
-
import"./index-
|
|
18
|
-
import"./index-
|
|
17
|
+
import"./index-sbfk9daf.js";
|
|
18
|
+
import"./index-3hpxeys1.js";
|
|
19
19
|
import {
|
|
20
20
|
CloudScript2
|
|
21
|
-
} from "./index-
|
|
22
|
-
import"./index-
|
|
21
|
+
} from "./index-wcg582a8.js";
|
|
22
|
+
import"./index-4r42ext5.js";
|
|
23
23
|
|
|
24
24
|
// pkgs/@akanjs/cli/cloud/cloud.command.ts
|
|
25
25
|
var localRegistryUrl = () => process.env.AKAN_NPM_REGISTRY ?? "http://127.0.0.1:4873";
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
CloudScript2
|
|
4
|
-
} from "./index-
|
|
5
|
-
import"./index-
|
|
6
|
-
import"./index-
|
|
7
|
-
import"./index-
|
|
8
|
-
import"./index-
|
|
9
|
-
import"./index-
|
|
4
|
+
} from "./index-wcg582a8.js";
|
|
5
|
+
import"./index-3hpxeys1.js";
|
|
6
|
+
import"./index-h94faz96.js";
|
|
7
|
+
import"./index-4r42ext5.js";
|
|
8
|
+
import"./index-6q589y9t.js";
|
|
9
|
+
import"./index-sbfk9daf.js";
|
|
10
10
|
import"./index-myj01w9r.js";
|
|
11
|
-
import"./index-
|
|
11
|
+
import"./index-ycy302an.js";
|
|
12
12
|
import"./index-7md2g9vw.js";
|
|
13
13
|
import"./index-hwkygn9s.js";
|
|
14
|
-
import"./index-
|
|
14
|
+
import"./index-bwxpk2cj.js";
|
|
15
15
|
import"./index-6wwzs1bc.js";
|
|
16
16
|
import"./index-kcxmv48c.js";
|
|
17
17
|
import"./index-q0y2jq9j.js";
|
|
@@ -4,14 +4,14 @@ import {
|
|
|
4
4
|
runner,
|
|
5
5
|
script,
|
|
6
6
|
command
|
|
7
|
-
} from "./index-
|
|
7
|
+
} from "./index-ycy302an.js";
|
|
8
8
|
import"./index-q0y2jq9j.js";
|
|
9
|
-
import"./index-
|
|
9
|
+
import"./index-bwxpk2cj.js";
|
|
10
10
|
import"./index-6wwzs1bc.js";
|
|
11
11
|
import {
|
|
12
12
|
akanCodeDefaultModel2,
|
|
13
13
|
CodeAgentStreamPrinter2
|
|
14
|
-
} from "./index-
|
|
14
|
+
} from "./index-jwrpsrg3.js";
|
|
15
15
|
|
|
16
16
|
// pkgs/@akanjs/cli/code/code.runner.ts
|
|
17
17
|
import { codeAgentPresets, isCodeAgentPresetName } from "akanjs/common";
|
|
@@ -20,7 +20,7 @@ class CodeRunner extends runner("code") {
|
|
|
20
20
|
async serve(options) {
|
|
21
21
|
await import("./consoleToStderr-h5bryj94.js");
|
|
22
22
|
const [{ CodeAgent }, { CodeAgentRpcHost }] = await Promise.all([
|
|
23
|
-
import("./CodeAgent-
|
|
23
|
+
import("./CodeAgent-0035exh3.js"),
|
|
24
24
|
import("./CodeAgentRpcHost-qvwfv0n9.js")
|
|
25
25
|
]);
|
|
26
26
|
const profile = CodeRunner.profileOf(options);
|
|
@@ -36,8 +36,8 @@ class CodeRunner extends runner("code") {
|
|
|
36
36
|
}
|
|
37
37
|
async tui(options, seed) {
|
|
38
38
|
const [{ CodeAgent }, { CodeTui }] = await Promise.all([
|
|
39
|
-
import("./CodeAgent-
|
|
40
|
-
import("./CodeTui-
|
|
39
|
+
import("./CodeAgent-0035exh3.js"),
|
|
40
|
+
import("./CodeTui-eweg1hep.js")
|
|
41
41
|
]);
|
|
42
42
|
const profile = CodeRunner.profileOf(options);
|
|
43
43
|
const apps = options.app ? [options.app] : await options.workspace.getApps();
|
|
@@ -71,7 +71,7 @@ class CodeRunner extends runner("code") {
|
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
73
|
async run(prompt, options) {
|
|
74
|
-
const { CodeAgent } = await import("./CodeAgent-
|
|
74
|
+
const { CodeAgent } = await import("./CodeAgent-0035exh3.js");
|
|
75
75
|
const profile = CodeRunner.profileOf(options);
|
|
76
76
|
const agent = await CodeAgent.create({
|
|
77
77
|
workspace: options.workspace,
|
|
@@ -2,25 +2,25 @@
|
|
|
2
2
|
import {
|
|
3
3
|
Workspace,
|
|
4
4
|
command
|
|
5
|
-
} from "./index-
|
|
5
|
+
} from "./index-ycy302an.js";
|
|
6
6
|
import"./index-q0y2jq9j.js";
|
|
7
|
-
import"./index-
|
|
7
|
+
import"./index-bwxpk2cj.js";
|
|
8
8
|
import"./index-6wwzs1bc.js";
|
|
9
9
|
import"./index-by5gpp8x.js";
|
|
10
|
-
import"./index-
|
|
11
|
-
import"./index-
|
|
12
|
-
import"./index-
|
|
13
|
-
import"./index-
|
|
14
|
-
import"./index-
|
|
15
|
-
import"./index-
|
|
16
|
-
import"./index-
|
|
17
|
-
import"./index-
|
|
18
|
-
import"./index-
|
|
19
|
-
import"./index-
|
|
20
|
-
import"./index-
|
|
10
|
+
import"./index-yw6g3bbv.js";
|
|
11
|
+
import"./index-rpgxs245.js";
|
|
12
|
+
import"./index-cjw1sj1x.js";
|
|
13
|
+
import"./index-erfc1x40.js";
|
|
14
|
+
import"./index-s5rhm04y.js";
|
|
15
|
+
import"./index-ef228gzf.js";
|
|
16
|
+
import"./index-zmj143x7.js";
|
|
17
|
+
import"./index-mt2154s2.js";
|
|
18
|
+
import"./index-pn8mhpps.js";
|
|
19
|
+
import"./index-d9fjz06h.js";
|
|
20
|
+
import"./index-q9c3c0hy.js";
|
|
21
21
|
import {
|
|
22
22
|
ContextScript
|
|
23
|
-
} from "./index-
|
|
23
|
+
} from "./index-dw943k93.js";
|
|
24
24
|
|
|
25
25
|
// pkgs/@akanjs/cli/context/context.command.ts
|
|
26
26
|
class ContextCommand extends command("context", [ContextScript], ({ public: target }) => ({
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import {
|
|
3
|
+
ContextRunner2
|
|
4
|
+
} from "./index-cjw1sj1x.js";
|
|
5
|
+
import"./index-zmj143x7.js";
|
|
6
|
+
import"./index-q9c3c0hy.js";
|
|
7
|
+
import"./index-d9fjz06h.js";
|
|
8
|
+
import"./index-ef228gzf.js";
|
|
9
|
+
import"./index-pn8mhpps.js";
|
|
10
|
+
import"./index-mt2154s2.js";
|
|
11
|
+
import"./index-rpgxs245.js";
|
|
12
|
+
import"./index-yw6g3bbv.js";
|
|
13
|
+
import"./index-s5rhm04y.js";
|
|
14
|
+
import"./index-erfc1x40.js";
|
|
15
|
+
import"./index-ycy302an.js";
|
|
16
|
+
import"./index-bwxpk2cj.js";
|
|
17
|
+
import"./index-by5gpp8x.js";
|
|
18
|
+
import"./index-6wwzs1bc.js";
|
|
19
|
+
import"./index-q0y2jq9j.js";
|
|
20
|
+
export {
|
|
21
|
+
ContextRunner2 as ContextRunner
|
|
22
|
+
};
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
import {
|
|
3
3
|
stripAnsi
|
|
4
4
|
} from "./index-7md2g9vw.js";
|
|
5
|
-
import {
|
|
6
|
-
openBrowser
|
|
7
|
-
} from "./index-ns128c4q.js";
|
|
8
5
|
import {
|
|
9
6
|
writeClipboard
|
|
10
7
|
} from "./index-p6pbz9n5.js";
|
|
8
|
+
import {
|
|
9
|
+
openBrowser
|
|
10
|
+
} from "./index-9dp031by.js";
|
|
11
11
|
|
|
12
12
|
// pkgs/@akanjs/cli/application/devTui.tsx
|
|
13
13
|
import { render } from "ink";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
// pkgs/@akanjs/cli/application/devTuiView.ts
|
|
3
3
|
var createDevTuiView = async (supervisor) => {
|
|
4
|
-
const { DevTui } = await import("./devTui-
|
|
4
|
+
const { DevTui } = await import("./devTui-ffjsarqa.js");
|
|
5
5
|
return new DevTui(supervisor);
|
|
6
6
|
};
|
|
7
7
|
export {
|
|
@@ -2,30 +2,29 @@
|
|
|
2
2
|
import {
|
|
3
3
|
script,
|
|
4
4
|
command
|
|
5
|
-
} from "./index-
|
|
5
|
+
} from "./index-ycy302an.js";
|
|
6
6
|
import"./index-q0y2jq9j.js";
|
|
7
|
-
import"./index-
|
|
7
|
+
import"./index-bwxpk2cj.js";
|
|
8
8
|
import"./index-6wwzs1bc.js";
|
|
9
9
|
import {
|
|
10
10
|
Prompter2
|
|
11
|
-
} from "./index-
|
|
11
|
+
} from "./index-s5rhm04y.js";
|
|
12
12
|
|
|
13
13
|
// pkgs/@akanjs/cli/guideline/guideline.script.ts
|
|
14
14
|
import { Logger } from "akanjs/common";
|
|
15
15
|
|
|
16
16
|
class GuidelineScript extends script("guideline") {
|
|
17
|
-
async guideline(action, name = null
|
|
17
|
+
async guideline(action, name = null) {
|
|
18
18
|
if (action === "list") {
|
|
19
19
|
const guidelines = await Prompter2.listGuidelines();
|
|
20
|
-
Logger.rawLog(
|
|
20
|
+
Logger.rawLog(guidelines.join(`
|
|
21
21
|
`));
|
|
22
22
|
return;
|
|
23
23
|
}
|
|
24
24
|
if (action === "show") {
|
|
25
25
|
if (!name)
|
|
26
26
|
throw new Error("Guideline name is required. Example: akan guideline show framework");
|
|
27
|
-
|
|
28
|
-
Logger.rawLog(format === "json" ? JSON.stringify({ name, instruction, guideJson }, null, 2) : instruction);
|
|
27
|
+
Logger.rawLog(await Prompter2.getInstruction(name));
|
|
29
28
|
return;
|
|
30
29
|
}
|
|
31
30
|
throw new Error(`Unknown guideline action: ${action}. Use "list" or "show".`);
|
|
@@ -34,12 +33,8 @@ class GuidelineScript extends script("guideline") {
|
|
|
34
33
|
|
|
35
34
|
// pkgs/@akanjs/cli/guideline/guideline.command.ts
|
|
36
35
|
class GuidelineCommand extends command("guideline", [GuidelineScript], ({ public: target }) => ({
|
|
37
|
-
guideline: target({ desc: "List or show Akan AI guideline instructions" }).arg("action", String, { desc: "list or show" }).arg("name", String, { desc: "guideline name for show", nullable: true }).
|
|
38
|
-
|
|
39
|
-
default: "markdown",
|
|
40
|
-
enum: ["markdown", "json"]
|
|
41
|
-
}).exec(async function(action, name, format) {
|
|
42
|
-
await this.guidelineScript.guideline(action, name, format);
|
|
36
|
+
guideline: target({ desc: "List or show Akan AI guideline instructions" }).arg("action", String, { desc: "list or show" }).arg("name", String, { desc: "guideline name for show", nullable: true }).exec(async function(action, name) {
|
|
37
|
+
await this.guidelineScript.guideline(action, name);
|
|
43
38
|
})
|
|
44
39
|
})) {
|
|
45
40
|
}
|
|
@@ -273,8 +273,10 @@ are, because those are the ones the server could have done.
|
|
|
273
273
|
SEO snapshots, prerendering and pre-hydration E2E read, so await what the page needs immediately and stream
|
|
274
274
|
the rest. `xListInY` / `xInsightInY` hold hydrated model instances that React Flight refuses as client props:
|
|
275
275
|
consume them in a server component, never as a `Zone` prop.
|
|
276
|
-
6. **Use named `ReactNode` slots, not just `children`** —
|
|
277
|
-
|
|
276
|
+
6. **Use named `ReactNode` slots, not just `children`** — a client shell that takes one slot per region lets a
|
|
277
|
+
server component supply each of them, instead of absorbing the whole subtree into the bundle. `Layout.Navbar`
|
|
278
|
+
declares `title` / `left` / `right` alongside `back` and `children`, but renders only the last two today, so
|
|
279
|
+
copy the shape rather than the component.
|
|
278
280
|
7. **Let the server do the derived work.** Display and predicate logic belongs on `Light<Model>`; enum→class
|
|
279
281
|
lookups belong in a module-scope `as const` map.
|
|
280
282
|
8. **Gate auth on the server** — `getSelf({ unauthorize: "/signin" })` in `_layout.tsx`, before any HTML is sent.
|
|
@@ -421,8 +423,11 @@ stores need none, because state and CRUD actions are generated. The body is thre
|
|
|
421
423
|
`this.setX(...)` → toast. The optimistic shape is mutate the client model, `void fetch.*`, then commit. Use
|
|
422
424
|
`this.pick(...)` when the value must exist, `this.get()` when it may not, and `this.set({...})` to write. Mutate lists
|
|
423
425
|
through the collection API (`this.set({ xList: xList.set(x).save() })`), not array spread. **An action returns
|
|
424
|
-
nothing** (`no-return-in-store-action.grit`). **
|
|
425
|
-
`
|
|
426
|
+
nothing** (`no-return-in-store-action.grit`). **Reach another store through `this`:**
|
|
427
|
+
`import type { RootStore } from "../st"`, then `(this as unknown as RootStore).logout()` to call its action or
|
|
428
|
+
`(this as unknown as RootStore).set({ … })` / `.get()` to write or read its state. Every store is mixed into one root
|
|
429
|
+
at runtime, so the cast only tells the type what `this` already is. Keep it `import type` — `st.ts` imports every
|
|
430
|
+
store, so a value import is a cycle.
|
|
426
431
|
|
|
427
432
|
**`<model>.dictionary.ts`** — fixed chain, with empty stages still written:
|
|
428
433
|
`.of() → .model() → .insight() → .query() → .sort() → .enum() → .slice() → .endpoint() → .error() → .translate()`.
|
|
@@ -475,13 +480,14 @@ Full contract — credential handshake, room revalidation, socket cleanup scopin
|
|
|
475
480
|
never bounded. **Losing the race does not cancel the work**: the handler runs to completion with nobody
|
|
476
481
|
holding its result, so a deadline is an answer to the caller, not an undo.
|
|
477
482
|
- **A cached answer is the endpoint's `{ cache: <ms> }`, and only a `query` taking no internal argument may have
|
|
478
|
-
one.**
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
handler's result, so `resolveReturn` still masks fields and resolves
|
|
483
|
-
is down is warned about and the call runs uncached. The default
|
|
484
|
-
|
|
483
|
+
one.** It is a step of the call, not a middleware, and stands aside for every endpoint that declares nothing.
|
|
484
|
+
Internal arguments are how a call learns who is asking (`.with(Self)`), so an endpoint that has them answers
|
|
485
|
+
per caller and one shared entry would be one caller's answer handed to the next — that endpoint and every
|
|
486
|
+
`mutation` are named in the log and left uncached. The lookup runs after the guards, so a hit reaches only a
|
|
487
|
+
caller they admitted; what is cached is the handler's result, so `resolveReturn` still masks fields and resolves
|
|
488
|
+
relations per call; a cache backend that is down is warned about and the call runs uncached. The default
|
|
489
|
+
middleware chain is `Logging → Timeout → <lib middlewares>`, then guards → internal arguments → cache →
|
|
490
|
+
handler, and there is no `Retry` middleware.
|
|
485
491
|
|
|
486
492
|
### Authorization Defaults
|
|
487
493
|
|
|
@@ -548,8 +554,11 @@ Full contract — filter-arg `ref` pickers, `getQueryMeta` summary counters, `la
|
|
|
548
554
|
first "more". `isCumulativeOf<Model>` is the mode.
|
|
549
555
|
- **"Is there more" is `hasMoreOf<Model>`, never `count > page * limit`.** It comes from the length of the batch
|
|
550
556
|
the server returned, so it survives `{ insight: false }` and cannot drift from a count a live event moved.
|
|
551
|
-
- **Hydrated vs raw:** server queries return hydrated `cnst.<Model>` instances (with `set`/`save`/`refresh`)
|
|
552
|
-
client fetch results
|
|
557
|
+
- **Hydrated vs raw:** server queries return hydrated `cnst.<Model>` instances (with `set`/`save`/`refresh`),
|
|
558
|
+
and so do client fetch results — `FetchClient` parses every return with `crystalize` defaulting to **true**
|
|
559
|
+
(`pkgs/akanjs/fetch/client/fetchClient.ts`). The raw `GetStateObject` shape is what the `<ref>Obj` /
|
|
560
|
+
`<ref>ObjList` / `<ref>ObjInsight` handles carry, because those pass `crystalize: false` on purpose so the
|
|
561
|
+
value can cross the RSC boundary as a client prop.
|
|
553
562
|
- Every filter generates fourteen methods: `list` · `listIds` · `find` · `findId` · `pick` · `pickId` · `exists` ·
|
|
554
563
|
`count` · `insight` · `query` · **`remove`** · **`removeOne`** · **`update`** · **`updateOne`**. The last four
|
|
555
564
|
are query-level writes — one atomic UPDATE, **no hooks**, and therefore no `_postRemove` and no cascade. Use
|
|
@@ -587,7 +596,7 @@ Full contract — relevance ordering, `columns` / `weights`: `get_guideline` wit
|
|
|
587
596
|
- Injected dependencies resolve by field-name convention: a field named `<refName>Service` resolves to the service registered under `<refName>`, and `<refName>Signal` likewise (`pkgs/akanjs/service/injectInfo.ts`).
|
|
588
597
|
- The `Service`/`Signal` suffix is required — the injector strips it to derive the registry lookup key. Name the field after the target refName plus the suffix, not arbitrarily.
|
|
589
598
|
- Preference order inside a service: `service<srv.XService>()` for another module's service · `plug(AdapterClass)` or `plug(StorageAdaptorRole)` for an adapter · `use<T>()` only to reach an `option.ts`-registered legacy singleton · `env(...)` for config.
|
|
590
|
-
- **`memory(...)` takes a scalar or model class, not only a primitive** — `memory(Map, { of: CallStateInput })` serializes through the constant and travels as JSON text, so the Redis and sqlite-backed caches round-trip the same declaration. Never hand-encode JSON into a `String` memory.
|
|
599
|
+
- **`memory(...)` takes a scalar or model class, not only a primitive** — `memory(Map, { of: CallStateInput })` serializes through the constant and travels as JSON text, so the Redis and sqlite-backed caches round-trip the same declaration. Never hand-encode JSON into a `String` memory. A memory is scoped to the service or adaptor that declares it; `ttl` (milliseconds) sets how long each write lives unless the `set` call names its own `expireAt`, and a `Map` entry expires on its own.
|
|
591
600
|
|
|
592
601
|
### Adapters — `adapt()` And `plug()`
|
|
593
602
|
|
|
@@ -663,9 +672,11 @@ it.
|
|
|
663
672
|
names itself as the issuer, so `/mcp` demands a bearer token, verifies its signature, and refuses one carrying no
|
|
664
673
|
`aud`. A token is the app's own access JWT plus `aud`/`iss`/`client_id`, so `AccountMiddleware` and the guards
|
|
665
674
|
judge it unchanged; there is no scope. Per-app knobs live in `env.server.*` under `oauth` (`consentPath` and
|
|
666
|
-
`signinPath` with the basePath, `clients`, `dynamicRegistration`, `allowedRedirectSchemes`, `
|
|
667
|
-
`
|
|
668
|
-
|
|
675
|
+
`signinPath` with the basePath, `clients`, `dynamicRegistration`, `allowedRedirectSchemes`, `accessTokenSeconds`,
|
|
676
|
+
`clientIdMetadata`, `enabled`, plus `issuer` / `resource` — set those when a tunnel or an edge makes the derived
|
|
677
|
+
origin wrong, because an MCP client compares the issuer byte for byte). `/mcp` reads the `Authorization` header only — a cookie is dropped at the door — and `JWT_SECRET` (or
|
|
678
|
+
`security.jwtSecret`) is mandatory whenever `operationMode` is not `local`, because the derived fallback is
|
|
679
|
+
forgeable from three public names; `AKAN_ALLOW_DERIVED_JWT_SECRET=1` accepts that risk explicitly. A grant is revoked
|
|
669
680
|
whole — `POST /oauth/revoke` (RFC 7009) by the client, `fetch.revokeOAuthConnection(sessionId)` by the account's
|
|
670
681
|
owner, `fetch.listOAuthConnections()` to see them — and a revoked access token is refused at its next call.
|
|
671
682
|
- **A person may, a model may not.** An agent's token names its `client_id` and `aud`; a browser session has
|
|
@@ -831,10 +842,11 @@ shape, so `cascade` never means "related" — it means one of exactly these:
|
|
|
831
842
|
- Dynamic segments use `[id]`; route groups use directories like `(user)`, `(public)`, `(tab)`, or `(detail)`.
|
|
832
843
|
- **A route file exports one thing**: `export default page()…render(…)` for a page, `layout()…render(…)` for a
|
|
833
844
|
`_layout.tsx`, `rootLayout()…render(…)` for the app's (or a basePath's) root `_layout.tsx`. Every route setting
|
|
834
|
-
is a stage of the chain — `.param()`, `.search()`, `.config()`, `.head()
|
|
835
|
-
`.
|
|
836
|
-
|
|
837
|
-
|
|
845
|
+
is a stage of the chain — `.param()`, `.search()`, `.config()`, `.head()`, `.loading()`; `.notFound()` /
|
|
846
|
+
`.error()` on a layout; `.fonts()` / `.theme()` / `.manifest()` / `.reconnect()` / `.wsConnect()` /
|
|
847
|
+
`.layoutStyle()` on the root layout; `.prompt()` on a page. A named export beside the chain, or `page()` in a
|
|
848
|
+
`_layout.tsx`, fails the build. `.head()` takes JSX — `<title>`, `<meta>`, `<link>` — or a function of the
|
|
849
|
+
route's args returning it; there is no metadata object, and analytics is the app's own script, not a stage.
|
|
838
850
|
- **A page names every `[x]` segment of its path with `.param("x", Type)`** and reads a query key only through
|
|
839
851
|
`.search("k", Type)`. Values arrive typed — `ID`/`String` → string, `Int`/`Float` → number, `Boolean`, `Date` →
|
|
840
852
|
Dayjs, an `enumOf` class → its union, `[T]` → array — a path value the type refuses answers not-found, and a
|
|
@@ -922,12 +934,15 @@ when two shapes disagree.
|
|
|
922
934
|
- `children: any` — newer files use `children: ReactNode`.
|
|
923
935
|
- Hard-coded API keys or secrets in source; they belong in `option.ts` or env.
|
|
924
936
|
- Large blocks of commented-out code left in place.
|
|
925
|
-
- Cross-store writes through a `RootStore` cast — it collides with the Bun SSR-bundler segfault.
|
|
926
937
|
- Stale `// TODO: Implement …` comments above implemented methods.
|
|
927
938
|
- `{cond && <X/>}` in JSX, hard-coded Korean bypassing `l()`, and `window.alert(...)` for user feedback.
|
|
928
939
|
- Bare `/* eslint-disable */` blocks — use `// biome-ignore lint/<rule>: <why>`.
|
|
929
940
|
- Raw palette grays such as `text-gray-400` instead of the semantic tokens (`text-foreground/70`).
|
|
930
941
|
|
|
942
|
+
A store calling `(this as unknown as RootStore).<action>()` or `.set({ … })` over
|
|
943
|
+
`import type { RootStore } from "../st"` is **not** one of these — it is the sanctioned way to reach another store's
|
|
944
|
+
actions and state (see `<model>.store.ts` above).
|
|
945
|
+
|
|
931
946
|
## Secrets And Env Safety (`.env`, `infra/**`, `*secret*`, `*credential*`)
|
|
932
947
|
|
|
933
948
|
- Never print, summarize, commit, or expose real secret values, credentials, tokens, private keys, or `.env` contents.
|
|
@@ -49,7 +49,7 @@ with it. `conventions` carries the invariants — this is the full contract behi
|
|
|
49
49
|
`findBy<Filter>(...args, { select: { secretField: true } })` takes it inside the option object. The shapes do not
|
|
50
50
|
swap: `{ select: … }` handed to the facade projects a field named `select`, which no model has, and the read comes
|
|
51
51
|
back empty with no error. This is the only way to read a `field.secret(...)` value, which is otherwise stripped.
|
|
52
|
-
- **Hydrated vs raw:** server queries return hydrated `cnst.<Model>` instances (with `set`/`save`/`refresh`)
|
|
52
|
+
- **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.
|
|
53
53
|
- Every filter generates fourteen methods: `list` · `listIds` · `find` · `findId` · `pick` · `pickId` · `exists` ·
|
|
54
54
|
`count` · `insight` · `query` · **`remove`** · **`removeOne`** · **`update`** · **`updateOne`**. The last four are
|
|
55
55
|
query-level writes — one atomic UPDATE, **no hooks**, and therefore no `_postRemove` and no cascade. Use them on a
|
|
@@ -129,8 +129,10 @@ eight queries threw; per-section boundaries put each rejection at its own bounda
|
|
|
129
129
|
soft-redirect script, so `getSelf({ unauthorize: "/signin" })` stays in `_layout.tsx` or the page body — never
|
|
130
130
|
inside a streamed section.
|
|
131
131
|
|
|
132
|
-
**⑥ Use named `ReactNode` slots, not just `children`.**
|
|
133
|
-
|
|
132
|
+
**⑥ Use named `ReactNode` slots, not just `children`.** A client shell that takes one slot per region lets a
|
|
133
|
+
server component supply each of them, instead of absorbing the whole subtree into the bundle. `Layout.Navbar`
|
|
134
|
+
declares `title` / `left` / `right` alongside `back` and `children`, but its render body uses only `back` and
|
|
135
|
+
`children` — copy the shape, not that component.
|
|
134
136
|
|
|
135
137
|
**⑦ Let the server do the derived work.** Display and predicate logic belongs on `Light<Model>` (`isNew()`,
|
|
136
138
|
`canWrite(user?)`, `formatTimes()`), and enum→class lookups belong in a module-scope `as const` map. Both sides call
|