@akanjs/cli 3.2.0-rc.9 → 3.2.1-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.build-stamp +2 -2
- package/CodeAgent-xdw73nbz.js +11 -0
- package/{CodeTui-qstk5vpj.js → CodeTui-0gewm71c.js} +822 -666
- package/README.ko.md +7 -0
- package/README.md +7 -0
- package/TunnelShare-cccfdgbm.js +16 -0
- package/agent.command-g1mj34wz.js +59 -0
- package/akanCode.js +12 -12
- package/appExecutor-rrx10jya.js +11 -0
- package/{application.command-m4rq4wc2.js → application.command-3w4v7t40.js} +84 -40
- package/{applicationBuildRunner-df7rx3ra.js → applicationBuildRunner-y5xbetyz.js} +51 -20
- package/buildBatch.proc.js +31 -16
- package/{cloud.command-a0gy0qq2.js → cloud.command-ph0rz6sw.js} +28 -29
- package/cloud.script-8bs9tp4j.js +30 -0
- package/{code.command-5rsdqw8s.js → code.command-9b967qpg.js} +13 -9
- package/context.command-ndzs5rbf.js +62 -0
- package/context.runner-bmstpng2.js +32 -0
- package/csrArtifactBuilder-gtvff6k7.js +10 -0
- package/{index-qd7xn2bk.js → dependencyScanner-93g8tk0r.js} +7 -6
- package/{devTui-h77zrjv5.js → devTui-rf374y2w.js} +1 -1
- package/{fileSys-zpvt5gtf.js → fileSys-e5mwt73x.js} +1 -1
- package/frameworkGraph-aneq2nwy.js +8 -0
- package/{guideline.command-mffxknbr.js → guideline.command-y8qz9kxy.js} +9 -5
- package/guidelines/agentRule/agentRule.instruction.md +25 -9
- package/guidelines/akanApi/akanApi.instruction.md +6 -4
- package/guidelines/conventions/core.md +23 -5
- package/guidelines/conventions/rules/app.md +4 -1
- package/guidelines/conventions/rules/page.md +5 -4
- package/guidelines/conventions/rules/ts.md +3 -3
- package/guidelines/errorCodes/errorCodes.instruction.md +165 -0
- package/guidelines/fieldRule/fieldRule.instruction.md +2 -1
- package/guidelines/mcpRule/mcpRule.instruction.md +225 -5
- package/guidelines/pageRule/pageRule.instruction.md +10 -1
- package/guidelines/queryRule/queryRule.instruction.md +3 -1
- package/guidelines/runtimeRule/runtimeRule.instruction.md +14 -8
- package/guidelines/transportRule/transportRule.instruction.md +31 -1
- package/incrementalBuilder.proc.js +609 -437
- package/{index-skmtj8rm.js → index-02v45hh9.js} +27 -10
- package/{index-j6gc8n14.js → index-0csk6jqm.js} +11 -9
- package/{index-2r9ff9qm.js → index-0wa5z6rm.js} +2 -2
- package/{index-nmvhjn8c.js → index-0z8sbdme.js} +93 -82
- package/{index-2vgv7fs7.js → index-1c2807kg.js} +727 -693
- package/{index-hj6w4ka1.js → index-1p81ecbz.js} +1 -1
- package/{index-2mf1aen9.js → index-1p9bxjmt.js} +2 -2
- package/{index-an76bdrv.js → index-2kh4xj3m.js} +1 -1
- package/{index-99qvtff2.js → index-2vn0m9z5.js} +5 -5
- package/{index-rp4yf32g.js → index-3569fr49.js} +36 -29
- package/{index-xvk2a75m.js → index-38x8ynrx.js} +25 -25
- package/{index-cmg5ngqa.js → index-3fmzz9sf.js} +20 -20
- package/{index-rfzp4pqs.js → index-45aprybg.js} +3 -3
- package/{index-k92x3vne.js → index-4a1n0nym.js} +1 -1
- package/{index-ra9fvn7s.js → index-4zgm54wf.js} +76 -40
- package/{index-exn38bzx.js → index-652f3bs8.js} +116 -54
- package/{index-grxs6fts.js → index-6gepp8yn.js} +57 -31
- package/{index-vm0dn0mt.js → index-6j351de4.js} +294 -157
- package/{index-w15mg3km.js → index-7ssr7wq4.js} +1 -1
- package/{index-gxav1bjz.js → index-82cmbpxc.js} +9 -9
- package/{index-2mrn1mrg.js → index-9f3reh2y.js} +1 -1
- package/{index-gcx48get.js → index-9rymt8d6.js} +2 -2
- package/{index-swwjakt0.js → index-ankyx6dj.js} +14 -18
- package/{index-28x1aszt.js → index-b0t92k71.js} +154 -58
- package/index-b372rck5.js +799 -0
- package/{index-yf9wc28h.js → index-bejy9zyc.js} +1 -1
- package/{index-r0a604h4.js → index-c669pbyb.js} +5 -4
- package/{index-xyn02k0w.js → index-cm9rb480.js} +662 -433
- package/{index-j9790rhk.js → index-d0n78fzc.js} +1635 -1139
- package/{index-hqv34wzq.js → index-dr1carpr.js} +10 -10
- package/index-f2arv0mv.js +30 -0
- package/{index-5radqwn2.js → index-gtydr9qc.js} +12 -12
- package/{index-j6eeh5d7.js → index-j3fqs8rc.js} +5 -5
- package/{index-yckz5t8b.js → index-jdw9m5c4.js} +516 -434
- package/{index-ny2k80mv.js → index-jf4vk1s0.js} +9 -2
- package/{index-x40bdsca.js → index-jg5rwrf7.js} +77 -115
- package/{index-5zwr4n6k.js → index-ktxdfqg5.js} +65 -8
- package/index-mnhrqjjq.js +127 -0
- package/{index-3ghdb7p5.js → index-pc42gxa5.js} +2777 -3676
- package/{index-0hbtve0a.js → index-q8h4eg5y.js} +32 -28
- package/{index-j3v29pq7.js → index-qh81drde.js} +219 -175
- package/{index-b4qq3rq0.js → index-rwgqba9p.js} +1 -1
- package/{index-w8yasvpc.js → index-scfsqen7.js} +2136 -2175
- package/{index-9p260r4e.js → index-trffs83s.js} +538 -250
- package/{index-0gg15zwa.js → index-twjgmryg.js} +6 -6
- package/index-whvhsb5f.js +80 -0
- package/{index-h7hehkw6.js → index-xczjdng6.js} +3 -1
- package/{index-39jz41jb.js → index-xs9a3ddt.js} +3 -3
- package/{index-35j83zkd.js → index-xv3pvdw4.js} +2 -2
- package/{index-34792nh7.js → index-y2g0s9tn.js} +1 -1
- package/{index-43f4h4cm.js → index-ymgsvhc5.js} +7 -8
- package/{index-ygdbn9jn.js → index-zyb0ebm4.js} +1 -1
- package/{index-bns3wcpc.js → index-zyjztrvc.js} +2 -2
- package/index.js +30 -24
- package/libExecutor-nstr00s7.js +10 -0
- package/{library.command-bmd7zc5m.js → library.command-b02aw1hm.js} +12 -5
- package/{localRegistry.command-y6en1599.js → localRegistry.command-3hg1p4aj.js} +24 -24
- package/{module.command-7exfffqw.js → module.command-bd9gz6cv.js} +11 -7
- package/{package.command-adskw2rj.js → package.command-xmr0mxze.js} +11 -10
- package/package.json +8 -8
- package/{page.command-dw01272p.js → page.command-x94qf58g.js} +8 -4
- package/{pipeline.command-0b1r3y5r.js → pipeline.command-n2843k6t.js} +15 -9
- package/pkgExecutor-cka27e3c.js +10 -0
- package/{primitive.command-byw6vc04.js → primitive.command-cs7v376h.js} +12 -8
- package/{projectTypecheck-kkrpq60a.js → projectTypecheck-za2n3nbr.js} +1 -1
- package/{prompter-qrwx1p17.js → prompter-d33wmdpa.js} +2 -2
- package/{quality.command-6rqnhzct.js → quality.command-nqngh1jd.js} +25 -16
- package/{recipeScanner-4b69ybe0.js → recipeScanner-rrx69awy.js} +1 -1
- package/{repair.command-rw5zymak.js → repair.command-v2medwsm.js} +12 -8
- package/{routeSourceValidator-4h947v7c.js → routeSourceValidator-8n6j1vn7.js} +4 -2
- package/{scalar.command-2dyp9nh9.js → scalar.command-61cjmxn1.js} +10 -6
- package/skills/akan-debug/SKILL.md +8 -5
- package/skills/akan-err/SKILL.md +7 -0
- package/skills/akan-mcp/SKILL.md +19 -1
- package/skills/akan-scaffold/SKILL.md +1 -1
- package/skills/akan-validate/SKILL.md +3 -3
- package/{subspace.command-111ynwv1.js → subspace.command-dtv8nfh7.js} +30 -24
- package/templates/app/page/_layout.tsx +13 -0
- package/templates/app/page/styles.css.template +40 -0
- package/templates/appSample/page/_index.tsx +9 -9
- package/templates/appSample/page/_layout.tsx +1 -0
- package/templates/appSample/page/styles.css.template +40 -5
- package/templates/appSample/ui/Recipe/jellyButton.ts +1 -1
- package/templates/biomeForm.ts +1 -1
- package/templates/env/_env.server.type.ts +1 -1
- package/templates/facetIndex/index.ts +2 -37
- package/templates/lib/sig.ts +0 -4
- package/templates/lib/useClient.ts +1 -1
- package/templates/workspaceRoot/.devcontainer/devcontainer.json.template +1 -1
- package/templates/workspaceRoot/AGENTS.md.template +2 -1
- package/templates/workspaceRoot/README.ts +4 -2
- package/{tunnel.command-2gcpfbdj.js → tunnel.command-fmwm5fgb.js} +15 -13
- package/{typeChecker-s640r6c0.js → typeChecker-7jt6abrs.js} +1 -1
- package/typecheck.proc.js +3 -2
- package/{verify.command-djgs86ma.js → verify.command-4f260t53.js} +19 -17
- package/{workflow.command-n0k2mxr5.js → workflow.command-tm5q9xsm.js} +21 -14
- package/{workspace.command-fh1qwxfx.js → workspace.command-75gc280j.js} +56 -54
- package/CodeAgent-x2p3a3e0.js +0 -11
- package/TunnelShare-c4xsfzg5.js +0 -15
- package/agent.command-9et2e27p.js +0 -52
- package/cloud.script-xze4zh7n.js +0 -31
- package/context.command-rk1dwrg4.js +0 -57
- package/context.runner-83ky5m1b.js +0 -30
- package/dependencyScanner-78sq8m4q.js +0 -8
- /package/templates/{appSample → app}/public/fonts/Pretendard-Bold.woff2 +0 -0
- /package/templates/{appSample → app}/public/fonts/Pretendard-Medium.woff2 +0 -0
- /package/templates/{appSample → app}/public/fonts/Pretendard-Regular.woff2 +0 -0
- /package/templates/{appSample → app}/public/fonts/Pretendard-SemiBold.woff2 +0 -0
package/buildBatch.proc.js
CHANGED
|
@@ -1,33 +1,38 @@
|
|
|
1
1
|
// @bun
|
|
2
|
+
import"./index-zyjztrvc.js";
|
|
3
|
+
import {
|
|
4
|
+
WorkspaceExecutor
|
|
5
|
+
} from "./index-pc42gxa5.js";
|
|
6
|
+
import"./index-j4yvgfhr.js";
|
|
2
7
|
import {
|
|
3
8
|
FontOptimizer,
|
|
4
9
|
ApplicationBuildReporter
|
|
5
|
-
} from "./index-
|
|
10
|
+
} from "./index-6j351de4.js";
|
|
6
11
|
import {
|
|
7
12
|
resolveSsrPageEntriesForApp,
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
} from "./index-3ghdb7p5.js";
|
|
13
|
+
AppExecutor2
|
|
14
|
+
} from "./index-b372rck5.js";
|
|
11
15
|
import {
|
|
12
16
|
computeRouteSeedIndex,
|
|
13
17
|
saveRouteSeedIndex,
|
|
14
18
|
CsrDevBundler,
|
|
15
19
|
SsrDevBundler
|
|
16
|
-
} from "./index-
|
|
17
|
-
import"./index-
|
|
18
|
-
import"./index-
|
|
20
|
+
} from "./index-scfsqen7.js";
|
|
21
|
+
import"./index-f2arv0mv.js";
|
|
22
|
+
import"./index-mnhrqjjq.js";
|
|
19
23
|
import {
|
|
20
24
|
ServerGraphFile,
|
|
21
25
|
PagesBundleBuilder
|
|
22
|
-
} from "./index-
|
|
26
|
+
} from "./index-0z8sbdme.js";
|
|
23
27
|
import {
|
|
24
28
|
CssCompiler,
|
|
25
29
|
SsrBaseArtifactBuilder
|
|
26
|
-
} from "./index-
|
|
30
|
+
} from "./index-jg5rwrf7.js";
|
|
27
31
|
import {
|
|
28
|
-
|
|
29
|
-
} from "./index-
|
|
32
|
+
CsrArtifactBuilder2
|
|
33
|
+
} from "./index-38x8ynrx.js";
|
|
30
34
|
import"./index-62md4dwy.js";
|
|
35
|
+
import"./index-whvhsb5f.js";
|
|
31
36
|
|
|
32
37
|
// pkgs/@akanjs/devkit/incrementalBuilder/buildBatch.proc.ts
|
|
33
38
|
import path from "path";
|
|
@@ -94,9 +99,10 @@ class BuildBatch {
|
|
|
94
99
|
async#buildBase() {
|
|
95
100
|
const started = Date.now();
|
|
96
101
|
try {
|
|
97
|
-
const { artifact, optimizedFonts } = await new SsrBaseArtifactBuilder(this.#app).build();
|
|
102
|
+
const { artifact, optimizedFonts, phaseMs } = await new SsrBaseArtifactBuilder(this.#app).build();
|
|
98
103
|
this.#result.artifact = artifact;
|
|
99
104
|
this.#result.optimizedFonts = optimizedFonts;
|
|
105
|
+
this.#result.basePhaseMs = phaseMs;
|
|
100
106
|
this.#logger.verbose(`base-artifact ok buildId=${artifact.pagesBundleBuildId} (${Date.now() - started}ms)`);
|
|
101
107
|
} catch (err) {
|
|
102
108
|
this.#fail("base", "base-artifact", err);
|
|
@@ -117,7 +123,7 @@ class BuildBatch {
|
|
|
117
123
|
async#buildShell() {
|
|
118
124
|
const started = Date.now();
|
|
119
125
|
try {
|
|
120
|
-
await new
|
|
126
|
+
await new CsrArtifactBuilder2(this.#app, "start", "en", { cssAssets: this.#request.cssAssets }).buildMcpAppViews();
|
|
121
127
|
this.#logger.verbose(`mcp-app-views ok (${Date.now() - started}ms)`);
|
|
122
128
|
} catch (err) {
|
|
123
129
|
this.#fail("shell", "mcp-app-views", err);
|
|
@@ -125,7 +131,7 @@ class BuildBatch {
|
|
|
125
131
|
}
|
|
126
132
|
async#rebuildCsrArtifact(started) {
|
|
127
133
|
const cssAssets = this.#result.cssAssets ?? this.#request.cssAssets;
|
|
128
|
-
await new
|
|
134
|
+
await new CsrArtifactBuilder2(this.#app, "start", "en", { cssAssets }).build();
|
|
129
135
|
this.#logger.verbose(`csr-rebundle ok (${Date.now() - started}ms)`);
|
|
130
136
|
if (this.#request.changedFiles.length === 0)
|
|
131
137
|
return;
|
|
@@ -273,6 +279,15 @@ ${cssText}`).toString(36);
|
|
|
273
279
|
return previous.files.some((fontFile) => path.resolve(fontFile) === normalized);
|
|
274
280
|
});
|
|
275
281
|
}
|
|
282
|
+
static #report(result) {
|
|
283
|
+
if (!process.send)
|
|
284
|
+
return Promise.resolve();
|
|
285
|
+
return new Promise((resolve) => {
|
|
286
|
+
process.once("disconnect", () => resolve());
|
|
287
|
+
process.send?.({ type: "build-batch-result", data: result });
|
|
288
|
+
setTimeout(() => process.disconnect?.(), 5000).unref();
|
|
289
|
+
});
|
|
290
|
+
}
|
|
276
291
|
static async main() {
|
|
277
292
|
const raw = process.argv[2];
|
|
278
293
|
if (!raw)
|
|
@@ -286,14 +301,14 @@ ${cssText}`).toString(36);
|
|
|
286
301
|
workspaceRoot: request.workspaceRoot,
|
|
287
302
|
repoName: request.repoName
|
|
288
303
|
});
|
|
289
|
-
const app =
|
|
304
|
+
const app = AppExecutor2.from(workspace, request.appName);
|
|
290
305
|
if (request.pageKeys)
|
|
291
306
|
app.setPageKeys(request.pageKeys);
|
|
292
307
|
const orphaned = () => process.exit(1);
|
|
293
308
|
process.on("disconnect", orphaned);
|
|
294
309
|
const result = await new BuildBatch(request, app).run();
|
|
295
|
-
process.send?.({ type: "build-batch-result", data: result });
|
|
296
310
|
process.off("disconnect", orphaned);
|
|
311
|
+
await BuildBatch.#report(result);
|
|
297
312
|
}
|
|
298
313
|
}
|
|
299
314
|
await BuildBatch.main().catch((err) => {
|
|
@@ -3,36 +3,34 @@ import {
|
|
|
3
3
|
App,
|
|
4
4
|
Workspace,
|
|
5
5
|
command
|
|
6
|
-
} from "./index-
|
|
6
|
+
} from "./index-652f3bs8.js";
|
|
7
7
|
import"./index-j4yvgfhr.js";
|
|
8
|
-
import"./index-
|
|
9
|
-
import"./index-
|
|
10
|
-
import"./index-
|
|
8
|
+
import"./index-pc42gxa5.js";
|
|
9
|
+
import"./index-zyjztrvc.js";
|
|
10
|
+
import"./index-b372rck5.js";
|
|
11
|
+
import"./index-f2arv0mv.js";
|
|
12
|
+
import"./index-mnhrqjjq.js";
|
|
13
|
+
import"./index-45aprybg.js";
|
|
11
14
|
import {
|
|
12
15
|
PlatformTestRun
|
|
13
|
-
} from "./index-
|
|
14
|
-
import"./index-
|
|
15
|
-
import"./index-
|
|
16
|
+
} from "./index-3569fr49.js";
|
|
17
|
+
import"./index-ymgsvhc5.js";
|
|
18
|
+
import"./index-2kh4xj3m.js";
|
|
16
19
|
import"./index-m9jj544v.js";
|
|
17
|
-
import"./index-nmvhjn8c.js";
|
|
18
|
-
import"./index-xvk2a75m.js";
|
|
19
20
|
import {
|
|
20
21
|
npmRegistryFromEnv,
|
|
21
22
|
warnIgnoredNpmRegistry
|
|
22
|
-
} from "./index-
|
|
23
|
-
import"./index-
|
|
24
|
-
import"./index-
|
|
25
|
-
import"./index-
|
|
26
|
-
import"./index-
|
|
27
|
-
import"./index-
|
|
28
|
-
import"./index-
|
|
29
|
-
import"./index-
|
|
30
|
-
import"./index-cmg5ngqa.js";
|
|
31
|
-
import"./index-5zwr4n6k.js";
|
|
32
|
-
import"./index-swwjakt0.js";
|
|
23
|
+
} from "./index-jf4vk1s0.js";
|
|
24
|
+
import"./index-6j351de4.js";
|
|
25
|
+
import"./index-0csk6jqm.js";
|
|
26
|
+
import"./index-d0n78fzc.js";
|
|
27
|
+
import"./index-rwgqba9p.js";
|
|
28
|
+
import"./index-b0t92k71.js";
|
|
29
|
+
import"./index-ktxdfqg5.js";
|
|
30
|
+
import"./index-ankyx6dj.js";
|
|
33
31
|
import {
|
|
34
32
|
CloudScript2
|
|
35
|
-
} from "./index-
|
|
33
|
+
} from "./index-82cmbpxc.js";
|
|
36
34
|
import {
|
|
37
35
|
writeOption,
|
|
38
36
|
oneNativeTargetOption,
|
|
@@ -43,8 +41,9 @@ import {
|
|
|
43
41
|
hostOption,
|
|
44
42
|
subspaceOption
|
|
45
43
|
} from "./index-mdjc93e1.js";
|
|
46
|
-
import"./index-
|
|
44
|
+
import"./index-9rymt8d6.js";
|
|
47
45
|
import"./index-9bv479q5.js";
|
|
46
|
+
import"./index-whvhsb5f.js";
|
|
48
47
|
|
|
49
48
|
// pkgs/@akanjs/cli/cloud/cloud.command.ts
|
|
50
49
|
var localRegistryUrl = () => npmRegistryFromEnv() ?? "http://127.0.0.1:4873";
|
|
@@ -54,12 +53,14 @@ var resolveRegistryUrl = (registry) => {
|
|
|
54
53
|
};
|
|
55
54
|
var pushUpdateDesc = "Pack an over-the-air update of a phone's web bundle, or take the folder `akan pack-update` wrote, and upload it to the Akan Cloud project, which signs and publishes it; or upload the desktop release `akan publish-update` signed, as it is. Exits 2 when the pack needs a new store build or the project rejects it, 1 on any other failure";
|
|
56
55
|
var registerBinaryDesc = "Register the store build of a phone app with the Akan Cloud project, with a pack of the same commit as its embedded bundle. Exits 2 when the store build differs natively from this commit's pack, 1 on any other failure";
|
|
56
|
+
var uploadSecretDesc = "Upload a named pipeline secret to the Akan Cloud project; write-only, it can never be read back";
|
|
57
|
+
var listSecretsDesc = "List the pipeline secrets of the Akan Cloud project: names and scopes, never values";
|
|
57
58
|
|
|
58
59
|
class CloudCommand extends command("cloud", [CloudScript2], ({ public: target }) => ({
|
|
59
|
-
login: target({ desc: "Login to Akan Cloud services" }).option("host", String, hostOption).with(Workspace).exec(async function(host, workspace) {
|
|
60
|
+
login: target({ desc: "Login to Akan Cloud services", readOnly: true }).option("host", String, hostOption).with(Workspace).exec(async function(host, workspace) {
|
|
60
61
|
await this.cloudScript.login(workspace, host);
|
|
61
62
|
}),
|
|
62
|
-
logout: target({ desc: "Logout from Akan Cloud services" }).option("host", String, hostOption).with(Workspace).exec(async function(host, workspace) {
|
|
63
|
+
logout: target({ desc: "Logout from Akan Cloud services", readOnly: true }).option("host", String, hostOption).with(Workspace).exec(async function(host, workspace) {
|
|
63
64
|
await this.cloudScript.logout(workspace, host);
|
|
64
65
|
}),
|
|
65
66
|
deployAkan: target({ devOnly: true, desc: "Deploy Akan.js framework to cloud (internal use)" }).option("test", Boolean, { desc: "test the deployment", default: true }).option("registry", String, {
|
|
@@ -179,9 +180,7 @@ class CloudCommand extends command("cloud", [CloudScript2], ({ public: target })
|
|
|
179
180
|
publicEnv
|
|
180
181
|
});
|
|
181
182
|
}),
|
|
182
|
-
uploadSecret: target({
|
|
183
|
-
desc: "Upload a named pipeline secret to the Akan Cloud project; write-only, it can never be read back"
|
|
184
|
-
}).arg("name", String, { desc: "secret name, e.g. DISCORD_WEBHOOK" }).option("branch", String, {
|
|
183
|
+
uploadSecret: target({ desc: uploadSecretDesc, readOnly: true }).arg("name", String, { desc: "secret name, e.g. DISCORD_WEBHOOK" }).option("branch", String, {
|
|
185
184
|
desc: "only builds of this branch use it: debug, develop or main (default: every branch)",
|
|
186
185
|
nullable: true
|
|
187
186
|
}).option("file", String, {
|
|
@@ -190,13 +189,13 @@ class CloudCommand extends command("cloud", [CloudScript2], ({ public: target })
|
|
|
190
189
|
}).option("subspace", String, subspaceOption("gets it")).option("host", String, hostOption).with(Workspace).exec(async function(name, branch, file, subspace, host, workspace) {
|
|
191
190
|
await this.cloudScript.uploadSecret(workspace, { name, branch, file, subspace, host });
|
|
192
191
|
}),
|
|
193
|
-
listSecrets: target({ desc:
|
|
192
|
+
listSecrets: target({ desc: listSecretsDesc, readOnly: true }).option("branch", String, {
|
|
194
193
|
desc: "only the secrets builds of this branch use: debug, develop or main",
|
|
195
194
|
nullable: true
|
|
196
195
|
}).option("subspace", String, subspaceOption("to list")).option("host", String, hostOption).with(Workspace).exec(async function(branch, subspace, host, workspace) {
|
|
197
196
|
await this.cloudScript.listSecrets(workspace, { branch, subspace, host });
|
|
198
197
|
}),
|
|
199
|
-
removeSecret: target({ desc: "Remove a named pipeline secret from the Akan Cloud project" }).arg("name", String, { desc: "secret name" }).option("branch", String, {
|
|
198
|
+
removeSecret: target({ desc: "Remove a named pipeline secret from the Akan Cloud project", readOnly: true }).arg("name", String, { desc: "secret name" }).option("branch", String, {
|
|
200
199
|
desc: "the branch override to remove: debug, develop or main (default: the every-branch value)",
|
|
201
200
|
nullable: true
|
|
202
201
|
}).option("subspace", String, subspaceOption("holds it")).option("host", String, hostOption).with(Workspace).exec(async function(name, branch, subspace, host, workspace) {
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import {
|
|
3
|
+
CloudScript2
|
|
4
|
+
} from "./index-82cmbpxc.js";
|
|
5
|
+
import"./index-3569fr49.js";
|
|
6
|
+
import"./index-ankyx6dj.js";
|
|
7
|
+
import"./index-b0t92k71.js";
|
|
8
|
+
import"./index-0csk6jqm.js";
|
|
9
|
+
import"./index-45aprybg.js";
|
|
10
|
+
import"./index-jf4vk1s0.js";
|
|
11
|
+
import"./index-ktxdfqg5.js";
|
|
12
|
+
import"./index-d0n78fzc.js";
|
|
13
|
+
import"./index-9rymt8d6.js";
|
|
14
|
+
import"./index-2kh4xj3m.js";
|
|
15
|
+
import"./index-ymgsvhc5.js";
|
|
16
|
+
import"./index-m9jj544v.js";
|
|
17
|
+
import"./index-652f3bs8.js";
|
|
18
|
+
import"./index-9bv479q5.js";
|
|
19
|
+
import"./index-rwgqba9p.js";
|
|
20
|
+
import"./index-6j351de4.js";
|
|
21
|
+
import"./index-whvhsb5f.js";
|
|
22
|
+
import"./index-f2arv0mv.js";
|
|
23
|
+
import"./index-mnhrqjjq.js";
|
|
24
|
+
import"./index-pc42gxa5.js";
|
|
25
|
+
import"./index-b372rck5.js";
|
|
26
|
+
import"./index-j4yvgfhr.js";
|
|
27
|
+
import"./index-zyjztrvc.js";
|
|
28
|
+
export {
|
|
29
|
+
CloudScript2 as CloudScript
|
|
30
|
+
};
|
|
@@ -4,19 +4,23 @@ import {
|
|
|
4
4
|
runner,
|
|
5
5
|
script,
|
|
6
6
|
command
|
|
7
|
-
} from "./index-
|
|
7
|
+
} from "./index-652f3bs8.js";
|
|
8
8
|
import"./index-j4yvgfhr.js";
|
|
9
|
-
import"./index-
|
|
10
|
-
import"./index-
|
|
9
|
+
import"./index-pc42gxa5.js";
|
|
10
|
+
import"./index-zyjztrvc.js";
|
|
11
|
+
import"./index-b372rck5.js";
|
|
12
|
+
import"./index-f2arv0mv.js";
|
|
13
|
+
import"./index-mnhrqjjq.js";
|
|
11
14
|
import {
|
|
12
15
|
AkanCodeEnv,
|
|
13
16
|
akanCodePaths2
|
|
14
|
-
} from "./index-
|
|
17
|
+
} from "./index-xv3pvdw4.js";
|
|
15
18
|
import {
|
|
16
19
|
akanCodeDefaultModel2,
|
|
17
20
|
CodeAgentStreamPrinter2,
|
|
18
21
|
WorkspaceTrust
|
|
19
|
-
} from "./index-
|
|
22
|
+
} from "./index-7ssr7wq4.js";
|
|
23
|
+
import"./index-whvhsb5f.js";
|
|
20
24
|
|
|
21
25
|
// pkgs/@akanjs/cli/code/code.runner.ts
|
|
22
26
|
import { randomBytes } from "crypto";
|
|
@@ -78,7 +82,7 @@ class CodeRunner extends runner("code") {
|
|
|
78
82
|
async serve(options, listen) {
|
|
79
83
|
await import("./consoleToStderr-h5bryj94.js");
|
|
80
84
|
const [{ CodeAgent }, { CodeAgentRpcHost }, { CodeAgentRpcListener }] = await Promise.all([
|
|
81
|
-
import("./CodeAgent-
|
|
85
|
+
import("./CodeAgent-xdw73nbz.js"),
|
|
82
86
|
import("./CodeAgentRpcHost-6dzfkvsc.js"),
|
|
83
87
|
import("./CodeAgentRpcListener-tcwrdvst.js")
|
|
84
88
|
]);
|
|
@@ -112,8 +116,8 @@ class CodeRunner extends runner("code") {
|
|
|
112
116
|
}
|
|
113
117
|
async tui(options, seed) {
|
|
114
118
|
const [{ CodeAgent }, { CodeTui }] = await Promise.all([
|
|
115
|
-
import("./CodeAgent-
|
|
116
|
-
import("./CodeTui-
|
|
119
|
+
import("./CodeAgent-xdw73nbz.js"),
|
|
120
|
+
import("./CodeTui-0gewm71c.js")
|
|
117
121
|
]);
|
|
118
122
|
const start = await CodeRunner.#start(options, { hostAttached: false, interactive: true, ask: true });
|
|
119
123
|
const agentOptions = start.agent;
|
|
@@ -149,7 +153,7 @@ class CodeRunner extends runner("code") {
|
|
|
149
153
|
}
|
|
150
154
|
}
|
|
151
155
|
async run(prompt, options) {
|
|
152
|
-
const { CodeAgent } = await import("./CodeAgent-
|
|
156
|
+
const { CodeAgent } = await import("./CodeAgent-xdw73nbz.js");
|
|
153
157
|
const ask = !!process.stdin.isTTY && !!process.stderr.isTTY;
|
|
154
158
|
const start = await CodeRunner.#start(options, { hostAttached: false, interactive: false, ask });
|
|
155
159
|
for (const warning of start.warnings)
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import {
|
|
3
|
+
Workspace,
|
|
4
|
+
command
|
|
5
|
+
} from "./index-652f3bs8.js";
|
|
6
|
+
import"./index-j4yvgfhr.js";
|
|
7
|
+
import"./index-pc42gxa5.js";
|
|
8
|
+
import"./index-zyjztrvc.js";
|
|
9
|
+
import"./index-b372rck5.js";
|
|
10
|
+
import"./index-f2arv0mv.js";
|
|
11
|
+
import"./index-mnhrqjjq.js";
|
|
12
|
+
import"./index-1c2807kg.js";
|
|
13
|
+
import"./index-trffs83s.js";
|
|
14
|
+
import"./index-jdw9m5c4.js";
|
|
15
|
+
import"./index-1p81ecbz.js";
|
|
16
|
+
import"./index-qh81drde.js";
|
|
17
|
+
import"./index-j3fqs8rc.js";
|
|
18
|
+
import"./index-ymgsvhc5.js";
|
|
19
|
+
import"./index-2kh4xj3m.js";
|
|
20
|
+
import"./index-m9jj544v.js";
|
|
21
|
+
import"./index-zyb0ebm4.js";
|
|
22
|
+
import"./index-xs9a3ddt.js";
|
|
23
|
+
import"./index-2vn0m9z5.js";
|
|
24
|
+
import"./index-y2g0s9tn.js";
|
|
25
|
+
import"./index-dr1carpr.js";
|
|
26
|
+
import"./index-q8h4eg5y.js";
|
|
27
|
+
import"./index-1p9bxjmt.js";
|
|
28
|
+
import"./index-t4d0ckde.js";
|
|
29
|
+
import"./index-gtydr9qc.js";
|
|
30
|
+
import {
|
|
31
|
+
ContextScript
|
|
32
|
+
} from "./index-twjgmryg.js";
|
|
33
|
+
import"./index-whvhsb5f.js";
|
|
34
|
+
|
|
35
|
+
// pkgs/@akanjs/cli/context/context.command.ts
|
|
36
|
+
class ContextCommand extends command("context", [ContextScript], ({ public: target }) => ({
|
|
37
|
+
context: target({ desc: "Print agent-readable Akan workspace context", readOnly: true }).option("format", String, { desc: "output format", default: "markdown", enum: ["markdown", "json"] }).option("app", String, { desc: "app name to include", nullable: true }).option("module", String, { desc: "module name to include with abstract content", nullable: true }).with(Workspace).exec(async function(format, app, module, workspace) {
|
|
38
|
+
await this.contextScript.context(workspace, { format, app, module });
|
|
39
|
+
}),
|
|
40
|
+
doctor: target({ desc: "Report Akan workspace convention diagnostics", readOnly: true }).option("format", String, { desc: "output format", default: "text", enum: ["text", "json"] }).option("strict", Boolean, { desc: "treat recommended conventions as errors", default: false }).option("ios", Boolean, {
|
|
41
|
+
desc: "report iOS/native config diagnostics (placeholder bundle ids, etc.)",
|
|
42
|
+
default: false
|
|
43
|
+
}).with(Workspace).exec(async function(format, strict, ios, workspace) {
|
|
44
|
+
await this.contextScript.doctor(workspace, { format, strict, ios });
|
|
45
|
+
}),
|
|
46
|
+
mcpInstall: target({ desc: "Install the Akan MCP server config for Cursor, Claude Code, and Codex" }).arg("target", String, { desc: "cursor, claude, codex, or all", nullable: true }).option("force", Boolean, { desc: "overwrite an existing Akan MCP server entry", default: false }).option("mode", String, { desc: "MCP permission mode", default: "apply", enum: ["readonly", "plan", "apply"] }).with(Workspace).exec(async function(targetName, force, mode, workspace) {
|
|
47
|
+
await this.contextScript.mcpInstall(workspace, targetName, { force, mode });
|
|
48
|
+
}),
|
|
49
|
+
mcp: target({ desc: "Start the Akan MCP server over stdio", stdio: true, readOnly: ({ mode }) => mode !== "apply" }).option("mode", String, { desc: "MCP permission mode", default: "readonly", enum: ["readonly", "plan", "apply"] }).with(Workspace).exec(async function(mode, workspace) {
|
|
50
|
+
await this.contextScript.mcp(workspace, { mode });
|
|
51
|
+
}),
|
|
52
|
+
mcpCall: target({
|
|
53
|
+
desc: "Call one Akan MCP tool for debugging without stdio JSON-RPC",
|
|
54
|
+
readOnly: ({ mode }) => mode !== "apply"
|
|
55
|
+
}).arg("tool", String, { desc: "MCP tool name" }).option("mode", String, { desc: "MCP permission mode", default: "readonly", enum: ["readonly", "plan", "apply"] }).option("args", String, { desc: "JSON object to pass as MCP tool arguments", nullable: true }).option("format", String, { desc: "output format", default: "json", enum: ["json"] }).with(Workspace).exec(async function(tool, mode, args, format, workspace) {
|
|
56
|
+
await this.contextScript.mcpCall(workspace, tool, { mode, args, format });
|
|
57
|
+
})
|
|
58
|
+
})) {
|
|
59
|
+
}
|
|
60
|
+
export {
|
|
61
|
+
ContextCommand
|
|
62
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
import {
|
|
3
|
+
ContextRunner2
|
|
4
|
+
} from "./index-qh81drde.js";
|
|
5
|
+
import"./index-gtydr9qc.js";
|
|
6
|
+
import"./index-1p9bxjmt.js";
|
|
7
|
+
import"./index-q8h4eg5y.js";
|
|
8
|
+
import"./index-2vn0m9z5.js";
|
|
9
|
+
import"./index-dr1carpr.js";
|
|
10
|
+
import"./index-y2g0s9tn.js";
|
|
11
|
+
import"./index-t4d0ckde.js";
|
|
12
|
+
import"./index-jdw9m5c4.js";
|
|
13
|
+
import"./index-1c2807kg.js";
|
|
14
|
+
import"./index-j3fqs8rc.js";
|
|
15
|
+
import"./index-2kh4xj3m.js";
|
|
16
|
+
import"./index-ymgsvhc5.js";
|
|
17
|
+
import"./index-m9jj544v.js";
|
|
18
|
+
import"./index-652f3bs8.js";
|
|
19
|
+
import"./index-xs9a3ddt.js";
|
|
20
|
+
import"./index-zyb0ebm4.js";
|
|
21
|
+
import"./index-trffs83s.js";
|
|
22
|
+
import"./index-whvhsb5f.js";
|
|
23
|
+
import"./index-f2arv0mv.js";
|
|
24
|
+
import"./index-mnhrqjjq.js";
|
|
25
|
+
import"./index-pc42gxa5.js";
|
|
26
|
+
import"./index-b372rck5.js";
|
|
27
|
+
import"./index-j4yvgfhr.js";
|
|
28
|
+
import"./index-1p81ecbz.js";
|
|
29
|
+
import"./index-zyjztrvc.js";
|
|
30
|
+
export {
|
|
31
|
+
ContextRunner2 as ContextRunner
|
|
32
|
+
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
FileSys2
|
|
4
|
-
} from "./index-
|
|
4
|
+
} from "./index-zyjztrvc.js";
|
|
5
5
|
|
|
6
|
-
// pkgs/@akanjs/devkit/dependencyScanner.ts
|
|
6
|
+
// pkgs/@akanjs/devkit/workspace/dependencyScanner.ts
|
|
7
7
|
import { builtinModules } from "module";
|
|
8
8
|
import * as path from "path";
|
|
9
9
|
import ignore from "ignore";
|
|
@@ -17,7 +17,7 @@ var isSkippedPath = (filePath) => {
|
|
|
17
17
|
var builtinModuleSet = new Set([...builtinModules, ...builtinModules.map((mod) => `node:${mod}`)]);
|
|
18
18
|
var stripShebang = (source) => source.replace(/^#!.*(?:\r?\n|$)/, "");
|
|
19
19
|
|
|
20
|
-
class
|
|
20
|
+
class TypeScriptDependencyScanner {
|
|
21
21
|
#fileDependencies = new Map;
|
|
22
22
|
#fileRuntimeDependencies = new Map;
|
|
23
23
|
#fileTypeDependencies = new Map;
|
|
@@ -255,7 +255,7 @@ ${externalImports.map((imp) => ` \u2192 ${imp}
|
|
|
255
255
|
exec.workspace.getPackageJson(),
|
|
256
256
|
exec.workspace.getGitignorePatterns()
|
|
257
257
|
]);
|
|
258
|
-
return new
|
|
258
|
+
return new TypeScriptDependencyScanner(exec.cwdPath, {
|
|
259
259
|
workspaceRoot: exec.workspace.cwdPath,
|
|
260
260
|
tsconfig,
|
|
261
261
|
rootPackageJson,
|
|
@@ -263,5 +263,6 @@ ${externalImports.map((imp) => ` \u2192 ${imp}
|
|
|
263
263
|
});
|
|
264
264
|
}
|
|
265
265
|
}
|
|
266
|
-
|
|
267
|
-
|
|
266
|
+
export {
|
|
267
|
+
TypeScriptDependencyScanner
|
|
268
|
+
};
|
|
@@ -2,13 +2,17 @@
|
|
|
2
2
|
import {
|
|
3
3
|
script,
|
|
4
4
|
command
|
|
5
|
-
} from "./index-
|
|
5
|
+
} from "./index-652f3bs8.js";
|
|
6
6
|
import"./index-j4yvgfhr.js";
|
|
7
|
-
import"./index-
|
|
8
|
-
import"./index-
|
|
7
|
+
import"./index-pc42gxa5.js";
|
|
8
|
+
import"./index-zyjztrvc.js";
|
|
9
|
+
import"./index-b372rck5.js";
|
|
10
|
+
import"./index-f2arv0mv.js";
|
|
11
|
+
import"./index-mnhrqjjq.js";
|
|
9
12
|
import {
|
|
10
13
|
Prompter2
|
|
11
|
-
} from "./index-
|
|
14
|
+
} from "./index-j3fqs8rc.js";
|
|
15
|
+
import"./index-whvhsb5f.js";
|
|
12
16
|
|
|
13
17
|
// pkgs/@akanjs/cli/guideline/guideline.script.ts
|
|
14
18
|
import { Logger } from "akanjs/common";
|
|
@@ -33,7 +37,7 @@ class GuidelineScript extends script("guideline") {
|
|
|
33
37
|
|
|
34
38
|
// pkgs/@akanjs/cli/guideline/guideline.command.ts
|
|
35
39
|
class GuidelineCommand extends command("guideline", [GuidelineScript], ({ public: target }) => ({
|
|
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) {
|
|
40
|
+
guideline: target({ desc: "List or show Akan AI guideline instructions", readOnly: true }).arg("action", String, { desc: "list or show" }).arg("name", String, { desc: "guideline name for show", nullable: true }).exec(async function(action, name) {
|
|
37
41
|
await this.guidelineScript.guideline(action, name);
|
|
38
42
|
})
|
|
39
43
|
})) {
|
|
@@ -60,11 +60,18 @@ pages declaring one name never clash, and a registry kept outside the surface re
|
|
|
60
60
|
and under every menu and modal — `launcherClassName` / `panelClassName` reach one surface each where
|
|
61
61
|
`className` reaches both, `intro`
|
|
62
62
|
replaces the empty-state line — where starter questions go — and `header` adds controls beside the built-in
|
|
63
|
-
clear and close. `
|
|
64
|
-
|
|
63
|
+
clear and close. `title` takes a node (a mark before the name); give `label` then, as the panel's accessible
|
|
64
|
+
name. The header's parts carry `data-slot="agent-header"`, `"agent-title"` and `"agent-running"`, so
|
|
65
|
+
`panelClassName="[&_[data-slot=agent-running]]:bg-accent"` restyles one without leaning on the markup. A modal,
|
|
66
|
+
menu or popconfirm opened from inside the floating panel, `header` included, stacks above the panel, while
|
|
67
|
+
one the page opens stays under it. While the turn waits on an approval, card or question, a scrim the panel
|
|
68
|
+
opened sinks under the panel so the answer stays reachable, and it comes back once answered. A question
|
|
69
|
+
arriving leaves focus in an overlay the person is typing in, and Escape in the composer closes a modal the panel
|
|
70
|
+
or a card opened through the modal's own close, `confirmClose` included, before it closes the panel. `chrome={false}` drops the header bar whole, for an `inline` chat inside a
|
|
71
|
+
panel the app already titles, and `defaultDraft` opens the composer with text in it without sending it. A panel driven by a
|
|
65
72
|
controlled `open` with **no** `onOpenChange` draws no close button at all rather than an inert one. Then the
|
|
66
73
|
slots: `AgentLauncher`, `AgentSteps`, `AgentBubble`, `AgentComposer`, `AgentApproval`,
|
|
67
|
-
`AgentQuestion`, `AgentToolCard`, `AgentQueued`, `AgentMenu`, `AgentMarkdown` and `AgentCode` each replace one part in `_overrides.tsx`, and
|
|
74
|
+
`AgentQuestion`, `AgentToolCard`, `AgentToolRow`, `AgentQueued`, `AgentMenu`, `AgentMarkdown` and `AgentCode` each replace one part in `_overrides.tsx`, and
|
|
68
75
|
`akanjs/ui` exports every default beside them (`DefaultBubble`, `DefaultComposer`, …) so a skin composes the
|
|
69
76
|
one it is replacing. **`AgentSteps` is one agent turn** — the messages between the user message that opened it
|
|
70
77
|
and the next one, with `isRunning` saying whether more are still coming — which is the grain a chat needs to
|
|
@@ -121,9 +128,10 @@ pages declaring one name never clash, and a registry kept outside the surface re
|
|
|
121
128
|
carries `{ provider, status }`, the hostname and the HTTP status; the provider's own sentence goes to the server
|
|
122
129
|
log only, because it can quote an account id or part of a key and `Err` data reaches the browser.
|
|
123
130
|
`LlmOverflow.refusal(host, status, reason)` builds it, and reads the one refusal a chat can undo — a prompt past
|
|
124
|
-
the window, recognized from each provider's own sentence — as `agent.error.contextOverflow` with the `limit`
|
|
125
|
-
named, which the relay flags so the chat compacts and asks again. An adaptor an app wrote throws through the same function, so its refusals
|
|
126
|
-
translate and recover the way the shipped ones do without a key in the framework's dictionary it cannot add.
|
|
131
|
+
the window, recognized from each provider's own sentence — as `agent.error.contextOverflow` with the `limit` and
|
|
132
|
+
`requested` it named, which the relay flags so the chat compacts and asks again. An adaptor an app wrote throws through the same function, so its refusals
|
|
133
|
+
translate and recover the way the shipped ones do without a key in the framework's dictionary it cannot add. An
|
|
134
|
+
adaptor's own size cap throws that error with `{ limit, requested }` in its own unit, bytes included.
|
|
127
135
|
- **`accepts` is answered per model, through `option.setLlm({ accepts })`.** An adaptor answers for an API and one
|
|
128
136
|
API serves models that differ, so the override rides beside the `model` it is a fact about. It is not a table
|
|
129
137
|
the framework keeps: a table is a claim about models that ship after it, and getting this wrong is the worst
|
|
@@ -598,8 +606,8 @@ pages declaring one name never clash, and a registry kept outside the surface re
|
|
|
598
606
|
`window − answer ceiling (8,192 when unreported) − compact.buffer (13,000, the margin Claude Code leaves)` —
|
|
599
607
|
measured by the provider's own count of the last turn (`done.usage`, kept on that assistant message) plus the
|
|
600
608
|
four-character estimate for what arrived since, so a Korean transcript the character rule reads as small is
|
|
601
|
-
still caught. The window comes from `option.setLlm({ contextWindow })` or from
|
|
602
|
-
with neither, only the ceiling runs. **A refusal for length is answered once**: a relay flags it `overflow` on
|
|
609
|
+
still caught. The window comes from `option.setLlm({ contextWindow })` or from a refusal that names it, scaled by
|
|
610
|
+
its `limit / requested` to this estimate when it gives both; with neither, only the ceiling runs. **A refusal for length is answered once**: a relay flags it `overflow` on
|
|
603
611
|
the wire, and the session compacts and sends the same turn again, and a second refusal in the same send fails
|
|
604
612
|
with `agent.error.contextOverflow`. Either way the history above the last `keep` messages
|
|
605
613
|
becomes one message standing in for it, flagged `summary` on the wire — `<Agent.Chat compact={{ at, keep, buffer }} />`
|
|
@@ -637,6 +645,12 @@ pages declaring one name never clash, and a registry kept outside the surface re
|
|
|
637
645
|
- **A turn that failed says so on the wire.** `error` is a field only this wire has, so a provider mapping reads
|
|
638
646
|
`text` and drops it; `AgentService.explained` folds it into the text before any adaptor sees it, because an
|
|
639
647
|
assistant turn that says nothing is one the model repeats.
|
|
648
|
+
- **A failed turn keeps its code for the host.** The relay's `error` event carries `code`: the `Err`'s key, else
|
|
649
|
+
an `AkanError`'s own code when its JSON carries it, else the status's name, so a custom `toJSON()` keeps `code`
|
|
650
|
+
in what it returns or the failure reads as its status. It is one code whether the failure is answered before the
|
|
651
|
+
stream opens or inside it, a 5xx included. A refusal (401/403) is named by its status alone, unless the server
|
|
652
|
+
kept it under its own code. The chat keeps it on that assistant message as `errorCode` after translating the
|
|
653
|
+
text, so a host branches on `message.errorCode`, never on the sentence. It is never sent back to the relay.
|
|
640
654
|
- **↑ and ↓ in the composer walk what was sent**, seeded from the transcript so a persisted chat does not lose
|
|
641
655
|
only what was just typed. A single-line input has nothing of its own on the vertical arrows, and the
|
|
642
656
|
half-written draft they were walked away from comes back at the bottom of the walk. **The `/` menu takes those
|
|
@@ -780,7 +794,9 @@ pages declaring one name never clash, and a registry kept outside the surface re
|
|
|
780
794
|
keeps a free-text row either way, because the model wrote the options and only the user knows whether the answer
|
|
781
795
|
is among them. The loop parks on the question exactly as it parks on an approval, a dismissal is the tool's
|
|
782
796
|
error result rather than a silent empty answer, and the settled exchange renders as question-and-answer instead
|
|
783
|
-
of a tool row.
|
|
797
|
+
of a tool row. A restored transcript that ends on an unanswered `askUser` — a server run that parked on it while
|
|
798
|
+
no chat was open, or a reload mid-question — opens on that question, and settling it runs the turn on through the
|
|
799
|
+
runner; a turn started first closes it as unanswered instead. **Never re-implement it per screen** — a `st.tool("askAboutX")` that opens a modal is the same
|
|
784
800
|
thing with a worse transcript — and a hook tool named `askUser` shadows it like any other built-in. The line
|
|
785
801
|
between it and a `.card()` tool is what the answer *is*: a sentence or a pick off a list is `askUser` and belongs
|
|
786
802
|
to the conversation, while a shape the model must not invent — fields, a form, a signature — is a card the screen
|
|
@@ -112,7 +112,7 @@ Shared by `page()`, `layout()` and `rootLayout()`:
|
|
|
112
112
|
.render(render: (args: RouteBaseArgs) => PromiseOrObject<ReactNode>)
|
|
113
113
|
.config(config: PageConfig)
|
|
114
114
|
.head(head: HeadStage<RouteBaseArgs>)
|
|
115
|
-
.guard(guard: (args: RouteBaseArgs) => void | Promise<void>)
|
|
115
|
+
.guard(guard: (args: RouteBaseArgs, request: RouteGuardRequest) => void | Promise<void>)
|
|
116
116
|
.loading(render: (args: RouteBaseArgs) => PromiseOrObject<ReactNode>)
|
|
117
117
|
```
|
|
118
118
|
|
|
@@ -120,7 +120,7 @@ Only on `page()`:
|
|
|
120
120
|
|
|
121
121
|
```ts
|
|
122
122
|
.prompt(name: string, description: string)
|
|
123
|
-
.app<Name extends string>(name: Name & FreeName<Name, Record<never, never>>, description: string, load: (args: RouteBaseArgs) => PromiseOrObject<ReactNode
|
|
123
|
+
.app<Name extends string>(name: Name & FreeName<Name, Record<never, never>>, description: string, load: (args: RouteBaseArgs) => PromiseOrObject<ReactNode>, option?: { static?: boolean; })
|
|
124
124
|
```
|
|
125
125
|
|
|
126
126
|
On `layout()` and `rootLayout()`, where a line replaces its shared form above:
|
|
@@ -235,8 +235,10 @@ globalPrefix?: false;
|
|
|
235
235
|
/** HTTP verb of a `mutation`, `POST` unless named; every other endpoint type ignores it. */
|
|
236
236
|
method?: HttpMutationMethod;
|
|
237
237
|
fileUpload?: boolean;
|
|
238
|
-
/** `false` keeps it out of the MCP catalogue (default `true`); curation, not authorization — HTTP still serves it. */
|
|
239
|
-
mcp?:
|
|
238
|
+
/** `false` keeps it out of the MCP catalogue (default `true`), and `"agent"` keeps it off `/mcp` while the in-process agent (`AgentToolsRole`, `agentService.loop`) still lists it; curation, not authorization — HTTP still serves it. */
|
|
239
|
+
mcp?: McpShelf;
|
|
240
|
+
/** Overrides what the key implies for a `mutation`'s MCP `destructiveHint`: `true` for one no verb gives away, such as `archiveOrder`, `false` for a `drop…` that loses nothing. */
|
|
241
|
+
destructive?: boolean;
|
|
240
242
|
/** The errors this endpoint throws on purpose, by status. */
|
|
241
243
|
errors?: EndpointErrors;
|
|
242
244
|
/** A slow subscriber of a `pubsub(Binary)`: `"coalesce"` (default) keeps only the newest frame per room, `"queue"` delivers every frame and grows the send buffer with the slowest subscriber. */
|