@gang-of-beads/pi-web-plugin-api 0.0.0-stage → 0.1.0-alpha.2

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 ADDED
@@ -0,0 +1,22 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Federico Jaramillo Martinez
4
+ Copyright (c) 2026 Gang of Beads contributors
5
+
6
+ Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ of this software and associated documentation files (the "Software"), to deal
8
+ in the Software without restriction, including without limitation the rights
9
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ copies of the Software, and to permit persons to whom the Software is
11
+ furnished to do so, subject to the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be included in all
14
+ copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,39 @@
1
- # Temporary Holding Version
1
+ # PI WEB Plugin API
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Lightweight browser and server plugin contracts for [PI WEB](https://github.com/Gang-of-Beads/pi-web). This package contains TypeScript declarations and the public runtime constants and helpers, not the web app, session daemon or `node-pty`.
4
+
5
+ ## Install
6
+
7
+ ```sh
8
+ npm install --save-dev @gang-of-beads/pi-web-plugin-api@alpha
9
+ ```
10
+
11
+ Browser plugins also install `lit@^3`: the browser declarations use Lit's template and style types, including when rendering through the host's `context.html`. Server-only plugins do not need Lit; their declaration dependencies are included.
12
+
13
+ ## Use
14
+
15
+ ```ts
16
+ import type { PiWebPlugin } from "@gang-of-beads/pi-web-plugin-api/plugin-api";
17
+ import type { PiWebServerPlugin } from "@gang-of-beads/pi-web-plugin-api/server-plugin-api";
18
+ ```
19
+
20
+ Public runtime exports use the same entry points:
21
+
22
+ ```ts
23
+ import { CORE_STATUS_FLAGS } from "@gang-of-beads/pi-web-plugin-api/plugin-api";
24
+ import { parsePiWebRuntimeResponse } from "@gang-of-beads/pi-web-plugin-api/server-plugin-api";
25
+ ```
26
+
27
+ Bundle runtime imports into each plugin half: PI WEB loads plugin modules as they are, and the browser page has no import map. Type-only imports are erased during compilation.
28
+
29
+ ## Compatibility
30
+
31
+ `0.1.0-alpha.2` contains the declarations shipped by PI WEB `2.202610.11`, with the shape and typography tokens (`--pi-font-*`, `--pi-radius-*`) accepted in `ThemeTokens`. Browser plugins declare `apiVersion: 2`; server plugins declare `apiVersion: 1`. The existing `@gang-of-beads/pi-web/plugin-api` and `@gang-of-beads/pi-web/server-plugin-api` entry points remain available.
32
+
33
+ This is an alpha release. Host-internal members marked unstable are not a supported third-party contract.
34
+
35
+ See the [API reference](https://github.com/Gang-of-Beads/pi-web/blob/main/docs/plugin-api.md), [authoring guide](https://github.com/Gang-of-Beads/pi-web/blob/main/docs/plugin-authoring.md) and [plugin conventions](https://github.com/Gang-of-Beads/pi-web/blob/main/docs/plugin-conventions.md).
36
+
37
+ ## License
38
+
39
+ MIT.