agents-relay 2.0.254 → 2.0.255
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/README.md +5 -5
- package/dist/cli-help.js +6 -6
- package/dist/cli-job-create.js +3 -3
- package/dist/cli-shortcut-local.js +1 -1
- package/dist/cli.js +7 -18
- package/dist/relayd-control.js +4 -4
- package/package.json +1 -1
- package/skills/agents-relay/SKILL.md +2 -2
package/README.md
CHANGED
|
@@ -304,7 +304,7 @@ npx agents-relay task create --repo OWNER/REPO --pr 5 --id JOB_ID \
|
|
|
304
304
|
--input "Research the dashboard UX and write the final report to the declared output file."
|
|
305
305
|
~~~
|
|
306
306
|
|
|
307
|
-
SQLite and the canonical Graphs are authoritative for terminal lifecycle. A remote PR merge/close is an audit observation, not a state transition. Final Review PASS authorizes local Git merge; confirmed local-merge evidence gates `COMPLETED`. The dashboard exposes `/api/jobs` and distinguishes durable Job lifecycle from derived runtime status. The `/api/runtime-summary` Running Tasks, worker, and model totals count only `RUNNING` Tasks belonging to `ACTIVE` Jobs with an execution ID, lease owner, and unexpired lease; old durable RUNNING flags without a current lease are not active workload.
|
|
307
|
+
SQLite and the canonical Graphs are authoritative for terminal lifecycle. A remote PR merge/close is an audit observation, not a state transition. Final Review PASS authorizes local Git merge; confirmed local-merge evidence gates `COMPLETED`. The dashboard exposes `/api/jobs` and distinguishes durable Job lifecycle from derived runtime status. The `/api/runtime-summary` Running Tasks, worker, and model totals count only `RUNNING` Tasks belonging to `ACTIVE` Jobs with an execution ID, lease owner, and unexpired lease; old durable RUNNING flags without a current lease are not active workload. Archived direct Shortcut records remain readable, but current Coordinator Jobs use the normal managed Job queue and display. Shortcut artifact hashing accepts a relative file present in both the Project and its canonical Run only if the two resolved files have identical bytes; it records the Run copy and still rejects different contents, path escapes and ambiguous provenance. Daemon startup orphan-recovery must not reclaim externally owned Shortcut Worker leases; only the foreground Shortcut Runner owns their recovery. For model-backed Shortcut nodes, the same caller-configured `--shared-root` (or `AGENTS_RELAY_SHARED_ROOT`) must be supplied to child Worker execution context, not just Shortcut discovery.
|
|
308
308
|
|
|
309
309
|
Relay has no orchestrator worker adapter for new work. Orchestrators are external clients that create/plan durable Tasks; Execution Router selects a real worker route (`codex` or `chatgpt`). The CLI and dashboard do not expose manual orchestrator-only `task start`, `task complete`, or synthetic `record` paths.
|
|
310
310
|
|
|
@@ -388,8 +388,8 @@ then activate it with `agents-relay job run --id JOB --task-id TASK`. No
|
|
|
388
388
|
`executionMode` is stored; `job run` only activates and publishes a wake-up.
|
|
389
389
|
The ordinary Reconciler creates the Coordinator and durable Agent-named Tasks,
|
|
390
390
|
with the same Script/Model execution, Task Review, Retry and recovery used by
|
|
391
|
-
all other Jobs.
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
391
|
+
all other Jobs. Final Review follows the normal `--review`/`--no-review`
|
|
392
|
+
policy, and local Git Merge follows `--auto-merge`/`--no-auto-merge`.
|
|
393
|
+
Neither policy is affected by starting directly from a Coordinator Task.
|
|
394
|
+
New Job creation no longer accepts `--content-only` or `--shortcut-execution`. Historical completed/cancelled Shortcut
|
|
395
395
|
records retain their old fields for read-only compatibility.
|
package/dist/cli-help.js
CHANGED
|
@@ -59,7 +59,7 @@ Graph Job activation:
|
|
|
59
59
|
|
|
60
60
|
The Job is created DRAFT without a Planner. This command activates its Graph
|
|
61
61
|
Task, then the same Relay Reconciler schedules all durable Agent child Tasks.
|
|
62
|
-
|
|
62
|
+
Final Review uses --review/--no-review; Merge uses --auto-merge/--no-auto-merge. Both are normal Job policies, independent of the Coordinator start.
|
|
63
63
|
The --mode shortcut flag is accepted only as a deprecated CLI input alias.
|
|
64
64
|
Historical direct Shortcut checkpoints are read for compatibility.
|
|
65
65
|
|
|
@@ -116,8 +116,8 @@ Optional: --thread-id THREAD_ID persists a reviewer override; omitted uses Job r
|
|
|
116
116
|
'job create': `Create a SQLite-authoritative Job (objective-only).
|
|
117
117
|
|
|
118
118
|
Required: --repo OWNER/REPO and a standalone Job objective. Job ID defaults to an auto-incrementing store-global number; --id may only reference an existing numeric Job.
|
|
119
|
-
Common: --id JOB_ID (optional), --title TEXT, --objective-file PATH|- (preferred), --objective MARKDOWN (short/simple only), --project-path RELATIVE_PATH, --priority P0|P1|P2|P3, --initial-plan, --no-review, --
|
|
120
|
-
Job creation enables auto-merge by default. By default it is create-only; --initial-plan validates the first real Planner round before atomically creating the durable Job and Plan, then publishes the normal wake.
|
|
119
|
+
Common: --id JOB_ID (optional), --title TEXT, --objective-file PATH|- (preferred), --objective MARKDOWN (short/simple only), --project-path RELATIVE_PATH, --priority P0|P1|P2|P3, --initial-plan, --review|--no-review, --auto-merge|--no-auto-merge, --tag JSON, --reviewer-thread-id ID, --creator-thread-id ID, --implementation-thread-id ID. --objective and --objective-file are mutually exclusive.
|
|
120
|
+
Job creation enables auto-merge and Final Review by default. By default it is create-only; --initial-plan validates the first real Planner round before atomically creating the durable Job and Plan, then publishes the normal wake. A Coordinator Job does not require an initial Plan; neither review nor merge behavior changes based on its start point. Re-running create against an already healthy Job is idempotent and does not mutate its metadata.
|
|
121
121
|
|
|
122
122
|
Example:
|
|
123
123
|
npx agents-relay job create --repo OWNER/REPO --project-path vlog --title "Episode" --objective-file episode.md --initial-plan`,
|
|
@@ -128,12 +128,12 @@ Usage: agents-relay job run --id JOB --task-id TASK [--project-path DIR] [--no-g
|
|
|
128
128
|
The command activates the normal Job lifecycle and emits a wake-up. The ordinary
|
|
129
129
|
Relay Scheduler creates runtime Agent Tasks, runs Script or Model executors,
|
|
130
130
|
waits for human review, retries failures and handles completion. A Job may use
|
|
131
|
-
|
|
132
|
-
|
|
131
|
+
ordinary Final Review and Merge policies. The --mode shortcut argument is a
|
|
132
|
+
deprecated start alias only; it does not choose an execution engine.`,
|
|
133
133
|
'job update': `Partially update mutable metadata on a healthy existing Job.
|
|
134
134
|
|
|
135
135
|
Required: --id JOB_ID. Optional: --repo OWNER/REPO verifies the stored Job identity.
|
|
136
|
-
Mutable: --title, --objective-file PATH|- (preferred) or --objective MARKDOWN, --project-path RELATIVE_PATH, --priority, --tag JSON, --auto-merge|--no-auto-merge, --review|--no-review, --
|
|
136
|
+
Mutable: --title, --objective-file PATH|- (preferred) or --objective MARKDOWN, --project-path RELATIVE_PATH, --priority, --tag JSON, --auto-merge|--no-auto-merge, --review|--no-review, --reviewer-thread-id ID, --creator-thread-id ID, --implementation-thread-id ID, and continuation options. The objective updates local SQLite; PR body changes are independent external actions.
|
|
137
137
|
Unspecified fields are preserved. Local Job/PR identity mismatch is rejected.
|
|
138
138
|
|
|
139
139
|
Example:
|
package/dist/cli-job-create.js
CHANGED
|
@@ -53,10 +53,10 @@ export async function ensureManagedGitHubJob(_client, repositoryName, _trustedAu
|
|
|
53
53
|
description: pr.body || undefined,
|
|
54
54
|
priority: options.priority ?? 'P2',
|
|
55
55
|
tag: options.tag,
|
|
56
|
-
autoMerge: options.
|
|
56
|
+
autoMerge: options.legacyShortcutBootstrap ? false : options.autoMerge ?? true,
|
|
57
57
|
...(localMergeSource ? { localMerge: { sourceRef: localMergeSource, targetRef: 'refs/heads/main', status: 'pending' } } : {}),
|
|
58
|
-
reviewEnabled: options.
|
|
59
|
-
...(options.
|
|
58
|
+
reviewEnabled: options.legacyShortcutBootstrap ? false : options.reviewEnabled ?? true,
|
|
59
|
+
...(options.legacyShortcutBootstrap ? { executionMode: 'shortcut', contentOnly: true } : {}),
|
|
60
60
|
...(options.reviewerThreadId
|
|
61
61
|
? { reviewerThreadId: normalizeThreadId(options.reviewerThreadId, 'reviewer thread ID') }
|
|
62
62
|
: {}),
|
|
@@ -16,7 +16,7 @@ export async function runLocalShortcutBinding(kind, action, args) {
|
|
|
16
16
|
const { job } = await ensureManagedGitHubJob(new DisabledGitHubClient(), repository(args), new Set(), {
|
|
17
17
|
title: arg(args, '--title') || undefined, objective,
|
|
18
18
|
projectPath: arg(args, '--project-path') || undefined,
|
|
19
|
-
|
|
19
|
+
legacyShortcutBootstrap: true, storeDirectory: arg(args, '--store-dir') || relayStoreDirectory(),
|
|
20
20
|
noGitHub: true,
|
|
21
21
|
});
|
|
22
22
|
console.log(JSON.stringify({ repository: job.repository, job: job.id, state: job.state }));
|
package/dist/cli.js
CHANGED
|
@@ -62,8 +62,6 @@ async function runManagedTaskCommand(action, args) {
|
|
|
62
62
|
throw new Error(`task ${action} requires --task-id`);
|
|
63
63
|
let result;
|
|
64
64
|
if (action === 'create') {
|
|
65
|
-
if ((hasArg(args, '--shortcut-execution') || hasArg(args, '--content-only')) && hasArg(args, '--initial-plan'))
|
|
66
|
-
throw new Error('--shortcut-execution currently requires create-only job creation; materialize Graph Tasks after the durable shortcut policy is stored');
|
|
67
65
|
const job = await relayControlJob(args, jobId);
|
|
68
66
|
if (['COMPLETED', 'CANCELLED'].includes(job.state))
|
|
69
67
|
throw new Error(`Cannot create task on terminal job ${job.id} (${job.state})`);
|
|
@@ -395,6 +393,9 @@ async function runTaskCommand(action, args) {
|
|
|
395
393
|
async function runJobCommand(action, args) {
|
|
396
394
|
if (hasArg(args, '--shortcut-local'))
|
|
397
395
|
return runLocalShortcutBinding('job', action, args);
|
|
396
|
+
const obsolete = ['--content-only', '--no-content-only', '--shortcut-execution'].find(flag => hasArg(args, flag));
|
|
397
|
+
if (obsolete && ['create', 'update'].includes(action))
|
|
398
|
+
throw new Error(`${obsolete} is obsolete; configure normal --review/--no-review and --auto-merge/--no-auto-merge independently`);
|
|
398
399
|
if (!['create', 'update', 'show', 'list', 'merge', 'unblock', 'cancel', 'pause', 'resume', 'run', 'shortcut-receipt'].includes(action))
|
|
399
400
|
throw new Error(usage);
|
|
400
401
|
const repo = action === 'create' ? repository(args) : arg(args, '--repo');
|
|
@@ -402,8 +403,8 @@ async function runJobCommand(action, args) {
|
|
|
402
403
|
optionalLegacyPr(args);
|
|
403
404
|
let createObjective;
|
|
404
405
|
if (action === 'create') {
|
|
405
|
-
if (hasArg(args, '--
|
|
406
|
-
throw new Error('
|
|
406
|
+
if (hasArg(args, '--auto-merge') && hasArg(args, '--no-auto-merge'))
|
|
407
|
+
throw new Error('Choose only one of --auto-merge or --no-auto-merge');
|
|
407
408
|
const taskOnlyFlags = ['--start', '--task-id', '--input', '--input-file', '--adapter', '--provider', '--model', '--profile', '--reasoning', '--story-size', '--project', '--agent', '--parent', '--deps', '--capabilities', '--attachments', '--max-attempts', '--timeout', '--cwd', '--chatgpt-project', '--chatgpt-tab-close-policy', '--output', '--output-path', '--draft', '--queue'];
|
|
408
409
|
const invalid = taskOnlyFlags.find(flag => hasArg(args, flag));
|
|
409
410
|
if (invalid)
|
|
@@ -433,16 +434,13 @@ async function runJobCommand(action, args) {
|
|
|
433
434
|
return;
|
|
434
435
|
}
|
|
435
436
|
if (action === 'create') {
|
|
436
|
-
if ((hasArg(args, '--shortcut-execution') || hasArg(args, '--content-only')) && hasArg(args, '--initial-plan'))
|
|
437
|
-
throw new Error('--shortcut-execution requires create-only Job creation; materialize Agent Graph Tasks only after durable shortcut policy is stored');
|
|
438
437
|
rejectRemovedJobOptions(args);
|
|
439
438
|
const objective = createObjective ?? '';
|
|
440
439
|
if (hasArg(args, '--local-merge-source') !== hasArg(args, '--local-merge-target'))
|
|
441
440
|
throw new Error('Supply both --local-merge-source and --local-merge-target');
|
|
442
441
|
const result = await relayControlCommand(args, { command: 'job.create', repository: repo, initialPlan: hasArg(args, '--initial-plan'), options: {
|
|
443
442
|
id: id || undefined, idempotencyKey: arg(args, '--idempotency-key') || undefined, title: arg(args, '--title') || undefined, objective: objective || undefined, projectPath: arg(args, '--project-path') || undefined,
|
|
444
|
-
priority: priority(args), tag: jobTagFromArgs(args), reviewEnabled: !hasArg(args, '--no-review'), continuation: continuation(args),
|
|
445
|
-
contentOnly: hasArg(args, '--content-only') || hasArg(args, '--shortcut-execution'),
|
|
443
|
+
priority: priority(args), tag: jobTagFromArgs(args), reviewEnabled: !hasArg(args, '--no-review'), autoMerge: !hasArg(args, '--no-auto-merge'), continuation: continuation(args),
|
|
446
444
|
reviewerThreadId: hasArg(args, '--reviewer-thread-id') ? arg(args, '--reviewer-thread-id') : undefined, creatorThreadId: hasArg(args, '--creator-thread-id') ? arg(args, '--creator-thread-id') : undefined, implementationThreadId: hasArg(args, '--implementation-thread-id') ? arg(args, '--implementation-thread-id') : undefined,
|
|
447
445
|
} });
|
|
448
446
|
console.log(JSON.stringify(result, null, 2));
|
|
@@ -509,15 +507,6 @@ async function runJobCommand(action, args) {
|
|
|
509
507
|
job.reviewEnabled = true;
|
|
510
508
|
if (hasArg(args, '--no-review'))
|
|
511
509
|
job.reviewEnabled = false;
|
|
512
|
-
if (hasArg(args, '--content-only')) {
|
|
513
|
-
if (hasArg(args, '--no-content-only'))
|
|
514
|
-
throw new Error('choose only one of --content-only or --no-content-only');
|
|
515
|
-
if (job.prNumber !== 0 || job.localMerge || job.autoMerge === true || job.reviewEnabled === true || job.review)
|
|
516
|
-
throw new Error('--content-only requires a Job with no PR, merge, or review requirements; set --no-auto-merge --no-review first');
|
|
517
|
-
job.contentOnly = true;
|
|
518
|
-
}
|
|
519
|
-
if (hasArg(args, '--no-content-only'))
|
|
520
|
-
job.contentOnly = false;
|
|
521
510
|
if (hasArg(args, '--reviewer-thread-id'))
|
|
522
511
|
job.reviewerThreadId = normalizeThreadId(arg(args, '--reviewer-thread-id'), '--reviewer-thread-id');
|
|
523
512
|
if (hasArg(args, '--creator-thread-id'))
|
|
@@ -531,7 +520,7 @@ async function runJobCommand(action, args) {
|
|
|
531
520
|
job.continuation = next;
|
|
532
521
|
}
|
|
533
522
|
const patch = {};
|
|
534
|
-
for (const key of ['title', 'objective', 'projectPath', 'priority', 'tag', 'autoMerge', 'reviewEnabled', '
|
|
523
|
+
for (const key of ['title', 'objective', 'projectPath', 'priority', 'tag', 'autoMerge', 'reviewEnabled', 'reviewerThreadId', 'creatorThreadId', 'implementationThreadId', 'continuation', 'localMerge'])
|
|
535
524
|
patch[key] = job[key];
|
|
536
525
|
console.log(JSON.stringify(await relayControlCommand(args, { command: 'job.update', jobId: id, patch }), null, 2));
|
|
537
526
|
}
|
package/dist/relayd-control.js
CHANGED
|
@@ -21,6 +21,8 @@ export function createWorkspaceControl(deps) {
|
|
|
21
21
|
if (command === 'job.create') {
|
|
22
22
|
const repository = typeof body.repository === 'string' ? body.repository : '';
|
|
23
23
|
const options = (body.options && typeof body.options === 'object' ? body.options : {});
|
|
24
|
+
if (options.contentOnly !== undefined || options.executionMode !== undefined)
|
|
25
|
+
throw new Error('Execution mode/content-only is obsolete; use normal Job reviewEnabled and autoMerge policy');
|
|
24
26
|
if (!repository)
|
|
25
27
|
throw new Error('job.create requires repository');
|
|
26
28
|
if ('schedule' in options)
|
|
@@ -34,7 +36,7 @@ export function createWorkspaceControl(deps) {
|
|
|
34
36
|
priority: options.priority,
|
|
35
37
|
tag: options.tag,
|
|
36
38
|
reviewEnabled: typeof options.reviewEnabled === 'boolean' ? options.reviewEnabled : undefined,
|
|
37
|
-
|
|
39
|
+
autoMerge: typeof options.autoMerge === 'boolean' ? options.autoMerge : undefined,
|
|
38
40
|
continuation: options.continuation,
|
|
39
41
|
reviewerThreadId: typeof options.reviewerThreadId === 'string' ? options.reviewerThreadId : undefined,
|
|
40
42
|
creatorThreadId: typeof options.creatorThreadId === 'string' ? options.creatorThreadId : undefined,
|
|
@@ -128,7 +130,7 @@ export function createWorkspaceControl(deps) {
|
|
|
128
130
|
const patch = (body.patch && typeof body.patch === 'object' ? body.patch : {});
|
|
129
131
|
if ('executionMode' in patch || 'schedule' in patch)
|
|
130
132
|
throw new Error('Job execution modes and schedules are unsupported');
|
|
131
|
-
const mutable = ['title', 'objective', 'projectPath', 'priority', 'tag', 'autoMerge', 'reviewEnabled', '
|
|
133
|
+
const mutable = ['title', 'objective', 'projectPath', 'priority', 'tag', 'autoMerge', 'reviewEnabled', 'reviewerThreadId', 'creatorThreadId', 'implementationThreadId', 'continuation', 'localMerge'];
|
|
132
134
|
for (const key of mutable)
|
|
133
135
|
if (Object.prototype.hasOwnProperty.call(patch, key)) {
|
|
134
136
|
const value = patch[key];
|
|
@@ -138,8 +140,6 @@ export function createWorkspaceControl(deps) {
|
|
|
138
140
|
else
|
|
139
141
|
job[key] = value;
|
|
140
142
|
}
|
|
141
|
-
if (job.contentOnly === true && (job.prNumber !== 0 || job.localMerge || job.autoMerge === true || job.reviewEnabled === true || job.review))
|
|
142
|
-
throw new Error('Content-only policy requires no PR, merge, or review requirements');
|
|
143
143
|
job.updatedAt = new Date().toISOString();
|
|
144
144
|
await store.saveJob(job);
|
|
145
145
|
await refreshAll();
|
package/package.json
CHANGED
|
@@ -47,8 +47,8 @@ Graph Tasks use Relay's ordinary Task Reconciler: `agentGraph` becomes a
|
|
|
47
47
|
ready. Script and Model are Task execution choices; each has the same
|
|
48
48
|
Task-level retry, failure and review semantics. `job run --id JOB --task-id TASK` activates any create-only Graph Job and
|
|
49
49
|
hands it to that same Reconciler; it is not a separate DAG scheduler or Job
|
|
50
|
-
execution mode.
|
|
51
|
-
Merge
|
|
50
|
+
execution mode. Final Review is independently controlled by `--review`/`--no-review`;
|
|
51
|
+
normal Git Merge is independently controlled by `--auto-merge`/`--no-auto-merge`. A Graph needs no Planner unless one is requested.
|
|
52
52
|
|
|
53
53
|
## 3. Verify, review, and recover
|
|
54
54
|
|