agents-relay 1.0.39 → 1.0.41

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
@@ -88,6 +88,20 @@ node dist/cli.js reconcile --file .agents-relay.json
88
88
  npx agents-relay serve --file .agents-relay.json
89
89
  ~~~
90
90
 
91
+ ### Opt-in Temporary Chat quality checks
92
+
93
+ The normal `npm test` suite does not open a browser or send ChatGPT messages.
94
+ For an explicit live check of the one-shot Temporary Chat path, use an
95
+ authenticated browser session and run:
96
+
97
+ ~~~sh
98
+ npm run test:chatgpt-temp-quality
99
+ ~~~
100
+
101
+ This small live suite covers two Temporary Chat submission gates: a normal text
102
+ prompt and a prompt with an attachment. It does not exercise worker lifecycle
103
+ events, durable-thread reuse, resume, or retry behavior.
104
+
91
105
  Open the dashboard on localhost port 8787. The marker format is intentionally public and append-friendly; the CLI uses GitHubStore with the authenticated gh client in operational mode.
92
106
 
93
107
  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.
package/dist/adapters.js CHANGED
@@ -252,7 +252,7 @@ export class ChatGptAdapter {
252
252
  if (controller.signal.aborted)
253
253
  throw new Error('browser-worker execution aborted');
254
254
  const policy = chatGptTabClosePolicy(task.chatgptTabClosePolicy, this.tabClosePolicy);
255
- const run = (this.runner ?? directBrowserWorkerRunner(runtime.root))(runtime.definition, { prompt: task.input, tabClosePolicy: policy }, route, controller.signal);
255
+ const run = (this.runner ?? directBrowserWorkerRunner(runtime.root))(runtime.definition, { prompt: task.input, ...(task.attachments?.length ? { files: task.attachments } : {}), tabClosePolicy: policy }, route, controller.signal);
256
256
  try {
257
257
  const output = await (run.submitted ?? run.promise);
258
258
  const response = parseBrowserWorkerResponse(output);
package/dist/cli.js CHANGED
@@ -356,6 +356,7 @@ function workerTaskFromArgs(job, args, now, requireInput = false) {
356
356
  adapter,
357
357
  chatgptTabClosePolicy: closePolicy,
358
358
  input: input || 'true',
359
+ attachments: arg(args, '--attachments').split(',').filter(Boolean),
359
360
  output: outputKind === 'file' ? { kind: 'file', path: outputPath } : { kind: 'task_pr' },
360
361
  routing,
361
362
  continuation: continuation(args),
@@ -372,8 +372,6 @@ export class Reconciler {
372
372
  for (const child of children) {
373
373
  const existing = job.tasks.find(item => item.id === child.id);
374
374
  if (existing) {
375
- if (!samePlannerChildDefinition(existing, child))
376
- throw new Error(`Planner task ${child.id} already exists with a different definition`);
377
375
  continue;
378
376
  }
379
377
  await this.store.appendTask(child);
@@ -559,8 +557,6 @@ export class Reconciler {
559
557
  const existing = job.tasks.find(item => item.id === child.id);
560
558
  if (!existing)
561
559
  continue;
562
- else if (!samePlannerChildDefinition(existing, child))
563
- throw new Error(`Planner task ${child.id} already exists with a different definition`);
564
560
  }
565
561
  // Persist the completed decision before exposing executable children.
566
562
  task.plannerResult = result;
package/dist/store.js CHANGED
@@ -83,7 +83,7 @@ function immutableTaskDefinition(task) {
83
83
  return {
84
84
  jobId: task.jobId, id: task.id, priority: task.priority, storySize: task.storySize ?? 'M', projectName: task.projectName, agentName: task.agentName,
85
85
  kind: task.kind ?? 'work', planningDecisionId: task.planningDecisionId, planningSource: task.planningSource, planningRound: task.planningRound, parentTaskId: task.parentTaskId, dependencies: task.dependencies, capabilities: task.capabilities, adapter: task.adapter,
86
- input: task.input, output: task.output, routing, chatgptTabClosePolicy: task.chatgptTabClosePolicy ?? 'after-start', continuation: task.continuation ?? null, maxAttempts: task.maxAttempts, timeoutMs: task.timeoutMs
86
+ input: task.input, attachments: task.attachments, output: task.output, routing, chatgptTabClosePolicy: task.chatgptTabClosePolicy ?? 'after-start', continuation: task.continuation ?? null, maxAttempts: task.maxAttempts, timeoutMs: task.timeoutMs
87
87
  };
88
88
  }
89
89
  function sameTaskDefinition(left, right) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agents-relay",
3
- "version": "1.0.39",
3
+ "version": "1.0.41",
4
4
  "description": "Durable async agent jobs coordinated through GitHub pull requests",
5
5
  "type": "module",
6
6
  "bin": {
@@ -10,6 +10,7 @@
10
10
  "scripts": {
11
11
  "build": "tsc -p tsconfig.json && chmod +x dist/cli.js dist/relayd.js",
12
12
  "test": "npm run build && node --test test/*.test.js",
13
+ "test:chatgpt-temp-quality": "AGENTS_RELAY_RUN_CHATGPT_TEMP_QUALITY=1 AGENTS_RELAY_CHATGPT_BROWSER_WORKER_AGENT=/Users/chengli/Workspace/neo/skills/chatgpt-browser-worker/agents/browser-worker.agent.md sh -c \"npm run build && node test/quality/run-temporary-chat.mjs\"",
13
14
  "dev": "tsx src/cli.ts"
14
15
  },
15
16
  "devDependencies": {