@rackbops/ac-plugin-contract 2.0.0-alpha.46 → 2.0.0-alpha.48
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/AUTHORING.md +3 -2
- package/dist/slots.d.ts +4 -0
- package/package.json +3 -3
package/AUTHORING.md
CHANGED
|
@@ -1078,8 +1078,9 @@ host-side reader at all -- validates, but nothing consumes it. **`provides`/`con
|
|
|
1078
1078
|
guide's worked example: a slot (`issues@1`, `artifacts@1`, `auth@1`, `notify@1`) is a
|
|
1079
1079
|
named/versioned TypeScript interface one plugin **provides** and others **consume** -- the host
|
|
1080
1080
|
refuses to activate a consumer whose slot has no provider, and says why (`resolveSlots`,
|
|
1081
|
-
`packages/host/src/plugins/slots.ts`, re-exported from `plugins/index.ts`). `ac-auth-cf-access`
|
|
1082
|
-
(`auth@1
|
|
1081
|
+
`packages/host/src/plugins/slots.ts`, re-exported from `plugins/index.ts`). `ac-auth-cf-access` and
|
|
1082
|
+
`ac-auth-usr` (`auth@1`, alternatives: a slot has one provider) and `ac-notify-discord` (`notify@1`) are
|
|
1083
|
+
the reference *providers*; see their own
|
|
1083
1084
|
`src/server.ts` for `host.slots.provide(slot, version, impl)`, and `design.md` §4 for the slot
|
|
1084
1085
|
contract itself. The consumer half is `host.slots.resolve<T>(slot, version)` (#97): the provider
|
|
1085
1086
|
bound for a slot, or `null` when none is. It throws unless the plugin's own manifest lists the exact
|
package/dist/slots.d.ts
CHANGED
|
@@ -175,6 +175,10 @@ export interface Identity {
|
|
|
175
175
|
* person. The host admits a machine identity on `GET`/`HEAD /api/readyz` only and refuses it on every other gated
|
|
176
176
|
* route; any other value is treated as a non-person too (#552). */
|
|
177
177
|
kind?: "user" | "machine";
|
|
178
|
+
/** The roles the identity holds in THIS app, with the app's role prefix stripped (a usr token's
|
|
179
|
+
* `"ac:admin"` is `"admin"`; roles for other apps are not listed). Absent when the provider does not
|
|
180
|
+
* model roles (Cloudflare Access does not); an empty array is an identity that holds none (#102). */
|
|
181
|
+
roles?: string[];
|
|
178
182
|
}
|
|
179
183
|
/** `auth@1`: resolve the identity for a request, or null in open mode. */
|
|
180
184
|
export interface AuthProvider {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rackbops/ac-plugin-contract",
|
|
3
|
-
"version": "2.0.0-alpha.
|
|
3
|
+
"version": "2.0.0-alpha.48",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "The artifact-console plugin ABI for out-of-repo plugin authors: HostApi, the acPlugin manifest contribution points, the generated manifest JSON Schema, and the @ac/host ambient browser declaration.",
|
|
@@ -35,9 +35,9 @@
|
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"@ac/contract": "0.0.0",
|
|
38
|
-
"@types/node": "^26.6.
|
|
38
|
+
"@types/node": "^26.6.4",
|
|
39
39
|
"typescript": "^7.0.0",
|
|
40
|
-
"vitest": "^5.0.
|
|
40
|
+
"vitest": "^5.0.3"
|
|
41
41
|
},
|
|
42
42
|
"scripts": {
|
|
43
43
|
"build": "node build.mjs",
|