@nesso-how/plugin 0.8.0 → 1.0.0-beta.13
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/README.md +7 -3
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/node/runtime.d.ts +1 -0
- package/dist/node/runtime.js +1 -0
- package/dist/package.d.ts +1 -1
- package/dist/package.js +1 -1
- package/dist/{runtime-uvKgm2yV.js → runtime-CkCuGeU2.js} +1 -0
- package/dist/{runtime-DCyJA620.d.ts → runtime-Mst9R37I.d.ts} +1 -0
- package/dist/runtime.d.ts +1 -1
- package/dist/runtime.js +1 -1
- package/example/package.json +3 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@ Build Nesso plugins with TypeScript: **actions** read and edit graphs, **vocabul
|
|
|
4
4
|
|
|
5
5
|
## Install
|
|
6
6
|
|
|
7
|
-
Use Node.js 24.
|
|
7
|
+
Use Node.js 24. Add the SDK to an existing TypeScript project with:
|
|
8
8
|
|
|
9
9
|
```sh
|
|
10
10
|
npm install --save-dev @nesso-how/plugin
|
|
@@ -12,6 +12,10 @@ npm install --save-dev @nesso-how/plugin
|
|
|
12
12
|
|
|
13
13
|
For a new project, start with the [standalone example](example/), which includes TypeScript, Vite, and React configuration. Plugins can be installed locally through MCP without publishing to npm.
|
|
14
14
|
|
|
15
|
+
The app, UI package, SDK, and official example share a release version on npm's default `latest` channel, including beta versions. Plugin compatibility is identified separately by `nesso.apiVersion`; matching the app's exact version is not required.
|
|
16
|
+
|
|
17
|
+
The desktop plugin catalog offers the newest compatible version on `latest`. Other prerelease channels are not included.
|
|
18
|
+
|
|
15
19
|
## Create a plugin
|
|
16
20
|
|
|
17
21
|
### With an agent
|
|
@@ -190,7 +194,7 @@ Nesso supplies React, the `@nesso-how/ui` component stylesheet, and theme CSS va
|
|
|
190
194
|
|
|
191
195
|
Nesso provides the panel title, close control, and loading/error screens. Opening a panel or changing the active view starts a new React instance and invalidates the previous context. Closing it, changing documents, replacing/removing the plugin, or a runtime failure ends the session.
|
|
192
196
|
|
|
193
|
-
Keep mutable state inside the component and clean up subscriptions in React effects. Save progress through `storage` as it changes; cleanup may not finish. Panels have no action execution timeout, but initialization and API requests have deadlines. Handle expected errors in the UI; uncaught errors or rejected promises fail the session.
|
|
197
|
+
Keep mutable state inside the component and clean up subscriptions in React effects. Module-scope state is not guaranteed between sessions: Nesso may reuse or discard the runtime, so keep state in the instance or `storage`. Save progress through `storage` as it changes; cleanup may not finish. Panels have no action execution timeout, but initialization and API requests have deadlines. Handle expected errors in the UI; uncaught errors or rejected promises fail the session.
|
|
194
198
|
|
|
195
199
|
### Action badges
|
|
196
200
|
|
|
@@ -266,7 +270,7 @@ The invoked view is **not a write sandbox**: permitted writes can affect the who
|
|
|
266
270
|
|
|
267
271
|
File saves accept exactly one of UTF-8 `text` or canonical `base64` (without a data URL prefix), with a 16 MiB decoded byte limit. File opening remains UTF-8 text only. Host-managed dialogs or browser downloads grant no unrestricted filesystem access. Plugins have no Node, host DOM, direct filesystem, clipboard, or network access.
|
|
268
272
|
|
|
269
|
-
`images.renderView` captures the invoked view with the current theme and fonts, without selection or canvas controls. Scale defaults to `2`, or accepts `4
|
|
273
|
+
`images.renderView` captures the invoked view with the current theme and fonts, without selection or canvas controls. Scale defaults to `2`, or accepts `4`, and is a maximum: views too large for it render at the highest of `4`, `2`, or `1` within 8192 pixels per side and 16,777,216 pixels total. Empty views, views over that budget at scale `1`, and PNGs over 16 MiB fail. Save the result separately with `files.save({ name: 'view.png', ...image })`; this also requires `files`.
|
|
270
274
|
|
|
271
275
|
Failures throw `PluginError` with `code` and `{ path, message }[]` issues. Let them propagate instead of reporting success. Files and notifications cannot be rolled back with graph edits.
|
|
272
276
|
|
package/dist/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { C as PluginStorageKey, F as ImageRenderOptions, G as GraphSnapshot, H as ThemeDefinition, I as RenderedImage, J as Selection, K as NessoOperation, L as PluginError, S as PluginStorage, T as PluginStorageScope, Y as VocabDefinition, a as ActionDescriptor, c as PluginI18n, i as ActionContribution, l as PluginManifest, n as ActionBadgeResult, o as ActionIconName, q as SavedView, r as ActionContext, s as ActionState, t as ActionBadgeInput, u as actionIconNames, w as PluginStorageRecord, z as LocalizedText } from "./runtime-
|
|
1
|
+
import { C as PluginStorageKey, F as ImageRenderOptions, G as GraphSnapshot, H as ThemeDefinition, I as RenderedImage, J as Selection, K as NessoOperation, L as PluginError, S as PluginStorage, T as PluginStorageScope, Y as VocabDefinition, a as ActionDescriptor, c as PluginI18n, i as ActionContribution, l as PluginManifest, n as ActionBadgeResult, o as ActionIconName, q as SavedView, r as ActionContext, s as ActionState, t as ActionBadgeInput, u as actionIconNames, w as PluginStorageRecord, z as LocalizedText } from "./runtime-Mst9R37I.js";
|
|
2
2
|
export { type ActionBadgeInput, type ActionBadgeResult, type ActionContext, type ActionContribution, type ActionDescriptor, type ActionIconName, type ActionState, type GraphSnapshot, type ImageRenderOptions, type LocalizedText, type NessoOperation, PluginError, type PluginI18n, type PluginManifest, type PluginStorage, type PluginStorageKey, type PluginStorageRecord, type PluginStorageScope, type RenderedImage, type SavedView, type Selection, type ThemeDefinition, type VocabDefinition, actionIconNames };
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { S as PluginError, t as actionIconNames } from "./runtime-
|
|
1
|
+
export { S as PluginError, t as actionIconNames } from "./runtime-CkCuGeU2.js";
|
package/dist/node/runtime.d.ts
CHANGED
|
@@ -86,6 +86,7 @@ declare const manifest: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
86
86
|
"relation.type": "relation.type";
|
|
87
87
|
"relation.type.create": "relation.type.create";
|
|
88
88
|
"selection.set": "selection.set";
|
|
89
|
+
"view.create": "view.create";
|
|
89
90
|
"view.membership": "view.membership";
|
|
90
91
|
}>>;
|
|
91
92
|
capabilities: z.ZodArray<z.ZodEnum<{
|
package/dist/node/runtime.js
CHANGED
package/dist/package.d.ts
CHANGED
package/dist/package.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as parseOrThrow, S as PluginError, g as checkMessageSize, o as parsePluginI18n, s as parsePluginManifest, u as sha256Hex, v as parseDefinition } from "./runtime-
|
|
1
|
+
import { C as parseOrThrow, S as PluginError, g as checkMessageSize, o as parsePluginI18n, s as parsePluginManifest, u as sha256Hex, v as parseDefinition } from "./runtime-CkCuGeU2.js";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
import parseVersion from "semver/functions/parse.js";
|
|
4
4
|
import validateName from "validate-npm-package-name";
|
|
@@ -512,6 +512,7 @@ declare const manifest: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
512
512
|
"relation.type": "relation.type";
|
|
513
513
|
"relation.type.create": "relation.type.create";
|
|
514
514
|
"selection.set": "selection.set";
|
|
515
|
+
"view.create": "view.create";
|
|
515
516
|
"view.membership": "view.membership";
|
|
516
517
|
}>>;
|
|
517
518
|
capabilities: z.ZodArray<z.ZodEnum<{
|
package/dist/runtime.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { A as FileOpenOptions, B as resolvePluginText, D as parsePluginStorageRecord, E as parsePluginStorageKey, F as ImageRenderOptions, I as RenderedImage, L as PluginError, M as FileSaveOptions, N as fileTextLimit, O as parsePluginStorageSnapshot, P as parseFileOptions, R as parseOrThrow, U as parseDefinition, V as Definition, W as themeColors, _ as parsePluginMessage, a as ActionDescriptor, b as themeTokens, c as PluginI18n, d as badgeLimits, f as createPluginClient, g as parsePluginManifest, h as parsePluginI18n, i as ActionContribution, j as FileOpenResult, k as pluginStorageLimits, l as PluginManifest, m as parseContribution, n as ActionBadgeResult, o as ActionIconName, p as parseActionBadgeResult, r as ActionContext, s as ActionState, t as ActionBadgeInput, u as actionIconNames, v as runtimeLimits, x as checkMessageSize, y as sha256Hex, z as LocalizedText } from "./runtime-
|
|
1
|
+
import { A as FileOpenOptions, B as resolvePluginText, D as parsePluginStorageRecord, E as parsePluginStorageKey, F as ImageRenderOptions, I as RenderedImage, L as PluginError, M as FileSaveOptions, N as fileTextLimit, O as parsePluginStorageSnapshot, P as parseFileOptions, R as parseOrThrow, U as parseDefinition, V as Definition, W as themeColors, _ as parsePluginMessage, a as ActionDescriptor, b as themeTokens, c as PluginI18n, d as badgeLimits, f as createPluginClient, g as parsePluginManifest, h as parsePluginI18n, i as ActionContribution, j as FileOpenResult, k as pluginStorageLimits, l as PluginManifest, m as parseContribution, n as ActionBadgeResult, o as ActionIconName, p as parseActionBadgeResult, r as ActionContext, s as ActionState, t as ActionBadgeInput, u as actionIconNames, v as runtimeLimits, x as checkMessageSize, y as sha256Hex, z as LocalizedText } from "./runtime-Mst9R37I.js";
|
|
2
2
|
export { ActionBadgeInput, ActionBadgeResult, ActionContext, ActionContribution, ActionDescriptor, ActionIconName, ActionState, type Definition, type FileOpenOptions, type FileOpenResult, type FileSaveOptions, type ImageRenderOptions, type LocalizedText, PluginError, PluginI18n, PluginManifest, type RenderedImage, actionIconNames, badgeLimits, checkMessageSize, createPluginClient, fileTextLimit, parseActionBadgeResult, parseContribution, parseDefinition, parseFileOptions, parseOrThrow, parsePluginI18n, parsePluginManifest, parsePluginMessage, parsePluginStorageKey, parsePluginStorageRecord, parsePluginStorageSnapshot, pluginStorageLimits, resolvePluginText, runtimeLimits, sha256Hex, themeColors, themeTokens };
|
package/dist/runtime.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { S as PluginError, t as actionIconNames, n as badgeLimits, g as checkMessageSize, r as createPluginClient, b as fileTextLimit, i as parseActionBadgeResult, a as parseContribution, v as parseDefinition, x as parseFileOptions, C as parseOrThrow, o as parsePluginI18n, s as parsePluginManifest, c as parsePluginMessage, f as parsePluginStorageKey, p as parsePluginStorageRecord, m as parsePluginStorageSnapshot, h as pluginStorageLimits, _ as resolvePluginText, l as runtimeLimits, u as sha256Hex, y as themeColors, d as themeTokens } from "./runtime-
|
|
1
|
+
export { S as PluginError, t as actionIconNames, n as badgeLimits, g as checkMessageSize, r as createPluginClient, b as fileTextLimit, i as parseActionBadgeResult, a as parseContribution, v as parseDefinition, x as parseFileOptions, C as parseOrThrow, o as parsePluginI18n, s as parsePluginManifest, c as parsePluginMessage, f as parsePluginStorageKey, p as parsePluginStorageRecord, m as parsePluginStorageSnapshot, h as pluginStorageLimits, _ as resolvePluginText, l as runtimeLimits, u as sha256Hex, y as themeColors, d as themeTokens } from "./runtime-CkCuGeU2.js";
|
package/example/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nesso-how/plugin-example",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.0-beta.13",
|
|
4
4
|
"description": "Official example showing how to build Nesso plugins with the SDK and plugin APIs",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"nesso-plugin"
|
|
@@ -28,12 +28,12 @@
|
|
|
28
28
|
"prepack": "npm run build"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@nesso-how/ui": "1.0.0-beta.
|
|
31
|
+
"@nesso-how/ui": "1.0.0-beta.13",
|
|
32
32
|
"react": "^19.2.8",
|
|
33
33
|
"react-dom": "^19.2.8"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
|
-
"@nesso-how/plugin": "0.
|
|
36
|
+
"@nesso-how/plugin": "1.0.0-beta.13",
|
|
37
37
|
"@types/react": "^19.2.18",
|
|
38
38
|
"@types/react-dom": "^19.2.7",
|
|
39
39
|
"typescript": "~7.0.2",
|