@rackbops/ac-plugin-contract 2.0.0-alpha.54 → 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 +7 -3
- package/dist/host-api.d.ts +7 -0
- package/package.json +1 -1
package/AUTHORING.md
CHANGED
|
@@ -864,8 +864,9 @@ console before the console gives up and reports a bare `network` timeout instead
|
|
|
864
864
|
A capability whose verb starts a long-running agent job (`exec/claude`'s `{ jobId }`, #54) doesn't
|
|
865
865
|
need to poll or parse SSE itself -- `host.agent.streamJob(machineId, jobId, { label })` opens the
|
|
866
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,
|
|
868
|
-
|
|
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
|
|
869
870
|
pinned client, registers a new host task for
|
|
870
871
|
`label`, and relays every `line`/`done` frame into it as the job runs; it resolves `{ taskId }` once
|
|
871
872
|
the agent has confirmed the stream is open (a `200`), or rejects (starting no task) on anything
|
|
@@ -880,7 +881,10 @@ const { taskId } = await host.agent.streamJob(machineId, jobId, { label: `code:
|
|
|
880
881
|
```
|
|
881
882
|
|
|
882
883
|
`plugins/claude-runner` (#54) is the reference: `task.code` and `routine.rerun` call `exec/claude`
|
|
883
|
-
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`.
|
|
884
888
|
|
|
885
889
|
## 8. The needs-attention rail (#78)
|
|
886
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.",
|