Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions extensions/subagents/src/backend.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,13 @@ import type {
SubagentMeta,
} from "./domain.ts";

export interface SubagentCleanupReceipt {
/** True when the session/worktree state could not be proven quiescent. */
readonly uncertain: boolean;
/** Bounded operator-facing explanation of the cleanup result. */
readonly message: string;
}

/**
* A live subagent session. The manager is the single consumer of `events`;
* it folds them into the `SubagentSnapshot` everything else reads.
Expand All @@ -44,6 +51,8 @@ export interface SubagentSession {
readonly interrupt: Effect.Effect<void>;
/** Ephemeral Pi-native tool projection for the operator-facing child page. */
readonly toolRenderer?: AgentToolRenderer;
/** Cleanup receipt populated when scope teardown cannot prove safety. */
readonly cleanupReceipt?: () => SubagentCleanupReceipt | undefined;
}

export interface SubagentBackend {
Expand Down
Loading
Loading