@@ -16,7 +16,8 @@ happen inside `running`; they are not additional persisted phases.
1616
1717``` mermaid
1818flowchart TD
19- Load[Load combined automation plugin] --> Owner{Primary Git checkout root?}
19+ Activate[Open TUI or call plugin.list for the owner location] --> Load[Load combined automation plugin]
20+ Load --> Owner{Primary Git checkout root?}
2021 Owner -->|No or outside Git| Inactive[Plugin stays inactive]
2122 Owner -->|Yes| Config[Use nonempty plugin options or read .opencode/automation.json]
2223 Config -->|No project config| Inactive
@@ -49,8 +50,9 @@ flowchart TD
4950 Merge --> Worker
5051 RPC -.-> Keepalive[Each component touches the same empty owner session every ten minutes]
5152 State -.-> Keepalive
52- Keepalive --> PID{Registered service PID matches this process?}
53- PID -->|Yes| Touch[Create or reuse maintenance session, then emit rename event]
53+ Keepalive --> Discover[Discover service through /api/info]
54+ Discover --> PID{server.info PID matches this process?}
55+ PID -->|Yes| Touch[Create or reuse maintenance session, then session.update its title]
5456 PID -->|No| Skip[Skip keepalive]
5557 Stop[Owner reload or shutdown] --> Cleanup[Stop timers, save stopped inventory snapshots, settle writes, dispose RPC, release locks]
5658 Cleanup --> Preserve[Preserve durable queue and healthy worktree execution]
@@ -90,7 +92,9 @@ flowchart TD
9092- Each component renews one empty owner maintenance session at startup and every
9193 ten minutes. Durable session events refresh OpenCode's inactivity timer; listing
9294 plugins does not. No model is prompted. A PID check prevents touching a different
93- service. Requests do not overlap and have a 15-second deadline. Pausing issue
95+ service, using ` server.info ` after discovery through ` /api/info ` in SDK 2.0.6.
96+ The title update uses ` session.update ` . Requests do not overlap and have a
97+ 15-second deadline. Pausing issue
9498 scans does not pause keepalive. Standalone servers without a matching registered
9599 service skip it.
96100- State is schema-validated and saved through a temporary file, file sync, and
@@ -309,13 +313,13 @@ sequenceDiagram
309313 alt Operator closes task
310314 U->>D: Confirm Stop and close task in bot menu
311315 D->>D: Persist closing and reject new checkpoints and prompts
312- D->>S: Interrupt known task sessions and wait for idleness
316+ D->>S: Interrupt known task sessions with resume false and wait for idleness
313317 D->>D: Drain in-flight worker and persist closed
314318 Note over D,G: Preserve work and history, no GitHub closure request
315319 else Operator cancels the round
316320 U->>D: Confirm Cancel current round
317321 D->>D: Persist cancelling and reject new execution checkpoints
318- D->>S: Interrupt saved sessions and wait for idleness
322+ D->>S: Interrupt saved sessions with resume false and wait for idleness
319323 D->>D: Drain worker and question posts, archive round, enter watching
320324 Note over D,G: Keep PR tracking and future feedback, preserve cancelled worktree
321325 else Owner is disposed
@@ -408,7 +412,7 @@ flowchart TD
408412 ID --> Session[Get saved helper or create only on explicit not-found]
409413 Session --> Prompt[Send deterministic attachment prompt, hooks disable all tools]
410414 Prompt --> Wait[Wait with session deadline]
411- Wait -->|Timeout| Interrupt[Attempt helper interruption and return error]
415+ Wait -->|Timeout| Interrupt[Interrupt helper with resume false and return error]
412416 Wait -->|Other failure| Error
413417 Wait -->|Completed| Result{Succeeded outcome and non-error final assistant with finish stop?}
414418 Result -->|No| Error
@@ -724,7 +728,7 @@ flowchart TD
724728 Close[bot menu: Stop and close task] --> Flight{Publication or merge already in flight?}
725729 Flight -->|Yes| RejectClose[Reject closure, wait and try again]
726730 Flight -->|No| SaveClose[Persist closing before interruption]
727- SaveClose --> Interrupt[Interrupt known sessions , missing sessions count as stopped]
731+ SaveClose --> Interrupt[Interrupt with resume false , missing sessions count as stopped]
728732 Interrupt --> Drain[Wait for current worker and pending question posts]
729733 Drain --> Again[Interrupt again to cover in-flight session creation]
730734 Again --> Closed[Persist closed, preserve history and all local work]
@@ -735,7 +739,7 @@ flowchart TD
735739 CancelRound[Cancel current round] --> Publish{Publication or merge in flight?}
736740 Publish -->|Yes| RejectClose
737741 Publish -->|No| SaveCancel[Persist cancelling, block prompts, hooks and checkpoints]
738- SaveCancel --> DrainCancel[Interrupt sessions , drain worker and questions, interrupt again]
742+ SaveCancel --> DrainCancel[Interrupt with resume false , drain worker and questions, interrupt again]
739743 DrainCancel -->|Success| Watch[Archive round, clear live errors, enter watching]
740744 DrainCancel -->|Failure| RetryCancel[Keep cancelling and error, retry after 30 seconds or owner restart]
741745 RetryCancel --> DrainCancel
0 commit comments