@akanjs/cli 3.1.0-rc.8 → 3.1.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 +1 -1
- package/{CodeAgent-rkjyxgec.js → CodeAgent-c53dm40p.js} +2 -2
- package/{CodeAgentRpcHost-p7h6n2hp.js → CodeAgentRpcHost-9g27hmer.js} +1 -1
- package/{CodeTui-h7pyj6xa.js → CodeTui-xz9jtrn3.js} +47 -4
- package/README.ko.md +1 -1
- package/README.md +1 -1
- package/TunnelShare-59zd4j8n.js +14 -0
- package/{agent.command-3qxf4xcj.js → agent.command-qawf7z4s.js} +5 -5
- package/akanCode.js +7 -5
- package/{application.command-m1kcd7jf.js → application.command-jqrgqk6j.js} +35 -9
- package/{applicationBuildRunner-dj0xkrep.js → applicationBuildRunner-grgrey5c.js} +23 -8
- package/buildBatch.proc.js +9 -9
- package/{cloud.command-3jzym8q7.js → cloud.command-p9067ssj.js} +13 -13
- package/cloud.script-f0r4ce7j.js +24 -0
- package/{code.command-0ad6gw2a.js → code.command-t6j55sbk.js} +25 -12
- package/commandManifest.json +1 -1
- package/{context.command-0qx447mb.js → context.command-eqbzbgth.js} +16 -16
- package/context.runner-1cs88ags.js +25 -0
- package/{guideline.command-cv5bmrx2.js → guideline.command-w905q73w.js} +2 -2
- package/guidelines/agentRule/agentRule.instruction.md +25 -10
- package/guidelines/conventions/conventions.instruction.md +71 -24
- package/guidelines/fieldRule/fieldRule.instruction.md +17 -0
- package/guidelines/mcpRule/mcpRule.instruction.md +93 -48
- package/guidelines/modelDocument/modelDocument.instruction.md +2 -1
- package/guidelines/modelStore/modelStore.instruction.md +7 -0
- package/guidelines/pageRule/pageRule.instruction.md +55 -8
- package/guidelines/queryRule/queryRule.instruction.md +24 -10
- package/guidelines/runtimeRule/runtimeRule.instruction.md +12 -4
- package/guidelines/ssrRule/ssrRule.instruction.md +9 -6
- package/guidelines/transportRule/transportRule.instruction.md +36 -5
- package/guidelines/workspaceOnboarding/workspaceOnboarding.instruction.md +5 -3
- package/guidelines/workspaceRecipes/workspaceRecipes.instruction.md +28 -8
- package/incrementalBuilder.proc.js +3 -3
- package/{index-j4mkhz93.js → index-0dd6z4b9.js} +3 -3
- package/{index-h47cf1gg.js → index-1de5f0qq.js} +7 -7
- package/{index-6xn2n442.js → index-1enc9rga.js} +4 -4
- package/index-25ks6x4k.js +643 -0
- package/{index-wa5jbxj1.js → index-2mrn1mrg.js} +1 -0
- package/{index-qwa5k1j8.js → index-3aynkpf8.js} +1 -1
- package/{index-vk0pa0mn.js → index-3hvmytbs.js} +2 -1
- package/{index-w44cy4vs.js → index-45c0mxb6.js} +2 -2
- package/{index-fyq1z6kt.js → index-48n4yhm4.js} +3 -3
- package/{index-192ha4xh.js → index-64pjry21.js} +1 -1
- package/{index-5edzv8fn.js → index-aqwdjn4x.js} +2 -2
- package/{index-d2242ksy.js → index-at7bz0xq.js} +3 -0
- package/{index-9z426msb.js → index-avjqbtkj.js} +7 -6
- package/{index-20bxxyvn.js → index-bs9yr4we.js} +40 -2
- package/{index-d72hfmdm.js → index-cgexcnwd.js} +8 -8
- package/{index-1xj2t7cb.js → index-dkfadmrx.js} +7 -7
- package/{index-35hc95h5.js → index-eabfsarf.js} +1 -1
- package/{index-pydbnfez.js → index-er62k6w3.js} +35 -9
- package/{index-1p98exm2.js → index-f2gfq0yh.js} +2 -2
- package/{index-jw1zm273.js → index-fbw3kmt5.js} +54 -10
- package/{index-4mhy6qme.js → index-fnqj2d2w.js} +4 -4
- package/{index-awbdfcf2.js → index-hqh4mpgt.js} +4 -4
- package/{index-fmzcs8v6.js → index-j4dzazmw.js} +4 -4
- package/{index-va06nr10.js → index-n8dsax1f.js} +64 -19
- package/{index-g1mbppa9.js → index-nr8m4j21.js} +5 -5
- package/{index-86jt2a0e.js → index-qh73jnyb.js} +1 -1
- package/{index-8fp3b47h.js → index-vtj332gj.js} +281 -46
- package/{index-tamvyvj3.js → index-wt7m1hfc.js} +3 -3
- package/{index-cpb3nvma.js → index-yfy3t4kw.js} +2 -2
- package/{index-trpasv9q.js → index-yyxy7aff.js} +1 -1
- package/{index-d47ypebv.js → index-z5cxrbvv.js} +75 -19
- package/index.js +40 -22
- package/{library.command-erp2f56n.js → library.command-z1v7zepj.js} +3 -3
- package/{localRegistry.command-xxpqgxjw.js → localRegistry.command-48n23bjy.js} +12 -12
- package/{module.command-gs2r615e.js → module.command-rv307dk7.js} +5 -5
- package/{package.command-7343f74r.js → package.command-7xkzc8m1.js} +3 -3
- package/package.json +22 -22
- package/{page.command-4h4a8pnh.js → page.command-34hpdt7v.js} +3 -3
- package/{pipeline.command-a2nrk26m.js → pipeline.command-ckvhrpyg.js} +2 -2
- package/{primitive.command-w6t0asqz.js → primitive.command-em0twr5a.js} +6 -6
- package/{projectTypecheck-f534enqj.js → projectTypecheck-fy6hn05y.js} +1 -1
- package/{quality.command-77x7vbbx.js → quality.command-c6p2819k.js} +2 -2
- package/{repair.command-y6sstev7.js → repair.command-j6czdgrv.js} +5 -5
- package/{routeSourceValidator-7ycnfz0e.js → routeSourceValidator-6jd0q6r6.js} +47 -14
- package/{scalar.command-20b8cy0k.js → scalar.command-17e20sj2.js} +4 -4
- package/skills/akan-code/SKILL.md +4 -0
- package/skills/akan-store/SKILL.md +4 -2
- package/{subspace.command-92xkc0s0.js → subspace.command-n3j7vv0w.js} +8 -17
- package/templates/migration/__migrationId__.ts +23 -0
- package/templates/server.ts +8 -1
- package/templates/workspaceRoot/.gitignore.template +1 -1
- package/templates/workspaceRoot/biome.json.template +1 -1
- package/{tunnel.command-2kw8vt9g.js → tunnel.command-cm578f4s.js} +7 -7
- package/{workflow.command-2djwmpqf.js → workflow.command-h9vkr6jb.js} +10 -10
- package/{workspace.command-5se6spqb.js → workspace.command-tp8ysvjs.js} +30 -28
- package/TunnelShare-661cxz5e.js +0 -14
- package/cloud.script-r4nskbc6.js +0 -24
- package/context.runner-1vsjztjg.js +0 -25
- package/index-665zp9rs.js +0 -271
|
@@ -142,7 +142,19 @@ export class TaskService extends serve(db.task, ({ plug }) => ({
|
|
|
142
142
|
}
|
|
143
143
|
```
|
|
144
144
|
|
|
145
|
-
|
|
145
|
+
To reach the file itself (a `Bun.file()` response with ranges, a CLI tool, a size check), ask the role where it
|
|
146
|
+
lives: `this.storage.resolveLocalPath?.(path, access)` (`access` optional) answers the absolute disk path
|
|
147
|
+
`BlobStorage` uses, picking the root as its writes do with `access` and by the `private/` prefix without it. It
|
|
148
|
+
answers `null` for a key that is rooted, holds a NUL, or leaves that root — refuse that key, never fall back to
|
|
149
|
+
`readData()` for it. Fall back only when the adaptor has no `resolveLocalPath` at all (object storage). **A key
|
|
150
|
+
that reaches you from a request passes `access: "public"`**: without it a `private/` key resolves under the private
|
|
151
|
+
root, so a public route would serve private files. Never cast the role to reach `root` / `privateRoot`.
|
|
152
|
+
|
|
153
|
+
For a custom adapter class (not a predefined role), pass the class itself, e.g. `ipfsApi: plug(IpfsApi)`. Two framework
|
|
154
|
+
adapters are plugged that way: `rateLimit: plug(RateLimit)` to count a business key, and
|
|
155
|
+
`endpointCache: plug(EndpointCacheControl)` to drop an endpoint's `{ cache }` answers after the write that made them
|
|
156
|
+
stale: `await this.endpointCache.invalidate("bannerListInPublic")`, plus `"bannerInsightInPublic"` for a slice's
|
|
157
|
+
count.
|
|
146
158
|
Injecting a file/image field is usually simpler than calling
|
|
147
159
|
storage directly: declare `image: field(File).optional()` (or `images: field([File])`) on the model and let the
|
|
148
160
|
store's generated `upload<Field>On<Model>(fileList)` action handle the upload. Add `{ cascade: "removeRef" }` to that
|
|
@@ -286,7 +298,11 @@ async startTask(taskId: string) {
|
|
|
286
298
|
|
|
287
299
|
// 6. <Model>.Util.tsx — Reusable button component
|
|
288
300
|
export const Start = ({ taskId }: { taskId: string }) => (
|
|
289
|
-
<button
|
|
301
|
+
<button
|
|
302
|
+
type="button"
|
|
303
|
+
className={buttonRecipe({ variant: "primary", size: "xs" })}
|
|
304
|
+
onClick={() => st.do.startTask(taskId)}
|
|
305
|
+
>
|
|
290
306
|
Start
|
|
291
307
|
</button>
|
|
292
308
|
);
|
|
@@ -410,9 +426,9 @@ export default page()
|
|
|
410
426
|
.config({ transition: "stack" })
|
|
411
427
|
.head(({ projectId }) => <title>{projectId}</title>)
|
|
412
428
|
.prompt("briefProject", "Brief one project: its status and what is due.")
|
|
413
|
-
.render(
|
|
429
|
+
.render(({ projectId, tab }) => {
|
|
414
430
|
const { l } = usePage();
|
|
415
|
-
const { projectView } =
|
|
431
|
+
const { projectView } = fetch.viewProject(projectId);
|
|
416
432
|
return <Project.Zone.View view={projectView} tab={tab} />;
|
|
417
433
|
});
|
|
418
434
|
```
|
|
@@ -435,7 +451,7 @@ export default page()
|
|
|
435
451
|
|
|
436
452
|
Rules the loader and `akan sync` enforce: a chain module has no other export; `page()` belongs in a page file and
|
|
437
453
|
`layout()` / `rootLayout()` in a `_layout.tsx`; a page names every `[x]` of its path, a layout may name a subset;
|
|
438
|
-
`.param()` and `.
|
|
454
|
+
`.param()`, `.prompt()` and `.app()` names are string literals; `import "./styles.css"` stays the first line of a root layout;
|
|
439
455
|
`_overrides.tsx` is untouched. MCP: `prompts/get` now runs the page's body under the caller's token and hands the
|
|
440
456
|
model the description, what the page fetched, and the tools of those modules — see `mcpRule`.
|
|
441
457
|
|
|
@@ -537,7 +553,7 @@ akan sync automatically generates APIs across all layers. Only write custom logi
|
|
|
537
553
|
| Auto-Generated | Description |
|
|
538
554
|
|---------------|-------------|
|
|
539
555
|
| `this.<model>Model` | Auto-injected model adaptor |
|
|
540
|
-
| `get<Model>(id)`, `load<Model>(id)` | Single document lookup |
|
|
556
|
+
| `get<Model>(id)`, `load<Model>(id)` | Single document lookup: `get` throws `NoDocumentError` for a missing or removed id, answered 404 `base.error.documentNotFound`; `load` returns `null` |
|
|
541
557
|
| `create<Model>(data)`, `update<Model>(id, data)`, `remove<Model>(id)` | CRUD operations — named after the model, e.g. `createTask`/`updateTask`/`removeTask` (there is no literal `createModel`) |
|
|
542
558
|
| `list<Query>(args)`, `find<Query>(args)`, `pick<Query>(args)` | Filter-based queries |
|
|
543
559
|
| `exists<Query>(args)`, `count<Query>(args)`, `insight<Query>(args)` | Filter-based helpers |
|
|
@@ -554,7 +570,10 @@ akan sync automatically generates APIs across all layers. Only write custom logi
|
|
|
554
570
|
| `new[Model](partial)`, `edit[Model](model)`, `view[Model](model)` | Form/view state actions |
|
|
555
571
|
| `[slice]List`, `[slice]InitList`, `[slice]Insight`, `[slice]Selection`, `hasMoreOf[Slice]` | Slice states |
|
|
556
572
|
| `init[Slice](args)`, `refresh[Slice]()`, `setPageOf[Slice](page)`, `loadMoreOf[Slice]()` | Slice actions |
|
|
573
|
+
| `invalidate[Model]()` | Marks every slice stale without a request, so the next `Load.Units` / `Load.View` mount refetches — for a custom mutation whose changed rows the store never received |
|
|
557
574
|
| `set[Field]On[Model](value)` | Auto-setters for each model field |
|
|
575
|
+
| `upload[Field]On[Model](fileList, idx?)` | Upload into a `File` field, scoped to the form that started it |
|
|
576
|
+
| `[model]FormUploading` | Pending uploads per `File` field (`{}` when idle); submits save nothing until empty |
|
|
558
577
|
|
|
559
578
|
**Rule**: Write custom store actions only for toast messages (`msg.loading`/`msg.success`) or multi-step workflows. State fields and CRUD actions are already auto-generated.
|
|
560
579
|
|
|
@@ -568,8 +587,9 @@ akan sync automatically generates APIs across all layers. Only write custom logi
|
|
|
568
587
|
| `exists[Query](args)`, `count[Query](args)` | Existence check and count |
|
|
569
588
|
| `insight[Query](args)`, `query[Query](args)` | Insight and raw query |
|
|
570
589
|
| `remove[Query](args)`, `removeOne[Query](args)` | Query-level soft remove — all matches, or the newest one (`createdAt` desc, not caller-chosen) |
|
|
590
|
+
| `purge[Query](args)` | Hard delete of every match, removed rows too, returning the count — no undo |
|
|
571
591
|
| `update[Query](args).set(patch)`, `updateOne[Query](args).set(patch)` | Query-level update — the patch lands on a terminal `.set()`, because a filter's trailing args may be optional |
|
|
572
592
|
|
|
573
|
-
**Rule**: Define `Filter` with `.query()` conditions in `document.ts`. akan sync auto-generates all
|
|
593
|
+
**Rule**: Define `Filter` with `.query()` conditions in `document.ts`. akan sync auto-generates all 15 query helper methods per filter. Write `Document` chain methods only for state transitions with validation.
|
|
574
594
|
|
|
575
|
-
**The
|
|
595
|
+
**The five query-level writes fire no hooks**, so no `_pre`/`_postRemove` and no cascade run — same as `updateManyByQuery`. Reach for them when the model carries no removal side effect; otherwise remove documents one at a time. A filter keyed after its own model (filter `chat` on model `chat`) is rejected at boot, because `removeChat`/`updateChat` would otherwise shadow the generated single-document CRUD.
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
CodegenLock,
|
|
9
9
|
WorkspaceExecutor,
|
|
10
10
|
AppExecutor
|
|
11
|
-
} from "./index-
|
|
11
|
+
} from "./index-n8dsax1f.js";
|
|
12
12
|
import"./index-52w0fvh8.js";
|
|
13
13
|
import {
|
|
14
14
|
GraphClientEntryDiscovery,
|
|
@@ -19,10 +19,10 @@ import {
|
|
|
19
19
|
DevChangePlanner,
|
|
20
20
|
DevGeneratedIndexSync,
|
|
21
21
|
SsrDevBundler
|
|
22
|
-
} from "./index-
|
|
22
|
+
} from "./index-45c0mxb6.js";
|
|
23
23
|
import {
|
|
24
24
|
ServerGraphFile
|
|
25
|
-
} from "./index-
|
|
25
|
+
} from "./index-64pjry21.js";
|
|
26
26
|
import {
|
|
27
27
|
prepareDevWatchBatch
|
|
28
28
|
} from "./index-a5vmm6x4.js";
|
|
@@ -5,13 +5,13 @@ import {
|
|
|
5
5
|
writeGeneratedSyncState,
|
|
6
6
|
createRepairReport,
|
|
7
7
|
renderRepairReport
|
|
8
|
-
} from "./index-
|
|
8
|
+
} from "./index-yyxy7aff.js";
|
|
9
9
|
import {
|
|
10
10
|
AkanContextAnalyzer
|
|
11
|
-
} from "./index-
|
|
11
|
+
} from "./index-aqwdjn4x.js";
|
|
12
12
|
import {
|
|
13
13
|
runner
|
|
14
|
-
} from "./index-
|
|
14
|
+
} from "./index-fbw3kmt5.js";
|
|
15
15
|
|
|
16
16
|
// pkgs/@akanjs/cli/repair/repair.runner.ts
|
|
17
17
|
var spawnShell = async (workspace, command) => await workspace.spawn("bash", ["-lc", command.startsWith("akan ") ? `bun run ${command}` : command], {
|
|
@@ -4,26 +4,26 @@ import {
|
|
|
4
4
|
CloudApi,
|
|
5
5
|
CloudUpdates,
|
|
6
6
|
PipelineSecrets
|
|
7
|
-
} from "./index-
|
|
7
|
+
} from "./index-yfy3t4kw.js";
|
|
8
8
|
import {
|
|
9
9
|
PkgExecutor
|
|
10
|
-
} from "./index-
|
|
10
|
+
} from "./index-n8dsax1f.js";
|
|
11
11
|
import {
|
|
12
12
|
NativePublicEnv,
|
|
13
13
|
UpdatePackFolder
|
|
14
|
-
} from "./index-
|
|
14
|
+
} from "./index-nr8m4j21.js";
|
|
15
15
|
import {
|
|
16
16
|
script
|
|
17
|
-
} from "./index-
|
|
17
|
+
} from "./index-fbw3kmt5.js";
|
|
18
18
|
import {
|
|
19
19
|
ApplicationScript
|
|
20
|
-
} from "./index-
|
|
20
|
+
} from "./index-z5cxrbvv.js";
|
|
21
21
|
import {
|
|
22
22
|
PackageScript
|
|
23
|
-
} from "./index-
|
|
23
|
+
} from "./index-1enc9rga.js";
|
|
24
24
|
import {
|
|
25
25
|
CloudRunner
|
|
26
|
-
} from "./index-
|
|
26
|
+
} from "./index-48n4yhm4.js";
|
|
27
27
|
|
|
28
28
|
// pkgs/@akanjs/cli/cloud/cloud.script.ts
|
|
29
29
|
import { Logger } from "akanjs/common";
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
import {
|
|
3
3
|
runner,
|
|
4
4
|
script
|
|
5
|
-
} from "./index-
|
|
5
|
+
} from "./index-fbw3kmt5.js";
|
|
6
6
|
import {
|
|
7
7
|
FileSys2
|
|
8
8
|
} from "./index-52w0fvh8.js";
|
|
9
9
|
import {
|
|
10
10
|
PkgExecutor
|
|
11
|
-
} from "./index-
|
|
11
|
+
} from "./index-n8dsax1f.js";
|
|
12
12
|
import {
|
|
13
13
|
TypeScriptDependencyScanner2
|
|
14
14
|
} from "./index-tvehn2sp.js";
|
|
@@ -159,10 +159,10 @@ class PackageRunner extends runner("package") {
|
|
|
159
159
|
const packageRuntimeDependencies = {
|
|
160
160
|
"@akanjs/devkit": [
|
|
161
161
|
"tailwind-scrollbar",
|
|
162
|
-
"@earendil-works/chord",
|
|
163
162
|
"@earendil-works/pi-agent-core",
|
|
164
163
|
"@earendil-works/pi-ai",
|
|
165
|
-
"@earendil-works/pi-
|
|
164
|
+
"@earendil-works/pi-codemode",
|
|
165
|
+
"@earendil-works/pi-mcp",
|
|
166
166
|
"@earendil-works/pi-tui"
|
|
167
167
|
]
|
|
168
168
|
};
|