@rackbops/ac-plugin-contract 2.0.0-alpha.45 → 2.0.0-alpha.47

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 CHANGED
@@ -821,6 +821,13 @@ is granted. `hello`'s own manifest declares `agent.git.read` as the reference de
821
821
  never actually calls it -- the declaration alone is what the grid, a live pairing pass, and this
822
822
  guide need).
823
823
 
824
+ A grant outlives its declaration (#645): disabling a plugin, removing it, or dropping a capability from its
825
+ manifest does not revoke what an operator already granted, and does not block editing the other grants on that
826
+ machine. The stale pair has no row in the grid (only declared capabilities have one), the host keeps it as it
827
+ is, and re-enabling the plugin or restoring the capability brings the row, ticked, back. What the host will
828
+ not do is let anyone *add* a grant for a capability no loaded plugin declares. A stale pair has no checkbox
829
+ to untick; to revoke one, `PUT /api/agents/:id/grants` the machine's grant map without it.
830
+
824
831
  At runtime, call a granted capability on a specific paired machine through `host.agent`:
825
832
 
826
833
  ```ts
@@ -1071,8 +1078,9 @@ host-side reader at all -- validates, but nothing consumes it. **`provides`/`con
1071
1078
  guide's worked example: a slot (`issues@1`, `artifacts@1`, `auth@1`, `notify@1`) is a
1072
1079
  named/versioned TypeScript interface one plugin **provides** and others **consume** -- the host
1073
1080
  refuses to activate a consumer whose slot has no provider, and says why (`resolveSlots`,
1074
- `packages/host/src/plugins/slots.ts`, re-exported from `plugins/index.ts`). `ac-auth-cf-access`
1075
- (`auth@1`) and `ac-notify-discord` (`notify@1`) are the reference *providers*; see their own
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
1076
1084
  `src/server.ts` for `host.slots.provide(slot, version, impl)`, and `design.md` §4 for the slot
1077
1085
  contract itself. The consumer half is `host.slots.resolve<T>(slot, version)` (#97): the provider
1078
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.45",
3
+ "version": "2.0.0-alpha.47",
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.3",
38
+ "@types/node": "^26.6.4",
39
39
  "typescript": "^7.0.0",
40
- "vitest": "^5.0.2"
40
+ "vitest": "^5.0.3"
41
41
  },
42
42
  "scripts": {
43
43
  "build": "node build.mjs",