@akanjs/cli 3.0.0-alpha.23 → 3.0.0-alpha.25
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/{application.command-e2za636m.js → application.command-sjtbk6tr.js} +1 -1
- package/{cloud.command-krea92t8.js → cloud.command-y0e4eyqz.js} +3 -3
- package/guidelines/conventions/conventions.instruction.md +24 -24
- package/incrementalBuilder.proc.js +2 -2
- package/{index-dh9vdsrd.js → index-8d2sv6pw.js} +1 -1
- package/{index-k93ep78g.js → index-becx1t0k.js} +2 -2
- package/{index-n0zdjawn.js → index-t71zvmt9.js} +1 -1
- package/index.js +4 -4
- package/{localRegistry.command-bsgg0jqq.js → localRegistry.command-53t758pt.js} +2 -2
- package/package.json +2 -2
- package/{workspace.command-5m3f02kd.js → workspace.command-f7jerqb2.js} +3 -3
package/.build-stamp
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
d575c7a7d93b93f7a48cce65df5699924691699fecae350c28cd4bbcb2a68fe4
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
CloudScript
|
|
4
|
-
} from "./index-
|
|
5
|
-
import"./index-
|
|
4
|
+
} from "./index-becx1t0k.js";
|
|
5
|
+
import"./index-t71zvmt9.js";
|
|
6
6
|
import"./index-33zce8gt.js";
|
|
7
7
|
import {
|
|
8
8
|
GlobalConfig
|
|
9
9
|
} from "./index-sh01r3pm.js";
|
|
10
|
-
import"./index-
|
|
10
|
+
import"./index-8d2sv6pw.js";
|
|
11
11
|
import"./index-73rnbwgg.js";
|
|
12
12
|
import"./index-76rn3g2c.js";
|
|
13
13
|
import {
|
|
@@ -635,12 +635,13 @@ costs something to assemble.
|
|
|
635
635
|
|
|
636
636
|
## In-Page Agent
|
|
637
637
|
|
|
638
|
-
Every akan app can host a component-level agent that reads the rendered screen and drives it.
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
638
|
+
Every akan app can host a component-level agent that reads the rendered screen and drives it. **A component
|
|
639
|
+
declaration is the surface, exactly**: `st.tool` publishes one action, and `st.use` / `st.sel` / `st.ref` make one
|
|
640
|
+
store key readable while the reading component is mounted. Nothing is derived from a store class — declaring a
|
|
641
|
+
method on a `store(...)` gives an agent nothing at all, because a lever the screen does not offer the user is not
|
|
642
|
+
one an agent may pull in their place, and a module's whole vocabulary published at once was noise the model paid
|
|
643
|
+
for. `Load` scopes, the route, and the live keys complete the context. The React core is the `use-agentic` package;
|
|
644
|
+
apps and libs never import it directly (`no-import-external-library`) — everything reaches them through `st.*` and
|
|
644
645
|
`akanjs/ui`.
|
|
645
646
|
|
|
646
647
|
- **Mount `<Agent.Chat />` once in a layout.** That is the floating chat, the approval card, and the client-side
|
|
@@ -672,22 +673,21 @@ libs never import it directly (`no-import-external-library`) — everything reac
|
|
|
672
673
|
tree is the cascade: nested Guides concatenate outer-to-inner and navigating away withdraws them. It is a
|
|
673
674
|
component, not a pageConfig field. Module `*.abstract.md` files are developer docs and are never served to the
|
|
674
675
|
agent.
|
|
675
|
-
- **
|
|
676
|
-
|
|
677
|
-
`
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
the
|
|
685
|
-
|
|
686
|
-
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
reference like a store setter. `remove*`-named tools default to a confirm gate.
|
|
676
|
+
- **Declare the tool beside the control that already does it.**
|
|
677
|
+
`st.tool("x", { desc }).arg("id", ID).exec(fn)` publishes one action and returns the callable to hand to
|
|
678
|
+
`onClick` — one handler for the person and the agent, which is the point: a button wired to an inline arrow can
|
|
679
|
+
be clicked by a person and by nobody else. `.exec()` is the only hook, so the chain completes in one
|
|
680
|
+
unconditional statement, and the callable carries `data-akan-action` like a store setter does. A `remove*` name
|
|
681
|
+
defaults to a confirm gate. Reach a store action from the body — `.exec((id) => st.do.removeX(id))` — which is
|
|
682
|
+
how an agent gets CRUD; `st.do` on its own reaches nobody.
|
|
683
|
+
- **Reading is per key, not per store.** `st.useState(name, initial, meta)` publishes local state (read-only
|
|
684
|
+
unless `set:` names a type) and `st.expose(name, value)` a derived value. A subscribed store key is listed in
|
|
685
|
+
the state context block by name and pulled with `readState(key)`, masked by the model that key declares — while
|
|
686
|
+
a key the screen does not read stays unreadable even when a sibling key of the same store is live. **There is no
|
|
687
|
+
store-level exposure declaration**: a store class says nothing about agents, and `st.use.x({ agent: false })` is
|
|
688
|
+
how the component that subscribes a value keeps it off the surface. The framework's own `base` store is the one
|
|
689
|
+
fixed exception, never published however widely it is read — its keys are routing plumbing, and `tryJwt` is the
|
|
690
|
+
caller's credential.
|
|
691
691
|
- **Model-facing text is English, always** — tool `desc`, `instructions`, Guide text. The `l()` rule covers
|
|
692
692
|
strings a *user* reads: Chat's own buttons go through `l("base.*")`, the model's text never does.
|
|
693
693
|
- A masked model never crosses the boundary: a value whose `hidden`/`secret` fields are populated is refused at
|
|
@@ -698,8 +698,8 @@ libs never import it directly (`no-import-external-library`) — everything reac
|
|
|
698
698
|
- The framework publishes three built-ins on every store surface: `navigate` (internal paths only, the same
|
|
699
699
|
router `Link` rides), `readScreen` (the rendered DOM as compact text — headings, links, control values; the
|
|
700
700
|
chat's own UI is skipped via `data-agent-ui`, and a password value is never read), and `readState(key)` (one
|
|
701
|
-
masked store key). Declaring a
|
|
702
|
-
|
|
701
|
+
masked store key). Declaring a hook tool under one of those names shadows the built-in, so reuse them only to
|
|
702
|
+
mean that.
|
|
703
703
|
|
|
704
704
|
## Scalar Modeling (`**/*.constant.ts`)
|
|
705
705
|
|
|
@@ -250,7 +250,7 @@ class IncrementalBuilder {
|
|
|
250
250
|
return;
|
|
251
251
|
this.#shuttingDown = true;
|
|
252
252
|
const started = Date.now();
|
|
253
|
-
this.#logger.
|
|
253
|
+
this.#logger.debug(`shutdown requested (${reason}); draining ${this.#inFlight} work item(s)`);
|
|
254
254
|
if (this.#cssRebuildTimer) {
|
|
255
255
|
clearTimeout(this.#cssRebuildTimer);
|
|
256
256
|
this.#cssRebuildTimer = null;
|
|
@@ -263,7 +263,7 @@ class IncrementalBuilder {
|
|
|
263
263
|
return;
|
|
264
264
|
});
|
|
265
265
|
const flushed = await BuilderChannel.drain();
|
|
266
|
-
this.#logger.
|
|
266
|
+
this.#logger.debug(`drained in ${Date.now() - started}ms${flushed ? ` after flushing ${flushed} ipc write(s)` : ""}; exiting for recycle`);
|
|
267
267
|
process.exit(0);
|
|
268
268
|
}
|
|
269
269
|
get shuttingDown() {
|
|
@@ -350,7 +350,7 @@ class IncrementalBuilderHost {
|
|
|
350
350
|
return false;
|
|
351
351
|
this.#recycleRequested = true;
|
|
352
352
|
this.#status = "recycling";
|
|
353
|
-
this.logger.
|
|
353
|
+
this.logger.debug(`recycling builder pid=${proc.pid} (${reason})`);
|
|
354
354
|
this.#recycleTimer = setTimeout(() => {
|
|
355
355
|
this.#recycleTimer = null;
|
|
356
356
|
if (this.#proc !== proc)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
CloudRunner
|
|
4
|
-
} from "./index-
|
|
4
|
+
} from "./index-t71zvmt9.js";
|
|
5
5
|
import {
|
|
6
6
|
PackageScript
|
|
7
7
|
} from "./index-33zce8gt.js";
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
} from "./index-sh01r3pm.js";
|
|
13
13
|
import {
|
|
14
14
|
ApplicationScript
|
|
15
|
-
} from "./index-
|
|
15
|
+
} from "./index-8d2sv6pw.js";
|
|
16
16
|
import {
|
|
17
17
|
script
|
|
18
18
|
} from "./index-n706txcv.js";
|
package/index.js
CHANGED
|
@@ -18,16 +18,16 @@ import path from "path";
|
|
|
18
18
|
|
|
19
19
|
// pkgs/@akanjs/cli/commandModules.ts
|
|
20
20
|
var commandModules = {
|
|
21
|
-
workspace: async () => (await import("./workspace.command-
|
|
21
|
+
workspace: async () => (await import("./workspace.command-f7jerqb2.js")).WorkspaceCommand,
|
|
22
22
|
agent: async () => (await import("./agent.command-e835fjem.js")).AgentCommand,
|
|
23
|
-
application: async () => (await import("./application.command-
|
|
23
|
+
application: async () => (await import("./application.command-sjtbk6tr.js")).ApplicationCommand,
|
|
24
24
|
library: async () => (await import("./library.command-v5cyaw9t.js")).LibraryCommand,
|
|
25
|
-
localRegistry: async () => (await import("./localRegistry.command-
|
|
25
|
+
localRegistry: async () => (await import("./localRegistry.command-53t758pt.js")).LocalRegistryCommand,
|
|
26
26
|
package: async () => (await import("./package.command-qkcs60ts.js")).PackageCommand,
|
|
27
27
|
module: async () => (await import("./module.command-pq6w84xg.js")).ModuleCommand,
|
|
28
28
|
page: async () => (await import("./page.command-qj5bfnh9.js")).PageCommand,
|
|
29
29
|
context: async () => (await import("./context.command-vn87jb08.js")).ContextCommand,
|
|
30
|
-
cloud: async () => (await import("./cloud.command-
|
|
30
|
+
cloud: async () => (await import("./cloud.command-y0e4eyqz.js")).CloudCommand,
|
|
31
31
|
guideline: async () => (await import("./guideline.command-s4hn2bsy.js")).GuidelineCommand,
|
|
32
32
|
scalar: async () => (await import("./scalar.command-rm6k3c65.js")).ScalarCommand,
|
|
33
33
|
primitive: async () => (await import("./primitive.command-bw0nes6x.js")).PrimitiveCommand,
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
import {
|
|
3
3
|
CloudRunner,
|
|
4
4
|
getNpmRegistryUrl
|
|
5
|
-
} from "./index-
|
|
5
|
+
} from "./index-t71zvmt9.js";
|
|
6
6
|
import {
|
|
7
7
|
PackageScript
|
|
8
8
|
} from "./index-33zce8gt.js";
|
|
9
9
|
import"./index-sh01r3pm.js";
|
|
10
10
|
import {
|
|
11
11
|
ApplicationScript
|
|
12
|
-
} from "./index-
|
|
12
|
+
} from "./index-8d2sv6pw.js";
|
|
13
13
|
import"./index-73rnbwgg.js";
|
|
14
14
|
import"./index-76rn3g2c.js";
|
|
15
15
|
import {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@akanjs/cli",
|
|
3
|
-
"version": "3.0.0-alpha.
|
|
3
|
+
"version": "3.0.0-alpha.25",
|
|
4
4
|
"sourceType": "module",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"publishConfig": {
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"@langchain/openai": "^1.4.6",
|
|
35
35
|
"@tailwindcss/node": "^4.3.0",
|
|
36
36
|
"@trapezedev/project": "^7.1.4",
|
|
37
|
-
"akanjs": "3.0.0-alpha.
|
|
37
|
+
"akanjs": "3.0.0-alpha.25",
|
|
38
38
|
"chalk": "^5.6.2",
|
|
39
39
|
"commander": "^14.0.3",
|
|
40
40
|
"dayjs": "^1.11.20",
|
|
@@ -11,11 +11,11 @@ import"./index-ss469dec.js";
|
|
|
11
11
|
import"./index-qc0tnhs2.js";
|
|
12
12
|
import {
|
|
13
13
|
CloudScript
|
|
14
|
-
} from "./index-
|
|
14
|
+
} from "./index-becx1t0k.js";
|
|
15
15
|
import {
|
|
16
16
|
getLatestPackageVersion,
|
|
17
17
|
getNpmRegistryUrl
|
|
18
|
-
} from "./index-
|
|
18
|
+
} from "./index-t71zvmt9.js";
|
|
19
19
|
import {
|
|
20
20
|
PackageScript
|
|
21
21
|
} from "./index-33zce8gt.js";
|
|
@@ -31,7 +31,7 @@ import"./index-tsmjxph2.js";
|
|
|
31
31
|
import"./index-j37qq1f2.js";
|
|
32
32
|
import {
|
|
33
33
|
ApplicationScript
|
|
34
|
-
} from "./index-
|
|
34
|
+
} from "./index-8d2sv6pw.js";
|
|
35
35
|
import {
|
|
36
36
|
LibraryScript
|
|
37
37
|
} from "./index-73rnbwgg.js";
|