@deadair/plugin-sdk 0.2.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.
Files changed (73) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +1062 -0
  3. package/dist/article.parse.d.ts +82 -0
  4. package/dist/article.parse.d.ts.map +1 -0
  5. package/dist/boundary.json.safe.d.ts +191 -0
  6. package/dist/boundary.json.safe.d.ts.map +1 -0
  7. package/dist/capabilities/analysis.d.ts +330 -0
  8. package/dist/capabilities/analysis.d.ts.map +1 -0
  9. package/dist/capabilities/charts.d.ts +134 -0
  10. package/dist/capabilities/charts.d.ts.map +1 -0
  11. package/dist/capabilities/enrichment.d.ts +255 -0
  12. package/dist/capabilities/enrichment.d.ts.map +1 -0
  13. package/dist/capabilities/llm.d.ts +318 -0
  14. package/dist/capabilities/llm.d.ts.map +1 -0
  15. package/dist/capabilities/mixer.d.ts +183 -0
  16. package/dist/capabilities/mixer.d.ts.map +1 -0
  17. package/dist/capabilities/music.provider.d.ts +245 -0
  18. package/dist/capabilities/music.provider.d.ts.map +1 -0
  19. package/dist/capabilities/news.d.ts +171 -0
  20. package/dist/capabilities/news.d.ts.map +1 -0
  21. package/dist/capabilities/scrobble.d.ts +133 -0
  22. package/dist/capabilities/scrobble.d.ts.map +1 -0
  23. package/dist/capabilities/search.d.ts +122 -0
  24. package/dist/capabilities/search.d.ts.map +1 -0
  25. package/dist/capabilities/similarity.d.ts +101 -0
  26. package/dist/capabilities/similarity.d.ts.map +1 -0
  27. package/dist/capabilities/speech.d.ts +211 -0
  28. package/dist/capabilities/speech.d.ts.map +1 -0
  29. package/dist/capabilities/weather.d.ts +192 -0
  30. package/dist/capabilities/weather.d.ts.map +1 -0
  31. package/dist/chunk-7QVYU63E.js +7 -0
  32. package/dist/chunk-7QVYU63E.js.map +1 -0
  33. package/dist/define.plugin.d.ts +56 -0
  34. package/dist/define.plugin.d.ts.map +1 -0
  35. package/dist/feed.parse.d.ts +97 -0
  36. package/dist/feed.parse.d.ts.map +1 -0
  37. package/dist/html.text.d.ts +71 -0
  38. package/dist/html.text.d.ts.map +1 -0
  39. package/dist/index.d.ts +30 -0
  40. package/dist/index.d.ts.map +1 -0
  41. package/dist/index.js +1153 -0
  42. package/dist/index.js.map +1 -0
  43. package/dist/match.text.d.ts +28 -0
  44. package/dist/match.text.d.ts.map +1 -0
  45. package/dist/plugin.api.version.d.ts +9 -0
  46. package/dist/plugin.api.version.d.ts.map +1 -0
  47. package/dist/plugin.base.d.ts +80 -0
  48. package/dist/plugin.base.d.ts.map +1 -0
  49. package/dist/plugin.config.fields.d.ts +524 -0
  50. package/dist/plugin.config.fields.d.ts.map +1 -0
  51. package/dist/plugin.config.read.d.ts +52 -0
  52. package/dist/plugin.config.read.d.ts.map +1 -0
  53. package/dist/plugin.error.d.ts +177 -0
  54. package/dist/plugin.error.d.ts.map +1 -0
  55. package/dist/plugin.host.d.ts +220 -0
  56. package/dist/plugin.host.d.ts.map +1 -0
  57. package/dist/plugin.host.response.d.ts +42 -0
  58. package/dist/plugin.host.response.d.ts.map +1 -0
  59. package/dist/plugin.http.d.ts +80 -0
  60. package/dist/plugin.http.d.ts.map +1 -0
  61. package/dist/plugin.lifecycle.d.ts +68 -0
  62. package/dist/plugin.lifecycle.d.ts.map +1 -0
  63. package/dist/plugin.manifest.d.ts +282 -0
  64. package/dist/plugin.manifest.d.ts.map +1 -0
  65. package/dist/plugin.permissions.d.ts +186 -0
  66. package/dist/plugin.permissions.d.ts.map +1 -0
  67. package/dist/testing/fake.plugin.host.d.ts +85 -0
  68. package/dist/testing/fake.plugin.host.d.ts.map +1 -0
  69. package/dist/testing/index.d.ts +10 -0
  70. package/dist/testing/index.d.ts.map +1 -0
  71. package/dist/testing/index.js +141 -0
  72. package/dist/testing/index.js.map +1 -0
  73. package/package.json +67 -0
@@ -0,0 +1,141 @@
1
+ import {
2
+ __name
3
+ } from "../chunk-7QVYU63E.js";
4
+
5
+ // src/testing/fake.plugin.host.ts
6
+ import { vi } from "vitest";
7
+ var DEFAULT_REMAINING_MS = 15e3;
8
+ var NULL_BODY_STATUSES = /* @__PURE__ */ new Set([
9
+ 101,
10
+ 204,
11
+ 205,
12
+ 304
13
+ ]);
14
+ function fakeHostFetchResponse(init = {}) {
15
+ const status = init.status ?? 200;
16
+ const response = new Response(NULL_BODY_STATUSES.has(status) ? null : init.body ?? "", {
17
+ status,
18
+ statusText: init.statusText ?? "OK",
19
+ headers: init.headers ?? {
20
+ "content-type": "application/json"
21
+ }
22
+ });
23
+ Object.defineProperty(response, "url", {
24
+ value: init.url ?? "https://example.test/"
25
+ });
26
+ return response;
27
+ }
28
+ __name(fakeHostFetchResponse, "fakeHostFetchResponse");
29
+ function createFakePluginHost() {
30
+ const calls = [];
31
+ const queue = [];
32
+ let customImpl;
33
+ const storageData = /* @__PURE__ */ new Map();
34
+ let configData = {};
35
+ const secretsData = /* @__PURE__ */ new Map();
36
+ let tokens;
37
+ let remainingMs = DEFAULT_REMAINING_MS;
38
+ let fetchedTrack = {
39
+ url: "http://127.0.0.1:3679/track/song-1?t=signed",
40
+ expiresAt: 1893456e6
41
+ };
42
+ const fetchImpl = vi.fn(async (url, init) => {
43
+ calls.push({
44
+ url,
45
+ method: init?.method,
46
+ headers: init?.headers,
47
+ body: init?.body
48
+ });
49
+ if (customImpl) return customImpl(url, init);
50
+ const next = queue.shift();
51
+ if (!next) throw new Error(`fake plugin host: no response queued for ${init?.method ?? "GET"} ${url}`);
52
+ return next;
53
+ });
54
+ const host = {
55
+ logger: {
56
+ debug: vi.fn(),
57
+ info: vi.fn(),
58
+ warn: vi.fn(),
59
+ error: vi.fn()
60
+ },
61
+ fetch: fetchImpl,
62
+ // Never aborts: these tests are about what a plugin does with a reply,
63
+ // not about being cancelled half way through one.
64
+ signal: new AbortController().signal,
65
+ remainingMs: vi.fn(() => remainingMs),
66
+ storage: {
67
+ get: vi.fn(async (key) => storageData.get(key)),
68
+ set: vi.fn(async (key, value) => {
69
+ storageData.set(key, value);
70
+ }),
71
+ delete: vi.fn(async (key) => {
72
+ storageData.delete(key);
73
+ }),
74
+ list: vi.fn(async (prefix) => [
75
+ ...storageData.keys()
76
+ ].filter((key) => !prefix || key.startsWith(prefix)))
77
+ },
78
+ secrets: {
79
+ get: vi.fn(async (key) => secretsData.get(key))
80
+ },
81
+ config: {
82
+ get: vi.fn(async () => configData)
83
+ },
84
+ oauth: {
85
+ getRedirectUri: vi.fn(async () => "https://example.test/callback"),
86
+ saveTokens: vi.fn(async (next) => {
87
+ tokens = next;
88
+ }),
89
+ getTokens: vi.fn(async () => tokens)
90
+ },
91
+ events: {
92
+ emit: vi.fn()
93
+ },
94
+ trackFetcher: {
95
+ serve: vi.fn(async () => fetchedTrack)
96
+ },
97
+ calls,
98
+ seedRemainingMs(ms) {
99
+ remainingMs = ms;
100
+ },
101
+ queueResponse(response) {
102
+ queue.push(fakeHostFetchResponse(response));
103
+ },
104
+ setFetchImpl(impl) {
105
+ customImpl = impl;
106
+ },
107
+ seedConfig(config) {
108
+ configData = config;
109
+ },
110
+ seedSecret(key, value) {
111
+ secretsData.set(key, value);
112
+ },
113
+ seedStorage(key, value) {
114
+ storageData.set(key, value);
115
+ },
116
+ getStorageEntry(key) {
117
+ return storageData.get(key);
118
+ },
119
+ storageKeys() {
120
+ return [
121
+ ...storageData.keys()
122
+ ];
123
+ },
124
+ seedTokens(next) {
125
+ tokens = next;
126
+ },
127
+ getVaultTokens() {
128
+ return tokens;
129
+ },
130
+ seedFetchedTrack(stream) {
131
+ fetchedTrack = stream;
132
+ }
133
+ };
134
+ return host;
135
+ }
136
+ __name(createFakePluginHost, "createFakePluginHost");
137
+ export {
138
+ createFakePluginHost,
139
+ fakeHostFetchResponse
140
+ };
141
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/testing/fake.plugin.host.ts"],"sourcesContent":["import { vi } from 'vitest';\n\nimport type { HostFetchInit, HostFetchMethod, PluginHost, ProviderStream } from '../index.js';\n\n/**\n * Shipped from the SDK rather than copied into each plugin, which three of them\n * were doing — two of those carrying a comment saying the copy was deliberate\n * because plugins do not depend on each other.\n *\n * That reasoning held for the copies and does not hold for this: every plugin\n * already depends on the SDK, and `PluginHost` is the SDK's own contract, so its\n * test double belongs beside the interface it doubles. A plugin importing this\n * gains no dependency on any other plugin. It also means a host method added to\n * the contract turns up in one fake rather than being added to three and\n * forgotten in the other three.\n *\n * Reached as `@deadair/plugin-sdk/testing`, which is kept out of the runtime\n * entry so nothing ships a dependency on vitest.\n */\n\n/** One `host.fetch` call, recorded with only the fields tests care about. */\nexport interface RecordedFetchCall {\n url: string;\n method: HostFetchMethod | undefined;\n headers: Record<string, string> | undefined;\n body: string | undefined;\n}\n\n/**\n * A `PluginHost` for tests. `fetch` replays a queue of scripted\n * `Response`s (FIFO, one per call) — or a custom handler installed\n * with `setFetchImpl`, for call-count-driven scenarios like a 401-then-200\n * retry — and records every call it received in `calls`. `storage`, `config`,\n * `secrets` and the `oauth` vault are in-memory and can be seeded or read\n * directly, bypassing the `PluginHost` methods, so a test can assert on state\n * without going through the code under test twice.\n */\nexport interface FakePluginHost extends PluginHost {\n /** Every `host.fetch` call so far, in call order. */\n readonly calls: RecordedFetchCall[];\n /** Set what `host.remainingMs()` reports, for testing budget shedding. */\n seedRemainingMs(ms: number): void;\n /** Push one scripted response onto the back of the reply queue. */\n queueResponse(response: FakeResponseInit): void;\n /** Replace the fetch handler outright; overrides the queue while set. */\n setFetchImpl(impl: (url: string, init?: HostFetchInit) => Promise<Response>): void;\n /** Seed the value `host.config.get()` resolves to. */\n seedConfig(config: Record<string, unknown>): void;\n /** Seed a value `host.secrets.get(key)` resolves to. */\n seedSecret(key: string, value: string): void;\n /** Seed a storage entry directly, bypassing `host.storage.set`. */\n seedStorage(key: string, value: unknown): void;\n /** Read a storage entry directly, bypassing `host.storage.get`. */\n getStorageEntry(key: string): unknown;\n /** All storage keys currently set, unfiltered. */\n storageKeys(): string[];\n /** Seed the oauth vault directly, bypassing `host.oauth.saveTokens`. */\n seedTokens(tokens: Record<string, string>): void;\n /** Read the oauth vault directly, bypassing `host.oauth.getTokens`. */\n getVaultTokens(): Record<string, string> | undefined;\n /** Set what `host.trackFetcher.serve()` answers with; `undefined` means \"this station has no fetcher\". */\n seedFetchedTrack(stream: ProviderStream | undefined): void;\n}\n\n/**\n * What `host.remainingMs()` reports unless a test says otherwise. Matches the\n * host's default per-call deadline, so a plugin that only sheds work when the\n * budget is tight behaves in tests the way it does on a healthy station.\n */\nconst DEFAULT_REMAINING_MS = 15_000;\n\n/**\n * What a test says a scripted reply should be.\n *\n * Not `ResponseInit`, because `url` is not on it: `host.fetch` reports the last\n * hop of the redirect chain there, and a `Response` built by hand has an empty\n * one unless it is defined in.\n */\nexport interface FakeResponseInit {\n status?: number;\n statusText?: string;\n headers?: Record<string, string>;\n /**\n * Text for a JSON or error reply, bytes for a binary one.\n *\n * `Uint8Array<ArrayBuffer>` rather than a bare `Uint8Array`: the DOM lib's\n * `BodyInit` accepts a view over a real `ArrayBuffer`, and the unparameterized\n * form widens to `ArrayBufferLike`, which includes `SharedArrayBuffer` and is\n * not something `Response` will take. `new Uint8Array([...])` already has the\n * narrow type, so no test has to say so.\n */\n body?: string | Uint8Array<ArrayBuffer>;\n url?: string;\n}\n\n/** Statuses whose `Response` must carry a null body, or the constructor throws. */\nconst NULL_BODY_STATUSES = new Set([101, 204, 205, 304]);\n\n/** Builds a default 200 `Response`, overridable field by field. */\nexport function fakeHostFetchResponse(init: FakeResponseInit = {}): Response {\n const status = init.status ?? 200;\n\n const response = new Response(NULL_BODY_STATUSES.has(status) ? null : (init.body ?? ''), {\n status,\n statusText: init.statusText ?? 'OK',\n headers: init.headers ?? { 'content-type': 'application/json' },\n });\n\n // Read-only on a constructed response, and part of what the host promises.\n Object.defineProperty(response, 'url', { value: init.url ?? 'https://example.test/' });\n\n return response;\n}\n\nexport function createFakePluginHost(): FakePluginHost {\n const calls: RecordedFetchCall[] = [];\n const queue: Response[] = [];\n let customImpl: ((url: string, init?: HostFetchInit) => Promise<Response>) | undefined;\n\n const storageData = new Map<string, unknown>();\n let configData: Record<string, unknown> = {};\n const secretsData = new Map<string, string>();\n let tokens: Record<string, string> | undefined;\n let remainingMs = DEFAULT_REMAINING_MS;\n let fetchedTrack: ProviderStream | undefined = { url: 'http://127.0.0.1:3679/track/song-1?t=signed', expiresAt: 1_893_456_000_000 };\n\n const fetchImpl = vi.fn(async (url: string, init?: HostFetchInit): Promise<Response> => {\n calls.push({ url, method: init?.method, headers: init?.headers, body: init?.body });\n if (customImpl) return customImpl(url, init);\n const next = queue.shift();\n if (!next) throw new Error(`fake plugin host: no response queued for ${init?.method ?? 'GET'} ${url}`);\n return next;\n });\n\n const host: FakePluginHost = {\n logger: { debug: vi.fn(), info: vi.fn(), warn: vi.fn(), error: vi.fn() },\n fetch: fetchImpl,\n // Never aborts: these tests are about what a plugin does with a reply,\n // not about being cancelled half way through one.\n signal: new AbortController().signal,\n remainingMs: vi.fn(() => remainingMs),\n storage: {\n get: vi.fn(async (key: string) => storageData.get(key)),\n set: vi.fn(async (key: string, value: unknown) => {\n storageData.set(key, value);\n }),\n delete: vi.fn(async (key: string) => {\n storageData.delete(key);\n }),\n list: vi.fn(async (prefix?: string) => [...storageData.keys()].filter(key => !prefix || key.startsWith(prefix))),\n },\n secrets: { get: vi.fn(async (key: string) => secretsData.get(key)) },\n config: { get: vi.fn(async () => configData) },\n oauth: {\n getRedirectUri: vi.fn(async () => 'https://example.test/callback'),\n saveTokens: vi.fn(async (next: Record<string, string>) => {\n tokens = next;\n }),\n getTokens: vi.fn(async () => tokens),\n },\n events: { emit: vi.fn() },\n trackFetcher: { serve: vi.fn(async () => fetchedTrack) },\n calls,\n seedRemainingMs(ms) {\n remainingMs = ms;\n },\n queueResponse(response: FakeResponseInit) {\n queue.push(fakeHostFetchResponse(response));\n },\n setFetchImpl(impl) {\n customImpl = impl;\n },\n seedConfig(config) {\n configData = config;\n },\n seedSecret(key, value) {\n secretsData.set(key, value);\n },\n seedStorage(key, value) {\n storageData.set(key, value);\n },\n getStorageEntry(key) {\n return storageData.get(key);\n },\n storageKeys() {\n return [...storageData.keys()];\n },\n seedTokens(next) {\n tokens = next;\n },\n getVaultTokens() {\n return tokens;\n },\n seedFetchedTrack(stream) {\n fetchedTrack = stream;\n },\n };\n\n return host;\n}\n"],"mappings":"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","names":["vi","DEFAULT_REMAINING_MS","NULL_BODY_STATUSES","Set","fakeHostFetchResponse","init","status","response","Response","has","body","statusText","headers","Object","defineProperty","value","url","createFakePluginHost","calls","queue","customImpl","storageData","Map","configData","secretsData","tokens","remainingMs","fetchedTrack","expiresAt","fetchImpl","vi","fn","push","method","next","shift","Error","host","logger","debug","info","warn","error","fetch","signal","AbortController","storage","get","key","set","delete","list","prefix","keys","filter","startsWith","secrets","config","oauth","getRedirectUri","saveTokens","getTokens","events","emit","trackFetcher","serve","seedRemainingMs","ms","queueResponse","setFetchImpl","impl","seedConfig","seedSecret","seedStorage","getStorageEntry","storageKeys","seedTokens","getVaultTokens","seedFetchedTrack","stream"]}
package/package.json ADDED
@@ -0,0 +1,67 @@
1
+ {
2
+ "name": "@deadair/plugin-sdk",
3
+ "version": "0.2.0",
4
+ "description": "The contract a deadair plugin is written against: the manifest, the capabilities, the host it is handed, and a fake host for its tests.",
5
+ "keywords": [
6
+ "deadair",
7
+ "plugin",
8
+ "radio",
9
+ "sdk"
10
+ ],
11
+ "homepage": "https://deadair.radio/docs/plugin-development",
12
+ "bugs": {
13
+ "url": "https://github.com/robert-dean/deadair/issues"
14
+ },
15
+ "repository": {
16
+ "type": "git",
17
+ "url": "git+https://github.com/robert-dean/deadair.git",
18
+ "directory": "packages/plugin-sdk"
19
+ },
20
+ "type": "module",
21
+ "main": "./dist/index.js",
22
+ "module": "./dist/index.js",
23
+ "types": "./dist/index.d.ts",
24
+ "exports": {
25
+ ".": {
26
+ "types": "./dist/index.d.ts",
27
+ "default": "./dist/index.js"
28
+ },
29
+ "./testing": {
30
+ "types": "./dist/testing/index.d.ts",
31
+ "default": "./dist/testing/index.js"
32
+ }
33
+ },
34
+ "license": "MIT",
35
+ "files": [
36
+ "dist/**",
37
+ "LICENSE"
38
+ ],
39
+ "peerDependencies": {
40
+ "vitest": "^4.0.0",
41
+ "zod": "^4.0.0"
42
+ },
43
+ "peerDependenciesMeta": {
44
+ "vitest": {
45
+ "optional": true
46
+ }
47
+ },
48
+ "devDependencies": {
49
+ "vitest": "^4.1.11",
50
+ "zod": "^4.5.4",
51
+ "@repo/config-eslint": "0.0.0",
52
+ "@repo/config-typescript": "0.0.0"
53
+ },
54
+ "dependencies": {
55
+ "fast-xml-parser": "^5.10.1"
56
+ },
57
+ "publishConfig": {
58
+ "access": "public"
59
+ },
60
+ "scripts": {
61
+ "build": "tsup src/index.ts src/testing/index.ts --format esm --sourcemap && tsc --emitDeclarationOnly --declaration",
62
+ "build:ci": "eslint --max-warnings=0 && pnpm run build",
63
+ "lint": "eslint --fix",
64
+ "format": "prettier --write . --ignore-path ../../.prettierignore",
65
+ "test": "vitest run"
66
+ }
67
+ }