agents-relay 1.0.133 → 1.0.134
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 +4 -5
- package/dist/cli-help.js +3 -3
- package/dist/cli.js +6 -4
- package/package.json +1 -1
- package/skills/agents-relay/SKILL.md +5 -4
package/README.md
CHANGED
|
@@ -23,11 +23,10 @@ cat > task.md <<'EOF'
|
|
|
23
23
|
Implement this phase using the Job objective as context.
|
|
24
24
|
EOF
|
|
25
25
|
npx agents-relay task create --repo OWNER/REPO --pr 12 --id job-1 \
|
|
26
|
-
--task-id initial --
|
|
27
|
-
--input-file task.md
|
|
26
|
+
--task-id initial --output task-pr --input-file task.md
|
|
28
27
|
|
|
29
28
|
npx agents-relay task create --repo OWNER/REPO --pr 12 --id job-1 \
|
|
30
|
-
--task-id child --
|
|
29
|
+
--task-id child --output task-pr \
|
|
31
30
|
--input "Implement the described child task and publish a terminal event."
|
|
32
31
|
|
|
33
32
|
npx agents-relay reconcile --repo OWNER/REPO --pr 12 --id job-1
|
|
@@ -132,7 +131,7 @@ For explicit local demo/test mode:
|
|
|
132
131
|
npm install
|
|
133
132
|
npm run build
|
|
134
133
|
node dist/cli.js init --file .agents-relay.json --title "Dogfood" --id demo
|
|
135
|
-
node dist/cli.js task create --file .agents-relay.json --task-id hello --
|
|
134
|
+
node dist/cli.js task create --file .agents-relay.json --task-id hello --output task-pr --input "Complete the described task"
|
|
136
135
|
node dist/cli.js reconcile --file .agents-relay.json
|
|
137
136
|
npx agents-relay serve --file .agents-relay.json
|
|
138
137
|
~~~
|
|
@@ -163,7 +162,7 @@ For automation, Agents Relay can use GitHub App installation authentication via
|
|
|
163
162
|
|
|
164
163
|
V1 assumes one active runner/daemon per job. Use a distributed atomic lease before running multiple reconcilers. Do not put secrets, credentials, private prompts, or large private payloads in the PR-body Job marker or PR-comment Task markers; store only summaries and artifact references.
|
|
165
164
|
|
|
166
|
-
|
|
165
|
+
Model-backed tasks are routed by Relay before launch. Normal task producers omit adapter/provider/model; explicit routing flags remain compatibility/debug constraints. See [docs/architecture.md](docs/architecture.md) and [skills/agents-relay/SKILL.md](skills/agents-relay/SKILL.md).
|
|
167
166
|
|
|
168
167
|
XChat and other orchestrators can consume Relay's exact shared discovery implementation without duplicating filesystem search logic:
|
|
169
168
|
|
package/dist/cli-help.js
CHANGED
|
@@ -98,12 +98,12 @@ Actions:
|
|
|
98
98
|
cancel Cancel a Task`,
|
|
99
99
|
'task create': `Create one durable Task under an existing Job.
|
|
100
100
|
|
|
101
|
-
Required: normal Job storage options plus --input-file PATH|- (preferred) or --input MARKDOWN, and --output task-pr|file. --input and --input-file are mutually exclusive.
|
|
102
|
-
Common: --task-id ID, --
|
|
101
|
+
Required: normal Job storage options plus --input-file PATH|- (preferred) or --input MARKDOWN, and --output task-pr|file. --input and --input-file are mutually exclusive.
|
|
102
|
+
Common: --task-id ID, --priority P0|P1|P2|P3, --story-size S|M|L, --agent NAME, --agent-graph-file PATH|-, --deps a,b, --parent ID, --draft. Normal model-backed Tasks omit adapter/provider/model so Relay runs worker-router then model-router. Use --adapter orchestrator only for synchronous self-work; explicit adapter/provider/model remain compatibility/debug constraints.\nTasks with dependencies start DRAFT; tasks without dependencies start QUEUED unless --draft is given.
|
|
103
103
|
Directly-created Tasks are not wrapped in a synthetic Plan. Planner-generated Tasks are created internally by Relay from planner output.
|
|
104
104
|
|
|
105
105
|
Example:
|
|
106
|
-
npx agents-relay task create --repo OWNER/REPO --pr 12 --id job-1 --task-id build --
|
|
106
|
+
npx agents-relay task create --repo OWNER/REPO --pr 12 --id job-1 --task-id build --output task-pr --input-file task.md`,
|
|
107
107
|
'task update': `Update mutable durable Task fields in place.
|
|
108
108
|
|
|
109
109
|
Required: --task-id ID and the normal Job storage options.
|
package/dist/cli.js
CHANGED
|
@@ -79,17 +79,18 @@ async function workerTaskFromArgs(job, args, now) {
|
|
|
79
79
|
throw new Error('task create requires --input-file PATH|- or --input MARKDOWN');
|
|
80
80
|
if (!['codex', 'chatgpt', 'orchestrator'].includes(adapter))
|
|
81
81
|
throw new Error('task create --adapter must be codex, chatgpt, or orchestrator');
|
|
82
|
-
if (adapter !== 'orchestrator' && !model)
|
|
83
|
-
throw new Error('task create requires --model for codex/chatgpt tasks');
|
|
84
82
|
if (outputKind !== 'task-pr' && outputKind !== 'file')
|
|
85
83
|
throw new Error('task create requires --output task-pr|file');
|
|
86
84
|
if (outputKind === 'file' && !outputPath)
|
|
87
85
|
throw new Error('--output file requires --output-path');
|
|
88
|
-
|
|
86
|
+
if (adapter !== 'orchestrator' && ['--provider', '--profile', '--reasoning', '--cwd', '--chatgpt-project'].some(flag => hasArg(args, flag)) && !model)
|
|
87
|
+
throw new Error('task create explicit routing requires --model');
|
|
88
|
+
const routing = adapter === 'orchestrator' || !model ? undefined : { provider: arg(args, '--provider', 'openai'), model, profile: arg(args, '--profile') || undefined, reasoning: arg(args, '--reasoning') || undefined, cwd: arg(args, '--cwd') || undefined, projectId: arg(args, '--chatgpt-project') || undefined, decidedBy: 'cli', decidedAt: now };
|
|
89
|
+
const workerRequirements = adapter === 'orchestrator' || routing ? undefined : { capabilities: [], runtime: adapterValue ? adapter : undefined };
|
|
89
90
|
const closePolicy = hasArg(args, '--chatgpt-tab-close-policy') ? chatGptTabClosePolicy(args) : undefined;
|
|
90
91
|
const size = storySize(args);
|
|
91
92
|
const dependencies = arg(args, '--deps').split(',').filter(Boolean);
|
|
92
|
-
const timeoutMs = adapter === 'orchestrator' ? 0 : hasArg(args, '--timeout') ? integerArg(args, '--timeout', taskOverallTimeoutMs(size, routing?.reasoning)) : taskOverallTimeoutMs(size, routing
|
|
93
|
+
const timeoutMs = adapter === 'orchestrator' ? 0 : hasArg(args, '--timeout') ? integerArg(args, '--timeout', taskOverallTimeoutMs(size, routing?.reasoning)) : routing ? taskOverallTimeoutMs(size, routing.reasoning) : 0;
|
|
93
94
|
return {
|
|
94
95
|
jobId: job.id,
|
|
95
96
|
id: arg(args, '--task-id', 'initial'),
|
|
@@ -101,6 +102,7 @@ async function workerTaskFromArgs(job, args, now) {
|
|
|
101
102
|
parentTaskId: arg(args, '--parent') || null,
|
|
102
103
|
dependencies,
|
|
103
104
|
capabilities: arg(args, '--capabilities').split(',').filter(Boolean),
|
|
105
|
+
workerRequirements,
|
|
104
106
|
adapter,
|
|
105
107
|
chatgptTabClosePolicy: closePolicy,
|
|
106
108
|
input: input || 'true',
|
package/package.json
CHANGED
|
@@ -21,14 +21,15 @@ Normal worker tasks use an agent runtime:
|
|
|
21
21
|
|
|
22
22
|
Shell commands, tests, Markad Vision, ffmpeg, build tools, and similar CLIs are tools used inside an agent or directly by the orchestrator. They are not Agents Relay worker tasks.
|
|
23
23
|
|
|
24
|
-
Every model-backed task
|
|
24
|
+
Every model-backed task producer normally declares:
|
|
25
25
|
- its descriptive `input`;
|
|
26
|
-
-
|
|
27
|
-
- routing metadata;
|
|
26
|
+
- semantic requirements such as capabilities/runtime only when known;
|
|
28
27
|
- exactly one durable output contract:
|
|
29
28
|
- `task_pr`: the managed task/PR is the authoritative result; or
|
|
30
29
|
- `file`: an exact file path is the authoritative result.
|
|
31
30
|
|
|
31
|
+
Relay then runs worker-router followed by model-router and persists the selected worker/adapter and model routing before launch. Explicit adapter/provider/model values are compatibility/debug constraints, not normal producer requirements.
|
|
32
|
+
|
|
32
33
|
## Lifecycle contract
|
|
33
34
|
|
|
34
35
|
Events are authoritative for model-backed task state.
|
|
@@ -62,7 +63,7 @@ Example:
|
|
|
62
63
|
~~~sh
|
|
63
64
|
npx agents-relay job create --repo OWNER/REPO --head feat/example --base main --id JOB_ID --title "Objective"
|
|
64
65
|
|
|
65
|
-
npx agents-relay task create --repo OWNER/REPO --pr 12 --id JOB_ID --task-id implement --
|
|
66
|
+
npx agents-relay task create --repo OWNER/REPO --pr 12 --id JOB_ID --task-id implement --output task-pr --input "Implement the requested change, validate it, and update the managed task/PR."
|
|
66
67
|
|
|
67
68
|
npx agents-relayd --repo OWNER/REPO --events nats
|
|
68
69
|
~~~
|