@staix/vault-mem-ui 0.0.0-stage → 0.0.0
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 +15 -0
- package/LICENSE +21 -0
- package/README.md +96 -2
- package/THIRD_PARTY_NOTICES.md +164 -0
- package/bin/vmem-ui.ts +26 -0
- package/dist/panel.css +666 -0
- package/dist/panel.js +355 -0
- package/package.json +53 -4
- package/src/client/App.tsx +167 -0
- package/src/client/a11y.ts +54 -0
- package/src/client/acon.ts +46 -0
- package/src/client/components.tsx +243 -0
- package/src/client/data.ts +66 -0
- package/src/client/fake.ts +48 -0
- package/src/client/graph-export.tsx +21 -0
- package/src/client/host.ts +80 -0
- package/src/client/markdown/parse.ts +620 -0
- package/src/client/markdown/render.tsx +270 -0
- package/src/client/panel.css +666 -0
- package/src/client/panel.tsx +66 -0
- package/src/client/prefs.ts +76 -0
- package/src/client/standalone.ts +44 -0
- package/src/client/store.ts +201 -0
- package/src/client/views/assertions.tsx +109 -0
- package/src/client/views/common.ts +15 -0
- package/src/client/views/history.tsx +205 -0
- package/src/client/views/lint.tsx +27 -0
- package/src/client/views/log.tsx +64 -0
- package/src/client/views/note.tsx +128 -0
- package/src/client/views/notes.tsx +34 -0
- package/src/client/views/overview.tsx +74 -0
- package/src/client/views/promote.tsx +112 -0
- package/src/client/views/proposals.tsx +55 -0
- package/src/client/views/settings.tsx +57 -0
- package/src/client/write.ts +144 -0
- package/src/graph/decisionChains.ts +122 -0
- package/src/graph/derive.ts +338 -0
- package/src/graph/export.ts +44 -0
- package/src/graph/insights.ts +254 -0
- package/src/graph/labels.ts +67 -0
- package/src/graph/layout/client.ts +139 -0
- package/src/graph/layout/engine.ts +107 -0
- package/src/graph/layout/fa2.d.ts +8 -0
- package/src/graph/layout/protocol.ts +70 -0
- package/src/graph/layout/worker.ts +132 -0
- package/src/graph/model.ts +230 -0
- package/src/graph/positions.ts +41 -0
- package/src/graph/search.ts +54 -0
- package/src/graph/style.ts +301 -0
- package/src/graph/target.ts +38 -0
- package/src/graph/types.ts +64 -0
- package/src/graph/view/GraphView.tsx +279 -0
- package/src/graph/view/SidePanels.tsx +141 -0
- package/src/graph/view/cache.ts +42 -0
- package/src/graph/view/canvas.ts +309 -0
- package/src/graph/view/graph-snapshot.ts +75 -0
- package/src/graph/view/lod.ts +30 -0
- package/src/graph/view/motion.ts +4 -0
- package/src/graph/view/state.ts +240 -0
- package/src/plugin/assets.ts +33 -0
- package/src/plugin/graph.ts +71 -0
- package/src/plugin/index.ts +23 -0
- package/src/server/cli.ts +99 -0
- package/src/server/host.ts +287 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to `@staix/vault-mem-ui` go here. Entries are grouped under a version heading that carries the
|
|
4
|
+
release date, in the shape `## [x.y.z] - YYYY-MM-DD`, and the release workflow publishes only a version with such a
|
|
5
|
+
section. `## [Unreleased]` holds the work that no release has shipped yet.
|
|
6
|
+
|
|
7
|
+
## [Unreleased]
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
|
|
11
|
+
- The `acon` console plugin that keeps `@staix/vault-mem/ui-plugin` as its provider and serves this package's own panel bundle.
|
|
12
|
+
- The client panels for vmem's overview, search, note, promote, lint, log, settings, proposals, assertions and history, the note body rendered as Markdown, and the graph view with its local view, shortest path, pins and level of detail.
|
|
13
|
+
- The standalone `vmem-ui` host and its `bin` entry, serving the same bundle on loopback through the provider.
|
|
14
|
+
- The import boundary check that keeps `src/` on the provider, and the third-party notices check on the bundle's inputs.
|
|
15
|
+
- The tag-driven release workflow, its release scripts, and this changelog.
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 STAIx Inc.
|
|
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,3 +1,97 @@
|
|
|
1
|
-
#
|
|
1
|
+
# vault-mem-ui
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Web UI for [vmem](https://github.com/STAIxBWLB/vault-mem): a standalone browser app and an `acon` console panel over the same vault provider, with a graph view. Part of the ahub family.
|
|
4
|
+
|
|
5
|
+
## Status
|
|
6
|
+
|
|
7
|
+
Not published yet. The repository contains the package scaffold, checks, standalone host command, client panels and `acon` console plugin. The design is tracked in this repository's issues.
|
|
8
|
+
|
|
9
|
+
The graph panel loads the vmem provider's paged graph snapshot and offers a Sigma canvas, ForceAtlas2 in the panel's own module worker, local view, shortest path, pins and level of detail above 30,000 edges. Older providers without graph snapshots show "Graph not available". In the static multi-node host the panel shows cached positions only, because the layout worker cannot start there.
|
|
10
|
+
|
|
11
|
+
For development, install Bun 1.4.2 or newer, run `bun install`, then `bun run check`.
|
|
12
|
+
|
|
13
|
+
## Client
|
|
14
|
+
|
|
15
|
+
`src/client` is the browser client for vmem's existing panels: overview, search, note, promote, lint, log, settings, proposals, assertions and history. It is written against one small host interface and runs in both hosts from the same bundle. Settings edits write permission, graph resolution and enrichment for the selected vault, and the default vault and PII patterns for all vaults. Every change is previewed and confirmed; default vault and permission changes require restarting the console and MCP server. Proposals can be listed, inspected, applied or rejected with a preview and confirmation. Assertions shows the journal's answer for the vault with every coverage gap named, and History shows a note's revisions plus the changes between two of them picked from that list; both are read-only.
|
|
16
|
+
|
|
17
|
+
Reconciling an `apply_unknown` proposal and reading beyond truncated proposal content are available through the vmem CLI.
|
|
18
|
+
|
|
19
|
+
- Host interface (`src/client/host.ts`): `snapshot`, `action`, `theme` and `mount`. `acon`'s `ConsoleHost` is adapted by `createAconHost`; the standalone adapter uses the same-origin HTTP endpoints, and `createFakeHost` is available for tests.
|
|
20
|
+
- What the provider declares it can do reaches the panel in its graph snapshot reply as `capabilities.actions` (the manifest's list), because neither host hands the manifest to a panel. A host that serves the graph panel must pass that field through; a reply without it means nothing is offered.
|
|
21
|
+
- Writes go through `action` only. In `acon` the console owns the confirmation: its server mints the confirm token, shows the preview in its own dialog and refuses a page that sets `confirmed` or `fingerprint`, so the panel sends the bare action and reports the outcome — the adapter says `confirm: "host"` and drops those two keys instead of forwarding them. A host that answers the provider directly instead (the fake host today, the standalone adapter) gets the two-step flow from the client: the preview with its fingerprint and the planned changes, nothing sent until the person confirms, and the confirm re-sending that same fingerprint, so the client cannot confirm a preview it did not show.
|
|
22
|
+
- A panel or parameter change drops the previous reply and any open preview, so a note you left cannot be read or acted on under the vault or panel you opened next. A pending preview is dropped on navigation or cancellation; a pending confirmation is dropped on navigation or after its waiting notice is closed. The panel says it is loading, and a snapshot that fails says so with the next step.
|
|
23
|
+
- Per-viewer preferences (theme and last panel) live in `localStorage` behind a guarded wrapper: when storage is unavailable or full the panel still works, and the preference applies to the session only.
|
|
24
|
+
- Keyboard: arrow keys, Home and End move through a list, Enter or Space opens the row, `/` focuses search and `Escape` closes the write dialog. While a confirmation is applying, Confirm, Cancel and Escape are inactive until it answers or a 30-second waiting notice permits closing. The dialog takes the focus when it opens, keeps Tab inside it and hands the focus back to the control that opened it. Reduced motion follows `prefers-reduced-motion`, and the toolbar switch turns it on manually.
|
|
25
|
+
- Panel rule: the build emits one ES module (`dist/panel.js`) and one stylesheet (`dist/panel.css`), with no inline script, no inline style markup, no `innerHTML` with data and no other origin. Colour comes from acon's `--acon-*` tokens, with fallbacks and a light/dark override for the standalone host.
|
|
26
|
+
- Note body: the note's Markdown is parsed into a tree and rendered as React elements, never as an HTML string, so an HTML tag in a note is shown as text. `[[wiki-links]]` open the note panel through the same navigation, each one read against vmem's answer for that link (target plus heading or block), so `[[A]]` and `[[A#gone]]` can differ; a link vmem could not resolve is marked as missing instead of followed and repeats the provider's own reason and its suggested note when it gives one, and a link the note's capped link list does not include is shown as text the panel cannot place rather than called broken; an `![[embed]]` is a link to that note, because the panel fetches nothing else. A link is external only for `http`, `https` and `mailto` and then carries `rel="noopener noreferrer"` and `target="_blank"`; every other scheme, and a relative target, stays text. An image is its alt text and target, since the panel loads nothing from another origin. Nesting stops being interpreted past 32 levels and the rest is shown as text, so a deeply nested note cannot overflow the panel's stack. The parser is this package's own code, so the bundle gains no dependency.
|
|
27
|
+
|
|
28
|
+
The `acon` plugin in `src/plugin` keeps `@staix/vault-mem/ui-plugin`'s provider — and so vmem's validation, receipts and two-step confirmation — and replaces only the panel assets with this bundle. It reads `dist/`, so run `bun run build` before starting the console; `bun run check` builds first for the same reason.
|
|
29
|
+
|
|
30
|
+
## Graph controls
|
|
31
|
+
|
|
32
|
+
The graph view provides search, domain, type, relation and community filters, a legend, a selected-note inspector, read-only insights and a decision chains mode. The panel supports up to 10,000 notes and 100,000 links; chains follow provider supersedes edges. Chain, member and unlinked-decision lists show at most 50 entries each; search or filter to narrow the results. Level of detail uses the full graph edge count even when filters are active. Possible-link analysis is limited to graphs with at most 30,000 edges; narrow larger graphs with filters.
|
|
33
|
+
|
|
34
|
+
The inspector links the selected note to a second one through the provider's two-step `link` action. Pick a target and one of the relations the provider accepts (`supports`, `contradicts`, `extends`, `applies-to`, `context-for`) and propose it: the shared write dialog shows the preview, the changes planned for both notes and the log event the write would append, and nothing is sent until Confirm. Both directions is the default and can be turned off. The control appears only when the provider declares the `link` action, only notes the provider reported a path for can be linked (an unresolved link has no file to write to), and the target list shows at most 200 notes by label, so search or filter to narrow it. After a write the graph is read from its first page again, so the new edge appears without a reload.
|
|
35
|
+
|
|
36
|
+
## Scope
|
|
37
|
+
|
|
38
|
+
- Runs standalone on loopback and inside `acon`, from one bundle.
|
|
39
|
+
- Reads and writes only through vmem's provider, so every write passes vmem's validation and two-step confirmation.
|
|
40
|
+
- Depends on `@staix/vault-mem`; vault-mem does not depend on this package.
|
|
41
|
+
|
|
42
|
+
## Offline graph export
|
|
43
|
+
|
|
44
|
+
The graph view exports nodes and links selected by the current filters, search and view mode as one self-contained HTML file containing graph metadata and positions, without note bodies. Link counts in the file reflect that filtered view, and links temporarily hidden by level of detail are included. It works in both `acon` and the standalone host. While layout is running, export captures the canvas positions at the moment of the click; the button is unavailable until the canvas is ready or if the canvas fails.
|
|
45
|
+
|
|
46
|
+
## Standalone host (vmem-ui)
|
|
47
|
+
|
|
48
|
+
`bun run build`, then `bun bin/vmem-ui.ts` (installed as `vmem-ui`). It opens the vault-mem provider in process, listens on `127.0.0.1` only and prints a one-time sign-in link valid for 5 minutes.
|
|
49
|
+
|
|
50
|
+
The vault it serves is the one vmem resolves for this process, not `$AGENTHUB_HOME`: `VMEM_HOME` if set, else the `home` pointer in the default home's config, else `$AGENTHUB_HOME/vmem` (default `~/.agenthub/vmem`). Set `VMEM_HOME` to serve another vault home; the command's own context carries the family home only.
|
|
51
|
+
|
|
52
|
+
- The link signs in once and sets an HttpOnly, SameSite=Strict session cookie; a reused or expired link is refused.
|
|
53
|
+
- Every request is checked for Host (`127.0.0.1` or `localhost` on this port) and Origin; API calls need a same-origin Origin header. A default port is checked without it, so `--port 80` is reached as `127.0.0.1` rather than `127.0.0.1:80`. Pages carry a strict CSP: `default-src 'none'; script-src 'self'; style-src 'self'`, no inline code, no `blob:`.
|
|
54
|
+
- Request bodies must be `application/json` and are capped at 32 KiB. The server exits after 30 minutes without a request (`--idle-minutes <n>`). A visible page polls and counts as use; hidden or closed pages stop polling; `--port <n>` picks the port (default: a free one).
|
|
55
|
+
- API: `POST /api/snapshot` and `POST /api/action` relay to the provider. A snapshot names one of the manifest's panels, plus `inbox` and `search` when the plugin advertises those capabilities; `after` is how many items the page already has, as a whole number 0 or more.
|
|
56
|
+
- Confirmation in standalone mode belongs to the page: the server relays `confirmed` and `fingerprint` exactly as the page sent them, and never adds either. It cannot tell what the browser displayed, so a caller holding the session cookie can confirm without any preview having been rendered. What protects the write is vmem's own check: it recomputes the preview from the current vault and writes only when the fingerprint still matches, so a stale or invented fingerprint is answered with the fresh preview instead of a write. Reaching the API at all takes the one-time sign-in link's cookie, a same-origin `Origin` and the loopback Host, which bounds who can call but does not prove that a person looked. `acon` does this differently (its server mints a confirm token) because the console renders the preview itself.
|
|
57
|
+
- A provider failure is logged to the terminal and answered with the reason and the next step.
|
|
58
|
+
- The page runs every panel this bundle implements; a provider panel without a view stays out of the manifest instead of appearing as an empty tab.
|
|
59
|
+
|
|
60
|
+
## Releasing
|
|
61
|
+
|
|
62
|
+
A release is one tag on a green `main`: the tag runs the checks again, packs once and publishes that exact tarball to npm with provenance, then creates the GitHub release from the changelog section.
|
|
63
|
+
|
|
64
|
+
1. Release-prep PR: bump `version` in `package.json` and move the `## [Unreleased]` entries under `## [x.y.z] - YYYY-MM-DD`. Until that dated section exists the tag is refused, because `Unreleased` alone is not a release.
|
|
65
|
+
2. Merge it, then on a clean, up-to-date `main`: `bun run release:tag --push`. Without `--push` the annotated tag stays local. The script refuses a tree that is not clean, a `main` behind `origin/main`, a tag that already exists, a version that does not increase over the existing release tags, and a missing dated section, and each refusal names the next step.
|
|
66
|
+
3. `.github/workflows/release.yml` re-checks the tag against the package version and the changelog, requires the commit to be on `main` with a green `Check` run for it, runs `bun run check`, shows the `npm pack` file list, stages the tarball with a SHA-256 manifest, and installs that tarball in an empty consumer project (`bun scripts/package-smoke.ts`) so the packaged plugin imports and `vmem-ui --help` runs before anything is published.
|
|
67
|
+
|
|
68
|
+
### The first publish
|
|
69
|
+
|
|
70
|
+
`@staix/vault-mem-ui` has never been published (`npm view @staix/vault-mem-ui` answers 404), and npm's trusted publishing is configured on a package that already exists, which the flow here needs: the publish job has no npm token and reaches the registry only through OIDC. So the first release is three steps, all of them a person's:
|
|
71
|
+
|
|
72
|
+
1. Bootstrap the package name once, from a clean `main` checkout that still holds the placeholder version `0.0.0`. `dist/` is not in git (it is ignored), so publishing the checkout would ship whatever build it happens to hold; run the gates and publish the bytes the smoke test installed instead:
|
|
73
|
+
|
|
74
|
+
```sh
|
|
75
|
+
bun install --frozen-lockfile && bun run check
|
|
76
|
+
mkdir -p /tmp/vmem-bootstrap
|
|
77
|
+
npm pack --ignore-scripts --pack-destination /tmp/vmem-bootstrap
|
|
78
|
+
bun scripts/package-smoke.ts /tmp/vmem-bootstrap/staix-vault-mem-ui-0.0.0.tgz
|
|
79
|
+
npm publish /tmp/vmem-bootstrap/staix-vault-mem-ui-0.0.0.tgz --access public --provenance=false --tag bootstrap
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
That publishes the placeholder `0.0.0`, not the release-prep version: npm never lets a published version be reused, so spending `0.0.0` here keeps the release-prep version free for the tag flow. `--tag bootstrap` publishes under the `bootstrap` dist-tag instead of `latest`, though a first publish may still leave the registry pointing `latest` at `0.0.0`; if it does, `npm i @staix/vault-mem-ui` installs `0.0.0` until the first non-prerelease moves `latest` itself. Read the tags with `npm view @staix/vault-mem-ui dist-tags` (or `npm dist-tag ls @staix/vault-mem-ui`). A non-prerelease tag publishes with `--tag latest` and moves it for you. A prerelease publishes under `next`; only if you intend to make that prerelease the default, point `latest` at it with `npm dist-tag add @staix/vault-mem-ui@<that version> latest`. `--provenance=false` overrides `publishConfig.provenance`, which asks for an OIDC identity a local shell does not have. If that checkout's `package.json` already names a release version, stop before publishing: that version belongs to the tag flow, and publishing it here would make the tag release fail as already on the registry.
|
|
83
|
+
2. Attach the trusted publisher, the same configuration as the list below: `npm trust github @staix/vault-mem-ui --file release.yml --repository STAIxBWLB/vault-mem-ui --environment npm-production --allow-publish` (npm 12 has this command; `npm trust --help` lists its flags).
|
|
84
|
+
3. Set `NPM_PUBLISH_ENABLED=true`. The release-prep PR then sets the first real version and its dated changelog section, and the first tag release publishes that version with provenance.
|
|
85
|
+
|
|
86
|
+
Unverified from this repository, and none of it attempted here: whether the gated bootstrap publish in step 1 succeeds, whether a first publish under `--tag bootstrap` also sets `latest`, whether `npm trust` accepts a package before any release version exists rather than requiring one, and how long an unvalidated configuration lasts. What is measured: `npm view @staix/vault-mem-ui` answers 404, `dist/` is ignored by git, `npm trust github` takes exactly those flags in npm 12.2.2, `npm dist-tag` in npm 12.2.2 takes `add <package-spec (with version)> [<tag>]` and `ls [<package-spec>]`, and `scripts/package-smoke.ts` installs and runs a packed tarball (see the release PR).
|
|
87
|
+
|
|
88
|
+
The `Publish approved artifact with npm OIDC` job runs only when the repository variable `NPM_PUBLISH_ENABLED` is `true`; `Publish the GitHub release` follows it. Settings a person configures once, none of which this repository sets up:
|
|
89
|
+
|
|
90
|
+
- npm trusted publisher for `@staix/vault-mem-ui`: publisher GitHub, repository `STAIxBWLB/vault-mem-ui`, workflow `release.yml`, environment `npm-production`.
|
|
91
|
+
- Repository variable `NPM_PUBLISH_ENABLED=true`; unset or any other value keeps publication off.
|
|
92
|
+
- The `npm-production` environment, with whatever protection rules it should carry.
|
|
93
|
+
- Provenance comes from the publish job's own `id-token: write`, so no npm token secret is stored.
|
|
94
|
+
|
|
95
|
+
## License
|
|
96
|
+
|
|
97
|
+
MIT. See [LICENSE](LICENSE).
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
# Third-party notices
|
|
2
|
+
|
|
3
|
+
The panel bundle contains React and its renderer, and the graph view adds graphology, graphology-layout-forceatlas2, graphology-utils, sigma and Bun's browser `node:events` polyfill; all are bundled into `dist/panel.js`.
|
|
4
|
+
For each bundled package, add a `## package-name` heading followed by `License: identifier` and the applicable notice. The build checks these entries against its bundle inputs.
|
|
5
|
+
|
|
6
|
+
## graphology
|
|
7
|
+
|
|
8
|
+
License: MIT
|
|
9
|
+
|
|
10
|
+
```
|
|
11
|
+
The MIT License (MIT)
|
|
12
|
+
|
|
13
|
+
Copyright (c) 2016-2021 Guillaume Plique (Yomguithereal)
|
|
14
|
+
|
|
15
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
16
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
17
|
+
in the Software without restriction, including without limitation the rights
|
|
18
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
19
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
20
|
+
furnished to do so, subject to the following conditions:
|
|
21
|
+
|
|
22
|
+
The above copyright notice and this permission notice shall be included in
|
|
23
|
+
all copies or substantial portions of the Software.
|
|
24
|
+
|
|
25
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
26
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
27
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
28
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
29
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
30
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
31
|
+
THE SOFTWARE.
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## graphology-layout-forceatlas2
|
|
35
|
+
|
|
36
|
+
License: MIT
|
|
37
|
+
|
|
38
|
+
```
|
|
39
|
+
The MIT License (MIT)
|
|
40
|
+
|
|
41
|
+
Copyright (c) 2016-2021 Guillaume Plique (Yomguithereal)
|
|
42
|
+
|
|
43
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
44
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
45
|
+
in the Software without restriction, including without limitation the rights
|
|
46
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
47
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
48
|
+
furnished to do so, subject to the following conditions:
|
|
49
|
+
|
|
50
|
+
The above copyright notice and this permission notice shall be included in
|
|
51
|
+
all copies or substantial portions of the Software.
|
|
52
|
+
|
|
53
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
54
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
55
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
56
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
57
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
58
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
59
|
+
THE SOFTWARE.
|
|
60
|
+
```
|
|
61
|
+
## react
|
|
62
|
+
|
|
63
|
+
License: MIT
|
|
64
|
+
|
|
65
|
+
Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
66
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
67
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
68
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
69
|
+
|
|
70
|
+
## react-dom
|
|
71
|
+
|
|
72
|
+
License: MIT
|
|
73
|
+
|
|
74
|
+
Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
75
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
76
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
77
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
78
|
+
|
|
79
|
+
## scheduler
|
|
80
|
+
|
|
81
|
+
License: MIT
|
|
82
|
+
|
|
83
|
+
Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
84
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
85
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
86
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
87
|
+
|
|
88
|
+
## sigma
|
|
89
|
+
|
|
90
|
+
License: MIT
|
|
91
|
+
|
|
92
|
+
```
|
|
93
|
+
Copyright (C) 2013-2025, Alexis Jacomy, Guillaume Plique, Benoît Simard https://www.sigmajs.org
|
|
94
|
+
|
|
95
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"),
|
|
96
|
+
to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
|
97
|
+
and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
98
|
+
|
|
99
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
100
|
+
|
|
101
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
102
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
103
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
|
104
|
+
IN THE SOFTWARE.
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
## graphology-utils
|
|
108
|
+
|
|
109
|
+
License: MIT
|
|
110
|
+
|
|
111
|
+
```
|
|
112
|
+
The MIT License (MIT)
|
|
113
|
+
|
|
114
|
+
Copyright (c) 2017-2021 Guillaume Plique (Yomguithereal)
|
|
115
|
+
|
|
116
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
117
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
118
|
+
in the Software without restriction, including without limitation the rights
|
|
119
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
120
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
121
|
+
furnished to do so, subject to the following conditions:
|
|
122
|
+
|
|
123
|
+
The above copyright notice and this permission notice shall be included in
|
|
124
|
+
all copies or substantial portions of the Software.
|
|
125
|
+
|
|
126
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
127
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
128
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
129
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
130
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
131
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
132
|
+
THE SOFTWARE.
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
## node:events
|
|
136
|
+
|
|
137
|
+
License: MIT
|
|
138
|
+
|
|
139
|
+
Bun bundles its browser implementation of `node:events` (imported by graphology and sigma as `events`), derived from the `events` package 3.3.0.
|
|
140
|
+
|
|
141
|
+
```
|
|
142
|
+
MIT
|
|
143
|
+
|
|
144
|
+
Copyright Joyent, Inc. and other Node contributors.
|
|
145
|
+
|
|
146
|
+
Permission is hereby granted, free of charge, to any person obtaining a
|
|
147
|
+
copy of this software and associated documentation files (the
|
|
148
|
+
"Software"), to deal in the Software without restriction, including
|
|
149
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
|
150
|
+
distribute, sublicense, and/or sell copies of the Software, and to permit
|
|
151
|
+
persons to whom the Software is furnished to do so, subject to the
|
|
152
|
+
following conditions:
|
|
153
|
+
|
|
154
|
+
The above copyright notice and this permission notice shall be included
|
|
155
|
+
in all copies or substantial portions of the Software.
|
|
156
|
+
|
|
157
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
|
158
|
+
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
159
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
|
|
160
|
+
NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
|
161
|
+
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
|
162
|
+
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
|
|
163
|
+
USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
164
|
+
```
|
package/bin/vmem-ui.ts
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
#!/usr/bin/env bun
|
|
2
|
+
// Thin entry: reads exactly this package's two built client files, then hands off to src/server/cli.ts.
|
|
3
|
+
// This is the only filesystem read in the command, and it never touches the vault.
|
|
4
|
+
import { run, shutdown } from "../src/server/cli.ts";
|
|
5
|
+
|
|
6
|
+
export const CLIENT_FILES = { js: new URL("../dist/panel.js", import.meta.url), css: new URL("../dist/panel.css", import.meta.url) } as const;
|
|
7
|
+
|
|
8
|
+
async function readClient(): Promise<{ js: string; css: string } | null> {
|
|
9
|
+
const js = Bun.file(CLIENT_FILES.js), css = Bun.file(CLIENT_FILES.css);
|
|
10
|
+
if (!(await js.exists()) || !(await css.exists())) return null;
|
|
11
|
+
return { js: await js.text(), css: await css.text() };
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
if (import.meta.main) {
|
|
15
|
+
const assets = await readClient();
|
|
16
|
+
if (!assets) {
|
|
17
|
+
console.error("vmem-ui: the client bundle is missing (dist/panel.js, dist/panel.css); run `bun run build` in the vault-mem-ui package first");
|
|
18
|
+
process.exit(1);
|
|
19
|
+
}
|
|
20
|
+
const host = await run({ assets, argv: process.argv.slice(2), env: process.env, out: console.log, err: console.error, exit: (c) => process.exit(c) });
|
|
21
|
+
if (!host) process.exit(process.argv.includes("--help") || process.argv.includes("-h") ? 0 : 2);
|
|
22
|
+
// Ctrl-C and a termination request go through the same close as the idle exit: the provider is closed either way.
|
|
23
|
+
const stop = () => void shutdown(host, (code) => process.exit(code), console.error);
|
|
24
|
+
process.on("SIGINT", stop);
|
|
25
|
+
process.on("SIGTERM", stop);
|
|
26
|
+
}
|