@rackbops/ac-plugin-contract 2.0.0-alpha.41 → 2.0.0-alpha.42
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 +5 -3
- package/dist/manifest.d.ts +4 -1
- package/package.json +3 -3
- package/schema.json +3 -2
package/AUTHORING.md
CHANGED
|
@@ -119,8 +119,10 @@ Rules the host enforces, at validation or load time:
|
|
|
119
119
|
doesn't (the schema itself requires only `id`, `hostApiVersion` and `kind`). `contributes` and every sub-field
|
|
120
120
|
is optional in the schema — contribute only the points you use; each contribution's own required fields are
|
|
121
121
|
schema-enforced.
|
|
122
|
-
- **Jobs** (#137): a job's **`timeoutSec`** must be at least `1` (the schema's
|
|
123
|
-
timeout would fire at once and time out any run that awaits real
|
|
122
|
+
- **Jobs** (#137, #580): a job's **`timeoutSec`** must be at least `1` and at most `2147483` (the schema's
|
|
123
|
+
`minimum` and `maximum`; a zero or negative timeout would fire at once and time out any run that awaits real
|
|
124
|
+
I/O, and about 24.8 days is the longest delay Node honours, so a longer or non-finite one would be fired at
|
|
125
|
+
once too), and a job **`id`** must be unique
|
|
124
126
|
*within its plugin* -- two jobs with
|
|
125
127
|
one id are rejected as `duplicate job id "<id>" within the plugin`, like a duplicate panel, card or action id.
|
|
126
128
|
Job ids are plugin-scoped (a job is addressed as `<pluginId>/<jobId>`), so two different plugins may declare the
|
|
@@ -197,7 +199,7 @@ export const createPlugin: CreatePlugin = (host) => ({
|
|
|
197
199
|
newest 200 runs of that job (per machine, for a `runOn: "agent"` job) and drops runs older than 30 days,
|
|
198
200
|
though never a job's (or machine's) newest run, so `host.jobs.lastRun` still answers for a job that runs
|
|
199
201
|
less often than monthly. A job that runs every minute therefore no longer grows the run history without
|
|
200
|
-
bound. `ctx.signal` aborts at `timeoutSec` seconds (
|
|
202
|
+
bound. `ctx.signal` aborts at `timeoutSec` seconds (1 to 2147483, #137, #580). `runOn: "host"` runs your `runJob`
|
|
201
203
|
once, in the host process.
|
|
202
204
|
`runOn: "agent"` (#51) also runs your `runJob` in the host process — the agent itself runs no plugin
|
|
203
205
|
code — but once per currently paired machine, with `ctx.machine` set to `{ id, name }`; do the
|
package/dist/manifest.d.ts
CHANGED
|
@@ -112,8 +112,11 @@ export interface JobContribution {
|
|
|
112
112
|
schedule: string;
|
|
113
113
|
/**
|
|
114
114
|
* Per-run timeout in seconds. Must be at least 1: a zero or negative value would fire the timeout at
|
|
115
|
-
* once, timing out any run that awaits real I/O (#137).
|
|
115
|
+
* once, timing out any run that awaits real I/O (#137). And at most 2147483, about 24.8 days: Node
|
|
116
|
+
* clamps a longer or non-finite `setTimeout` delay to 1 ms, which fires it at once, the same failure
|
|
117
|
+
* (#580).
|
|
116
118
|
* @minimum 1
|
|
119
|
+
* @maximum 2147483
|
|
117
120
|
*/
|
|
118
121
|
timeoutSec: number;
|
|
119
122
|
runOn: JobRunOn;
|
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.42",
|
|
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.
|
|
38
|
+
"@types/node": "^26.6.3",
|
|
39
39
|
"typescript": "^7.0.0",
|
|
40
|
-
"vitest": "^5.0.
|
|
40
|
+
"vitest": "^5.0.2"
|
|
41
41
|
},
|
|
42
42
|
"scripts": {
|
|
43
43
|
"build": "node build.mjs",
|
package/schema.json
CHANGED
|
@@ -348,8 +348,9 @@
|
|
|
348
348
|
},
|
|
349
349
|
"timeoutSec": {
|
|
350
350
|
"type": "number",
|
|
351
|
-
"description": "Per-run timeout in seconds. Must be at least 1: a zero or negative value would fire the timeout at once, timing out any run that awaits real I/O (#137).",
|
|
352
|
-
"minimum": 1
|
|
351
|
+
"description": "Per-run timeout in seconds. Must be at least 1: a zero or negative value would fire the timeout at once, timing out any run that awaits real I/O (#137). And at most 2147483, about 24.8 days: Node clamps a longer or non-finite `setTimeout` delay to 1 ms, which fires it at once, the same failure (#580).",
|
|
352
|
+
"minimum": 1,
|
|
353
|
+
"maximum": 2147483
|
|
353
354
|
},
|
|
354
355
|
"runOn": {
|
|
355
356
|
"$ref": "#/definitions/JobRunOn"
|