@masyv/relay 0.1.0 → 0.1.1

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.
@@ -65,26 +65,38 @@ impl Agent for CodexAgent {
65
65
  fn execute(&self, handoff_prompt: &str, project_dir: &str) -> Result<HandoffResult> {
66
66
  let binary = self.find_binary().unwrap_or(self.binary.clone());
67
67
 
68
- // Write handoff to a temp file
68
+ // Write handoff to a temp file for reference
69
69
  let tmp = std::env::temp_dir().join("relay_handoff.md");
70
70
  std::fs::write(&tmp, handoff_prompt)?;
71
71
 
72
- // Launch codex with the prompt
73
- let mut child = Command::new(&binary)
72
+ // Use `codex exec --full-auto` for non-interactive auto-approval
73
+ let output = Command::new(&binary)
74
74
  .current_dir(project_dir)
75
- .arg("--model")
75
+ .arg("exec")
76
+ .arg("--full-auto")
77
+ .arg("-m")
76
78
  .arg(&self.model)
77
- .arg("--quiet")
78
79
  .arg(handoff_prompt)
79
- .spawn()?;
80
+ .output()?;
80
81
 
81
- // Don't wait — let it run in the foreground
82
- let _ = child.wait();
82
+ let stdout = String::from_utf8_lossy(&output.stdout);
83
+ let stderr = String::from_utf8_lossy(&output.stderr);
84
+
85
+ if !stdout.is_empty() {
86
+ println!("{stdout}");
87
+ }
88
+ if !stderr.is_empty() {
89
+ eprintln!("{stderr}");
90
+ }
83
91
 
84
92
  Ok(HandoffResult {
85
93
  agent: "codex".into(),
86
- success: true,
87
- message: format!("Codex ({}) launched with handoff context", self.model),
94
+ success: output.status.success(),
95
+ message: if output.status.success() {
96
+ format!("Codex ({}) completed handoff task", self.model)
97
+ } else {
98
+ format!("Codex exited with code {:?}", output.status.code())
99
+ },
88
100
  handoff_file: Some(tmp.to_string_lossy().to_string()),
89
101
  })
90
102
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@masyv/relay",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Relay — When Claude's rate limit hits, another agent picks up exactly where you left off. Captures session state and hands off to Codex, Gemini, Ollama, or GPT-4.",
5
5
  "scripts": {
6
6
  "build": "./scripts/build.sh",