refactor: trim subagent helper type exports

This commit is contained in:
Peter Steinberger
2026-05-02 01:05:29 +01:00
parent bcd0583991
commit df32527298
7 changed files with 9 additions and 14 deletions

View File

@@ -47,14 +47,14 @@ export type SubagentListItem = {
endedAt?: number;
};
export type BuiltSubagentList = {
type BuiltSubagentList = {
total: number;
active: SubagentListItem[];
recent: SubagentListItem[];
text: string;
};
export type SessionEntryResolution = {
type SessionEntryResolution = {
storePath: string;
entry: SessionEntry | undefined;
};

View File

@@ -3,7 +3,7 @@ import type { SessionEntry } from "../config/sessions.js";
const SUBAGENT_RECOVERY_MAX_AUTOMATIC_ATTEMPTS = 2;
const SUBAGENT_RECOVERY_REWEDGE_WINDOW_MS = 2 * 60_000;
export type SubagentRecoveryGate =
type SubagentRecoveryGate =
| {
allowed: true;
nextAttempt: number;

View File

@@ -4,7 +4,7 @@ import {
} from "./subagent-lifecycle-events.js";
import type { SubagentRunRecord } from "./subagent-registry.types.js";
export type DeferredCleanupDecision =
type DeferredCleanupDecision =
| {
kind: "defer-descendants";
delayMs: number;

View File

@@ -36,10 +36,7 @@ export const ANNOUNCE_COMPLETION_HARD_EXPIRY_MS = 30 * 60_000;
const FROZEN_RESULT_TEXT_MAX_BYTES = 100 * 1024;
export type SubagentRunOrphanReason =
| "missing-session-entry"
| "missing-session-id"
| "stale-unended-run";
type SubagentRunOrphanReason = "missing-session-entry" | "missing-session-id" | "stale-unended-run";
export function capFrozenResultText(resultText: string): string {
const trimmed = resultText.trim();

View File

@@ -1,6 +1,6 @@
import type { SubagentRunRecord } from "./subagent-registry.types.js";
export type ReplaceSubagentRunAfterSteerParams = {
type ReplaceSubagentRunAfterSteerParams = {
previousRunId: string;
nextRunId: string;
fallback?: SubagentRunRecord;

View File

@@ -1,8 +1,6 @@
import { normalizeAgentId } from "../routing/session-key.js";
export type SubagentTargetPolicyResult =
| { ok: true }
| { ok: false; allowedText: string; error: string };
type SubagentTargetPolicyResult = { ok: true } | { ok: false; allowedText: string; error: string };
function normalizeAllowAgents(allowAgents: readonly string[] | undefined): {
configured: boolean;

View File

@@ -11,7 +11,7 @@ import {
type ResolvedTimeFormat,
} from "./date-time.js";
export type RuntimeInfoInput = {
type RuntimeInfoInput = {
agentId?: string;
host: string;
os: string;
@@ -28,7 +28,7 @@ export type RuntimeInfoInput = {
canvasRootDir?: string;
};
export type SystemPromptRuntimeParams = {
type SystemPromptRuntimeParams = {
runtimeInfo: RuntimeInfoInput;
userTimezone: string;
userTime?: string;