agents-relay 2.0.8 → 2.0.9

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 CHANGED
@@ -193,6 +193,8 @@ External product feedback uses the reusable `src/feedback.ts` contract. See [doc
193
193
 
194
194
  reconcile leases and launches ready tasks without waiting inside the runtime scheduler; the CLI waits only long enough for its launched workers to persist results. agents-relayd (or the equivalent npx agents-relay serve) is the watchdog/dashboard mode. Model-backed workers require --events nats; the event transport carries authoritative terminal worker events as well as wake/progress traffic. See [docs/service.md](docs/service.md). --file PATH is explicit local demo/test mode only.
195
195
 
196
+ Router Rules are stored at `~/.agents-relay/execution-router-rules.md` by default. `agents-relayd --execution-router-rules PATH` selects a different file for that daemon process; the explicit CLI path takes precedence over `AGENTS_RELAY_EXECUTION_ROUTER_RULES`, which remains supported for compatibility.
197
+
196
198
  `agents-relayd` without `--pr`/`--id` runs in workspace mode by default: it discovers nested Git repositories under `~/Workspace`, keeps only GitHub `origin` remotes, and aggregates their managed PR jobs into one dashboard and worker pool. Pass `--workspace PATH` to use another root. `--repo OWNER/REPO` remains the single-repository pool mode.
197
199
 
198
200
  For automation, Agents Relay can use GitHub App installation authentication via `AGENTS_RELAY_GITHUB_APP_ID`, `AGENTS_RELAY_GITHUB_APP_INSTALLATION_ID`, and `AGENTS_RELAY_GITHUB_APP_PRIVATE_KEY_FILE` (or matching CLI flags). Webhook mode is local-first: targeted webhook reconciliation is primary, dashboard auto-refresh reads the disposable in-process view restored from SQLite RelayStore state, and the broad watchdog drops to a 30-minute fallback. No separate persisted dashboard Job cache is maintained. See [docs/github-app-rate-limit.md](docs/github-app-rate-limit.md).
@@ -187,7 +187,7 @@ export const dashboardHtml = `<!doctype html>
187
187
  <button id="jobs-tab" type="button" role="tab" aria-selected="true" aria-controls="jobs-view">Jobs</button>
188
188
  <button id="usage-tab" type="button" role="tab" aria-selected="false" aria-controls="usage-view">Usage</button>
189
189
  <button id="graphs-tab" type="button" role="tab" aria-selected="false" aria-controls="graphs-view">Graphs</button>
190
- <button id="rules-tab" type="button" role="tab" aria-selected="false" aria-controls="rules-view">Execution Rules</button>
190
+ <button id="rules-tab" type="button" role="tab" aria-selected="false" aria-controls="rules-view">Router Rules</button>
191
191
  <button id="shortcuts-tab" type="button" role="tab" aria-selected="false" aria-controls="shortcuts-view">Shortcuts</button>
192
192
  </nav>
193
193
  </header>
@@ -235,7 +235,7 @@ export const dashboardHtml = `<!doctype html>
235
235
  </section>
236
236
  <section id="rules-view" role="tabpanel" aria-labelledby="rules-tab" hidden>
237
237
  <div class="panel">
238
- <div class="panel-head"><h2>Execution Router Rules</h2><span id="rules-meta" class="subtle"></span></div>
238
+ <div class="panel-head"><h2>Router Rules</h2><span id="rules-meta" class="subtle"></span></div>
239
239
  <div class="panel-body">
240
240
  <div class="rules-editor">
241
241
  <p class="rules-help">Free-text soft policy loaded by the Execution Router for every worker+model routing decision. Impossible routes remain excluded by code; Codex remains the deterministic fallback if decision fails.</p>
package/dist/relayd.js CHANGED
@@ -23,6 +23,7 @@ import { deriveJobRuntimeStatus } from './runtime-status.js';
23
23
  import { decisionMode, LayaCliDecisionEngine } from './decision.js';
24
24
  import { JsonlDecisionAuditStore } from './decision-audit.js';
25
25
  import { summarizeRuntime } from './runtime-summary.js';
26
+ import { executionRouterRulesPath } from './routing-policy.js';
26
27
  export async function overlayOperationalOverviews(overviews, storeFor) {
27
28
  return await Promise.all(overviews.map(async (item) => {
28
29
  const store = storeFor(item.job.repository, item.job.prNumber);
@@ -51,6 +52,8 @@ Options:
51
52
  --concurrency N Maximum concurrent workers (default: 4)
52
53
  --interval MS Recovery interval
53
54
  --projection-ms MS GitHub projection flush interval (default: 1000)
55
+ --execution-router-rules PATH
56
+ Router Rules file (default: ~/.agents-relay/execution-router-rules.md)
54
57
  --events nats Enable event wakeups
55
58
 
56
59
  Legacy single-job mode also accepts --repo OWNER/REPO --pr NUMBER --id JOB_ID.
@@ -95,11 +98,18 @@ export function recoveryScanRepositories(repositories, cached, dormantProbeIndex
95
98
  return activeOrUnknown;
96
99
  return [...activeOrUnknown, dormant[Math.abs(dormantProbeIndex) % dormant.length]];
97
100
  }
101
+ export function configureExecutionRouterRulesPath(argv) {
102
+ const explicitRulesPath = value(argv, '--execution-router-rules') || undefined;
103
+ if (explicitRulesPath)
104
+ process.env.AGENTS_RELAY_EXECUTION_ROUTER_RULES = executionRouterRulesPath(explicitRulesPath);
105
+ return executionRouterRulesPath();
106
+ }
98
107
  export async function runDaemon(argv) {
99
108
  if (argv.includes('--help') || argv.includes('-h')) {
100
109
  console.log(daemonHelp);
101
110
  return;
102
111
  }
112
+ configureExecutionRouterRulesPath(argv);
103
113
  const normalized = normalizeDaemonArguments(argv);
104
114
  if (normalized.pullRequest && normalized.jobId) {
105
115
  await startService([...argv]);
@@ -1,5 +1,6 @@
1
1
  import { createHash } from 'node:crypto';
2
2
  import { mkdir, readFile, writeFile } from 'node:fs/promises';
3
+ import { homedir } from 'node:os';
3
4
  import { dirname, join } from 'node:path';
4
5
  const EMPTY_POLICY = {};
5
6
  function safePolicy(value) {
@@ -45,7 +46,7 @@ async function saveRouterRules(path, text) {
45
46
  return { path, hash: createHash('sha256').update(text).digest('hex'), text };
46
47
  }
47
48
  export function executionRouterRulesPath(explicit) {
48
- return explicit ?? process.env.AGENTS_RELAY_EXECUTION_ROUTER_RULES ?? join(process.cwd(), '.agents-relay-execution-router-rules.md');
49
+ return explicit ?? process.env.AGENTS_RELAY_EXECUTION_ROUTER_RULES ?? join(homedir(), '.agents-relay', 'execution-router-rules.md');
49
50
  }
50
51
  export async function loadExecutionRouterRules(explicit) {
51
52
  return await loadRouterRules(executionRouterRulesPath(explicit));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agents-relay",
3
- "version": "2.0.8",
3
+ "version": "2.0.9",
4
4
  "description": "Durable async agent jobs coordinated through GitHub pull requests",
5
5
  "type": "module",
6
6
  "bin": {