@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.
- package/.build-stamp +1 -1
- package/{CodeAgent-gjqnc2mg.js → CodeAgent-6cm97kay.js} +2 -2
- package/{CodeAgentRpcHost-qvwfv0n9.js → CodeAgentRpcHost-p7h6n2hp.js} +1 -1
- package/CodeAgentRpcListener-7p7z5dd7.js +97 -0
- package/{CodeTui-nd9hqvrw.js → CodeTui-za4jsm41.js} +205 -34
- package/{TunnelShare-r5tc2qk5.js → TunnelShare-2j6s511d.js} +2 -2
- package/{agent.command-n664dtcv.js → agent.command-e0wpbbyg.js} +6 -6
- package/akanCode.js +7 -5
- package/{application.command-t5542jte.js → application.command-8wyxqc8q.js} +28 -15
- package/{applicationBuildRunner-x4gbfn7y.js → applicationBuildRunner-n9gzaxd0.js} +35 -10
- package/{applicationReleasePackager-z61ep017.js → applicationReleasePackager-vpggfqgq.js} +1 -1
- package/buildBatch.proc.js +3 -3
- package/{capacitorApp-shv3ajh5.js → capacitorApp-q3z0qht0.js} +2 -2
- package/{cloud.command-dk5tj39k.js → cloud.command-4zwa5dsx.js} +34 -12
- package/cloud.script-fwx3vb34.js +20 -0
- package/{code.command-88sebgnn.js → code.command-468c9d7s.js} +41 -19
- package/commandManifest.json +1 -1
- package/{context.command-pqsm5jrk.js → context.command-dsnw0jby.js} +14 -14
- package/context.runner-rs4rj15d.js +22 -0
- package/{dependencyScanner-shs82ynp.js → dependencyScanner-0z2h2tks.js} +1 -1
- package/{devTui-gy6mendg.js → devTui-ffjsarqa.js} +3 -3
- package/{devTuiView-y1548wy6.js → devTuiView-1q1mdgrv.js} +1 -1
- package/{guideline.command-rpc2emw8.js → guideline.command-vhw13pqr.js} +8 -13
- package/guidelines/agentRule/agentRule.instruction.md +27 -10
- package/guidelines/conventions/conventions.instruction.md +53 -26
- package/guidelines/queryRule/queryRule.instruction.md +17 -7
- package/guidelines/runtimeRule/runtimeRule.instruction.md +74 -0
- package/guidelines/ssrRule/ssrRule.instruction.md +4 -2
- package/guidelines/transportRule/transportRule.instruction.md +10 -8
- package/guidelines/workspaceRecipes/workspaceRecipes.instruction.md +4 -3
- package/incrementalBuilder.proc.js +3 -2
- package/{index-4n4821gp.js → index-10dkrrww.js} +4 -4
- package/{index-bzakk0c2.js → index-14zrtgfa.js} +5 -3
- package/{index-v17gj504.js → index-18zybgkc.js} +2 -2
- package/{index-qh7brn20.js → index-22xtgmhn.js} +6 -2
- package/{index-qhtj9y6j.js → index-2446k7b4.js} +74 -21
- package/{index-g9zghs4h.js → index-3jrp517k.js} +12 -12
- package/{index-vpx68e4x.js → index-4m929vvn.js} +2 -2
- package/{index-4cvpzkq6.js → index-53176s7j.js} +3 -3
- package/{index-jwrpsrg3.js → index-667w0yah.js} +1 -1
- package/{index-3mg4h788.js → index-7ep8qtvp.js} +2 -2
- package/{index-w8kmx1b6.js → index-89hy31kf.js} +30 -7
- package/index-9d6nvkz2.js +656 -0
- package/index-9dp031by.js +12 -0
- package/{index-zn8qgeqx.js → index-a1w6934z.js} +3 -3
- package/{index-p0tew3fq.js → index-ab0c38ea.js} +10 -5
- package/index-bc88j1ry.js +1166 -0
- package/{index-ns128c4q.js → index-bftkz6cp.js} +280 -73
- package/{index-kcxmv48c.js → index-bhtmj233.js} +4 -1
- package/{index-kvzjda3v.js → index-bwf965h6.js} +5 -5
- package/{index-p4p9t45x.js → index-crmeqnmf.js} +56 -44
- package/{index-8k16atqy.js → index-d2242ksy.js} +23 -6
- package/{index-2sq06vv0.js → index-e4v6vhxq.js} +417 -105
- package/{index-xjc7gg65.js → index-esk82rvk.js} +23 -33
- package/{index-sn7dnzq4.js → index-kwaq3n9n.js} +1 -1
- package/{index-gm76f0qb.js → index-n3cv0tm4.js} +1 -1
- package/{index-6na0sd2b.js → index-qdgzsnhg.js} +5 -2
- package/{index-twq9p2sp.js → index-s5rhm04y.js} +0 -6
- package/{index-n8kt2wh6.js → index-sq2dzkzm.js} +35 -10
- package/{index-myj01w9r.js → index-srmay5jw.js} +15 -2
- package/{index-2pm1j01n.js → index-txr7dj2g.js} +4 -4
- package/{index-3cymrzsb.js → index-vqx8bdxz.js} +17 -3
- package/{index-te0y1c0m.js → index-zqgj2rt2.js} +12 -7
- package/index.js +21 -21
- package/{library.command-m8p2r1dh.js → library.command-cqr175dy.js} +3 -3
- package/{localRegistry.command-yppdqrxv.js → localRegistry.command-49z55qqz.js} +9 -9
- package/{module.command-mfzvqt0n.js → module.command-9p8mm3b0.js} +5 -5
- package/{package.command-cgp2p2v5.js → package.command-wxyz909t.js} +5 -5
- package/package.json +2 -2
- package/{page.command-taenb02b.js → page.command-gsrsfqqs.js} +3 -3
- package/{primitive.command-7kpncmkk.js → primitive.command-ns1mptje.js} +6 -6
- package/{prompter-9mn3kp36.js → prompter-1f8d9pcc.js} +1 -1
- package/{quality.command-1ar94hrw.js → quality.command-e76k2q9k.js} +18 -17
- package/{repair.command-n08t6j8p.js → repair.command-pkrsm3cw.js} +5 -5
- package/{routeSourceValidator-apyqw7wk.js → routeSourceValidator-7ycnfz0e.js} +0 -6
- package/{scalar.command-mq8qfp4t.js → scalar.command-0cpt3fc8.js} +4 -4
- package/skills/akan-code/SKILL.md +122 -0
- package/skills/akan-module/SKILL.md +2 -2
- package/skills/akan-store/SKILL.md +6 -2
- package/{subspace.command-jqv5n79w.js → subspace.command-fktpwp0g.js} +20 -10
- package/templates/__scalar/__model__/__model__.abstract.md.template +8 -0
- package/templates/appSample/lib/__scalar/workHistory/workHistory.abstract.ts +8 -39
- package/templates/appSample/lib/_noti/noti.abstract.ts +6 -29
- package/templates/appSample/lib/task/task.abstract.ts +12 -32
- package/templates/appSample/lib/task/task.signal.spec.ts +15 -18
- package/templates/appSample/lib/task/task.signal.test.ts +15 -1
- package/templates/appSample/lib/task/task.signal.ts +1 -1
- package/templates/appSample/srvkit/AuthGuard.ts +4 -1
- package/templates/appSample/srvkit/SessionInternalArg.ts +3 -1
- package/templates/crudPages/[__model__Id]/edit/page.tsx +2 -1
- package/templates/crudPages/[__model__Id]/page.tsx +2 -1
- package/templates/crudPages/new/page.tsx +2 -1
- package/templates/crudPages/page.tsx +2 -1
- package/templates/crudSinglePage/page.tsx +2 -1
- package/templates/localDev/docker-compose.yaml.template +3 -14
- package/templates/module/__model__.signal.ts +12 -4
- package/templates/pkgRoot/tsconfig.json.template +2 -7
- package/templates/service/__model__.abstract.md.template +8 -0
- package/{tunnel.command-ht2es78c.js → tunnel.command-d5jy9gk8.js} +4 -4
- package/{workflow.command-tvz4nm9n.js → workflow.command-6tkcysmx.js} +9 -9
- package/{workspace.command-txv1yv5e.js → workspace.command-gv84eh1p.js} +25 -24
- package/cloud.script-ch3xrw3s.js +0 -20
- package/context.runner-bys6ykcp.js +0 -22
- package/guidelines/agentRule/agentRule.generate.json +0 -31
- package/guidelines/componentRule/componentRule.generate.json +0 -31
- package/guidelines/conventions/conventions.generate.json +0 -25
- package/guidelines/cssRule/cssRule.generate.json +0 -31
- package/guidelines/docPageRule/docPageRule.generate.json +0 -31
- package/guidelines/docPageRule/docPageRule.instruction.md +0 -25
- package/guidelines/docSyncRule/docSyncRule.generate.json +0 -31
- package/guidelines/docSyncRule/docSyncRule.instruction.md +0 -25
- package/guidelines/enumConstant/enumConstant.generate.json +0 -31
- package/guidelines/enumConstant/enumConstant.instruction.md +0 -28
- package/guidelines/fieldRule/fieldRule.generate.json +0 -31
- package/guidelines/framework/framework.generate.json +0 -32
- package/guidelines/mcpRule/mcpRule.generate.json +0 -35
- package/guidelines/modelConstant/modelConstant.generate.json +0 -32
- package/guidelines/modelDictionary/modelDictionary.generate.json +0 -32
- package/guidelines/modelDocument/modelDocument.generate.json +0 -31
- package/guidelines/modelService/modelService.generate.json +0 -31
- package/guidelines/modelSignal/modelSignal.generate.json +0 -31
- package/guidelines/modelStore/modelStore.generate.json +0 -31
- package/guidelines/modelTemplate/modelTemplate.generate.json +0 -31
- package/guidelines/modelUnit/modelUnit.generate.json +0 -31
- package/guidelines/modelUtil/modelUtil.generate.json +0 -31
- package/guidelines/modelView/modelView.generate.json +0 -31
- package/guidelines/modelZone/modelZone.generate.json +0 -31
- package/guidelines/moduleCodegen/moduleCodegen.generate.json +0 -31
- package/guidelines/moduleCodegen/moduleCodegen.instruction.md +0 -28
- package/guidelines/moduleOverview/moduleOverview.generate.json +0 -31
- package/guidelines/queryRule/queryRule.generate.json +0 -31
- package/guidelines/recipeRule/recipeRule.generate.json +0 -31
- package/guidelines/runtimeRule/runtimeRule.generate.json +0 -25
- package/guidelines/scalarConstant/scalarConstant.generate.json +0 -32
- package/guidelines/scalarDictionary/scalarDictionary.generate.json +0 -32
- package/guidelines/scalarModule/scalarModule.generate.json +0 -31
- package/guidelines/sharedUiUsage/sharedUiUsage.generate.json +0 -31
- package/guidelines/sharedUiUsage/sharedUiUsage.instruction.md +0 -25
- package/guidelines/ssrRule/ssrRule.generate.json +0 -31
- package/guidelines/transportRule/transportRule.generate.json +0 -31
- package/guidelines/utilUiUsage/utilUiUsage.generate.json +0 -31
- package/guidelines/utilUiUsage/utilUiUsage.instruction.md +0 -25
- package/guidelines/workspaceOnboarding/workspaceOnboarding.generate.json +0 -24
- package/guidelines/workspaceRecipes/workspaceRecipes.generate.json +0 -34
- package/index-57p9p179.js +0 -461
- package/index-qt8dqgnf.js +0 -250
- package/templates/__scalar/__model__/__model__.abstract.md +0 -28
- package/templates/module/__model__.abstract.md +0 -28
- package/templates/service/__model__.abstract.md +0 -28
|
@@ -1,16 +1,26 @@
|
|
|
1
1
|
import type { AppInfo, LibInfo } from "akanjs";
|
|
2
2
|
|
|
3
|
-
export default function getContent(
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
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({
|
|
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
|
-
|
|
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
|
-
|
|
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 "
|
|
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 "
|
|
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 "
|
|
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 "
|
|
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 "
|
|
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:
|
|
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
|
|
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
|
-
|
|
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
|
-
|
|
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:
|
|
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
|
}),
|
|
@@ -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-
|
|
6
|
+
} from "./index-srmay5jw.js";
|
|
7
7
|
import {
|
|
8
8
|
Workspace,
|
|
9
9
|
runner,
|
|
10
10
|
script,
|
|
11
11
|
command
|
|
12
|
-
} from "./index-
|
|
12
|
+
} from "./index-qdgzsnhg.js";
|
|
13
13
|
import {
|
|
14
14
|
AppExecutor
|
|
15
|
-
} from "./index-
|
|
15
|
+
} from "./index-crmeqnmf.js";
|
|
16
16
|
import"./index-6wwzs1bc.js";
|
|
17
17
|
import {
|
|
18
18
|
TunnelShare2
|
|
19
|
-
} from "./index-
|
|
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-
|
|
6
|
+
} from "./index-qdgzsnhg.js";
|
|
7
7
|
import"./index-q0y2jq9j.js";
|
|
8
|
-
import"./index-
|
|
8
|
+
import"./index-crmeqnmf.js";
|
|
9
9
|
import"./index-6wwzs1bc.js";
|
|
10
10
|
import {
|
|
11
11
|
createWorkflowStepRegistry
|
|
12
|
-
} from "./index-
|
|
13
|
-
import"./index-
|
|
12
|
+
} from "./index-2446k7b4.js";
|
|
13
|
+
import"./index-22xtgmhn.js";
|
|
14
14
|
import {
|
|
15
15
|
ModuleScript
|
|
16
|
-
} from "./index-
|
|
16
|
+
} from "./index-esk82rvk.js";
|
|
17
17
|
import {
|
|
18
18
|
PrimitiveScript
|
|
19
|
-
} from "./index-
|
|
19
|
+
} from "./index-zqgj2rt2.js";
|
|
20
20
|
import {
|
|
21
21
|
ScalarScript
|
|
22
|
-
} from "./index-
|
|
22
|
+
} from "./index-4m929vvn.js";
|
|
23
23
|
import"./index-by5gpp8x.js";
|
|
24
|
-
import"./index-
|
|
24
|
+
import"./index-18zybgkc.js";
|
|
25
25
|
import {
|
|
26
26
|
WorkflowRunner
|
|
27
|
-
} from "./index-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
36
|
-
import"./index-
|
|
37
|
-
import"./index-
|
|
36
|
+
import"./index-2446k7b4.js";
|
|
37
|
+
import"./index-18zybgkc.js";
|
|
38
|
+
import"./index-s5rhm04y.js";
|
|
38
39
|
import {
|
|
39
40
|
AgentScript
|
|
40
|
-
} from "./index-
|
|
41
|
+
} from "./index-bwf965h6.js";
|
|
41
42
|
import {
|
|
42
43
|
ApplicationScript
|
|
43
|
-
} from "./index-
|
|
44
|
+
} from "./index-bftkz6cp.js";
|
|
44
45
|
import {
|
|
45
46
|
LibraryScript
|
|
46
|
-
} from "./index-
|
|
47
|
+
} from "./index-7ep8qtvp.js";
|
|
47
48
|
import"./index-hwkygn9s.js";
|
|
48
49
|
import"./index-7md2g9vw.js";
|
|
49
|
-
import"./index-
|
|
50
|
+
import"./index-bhtmj233.js";
|
|
50
51
|
import {
|
|
51
52
|
PackageScript
|
|
52
|
-
} from "./index-
|
|
53
|
+
} from "./index-ab0c38ea.js";
|
|
53
54
|
import {
|
|
54
55
|
getNpmRegistryUrl,
|
|
55
56
|
getLatestPackageVersion
|
|
56
|
-
} from "./index-
|
|
57
|
+
} from "./index-bc88j1ry.js";
|
|
57
58
|
import {
|
|
58
59
|
CloudScript2
|
|
59
|
-
} from "./index-
|
|
60
|
-
import"./index-
|
|
61
|
-
import"./index-
|
|
62
|
-
import"./index-
|
|
63
|
-
import"./index-
|
|
64
|
-
import"./index-
|
|
65
|
-
import"./index-
|
|
66
|
-
import"./index-
|
|
67
|
-
import"./index-
|
|
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-
|
|
71
|
-
import"./index-
|
|
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(
|
|
236
|
+
await workspace.spawn(`./node_modules/.bin/${Linter.biomeBinName}`, [
|
|
236
237
|
"check",
|
|
237
238
|
...fix ? ["--write"] : [],
|
|
238
239
|
"--no-errors-on-unmatched",
|
package/cloud.script-ch3xrw3s.js
DELETED
|
@@ -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
|
-
}
|