@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
|
@@ -8,7 +8,7 @@ export default function getContent(scanInfo: AppInfo | LibInfo | null, dict: { a
|
|
|
8
8
|
/** Sugared gummy button with the same variants as akanjs's \`buttonRecipe\`; \`page/_overrides.tsx\` binds it to every akanjs/ui Button. ghost/outline/link stay surfaceless. */
|
|
9
9
|
export const jellyButtonRecipe = recipe(
|
|
10
10
|
tv({
|
|
11
|
-
base: "squish inline-flex cursor-pointer items-center justify-center gap-2 whitespace-nowrap rounded-full font-bold focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",
|
|
11
|
+
base: "squish inline-flex cursor-pointer items-center justify-center gap-2 whitespace-nowrap rounded-full font-bold leading-auto focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",
|
|
12
12
|
variants: {
|
|
13
13
|
variant: {
|
|
14
14
|
default: "text-foreground",
|
package/templates/biomeForm.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { AppInfo, LibInfo } from "akanjs";
|
|
2
|
-
import { compareExportNames } from "
|
|
2
|
+
import { compareExportNames } from "akanjs/common";
|
|
3
3
|
|
|
4
4
|
export default function getContent(scanInfo: AppInfo | LibInfo | null, dict: { [key: string]: string } = {}) {
|
|
5
5
|
if (!scanInfo) return null;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { SysExecutor } from "@akanjs/devkit/executors";
|
|
2
2
|
import type { AppInfo, LibInfo } from "akanjs";
|
|
3
|
+
import { facetBarrelOf } from "akanjs/common";
|
|
3
4
|
|
|
4
5
|
interface Dict {
|
|
5
6
|
[key: string]: string;
|
|
@@ -10,47 +11,11 @@ interface Options {
|
|
|
10
11
|
facet?: string;
|
|
11
12
|
}
|
|
12
13
|
|
|
13
|
-
const sourceFilePattern = /\.(ts|tsx)$/;
|
|
14
|
-
const excludedFilePattern = /(^index\.tsx?$|\.d\.ts$|\.(test|spec)\.(ts|tsx)$|\.css$|\.scss$|\.sass$)/;
|
|
15
|
-
// `ui` exports PascalCase names only; `common`/`srvkit`/`webkit` export camelCase names only. Names with
|
|
16
|
-
// dots, underscores, or hyphens (e.g. `foo.helper`, `Globe_Dynamic`, `kebab-case`) match neither and are skipped.
|
|
17
|
-
const pascalCasePattern = /^[A-Z][A-Za-z0-9]*$/;
|
|
18
|
-
const camelCasePattern = /^[a-z][A-Za-z0-9]*$/;
|
|
19
|
-
const nameCasePatternForFacet = (facet: string) => (facet === "ui" ? pascalCasePattern : camelCasePattern);
|
|
20
|
-
//? Biome's organizeImports order, or `akan lint` reorders the barrel: A < a < B < b, a digit before a letter, and a
|
|
21
|
-
//? run of digits compared by its length first. DevGeneratedIndexSync sorts the same way; the env template imports it.
|
|
22
|
-
const letterRankOf = (char: string) => char.toLowerCase().charCodeAt(0) * 2 + (char === char.toLowerCase() ? 1 : 0);
|
|
23
|
-
const digitRunAt = (name: string, idx: number) => /^\d+/.exec(name.slice(idx))?.[0] ?? "";
|
|
24
|
-
export const compareExportNames = (a: string, b: string) => {
|
|
25
|
-
for (let idx = 0; idx < a.length && idx < b.length; ) {
|
|
26
|
-
const [runA, runB] = [digitRunAt(a, idx), digitRunAt(b, idx)];
|
|
27
|
-
if (runA && runB && runA !== runB) return runA.length - runB.length || (runA < runB ? -1 : 1);
|
|
28
|
-
if (runA && runB) idx += runA.length;
|
|
29
|
-
else if (runA || runB) return runA ? -1 : 1;
|
|
30
|
-
else if (a.charAt(idx) !== b.charAt(idx)) return letterRankOf(a.charAt(idx)) - letterRankOf(b.charAt(idx));
|
|
31
|
-
else idx++;
|
|
32
|
-
}
|
|
33
|
-
return a.length - b.length;
|
|
34
|
-
};
|
|
35
|
-
|
|
36
14
|
export default async function getContent(scanInfo: AppInfo | LibInfo | null, dict: Dict = {}, options: Options = {}) {
|
|
37
15
|
const { exec, facet } = options;
|
|
38
16
|
if (!exec || !facet || !(await exec.exists(facet))) return null;
|
|
39
17
|
|
|
40
|
-
const nameCasePattern = nameCasePatternForFacet(facet);
|
|
41
18
|
const { files, dirs } = await exec.getFilesAndDirs(facet);
|
|
42
|
-
const
|
|
43
|
-
...files
|
|
44
|
-
.filter((filename) => sourceFilePattern.test(filename) && !excludedFilePattern.test(filename))
|
|
45
|
-
.map((filename) => filename.replace(sourceFilePattern, "")),
|
|
46
|
-
...dirs.filter((dirname) => !dirname.startsWith(".")),
|
|
47
|
-
]
|
|
48
|
-
.filter((name) => nameCasePattern.test(name))
|
|
49
|
-
.sort(compareExportNames);
|
|
50
|
-
|
|
51
|
-
//? Not null: a null result writes nothing, so a barrel still exporting a deleted file would outlive the file.
|
|
52
|
-
const content = exportNames.length
|
|
53
|
-
? `${exportNames.map((name) => `export * from "./${name}";`).join("\n")}\n`
|
|
54
|
-
: "export {};\n";
|
|
19
|
+
const content = facetBarrelOf(facet, files, dirs);
|
|
55
20
|
return { filename: "index.ts", content };
|
|
56
21
|
}
|
package/templates/lib/sig.ts
CHANGED
|
@@ -19,7 +19,6 @@ export default function getContent(scanInfo: AppInfo | LibInfo | null, dict: { [
|
|
|
19
19
|
return `
|
|
20
20
|
import { FetchClient, type FetchClientType } from "akanjs/fetch";
|
|
21
21
|
import { SignalRegistry, serverSignal${libs.length === 0 ? ", fetch as base" : ""} } from "akanjs/signal";
|
|
22
|
-
import { Err } from "./dict";
|
|
23
22
|
${libs.map((lib) => `import { fetch as ${lib} } from "@libs/${lib}/lib/sig";`).join("\n")}
|
|
24
23
|
|
|
25
24
|
${databaseModules.map((module) => `import * as ${module}Sig from "./${module}/${module}.signal";`).join("\n")}
|
|
@@ -37,9 +36,6 @@ ${serviceModules.map((module) => `export const ${module} = SignalRegistry.regist
|
|
|
37
36
|
export const fetchSignals = [${signalNames.join(", ")}] as const;
|
|
38
37
|
export type Fetch = FetchClientType<typeof fetchSignals>;
|
|
39
38
|
export const fetch = FetchClient.from(...fetchSignals) as unknown as Fetch;
|
|
40
|
-
// A failure restored from another process is this scope's own Err, so a server hop that rethrows one keeps its
|
|
41
|
-
// dictionary key and data instead of answering the original caller with Internal Server Error.
|
|
42
|
-
fetch.setErrorConstructor(Err);
|
|
43
39
|
|
|
44
40
|
export const getSerializedSignal = () => fetch.ownSerializedSignal
|
|
45
41
|
`;
|
|
@@ -18,7 +18,7 @@ ${
|
|
|
18
18
|
const dictionary = {};`
|
|
19
19
|
}
|
|
20
20
|
const pageProto = makePageProto<typeof dict>(dictionary);
|
|
21
|
-
const fetchProto = FetchClient.build<typeof signal>(cnst, getSerializedSignal()
|
|
21
|
+
const fetchProto = FetchClient.build<typeof signal>(cnst, getSerializedSignal());
|
|
22
22
|
export const runtime = registerClientRuntime({ ...pageProto, ...fetchProto }, { scope: ${JSON.stringify(scanInfo?.type ?? "lib")} });
|
|
23
23
|
|
|
24
24
|
export const { msg, Err, usePage, sig, fetch } = runtime;
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"remoteEnv": {
|
|
11
11
|
"PATH": "/home/vscode/.bun/bin:${containerEnv:PATH}"
|
|
12
12
|
},
|
|
13
|
-
"onCreateCommand": "export PATH=\"/home/vscode/.bun/bin:$PATH\" && bun add -g @akanjs/cli
|
|
13
|
+
"onCreateCommand": "export PATH=\"/home/vscode/.bun/bin:$PATH\" && v=\"$(bun -e \"const p=require('./package.json'),v=p.dependencies?.akanjs??p.devDependencies?.akanjs;if(!v){console.error('package.json lists no akanjs in dependencies or devDependencies');process.exit(1)}console.log(v)\")\" && bun add -g \"@akanjs/cli@$v\"",
|
|
14
14
|
"postCreateCommand": "bun install",
|
|
15
15
|
"forwardPorts": [8282, 8283, 8284, 8285, 8286, 8287, 8288, 8289, 8290],
|
|
16
16
|
"portsAttributes": {
|
|
@@ -7,7 +7,8 @@ the framework generate the repeated surfaces.
|
|
|
7
7
|
|
|
8
8
|
If you hit an Akan.js bug, or a fix that one framework change would solve more easily than app-level workarounds,
|
|
9
9
|
draft a GitHub issue for <https://github.com/akan-team/akanjs/issues> (version, repro, expected vs actual) and ask
|
|
10
|
-
the user before filing it.
|
|
10
|
+
the user before filing it, since an issue is public. Meanwhile finish the task with a small interim workaround marked
|
|
11
|
+
`// TODO: <issue url>`.
|
|
11
12
|
|
|
12
13
|
## Generated Context
|
|
13
14
|
|
|
@@ -21,13 +21,15 @@ and deployment artifacts with strict conventions.
|
|
|
21
21
|
|
|
22
22
|
## Quick Start
|
|
23
23
|
|
|
24
|
-
Install dependencies:
|
|
24
|
+
Install dependencies, and the \`akan\` CLI at the version of \`akanjs\` this workspace depends on:
|
|
25
25
|
|
|
26
26
|
\`\`\`bash
|
|
27
27
|
bun install
|
|
28
|
-
bun install -g @akanjs/cli
|
|
28
|
+
v="$(bun -e "const p=require('./package.json'),v=p.dependencies?.akanjs??p.devDependencies?.akanjs;if(!v){console.error('package.json lists no akanjs in dependencies or devDependencies');process.exit(1)}console.log(v)")" && bun install -g "@akanjs/cli@$v"
|
|
29
29
|
\`\`\`
|
|
30
30
|
|
|
31
|
+
A CLI of another major or minor version refuses to write to the workspace; run \`akan update\` to move both.
|
|
32
|
+
|
|
31
33
|
Start the app:
|
|
32
34
|
|
|
33
35
|
\`\`\`bash
|
|
@@ -4,26 +4,28 @@ 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-
|
|
9
|
+
import"./index-pc42gxa5.js";
|
|
10
|
+
import"./index-zyjztrvc.js";
|
|
10
11
|
import {
|
|
11
|
-
|
|
12
|
-
} from "./index-
|
|
12
|
+
AppExecutor2
|
|
13
|
+
} from "./index-b372rck5.js";
|
|
14
|
+
import"./index-f2arv0mv.js";
|
|
15
|
+
import"./index-mnhrqjjq.js";
|
|
13
16
|
import {
|
|
14
17
|
GlobalConfig,
|
|
15
18
|
CloudApi
|
|
16
|
-
} from "./index-
|
|
19
|
+
} from "./index-45aprybg.js";
|
|
17
20
|
import"./index-m9jj544v.js";
|
|
18
|
-
import"./index-
|
|
19
|
-
import"./index-nmvhjn8c.js";
|
|
20
|
-
import"./index-xvk2a75m.js";
|
|
21
|
+
import"./index-ymgsvhc5.js";
|
|
21
22
|
import {
|
|
22
23
|
TunnelShare2
|
|
23
|
-
} from "./index-
|
|
24
|
+
} from "./index-4a1n0nym.js";
|
|
24
25
|
import {
|
|
25
26
|
writeClipboard
|
|
26
27
|
} from "./index-p6pbz9n5.js";
|
|
28
|
+
import"./index-whvhsb5f.js";
|
|
27
29
|
|
|
28
30
|
// pkgs/@akanjs/cli/tunnel/tunnel.script.ts
|
|
29
31
|
import { select } from "@inquirer/prompts";
|
|
@@ -96,11 +98,11 @@ class TunnelScript extends script("tunnel", [TunnelRunner]) {
|
|
|
96
98
|
if (name && !appNames.includes(name))
|
|
97
99
|
throw new Error(`Unknown app: ${name}. Available: ${appNames.join(", ")}`);
|
|
98
100
|
if (name)
|
|
99
|
-
return
|
|
101
|
+
return AppExecutor2.from(workspace, name);
|
|
100
102
|
const only = appNames.length === 1 ? appNames[0] : null;
|
|
101
103
|
if (only)
|
|
102
|
-
return
|
|
103
|
-
return
|
|
104
|
+
return AppExecutor2.from(workspace, only);
|
|
105
|
+
return AppExecutor2.from(workspace, await select({ message: "Select the app to share", choices: appNames }));
|
|
104
106
|
}
|
|
105
107
|
async share(name, { workspace, host, port, ttl, devRoutes }) {
|
|
106
108
|
const app = await TunnelScript.resolveApp(workspace, name);
|
|
@@ -122,7 +124,7 @@ class TunnelScript extends script("tunnel", [TunnelRunner]) {
|
|
|
122
124
|
|
|
123
125
|
// pkgs/@akanjs/cli/tunnel/tunnel.command.ts
|
|
124
126
|
class TunnelCommand extends command("tunnel", [TunnelScript], ({ public: target }) => ({
|
|
125
|
-
tunnel: target({ desc: "Share a locally running app on a public URL" }).arg("app", String, { desc: "app to share", nullable: true }).option("list", Boolean, { desc: "list the shares this account is holding", default: false }).option("stop", String, { desc: "stop the share with this code", default: "" }).option("host", String, {
|
|
127
|
+
tunnel: target({ desc: "Share a locally running app on a public URL", readOnly: true }).arg("app", String, { desc: "app to share", nullable: true }).option("list", Boolean, { desc: "list the shares this account is holding", default: false }).option("stop", String, { desc: "stop the share with this code", default: "" }).option("host", String, {
|
|
126
128
|
desc: "host of the cloud (default: cloud.host of the root akan.config.ts, else Akan Cloud)",
|
|
127
129
|
nullable: true
|
|
128
130
|
}).option("port", Number, { desc: "local port to share (default: the app's dev port)", nullable: true }).option("ttl", Number, { desc: "minutes before the share expires", nullable: true }).option("devRoutes", Boolean, {
|
package/typecheck.proc.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
TypeChecker2
|
|
4
|
-
} from "./index-
|
|
4
|
+
} from "./index-c669pbyb.js";
|
|
5
5
|
import {
|
|
6
6
|
TypecheckFailure
|
|
7
7
|
} from "./index-j4yvgfhr.js";
|
|
@@ -28,7 +28,8 @@ try {
|
|
|
28
28
|
const configPath = process.env.AKAN_TYPECHECK_TSCONFIG;
|
|
29
29
|
if (!configPath)
|
|
30
30
|
throw new Error("AKAN_TYPECHECK_TSCONFIG is required");
|
|
31
|
-
const
|
|
31
|
+
const tsBuildInfoFile = process.env.AKAN_TYPECHECK_BUILDINFO;
|
|
32
|
+
const result = TypeChecker2.checkProject(configPath, tsBuildInfoFile ? { noEmit: true, incremental: true, tsBuildInfoFile } : {});
|
|
32
33
|
if (process.env.AKAN_TYPECHECK_FORMAT === "json") {
|
|
33
34
|
const root = process.env.AKAN_TYPECHECK_ROOT ?? process.cwd();
|
|
34
35
|
process.stdout.write(JSON.stringify(TypeChecker2.toRecords(result.errors, root)));
|
|
@@ -4,37 +4,39 @@ import {
|
|
|
4
4
|
script,
|
|
5
5
|
markCliErrorPrinted,
|
|
6
6
|
command
|
|
7
|
-
} from "./index-
|
|
7
|
+
} from "./index-652f3bs8.js";
|
|
8
8
|
import {
|
|
9
9
|
CliError
|
|
10
10
|
} from "./index-j4yvgfhr.js";
|
|
11
|
-
import"./index-
|
|
12
|
-
import"./index-
|
|
11
|
+
import"./index-pc42gxa5.js";
|
|
12
|
+
import"./index-zyjztrvc.js";
|
|
13
|
+
import"./index-b372rck5.js";
|
|
14
|
+
import"./index-f2arv0mv.js";
|
|
15
|
+
import"./index-mnhrqjjq.js";
|
|
13
16
|
import {
|
|
14
17
|
ApplicationRunner,
|
|
15
18
|
VerifyScope
|
|
16
|
-
} from "./index-
|
|
17
|
-
import"./index-
|
|
18
|
-
import"./index-
|
|
19
|
-
import"./index-
|
|
19
|
+
} from "./index-d0n78fzc.js";
|
|
20
|
+
import"./index-6j351de4.js";
|
|
21
|
+
import"./index-ymgsvhc5.js";
|
|
22
|
+
import"./index-2kh4xj3m.js";
|
|
20
23
|
import"./index-m9jj544v.js";
|
|
21
|
-
import"./index-
|
|
22
|
-
import"./index-xvk2a75m.js";
|
|
24
|
+
import"./index-1p81ecbz.js";
|
|
23
25
|
import"./index-62md4dwy.js";
|
|
26
|
+
import"./index-zyb0ebm4.js";
|
|
24
27
|
import {
|
|
25
28
|
WorkspaceRunner
|
|
26
|
-
} from "./index-
|
|
27
|
-
import"./index-
|
|
28
|
-
import"./index-
|
|
29
|
-
import"./index-
|
|
30
|
-
import"./index-hj6w4ka1.js";
|
|
31
|
-
import"./index-ny2k80mv.js";
|
|
29
|
+
} from "./index-cm9rb480.js";
|
|
30
|
+
import"./index-ktxdfqg5.js";
|
|
31
|
+
import"./index-trffs83s.js";
|
|
32
|
+
import"./index-jf4vk1s0.js";
|
|
32
33
|
import"./index-t4d0ckde.js";
|
|
33
34
|
import {
|
|
34
35
|
VerifyPipeline,
|
|
35
36
|
VerifyReport
|
|
36
|
-
} from "./index-
|
|
37
|
-
import"./index-
|
|
37
|
+
} from "./index-4zgm54wf.js";
|
|
38
|
+
import"./index-9rymt8d6.js";
|
|
39
|
+
import"./index-whvhsb5f.js";
|
|
38
40
|
|
|
39
41
|
// pkgs/@akanjs/cli/verify/verify.script.ts
|
|
40
42
|
import path from "path";
|
|
@@ -3,29 +3,33 @@ import {
|
|
|
3
3
|
Workspace,
|
|
4
4
|
script,
|
|
5
5
|
command
|
|
6
|
-
} from "./index-
|
|
6
|
+
} from "./index-652f3bs8.js";
|
|
7
7
|
import"./index-j4yvgfhr.js";
|
|
8
|
-
import"./index-
|
|
9
|
-
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";
|
|
10
13
|
import {
|
|
11
14
|
jsonText,
|
|
12
15
|
workflowStatus,
|
|
13
16
|
renderWorkflowPlan,
|
|
14
17
|
renderWorkflowApply,
|
|
15
18
|
renderWorkflowValidation
|
|
16
|
-
} from "./index-
|
|
17
|
-
import"./index-
|
|
18
|
-
import"./index-
|
|
19
|
-
import"./index-
|
|
20
|
-
import"./index-
|
|
21
|
-
import"./index-
|
|
22
|
-
import"./index-
|
|
23
|
-
import"./index-
|
|
24
|
-
import"./index-
|
|
19
|
+
} from "./index-1c2807kg.js";
|
|
20
|
+
import"./index-trffs83s.js";
|
|
21
|
+
import"./index-jdw9m5c4.js";
|
|
22
|
+
import"./index-1p81ecbz.js";
|
|
23
|
+
import"./index-y2g0s9tn.js";
|
|
24
|
+
import"./index-dr1carpr.js";
|
|
25
|
+
import"./index-q8h4eg5y.js";
|
|
26
|
+
import"./index-2vn0m9z5.js";
|
|
27
|
+
import"./index-1p9bxjmt.js";
|
|
25
28
|
import"./index-t4d0ckde.js";
|
|
26
29
|
import {
|
|
27
30
|
WorkflowRunner
|
|
28
|
-
} from "./index-
|
|
31
|
+
} from "./index-gtydr9qc.js";
|
|
32
|
+
import"./index-whvhsb5f.js";
|
|
29
33
|
|
|
30
34
|
// pkgs/@akanjs/cli/workflow/workflow.script.ts
|
|
31
35
|
import { Logger } from "akanjs/common";
|
|
@@ -97,7 +101,10 @@ class WorkflowScript extends script("workflow", [WorkflowRunner]) {
|
|
|
97
101
|
|
|
98
102
|
// pkgs/@akanjs/cli/workflow/workflow.command.ts
|
|
99
103
|
class WorkflowCommand extends command("workflow", [WorkflowScript], ({ public: target }) => ({
|
|
100
|
-
workflow: target({
|
|
104
|
+
workflow: target({
|
|
105
|
+
desc: "List, explain, plan, apply, validate, or report Akan workflows",
|
|
106
|
+
readOnly: ({ action, dryRun }) => action !== "apply" || dryRun === true
|
|
107
|
+
}).arg("action", String, {
|
|
101
108
|
desc: "list, explain, plan, apply, validate, or report",
|
|
102
109
|
enum: ["list", "explain", "plan", "apply", "validate", "report"]
|
|
103
110
|
}).arg("workflow", String, { desc: "workflow name, plan path, or run id", nullable: true }).with(Workspace).option("format", String, { desc: "output format", flag: "o", default: "markdown", enum: ["markdown", "json"] }).option("out", String, { flag: "w", desc: "write workflow plan JSON to this path", nullable: true }).option("dryRun", Boolean, { flag: "r", desc: "show predicted apply report without writing files", default: false }).option("app", String, { desc: "target app or library name", nullable: true }).option("module", String, { desc: "target module name", nullable: true }).option("field", String, { desc: "field name", nullable: true }).option("type", String, { desc: "field type or scalar name", nullable: true }).option("values", String, { flag: "l", desc: "comma-separated values", nullable: true }).option("default", String, { desc: "default value", nullable: true }).option("scalar", String, { flag: "c", desc: "scalar name", nullable: true }).option("surface", String, { flag: "u", desc: "UI surface name", nullable: true }).option("surfaces", String, {
|
|
@@ -4,76 +4,78 @@ import {
|
|
|
4
4
|
Workspace,
|
|
5
5
|
script,
|
|
6
6
|
command
|
|
7
|
-
} from "./index-
|
|
7
|
+
} from "./index-652f3bs8.js";
|
|
8
8
|
import"./index-j4yvgfhr.js";
|
|
9
|
-
import"./index-
|
|
9
|
+
import"./index-pc42gxa5.js";
|
|
10
|
+
import"./index-zyjztrvc.js";
|
|
10
11
|
import {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
AppExecutor2
|
|
13
|
+
} from "./index-b372rck5.js";
|
|
14
|
+
import {
|
|
15
|
+
LibExecutor2
|
|
16
|
+
} from "./index-f2arv0mv.js";
|
|
17
|
+
import {
|
|
18
|
+
PkgExecutor2
|
|
19
|
+
} from "./index-mnhrqjjq.js";
|
|
15
20
|
import {
|
|
16
21
|
npmRegistryFromEnv,
|
|
17
22
|
warnIgnoredNpmRegistry
|
|
18
|
-
} from "./index-
|
|
23
|
+
} from "./index-jf4vk1s0.js";
|
|
24
|
+
import"./index-1p81ecbz.js";
|
|
19
25
|
import"./index-62md4dwy.js";
|
|
26
|
+
import"./index-zyb0ebm4.js";
|
|
20
27
|
import {
|
|
21
28
|
defaultMaxDiagnostics,
|
|
22
29
|
WorkspaceRunner
|
|
23
|
-
} from "./index-
|
|
24
|
-
import"./index-
|
|
25
|
-
import"./index-
|
|
26
|
-
import"./index-9p260r4e.js";
|
|
27
|
-
import"./index-hj6w4ka1.js";
|
|
30
|
+
} from "./index-cm9rb480.js";
|
|
31
|
+
import"./index-ktxdfqg5.js";
|
|
32
|
+
import"./index-trffs83s.js";
|
|
28
33
|
import"./index-t4d0ckde.js";
|
|
29
|
-
import"./index-
|
|
30
|
-
import"./index-
|
|
31
|
-
import"./index-
|
|
32
|
-
import"./index-
|
|
33
|
-
import"./index-
|
|
34
|
-
import"./index-
|
|
35
|
-
import"./index-
|
|
36
|
-
import"./index-
|
|
34
|
+
import"./index-1c2807kg.js";
|
|
35
|
+
import"./index-jdw9m5c4.js";
|
|
36
|
+
import"./index-xv3pvdw4.js";
|
|
37
|
+
import"./index-j3fqs8rc.js";
|
|
38
|
+
import"./index-d0n78fzc.js";
|
|
39
|
+
import"./index-6j351de4.js";
|
|
40
|
+
import"./index-ymgsvhc5.js";
|
|
41
|
+
import"./index-2kh4xj3m.js";
|
|
37
42
|
import"./index-m9jj544v.js";
|
|
38
|
-
import"./index-
|
|
39
|
-
import"./index-xvk2a75m.js";
|
|
40
|
-
import"./index-ra9fvn7s.js";
|
|
43
|
+
import"./index-4zgm54wf.js";
|
|
41
44
|
import {
|
|
42
45
|
AgentScript
|
|
43
|
-
} from "./index-
|
|
46
|
+
} from "./index-6gepp8yn.js";
|
|
44
47
|
import {
|
|
45
48
|
LibraryScript
|
|
46
|
-
} from "./index-
|
|
47
|
-
import"./index-
|
|
49
|
+
} from "./index-0csk6jqm.js";
|
|
50
|
+
import"./index-rwgqba9p.js";
|
|
48
51
|
import {
|
|
49
52
|
ApplicationScript
|
|
50
|
-
} from "./index-
|
|
51
|
-
import"./index-
|
|
52
|
-
import"./index-qd7xn2bk.js";
|
|
53
|
-
import"./index-cmg5ngqa.js";
|
|
53
|
+
} from "./index-b0t92k71.js";
|
|
54
|
+
import"./index-45aprybg.js";
|
|
54
55
|
import {
|
|
55
56
|
PackageScript
|
|
56
|
-
} from "./index-
|
|
57
|
-
import"./index-
|
|
57
|
+
} from "./index-ankyx6dj.js";
|
|
58
|
+
import"./index-3569fr49.js";
|
|
58
59
|
import {
|
|
59
60
|
CloudScript2
|
|
60
|
-
} from "./index-
|
|
61
|
-
import"./index-
|
|
62
|
-
import"./index-
|
|
63
|
-
import"./index-
|
|
64
|
-
import"./index-
|
|
65
|
-
import"./index-
|
|
66
|
-
import"./index-
|
|
67
|
-
import"./index-
|
|
68
|
-
import"./index-
|
|
61
|
+
} from "./index-82cmbpxc.js";
|
|
62
|
+
import"./index-qh81drde.js";
|
|
63
|
+
import"./index-xs9a3ddt.js";
|
|
64
|
+
import"./index-2vn0m9z5.js";
|
|
65
|
+
import"./index-y2g0s9tn.js";
|
|
66
|
+
import"./index-dr1carpr.js";
|
|
67
|
+
import"./index-q8h4eg5y.js";
|
|
68
|
+
import"./index-1p9bxjmt.js";
|
|
69
|
+
import"./index-gtydr9qc.js";
|
|
69
70
|
import {
|
|
70
71
|
ContextScript
|
|
71
|
-
} from "./index-
|
|
72
|
-
import"./index-
|
|
72
|
+
} from "./index-twjgmryg.js";
|
|
73
|
+
import"./index-9rymt8d6.js";
|
|
73
74
|
import {
|
|
74
75
|
assertPlainName
|
|
75
76
|
} from "./index-va90m8nd.js";
|
|
76
77
|
import"./index-9bv479q5.js";
|
|
78
|
+
import"./index-whvhsb5f.js";
|
|
77
79
|
|
|
78
80
|
// pkgs/@akanjs/cli/workspace/workspace.command.ts
|
|
79
81
|
import path from "path";
|
|
@@ -166,9 +168,9 @@ class WorkspaceScript extends script("workspace", [
|
|
|
166
168
|
AKAN_MACHINE_PUBLIC_KEY=${publicKey}`);
|
|
167
169
|
}
|
|
168
170
|
async lint(exec, workspace, { fix = true, maxDiagnostics } = {}) {
|
|
169
|
-
if (exec instanceof
|
|
171
|
+
if (exec instanceof AppExecutor2)
|
|
170
172
|
await this.applicationScript.sync(exec);
|
|
171
|
-
else if (exec instanceof
|
|
173
|
+
else if (exec instanceof LibExecutor2)
|
|
172
174
|
await this.libraryScript.syncLibrary(exec);
|
|
173
175
|
const spinner = workspace.spinning(`Linting${fix ? " with fix" : ""}...`);
|
|
174
176
|
try {
|
|
@@ -182,20 +184,20 @@ AKAN_MACHINE_PUBLIC_KEY=${publicKey}`);
|
|
|
182
184
|
async lintAll(workspace, { fix = true, maxDiagnostics } = {}) {
|
|
183
185
|
const [appNames, libNames, pkgNames] = await workspace.getExecs();
|
|
184
186
|
const options = { fix, maxDiagnostics };
|
|
185
|
-
await Promise.all(appNames.map((appName) => this.applicationScript.sync(
|
|
186
|
-
await Promise.all(libNames.map((libName) => this.libraryScript.syncLibrary(
|
|
187
|
+
await Promise.all(appNames.map((appName) => this.applicationScript.sync(AppExecutor2.from(workspace, appName))));
|
|
188
|
+
await Promise.all(libNames.map((libName) => this.libraryScript.syncLibrary(LibExecutor2.from(workspace, libName))));
|
|
187
189
|
await Promise.all([
|
|
188
|
-
...appNames.map((appName) => this.workspaceRunner.lint(
|
|
189
|
-
...libNames.map((libName) => this.workspaceRunner.lint(
|
|
190
|
-
...pkgNames.filter((pkgName) => pkgName !== "contract").map((pkgName) => this.workspaceRunner.lint(
|
|
190
|
+
...appNames.map((appName) => this.workspaceRunner.lint(AppExecutor2.from(workspace, appName), workspace, options)),
|
|
191
|
+
...libNames.map((libName) => this.workspaceRunner.lint(LibExecutor2.from(workspace, libName), workspace, options)),
|
|
192
|
+
...pkgNames.filter((pkgName) => pkgName !== "contract").map((pkgName) => this.workspaceRunner.lint(PkgExecutor2.from(workspace, pkgName), workspace, options))
|
|
191
193
|
]);
|
|
192
194
|
}
|
|
193
195
|
async syncAll(workspace) {
|
|
194
196
|
const [appNames, libNames] = await workspace.getExecs();
|
|
195
197
|
for (const libName of libNames)
|
|
196
|
-
await this.libraryScript.syncLibrary(
|
|
198
|
+
await this.libraryScript.syncLibrary(LibExecutor2.from(workspace, libName));
|
|
197
199
|
for (const appName of appNames)
|
|
198
|
-
await this.applicationScript.sync(
|
|
200
|
+
await this.applicationScript.sync(AppExecutor2.from(workspace, appName));
|
|
199
201
|
}
|
|
200
202
|
async init(devProjectId, workspace, { host } = {}) {
|
|
201
203
|
const [bunfigExists, packageJsonExists, tsconfigExists] = await Promise.all([
|
|
@@ -279,10 +281,10 @@ class WorkspaceCommand extends command("workspace", [WorkspaceScript], ({ public
|
|
|
279
281
|
}).option("overwrite", Boolean, { desc: "Overwrite existing agent rule files", default: false }).option("cursorRules", Boolean, { desc: "Generate .cursor/rules/akan.mdc", default: true }).with(Workspace).exec(async function(overwrite, cursorRules, workspace) {
|
|
280
282
|
await this.workspaceScript.generateAgentRules(workspace, { overwrite, cursorRules });
|
|
281
283
|
}),
|
|
282
|
-
lint: target({ desc: "Lint and fix code in a specific app/lib/pkg" }).with(Exec).option("fix", Boolean, { default: true }).option("maxDiagnostics", Number, maxDiagnosticsOption).with(Workspace).exec(async function(exec, fix, maxDiagnostics, workspace) {
|
|
284
|
+
lint: target({ desc: "Lint and fix code in a specific app/lib/pkg", readOnly: ({ fix }) => fix === false }).with(Exec).option("fix", Boolean, { default: true }).option("maxDiagnostics", Number, maxDiagnosticsOption).with(Workspace).exec(async function(exec, fix, maxDiagnostics, workspace) {
|
|
283
285
|
await this.workspaceScript.lint(exec, workspace, { fix, maxDiagnostics });
|
|
284
286
|
}),
|
|
285
|
-
lintAll: target({ desc: "Lint and fix code in all apps and libraries" }).option("fix", Boolean, { default: true }).option("maxDiagnostics", Number, maxDiagnosticsOption).with(Workspace).exec(async function(fix, maxDiagnostics, workspace) {
|
|
287
|
+
lintAll: target({ desc: "Lint and fix code in all apps and libraries", readOnly: ({ fix }) => fix === false }).option("fix", Boolean, { default: true }).option("maxDiagnostics", Number, maxDiagnosticsOption).with(Workspace).exec(async function(fix, maxDiagnostics, workspace) {
|
|
286
288
|
await this.workspaceScript.lintAll(workspace, { fix, maxDiagnostics });
|
|
287
289
|
}),
|
|
288
290
|
machineKeygen: target({
|
package/CodeAgent-x2p3a3e0.js
DELETED
package/TunnelShare-c4xsfzg5.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import {
|
|
3
|
-
TunnelShare2
|
|
4
|
-
} from "./index-k92x3vne.js";
|
|
5
|
-
import"./index-rfzp4pqs.js";
|
|
6
|
-
import"./index-43f4h4cm.js";
|
|
7
|
-
import"./index-m9jj544v.js";
|
|
8
|
-
import"./index-xvk2a75m.js";
|
|
9
|
-
import"./index-nmvhjn8c.js";
|
|
10
|
-
import"./index-3ghdb7p5.js";
|
|
11
|
-
import"./index-j4yvgfhr.js";
|
|
12
|
-
import"./index-bns3wcpc.js";
|
|
13
|
-
export {
|
|
14
|
-
TunnelShare2 as TunnelShare
|
|
15
|
-
};
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import {
|
|
3
|
-
Workspace,
|
|
4
|
-
command
|
|
5
|
-
} from "./index-exn38bzx.js";
|
|
6
|
-
import"./index-j4yvgfhr.js";
|
|
7
|
-
import"./index-bns3wcpc.js";
|
|
8
|
-
import"./index-3ghdb7p5.js";
|
|
9
|
-
import"./index-35j83zkd.js";
|
|
10
|
-
import"./index-j6eeh5d7.js";
|
|
11
|
-
import"./index-yckz5t8b.js";
|
|
12
|
-
import"./index-hj6w4ka1.js";
|
|
13
|
-
import"./index-2vgv7fs7.js";
|
|
14
|
-
import"./index-9p260r4e.js";
|
|
15
|
-
import"./index-j9790rhk.js";
|
|
16
|
-
import"./index-vm0dn0mt.js";
|
|
17
|
-
import"./index-43f4h4cm.js";
|
|
18
|
-
import"./index-an76bdrv.js";
|
|
19
|
-
import"./index-m9jj544v.js";
|
|
20
|
-
import"./index-nmvhjn8c.js";
|
|
21
|
-
import"./index-xvk2a75m.js";
|
|
22
|
-
import"./index-xyn02k0w.js";
|
|
23
|
-
import"./index-5zwr4n6k.js";
|
|
24
|
-
import"./index-62md4dwy.js";
|
|
25
|
-
import"./index-ygdbn9jn.js";
|
|
26
|
-
import"./index-ny2k80mv.js";
|
|
27
|
-
import"./index-t4d0ckde.js";
|
|
28
|
-
import"./index-ra9fvn7s.js";
|
|
29
|
-
import {
|
|
30
|
-
AgentScript
|
|
31
|
-
} from "./index-grxs6fts.js";
|
|
32
|
-
import"./index-gcx48get.js";
|
|
33
|
-
|
|
34
|
-
// pkgs/@akanjs/cli/agent/agent.command.ts
|
|
35
|
-
class AgentCommand extends command("agent", [AgentScript], ({ public: target }) => ({
|
|
36
|
-
agent: target({ desc: "Install Akan agent rules for editors and coding agents", stdio: true, usageExitCode: 1 }).arg("action", String, { desc: "install, or hook (run by Claude Code hooks)" }).arg("target", String, {
|
|
37
|
-
desc: "install: cursor, agents-md, claude, rules, skills, hooks, or all; hook: pre-edit, post-edit, stop",
|
|
38
|
-
nullable: true
|
|
39
|
-
}).option("force", Boolean, {
|
|
40
|
-
desc: "overwrite existing pointer files and generated files you took over",
|
|
41
|
-
default: false
|
|
42
|
-
}).option("check", Boolean, {
|
|
43
|
-
desc: "write nothing; exit 3 when install would create, change or remove a file",
|
|
44
|
-
default: false
|
|
45
|
-
}).with(Workspace).exec(async function(action, targetName, force, check, workspace) {
|
|
46
|
-
await this.agentScript.agent(workspace, action, targetName, { force, check });
|
|
47
|
-
})
|
|
48
|
-
})) {
|
|
49
|
-
}
|
|
50
|
-
export {
|
|
51
|
-
AgentCommand
|
|
52
|
-
};
|