@akanjs/cli 3.0.0-beta.17 → 3.0.0-beta.19

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 (149) hide show
  1. package/.build-stamp +1 -1
  2. package/{CodeAgent-gjqnc2mg.js → CodeAgent-6cm97kay.js} +2 -2
  3. package/{CodeAgentRpcHost-qvwfv0n9.js → CodeAgentRpcHost-p7h6n2hp.js} +1 -1
  4. package/CodeAgentRpcListener-7p7z5dd7.js +97 -0
  5. package/{CodeTui-nd9hqvrw.js → CodeTui-za4jsm41.js} +205 -34
  6. package/{TunnelShare-r5tc2qk5.js → TunnelShare-2j6s511d.js} +2 -2
  7. package/{agent.command-n664dtcv.js → agent.command-e0wpbbyg.js} +6 -6
  8. package/akanCode.js +7 -5
  9. package/{application.command-t5542jte.js → application.command-8wyxqc8q.js} +28 -15
  10. package/{applicationBuildRunner-x4gbfn7y.js → applicationBuildRunner-n9gzaxd0.js} +35 -10
  11. package/{applicationReleasePackager-z61ep017.js → applicationReleasePackager-vpggfqgq.js} +1 -1
  12. package/buildBatch.proc.js +3 -3
  13. package/{capacitorApp-shv3ajh5.js → capacitorApp-q3z0qht0.js} +2 -2
  14. package/{cloud.command-dk5tj39k.js → cloud.command-4zwa5dsx.js} +34 -12
  15. package/cloud.script-fwx3vb34.js +20 -0
  16. package/{code.command-88sebgnn.js → code.command-468c9d7s.js} +41 -19
  17. package/commandManifest.json +1 -1
  18. package/{context.command-pqsm5jrk.js → context.command-dsnw0jby.js} +14 -14
  19. package/context.runner-rs4rj15d.js +22 -0
  20. package/{dependencyScanner-shs82ynp.js → dependencyScanner-0z2h2tks.js} +1 -1
  21. package/{devTui-gy6mendg.js → devTui-ffjsarqa.js} +3 -3
  22. package/{devTuiView-y1548wy6.js → devTuiView-1q1mdgrv.js} +1 -1
  23. package/{guideline.command-rpc2emw8.js → guideline.command-vhw13pqr.js} +8 -13
  24. package/guidelines/agentRule/agentRule.instruction.md +27 -10
  25. package/guidelines/conventions/conventions.instruction.md +53 -26
  26. package/guidelines/queryRule/queryRule.instruction.md +17 -7
  27. package/guidelines/runtimeRule/runtimeRule.instruction.md +74 -0
  28. package/guidelines/ssrRule/ssrRule.instruction.md +4 -2
  29. package/guidelines/transportRule/transportRule.instruction.md +10 -8
  30. package/guidelines/workspaceRecipes/workspaceRecipes.instruction.md +4 -3
  31. package/incrementalBuilder.proc.js +3 -2
  32. package/{index-4n4821gp.js → index-10dkrrww.js} +4 -4
  33. package/{index-bzakk0c2.js → index-14zrtgfa.js} +5 -3
  34. package/{index-v17gj504.js → index-18zybgkc.js} +2 -2
  35. package/{index-qh7brn20.js → index-22xtgmhn.js} +6 -2
  36. package/{index-qhtj9y6j.js → index-2446k7b4.js} +74 -21
  37. package/{index-g9zghs4h.js → index-3jrp517k.js} +12 -12
  38. package/{index-vpx68e4x.js → index-4m929vvn.js} +2 -2
  39. package/{index-4cvpzkq6.js → index-53176s7j.js} +3 -3
  40. package/{index-jwrpsrg3.js → index-667w0yah.js} +1 -1
  41. package/{index-3mg4h788.js → index-7ep8qtvp.js} +2 -2
  42. package/{index-w8kmx1b6.js → index-89hy31kf.js} +30 -7
  43. package/index-9d6nvkz2.js +656 -0
  44. package/index-9dp031by.js +12 -0
  45. package/{index-zn8qgeqx.js → index-a1w6934z.js} +3 -3
  46. package/{index-p0tew3fq.js → index-ab0c38ea.js} +10 -5
  47. package/index-bc88j1ry.js +1166 -0
  48. package/{index-ns128c4q.js → index-bftkz6cp.js} +280 -73
  49. package/{index-kcxmv48c.js → index-bhtmj233.js} +4 -1
  50. package/{index-kvzjda3v.js → index-bwf965h6.js} +5 -5
  51. package/{index-p4p9t45x.js → index-crmeqnmf.js} +56 -44
  52. package/{index-8k16atqy.js → index-d2242ksy.js} +23 -6
  53. package/{index-2sq06vv0.js → index-e4v6vhxq.js} +417 -105
  54. package/{index-xjc7gg65.js → index-esk82rvk.js} +23 -33
  55. package/{index-sn7dnzq4.js → index-kwaq3n9n.js} +1 -1
  56. package/{index-gm76f0qb.js → index-n3cv0tm4.js} +1 -1
  57. package/{index-6na0sd2b.js → index-qdgzsnhg.js} +5 -2
  58. package/{index-twq9p2sp.js → index-s5rhm04y.js} +0 -6
  59. package/{index-n8kt2wh6.js → index-sq2dzkzm.js} +35 -10
  60. package/{index-myj01w9r.js → index-srmay5jw.js} +15 -2
  61. package/{index-2pm1j01n.js → index-txr7dj2g.js} +4 -4
  62. package/{index-3cymrzsb.js → index-vqx8bdxz.js} +17 -3
  63. package/{index-te0y1c0m.js → index-zqgj2rt2.js} +12 -7
  64. package/index.js +21 -21
  65. package/{library.command-m8p2r1dh.js → library.command-cqr175dy.js} +3 -3
  66. package/{localRegistry.command-yppdqrxv.js → localRegistry.command-49z55qqz.js} +9 -9
  67. package/{module.command-mfzvqt0n.js → module.command-9p8mm3b0.js} +5 -5
  68. package/{package.command-cgp2p2v5.js → package.command-wxyz909t.js} +5 -5
  69. package/package.json +2 -2
  70. package/{page.command-taenb02b.js → page.command-gsrsfqqs.js} +3 -3
  71. package/{primitive.command-7kpncmkk.js → primitive.command-ns1mptje.js} +6 -6
  72. package/{prompter-9mn3kp36.js → prompter-1f8d9pcc.js} +1 -1
  73. package/{quality.command-1ar94hrw.js → quality.command-e76k2q9k.js} +18 -17
  74. package/{repair.command-n08t6j8p.js → repair.command-pkrsm3cw.js} +5 -5
  75. package/{routeSourceValidator-apyqw7wk.js → routeSourceValidator-7ycnfz0e.js} +0 -6
  76. package/{scalar.command-mq8qfp4t.js → scalar.command-0cpt3fc8.js} +4 -4
  77. package/skills/akan-code/SKILL.md +122 -0
  78. package/skills/akan-module/SKILL.md +2 -2
  79. package/skills/akan-store/SKILL.md +6 -2
  80. package/{subspace.command-jqv5n79w.js → subspace.command-fktpwp0g.js} +20 -10
  81. package/templates/__scalar/__model__/__model__.abstract.md.template +8 -0
  82. package/templates/appSample/lib/__scalar/workHistory/workHistory.abstract.ts +8 -39
  83. package/templates/appSample/lib/_noti/noti.abstract.ts +6 -29
  84. package/templates/appSample/lib/task/task.abstract.ts +12 -32
  85. package/templates/appSample/lib/task/task.signal.spec.ts +15 -18
  86. package/templates/appSample/lib/task/task.signal.test.ts +15 -1
  87. package/templates/appSample/lib/task/task.signal.ts +1 -1
  88. package/templates/appSample/srvkit/AuthGuard.ts +4 -1
  89. package/templates/appSample/srvkit/SessionInternalArg.ts +3 -1
  90. package/templates/crudPages/[__model__Id]/edit/page.tsx +2 -1
  91. package/templates/crudPages/[__model__Id]/page.tsx +2 -1
  92. package/templates/crudPages/new/page.tsx +2 -1
  93. package/templates/crudPages/page.tsx +2 -1
  94. package/templates/crudSinglePage/page.tsx +2 -1
  95. package/templates/localDev/docker-compose.yaml.template +3 -14
  96. package/templates/module/__model__.signal.ts +12 -4
  97. package/templates/pkgRoot/tsconfig.json.template +2 -7
  98. package/templates/service/__model__.abstract.md.template +8 -0
  99. package/{tunnel.command-ht2es78c.js → tunnel.command-d5jy9gk8.js} +4 -4
  100. package/{workflow.command-tvz4nm9n.js → workflow.command-6tkcysmx.js} +9 -9
  101. package/{workspace.command-txv1yv5e.js → workspace.command-gv84eh1p.js} +25 -24
  102. package/cloud.script-ch3xrw3s.js +0 -20
  103. package/context.runner-bys6ykcp.js +0 -22
  104. package/guidelines/agentRule/agentRule.generate.json +0 -31
  105. package/guidelines/componentRule/componentRule.generate.json +0 -31
  106. package/guidelines/conventions/conventions.generate.json +0 -25
  107. package/guidelines/cssRule/cssRule.generate.json +0 -31
  108. package/guidelines/docPageRule/docPageRule.generate.json +0 -31
  109. package/guidelines/docPageRule/docPageRule.instruction.md +0 -25
  110. package/guidelines/docSyncRule/docSyncRule.generate.json +0 -31
  111. package/guidelines/docSyncRule/docSyncRule.instruction.md +0 -25
  112. package/guidelines/enumConstant/enumConstant.generate.json +0 -31
  113. package/guidelines/enumConstant/enumConstant.instruction.md +0 -28
  114. package/guidelines/fieldRule/fieldRule.generate.json +0 -31
  115. package/guidelines/framework/framework.generate.json +0 -32
  116. package/guidelines/mcpRule/mcpRule.generate.json +0 -35
  117. package/guidelines/modelConstant/modelConstant.generate.json +0 -32
  118. package/guidelines/modelDictionary/modelDictionary.generate.json +0 -32
  119. package/guidelines/modelDocument/modelDocument.generate.json +0 -31
  120. package/guidelines/modelService/modelService.generate.json +0 -31
  121. package/guidelines/modelSignal/modelSignal.generate.json +0 -31
  122. package/guidelines/modelStore/modelStore.generate.json +0 -31
  123. package/guidelines/modelTemplate/modelTemplate.generate.json +0 -31
  124. package/guidelines/modelUnit/modelUnit.generate.json +0 -31
  125. package/guidelines/modelUtil/modelUtil.generate.json +0 -31
  126. package/guidelines/modelView/modelView.generate.json +0 -31
  127. package/guidelines/modelZone/modelZone.generate.json +0 -31
  128. package/guidelines/moduleCodegen/moduleCodegen.generate.json +0 -31
  129. package/guidelines/moduleCodegen/moduleCodegen.instruction.md +0 -28
  130. package/guidelines/moduleOverview/moduleOverview.generate.json +0 -31
  131. package/guidelines/queryRule/queryRule.generate.json +0 -31
  132. package/guidelines/recipeRule/recipeRule.generate.json +0 -31
  133. package/guidelines/runtimeRule/runtimeRule.generate.json +0 -25
  134. package/guidelines/scalarConstant/scalarConstant.generate.json +0 -32
  135. package/guidelines/scalarDictionary/scalarDictionary.generate.json +0 -32
  136. package/guidelines/scalarModule/scalarModule.generate.json +0 -31
  137. package/guidelines/sharedUiUsage/sharedUiUsage.generate.json +0 -31
  138. package/guidelines/sharedUiUsage/sharedUiUsage.instruction.md +0 -25
  139. package/guidelines/ssrRule/ssrRule.generate.json +0 -31
  140. package/guidelines/transportRule/transportRule.generate.json +0 -31
  141. package/guidelines/utilUiUsage/utilUiUsage.generate.json +0 -31
  142. package/guidelines/utilUiUsage/utilUiUsage.instruction.md +0 -25
  143. package/guidelines/workspaceOnboarding/workspaceOnboarding.generate.json +0 -24
  144. package/guidelines/workspaceRecipes/workspaceRecipes.generate.json +0 -34
  145. package/index-57p9p179.js +0 -461
  146. package/index-qt8dqgnf.js +0 -250
  147. package/templates/__scalar/__model__/__model__.abstract.md +0 -28
  148. package/templates/module/__model__.abstract.md +0 -28
  149. package/templates/service/__model__.abstract.md +0 -28
@@ -1,16 +1,26 @@
1
1
  import type { AppInfo, LibInfo } from "akanjs";
2
2
 
3
- export default function getContent(scanInfo: AppInfo | LibInfo | null, dict: { appName: string }) {
4
- return `import { expect } from "bun:test";
5
- import type { DocumentModel } from "akanjs/constant";
6
- import { getOrSetupSignalTestFetch, sampleOf } from "akanjs/test";
3
+ export default function getContent(
4
+ scanInfo: AppInfo | LibInfo | null,
5
+ dict: { appName: string },
6
+ options: { libs?: string[] } = {},
7
+ ) {
8
+ // Task writes are guarded by SignedIn, so the fixtures sign a user in through libs/shared when it is installed.
9
+ const signsIn = options.libs?.includes("shared") ?? false;
10
+ return `${
11
+ signsIn
12
+ ? `import * as userSpec from "@libs/shared/lib/user/user.signal.spec";
13
+ `
14
+ : ""
15
+ }import type { DocumentModel } from "akanjs/constant";
16
+ import { ${signsIn ? "" : "getOrSetupSignalTestFetch, "}sampleOf } from "akanjs/test";
7
17
 
8
18
  import * as cnst from "../cnst";
9
19
  import type { fetch as appFetch } from "../useServer";
10
20
 
11
21
  type AppFetch = typeof appFetch;
12
22
 
13
- const getFetch = async () => await getOrSetupSignalTestFetch<AppFetch>();
23
+ const getFetch = async () => ${signsIn ? "(await userSpec.getUserAgentWithPassword<AppFetch>()).fetch" : "await getOrSetupSignalTestFetch<AppFetch>()"};
14
24
 
15
25
  export interface TaskAgent {
16
26
  task: cnst.Task;
@@ -27,13 +37,6 @@ export const createTask = async (overrides: Partial<DocumentModel<cnst.TaskInput
27
37
 
28
38
  const task = await fetch.createTask(taskInput);
29
39
 
30
- expect(task).toMatchObject({
31
- title: taskInput.title,
32
- content: taskInput.content,
33
- status: "todo",
34
- });
35
- expect(task.workHistory.map((entry) => entry.action)).toEqual(["created"]);
36
-
37
40
  return {
38
41
  task,
39
42
  fetch,
@@ -45,9 +48,6 @@ export const getStartedTask = async (overrides: Partial<DocumentModel<cnst.TaskI
45
48
  const agent = await createTask(overrides);
46
49
  const task = await agent.fetch.startTask(agent.task.id);
47
50
 
48
- expect(task.status).toBe("inProgress");
49
- expect(task.workHistory.map((entry) => entry.action)).toEqual(["created", "started"]);
50
-
51
51
  return {
52
52
  ...agent,
53
53
  task,
@@ -58,9 +58,6 @@ export const getCompletedTask = async (overrides: Partial<DocumentModel<cnst.Tas
58
58
  const agent = await getStartedTask(overrides);
59
59
  const task = await agent.fetch.completeTask(agent.task.id);
60
60
 
61
- expect(task.status).toBe("completed");
62
- expect(task.workHistory.map((entry) => entry.action)).toEqual(["created", "started", "completed"]);
63
-
64
61
  return {
65
62
  ...agent,
66
63
  task,
@@ -6,9 +6,23 @@ import { configureSignalTest } from "akanjs/test";
6
6
 
7
7
  import * as taskSpec from "./task.signal.spec";
8
8
 
9
- configureSignalTest({ databaseMode: "memory" });
9
+ configureSignalTest({ storage: "memory" });
10
10
 
11
11
  describe("Task signal smoke", () => {
12
+ test("creates a task in todo", async () => {
13
+ const { task, taskInput } = await taskSpec.createTask({ title: "Signal smoke task" });
14
+
15
+ expect(task).toMatchObject({ title: taskInput.title, content: taskInput.content, status: "todo" });
16
+ expect(task.workHistory.map((entry) => entry.action)).toEqual(["created"]);
17
+ });
18
+
19
+ test("starts a task", async () => {
20
+ const { task } = await taskSpec.getStartedTask({ title: "Signal smoke task" });
21
+
22
+ expect(task.status).toBe("inProgress");
23
+ expect(task.workHistory.map((entry) => entry.action)).toEqual(["created", "started"]);
24
+ });
25
+
12
26
  test("exposes custom task mutations over fetch", async () => {
13
27
  const { task } = await taskSpec.getCompletedTask({ title: "Signal smoke task" });
14
28
 
@@ -25,7 +25,7 @@ export class TaskInternal extends internal(srv.task, ({ interval }) => ({})) {}
25
25
  // Guards, per key: root = the generated admin API (runs any filter with caller-supplied args), get = reads,
26
26
  // cru = create/update/remove. root and cru are never Public; None here means "nobody until you name a guard".
27
27
  export class TaskSlice extends slice(srv.task, { guards: { root: None, get: Public, cru: SignedIn } }, (init) => ({
28
- inPublic: init().exec(function () {
28
+ inPublic: init({ guards: [Public] }).exec(function () {
29
29
  return this.taskService.queryAny();
30
30
  }),
31
31
  })) {}
@@ -21,7 +21,10 @@ export class SignedIn implements Guard {
21
21
 
22
22
  canPass(context: SignalContext): boolean {
23
23
  // Reads the account the middleware resolved, so the same guard answers over HTTP, a websocket and MCP alike.
24
- return !!context.get<{ id?: string }>("account");
24
+ // A guest still has an account — libs/shared resolves one to \`{ appName, environment }\` — so only an
25
+ // identity on it proves a sign-in: your own middleware's \`id\`, or libs/shared's \`self\` (user) / \`me\` (admin).
26
+ const account = context.get<{ id?: string; self?: { id?: string }; me?: { id?: string } }>("account");
27
+ return !!(account?.id ?? account?.self?.id ?? account?.me?.id);
25
28
  }
26
29
  }
27
30
 
@@ -17,7 +17,9 @@ export class CurrentUserId implements InternalArg<string | null> {
17
17
  getArg(context: SignalContext): string | null {
18
18
  // \`context.get\` reads what the account middleware resolved, on every transport. Branching on
19
19
  // \`getHttpContext()\` would return null for the same caller arriving over a websocket or MCP.
20
- return context.get<{ id?: string }>("account")?.id ?? null;
20
+ // An app's own middleware may put the id on the account itself; libs/shared puts it on \`self\` or \`me\`.
21
+ const account = context.get<{ id?: string; self?: { id?: string }; me?: { id?: string } }>("account");
22
+ return account?.id ?? account?.self?.id ?? account?.me?.id ?? null;
21
23
  }
22
24
  }
23
25
 
@@ -4,12 +4,13 @@ interface Dict {
4
4
  Model: string;
5
5
  model: string;
6
6
  appName: string;
7
+ clientPath: string;
7
8
  }
8
9
  export default function getContent(scanInfo: AppInfo | LibInfo | null, dict: Dict) {
9
10
  return {
10
11
  filename: "_index.tsx",
11
12
  content: `
12
- import { ${dict.Model}, fetch, usePage } from "@apps/${dict.appName}/client";
13
+ import { ${dict.Model}, fetch, usePage } from "${dict.clientPath}";
13
14
  import { ID } from "akanjs/base";
14
15
  import { page } from "akanjs/client";
15
16
  import { Load } from "akanjs/ui";
@@ -4,12 +4,13 @@ interface Dict {
4
4
  Model: string;
5
5
  model: string;
6
6
  appName: string;
7
+ clientPath: string;
7
8
  }
8
9
  export default function getContent(scanInfo: AppInfo | LibInfo | null, dict: Dict) {
9
10
  return {
10
11
  filename: "_index.tsx",
11
12
  content: `
12
- import { ${dict.Model}, fetch, usePage } from "@apps/${dict.appName}/client";
13
+ import { ${dict.Model}, fetch, usePage } from "${dict.clientPath}";
13
14
  import { ID } from "akanjs/base";
14
15
  import { page } from "akanjs/client";
15
16
  import { buttonRecipe, Link } from "akanjs/ui";
@@ -4,12 +4,13 @@ interface Dict {
4
4
  Model: string;
5
5
  model: string;
6
6
  appName: string;
7
+ clientPath: string;
7
8
  }
8
9
  export default function getContent(scanInfo: AppInfo | LibInfo | null, dict: Dict) {
9
10
  return {
10
11
  filename: "_index.tsx",
11
12
  content: `
12
- import { type cnst, fetch, usePage, ${dict.Model} } from "@apps/${dict.appName}/client";
13
+ import { type cnst, fetch, usePage, ${dict.Model} } from "${dict.clientPath}";
13
14
  import { page } from "akanjs/client";
14
15
  import { Load } from "akanjs/ui";
15
16
 
@@ -4,12 +4,13 @@ interface Dict {
4
4
  Model: string;
5
5
  model: string;
6
6
  appName: string;
7
+ clientPath: string;
7
8
  }
8
9
  export default function getContent(scanInfo: AppInfo | LibInfo | null, dict: Dict) {
9
10
  return {
10
11
  filename: "_index.tsx",
11
12
  content: `
12
- import { ${dict.Model}, fetch, usePage } from "@apps/${dict.appName}/client";
13
+ import { ${dict.Model}, fetch, usePage } from "${dict.clientPath}";
13
14
  import { page } from "akanjs/client";
14
15
  import { buttonRecipe, Link } from "akanjs/ui";
15
16
 
@@ -4,12 +4,13 @@ interface Dict {
4
4
  Model: string;
5
5
  model: string;
6
6
  appName: string;
7
+ clientPath: string;
7
8
  }
8
9
  export default function getContent(scanInfo: AppInfo | LibInfo | null, dict: Dict) {
9
10
  return {
10
11
  filename: "_index.tsx",
11
12
  content: `
12
- import { ${dict.Model}, fetch, usePage } from "@apps/${dict.appName}/client";
13
+ import { ${dict.Model}, fetch, usePage } from "${dict.clientPath}";
13
14
  import { page } from "akanjs/client";
14
15
  import { buttonRecipe, Model } from "akanjs/ui";
15
16
 
@@ -1,29 +1,18 @@
1
- version: "3.8"
2
1
  networks:
3
2
  <%= repoName %>-network:
4
3
  driver: bridge
5
4
  services:
6
5
  redis:
7
6
  container_name: <%= repoName %>-redis
8
- image: redis
7
+ image: redis:8
9
8
  restart: unless-stopped
10
9
  ports:
11
10
  - 6379:6379
12
11
  networks:
13
12
  - <%= repoName %>-network
14
- libsql:
15
- container_name: <%= repoName %>-libsql
16
- image: ghcr.io/tursodatabase/libsql-server:latest
17
- restart: unless-stopped
18
- ports:
19
- - 8080:8080
20
- volumes:
21
- - ./libsql:/var/lib/sqld
22
- networks:
23
- - <%= repoName %>-network
24
13
  postgres:
25
14
  container_name: <%= repoName %>-postgres
26
- image: postgres:17
15
+ image: postgres:18
27
16
  restart: unless-stopped
28
17
  ports:
29
18
  - 5432:5432
@@ -32,6 +21,6 @@ services:
32
21
  - POSTGRES_USER=akan
33
22
  - POSTGRES_PASSWORD=akan
34
23
  volumes:
35
- - ./postgres:/var/lib/postgresql/data
24
+ - ./postgres:/var/lib/postgresql
36
25
  networks:
37
26
  - <%= repoName %>-network
@@ -6,16 +6,24 @@ interface Dict {
6
6
  models: string;
7
7
  sysName: string;
8
8
  }
9
- export default function getContent(scanInfo: AppInfo | LibInfo | null, dict: Dict) {
9
+ interface Options {
10
+ sharedGuards?: boolean;
11
+ }
12
+ export default function getContent(scanInfo: AppInfo | LibInfo | null, dict: Dict, options: Options = {}) {
13
+ // Admin lives in libs/shared; without it root and cru stay None, shut until the app names a guard of its own.
14
+ const guardImports = options.sharedGuards
15
+ ? `import { Admin } from "@libs/shared/srvkit";\nimport { endpoint, internal, Public, slice } from "akanjs/signal";`
16
+ : `import { endpoint, internal, None, Public, slice } from "akanjs/signal";`;
17
+ const writeGuard = options.sharedGuards ? "Admin" : "None";
10
18
  return `
11
- import { endpoint, internal, None, Public, slice } from "akanjs/signal";
19
+ ${guardImports}
12
20
 
13
21
  import * as srv from "../srv";
14
22
 
15
23
  export class ${dict.Model}Internal extends internal(srv.${dict.model}, ({ interval }) => ({})) {}
16
24
 
17
- export class ${dict.Model}Slice extends slice(srv.${dict.model}, { guards: { root: None, get: Public, cru: Public } }, (init) => ({
18
- inPublic: init()
25
+ export class ${dict.Model}Slice extends slice(srv.${dict.model}, { guards: { root: ${writeGuard}, get: Public, cru: ${writeGuard} } }, (init) => ({
26
+ inPublic: init({ guards: [Public] })
19
27
  .exec(function () {
20
28
  return this.${dict.model}Service.queryAny();
21
29
  }),
@@ -1,10 +1,5 @@
1
1
  {
2
- "extends": "../../tsconfig.json",
2
+ "extends": "<%= workspaceRootPath %>/tsconfig.json",
3
3
  "files": [],
4
- "include": ["**/*.ts", "**/*.tsx"],
5
- "references": [
6
- {
7
- "path": "./tsconfig.spec.json"
8
- }
9
- ]
4
+ "include": ["**/*.ts", "**/*.tsx"]
10
5
  }
@@ -0,0 +1,8 @@
1
+ # <%= model %> Service Abstract
2
+
3
+ <One sentence: the workflow or integration this service owns, stated as fact.>
4
+
5
+ ## Rules
6
+
7
+ - <An invariant the code obeys but cannot explain: a lifetime, a refusal, an ordering, and its reason.>
8
+ - <Two to five of them. If the service moves something through states, end the file with one arrow line.>
@@ -3,20 +3,20 @@ import"./index-q0y2jq9j.js";
3
3
  import {
4
4
  GlobalConfig,
5
5
  CloudApi
6
- } from "./index-myj01w9r.js";
6
+ } from "./index-srmay5jw.js";
7
7
  import {
8
8
  Workspace,
9
9
  runner,
10
10
  script,
11
11
  command
12
- } from "./index-6na0sd2b.js";
12
+ } from "./index-qdgzsnhg.js";
13
13
  import {
14
14
  AppExecutor
15
- } from "./index-p4p9t45x.js";
15
+ } from "./index-crmeqnmf.js";
16
16
  import"./index-6wwzs1bc.js";
17
17
  import {
18
18
  TunnelShare2
19
- } from "./index-gm76f0qb.js";
19
+ } from "./index-n3cv0tm4.js";
20
20
  import {
21
21
  writeClipboard
22
22
  } from "./index-p6pbz9n5.js";
@@ -3,28 +3,28 @@ import {
3
3
  Workspace,
4
4
  script,
5
5
  command
6
- } from "./index-6na0sd2b.js";
6
+ } from "./index-qdgzsnhg.js";
7
7
  import"./index-q0y2jq9j.js";
8
- import"./index-p4p9t45x.js";
8
+ import"./index-crmeqnmf.js";
9
9
  import"./index-6wwzs1bc.js";
10
10
  import {
11
11
  createWorkflowStepRegistry
12
- } from "./index-qhtj9y6j.js";
13
- import"./index-qh7brn20.js";
12
+ } from "./index-2446k7b4.js";
13
+ import"./index-22xtgmhn.js";
14
14
  import {
15
15
  ModuleScript
16
- } from "./index-xjc7gg65.js";
16
+ } from "./index-esk82rvk.js";
17
17
  import {
18
18
  PrimitiveScript
19
- } from "./index-te0y1c0m.js";
19
+ } from "./index-zqgj2rt2.js";
20
20
  import {
21
21
  ScalarScript
22
- } from "./index-vpx68e4x.js";
22
+ } from "./index-4m929vvn.js";
23
23
  import"./index-by5gpp8x.js";
24
- import"./index-v17gj504.js";
24
+ import"./index-18zybgkc.js";
25
25
  import {
26
26
  WorkflowRunner
27
- } from "./index-2pm1j01n.js";
27
+ } from "./index-txr7dj2g.js";
28
28
 
29
29
  // pkgs/@akanjs/cli/workflow/workflow.script.ts
30
30
  import { Logger } from "akanjs/common";
@@ -4,24 +4,25 @@ import {
4
4
  } from "./index-q0y2jq9j.js";
5
5
  import {
6
6
  GlobalConfig
7
- } from "./index-myj01w9r.js";
7
+ } from "./index-srmay5jw.js";
8
8
  import {
9
9
  Exec,
10
10
  Workspace,
11
11
  runner,
12
12
  script,
13
13
  command
14
- } from "./index-6na0sd2b.js";
14
+ } from "./index-qdgzsnhg.js";
15
15
  import {
16
16
  extractAgentBlock,
17
17
  collectScopeRecipeSources,
18
18
  renderScopeAgentBlock,
19
+ Linter,
19
20
  WorkspaceExecutor,
20
21
  SysExecutor,
21
22
  AppExecutor,
22
23
  LibExecutor,
23
24
  PkgExecutor
24
- } from "./index-p4p9t45x.js";
25
+ } from "./index-crmeqnmf.js";
25
26
  import"./index-6wwzs1bc.js";
26
27
  import {
27
28
  countBlocking,
@@ -32,43 +33,43 @@ import {
32
33
  collectRecipeSources2,
33
34
  scanRecipes2
34
35
  } from "./index-by5gpp8x.js";
35
- import"./index-qhtj9y6j.js";
36
- import"./index-v17gj504.js";
37
- import"./index-twq9p2sp.js";
36
+ import"./index-2446k7b4.js";
37
+ import"./index-18zybgkc.js";
38
+ import"./index-s5rhm04y.js";
38
39
  import {
39
40
  AgentScript
40
- } from "./index-kvzjda3v.js";
41
+ } from "./index-bwf965h6.js";
41
42
  import {
42
43
  ApplicationScript
43
- } from "./index-ns128c4q.js";
44
+ } from "./index-bftkz6cp.js";
44
45
  import {
45
46
  LibraryScript
46
- } from "./index-3mg4h788.js";
47
+ } from "./index-7ep8qtvp.js";
47
48
  import"./index-hwkygn9s.js";
48
49
  import"./index-7md2g9vw.js";
49
- import"./index-kcxmv48c.js";
50
+ import"./index-bhtmj233.js";
50
51
  import {
51
52
  PackageScript
52
- } from "./index-p0tew3fq.js";
53
+ } from "./index-ab0c38ea.js";
53
54
  import {
54
55
  getNpmRegistryUrl,
55
56
  getLatestPackageVersion
56
- } from "./index-57p9p179.js";
57
+ } from "./index-bc88j1ry.js";
57
58
  import {
58
59
  CloudScript2
59
- } from "./index-n8kt2wh6.js";
60
- import"./index-g9zghs4h.js";
61
- import"./index-3cymrzsb.js";
62
- import"./index-4cvpzkq6.js";
63
- import"./index-2pm1j01n.js";
64
- import"./index-qh7brn20.js";
65
- import"./index-xjc7gg65.js";
66
- import"./index-te0y1c0m.js";
67
- import"./index-vpx68e4x.js";
60
+ } from "./index-sq2dzkzm.js";
61
+ import"./index-3jrp517k.js";
62
+ import"./index-vqx8bdxz.js";
63
+ import"./index-53176s7j.js";
64
+ import"./index-txr7dj2g.js";
65
+ import"./index-22xtgmhn.js";
66
+ import"./index-esk82rvk.js";
67
+ import"./index-zqgj2rt2.js";
68
+ import"./index-4m929vvn.js";
68
69
  import {
69
70
  ContextScript
70
- } from "./index-4n4821gp.js";
71
- import"./index-sn7dnzq4.js";
71
+ } from "./index-10dkrrww.js";
72
+ import"./index-kwaq3n9n.js";
72
73
 
73
74
  // pkgs/@akanjs/cli/workspace/workspace.runner.ts
74
75
  import path from "path";
@@ -232,7 +233,7 @@ class WorkspaceRunner extends runner("workspace") {
232
233
  }
233
234
  async lint(exec, workspace, { fix = true, maxDiagnostics = defaultMaxDiagnostics } = {}) {
234
235
  const configPath = await WorkspaceRunner.resolveBiomeConfigPath(workspace);
235
- await workspace.spawn("./node_modules/.bin/biome", [
236
+ await workspace.spawn(`./node_modules/.bin/${Linter.biomeBinName}`, [
236
237
  "check",
237
238
  ...fix ? ["--write"] : [],
238
239
  "--no-errors-on-unmatched",
@@ -1,20 +0,0 @@
1
- // @bun
2
- import {
3
- CloudScript2
4
- } from "./index-n8kt2wh6.js";
5
- import"./index-57p9p179.js";
6
- import"./index-ns128c4q.js";
7
- import"./index-sn7dnzq4.js";
8
- import"./index-3mg4h788.js";
9
- import"./index-p0tew3fq.js";
10
- import"./index-myj01w9r.js";
11
- import"./index-6na0sd2b.js";
12
- import"./index-7md2g9vw.js";
13
- import"./index-hwkygn9s.js";
14
- import"./index-p4p9t45x.js";
15
- import"./index-6wwzs1bc.js";
16
- import"./index-kcxmv48c.js";
17
- import"./index-q0y2jq9j.js";
18
- export {
19
- CloudScript2 as CloudScript
20
- };
@@ -1,22 +0,0 @@
1
- // @bun
2
- import {
3
- ContextRunner2
4
- } from "./index-g9zghs4h.js";
5
- import"./index-2pm1j01n.js";
6
- import"./index-vpx68e4x.js";
7
- import"./index-te0y1c0m.js";
8
- import"./index-4cvpzkq6.js";
9
- import"./index-xjc7gg65.js";
10
- import"./index-qh7brn20.js";
11
- import"./index-v17gj504.js";
12
- import"./index-qhtj9y6j.js";
13
- import"./index-twq9p2sp.js";
14
- import"./index-3cymrzsb.js";
15
- import"./index-6na0sd2b.js";
16
- import"./index-p4p9t45x.js";
17
- import"./index-by5gpp8x.js";
18
- import"./index-6wwzs1bc.js";
19
- import"./index-q0y2jq9j.js";
20
- export {
21
- ContextRunner2 as ContextRunner
22
- };
@@ -1,31 +0,0 @@
1
- {
2
- "title": "In-Page Agent Rule",
3
- "description": "How an akan screen exposes itself to an in-page agent — st.tool, subscribed keys, built-ins, and the chat",
4
- "group": "core",
5
- "codegenPriority": 4,
6
- "deprecated": false,
7
- "scans": [
8
- {
9
- "type": "example",
10
- "description": "Components publishing an agent tool beside the control that already performs the action",
11
- "path": "{apps,libs}/*/**/*.tsx",
12
- "sample": 4
13
- }
14
- ],
15
- "update": {
16
- "filePath": "./agentRule.instruction.md",
17
- "contents": [
18
- "what a declaration publishes",
19
- "mounting the chat",
20
- "publishing a tool",
21
- "forms and reading state",
22
- "built-in tools"
23
- ],
24
- "rules": [
25
- "Use current Akan APIs only",
26
- "State the rule before the reason, and keep the reason to one clause",
27
- "Never describe a store class as an exposure surface — only st.tool and subscribed keys publish",
28
- "Keep it workspace-neutral — no app or repo names"
29
- ]
30
- }
31
- }
@@ -1,31 +0,0 @@
1
- {
2
- "title": "Component Rule",
3
- "description": "Shared component implementation rules",
4
- "group": "core",
5
- "docsSource": "apps/akan/page/(docs)/references/ui/overview.tsx",
6
- "codegenPriority": 3,
7
- "deprecated": false,
8
- "scans": [
9
- {
10
- "type": "docs",
11
- "description": "Current docs source for Component Rule",
12
- "path": "apps/akan/page/(docs)/references/ui/overview.tsx"
13
- },
14
- {
15
- "type": "example",
16
- "description": "Existing Akan implementation examples",
17
- "path": "{apps,libs}/*/lib/**/*.ts",
18
- "sample": 4
19
- }
20
- ],
21
- "update": {
22
- "filePath": "./componentRule.instruction.md",
23
- "contents": ["purpose", "file ownership", "current API patterns", "codegen rules", "validation checklist"],
24
- "rules": [
25
- "Use current Akan APIs only",
26
- "Keep output parseable for codegen",
27
- "Include ownership boundaries and review checklist"
28
- ]
29
- },
30
- "page": "apps/akan/page/(docs)/references/ui/overview.tsx"
31
- }
@@ -1,25 +0,0 @@
1
- {
2
- "title": "Workspace Conventions",
3
- "description": "The tool-neutral Akan convention set rendered into every workspace AGENTS.md managed block",
4
- "group": "core",
5
- "codegenPriority": 1,
6
- "deprecated": false,
7
- "scans": [],
8
- "update": {
9
- "filePath": "./conventions.instruction.md",
10
- "contents": [
11
- "change scope",
12
- "lint-enforced rules",
13
- "coding style and comments",
14
- "client/server boundaries and SSR",
15
- "domain module, service, signal, and scalar conventions",
16
- "page routing, sync layout, and layer placement"
17
- ],
18
- "rules": [
19
- "Use current Akan APIs only",
20
- "State the rule and the reason it exists, never restate a type signature",
21
- "Name the .grit rule that enforces a rule wherever one does",
22
- "Keep it workspace-neutral — no app or repo names, since every workspace renders this file"
23
- ]
24
- }
25
- }
@@ -1,31 +0,0 @@
1
- {
2
- "title": "CSS Rule",
3
- "description": "Tailwind and akanjs/ui (semantic token) styling rules",
4
- "group": "core",
5
- "docsSource": "apps/akan/page/(docs)/docs/arch/css.tsx",
6
- "codegenPriority": 3,
7
- "deprecated": false,
8
- "scans": [
9
- {
10
- "type": "docs",
11
- "description": "Current docs source for CSS Rule",
12
- "path": "apps/akan/page/(docs)/docs/arch/css.tsx"
13
- },
14
- {
15
- "type": "example",
16
- "description": "Existing Akan implementation examples",
17
- "path": "{apps,libs}/*/lib/**/*.ts",
18
- "sample": 4
19
- }
20
- ],
21
- "update": {
22
- "filePath": "./cssRule.instruction.md",
23
- "contents": ["purpose", "file ownership", "current API patterns", "codegen rules", "validation checklist"],
24
- "rules": [
25
- "Use current Akan APIs only",
26
- "Keep output parseable for codegen",
27
- "Include ownership boundaries and review checklist"
28
- ]
29
- },
30
- "page": "apps/akan/page/(docs)/docs/arch/css.tsx"
31
- }