relay-flow 0.3.3-alpha → 0.3.4-alpha
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
|
@@ -24,13 +24,13 @@ same `relay-flow-plugin` package with host-specific entrypoints.
|
|
|
24
24
|
**OpenCode**
|
|
25
25
|
|
|
26
26
|
```sh
|
|
27
|
-
opencode plugin relay-flow-plugin@0.3.
|
|
27
|
+
opencode plugin relay-flow-plugin@0.3.4-alpha
|
|
28
28
|
```
|
|
29
29
|
|
|
30
30
|
**Pi**
|
|
31
31
|
|
|
32
32
|
```sh
|
|
33
|
-
pi install npm:relay-flow-plugin@0.3.
|
|
33
|
+
pi install npm:relay-flow-plugin@0.3.4-alpha
|
|
34
34
|
```
|
|
35
35
|
|
|
36
36
|
Pi loads the package's `pi.ts` extension from its manifest. Do not add
|
|
@@ -160,7 +160,7 @@ OpenCode plugin configuration uses both entrypoints. The server entrypoint is li
|
|
|
160
160
|
```json
|
|
161
161
|
{
|
|
162
162
|
"$schema": "https://opencode.ai/config.json",
|
|
163
|
-
"plugin": ["relay-flow-plugin@0.3.
|
|
163
|
+
"plugin": ["relay-flow-plugin@0.3.4-alpha"]
|
|
164
164
|
}
|
|
165
165
|
```
|
|
166
166
|
|
|
@@ -169,7 +169,7 @@ The native HITL approval entrypoint is listed in `.opencode/tui.json`:
|
|
|
169
169
|
```json
|
|
170
170
|
{
|
|
171
171
|
"$schema": "https://opencode.ai/tui.json",
|
|
172
|
-
"plugin": ["relay-flow-plugin@0.3.
|
|
172
|
+
"plugin": ["relay-flow-plugin@0.3.4-alpha"]
|
|
173
173
|
}
|
|
174
174
|
```
|
|
175
175
|
|
|
@@ -185,7 +185,7 @@ Pi plugin: install the same published package manually in Pi's global package
|
|
|
185
185
|
settings before starting a Pi harness session:
|
|
186
186
|
|
|
187
187
|
```sh
|
|
188
|
-
pi install npm:relay-flow-plugin@0.3.
|
|
188
|
+
pi install npm:relay-flow-plugin@0.3.4-alpha
|
|
189
189
|
```
|
|
190
190
|
|
|
191
191
|
Relay-flow does not install or configure the package automatically. Pi resolves
|
|
@@ -157,9 +157,12 @@ func (h *Harness) RenderPrompt(kind harness.PromptKind, data harness.PromptData,
|
|
|
157
157
|
}
|
|
158
158
|
|
|
159
159
|
// BuildCommand returns the structured opencode invocation with the
|
|
160
|
-
// required RELAY_FLOW_* env.
|
|
161
|
-
//
|
|
162
|
-
//
|
|
160
|
+
// required RELAY_FLOW_* env. Fresh launches use OpenCode's TUI command and
|
|
161
|
+
// --prompt initial-message option. A resumed launch uses `opencode run
|
|
162
|
+
// --interactive`: the root TUI's --prompt option only fills the composer
|
|
163
|
+
// when resuming an existing session and does not submit the message, while
|
|
164
|
+
// `run --interactive` submits it and keeps the TUI/PTY alive for reports and
|
|
165
|
+
// HITL. The runner executes the returned command without interpreting it.
|
|
163
166
|
//
|
|
164
167
|
// 9.5 external-call logging: this is the harness launch boundary — the
|
|
165
168
|
// runner executes the returned command. One debug line carries agent +
|
|
@@ -208,9 +211,14 @@ func (h *Harness) BuildCommand(spec harness.LaunchSpec) (runner.Command, error)
|
|
|
208
211
|
}
|
|
209
212
|
args := []string{}
|
|
210
213
|
if spec.ResumeID != "" {
|
|
211
|
-
|
|
214
|
+
// `opencode --session ... --prompt ...` resumes the full TUI but
|
|
215
|
+
// leaves the prompt in the composer. `run --interactive` submits
|
|
216
|
+
// the message to the resumed session before entering the TUI.
|
|
217
|
+
args = append(args, "run", "--interactive", "--session", spec.ResumeID,
|
|
218
|
+
"--agent", spec.Agent, spec.Prompt)
|
|
219
|
+
} else {
|
|
220
|
+
args = append(args, "--agent", spec.Agent, "--prompt", spec.Prompt)
|
|
212
221
|
}
|
|
213
|
-
args = append(args, "--agent", spec.Agent, "--prompt", spec.Prompt)
|
|
214
222
|
slog.Info("harness outcome",
|
|
215
223
|
"op", "launch", "agent", spec.Agent, "session", spec.ResumeID, "mode", mode,
|
|
216
224
|
"ticket", spec.Ticket, "runID", string(spec.RunID),
|
|
@@ -14,7 +14,7 @@ import (
|
|
|
14
14
|
"github.com/rajpopat27/relay-flow/internal/workflow"
|
|
15
15
|
)
|
|
16
16
|
|
|
17
|
-
const configuredPlugin = "relay-flow-plugin@0.3.
|
|
17
|
+
const configuredPlugin = "relay-flow-plugin@0.3.4-alpha"
|
|
18
18
|
|
|
19
19
|
func TestBuildCommandArgv(t *testing.T) {
|
|
20
20
|
t.Setenv("RELAY_FLOW_HOME", "/var/lib/relay-flow-test")
|
|
@@ -30,7 +30,7 @@ func TestBuildCommandArgv(t *testing.T) {
|
|
|
30
30
|
{
|
|
31
31
|
name: "resumed",
|
|
32
32
|
resumeID: "session-123",
|
|
33
|
-
want: []string{"--session", "session-123", "--agent", "build", "
|
|
33
|
+
want: []string{"run", "--interactive", "--session", "session-123", "--agent", "build", "implement the ticket"},
|
|
34
34
|
},
|
|
35
35
|
}
|
|
36
36
|
|