vde-open 0.0.0 → 0.1.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/LICENSE +21 -0
- package/README.md +133 -28
- package/THIRD_PARTY_NOTICES.md +3433 -0
- package/dist/cli.js +4194 -0
- package/dist/daemon.js +34 -0
- package/dist/heap-C3qHm7SE.js +17 -0
- package/dist/main-CLzVgxSL.js +13396 -0
- package/dist/render-yCayIbhf.js +14769 -0
- package/dist/rolldown-runtime-DC62tzP2.js +33 -0
- package/dist/search-index-CNsfwB72.js +8822 -0
- package/dist/web/assets/geist-cyrillic-ext-wght-normal-DjL33-gN.woff2 +0 -0
- package/dist/web/assets/geist-cyrillic-wght-normal-BEAKL7Jp.woff2 +0 -0
- package/dist/web/assets/geist-latin-ext-wght-normal-DC-KSUi6.woff2 +0 -0
- package/dist/web/assets/geist-latin-wght-normal-BgDaEnEv.woff2 +0 -0
- package/dist/web/assets/geist-vietnamese-wght-normal-6IgcOCM7.woff2 +0 -0
- package/dist/web/assets/index-BYu5_12H.css +2 -0
- package/dist/web/assets/index-CLggJFeG.js +95 -0
- package/dist/web/assets/markdown.worker-BhrAVXtB.js +13 -0
- package/dist/web/index.html +13 -0
- package/dist/workers/parse-worker.js +34 -0
- package/dist/workers/search-worker.js +73 -0
- package/docs/agent-usage.md +97 -0
- package/package.json +57 -7
- package/skills/vde-open/SKILL.md +108 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Yuki Yano
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,45 +1,150 @@
|
|
|
1
1
|
# vde-open
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[日本語](README.ja.md)
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
A local document viewer for agents and people who work from the same material. Open Markdown and HTML documents, read them in a management UI in the browser, and let an agent search and read the same documents from the CLI. An agent can also ask a person questions, and the person submits the answers from the management UI.
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
- Agents can search and read only the documents you opened (closed documents and whole directories are never searched).
|
|
8
|
+
- When you save a document, the management UI updates automatically.
|
|
9
|
+
- HTML is shown on a separate origin from the management UI, without running scripts (by default).
|
|
10
|
+
- The state is kept by a local daemon and is never sent to an external service.
|
|
8
11
|
|
|
9
|
-
##
|
|
12
|
+
## Install
|
|
10
13
|
|
|
11
|
-
|
|
12
|
-
1. Configure OIDC trusted publishing for the package name `vde-open`
|
|
13
|
-
2. Enable secure, token-less publishing from CI/CD workflows
|
|
14
|
-
3. Establish provenance for packages published under this name
|
|
14
|
+
Node.js 24 or later is required.
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
```bash
|
|
17
|
+
bun add -g vde-open # recommended: user-level install into ~/.bun/bin
|
|
18
|
+
npm install -g vde-open # also works
|
|
19
|
+
```
|
|
17
20
|
|
|
18
|
-
|
|
21
|
+
- We recommend installing it once per user with Bun. `~/.bun/bin` does not depend on which Node.js version is active, so switching Node.js versions (with mise and similar tools) does not remove `vo`. Bun is only used to install; the commands run on Node.js (`#!/usr/bin/env node`), so Node.js 24 or later must be on your `PATH`. Running it on the Bun runtime (`bun --bun`) is not tested.
|
|
22
|
+
- `npm install -g` installs into the prefix of the active Node.js version.
|
|
23
|
+
- Installing it per project is not recommended. There is one daemon per user, so different versions in different projects would talk to the same daemon.
|
|
19
24
|
|
|
20
|
-
|
|
25
|
+
Installing does not change shell files such as `.zshrc`, and runs no build or install scripts (the package bundles every dependency). Releases are published from GitHub Actions with provenance (see "Releasing").
|
|
21
26
|
|
|
22
|
-
To
|
|
27
|
+
To install from a clone of this repository (pins Node.js 24.21.0 in `mise.toml`):
|
|
23
28
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
29
|
+
```bash
|
|
30
|
+
pnpm install --frozen-lockfile
|
|
31
|
+
pnpm build
|
|
32
|
+
pnpm test:pack # builds artifacts/vde-open-<version>.tgz and verifies an install in a separate directory
|
|
33
|
+
bun add -g ./artifacts/vde-open-0.1.1.tgz # always start the path with ./ (otherwise it is read as a GitHub repository)
|
|
34
|
+
```
|
|
28
35
|
|
|
29
|
-
##
|
|
36
|
+
## `vde-open` and `vo`
|
|
30
37
|
|
|
31
|
-
|
|
32
|
-
- Contains no executable code
|
|
33
|
-
- Provides no functionality
|
|
34
|
-
- Should not be installed as a dependency
|
|
35
|
-
- Exists only for administrative purposes
|
|
38
|
+
The same CLI is installed under two names. Both use the same state and daemon.
|
|
36
39
|
|
|
37
|
-
|
|
40
|
+
- `vde-open`: the full name.
|
|
41
|
+
- `vo`: the short name.
|
|
38
42
|
|
|
39
|
-
|
|
40
|
-
- [npm Trusted Publishing Documentation](https://docs.npmjs.com/generating-provenance-statements)
|
|
41
|
-
- [GitHub Actions OIDC Documentation](https://docs.github.com/en/actions/deployment/security-hardening-your-deployments/about-security-hardening-with-openid-connect)
|
|
43
|
+
If you already have a different `vo` (another tool's command, an alias, and so on), installing never overwrites or deletes it.
|
|
42
44
|
|
|
43
|
-
|
|
45
|
+
- If the install target's bin directory (for `npm install -g`, npm's global bin) already has another `vo` file, npm stops with `EEXIST`. Do not use `--force`; it replaces the existing `vo`. Install with Bun instead, or into another prefix (for example `npm install -g --prefix ~/.local/vde-open ./artifacts/vde-open-0.1.0.tgz`) and use `vde-open` from that bin directory.
|
|
46
|
+
- For a `vo` or alias elsewhere, whichever comes first on `PATH` runs. In that case, use `vde-open`. If you want a short name, define an alias in your shell (for example `alias vdo=vde-open`).
|
|
44
47
|
|
|
45
|
-
|
|
48
|
+
## Basic usage
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
vo open README.md docs/design.md # open documents (starts the daemon if needed)
|
|
52
|
+
vo open docs -w # open a directory and follow new documents
|
|
53
|
+
vo ui # open the management UI (one-time URL)
|
|
54
|
+
vo list --json # list open documents
|
|
55
|
+
vo search "認証の設計" --json # search open documents
|
|
56
|
+
vo read <documentId> --section sec_0003 --json # read a section
|
|
57
|
+
vo close docs/design.md # remove from the list (the file is not deleted)
|
|
58
|
+
vo daemon stop # stop the daemon
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
How agents should use it is described in [docs/agent-usage.md](docs/agent-usage.md): read in the order search, outline, then sections; ask questions and get answers; receive draft answers from HTML.
|
|
62
|
+
|
|
63
|
+
## Agent skill
|
|
64
|
+
|
|
65
|
+
[`skills/vde-open/SKILL.md`](skills/vde-open/SKILL.md) is a skill that teaches an agent (Claude Code, Codex, and others that read `SKILL.md`) when and how to use `vo`. It is also included in the package. To use it, link or copy the directory into your agent's skill directory:
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
# Installed with Bun: the skill is in the global package directory.
|
|
69
|
+
ln -s ~/.bun/install/global/node_modules/vde-open/skills/vde-open ~/.claude/skills/vde-open # Claude Code
|
|
70
|
+
ln -s ~/.bun/install/global/node_modules/vde-open/skills/vde-open ~/.codex/skills/vde-open # Codex
|
|
71
|
+
# Installed with npm: use "$(npm root -g)/vde-open/skills/vde-open" instead.
|
|
72
|
+
# From a clone of this repository: use "$PWD/skills/vde-open".
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
## Search scope
|
|
76
|
+
|
|
77
|
+
- Search covers **only the documents that are open right now**. Closed documents, files that are not open, and whole directories are never searched.
|
|
78
|
+
- Results come from the revision that was published when you searched. Reading with the `revision` from a result returns the same content that was searched.
|
|
79
|
+
- Japanese text is split into words with `Intl.Segmenter`. Search uses exact matches, prefix matches, and fuzzy matches of alphanumeric words with up to one character of difference.
|
|
80
|
+
- In the management UI, press `Cmd/Ctrl+K` to search.
|
|
81
|
+
|
|
82
|
+
## HTML display limits
|
|
83
|
+
|
|
84
|
+
- By default (static), scripts do not run. Scripts, event attributes, iframe/object/embed, base, automatic navigation (meta refresh), form targets, and external images, CSS, and fonts are removed. Links cannot be clicked inside the view; open them from "Links in this document".
|
|
85
|
+
- Only files that the document references, inside the assets root (by default the document's directory), can be loaded. Files whose names start with "." such as `.env` and `.git` are never loaded. Set the scope with `--assets-root` and individual files with `--asset`.
|
|
86
|
+
- Scripts run only in HTML opened with `--html-mode interactive`. Scripts can load only registered files and cannot reach the management UI, the management API, or other files. This does not block every outbound request, including navigation inside the view. Use it only with HTML that you or the agent prepared and trust. After the daemon restarts, the HTML shows as a static view until you allow scripts again in the management UI.
|
|
87
|
+
- Differences between the original document and the view are listed under "Differences from the original document" in the management UI, with what is affected, why, and what to do.
|
|
88
|
+
|
|
89
|
+
## Markdown display limits
|
|
90
|
+
|
|
91
|
+
Markdown is rendered with TanStack Markdown 1.0.0. It is not fully compatible with CommonMark or GFM.
|
|
92
|
+
|
|
93
|
+
- Raw HTML is not rendered; it is shown as text.
|
|
94
|
+
- External images are not loaded. Only images under the document's directory are shown.
|
|
95
|
+
- Code is highlighted only for JS, JSX, TS, TSX, JSON, YAML, HTML, CSS, Bash, and Markdown. Code larger than 256 KiB and other languages are not highlighted.
|
|
96
|
+
- Documents that cannot be parsed within 2 seconds, or that have more than 100,000 elements or more than 64 levels of nesting, are shown as source.
|
|
97
|
+
|
|
98
|
+
## Where the state is stored, and stopping
|
|
99
|
+
|
|
100
|
+
- The state (open documents, revisions, questions and answers) is stored here. Change it with `VDE_OPEN_HOME`.
|
|
101
|
+
- macOS: `~/Library/Application Support/vde-open`
|
|
102
|
+
- Linux: `$XDG_STATE_HOME/vde-open` (or `~/.local/state/vde-open` if unset)
|
|
103
|
+
- Windows: `%LOCALAPPDATA%\vde-open`
|
|
104
|
+
- Stop the daemon with `vo daemon stop`. It stops the daemon no matter which name started it. Check its status with `vo daemon status`.
|
|
105
|
+
- Management UI preferences such as the color theme and the view mode are stored in the browser. The open documents follow the daemon's state.
|
|
106
|
+
|
|
107
|
+
## Asking a person and getting answers
|
|
108
|
+
|
|
109
|
+
```bash
|
|
110
|
+
vo ask questions.json --view review.md --json # open a document and ask about it
|
|
111
|
+
vo feedback wait <requestId> --timeout 120 --json
|
|
112
|
+
vo feedback ack <requestId> --submission-id <id> --json
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
The person answers in the answer panel of the management UI. The answers are submitted only when they press "Send answers to the agent". Input before submission (the draft answer) is never returned to the agent. Do not use this to collect secrets such as passwords or API keys.
|
|
116
|
+
|
|
117
|
+
## Troubleshooting
|
|
118
|
+
|
|
119
|
+
| Symptom | What to do |
|
|
120
|
+
|---|---|
|
|
121
|
+
| `vo` runs a different command | Use `vde-open`, or check the order of `PATH` |
|
|
122
|
+
| The management UI asks you to open it again from the CLI | Open a new URL with `vo ui` (each URL works once; after the daemon restarts, earlier windows stop working) |
|
|
123
|
+
| Exit code 8 (cannot connect to or start the daemon) | Check with `vo daemon status`, and look for leftover files with `vo doctor` |
|
|
124
|
+
| Images or CSS are not shown | Open "Differences from the original document" and register them with `--assets-root` or `--asset` |
|
|
125
|
+
| Search does not find a document | Check with `vo list --json` that the document is open and its `searchState` is `ready` |
|
|
126
|
+
|
|
127
|
+
## Verified scope
|
|
128
|
+
|
|
129
|
+
| Scope | Status |
|
|
130
|
+
|---|---|
|
|
131
|
+
| macOS (Darwin 25.6.0, arm64), Node.js 24.21.0, locally | Verified (format, lint, typecheck, unit/integration, build, pack, e2e) |
|
|
132
|
+
| Linux and macOS on CI (GitHub Actions `ubuntu-latest` and `macos-latest`, Node.js 24.21.0) | Verified (format, lint, typecheck, unit/integration, build, pack, and e2e in Chromium, Firefox, and WebKit; `.github/workflows/ci.yml`) |
|
|
133
|
+
| Windows on CI (`windows-latest`, Node.js 24.21.0) | Verified: build, pack smoke (install, both bins, IPC, starting and stopping the daemon, JSON output, the UI and workers), and the daemon and document integration tests. The other unit and integration tests and the e2e tests are not run on Windows |
|
|
134
|
+
| Browsers (macOS) | Chromium (Playwright's Chrome Headless Shell): the full suite is verified. Firefox 155 and WebKit 26.6 (Playwright 1.63.0): the view isolation, CSP, HTML bridge, and authentication tests (`pnpm test:e2e:cross`) are verified |
|
|
135
|
+
| Browsers (not verified) | Other UI interactions in Firefox and WebKit (search, answer panel, narrow screens, a list of 1,000 documents) are not verified |
|
|
136
|
+
| Markdown syntax | As described in "Markdown display limits" above. Full CommonMark and GFM are not verified |
|
|
137
|
+
|
|
138
|
+
More details: [docs/performance.md](docs/performance.md) (measurements), [docs/architecture.md](docs/architecture.md) and [docs/security-model.md](docs/security-model.md) (design). Development records (in Japanese): [docs/implementation-status.md](docs/implementation-status.md), [docs/dependency-validation.md](docs/dependency-validation.md), and [docs/adr/](docs/adr/).
|
|
139
|
+
|
|
140
|
+
## Releasing
|
|
141
|
+
|
|
142
|
+
Releases are published to npm by GitHub Actions with trusted publishing (OIDC), so no npm token is stored anywhere. The trusted publisher on npmjs.com is set to this repository and the workflow file `publish.yml`, and publishing with tokens is disallowed.
|
|
143
|
+
|
|
144
|
+
1. Update `version` in `apps/cli/package.json` and commit it to `main`.
|
|
145
|
+
2. Push a tag for that version: `git tag v0.1.0 && git push origin v0.1.0`.
|
|
146
|
+
3. `.github/workflows/publish.yml` checks that the tag matches the version, runs the checks and the pack smoke test, and publishes the tarball with provenance.
|
|
147
|
+
|
|
148
|
+
## License
|
|
149
|
+
|
|
150
|
+
[MIT](LICENSE). Bundled dependencies keep their own licenses. Their list and license texts are in `THIRD_PARTY_NOTICES.md` in the package (generated by `pnpm build` from what was bundled).
|