@zync-sh/plugin-sdk 2.0.0-beta.1 → 2.1.0-beta.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/README.md +6 -4
- package/RELEASE.md +3 -1
- package/package.json +1 -1
- package/validate.js +1 -1
- package/worker.d.ts +8 -0
package/README.md
CHANGED
|
@@ -2,16 +2,18 @@
|
|
|
2
2
|
|
|
3
3
|
Public authoring types for Manifest v2 plugins. This package lives in the Zync repository but has its own npm version and release lifecycle.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
The working tree now targets API **2.1** (`2.1.0-beta.1`, not yet published). It adds `sshCommand.execute(paneInstanceId, { program, args, expectedConnectionToken? })`, requiring `ssh.command.execute` and `engines.pluginApi: "^2.1.0"`. The returned `connectionToken` must be carried into commands following a confirmation so reconnect/rebind cannot silently change their destination. Commands use the SSH account's full authority; this is not a read-only or PM2-only permission. API 2.0 hosts reject plugins requiring this addition.
|
|
6
|
+
|
|
7
|
+
While API 2.1 is unpublished, install the local SDK as a development dependency:
|
|
6
8
|
|
|
7
9
|
```sh
|
|
8
|
-
npm install --save-dev
|
|
10
|
+
npm install --save-dev /path/to/zync/packages/plugin-sdk
|
|
9
11
|
```
|
|
10
12
|
|
|
11
|
-
|
|
13
|
+
The published `@beta` release is currently **2.0.0-beta.1** and does not include the 2.1 SSH command API. Once SDK 2.1 is published and the `beta` tag points to it, use:
|
|
12
14
|
|
|
13
15
|
```sh
|
|
14
|
-
npm install --save-dev
|
|
16
|
+
npm install --save-dev @zync-sh/plugin-sdk@beta
|
|
15
17
|
```
|
|
16
18
|
|
|
17
19
|
Zync supplies the `zync` object when it starts a plugin worker or pane. Do not bundle an SDK runtime into the plugin.
|
package/RELEASE.md
CHANGED
|
@@ -9,7 +9,9 @@ Before a beta npm SDK release:
|
|
|
9
9
|
1. Run `npm run sdk:release-check` from the Zync repository root. It checks type contracts, validator cases, the starter build, and the exact npm package contents.
|
|
10
10
|
2. Run the native plugin tests and the full agent regression suite.
|
|
11
11
|
3. Run `node check.mjs` in the sibling `zync-plugin-channel-examples` project to validate, sign, and verify stable and beta builds in a disposable registry.
|
|
12
|
-
4. Review the exact SDK tarball, production dependency audit, license, and documentation. Publish the prerelease with the `beta` npm tag
|
|
12
|
+
4. Review the exact SDK tarball, production dependency audit, license, and documentation. Publish the prerelease with the `beta` npm tag and install it in a clean project to verify the CLI and exported types. Check the actual registry tags after publishing; npm initialized `latest` to the beta on this package's first release despite `--tag beta` and rejected removal of `latest`. Do not describe `latest` as stable until a stable release replaces that tag.
|
|
13
|
+
|
|
14
|
+
`@zync-sh/plugin-sdk@2.0.0-beta.1` was published under `beta` on 2026-09-25. A clean npm install verified the CLI and exported runtime helpers. npm also currently resolves `latest` to this first beta; install `@beta` explicitly until stable promotion.
|
|
13
15
|
|
|
14
16
|
The SDK beta is an authoring tool, not a production marketplace launch. Before promoting it to `latest` or calling the marketplace production-ready, deploy the signed test builds to a protected HTTPS staging registry. Manually verify marketplace listing, opt-in beta update, switch back to stable, permission review, and retained-version rollback in the desktop app. Record the tested Zync build, SDK version, registry version, and package digests; complete the external-plugin smoke test and independent security review. Local signing tests do not substitute for these checks.
|
|
15
17
|
|
package/package.json
CHANGED
package/validate.js
CHANGED
|
@@ -18,7 +18,7 @@ export const knownPermissionIds = Object.freeze([
|
|
|
18
18
|
]);
|
|
19
19
|
|
|
20
20
|
const knownPermissions = new Set(knownPermissionIds);
|
|
21
|
-
export const pluginApiVersion = '2.
|
|
21
|
+
export const pluginApiVersion = '2.1.0';
|
|
22
22
|
const identifierPattern = /^[A-Za-z0-9_.-]+$/;
|
|
23
23
|
const semverPattern = /^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-([0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*))?(?:\+([0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*))?$/;
|
|
24
24
|
const contributionPermissions = {
|
package/worker.d.ts
CHANGED
|
@@ -69,4 +69,12 @@ export interface ZyncWorkerApi {
|
|
|
69
69
|
list(paneInstanceId: string, relativePath?: string): Promise<PluginFileEntry[]>;
|
|
70
70
|
readText(paneInstanceId: string, relativePath: string): Promise<string>;
|
|
71
71
|
};
|
|
72
|
+
/** Requires ssh.command.execute. Runs with the SSH account's full authority on POSIX servers.
|
|
73
|
+
* Arguments are quoted individually; no shell expansion. One command per pane, 20s, 2 MiB output.
|
|
74
|
+
* Closing/rebinding a pane cancels the channel, not necessarily remote side effects. */
|
|
75
|
+
sshCommand: {
|
|
76
|
+
execute(paneInstanceId: string, request: { program: string; args: string[]; expectedConnectionToken?: string }): Promise<{
|
|
77
|
+
stdout: string; stderr: string; exitCode: number; connectionToken: string;
|
|
78
|
+
}>;
|
|
79
|
+
};
|
|
72
80
|
}
|