@rackbops/ac-plugin-contract 2.0.0-alpha.36 → 2.0.0-alpha.38

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
@@ -192,6 +192,11 @@ export const createPlugin: CreatePlugin = (host) => ({
192
192
  agent's text with a storage error of your own.
193
193
  - **Setting** — read/write with `host.settings.get(key)` / `host.settings.set(key, value)`. Both are async;
194
194
  `get` returns the manifest `default` when unset.
195
+ - **Console settings** (#506) — `host.consoleSettings?.get(key)`, read-only, optional. Unlike `Setting`
196
+ above (per-plugin), this reads the console-WIDE settings an operator edits in Admin's Settings card
197
+ (`repo_owners`, `layout_file`, `tab_order`, `plan_default_machine`, `repo_pins`) -- but only a key on
198
+ that editable-settings whitelist; anything else resolves to `undefined`. `plugins/provider-github`
199
+ is the reference consumer (`repo_owners`/`repo_pins`, its own repo-set resolution).
195
200
 
196
201
  `createPlugin` must import from `@ac/contract` **type-only** (`import type`), so the compiled `dist/server.js`
197
202
  has no runtime imports — see §6.
@@ -371,7 +376,8 @@ it.
371
376
  until the operator navigates away: it never remounts one to refresh it. (It used to, on any return to the
372
377
  window more than a minute after the panel was opened, which reset every filter, selection and half-typed field
373
378
  the panel held, every time.) So a panel whose data goes stale while it is open refreshes it itself, in place,
374
- into the state already on screen: the Board polls every 60 s, and Issues (`issues-classic`) reads its list
379
+ into the state already on screen: the Board polls every 15 minutes (with a Refresh now button for a click-
380
+ driven read past the poll, #546), and Issues (`issues-classic`) reads its list
375
381
  again when the tab comes back (`focus` on `window`, or `visibilitychange` to visible) more than a minute after
376
382
  it opened or last refreshed. A panel that does neither -- Agents, the Admin board's cards -- reads when it is
377
383
  opened and after its own actions. Only Home is still refreshed by the shell, which remounts it for Refresh, the
@@ -14,6 +14,16 @@ export interface SettingsService {
14
14
  get<T = unknown>(key: string): Promise<T | undefined>;
15
15
  set(key: string, value: unknown): Promise<void>;
16
16
  }
17
+ /**
18
+ * Read-only view of the console-WIDE settings an operator edits in Admin's Settings card (#506) --
19
+ * distinct from `SettingsService` above, which is per-plugin. Only a key on the editable-settings
20
+ * whitelist (`settings-schema.ts`) is readable here; any other key resolves to `undefined`, so a
21
+ * plugin can never reach an arbitrary host-global key through this surface. The value returned is
22
+ * the EFFECTIVE one (an `AC_<KEY>` env override included), the same value the Settings card shows.
23
+ */
24
+ export interface ConsoleSettingsService {
25
+ get<T = unknown>(key: string): Promise<T | undefined>;
26
+ }
17
27
  /** Per-plugin durable storage: a SQLite table scoped to the plugin, with atomic JSON helpers. */
18
28
  export interface StorageService {
19
29
  get<T = unknown>(key: string): Promise<T | undefined>;
@@ -203,6 +213,9 @@ export interface HostApi {
203
213
  plugins?: PluginJobsService;
204
214
  /** #84: see `SlotRegistry`. */
205
215
  slots: SlotRegistry;
216
+ /** #506: see `ConsoleSettingsService`. Optional so an out-of-repo plugin's own test fake still
217
+ * compiles. */
218
+ consoleSettings?: ConsoleSettingsService;
206
219
  }
207
220
  /**
208
221
  * The context the host passes to `Plugin.runJob` for one job run (#31). `jobId` selects which
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rackbops/ac-plugin-contract",
3
- "version": "2.0.0-alpha.36",
3
+ "version": "2.0.0-alpha.38",
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.",