Skip to content

Commit e91f79a

Browse files
committed
refactor(agents): reuse subagent attachment result type
1 parent 2a38159 commit e91f79a

2 files changed

Lines changed: 3 additions & 13 deletions

File tree

‎src/agents/subagents/spawn/subagent-attachments.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ type AttachmentLimits = {
6161
retainOnSessionKeep: boolean;
6262
};
6363

64-
export type SubagentAttachmentReceiptFile = {
64+
type SubagentAttachmentReceiptFile = {
6565
name: string;
6666
bytes: number;
6767
sha256: string;

‎src/agents/subagents/spawn/subagent-spawn.ts‎

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,7 @@ import {
3333
} from "../registry/subagent-registry.js";
3434
import { activateSwarmRun, removeQueuedSwarmRun } from "../swarm/swarm-scheduler.js";
3535
import { readParentExecutionIdentity } from "./execution-identity-spawn-context.js";
36-
import {
37-
materializeSubagentAttachments,
38-
type SubagentAttachmentReceiptFile,
39-
} from "./subagent-attachments.js";
36+
import { materializeSubagentAttachments } from "./subagent-attachments.js";
4037
import { resolveSubagentSpawnAcceptedNote } from "./subagent-spawn-accepted-note.js";
4138
import { resolveSubagentChildPlan } from "./subagent-spawn-child-plan.js";
4239
import {
@@ -307,14 +304,7 @@ export async function spawnSubagentDirect(
307304
}
308305

309306
let retainOnSessionKeep = false;
310-
let attachmentsReceipt:
311-
| {
312-
count: number;
313-
totalBytes: number;
314-
files: SubagentAttachmentReceiptFile[];
315-
relDir: string;
316-
}
317-
| undefined;
307+
let attachmentsReceipt: SpawnSubagentResult["attachments"];
318308
let attachmentAbsDir: string | undefined;
319309
let attachmentRootDir: string | undefined;
320310

0 commit comments

Comments
 (0)