@akanjs/cli 3.0.0-alpha.99 → 3.0.0-beta.1

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.
Files changed (71) hide show
  1. package/.build-stamp +1 -1
  2. package/{abstractCompactor-byytxs22.js → abstractCompactor-mjh5ppsq.js} +1 -1
  3. package/{agent.command-v1a4746v.js → agent.command-d2gfxfck.js} +5 -5
  4. package/{application.command-j05fr5jc.js → application.command-pj2m7584.js} +5 -5
  5. package/{applicationBuildRunner-s4gsk728.js → applicationBuildRunner-kxwbssgn.js} +2 -2
  6. package/{applicationReleasePackager-28v9vbzk.js → applicationReleasePackager-4yasxwv9.js} +1 -1
  7. package/buildBatch.proc.js +2 -2
  8. package/{capacitorApp-8d6d4zkm.js → capacitorApp-36rbr858.js} +2 -2
  9. package/{cloud.command-r6wvq2rp.js → cloud.command-jshwdq22.js} +9 -9
  10. package/{context.command-4vdt1aqq.js → context.command-ez8a0zyz.js} +13 -13
  11. package/{devTui-tnj2hh4f.js → devTui-40ggmd99.js} +85 -84
  12. package/{devTuiView-xzed2pd6.js → devTuiView-c08ccbat.js} +1 -1
  13. package/{guideline.command-p92dq6ts.js → guideline.command-xmqwx8zm.js} +11 -7
  14. package/guidelines/agentRule/agentRule.instruction.md +112 -32
  15. package/guidelines/conventions/conventions.instruction.md +100 -40
  16. package/guidelines/mcpRule/mcpRule.generate.json +11 -1
  17. package/guidelines/mcpRule/mcpRule.instruction.md +296 -53
  18. package/guidelines/queryRule/queryRule.instruction.md +17 -9
  19. package/guidelines/ssrRule/ssrRule.instruction.md +15 -13
  20. package/guidelines/workspaceOnboarding/workspaceOnboarding.instruction.md +10 -5
  21. package/guidelines/workspaceRecipes/workspaceRecipes.instruction.md +68 -3
  22. package/incrementalBuilder.proc.js +1 -1
  23. package/{index-gq44bqjt.js → index-259dsnz3.js} +2 -2
  24. package/{index-b9rkcrx8.js → index-2hq52jq3.js} +9 -7
  25. package/{index-qsq3q8fy.js → index-2tv3fdx4.js} +21 -10
  26. package/{index-qkk27bk6.js → index-4edzf1gr.js} +4 -4
  27. package/{index-yza7zkpt.js → index-600zhnve.js} +10 -10
  28. package/{index-srdssqj7.js → index-7737gxcp.js} +3 -3
  29. package/{index-zmjppp25.js → index-8pm30m73.js} +5 -5
  30. package/{index-p5neav9b.js → index-a64esmtb.js} +54 -9
  31. package/{index-0amdxycf.js → index-fz5q3gd7.js} +3 -3
  32. package/{index-fc1bh0a7.js → index-gyd220p2.js} +1 -1
  33. package/{index-5svjba73.js → index-j9yhg404.js} +1 -1
  34. package/{index-c69j78kk.js → index-kn1h7p1x.js} +1 -1
  35. package/{index-gtmz74tj.js → index-ktb5njgy.js} +2 -2
  36. package/{index-znynzt5w.js → index-mak3cd28.js} +1 -1
  37. package/{index-29sxqfaw.js → index-ne2qy0nk.js} +3 -3
  38. package/{index-hyywke0f.js → index-pnqbkf5p.js} +1 -1
  39. package/{index-8p8p0cf8.js → index-rwg2aa4f.js} +3 -3
  40. package/{index-5wd728df.js → index-v0qh106m.js} +215 -12
  41. package/{index-7d6vny25.js → index-ws5e0j51.js} +2 -2
  42. package/{index-1yxtbmbj.js → index-wt7qrtd4.js} +1 -1
  43. package/{index-gkkdx9kp.js → index-zry5nz81.js} +6 -6
  44. package/index.js +19 -19
  45. package/{library.command-s4fszngs.js → library.command-nbsky672.js} +3 -3
  46. package/{localRegistry.command-fq2w7cgz.js → localRegistry.command-yeq57wjr.js} +8 -8
  47. package/{module.command-6n7dwvav.js → module.command-29vqzrh8.js} +6 -6
  48. package/{package.command-gr82ypnr.js → package.command-axv0abmn.js} +3 -3
  49. package/package.json +2 -2
  50. package/{page.command-7gvgb3jb.js → page.command-vs9s3zrh.js} +3 -3
  51. package/{primitive.command-tk5ckw38.js → primitive.command-cbxmqbtc.js} +7 -7
  52. package/{quality.command-38v81baf.js → quality.command-gmbs7nws.js} +2 -2
  53. package/{repair.command-5xbwvsxp.js → repair.command-bqsjptsj.js} +5 -5
  54. package/{routeSourceValidator-ze6x894c.js → routeSourceValidator-apyqw7wk.js} +90 -17
  55. package/{scalar.command-0epwcr5k.js → scalar.command-6k1vhe9s.js} +5 -5
  56. package/{subspace.command-e2t36xb2.js → subspace.command-fwjfcts7.js} +7 -5
  57. package/templates/app/page/_index.tsx +3 -3
  58. package/templates/app/page/_layout.tsx +31 -32
  59. package/templates/appSample/page/task/[taskId]/_index.tsx +22 -27
  60. package/templates/appSample/page/task/[taskId]/edit.tsx +25 -30
  61. package/templates/appSample/page/task/_index.tsx +3 -7
  62. package/templates/appSample/page/task/_layout.tsx +4 -15
  63. package/templates/appSample/page/task/new.tsx +4 -10
  64. package/templates/crudPages/[__model__Id]/edit/page.tsx +26 -28
  65. package/templates/crudPages/[__model__Id]/page.tsx +20 -25
  66. package/templates/crudPages/new/page.tsx +24 -23
  67. package/templates/crudPages/page.tsx +25 -24
  68. package/templates/crudSinglePage/page.tsx +25 -24
  69. package/templates/lib/sig.ts +4 -0
  70. package/{workflow.command-kphbr7eh.js → workflow.command-nwpcdc8p.js} +10 -10
  71. package/{workspace.command-ag5hy887.js → workspace.command-8s050m0h.js} +20 -20
@@ -10,33 +10,34 @@ export default function getContent(scanInfo: AppInfo | LibInfo | null, dict: Dic
10
10
  filename: "_index.tsx",
11
11
  content: `
12
12
  import { type cnst, fetch, usePage, ${dict.Model} } from "@apps/${dict.appName}/client";
13
- import type { PageConfig } from "akanjs/client";
13
+ import { page } from "akanjs/client";
14
14
  import { Load } from "akanjs/ui";
15
15
 
16
- export default function Page() {
17
- const { l } = usePage();
18
- const ${dict.model}Form: Partial<cnst.${dict.Model}> = {};
19
- return (
20
- <div className="container">
21
- <div className="m-4 mt-8 flex justify-between">
22
- <div className="flex items-center gap-2 text-primary text-xl">
23
- + {l("base.createModel", { model: l("${dict.model}.modelName") })}
16
+ export default page()
17
+ .config({ transition: "none" })
18
+ .render(() => {
19
+ const { l } = usePage();
20
+ const ${dict.model}Form: Partial<cnst.${dict.Model}> = {};
21
+ return (
22
+ <div className="container">
23
+ <div className="m-4 mt-8 flex justify-between">
24
+ <div className="flex items-center gap-2 text-primary text-xl">
25
+ + {l("base.createModel", { model: l("${dict.model}.modelName") })}
26
+ </div>
24
27
  </div>
28
+ <Load.Edit
29
+ className="flex flex-col items-center"
30
+ slice={fetch.slice.${dict.model}InPublic}
31
+ edit={${dict.model}Form}
32
+ type="form"
33
+ onCancel="back"
34
+ onSubmit="/${dict.model}"
35
+ >
36
+ <${dict.Model}.Template.General />
37
+ </Load.Edit>
25
38
  </div>
26
- <Load.Edit
27
- className="flex flex-col items-center"
28
- slice={fetch.slice.${dict.model}InPublic}
29
- edit={${dict.model}Form}
30
- type="form"
31
- onCancel="back"
32
- onSubmit="/${dict.model}"
33
- >
34
- <${dict.Model}.Template.General />
35
- </Load.Edit>
36
- </div>
37
- );
38
- }
39
- export const pageConfig = { transition: "none" } satisfies PageConfig;
39
+ );
40
+ });
40
41
  `,
41
42
  };
42
43
  }
@@ -10,34 +10,35 @@ export default function getContent(scanInfo: AppInfo | LibInfo | null, dict: Dic
10
10
  filename: "_index.tsx",
11
11
  content: `
12
12
  import { ${dict.Model}, fetch, usePage } from "@apps/${dict.appName}/client";
13
- import type { PageConfig } from "akanjs/client";
13
+ import { page } from "akanjs/client";
14
14
  import { buttonRecipe, Link } from "akanjs/ui";
15
15
 
16
- export default async function Page() {
17
- const { l } = usePage();
18
- const [{ ${dict.model}InitInPublic }] = await Promise.all([fetch.init${dict.Model}InPublic()]);
19
- return (
20
- <div className="container flex flex-col gap-4">
21
- <div className="mt-5 h-full w-full px-5">
22
- <div>{l("${dict.model}.modelName")}</div>
23
- <div className="flex animate-fadeIn items-center gap-4 px-4 pt-4">
24
- <div className="font-bold text-lg md:text-4xl">${dict.Model}s</div>
25
- <Link className={buttonRecipe()} href="/${dict.model}/new">
26
- + {l("base.createModel", { model: l("${dict.model}.modelName") })}
27
- </Link>
28
- </div>
29
- <div>{l("${dict.model}.modelDesc")}</div>
30
- <div className="mt-3 flex gap-4 px-6">
31
- <${dict.Model}.Zone.Card
32
- className="grid w-full animate-fadeIn grid-cols-1 justify-center gap-4 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 2xl:grid-cols-5"
33
- init={${dict.model}InitInPublic}
34
- />
16
+ export default page()
17
+ .config({ transition: "none" })
18
+ .render(async () => {
19
+ const { l } = usePage();
20
+ const [{ ${dict.model}InitInPublic }] = await Promise.all([fetch.init${dict.Model}InPublic()]);
21
+ return (
22
+ <div className="container flex flex-col gap-4">
23
+ <div className="mt-5 h-full w-full px-5">
24
+ <div>{l("${dict.model}.modelName")}</div>
25
+ <div className="flex animate-fadeIn items-center gap-4 px-4 pt-4">
26
+ <div className="font-bold text-lg md:text-4xl">${dict.Model}s</div>
27
+ <Link className={buttonRecipe()} href="/${dict.model}/new">
28
+ + {l("base.createModel", { model: l("${dict.model}.modelName") })}
29
+ </Link>
30
+ </div>
31
+ <div>{l("${dict.model}.modelDesc")}</div>
32
+ <div className="mt-3 flex gap-4 px-6">
33
+ <${dict.Model}.Zone.Card
34
+ className="grid w-full animate-fadeIn grid-cols-1 justify-center gap-4 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 2xl:grid-cols-5"
35
+ init={${dict.model}InitInPublic}
36
+ />
37
+ </div>
35
38
  </div>
36
39
  </div>
37
- </div>
38
- );
39
- }
40
- export const pageConfig = { transition: "none" } satisfies PageConfig;
40
+ );
41
+ });
41
42
  `,
42
43
  };
43
44
  }
@@ -10,32 +10,33 @@ export default function getContent(scanInfo: AppInfo | LibInfo | null, dict: Dic
10
10
  filename: "_index.tsx",
11
11
  content: `
12
12
  import { ${dict.Model}, fetch, usePage } from "@apps/${dict.appName}/client";
13
- import type { PageConfig } from "akanjs/client";
13
+ import { page } from "akanjs/client";
14
14
  import { buttonRecipe, Model } from "akanjs/ui";
15
15
 
16
- export default async function Page() {
17
- const { l } = usePage();
18
- const [{ ${dict.model}InitInPublic }] = await Promise.all([fetch.init${dict.Model}InPublic()]);
19
- return (
20
- <>
21
- <div className="flex animate-fadeIn items-center gap-4 px-4 pt-4">
22
- <div className="font-bold text-lg md:text-4xl">{l("${dict.model}.modelName")}</div>
23
- <Model.New
24
- className={buttonRecipe({ size: "sm", variant: "ghost" })}
25
- slice={fetch.slice.${dict.model}InPublic}
26
- renderTitle="id"
27
- >
28
- <${dict.Model}.Template.General />
29
- </Model.New>
30
- </div>
31
- <${dict.Model}.Zone.Card
32
- className="mt-2 grid w-full animate-fadeIn grid-cols-1 justify-center gap-4 md:grid-cols-2 xl:grid-cols-3"
33
- init={${dict.model}InitInPublic}
34
- />
35
- </>
36
- );
37
- }
38
- export const pageConfig = { transition: "none" } satisfies PageConfig;
16
+ export default page()
17
+ .config({ transition: "none" })
18
+ .render(async () => {
19
+ const { l } = usePage();
20
+ const [{ ${dict.model}InitInPublic }] = await Promise.all([fetch.init${dict.Model}InPublic()]);
21
+ return (
22
+ <>
23
+ <div className="flex animate-fadeIn items-center gap-4 px-4 pt-4">
24
+ <div className="font-bold text-lg md:text-4xl">{l("${dict.model}.modelName")}</div>
25
+ <Model.New
26
+ className={buttonRecipe({ size: "sm", variant: "ghost" })}
27
+ slice={fetch.slice.${dict.model}InPublic}
28
+ renderTitle="id"
29
+ >
30
+ <${dict.Model}.Template.General />
31
+ </Model.New>
32
+ </div>
33
+ <${dict.Model}.Zone.Card
34
+ className="mt-2 grid w-full animate-fadeIn grid-cols-1 justify-center gap-4 md:grid-cols-2 xl:grid-cols-3"
35
+ init={${dict.model}InitInPublic}
36
+ />
37
+ </>
38
+ );
39
+ });
39
40
  `,
40
41
  };
41
42
  }
@@ -17,6 +17,7 @@ export default function getContent(scanInfo: AppInfo | LibInfo | null, dict: { [
17
17
  return `
18
18
  import { FetchClient, type FetchClientType } from "akanjs/fetch";
19
19
  import { SignalRegistry, serverSignal${libs.length === 0 ? ", fetch as base" : ""} } from "akanjs/signal";
20
+ import { Err } from "./dict";
20
21
  ${libs.map((lib) => `import { fetch as ${lib} } from "@libs/${lib}/lib/sig";`).join("\n")}
21
22
 
22
23
  ${[...scanInfo.database.entries()]
@@ -58,6 +59,9 @@ ${serviceModules.map((module) => `export const ${module} = SignalRegistry.regist
58
59
  export const fetchSignals = [${signalNames.join(", ")}] as const;
59
60
  export type Fetch = FetchClientType<typeof fetchSignals>;
60
61
  export const fetch = FetchClient.from(...fetchSignals) as unknown as Fetch;
62
+ // A failure restored from another process is this scope's own Err, so a server hop that rethrows one keeps its
63
+ // dictionary key and data instead of answering the original caller with Internal Server Error.
64
+ fetch.setErrorConstructor(Err);
61
65
 
62
66
  export const getSerializedSignal = () => fetch.serializedSignal
63
67
  `;
@@ -3,30 +3,30 @@ import {
3
3
  Workspace,
4
4
  script,
5
5
  command
6
- } from "./index-znynzt5w.js";
6
+ } from "./index-mak3cd28.js";
7
7
  import"./index-q0y2jq9j.js";
8
- import"./index-qsq3q8fy.js";
8
+ import"./index-2tv3fdx4.js";
9
9
  import"./index-6wwzs1bc.js";
10
10
  import {
11
11
  createWorkflowStepRegistry
12
- } from "./index-fc1bh0a7.js";
13
- import"./index-c69j78kk.js";
12
+ } from "./index-gyd220p2.js";
13
+ import"./index-kn1h7p1x.js";
14
14
  import {
15
15
  ModuleScript
16
- } from "./index-zmjppp25.js";
17
- import"./index-hyywke0f.js";
16
+ } from "./index-8pm30m73.js";
17
+ import"./index-pnqbkf5p.js";
18
18
  import"./index-h7yw2z9n.js";
19
19
  import {
20
20
  PrimitiveScript
21
- } from "./index-qkk27bk6.js";
21
+ } from "./index-4edzf1gr.js";
22
22
  import {
23
23
  ScalarScript
24
- } from "./index-8p8p0cf8.js";
24
+ } from "./index-rwg2aa4f.js";
25
25
  import"./index-by5gpp8x.js";
26
- import"./index-gtmz74tj.js";
26
+ import"./index-ktb5njgy.js";
27
27
  import {
28
28
  WorkflowRunner
29
- } from "./index-srdssqj7.js";
29
+ } from "./index-7737gxcp.js";
30
30
 
31
31
  // pkgs/@akanjs/cli/workflow/workflow.script.ts
32
32
  import { Logger } from "akanjs/common";
@@ -4,14 +4,14 @@ import {
4
4
  } from "./index-q0y2jq9j.js";
5
5
  import {
6
6
  GlobalConfig
7
- } from "./index-c69j78kk.js";
7
+ } from "./index-kn1h7p1x.js";
8
8
  import {
9
9
  Exec,
10
10
  Workspace,
11
11
  runner,
12
12
  script,
13
13
  command
14
- } from "./index-znynzt5w.js";
14
+ } from "./index-mak3cd28.js";
15
15
  import {
16
16
  extractAgentBlock,
17
17
  collectScopeRecipeSources,
@@ -21,7 +21,7 @@ import {
21
21
  AppExecutor,
22
22
  LibExecutor,
23
23
  PkgExecutor
24
- } from "./index-qsq3q8fy.js";
24
+ } from "./index-2tv3fdx4.js";
25
25
  import"./index-6wwzs1bc.js";
26
26
  import {
27
27
  countBlocking,
@@ -32,41 +32,41 @@ import {
32
32
  collectRecipeSources2,
33
33
  scanRecipes2
34
34
  } from "./index-by5gpp8x.js";
35
- import"./index-fc1bh0a7.js";
36
- import"./index-gtmz74tj.js";
35
+ import"./index-gyd220p2.js";
36
+ import"./index-ktb5njgy.js";
37
37
  import"./index-h7yw2z9n.js";
38
38
  import {
39
39
  AgentScript
40
- } from "./index-29sxqfaw.js";
40
+ } from "./index-ne2qy0nk.js";
41
41
  import {
42
42
  ApplicationScript
43
- } from "./index-5wd728df.js";
43
+ } from "./index-v0qh106m.js";
44
44
  import {
45
45
  LibraryScript
46
- } from "./index-gq44bqjt.js";
46
+ } from "./index-259dsnz3.js";
47
47
  import"./index-hwkygn9s.js";
48
48
  import"./index-kcxmv48c.js";
49
49
  import {
50
50
  PackageScript
51
- } from "./index-7d6vny25.js";
51
+ } from "./index-ws5e0j51.js";
52
52
  import {
53
53
  getNpmRegistryUrl,
54
54
  getLatestPackageVersion
55
- } from "./index-b9rkcrx8.js";
55
+ } from "./index-2hq52jq3.js";
56
56
  import {
57
57
  CloudScript
58
- } from "./index-gkkdx9kp.js";
58
+ } from "./index-zry5nz81.js";
59
59
  import {
60
60
  ContextScript
61
- } from "./index-yza7zkpt.js";
62
- import"./index-1yxtbmbj.js";
63
- import"./index-0amdxycf.js";
64
- import"./index-srdssqj7.js";
65
- import"./index-zmjppp25.js";
66
- import"./index-hyywke0f.js";
67
- import"./index-qkk27bk6.js";
68
- import"./index-8p8p0cf8.js";
69
- import"./index-5svjba73.js";
61
+ } from "./index-600zhnve.js";
62
+ import"./index-wt7qrtd4.js";
63
+ import"./index-fz5q3gd7.js";
64
+ import"./index-7737gxcp.js";
65
+ import"./index-8pm30m73.js";
66
+ import"./index-pnqbkf5p.js";
67
+ import"./index-4edzf1gr.js";
68
+ import"./index-rwg2aa4f.js";
69
+ import"./index-j9yhg404.js";
70
70
 
71
71
  // pkgs/@akanjs/cli/workspace/workspace.runner.ts
72
72
  import path from "path";