pi-widget-host 0.3.4 → 0.3.5
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 +20 -5
- package/README.md +5 -2
- package/docs/provider-example.md +35 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,16 +1,31 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
This project follows semantic versioning.
|
|
6
|
+
|
|
7
|
+
## [0.3.5] - 2026-08-04
|
|
4
8
|
|
|
5
9
|
### Changed
|
|
6
10
|
|
|
7
|
-
- Bump package version
|
|
11
|
+
- Bump package version for the Discord release webhook verification.
|
|
8
12
|
|
|
9
|
-
|
|
13
|
+
## [0.3.4] - 2026-07-21
|
|
10
14
|
|
|
11
|
-
|
|
15
|
+
### Added
|
|
12
16
|
|
|
13
|
-
|
|
17
|
+
- `ROADMAP.md` maintenance context for weekly portfolio seeds and bounded micro-tasks.
|
|
18
|
+
|
|
19
|
+
### Changed
|
|
20
|
+
|
|
21
|
+
- CONTRIBUTING release instructions now match the auto-release and publish workflow (no `follow-tags`).
|
|
22
|
+
- Dependency updates for `pi-widget-core` and development tooling.
|
|
23
|
+
|
|
24
|
+
## [0.3.3] - 2026-07-04
|
|
25
|
+
|
|
26
|
+
### Added
|
|
27
|
+
|
|
28
|
+
- Buy Me a Coffee sponsor button to README and native GitHub funding link via `.github/FUNDING.yml`.
|
|
14
29
|
|
|
15
30
|
## [0.3.2] - 2026-06-26
|
|
16
31
|
|
package/README.md
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# Pi Widget Host
|
|
2
2
|
|
|
3
|
+
[](https://discord.gg/4945dXZVW5)
|
|
4
|
+
|
|
3
5
|
[](https://github.com/eiei114/pi-widget-host/actions/workflows/ci.yml)
|
|
4
6
|
[](https://github.com/eiei114/pi-widget-host/actions/workflows/publish.yml)
|
|
5
7
|
[](https://www.npmjs.com/package/pi-widget-host)
|
|
@@ -95,7 +97,7 @@ Future provider packages can publish to the host without importing this package
|
|
|
95
97
|
- required fields: `providerId`, `available`, `lines`, `updatedAt`
|
|
96
98
|
- optional fields: `priority`, `tags`, `mode`, `ttlMs`
|
|
97
99
|
|
|
98
|
-
See [`docs/protocol.md`](docs/protocol.md).
|
|
100
|
+
See [`docs/protocol.md`](docs/protocol.md) and the copy-paste [`minimal provider example`](docs/provider-example.md).
|
|
99
101
|
|
|
100
102
|
## Built-in demo provider
|
|
101
103
|
|
|
@@ -113,6 +115,7 @@ The built-in demo provider exists to prove the host loop first:
|
|
|
113
115
|
| `extensions/index.ts` | Pi extension entrypoint and `/widget-host:*` command registration |
|
|
114
116
|
| `lib/` | config store, registry protocol, policy evaluation, and demo provider |
|
|
115
117
|
| `docs/protocol.md` | registry protocol reference for future provider packages |
|
|
118
|
+
| `docs/provider-example.md` | minimal copy-paste provider publishing through the registry |
|
|
116
119
|
| `docs/release.md` | Trusted Publishing release notes |
|
|
117
120
|
|
|
118
121
|
## Development
|
|
@@ -150,4 +153,4 @@ For vulnerability reporting, see [`SECURITY.md`](SECURITY.md).
|
|
|
150
153
|
|
|
151
154
|
## License
|
|
152
155
|
|
|
153
|
-
MIT
|
|
156
|
+
MIT
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# Minimal provider example
|
|
2
|
+
|
|
3
|
+
Provider packages can publish widget lines without importing `pi-widget-host`. They only need to write a `ProviderEntry` into the process-local registry on `globalThis`.
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
const registrySymbol = Symbol.for("pi-widget-host.registry.v1");
|
|
7
|
+
|
|
8
|
+
type ProviderEntry = {
|
|
9
|
+
providerId: string;
|
|
10
|
+
available: boolean;
|
|
11
|
+
lines: string[];
|
|
12
|
+
updatedAt: string;
|
|
13
|
+
priority?: number;
|
|
14
|
+
tags?: string[];
|
|
15
|
+
mode?: string;
|
|
16
|
+
ttlMs?: number;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
type WidgetHostRegistry = {
|
|
20
|
+
set(entry: ProviderEntry): void;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
const registry = Reflect.get(globalThis, registrySymbol) as WidgetHostRegistry | undefined;
|
|
24
|
+
|
|
25
|
+
registry?.set({
|
|
26
|
+
providerId: "example.now-playing",
|
|
27
|
+
available: true,
|
|
28
|
+
lines: ["Now Playing", "Example Artist — Example Song"],
|
|
29
|
+
updatedAt: new Date().toISOString(),
|
|
30
|
+
priority: 20,
|
|
31
|
+
tags: ["music", "playing-now"],
|
|
32
|
+
});
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Required fields are `providerId`, `available`, `lines`, and `updatedAt`. Optional fields such as `priority`, `tags`, `mode`, and `ttlMs` help the host choose between eligible providers. See [`protocol.md`](protocol.md) for the full registry shape and host selection notes.
|
package/package.json
CHANGED