@akanjs/cli 3.0.0-alpha.43 → 3.0.0-alpha.44

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
- d8a476b01467d4b59495cc5a6332930a9ce6ba7001dd3a4bf3510bf13d6cd839
1
+ da606dd0b2a1010436ae9ad72c5058abda8aa897bc1151dc063c247b76761373
@@ -968,13 +968,15 @@ apps and libs never import it directly (`no-import-external-library`) — everyt
968
968
  half-written draft they were walked away from comes back at the bottom of the walk. **The `/` menu takes those
969
969
  keys while it is open** — it is the thing on screen the arrows point at — with Enter picking the highlighted
970
970
  row, Tab completing its name, and Escape closing the menu and then, pressed again, the panel.
971
- - The framework publishes six built-ins on every store surface: `navigate` (internal paths only, the same
971
+ - The framework publishes five built-ins on every store surface: `navigate` (internal paths only, the same
972
972
  router `Link` rides), `goBack` (this session's history — global, because history is not a control a page owns and
973
973
  a page that draws no back link is not one you may not leave), `readScreen` (the rendered DOM as compact text —
974
974
  headings, links, control values, and `(disabled)` on a control or button that has it; the chat's own UI is
975
- skipped via `data-agent-ui`, and a password value is never read), `readState(key)` (one masked store key),
976
- `waitFor(key)` (park until that key moves), and `highlight(target)`. Declaring a hook tool under one of those
977
- names shadows the built-in, so reuse them only to mean that.
975
+ skipped via `data-agent-ui`, and a password value is never read), `readState(key)` (one masked store key), and
976
+ `highlight(target)`. Declaring a hook tool under one of those names shadows the built-in, so reuse them only to
977
+ mean that. **There is no general-purpose wait**: a built-in one was reachable on every screen and a model spent
978
+ it on whatever key it liked, parking turns nobody asked to park. Waiting belongs to the screen that knows what
979
+ is worth waiting for — publish an `st.tool` beside the control that starts the work, and let it await the work.
978
980
  - **A tool that changes the screen waits for the screen before it answers.** `router.push` returns while the RSC
979
981
  payload is still in flight and a store action that fires `void fetch.*` commits a tick later, so `navigate`
980
982
  awaits `ScreenSettle.wait()` — DOM quiescence, bounded, because the client router hands its promise to nobody —
@@ -988,14 +990,14 @@ apps and libs never import it directly (`no-import-external-library`) — everyt
988
990
  call to read the result. A fire-and-forget tool leaves the agent to poll instead, which burns the whole
989
991
  `maxTurns` budget in seconds on a job measured in minutes. Say so in the `desc` ("takes about two minutes; do
990
992
  not poll while it runs") and, for a route full of slow work, in an `Agent.Guide`.
991
- - **`waitFor(key, equals?, timeoutSeconds?)` is for the job the *tool* cannot await**started in an earlier turn,
992
- or by a person clicking the button. It parks on a **store state key a mounted component subscribes**, exactly the
993
- set `readState` reads, and resumes the moment the key moves; `equals` waits for one value, omitted it waits for
994
- any change. **Not a resource**: `st.expose` and `st.useState` register on the surface, whose values already ride
995
- inline in the screen context block, and `waitFor` refuses one of those names like any other. Deliberately not a
996
- bare sleep either a sleep only makes the polling slower, and a value worth waiting minutes for is server-derived
997
- state, which lives in the store already. Running out is not a failure, it answers with what the key holds now
998
- (default 120s, clamped to 600), and a key this screen does not read is refused by name with the ones it does.
993
+ - **A wait is a screen's own tool, declared where the slow work is.** For the job a tool cannot await — one
994
+ started in an earlier turn, or by a person clicking the button publish an `st.tool` that parks on the thing
995
+ *that* screen knows about, and say in its `desc` what it waits for and roughly how long. A general built-in was
996
+ tried and removed: reachable on every screen with no idea what any key means, a model spent it on whatever key
997
+ looked promising and parked turns nobody asked to park. The screen that starts the work is the only place that
998
+ knows what finishing looks like, and a tool declared there is also one the agent cannot reach on a screen where
999
+ waiting makes no sense. Honour `AgentAbort.current` in the body and report with `AgentProgress.report`, so Stop
1000
+ ends the wait and the row says how it is going.
999
1001
  - **Stop reaches a tool that is still running.** The session races every call against its abort signal, so a
1000
1002
  two-minute tool does not hold the loop for two minutes after the user presses Stop. The signal itself arrives
1001
1003
  through `AgentAbort.current` — the same module slot `AgentProgress` is — and honouring it is optional, since the
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@akanjs/cli",
3
- "version": "3.0.0-alpha.43",
3
+ "version": "3.0.0-alpha.44",
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.43",
37
+ "akanjs": "3.0.0-alpha.44",
38
38
  "chalk": "^5.6.2",
39
39
  "commander": "^14.0.3",
40
40
  "dayjs": "^1.11.20",