@rackbops/ac-plugin-contract 2.0.0-alpha.53 → 2.0.0-alpha.55
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 +19 -6
- package/dist/host-api.d.ts +7 -0
- package/package.json +1 -1
package/AUTHORING.md
CHANGED
|
@@ -451,8 +451,10 @@ the bar collapses. The layout arithmetic and the whole-pixel rounding were measu
|
|
|
451
451
|
bundling a library the import map does not carry. `plugins/ac-artifacts-weft` inlines
|
|
452
452
|
`@lepid-labs/weft-embed` (a framework-free reader, 1.15 MB) and its stylesheet into `dist/ui.js`, and its
|
|
453
453
|
`rollup.ui.config.mjs` is the reference. (The rollup configs of `issues-classic` and `ac-auth-cf-access`
|
|
454
|
-
inline a dependency into their SERVER bundle
|
|
455
|
-
|
|
454
|
+
inline a dependency into their SERVER bundle only. `plugins/agents` inlines the small pure-TypeScript
|
|
455
|
+
`@rackbops/toolchain-compare` into its server AND its UI bundle (#694), with no stylesheet; every other plugin's
|
|
456
|
+
UI config inlines nothing. None of them is a model for a frontend dependency with a stylesheet.) What a bundled
|
|
457
|
+
dependency changes:
|
|
456
458
|
|
|
457
459
|
- **One file.** The host serves exactly the manifest's `frontend` and never a sibling, so a stylesheet is a
|
|
458
460
|
string in the bundle that the panel injects as a `<style>`, once (the config's `inlineCss` plugin turns
|
|
@@ -710,8 +712,12 @@ into `dist/server.js` — the image ships a plugin's `package.json` + `dist/*.js
|
|
|
710
712
|
is the worked example (#312): `tsconfig.build.json` emits the server alone to `dist-tsc/`, and
|
|
711
713
|
`rollup.config.mjs` bundles that into `dist/server.js` with everything except Node's own `node:*` built-ins
|
|
712
714
|
inlined — `yaml` (its `views.yaml` parser) included. `createPlugin` stays pure regardless of how the server is
|
|
713
|
-
built.
|
|
714
|
-
|
|
715
|
+
built. (`plugins/agents` is a second example, #694: its server imports the published
|
|
716
|
+
`@rackbops/toolchain-compare`, so `tsconfig.build.json` emits to `dist-tsc/` and its `rollup.config.mjs` bundles that
|
|
717
|
+
into `dist/server.js`; `bundle.test.ts` pins that the file imports nothing but `node:` built-ins.) The
|
|
718
|
+
**frontend** never inlines the import-map specifiers (§3 above) — `@ac/host`/`react`/`@rackbops/ui-react` resolve
|
|
719
|
+
through the shell's import map, not a bundle; a library the map does not carry may be inlined (see "A frontend
|
|
720
|
+
that bundles a dependency").
|
|
715
721
|
|
|
716
722
|
## 4. `CHANGELOG.md` — required, and version-matched
|
|
717
723
|
|
|
@@ -857,7 +863,11 @@ console before the console gives up and reports a bare `network` timeout instead
|
|
|
857
863
|
|
|
858
864
|
A capability whose verb starts a long-running agent job (`exec/claude`'s `{ jobId }`, #54) doesn't
|
|
859
865
|
need to poll or parse SSE itself -- `host.agent.streamJob(machineId, jobId, { label })` opens the
|
|
860
|
-
agent's `GET /v1/jobs/:jobId/events`
|
|
866
|
+
agent's `GET /v1/jobs/:jobId/events` (which serves `claude` jobs only since #675: a toolchain-upgrade
|
|
867
|
+
job's stream is `GET /v1/toolchain/upgrade/:jobId/events`, under its own capability, which `streamJob`
|
|
868
|
+
reaches through its optional `path`: `{ label, path: "/v1/toolchain/upgrade/<jobId>/events" }`, a route
|
|
869
|
+
of the shape `/v1/<segments>/<jobId>/events` naming that same `jobId`, anything else rejecting) through the same
|
|
870
|
+
pinned client, registers a new host task for
|
|
861
871
|
`label`, and relays every `line`/`done` frame into it as the job runs; it resolves `{ taskId }` once
|
|
862
872
|
the agent has confirmed the stream is open (a `200`), or rejects (starting no task) on anything
|
|
863
873
|
else -- an invalid `jobId`, an unknown machine, or a non-`200` from the agent (a `404`, a `403`
|
|
@@ -871,7 +881,10 @@ const { taskId } = await host.agent.streamJob(machineId, jobId, { label: `code:
|
|
|
871
881
|
```
|
|
872
882
|
|
|
873
883
|
`plugins/claude-runner` (#54) is the reference: `task.code` and `routine.rerun` call `exec/claude`
|
|
874
|
-
then `streamJob` and return the task id, never touching SSE framing themselves.
|
|
884
|
+
then `streamJob` and return the task id, never touching SSE framing themselves. The `agents` plugin's
|
|
885
|
+
`toolchain.upgrade` action (#675) is the example of a verb with its own events route: it starts the
|
|
886
|
+
job with `host.agent.call`, remembers the job id per machine (the confirm modal's settled event carries no
|
|
887
|
+
result, so a panel cannot read it from there) and relays the stream with `path`.
|
|
875
888
|
|
|
876
889
|
## 8. The needs-attention rail (#78)
|
|
877
890
|
|
package/dist/host-api.d.ts
CHANGED
|
@@ -116,9 +116,16 @@ export interface AgentService {
|
|
|
116
116
|
* detached and can never surface here. Rejects (starting no task) on an invalid `jobId`, an unknown
|
|
117
117
|
* machine, or any non-`200` response from the agent (a `404` unknown job, a `403` refusal, ...) --
|
|
118
118
|
* the same failure shapes `call` throws for a bad path, surfaced the same way.
|
|
119
|
+
*
|
|
120
|
+
* `path` (#675) is the events route of a job that does not live under `/v1/jobs`: the toolchain
|
|
121
|
+
* upgrade's is `/v1/toolchain/upgrade/<jobId>/events`, readable only by a plugin holding that verb's own
|
|
122
|
+
* capability. Omitted, it is `/v1/jobs/<jobId>/events` exactly as before. It is not a free path: it must be
|
|
123
|
+
* `/v1/<one or more lowercase segments>/<jobId>/events` with this call's own `jobId`, and carry no query,
|
|
124
|
+
* fragment, escape or dot segment; anything else rejects (starting no task, making no request).
|
|
119
125
|
*/
|
|
120
126
|
streamJob(machineId: string, jobId: string, opts: {
|
|
121
127
|
label: string;
|
|
128
|
+
path?: string;
|
|
122
129
|
}): Promise<{
|
|
123
130
|
taskId: string;
|
|
124
131
|
}>;
|
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.55",
|
|
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.",
|