@zenera/cli 1.3.12 → 1.3.14

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/dist/scaffold.js CHANGED
@@ -59,7 +59,7 @@ const A2UI_RULES = join('agents', 'a2ui-instructions.md');
59
59
  /** The A2UI skills those rules send an agent to: the protocol, and charts. */
60
60
  const A2UI_SKILLS = [
61
61
  join('agents', 'skills', 'a2ui', 'SKILL.md'),
62
- join('agents', 'skills', 'a2ui_charts', 'SKILL.md'),
62
+ join('agents', 'skills', 'a2ui-charts', 'SKILL.md'),
63
63
  ];
64
64
  /**
65
65
  * The project files that are ours rather than the project's.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zenera/cli",
3
- "version": "1.3.12",
3
+ "version": "1.3.14",
4
4
  "description": "Command-line front end for @zenera/neo: agentic projects you can run, share and commit.",
5
5
  "keywords": [
6
6
  "agents",
@@ -56,11 +56,11 @@
56
56
  "@google/genai": "^2.30.0",
57
57
  "@inkjs/ui": "^2.0.0",
58
58
  "@openrouter/sdk": "^1.4.25",
59
- "@zenera/engine": "^1.3.12",
60
- "@zenera/neo": "^1.3.12",
61
- "@zenera/sandbox": "^1.3.12",
62
- "@zenera/server": "^1.3.12",
63
- "@zenera/view": "^1.3.12",
59
+ "@zenera/engine": "^1.3.14",
60
+ "@zenera/neo": "^1.3.14",
61
+ "@zenera/sandbox": "^1.3.14",
62
+ "@zenera/server": "^1.3.14",
63
+ "@zenera/view": "^1.3.14",
64
64
  "google-auth-library": "^10.0.0",
65
65
  "ink": "^7.1.1",
66
66
  "openai": "^6.0.0",
@@ -257,7 +257,7 @@ my-project/
257
257
  │ │ ├── intake.md one agent's own brief
258
258
  │ │ └── adjuster.md
259
259
  │ └── skills/
260
- │ ├── a2ui/, a2ui_charts/ zen's own - A2UI forms and charts
260
+ │ ├── a2ui/, a2ui-charts/ zen's own - A2UI forms and charts
261
261
  │ ├── house_style/
262
262
  │ │ ├── SKILL.md the instructions
263
263
  │ │ └── examples.md its own files, reachable at /skills/house_style
@@ -670,7 +670,7 @@ preloaded skill.
670
670
  Eight of these documents are **`zen`'s, not the project's** -
671
671
  `tools-instructions.md`, `files-instructions.md`, `memory-instructions.md`,
672
672
  `fork-instructions.md`, `mcp-instructions.md`, `mcp-memory-instructions.md`,
673
- `markdown-instructions.md` and `a2ui-instructions.md` - and so are the `a2ui` and `a2ui_charts` skills.
673
+ `markdown-instructions.md` and `a2ui-instructions.md` - and so are the `a2ui` and `a2ui-charts` skills.
674
674
  They are replaced by `zen check --fix`, and a copy that
675
675
  differs is reported as `rules.stale`. This project's own rules on any of those
676
676
  subjects go in a topic file beside them - `agents/files-policy-instructions.md`,
@@ -30,7 +30,7 @@ agents/mcp-memory-instructions.md the same, for those that also have memory
30
30
  agents/memory-instructions.md more of them, for agents with the memory store
31
31
  agents/tools-instructions.md more of them, about how tools are called
32
32
  agents/prompts/default.md the default agent's prompt
33
- agents/skills/ a2ui and a2ui_charts (zen's own), and yours
33
+ agents/skills/ a2ui and a2ui-charts (zen's own), and yours
34
34
  assets/README.md
35
35
  sandbox/Dockerfile the image the sandbox builds
36
36
  sessions/ empty
@@ -260,7 +260,7 @@ only a finding once the sentence is confirmed.
260
260
  3. **Check it is the project's file.** `fork-instructions.md`,
261
261
  `memory-instructions.md`, `tools-instructions.md`, `files-instructions.md`,
262
262
  `mcp-instructions.md`, `mcp-memory-instructions.md`, `markdown-instructions.md`, `a2ui-instructions.md` and
263
- the `a2ui` / `a2ui_charts` skills are zen's own copies; load
263
+ the `a2ui` / `a2ui-charts` skills are zen's own copies; load
264
264
  **zen-instructions** before changing where that rule lives.
265
265
  4. **Second opinion only when justified.** A thin answer or `no instruction -
266
266
  my own default` does not itself justify more replay. In a whole-run audit,
@@ -108,7 +108,7 @@ confused by.
108
108
  | `agents/fork-<topic>-instructions.md` | project's | `fork` | **this project's** forking policy |
109
109
  | `agents/mcp-<topic>-instructions.md` | project's | `tools:mcp` | **this project's** services: which servers, for what |
110
110
 
111
- The eight marked **ours**, with the `a2ui` and `a2ui_charts` skills they load, describe _this version of `zen`_ - how the memory
111
+ The eight marked **ours**, with the `a2ui` and `a2ui-charts` skills they load, describe _this version of `zen`_ - how the memory
112
112
  graph works, how its tools are called, what survives a join, how files are safely
113
113
  handled, how Zenera's MCP tools behave. They land under `agents/` only because
114
114
  that is where a document has to be to reach a prompt. They are not the project's
@@ -48,7 +48,7 @@ strip_urls() {
48
48
  # sandbox runs, not text rendered into a prompt, and its paths are its own.
49
49
  #
50
50
  # The copies `zen` ships (a2ui-, files-, fork-, markdown-, mcp-, mcp-memory-, memory-,
51
- # tools-instructions.md, and the a2ui and a2ui_charts skills)
51
+ # tools-instructions.md, and the a2ui and a2ui-charts skills)
52
52
  # are left out on purpose. They are full of worked examples, so they fail this
53
53
  # sweep by design, and the project cannot edit them anyway: `zen check` reports
54
54
  # any byte that differs as `rules.stale`.
@@ -60,7 +60,7 @@ files() {
60
60
  if [ -f "$file" ]; then echo "$file"; fi
61
61
  done
62
62
  } | grep -Ev '^agents/(a2ui|files|fork|markdown|mcp|mcp-memory|memory|tools)-instructions\.md$' |
63
- grep -Ev '^agents/skills/(a2ui|a2ui_charts)/SKILL\.md$' | sort -u
63
+ grep -Ev '^agents/skills/(a2ui|a2ui-charts)/SKILL\.md$' | sort -u
64
64
  }
65
65
 
66
66
  # Every token in those files, urls removed first, and a sentence's full stop
@@ -76,7 +76,7 @@ differs() {
76
76
 
77
77
  owned() {
78
78
  case "$1" in
79
- agents/a2ui-instructions.md|agents/skills/a2ui/SKILL.md|agents/skills/a2ui_charts/SKILL.md|agents/files-instructions.md|agents/fork-instructions.md|agents/markdown-instructions.md|agents/mcp-instructions.md|agents/mcp-memory-instructions.md|agents/memory-instructions.md|agents/tools-instructions.md) return 0 ;;
79
+ agents/a2ui-instructions.md|agents/skills/a2ui/SKILL.md|agents/skills/a2ui-charts/SKILL.md|agents/files-instructions.md|agents/fork-instructions.md|agents/markdown-instructions.md|agents/mcp-instructions.md|agents/mcp-memory-instructions.md|agents/memory-instructions.md|agents/tools-instructions.md) return 0 ;;
80
80
  *) return 1 ;;
81
81
  esac
82
82
  }
@@ -14,19 +14,56 @@ still text; use a surface only when it does something text cannot.
14
14
  stays text.
15
15
  - **Charts** — the answer is a trend, a comparison, or a distribution over
16
16
  numbers you actually have. A single figure stays text.
17
- - **Tables** — many rows of the same fields. `DataTable` is not fully
18
- supported yet: prefer a Markdown table unless you were asked for `DataTable`.
17
+ - **Tables** — use A2UI `DataTable` for more than 20 rows so data loads
18
+ dynamically. Tables with 20 rows or fewer stay in Markdown unless the user
19
+ explicitly asks for `DataTable`.
19
20
 
20
21
  Everything else — explanations, short facts, lists, yes/no answers — is text.
21
22
  Do not repeat in text what the surface already shows; one sentence of context
22
- is enough.
23
+ is enough. Never fabricate data: charts and tables must display only real data
24
+ provided by the user, tools, or files.
25
+
26
+ ## How to emit a surface
27
+
28
+ Put A2UI messages in a fenced code block tagged `a2ui`. The fence must contain
29
+ a JSON array; ordinary text stays outside the fence.
30
+
31
+ The fence is a separate Markdown block, never inline with text:
32
+
33
+ - Leave a blank line before the opening fence and after the closing fence.
34
+ - The opening ` ```a2ui ` and the closing ` ``` ` each stand alone on
35
+ their own line, with nothing before or after them.
36
+ - Wrong: `Hello```a2ui` or ` ```continue `.
37
+
38
+ ````markdown
39
+ Here is the requested form.
40
+
41
+ ```a2ui
42
+ [
43
+ {
44
+ "version": "1.0",
45
+ "createSurface": {
46
+ "surfaceId": "preferences_1",
47
+ "catalogId": "https://a2ui.org/specification/v1_0/catalogs/basic/catalog.json",
48
+ "components": []
49
+ }
50
+ }
51
+ ]
52
+ ```
53
+
54
+ Pick an option and press Save.
55
+ ````
56
+
57
+ Use strict JSON: double-quoted keys and strings, no comments, and no trailing
58
+ commas. Load the `a2ui` skill before writing the contents of the fence; a
59
+ `createSurface` payload is normally enough for a new surface.
23
60
 
24
61
  ## Before writing a surface
25
62
 
26
63
  Load the skill first, every run, before your first surface:
27
64
 
28
65
  - `a2ui` — the message format, the components, and how to build forms. Always.
29
- - `a2ui_charts` — also, when the surface has a chart.
66
+ - `a2ui-charts` — also, when the surface has a chart.
30
67
 
31
68
  Use only the components those skills list: the A2UI v1.0 basic catalog plus
32
69
  Zenera's `EChart` and `DataTable`. Never invent a component or a property.
@@ -14,13 +14,22 @@ Write every answer in Markdown.
14
14
  wrap names, paths, and values inline in backticks.
15
15
  - Use **bold** sparingly, for the one thing the reader must not miss.
16
16
 
17
+ Use a Markdown table for 20 rows or fewer. For a larger table, use an A2UI
18
+ `DataTable` so the rows can be loaded dynamically instead of pasting the whole
19
+ dataset into the response.
20
+
17
21
  ## Images and files
18
22
 
19
- To show an image from `/assets` or `/workspace`, embed it with a `file:///`
20
- url of its agent path: `![Sales chart](file:///workspace/out/chart.png)`.
23
+ When the user asks to show an image — including a chart, diagram, or other
24
+ visual — embed a confirmed image from `/assets` or `/workspace` with a
25
+ `file:///` URL of its agent path:
26
+ `![Sales chart](file:///workspace/out/chart.png)`.
21
27
  Link other files the same way: `[report](file:///assets/report.html)`.
22
28
 
23
29
  - Always the full mount path after `file://` — never a bare relative path, a
24
30
  host path, or `sandbox:`.
25
31
  - Percent-encode spaces and special characters: `file:///workspace/my%20chart.png`.
26
32
  - Only reference a file you have confirmed exists; never invent a path.
33
+
34
+ Never fabricate data, values, files, or images. Display only actual data from
35
+ the user, tools, or confirmed files.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: a2ui
3
- description: How to answer with an A2UI v1.0 surface (forms, cards, layouts) - message format, components, data binding and actions. Load before writing any A2UI.
3
+ description: How to answer with an A2UI v1.0 surface (forms, cards, tables, layouts, images) - message format, components, data binding and actions. Load before writing any A2UI.
4
4
  tags: [ui, a2ui]
5
5
  version: 1.0.0
6
6
  ---
@@ -13,7 +13,10 @@ You write it; the user sees and uses it.
13
13
  ## Emitting it
14
14
 
15
15
  Put the messages in a fenced block tagged `a2ui` as a JSON array. The block may
16
- sit between ordinary Markdown paragraphs:
16
+ sit between ordinary Markdown paragraphs, but always as its own block: a blank
17
+ line before the opening fence and after the closing fence, and ` ```a2ui `
18
+ and the closing ` ``` ` each alone on their own line. Never glue a fence to
19
+ text, as in `Hello```a2ui` or ` ```continue `.
17
20
 
18
21
  ````markdown
19
22
  Here is the booking form.
@@ -30,6 +33,8 @@ Here is the booking form.
30
33
  }
31
34
  ]
32
35
  ```
36
+
37
+ Fill it in and press Book.
33
38
  ````
34
39
 
35
40
  - The array contains complete JSON objects, each with `"version": "1.0"` and
@@ -96,7 +101,7 @@ Zenera catalog — each instance must carry
96
101
 
97
102
  | Component | Required | Optional | Notes |
98
103
  | ----------- | -------- | ------------------ | --------------------------------------------- |
99
- | `EChart` | `apiUrl` | — | Load the `a2ui_charts` skill before using it. |
104
+ | `EChart` | `apiUrl` | — | Load the `a2ui-charts` skill before using it. |
100
105
  | `DataTable` | `apiUrl` | `pageSize` (1–100) | Not fully supported yet; see below. |
101
106
 
102
107
  Rules that catch most mistakes:
@@ -160,10 +165,11 @@ A `Button` sends an event back to you as the user's next message:
160
165
 
161
166
  ## Tables
162
167
 
163
- `DataTable` is not fully supported yet. Show tabular data as a Markdown table
164
- unless you were explicitly asked for `DataTable`. If you use it, write one page
165
- of JSON to a file under `/workspace` and point `apiUrl` at it as a
166
- `file:///workspace/...` URL:
168
+ `DataTable` is not fully supported yet. Show up to 20 rows as a Markdown table
169
+ unless the user explicitly asked for `DataTable`. For more than 20 rows, use
170
+ `DataTable` so the data loads dynamically instead of being pasted into the
171
+ response. Write one page of JSON to a file under `/workspace` and point `apiUrl`
172
+ at it as a `file:///workspace/...` URL:
167
173
 
168
174
  ```json
169
175
  {
@@ -1,6 +1,6 @@
1
1
  ---
2
- name: a2ui_charts
3
- description: How to show a chart in an A2UI surface with Zenera's EChart component - choosing the chart type and writing the ECharts option file it loads. Load together with a2ui.
2
+ name: a2ui-charts
3
+ description: How to display charts in A2UI surfaces - choosing the right chart type, preparing its data, and rendering it. Load together with a2ui.
4
4
  tags: [ui, a2ui, charts]
5
5
  version: 1.0.0
6
6
  ---
@@ -57,5 +57,5 @@ agents:
57
57
  {{exa}}
58
58
  #
59
59
  # The skills in agents/skills, listed in the prompt for it to load when a
60
- # case needs one — among them a2ui and a2ui_charts, for forms and charts.
60
+ # case needs one — among them a2ui and a2ui-charts, for forms and charts.
61
61
  skills: {}