@akanjs/cli 3.0.0-beta.32 → 3.0.0-beta.33
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
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
1bb6283347f650f636a203ca35f7b9f6592d8435f39d08d74d90acdedbb5ce91
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@akanjs/cli",
|
|
3
|
-
"version": "3.0.0-beta.
|
|
3
|
+
"version": "3.0.0-beta.33",
|
|
4
4
|
"sourceType": "module",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"publishConfig": {
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"@earendil-works/pi-tui": "0.86.1",
|
|
40
40
|
"@inquirer/prompts": "^8.4.3",
|
|
41
41
|
"@tailwindcss/node": "^4.3.0",
|
|
42
|
-
"akanjs": "3.0.0-beta.
|
|
42
|
+
"akanjs": "3.0.0-beta.33",
|
|
43
43
|
"chalk": "^5.6.2",
|
|
44
44
|
"commander": "^14.0.3",
|
|
45
45
|
"dayjs": "^1.11.20",
|
|
@@ -1,26 +1,15 @@
|
|
|
1
1
|
import type { AppInfo, LibInfo } from "akanjs";
|
|
2
2
|
|
|
3
|
-
export default function getContent(
|
|
4
|
-
|
|
5
|
-
|
|
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";
|
|
3
|
+
export default function getContent(scanInfo: AppInfo | LibInfo | null, dict: { appName: string }) {
|
|
4
|
+
return `import type { DocumentModel } from "akanjs/constant";
|
|
5
|
+
import { getOrSetupSignalTestFetch, sampleOf } from "akanjs/test";
|
|
17
6
|
|
|
18
7
|
import * as cnst from "../cnst";
|
|
19
8
|
import type { fetch as appFetch } from "../useServer";
|
|
20
9
|
|
|
21
10
|
type AppFetch = typeof appFetch;
|
|
22
11
|
|
|
23
|
-
const getFetch = async () =>
|
|
12
|
+
const getFetch = async () => await getOrSetupSignalTestFetch<AppFetch>();
|
|
24
13
|
|
|
25
14
|
export interface TaskAgent {
|
|
26
15
|
task: cnst.Task;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import type { AppInfo, LibInfo } from "akanjs";
|
|
2
2
|
|
|
3
3
|
export default function getContent(scanInfo: AppInfo | LibInfo | null, dict: { appName: string }) {
|
|
4
|
-
return `import {
|
|
5
|
-
import { endpoint, internal, None, Public, slice } from "akanjs/signal";
|
|
4
|
+
return `import { endpoint, internal, None, Public, slice } from "akanjs/signal";
|
|
6
5
|
|
|
7
6
|
import * as cnst from "../cnst";
|
|
8
7
|
import * as srv from "../srv";
|
|
@@ -23,23 +22,26 @@ import * as srv from "../srv";
|
|
|
23
22
|
export class TaskInternal extends internal(srv.task, ({ interval }) => ({})) {}
|
|
24
23
|
|
|
25
24
|
// Guards, per key: root = the generated admin API (runs any filter with caller-supplied args), get = reads,
|
|
26
|
-
// cru = create/update/remove.
|
|
27
|
-
|
|
25
|
+
// cru = create/update/remove. None here means "nobody until you name a guard".
|
|
26
|
+
// The sample lets guests write so it works before the app has sign-in. Once it does, swap Public for SignedIn
|
|
27
|
+
// (srvkit/guards.ts) on cru and on the mutations below — a real app never leaves writes Public.
|
|
28
|
+
export class TaskSlice extends slice(srv.task, { guards: { root: None, get: Public, cru: Public } }, (init) => ({
|
|
28
29
|
inPublic: init({ guards: [Public] }).exec(function () {
|
|
29
30
|
return this.taskService.queryAny();
|
|
30
31
|
}),
|
|
31
32
|
})) {}
|
|
32
33
|
|
|
33
34
|
// Every custom endpoint names its own guards array — the slice's map above only covers generated CRUD.
|
|
34
|
-
// It is also the MCP decision: an endpoint declaring no guard
|
|
35
|
+
// It is also the MCP decision: an endpoint declaring no guard, or a mutation guarded only by Public, is not
|
|
36
|
+
// published to agents at all.
|
|
35
37
|
export class TaskEndpoint extends endpoint(srv.task, ({ mutation }) => ({
|
|
36
|
-
startTask: mutation(cnst.Task, { guards: [
|
|
38
|
+
startTask: mutation(cnst.Task, { guards: [Public] })
|
|
37
39
|
.param("taskId", String)
|
|
38
40
|
.exec(async function (taskId) {
|
|
39
41
|
return await this.taskService.startTask(taskId);
|
|
40
42
|
}),
|
|
41
43
|
|
|
42
|
-
completeTask: mutation(cnst.Task, { guards: [
|
|
44
|
+
completeTask: mutation(cnst.Task, { guards: [Public] })
|
|
43
45
|
.param("taskId", String)
|
|
44
46
|
.exec(async function (taskId) {
|
|
45
47
|
return await this.taskService.completeTask(taskId);
|
|
@@ -6,6 +6,12 @@ the framework generate the repeated surfaces.
|
|
|
6
6
|
For agent-neutral documentation that Claude Code, Codex, Devin, GitHub Copilot Coding Agent, and other tools can
|
|
7
7
|
also read, see `docs/AI-DEVELOPMENT.md` and `docs/GENERATED.md`.
|
|
8
8
|
|
|
9
|
+
## Framework Bugs And Feature Requests
|
|
10
|
+
|
|
11
|
+
If you hit an Akan.js bug, or a fix that one framework change would solve more easily than app-level workarounds,
|
|
12
|
+
draft a GitHub issue for <https://github.com/akan-team/akanjs/issues> (version, repro, expected vs actual) and ask
|
|
13
|
+
the user before filing it. Keep any interim workaround small and marked `// TODO: <issue url>`.
|
|
14
|
+
|
|
9
15
|
## Generated Context
|
|
10
16
|
|
|
11
17
|
The section below is regenerated by `akan agent install` (run `bun run setup:agent`). It lists this
|