@akanjs/cli 3.1.0-rc.2 → 3.1.0-rc.20

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.
Files changed (100) hide show
  1. package/.build-stamp +1 -1
  2. package/{CodeAgent-q50k4s45.js → CodeAgent-n3tzjm91.js} +2 -2
  3. package/{CodeAgentRpcHost-p7h6n2hp.js → CodeAgentRpcHost-9g27hmer.js} +1 -1
  4. package/{CodeTui-62g35ztk.js → CodeTui-fnm9ft4d.js} +47 -4
  5. package/TunnelShare-661cxz5e.js +14 -0
  6. package/{agent.command-adfd5299.js → agent.command-3qxf4xcj.js} +5 -5
  7. package/akanCode.js +7 -5
  8. package/{application.command-hj3gv1rx.js → application.command-zfja7x4r.js} +12 -11
  9. package/{applicationBuildRunner-by10r9gf.js → applicationBuildRunner-vh4j6vdv.js} +16 -9
  10. package/buildBatch.proc.js +7 -7
  11. package/{cloud.command-k2fhaape.js → cloud.command-fcc8e8tp.js} +17 -16
  12. package/cloud.script-1xt3tnts.js +24 -0
  13. package/{code.command-kt5zgcc2.js → code.command-130bdmhe.js} +25 -12
  14. package/{context.command-8fgn42jw.js → context.command-0qx447mb.js} +17 -16
  15. package/context.runner-1vsjztjg.js +25 -0
  16. package/{dependencyScanner-06z2dmrr.js → dependencyScanner-3afj2vt1.js} +1 -1
  17. package/{guideline.command-3yxxr2mm.js → guideline.command-cv5bmrx2.js} +2 -2
  18. package/guidelines/agentRule/agentRule.instruction.md +25 -10
  19. package/guidelines/conventions/conventions.instruction.md +463 -1084
  20. package/guidelines/cssRule/cssRule.instruction.md +16 -1
  21. package/guidelines/fieldRule/fieldRule.instruction.md +74 -0
  22. package/guidelines/framework/framework.instruction.md +4 -7
  23. package/guidelines/mcpRule/mcpRule.instruction.md +16 -9
  24. package/guidelines/modelConstant/modelConstant.instruction.md +2 -1
  25. package/guidelines/modelStore/modelStore.instruction.md +16 -0
  26. package/guidelines/pageRule/pageRule.instruction.md +80 -0
  27. package/guidelines/queryRule/queryRule.instruction.md +47 -12
  28. package/guidelines/runtimeRule/runtimeRule.instruction.md +89 -2
  29. package/guidelines/ssrRule/ssrRule.instruction.md +13 -0
  30. package/guidelines/transportRule/transportRule.instruction.md +107 -8
  31. package/guidelines/workspaceOnboarding/workspaceOnboarding.instruction.md +4 -4
  32. package/guidelines/workspaceRecipes/workspaceRecipes.instruction.md +70 -7
  33. package/incrementalBuilder.proc.js +4 -4
  34. package/{index-nq045px5.js → index-192ha4xh.js} +356 -307
  35. package/{index-t7nws9mx.js → index-1djcjcre.js} +661 -448
  36. package/{index-h85cxfkg.js → index-1p98exm2.js} +2 -2
  37. package/{index-hnby7p9n.js → index-1xj2t7cb.js} +7 -7
  38. package/{index-wa5jbxj1.js → index-2mrn1mrg.js} +1 -0
  39. package/{index-58vvz603.js → index-35hc95h5.js} +1 -1
  40. package/{index-tv8fjaba.js → index-4mhy6qme.js} +4 -4
  41. package/{index-rk9sdys3.js → index-5edzv8fn.js} +5 -5
  42. package/{index-k9rrten6.js → index-5nd1wtkv.js} +92 -94
  43. package/index-62md4dwy.js +260 -0
  44. package/{index-kc8z134d.js → index-665zp9rs.js} +38 -15
  45. package/{index-jwqtchha.js → index-86jt2a0e.js} +1 -1
  46. package/{index-d2242ksy.js → index-at7bz0xq.js} +3 -0
  47. package/{index-sqfdmb5b.js → index-awbdfcf2.js} +4 -4
  48. package/{index-azh29dc8.js → index-axs61rna.js} +19 -14
  49. package/{index-3hx1z96c.js → index-bqbf654f.js} +1 -1
  50. package/{index-6726qr1m.js → index-cpb3nvma.js} +57 -58
  51. package/{index-pyxn1b53.js → index-d72hfmdm.js} +13 -13
  52. package/{index-8zdwpxef.js → index-dye8pnxx.js} +119 -81
  53. package/{index-z507nzhg.js → index-fmzcs8v6.js} +4 -4
  54. package/{index-3reaaa1h.js → index-fyq1z6kt.js} +29 -27
  55. package/{index-0909wckt.js → index-g1mbppa9.js} +238 -236
  56. package/{index-fjsv10hd.js → index-hsadfb6c.js} +7 -7
  57. package/{index-tz5evhdr.js → index-j237xtew.js} +6 -6
  58. package/{index-nq2ja5e0.js → index-j4mkhz93.js} +3 -3
  59. package/{index-31ce9vhg.js → index-jw1zm273.js} +28 -30
  60. package/{index-q958tqqg.js → index-m9jj544v.js} +1 -1
  61. package/{index-8935h3n1.js → index-mdjc93e1.js} +1 -1
  62. package/{index-bea2gwc6.js → index-pydbnfez.js} +2 -2
  63. package/{index-20cebtth.js → index-qtfmtcrw.js} +17 -15
  64. package/{index-sby8fe1p.js → index-qwa5k1j8.js} +1 -1
  65. package/{index-e9prnmyt.js → index-tamvyvj3.js} +3 -3
  66. package/{index-rhbabmja.js → index-trpasv9q.js} +260 -259
  67. package/{index-2ahj896a.js → index-tvehn2sp.js} +1 -1
  68. package/{index-2etqq75t.js → index-va06nr10.js} +1090 -1078
  69. package/{index-g0vwzy9m.js → index-vk0pa0mn.js} +20 -21
  70. package/{index-xpdgxsj5.js → index-w44cy4vs.js} +2216 -2216
  71. package/index.js +22 -22
  72. package/{library.command-8tw59xzj.js → library.command-erp2f56n.js} +3 -3
  73. package/{localRegistry.command-tf3dmznd.js → localRegistry.command-hj3p16p5.js} +15 -14
  74. package/{module.command-9vm8hffy.js → module.command-gs2r615e.js} +5 -5
  75. package/{package.command-erbxe2tz.js → package.command-j10r76ax.js} +4 -4
  76. package/package.json +21 -21
  77. package/{page.command-jpavcj0p.js → page.command-4h4a8pnh.js} +3 -3
  78. package/{pipeline.command-b8rzvjvv.js → pipeline.command-a2nrk26m.js} +3 -3
  79. package/{primitive.command-sm32chzk.js → primitive.command-w6t0asqz.js} +6 -6
  80. package/{projectTypecheck-jamtx95x.js → projectTypecheck-f534enqj.js} +1 -1
  81. package/{quality.command-pkd17n6y.js → quality.command-77x7vbbx.js} +4 -4
  82. package/{repair.command-8y4mq6hs.js → repair.command-y6sstev7.js} +5 -5
  83. package/{scalar.command-q8khmyx5.js → scalar.command-20b8cy0k.js} +4 -4
  84. package/skills/akan-code/SKILL.md +4 -0
  85. package/skills/akan-store/SKILL.md +2 -1
  86. package/{subspace.command-51n0ykbx.js → subspace.command-baz73jpk.js} +11 -10
  87. package/templates/appSample/lib/task/Task.Util.tsx +7 -7
  88. package/templates/appSample/lib/task/Task.Zone.tsx +1 -1
  89. package/templates/appSample/ui/QuantityControl.tsx +2 -2
  90. package/templates/crudSinglePage/page.tsx +1 -1
  91. package/templates/lib/cnst.ts +0 -1
  92. package/templates/workspaceRoot/.gitignore.template +23 -52
  93. package/templates/workspaceRoot/biome.json.template +1 -1
  94. package/{tunnel.command-7820vtxq.js → tunnel.command-2kw8vt9g.js} +8 -7
  95. package/{workflow.command-n5sv4wqz.js → workflow.command-2djwmpqf.js} +10 -10
  96. package/{workspace.command-zdy60jh8.js → workspace.command-jqs7vjhe.js} +29 -28
  97. package/TunnelShare-f1egrktx.js +0 -13
  98. package/cloud.script-z8p5dz7e.js +0 -23
  99. package/context.runner-hnh0rg7m.js +0 -24
  100. package/index-n68jx79w.js +0 -120
@@ -180,6 +180,14 @@ pages declaring one name never clash, and a registry kept outside the surface re
180
180
  stores its uploads keeps a map beside the transcript keyed on name and size — the same guess `Attachment.same`
181
181
  has to make, and the one that is wrong for two crops of one export. So when both sides carry a `ref`, it *is* the
182
182
  answer to "the same file twice", and the heuristic is what is left for when they do not.
183
+ - **A tool hands the model a file with `ToolReturn.attach(result, [attachment])`** (`akanjs/store`), which lands in
184
+ `ToolCallResult.attachments` beside the value — a `result` reaches the model as JSON text, so a URL in it is read
185
+ as letters and base64 as a wall of them. It takes a user attachment's shape and meets the same `accepts` check and
186
+ type allow-list; Anthropic carries it inside the `tool_result`, the chat-completions dialect (whose `tool` message
187
+ holds text alone) in one user message after the turn's tool messages. It is outside the 20,000-character ceiling
188
+ and held to the 4 MB per-file one, and only the latest turn's ride as bytes: an earlier one becomes a note telling
189
+ the model to call the tool again while the picture is on screen, since one picture costs over a thousand tokens on
190
+ every turn it rides.
183
191
  - **Speech is one engine contract and the framework's own policy.** `<Agent.Chat voice={engine} />` takes a
184
192
  `VoiceEngine` — `listen(handlers)` and `speak(sentence)`, both cancellable — and the chat decides everything
185
193
  else: a press-to-talk microphone whose transcript lands in the composer to be corrected, one utterance per
@@ -398,6 +406,10 @@ pages declaring one name never clash, and a registry kept outside the surface re
398
406
  renders one editor per row, and at most one of them is ever open, so one name is registered rather than fifty.
399
407
  It also means the verb is absent from the catalogue while nothing is open, which is honest — and costs the
400
408
  agent nothing, because the catalogue is re-read on the turn that follows the tool call that opened the form.
409
+ - **A shell's `submit<Model>` refuses while an upload is in flight.** `Model.EditModal` (also while its submit is
410
+ disabled) and `Model.ViewEditModal` disable the button and answer `The <model> form is not ready to submit.` while
411
+ `<model>FormUploading` is not empty. That key is read `{ agent: false }`, so the refusal is how an agent learns of
412
+ the upload: call `submit<Model>` again once the file has landed, rather than setting the field a second time.
401
413
 
402
414
  ## Forms
403
415
  - **A form control publishes its own setter, and reading a form publishes one tool that fills several at once.**
@@ -614,14 +626,17 @@ pages declaring one name never clash, and a registry kept outside the surface re
614
626
  row, Tab completing its name, and Escape closing the menu and then, pressed again, the panel.
615
627
 
616
628
  ## Built-In Tools
617
- - The framework publishes five built-ins on every store surface: `navigate` (internal paths only, the same router
629
+ - The framework publishes six built-ins on every store surface: `navigate` (internal paths only, the same router
618
630
  `Link` rides), `goBack` (this session's history — global, because history is not a control a page owns and a page
619
631
  that draws no back link is not one you may not leave — a screen that must not be left withholds them with `builtins`,
620
632
  not with prose), `readScreen` (the rendered DOM as compact text — headings, links, control values, and `(disabled)`
621
633
  on a control or button that has it; the chat's own UI is skipped via `data-agent-ui`, and a password value is never
622
634
  read), `readState(key)` (one masked store key — a key that is unknown or that this screen does not read is refused
623
- *with the keys it can* read, the way `readScreen` names its sections), and `highlight(target)`. Declaring a hook tool
624
- under one of those names shadows the built-in, so reuse them only to mean that. **There is no general-purpose wait**:
635
+ *with the keys it can* read, the way `readScreen` names its sections), `highlight(target)`, and `viewImage(src)` (one
636
+ `<img>` on screen, redrawn as a JPEG at most 1568px long and attached to the result — `src` must be one this view
637
+ shows, as `readScreen({ images: true })` printed it, so the agent cannot have the browser fetch an address of its
638
+ own, and a `data:` one is refused). Declaring a hook tool under one of those names shadows the built-in, so reuse
639
+ them only to mean that. **There is no general-purpose wait**:
625
640
  a built-in one was reachable on every screen and a model spent it on whatever key it liked, parking turns nobody
626
641
  asked to park. Waiting belongs to the screen that knows what is worth waiting for — publish an `st.tool` beside the
627
642
  control that starts the work, and let it await the work.
@@ -630,8 +645,8 @@ pages declaring one name never clash, and a registry kept outside the surface re
630
645
  awaits `ScreenSettle.wait()` — DOM quiescence, bounded, because the client router hands its promise to nobody —
631
646
  and the session awaits it after every tool that did not declare `settle: false` before taking the change report.
632
647
  Without it the report describes the moment before the change landed and the `readScreen` that follows reads the
633
- page the user left. The reading built-ins (`readScreen`, `readState`, `highlight`) declare it, because a wait
634
- costs 120ms of quiet at the very least and they change nothing a resource holds.
648
+ page the user left. The reading built-ins (`readScreen`, `readState`, `highlight`, `viewImage`) declare it,
649
+ because a wait costs 120ms of quiet at the very least and they change nothing a resource holds.
635
650
  New tools and state from a fresh route are still only listed from the next turn: the catalogue is snapshotted
636
651
  when the turn starts.
637
652
  - **A tool that waits for its own work costs no model turns; one that returns early costs one round trip per
@@ -665,8 +680,8 @@ pages declaring one name never clash, and a registry kept outside the surface re
665
680
  - **An image is always named, and its address rides only when asked for.** `readScreen` prints `[image: <alt>]`,
666
681
  and `[image]` for one with no `alt` — dropping the unlabelled one left a card that renders a picture reading
667
682
  exactly like a card that renders nothing, and "this page shows no image" is the one answer the screen cannot
668
- support. `readScreen({ images: true })` appends `(<src>)` to each, for handing one to a tool that takes a
669
- picture; it is off by default because a gallery is one long URL per thumbnail, which is the read's whole budget
683
+ support. `readScreen({ images: true })` appends `(<src>)` to each, for handing one to `viewImage` or another tool
684
+ that takes a picture; it is off by default because a gallery is one long URL per thumbnail, which is the read's whole budget
670
685
  spent on the part of the screen it can say the least about. A `data:` URL is never printed — that is the bytes
671
686
  themselves rather than somewhere to fetch them.
672
687
  - **A screen is only aimable if its names are printed.** `readScreen` writes `(#anchor)` beside a heading that
@@ -751,9 +766,9 @@ pages declaring one name never clash, and a registry kept outside the surface re
751
766
  that matter light up with no code. An inline arrow publishes no tool, carries no annotation, and therefore
752
767
  draws nothing: one wrapper silently costs three things at once.
753
768
  - **For a control the framework did not render, spread `agentAttrs`** from `akanjs/ui`:
754
- `<button {...agentAttrs(run)} onClick={run}>`, where `run` is what `st.tool(…).exec(…)` returned. It reads the
755
- name off the callable, so there is nothing to keep in sync and no `ref` to thread — and it earns the same E2E
756
- selector and accessibility name an `akanjs/ui` control has. Never hand-write `data-akan-*`.
769
+ `<button type="button" {...agentAttrs(run)} onClick={run}>`, where `run` is what `st.tool(…).exec(…)` returned.
770
+ It reads the name off the callable, so there is nothing to keep in sync and no `ref` to thread — and it earns the
771
+ same E2E selector and accessibility name an `akanjs/ui` control has. Never hand-write `data-akan-*`.
757
772
  - **A control that shares its handler with its siblings takes a key**: `agentAttrs(switchTab, menu)`, in the same
758
773
  vocabulary the call's argument uses. One tool serves a whole tab strip or a whole list, so without it every
759
774
  namesake is interchangeable in the DOM and the page can say *what* the agent did but never *where* — which the