viteboard 0.2.0 → 0.2.1

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/CHANGELOG.md ADDED
@@ -0,0 +1,26 @@
1
+ # Changelog
2
+
3
+ ## 0.2.1
4
+
5
+ ### Added
6
+
7
+ - Export selected board regions as PDF, JPEG, or SVG; export Markdown documents and directories as PDF.
8
+ - Discover capability branches as portable Agent Skills, including a live OpenCode HTTP catalog and supporting files.
9
+ - Receive API change notifications over SSE and refresh affected views, trees, and search roots.
10
+ - Run the packaged application from the CLI using the same Vite-hosted API as development mode.
11
+ - Run API regression tests with `npm test`.
12
+
13
+ ### Improved
14
+
15
+ - Serialize API writes and deletes per target; accept `expectedRevision: null` for create-only writes and preserve revisions through UI autosave.
16
+ - Reject docs-root filesystem paths that follow symlinks, and preserve existing docs-root IDs across upgrades.
17
+ - Bound and scope capability indexing; cache metadata briefly and read support-file contents on demand.
18
+ - Batch SSE notifications without a resetting debounce and replace image-export animation-frame polling with load-completion waiters.
19
+ - Bound canvas export dimensions and pixels, include rotated board element bounds, and wait for images and fonts before rendering.
20
+
21
+ ### Notes
22
+
23
+ - Direct filesystem edits do not produce SSE notifications; clients must refresh or fetch current content.
24
+ - PDF export requires a Chromium-compatible browser on the machine running ViteBoard.
25
+ - SVG board exports embed a raster image rather than editable vector paths.
26
+ - The API rejects symlink components even when a symlink points back inside a docs root.
package/README.md CHANGED
@@ -58,6 +58,8 @@ title: System Architecture
58
58
  ```
59
59
  ````
60
60
 
61
+ Select a board region to embed it in a document or export it as PDF, JPEG, or SVG. The HTTP API also supports full-board and document PDF exports. Export responses are returned as bytes; ViteBoard does not choose a destination on your machine.
62
+
61
63
  ### Capability Specs
62
64
 
63
65
  Structured markdown documents with YAML frontmatter (`title`, `summary`, `tags`). Designed for building AI prompts -- add specs to a cart and copy them as a combined prompt.
@@ -126,6 +128,7 @@ npm run dev
126
128
  |---------|-------------|
127
129
  | `npm run dev` | Start development server |
128
130
  | `npm run build` | Type-check and bundle to `dist/` |
131
+ | `npm test` | Run API regression tests with Node's test runner |
129
132
  | `npm run preview` | Preview the production build |
130
133
  | `npm start` | Run via the CLI entry point |
131
134
 
@@ -165,21 +168,33 @@ ViteBoard exposes a local REST API at `/__api/` during development:
165
168
  | Endpoint | Method | Description |
166
169
  |----------|--------|-------------|
167
170
  | `/workspace` | GET | List all projects and their docs roots |
171
+ | `/events` | GET | Stream workspace, file, board, and asset change notifications (SSE) |
168
172
  | `/workspace/pick-project` | POST | Open native folder picker to add a project |
169
173
  | `/workspace/project` | DELETE | Remove a project from workspace |
170
174
  | `/tree` | GET | Get file tree for a docs root |
171
175
  | `/project-tree` | GET | Get full directory tree for a project |
176
+ | `/capabilities` | GET | Discover capabilities and their portable Agent Skill metadata |
177
+ | `/capability` | GET | Read one capability's rules, generated `SKILL.md`, and supporting-file URLs |
178
+ | `/skills/catalog/index.json` | GET | OpenCode-compatible live HTTP skill catalog |
172
179
  | `/file` | GET/PUT/PATCH/DELETE | Read, write, rename, or delete files |
173
180
  | `/directory` | PUT | Create a directory |
174
181
  | `/board` | GET/PUT/DELETE | Read, write, or delete board documents |
175
182
  | `/asset` | GET/POST | Serve or upload assets |
183
+ | `/export/document/pdf` | POST | Render a Markdown document or directory as PDF bytes |
184
+ | `/export/board` | POST | Render a board region as PDF, JPEG, or SVG bytes |
185
+
186
+ File operations are scoped to registered docs roots and reject symlink paths as well as paths outside the root. Writes can include an `expectedRevision`; use `null` for create-only writes and the revision returned by a read for updates. API mutations publish Server-Sent Events at `/events`; connected UIs refresh affected views, while serialized revision checks protect edits from overwriting newer API writes. Changes made directly on disk do not emit notifications.
176
187
 
177
- All file operations are scoped to registered docs roots and reject paths that escape the root directory.
188
+ Capability branches are exposed as standard [Agent Skills](https://agentskills.io): `/__api/capabilities` lists them, `/__api/capability` returns their rules and skill content, and `/__api/skills/catalog/` is a live OpenCode catalog. The same generated `SKILL.md` can be installed under Codex's `.agents/skills/` or Claude Code's `.claude/skills/` with the branch's supporting files.
189
+
190
+ Machine clients can discover the HTTP authoring contract at `/viteboard-guide.md` and the agent workflow at `/viteboard-skill.md`. Document and board exports return bytes; the client saves them to its own requested path. ViteBoard does not write to the agent's filesystem. Board SVG output contains a raster image in an SVG wrapper, not editable vector paths.
178
191
 
179
192
  ## Contributing
180
193
 
181
194
  See [CONTRIBUTING.md](CONTRIBUTING.md) for development guidelines.
182
195
 
196
+ See [CHANGELOG.md](CHANGELOG.md) for the 0.2.1 release notes.
197
+
183
198
  ## License
184
199
 
185
200
  [MIT](LICENSE)