@openbrf/plugin-sdk 1.0.0 → 1.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.
- package/README.md +95 -0
- package/dist/abort-signal.d.ts +23 -0
- package/dist/abort-signal.d.ts.map +1 -0
- package/dist/abort-signal.js +2 -0
- package/dist/abort-signal.js.map +1 -0
- package/dist/action-refusal.d.ts +101 -0
- package/dist/action-refusal.d.ts.map +1 -0
- package/dist/action-refusal.js +96 -0
- package/dist/action-refusal.js.map +1 -0
- package/dist/action-schema.d.ts.map +1 -1
- package/dist/action-schema.js +4 -1
- package/dist/action-schema.js.map +1 -1
- package/dist/actions.d.ts +94 -6
- package/dist/actions.d.ts.map +1 -1
- package/dist/actions.js.map +1 -1
- package/dist/blocks.d.ts +310 -0
- package/dist/blocks.d.ts.map +1 -0
- package/dist/blocks.js +185 -0
- package/dist/blocks.js.map +1 -0
- package/dist/catalog.d.ts +399 -7
- package/dist/catalog.d.ts.map +1 -1
- package/dist/catalog.js +373 -9
- package/dist/catalog.js.map +1 -1
- package/dist/entitlements.d.ts +117 -0
- package/dist/entitlements.d.ts.map +1 -0
- package/dist/entitlements.js +62 -0
- package/dist/entitlements.js.map +1 -0
- package/dist/extensions.d.ts +183 -0
- package/dist/extensions.d.ts.map +1 -0
- package/dist/extensions.js +67 -0
- package/dist/extensions.js.map +1 -0
- package/dist/finances.d.ts +294 -0
- package/dist/finances.d.ts.map +1 -0
- package/dist/finances.js +56 -0
- package/dist/finances.js.map +1 -0
- package/dist/findings.d.ts +90 -1
- package/dist/findings.d.ts.map +1 -1
- package/dist/findings.js +89 -0
- package/dist/findings.js.map +1 -1
- package/dist/host.d.ts +621 -2
- package/dist/host.d.ts.map +1 -1
- package/dist/host.js +39 -0
- package/dist/host.js.map +1 -1
- package/dist/imports.d.ts +104 -0
- package/dist/imports.d.ts.map +1 -0
- package/dist/imports.js +70 -0
- package/dist/imports.js.map +1 -0
- package/dist/index.d.ts +17 -7
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +15 -6
- package/dist/index.js.map +1 -1
- package/dist/localized-text.d.ts +18 -0
- package/dist/localized-text.d.ts.map +1 -0
- package/dist/localized-text.js +17 -0
- package/dist/localized-text.js.map +1 -0
- package/dist/manifest.d.ts +730 -0
- package/dist/manifest.d.ts.map +1 -1
- package/dist/manifest.js +805 -11
- package/dist/manifest.js.map +1 -1
- package/dist/permissions.d.ts +170 -11
- package/dist/permissions.d.ts.map +1 -1
- package/dist/permissions.js +210 -2
- package/dist/permissions.js.map +1 -1
- package/dist/recipients.d.ts +139 -0
- package/dist/recipients.d.ts.map +1 -0
- package/dist/recipients.js +223 -0
- package/dist/recipients.js.map +1 -0
- package/dist/records.d.ts +130 -0
- package/dist/records.d.ts.map +1 -0
- package/dist/records.js +85 -0
- package/dist/records.js.map +1 -0
- package/dist/require-capability.d.ts +37 -0
- package/dist/require-capability.d.ts.map +1 -0
- package/dist/require-capability.js +88 -0
- package/dist/require-capability.js.map +1 -0
- package/dist/settings-schema.d.ts +35 -0
- package/dist/settings-schema.d.ts.map +1 -1
- package/dist/settings-schema.js +55 -2
- package/dist/settings-schema.js.map +1 -1
- package/package.json +4 -4
- package/src/abort-signal.ts +22 -0
- package/src/action-refusal.ts +178 -0
- package/src/action-schema.ts +4 -1
- package/src/actions.ts +103 -6
- package/src/blocks.ts +289 -0
- package/src/catalog.ts +500 -57
- package/src/entitlements.ts +150 -0
- package/src/extensions.ts +212 -0
- package/src/finances.ts +317 -0
- package/src/findings.ts +92 -0
- package/src/host.ts +656 -2
- package/src/imports.ts +135 -0
- package/src/index.ts +193 -0
- package/src/localized-text.ts +19 -0
- package/src/manifest.ts +1039 -12
- package/src/permissions.ts +223 -3
- package/src/recipients.ts +294 -0
- package/src/records.ts +172 -0
- package/src/require-capability.ts +106 -0
- package/src/settings-schema.ts +64 -2
package/README.md
ADDED
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
# @openbrf/plugin-sdk
|
|
2
|
+
|
|
3
|
+
The plugin contract of [Open BRF](https://github.com/openbrf/openbrf): the
|
|
4
|
+
manifest schema, the permission set, the interfaces of the services the host
|
|
5
|
+
hands a plugin, and the schema of the catalog that lists plugins and themes.
|
|
6
|
+
|
|
7
|
+
The major version is the plugin API version. Anything a plugin could notice
|
|
8
|
+
raises it, and an additive change keeps it. 1.x is API version 1.
|
|
9
|
+
|
|
10
|
+
## Installing
|
|
11
|
+
|
|
12
|
+
```sh
|
|
13
|
+
npm install --save-dev @openbrf/plugin-sdk
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
A development dependency, never a dependency. An instance installs a plugin
|
|
17
|
+
offline from its verified tarball and refuses a `package.json` that declares
|
|
18
|
+
any `dependencies`. Nothing in this package has to resolve at runtime: the host
|
|
19
|
+
passes everything a plugin uses in through `PluginHost`, so a plugin imports
|
|
20
|
+
the SDK for types and for the checks its own CI runs.
|
|
21
|
+
|
|
22
|
+
`@nestjs/common` 12 is a peer dependency. A plugin declares `@nestjs/common`,
|
|
23
|
+
`@nestjs/core` and `zod` as peer dependencies too, and never bundles them; the
|
|
24
|
+
host supplies the running copies.
|
|
25
|
+
|
|
26
|
+
## The server entry
|
|
27
|
+
|
|
28
|
+
A prebuilt CommonJS bundle that exports `createPlugin`. It receives the host
|
|
29
|
+
object and returns a NestJS module, whose controllers the host mounts under
|
|
30
|
+
`/api/plugin/<id>/`, inside the application's authorization guard.
|
|
31
|
+
|
|
32
|
+
```ts
|
|
33
|
+
import { Controller, Get, Injectable, Module } from "@nestjs/common";
|
|
34
|
+
import type { PluginModuleFactory } from "@openbrf/plugin-sdk";
|
|
35
|
+
|
|
36
|
+
export const createPlugin: PluginModuleFactory = (host) => {
|
|
37
|
+
@Injectable()
|
|
38
|
+
class OccupancyService {
|
|
39
|
+
async summary() {
|
|
40
|
+
return host.addressBook.summary();
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
@Controller()
|
|
45
|
+
class OccupancyController {
|
|
46
|
+
constructor(private readonly service: OccupancyService) {}
|
|
47
|
+
|
|
48
|
+
@Get("summary")
|
|
49
|
+
async summary() {
|
|
50
|
+
return this.service.summary();
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
@Module({})
|
|
55
|
+
class OccupancyModule {}
|
|
56
|
+
|
|
57
|
+
return {
|
|
58
|
+
module: OccupancyModule,
|
|
59
|
+
controllers: [OccupancyController],
|
|
60
|
+
providers: [OccupancyService],
|
|
61
|
+
};
|
|
62
|
+
};
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
## Checking a plugin before it is published
|
|
66
|
+
|
|
67
|
+
The checks an instance runs at install and at boot are exported, so a
|
|
68
|
+
plugin's CI refuses what an instance would refuse:
|
|
69
|
+
|
|
70
|
+
- `assertPluginPackage(packageJson)` throws with every problem in the
|
|
71
|
+
manifest at once; `parsePluginPackage` returns them instead.
|
|
72
|
+
- `pluginPackageProblems(contents)` takes the parsed `package.json`, the file
|
|
73
|
+
list, the server bundle's source and the two locale files, and returns every
|
|
74
|
+
problem that would stop the package installing or loading, one sentence
|
|
75
|
+
each.
|
|
76
|
+
- `catalogEntrySchema` is the schema of the entry a listing adds to the
|
|
77
|
+
catalog.
|
|
78
|
+
|
|
79
|
+
## Documentation
|
|
80
|
+
|
|
81
|
+
- [The plugin contract](https://github.com/openbrf/openbrf/blob/main/docs/plugin-contract.md):
|
|
82
|
+
the manifest, permissions, personal data, the server and client entries,
|
|
83
|
+
settings, translations, distribution and installation.
|
|
84
|
+
- [ADR 0003](https://github.com/openbrf/openbrf/blob/main/docs/adr/0003-plugin-loading-and-module-resolution.md):
|
|
85
|
+
how a plugin is loaded and how it resolves the host's packages.
|
|
86
|
+
- [ADR 0020](https://github.com/openbrf/openbrf/blob/main/docs/adr/0020-the-public-catalog-and-the-published-packages.md):
|
|
87
|
+
the public catalog and the published packages.
|
|
88
|
+
|
|
89
|
+
## Licence
|
|
90
|
+
|
|
91
|
+
AGPL-3.0-only, with the
|
|
92
|
+
[Open BRF Module Exception](https://github.com/openbrf/openbrf/blob/main/LICENSE-EXCEPTION.md).
|
|
93
|
+
A plugin that reaches the core only through the documented extension
|
|
94
|
+
interfaces is a module under that exception and may be licensed on any terms.
|
|
95
|
+
Both texts are in the package.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The `AbortSignal` the host hands a plugin, and takes from one.
|
|
3
|
+
*
|
|
4
|
+
* The host passes a real `AbortSignal`. This package compiles against the
|
|
5
|
+
* language alone and cannot name the platform's type, so it is looked up in
|
|
6
|
+
* the plugin's own program: where that has an `AbortSignal`, from the DOM
|
|
7
|
+
* library or from Node's types, this is it, and the signal can be passed on to
|
|
8
|
+
* `fetch` and to anything else that takes one. Where it has none, this is the
|
|
9
|
+
* part of one a plugin can use without them.
|
|
10
|
+
*/
|
|
11
|
+
export type PluginAbortSignal = typeof globalThis extends {
|
|
12
|
+
readonly AbortSignal: {
|
|
13
|
+
readonly prototype: infer Signal;
|
|
14
|
+
};
|
|
15
|
+
} ? Signal : PluginAbortSignalShape;
|
|
16
|
+
/** What every `AbortSignal` has, for a program without the platform's types. */
|
|
17
|
+
interface PluginAbortSignalShape {
|
|
18
|
+
readonly aborted: boolean;
|
|
19
|
+
addEventListener(type: "abort", listener: () => void): void;
|
|
20
|
+
removeEventListener(type: "abort", listener: () => void): void;
|
|
21
|
+
}
|
|
22
|
+
export {};
|
|
23
|
+
//# sourceMappingURL=abort-signal.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"abort-signal.d.ts","sourceRoot":"","sources":["../src/abort-signal.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,MAAM,MAAM,iBAAiB,GAAG,OAAO,UAAU,SAAS;IACxD,QAAQ,CAAC,WAAW,EAAE;QAAE,QAAQ,CAAC,SAAS,EAAE,MAAM,MAAM,CAAA;KAAE,CAAC;CAC5D,GACG,MAAM,GACN,sBAAsB,CAAC;AAE3B,gFAAgF;AAChF,UAAU,sBAAsB;IAC9B,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,gBAAgB,CAAC,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,IAAI,GAAG,IAAI,CAAC;IAC5D,mBAAmB,CAAC,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,IAAI,GAAG,IAAI,CAAC;CAChE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"abort-signal.js","sourceRoot":"","sources":["../src/abort-signal.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import type { ActionRetry } from "./actions.ts";
|
|
2
|
+
/**
|
|
3
|
+
* Why the registry refused a call, in a form a caller can act on.
|
|
4
|
+
*
|
|
5
|
+
* A caller here is often a model rather than a person, which changes what a
|
|
6
|
+
* refusal has to carry. A person reads a sentence and decides what to do; a
|
|
7
|
+
* model needs to know whether trying again could ever work, and what to change
|
|
8
|
+
* if it could. So every refusal has a code, a status, and a published rule for
|
|
9
|
+
* how a connector should render it.
|
|
10
|
+
*
|
|
11
|
+
* The vocabulary lives here rather than in the API because a plugin dispatching
|
|
12
|
+
* through `host.actions.invoke` has no other way to read it: the catalogue
|
|
13
|
+
* endpoint serves the same table over HTTP, and a plugin in the same process
|
|
14
|
+
* has no route to that. The API imports it back, so there is one list.
|
|
15
|
+
*/
|
|
16
|
+
export declare const ACTION_ERROR_REASONS: readonly ["unknown-action", "forbidden-capability", "forbidden-surface", "insufficient-scope", "not-serving", "read-only", "confirmation-required", "output-invalid", "rate-limited", "internal"];
|
|
17
|
+
export type ActionErrorReason = (typeof ACTION_ERROR_REASONS)[number];
|
|
18
|
+
/**
|
|
19
|
+
* How a connector should tell its caller about a refusal.
|
|
20
|
+
*
|
|
21
|
+
* A protocol error means the call never happened; a tool result means it
|
|
22
|
+
* happened and was refused, and only the second is something to tell the
|
|
23
|
+
* person about.
|
|
24
|
+
*/
|
|
25
|
+
export type ActionRefusalTransport = "protocol" | "tool-result";
|
|
26
|
+
/**
|
|
27
|
+
* How a connector should render each refusal, published as data.
|
|
28
|
+
*
|
|
29
|
+
* Served on the catalogue endpoint as well, so that two connectors - one
|
|
30
|
+
* reading it over HTTP, one in process - cannot disagree about whether a 403
|
|
31
|
+
* is worth retrying. Keyed by the registry's reasons and by the two refusals
|
|
32
|
+
* that are not the registry's own: a body the action's input schema refuses,
|
|
33
|
+
* and a refusal raised by the service behind the action.
|
|
34
|
+
*/
|
|
35
|
+
export declare const ACTION_ERROR_MCP: Readonly<Record<ActionErrorReason | "invalid-body" | "domain", {
|
|
36
|
+
readonly transport: ActionRefusalTransport;
|
|
37
|
+
readonly retry: ActionRetry;
|
|
38
|
+
}>>;
|
|
39
|
+
/**
|
|
40
|
+
* Which of the three ways a call was refused.
|
|
41
|
+
*
|
|
42
|
+
* "registry" is the registry's own refusal, and `reason` is then one of
|
|
43
|
+
* ACTION_ERROR_REASONS. "invalid-body" is an input the action's schema
|
|
44
|
+
* refused, and `reason` is "invalid-body". "domain" is the service behind the
|
|
45
|
+
* action refusing on the merits, and `reason` is one the action declared in
|
|
46
|
+
* its `errors`.
|
|
47
|
+
*/
|
|
48
|
+
export type ActionRefusalKind = "registry" | "invalid-body" | "domain";
|
|
49
|
+
/**
|
|
50
|
+
* What `host.actions.invoke` rejects with when the call was refused.
|
|
51
|
+
*
|
|
52
|
+
* One shape for all three kinds, so that a connector renders a refusal from
|
|
53
|
+
* the fields it carries rather than by recognising the host's classes, which a
|
|
54
|
+
* plugin cannot import. Recognise one with `isActionRefusal`, not with
|
|
55
|
+
* `instanceof`: the host builds it, and a plugin's bundled copy of this
|
|
56
|
+
* package is not the host's.
|
|
57
|
+
*
|
|
58
|
+
* A plugin route that rethrows one answers its caller with the same status,
|
|
59
|
+
* body and headers the registry would have.
|
|
60
|
+
*/
|
|
61
|
+
export interface ActionRefusal extends Error {
|
|
62
|
+
readonly name: "ActionRefusal";
|
|
63
|
+
readonly kind: ActionRefusalKind;
|
|
64
|
+
readonly reason: string;
|
|
65
|
+
/** The HTTP status the refusal answers with. */
|
|
66
|
+
readonly status: number;
|
|
67
|
+
readonly transport: ActionRefusalTransport;
|
|
68
|
+
/**
|
|
69
|
+
* From ACTION_ERROR_MCP for the registry's refusals and an invalid body. For
|
|
70
|
+
* a domain refusal, the verdict the action declared for that reason in its
|
|
71
|
+
* `errors`, or "never" for a reason it did not declare.
|
|
72
|
+
*/
|
|
73
|
+
readonly retry: ActionRetry;
|
|
74
|
+
/**
|
|
75
|
+
* The particulars the refusal publishes, keyed by the field they travel in.
|
|
76
|
+
*
|
|
77
|
+
* `scopes` on an insufficient-scope refusal names the scope the call needed.
|
|
78
|
+
* `issues` on an invalid body lists `{ path, message }` for each failing
|
|
79
|
+
* field, and never the submitted value.
|
|
80
|
+
*/
|
|
81
|
+
details(): Record<string, readonly unknown[]>;
|
|
82
|
+
/**
|
|
83
|
+
* The bearer challenge to answer a connected app with, as the value of a
|
|
84
|
+
* `WWW-Authenticate` header (RFC 6750, ADR 0009).
|
|
85
|
+
*
|
|
86
|
+
* Set on an insufficient-scope refusal, where it names every scope the
|
|
87
|
+
* instance issues so the client can ask for what it is missing in one round
|
|
88
|
+
* trip. Absent wherever no challenge would help.
|
|
89
|
+
*/
|
|
90
|
+
readonly challenge?: string;
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Whether a value `host.actions.invoke` rejected with is a refusal.
|
|
94
|
+
*
|
|
95
|
+
* Structural rather than `instanceof`, for the reason on ActionRefusal. False
|
|
96
|
+
* means the call failed rather than being refused - the host could not be
|
|
97
|
+
* reached, or something broke - and a connector answers that as an internal
|
|
98
|
+
* error without inspecting it.
|
|
99
|
+
*/
|
|
100
|
+
export declare function isActionRefusal(value: unknown): value is ActionRefusal;
|
|
101
|
+
//# sourceMappingURL=action-refusal.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"action-refusal.d.ts","sourceRoot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AOG;IACH,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;CAC7B;AAkBD;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,aAAa,CAyBtE"}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Why the registry refused a call, in a form a caller can act on.
|
|
3
|
+
*
|
|
4
|
+
* A caller here is often a model rather than a person, which changes what a
|
|
5
|
+
* refusal has to carry. A person reads a sentence and decides what to do; a
|
|
6
|
+
* model needs to know whether trying again could ever work, and what to change
|
|
7
|
+
* if it could. So every refusal has a code, a status, and a published rule for
|
|
8
|
+
* how a connector should render it.
|
|
9
|
+
*
|
|
10
|
+
* The vocabulary lives here rather than in the API because a plugin dispatching
|
|
11
|
+
* through `host.actions.invoke` has no other way to read it: the catalogue
|
|
12
|
+
* endpoint serves the same table over HTTP, and a plugin in the same process
|
|
13
|
+
* has no route to that. The API imports it back, so there is one list.
|
|
14
|
+
*/
|
|
15
|
+
export const ACTION_ERROR_REASONS = [
|
|
16
|
+
"unknown-action",
|
|
17
|
+
"forbidden-capability",
|
|
18
|
+
"forbidden-surface",
|
|
19
|
+
"insufficient-scope",
|
|
20
|
+
"not-serving",
|
|
21
|
+
"read-only",
|
|
22
|
+
"confirmation-required",
|
|
23
|
+
"output-invalid",
|
|
24
|
+
"rate-limited",
|
|
25
|
+
"internal",
|
|
26
|
+
];
|
|
27
|
+
/**
|
|
28
|
+
* How a connector should render each refusal, published as data.
|
|
29
|
+
*
|
|
30
|
+
* Served on the catalogue endpoint as well, so that two connectors - one
|
|
31
|
+
* reading it over HTTP, one in process - cannot disagree about whether a 403
|
|
32
|
+
* is worth retrying. Keyed by the registry's reasons and by the two refusals
|
|
33
|
+
* that are not the registry's own: a body the action's input schema refuses,
|
|
34
|
+
* and a refusal raised by the service behind the action.
|
|
35
|
+
*/
|
|
36
|
+
export const ACTION_ERROR_MCP = {
|
|
37
|
+
"unknown-action": { transport: "protocol", retry: "never" },
|
|
38
|
+
"invalid-body": { transport: "tool-result", retry: "after-edit" },
|
|
39
|
+
"forbidden-capability": { transport: "tool-result", retry: "never" },
|
|
40
|
+
"forbidden-surface": { transport: "tool-result", retry: "never" },
|
|
41
|
+
"insufficient-scope": { transport: "tool-result", retry: "never" },
|
|
42
|
+
"not-serving": { transport: "tool-result", retry: "never" },
|
|
43
|
+
"read-only": { transport: "tool-result", retry: "after-backoff" },
|
|
44
|
+
"confirmation-required": { transport: "tool-result", retry: "never" },
|
|
45
|
+
"output-invalid": { transport: "protocol", retry: "never" },
|
|
46
|
+
"rate-limited": { transport: "tool-result", retry: "after-backoff" },
|
|
47
|
+
internal: { transport: "protocol", retry: "after-backoff" },
|
|
48
|
+
domain: { transport: "tool-result", retry: "never" },
|
|
49
|
+
};
|
|
50
|
+
const KINDS = [
|
|
51
|
+
"registry",
|
|
52
|
+
"invalid-body",
|
|
53
|
+
"domain",
|
|
54
|
+
];
|
|
55
|
+
const TRANSPORTS = [
|
|
56
|
+
"protocol",
|
|
57
|
+
"tool-result",
|
|
58
|
+
];
|
|
59
|
+
const RETRIES = [
|
|
60
|
+
"never",
|
|
61
|
+
"after-edit",
|
|
62
|
+
"after-backoff",
|
|
63
|
+
];
|
|
64
|
+
const REGISTRY_REASONS = ACTION_ERROR_REASONS;
|
|
65
|
+
/**
|
|
66
|
+
* Whether a value `host.actions.invoke` rejected with is a refusal.
|
|
67
|
+
*
|
|
68
|
+
* Structural rather than `instanceof`, for the reason on ActionRefusal. False
|
|
69
|
+
* means the call failed rather than being refused - the host could not be
|
|
70
|
+
* reached, or something broke - and a connector answers that as an internal
|
|
71
|
+
* error without inspecting it.
|
|
72
|
+
*/
|
|
73
|
+
export function isActionRefusal(value) {
|
|
74
|
+
if (!(value instanceof Error) || value.name !== "ActionRefusal") {
|
|
75
|
+
return false;
|
|
76
|
+
}
|
|
77
|
+
const refusal = value;
|
|
78
|
+
if (typeof refusal.reason !== "string" ||
|
|
79
|
+
typeof refusal.status !== "number" ||
|
|
80
|
+
typeof refusal.details !== "function" ||
|
|
81
|
+
!KINDS.includes(refusal.kind) ||
|
|
82
|
+
!TRANSPORTS.includes(refusal.transport) ||
|
|
83
|
+
!RETRIES.includes(refusal.retry) ||
|
|
84
|
+
(refusal.challenge !== undefined && typeof refusal.challenge !== "string")) {
|
|
85
|
+
return false;
|
|
86
|
+
}
|
|
87
|
+
switch (refusal.kind) {
|
|
88
|
+
case "registry":
|
|
89
|
+
return REGISTRY_REASONS.includes(refusal.reason);
|
|
90
|
+
case "invalid-body":
|
|
91
|
+
return refusal.reason === "invalid-body";
|
|
92
|
+
default:
|
|
93
|
+
return true;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
//# sourceMappingURL=action-refusal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"action-refusal.js","sourceRoot":"","sources":["../src/action-refusal.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;GAaG;AAEH,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAClC,gBAAgB;IAChB,sBAAsB;IACtB,mBAAmB;IACnB,oBAAoB;IACpB,aAAa;IACb,WAAW;IACX,uBAAuB;IACvB,gBAAgB;IAChB,cAAc;IACd,UAAU;CACF,CAAC;AAaX;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAQzB;IACF,gBAAgB,EAAE,EAAE,SAAS,EAAE,UAAU,EAAE,KAAK,EAAE,OAAO,EAAE;IAC3D,cAAc,EAAE,EAAE,SAAS,EAAE,aAAa,EAAE,KAAK,EAAE,YAAY,EAAE;IACjE,sBAAsB,EAAE,EAAE,SAAS,EAAE,aAAa,EAAE,KAAK,EAAE,OAAO,EAAE;IACpE,mBAAmB,EAAE,EAAE,SAAS,EAAE,aAAa,EAAE,KAAK,EAAE,OAAO,EAAE;IACjE,oBAAoB,EAAE,EAAE,SAAS,EAAE,aAAa,EAAE,KAAK,EAAE,OAAO,EAAE;I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AAO,CAAC,SAAS,CAAC;QACvC,CAAC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC,KAAK,CAAC;QAChC,CAAC,OAAO,CAAC,SAAS,KAAK,SAAS,IAAI,OAAO,OAAO,CAAC,SAAS,KAAK,QAAQ,CAAC,EAC1E,CAAC;QACD,OAAO,KAAK,CAAC;IACf,CAAC;IACD,QAAQ,OAAO,CAAC,IAAI,EAAE,CAAC;QACrB,KAAK,UAAU;YACb,OAAO,gBAAgB,CAAC,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;QACnD,KAAK,cAAc;YACjB,OAAO,OAAO,CAAC,MAAM,KAAK,cAAc,CAAC;QAC3C;YACE,OAAO,IAAI,CAAC;IAChB,CAAC;AACH,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"action-schema.d.ts","sourceRoot":"","sources":["../src/action-schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAE7D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AAEH,gFAAgF;AAChF,wBAAgB,eAAe,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,IAAI,CAAC,CAAC,OAAO,CAOpE;
|
|
1
|
+
{"version":3,"file":"action-schema.d.ts","sourceRoot":"","sources":["../src/action-schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAE7D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AAEH,gFAAgF;AAChF,wBAAgB,eAAe,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,IAAI,CAAC,CAAC,OAAO,CAOpE;AA4BD,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,gBAAgB,CAAC,OAAO,EAAE,OAAO,CAAC,EAC1C,UAAU,EAAE,MAAM,GACjB,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAEzB;AAED,wBAAgB,sBAAsB,CACpC,MAAM,EAAE,gBAAgB,CAAC,OAAO,EAAE,OAAO,CAAC,EAC1C,UAAU,EAAE,MAAM,GACjB,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAEzB"}
|
package/dist/action-schema.js
CHANGED
|
@@ -45,7 +45,7 @@ function convert(schema, actionName, io) {
|
|
|
45
45
|
if (!isHostZodSchema(schema)) {
|
|
46
46
|
throw new Error(`${actionName}: an action schema must be built with the host's zod.`);
|
|
47
47
|
}
|
|
48
|
-
|
|
48
|
+
const document = z.toJSONSchema(schema, {
|
|
49
49
|
target: "draft-2020-12",
|
|
50
50
|
io,
|
|
51
51
|
cycles: "throw",
|
|
@@ -54,6 +54,9 @@ function convert(schema, actionName, io) {
|
|
|
54
54
|
throw new Error(`${actionName}: ${message} at ${[io, ...path.map(String)].join(".")}`);
|
|
55
55
|
},
|
|
56
56
|
});
|
|
57
|
+
// zod hangs a non-enumerable `~standard` on the root. A shallow copy leaves
|
|
58
|
+
// it behind, so what a caller is handed is a plain JSON document.
|
|
59
|
+
return { ...document };
|
|
57
60
|
}
|
|
58
61
|
export function actionInputJsonSchema(schema, actionName) {
|
|
59
62
|
return convert(schema, actionName, "input");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"action-schema.js","sourceRoot":"","sources":["../src/action-schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AAEH,gFAAgF;AAChF,MAAM,UAAU,eAAe,CAAC,MAAe;IAC7C,OAAO,CACL,OAAO,MAAM,KAAK,QAAQ;QAC1B,MAAM,KAAK,IAAI;QACf,MAAM,IAAI,MAAM;QACf,MAA6B,CAAC,IAAI,KAAK,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OAAO,EAAE,GAAG,QAAQ,EAAE,CAAC;AACzB,CAAC;AAED,MAAM,UAAU,qBAAqB,CACnC,MAA0C,EAC1C,UAAkB;IAElB,OAAO,OAAO,CAAC,MAAM,EAAE,UAAU,EAAE,OAAO,CAAC,CAAC;AAC9C,CAAC;AAED,MAAM,UAAU,sBAAsB,CACpC,MAA0C,EAC1C,UAAkB;IAElB,OAAO,OAAO,CAAC,MAAM,EAAE,UAAU,EAAE,QAAQ,CAAC,CAAC;AAC/C,CAAC"}
|
package/dist/actions.d.ts
CHANGED
|
@@ -46,21 +46,28 @@ export type ActionPersonalData = (typeof ACTION_PERSONAL_DATA)[number];
|
|
|
46
46
|
* directory review (64 characters).
|
|
47
47
|
*/
|
|
48
48
|
export declare const ACTION_NAME_PATTERN: RegExp;
|
|
49
|
+
/** Whether trying again could ever work, and after what. */
|
|
50
|
+
export type ActionRetry = "never" | "after-edit" | "after-backoff";
|
|
49
51
|
/** What a refusal means for a caller that is a model rather than a person. */
|
|
50
52
|
export interface ActionErrorSpec {
|
|
51
53
|
/** The machine-readable reason the handler raises. */
|
|
52
54
|
readonly reason: string;
|
|
53
55
|
/** Whether trying again could ever work, and after what. */
|
|
54
|
-
readonly retry:
|
|
56
|
+
readonly retry: ActionRetry;
|
|
55
57
|
/** The sentence a person is shown, as an i18n key. */
|
|
56
58
|
readonly messageKey: string;
|
|
57
59
|
}
|
|
58
60
|
/**
|
|
59
61
|
* The request a plugin's own route received.
|
|
60
62
|
*
|
|
61
|
-
* Opaque on purpose: the host
|
|
62
|
-
* so a plugin passes the request it was
|
|
63
|
-
* construct one. That is what stops a plugin
|
|
63
|
+
* Opaque on purpose: the host recognises the request it authenticated by its
|
|
64
|
+
* identity, which nothing on it can copy, so a plugin passes the request it was
|
|
65
|
+
* handed straight through and cannot construct one. That is what stops a plugin
|
|
66
|
+
* naming a person it was not given.
|
|
67
|
+
*
|
|
68
|
+
* It speaks for its person only while the route is serving it. Once the
|
|
69
|
+
* response is sent the host refuses it, so a request kept for later names
|
|
70
|
+
* nobody.
|
|
64
71
|
*/
|
|
65
72
|
export type ActionRequest = object;
|
|
66
73
|
/** The lowercase channel vocabulary. The registry maps it to the audit channel. */
|
|
@@ -88,6 +95,19 @@ export interface ActionContext {
|
|
|
88
95
|
readonly principal: ActionPrincipal;
|
|
89
96
|
readonly channel: ActionChannel;
|
|
90
97
|
readonly client?: ActionClient;
|
|
98
|
+
/**
|
|
99
|
+
* The plugin whose route dispatched the call, when one did, by its manifest
|
|
100
|
+
* id. Set by the host from the plugin it serves, whatever the channel.
|
|
101
|
+
*/
|
|
102
|
+
readonly pluginId?: string;
|
|
103
|
+
/**
|
|
104
|
+
* The pending change this call confirms, when it confirms one.
|
|
105
|
+
*
|
|
106
|
+
* A confirmed call is the confirming person's own, on `web`; this is what
|
|
107
|
+
* ties its audit entry back to the proposal, and to the channel and the app
|
|
108
|
+
* the proposal came through.
|
|
109
|
+
*/
|
|
110
|
+
readonly pendingChangeId?: string;
|
|
91
111
|
readonly requestId: string;
|
|
92
112
|
readonly now: Date;
|
|
93
113
|
}
|
|
@@ -172,6 +192,33 @@ export interface ActionSummary {
|
|
|
172
192
|
readonly surfaces: readonly ActionSurface[];
|
|
173
193
|
readonly errors: readonly ActionErrorSpec[];
|
|
174
194
|
}
|
|
195
|
+
/**
|
|
196
|
+
* What proposing a change answers with.
|
|
197
|
+
*
|
|
198
|
+
* Nothing has run. The change waits, for a week at most, until the person whose
|
|
199
|
+
* request proposed it confirms or rejects it on the platform's own screen at
|
|
200
|
+
* `path`, which a plugin's view links to. A plugin cannot confirm one.
|
|
201
|
+
*/
|
|
202
|
+
export interface PendingChangeReceipt {
|
|
203
|
+
readonly id: string;
|
|
204
|
+
readonly expiresAt: Date;
|
|
205
|
+
/** The preview, on the platform's own screen, relative to the origin. */
|
|
206
|
+
readonly path: string;
|
|
207
|
+
}
|
|
208
|
+
/**
|
|
209
|
+
* One action as a plugin is offered it: the summary, and the JSON Schema
|
|
210
|
+
* (draft 2020-12) of what it takes and what it returns.
|
|
211
|
+
*
|
|
212
|
+
* What an MCP connector puts in `tools/list` and what a model is told a tool
|
|
213
|
+
* accepts. The input schema is the one `invoke` validates against, converted
|
|
214
|
+
* as the HTTP catalogue converts it, so a tool is described by the rule it is
|
|
215
|
+
* held to. Each listing builds both afresh: changing one changes nothing the
|
|
216
|
+
* host holds or hands anybody else.
|
|
217
|
+
*/
|
|
218
|
+
export interface ActionWithSchemas extends ActionSummary {
|
|
219
|
+
readonly inputSchema: Record<string, unknown>;
|
|
220
|
+
readonly outputSchema: Record<string, unknown>;
|
|
221
|
+
}
|
|
175
222
|
export interface PluginActions {
|
|
176
223
|
/**
|
|
177
224
|
* Registers an action the manifest declared.
|
|
@@ -188,12 +235,53 @@ export interface PluginActions {
|
|
|
188
235
|
* its own manifest in its own build.
|
|
189
236
|
*/
|
|
190
237
|
register: (registration: PluginActionRegistration) => void;
|
|
191
|
-
/**
|
|
192
|
-
|
|
238
|
+
/**
|
|
239
|
+
* What this plugin's route may offer the request it is serving, each with
|
|
240
|
+
* its schemas.
|
|
241
|
+
*
|
|
242
|
+
* Filtered by channel, surface, capability, liveness and arming, as `invoke`
|
|
243
|
+
* is, and the schemas are of the actions listed and no others. Token scope
|
|
244
|
+
* (`mcp:read`, `mcp:write`) and read-only mode are decided at `invoke`, which
|
|
245
|
+
* may still refuse a listed action.
|
|
246
|
+
*/
|
|
247
|
+
list: (request: ActionRequest, filter?: PluginActionFilter) => Promise<ActionWithSchemas[]>;
|
|
193
248
|
/**
|
|
194
249
|
* Dispatch. The person, the channel and the connected app all come from the
|
|
195
250
|
* request the host authenticated, never from an argument.
|
|
251
|
+
*
|
|
252
|
+
* A refused call rejects with an `ActionRefusal`, whichever of the three
|
|
253
|
+
* ways it was refused - by the registry, over its input or by the service
|
|
254
|
+
* behind it - and `isActionRefusal` recognises one. Anything else it
|
|
255
|
+
* rejects with is a fault rather than an answer.
|
|
196
256
|
*/
|
|
197
257
|
invoke: <Output>(request: ActionRequest, name: string, input: unknown) => Promise<Output>;
|
|
258
|
+
/**
|
|
259
|
+
* Holds a write as a pending change instead of running it (ADR 0039).
|
|
260
|
+
*
|
|
261
|
+
* The call is checked as `invoke` would check it before running anything -
|
|
262
|
+
* the action exists and is offered, the person holds its capability, the
|
|
263
|
+
* input fits its schema - and refused the same way. A read cannot be
|
|
264
|
+
* proposed, and nor can an action the platform's own screens are not offered.
|
|
265
|
+
* The person whose request this is then sees the change as a preview and
|
|
266
|
+
* confirms it, and it runs as them at that moment, with every check made
|
|
267
|
+
* again; or rejects it, and nothing runs.
|
|
268
|
+
*
|
|
269
|
+
* Added after `invoke`, so a plugin installed on an older host has to check
|
|
270
|
+
* that it is there before calling it, for the reason `host.actions` gives.
|
|
271
|
+
*/
|
|
272
|
+
propose: (request: ActionRequest, name: string, input: unknown) => Promise<PendingChangeReceipt>;
|
|
273
|
+
/**
|
|
274
|
+
* The connected app the request was authenticated with, or null when it
|
|
275
|
+
* arrived on a signed-in session.
|
|
276
|
+
*
|
|
277
|
+
* The app a dispatch on this request is recorded as, read from what the host
|
|
278
|
+
* established when it authenticated the request rather than from the
|
|
279
|
+
* request's own properties, which the plugin can write. A connector asks it
|
|
280
|
+
* before answering on a route that serves connected apps only.
|
|
281
|
+
*
|
|
282
|
+
* Added after `list` and `invoke`, so a plugin must feature-detect it
|
|
283
|
+
* (`host.actions?.client === undefined`) before calling it.
|
|
284
|
+
*/
|
|
285
|
+
client: (request: ActionRequest) => ActionClient | null;
|
|
198
286
|
}
|
|
199
287
|
//# sourceMappingURL=actions.d.ts.map
|
package/dist/actions.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../src/actions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAE7D;;;;;;;;;;;;;;;GAeG;AAEH,eAAO,MAAM,cAAc,YAAI,MAAM,EAAE,OAAO,EAAE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EAAE,MAAM,EACZ,KAAK,EAAE,OAAO,KACX,OAAO,CAAC,oBAAoB,CAAC,CAAC;IAEnC;;;;;;;;;;;OAWG;IACH,MAAM,EAAE,CAAC,OAAO,EAAE,aAAa,KAAK,YAAY,GAAG,IAAI,CAAC;CACzD"}
|
package/dist/actions.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"actions.js","sourceRoot":"","sources":["../src/actions.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;GAeG;AAEH,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,MAAM,EAAE,OAAO,EAAE,QAAQ,CAAU,CAAC;AAGnE;;;;;GAKG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,IAAI,EAAE,KAAK,EAAE,IAAI,CAAU,CAAC;AAG5D;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAClC,MAAM;IACN,WAAW;IACX,WAAW;IACX,OAAO;IACP,OAAO;IACP,eAAe;IACf,wBAAwB;IACxB,SAAS;IACT,WAAW;IACX,QAAQ;IACR,YAAY;IACZ,UAAU;IACV,YAAY;IACZ,WAAW;CACH,CAAC;AAGX;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"actions.js","sourceRoot":"","sources":["../src/actions.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;GAeG;AAEH,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,MAAM,EAAE,OAAO,EAAE,QAAQ,CAAU,CAAC;AAGnE;;;;;GAKG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,IAAI,EAAE,KAAK,EAAE,IAAI,CAAU,CAAC;AAG5D;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAClC,MAAM;IACN,WAAW;IACX,WAAW;IACX,OAAO;IACP,OAAO;IACP,eAAe;IACf,wB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