Skip to content

Commit f630e8d

Browse files
committed
fix(utils): bypass delivery context wrapper for shared consumers
1 parent e1b2ae2 commit f630e8d

24 files changed

Lines changed: 30 additions & 27 deletions

‎src/agents/acp-spawn-parent-stream.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { scopedHeartbeatWakeOptions } from "../routing/session-key.js";
99
import { normalizeAssistantPhase } from "../shared/chat-message-content.js";
1010
import { normalizeOptionalString } from "../shared/string-coerce.js";
1111
import { recordTaskRunProgressByRunId } from "../tasks/task-executor.js";
12-
import { type DeliveryContext } from "../utils/delivery-context.js";
12+
import type { DeliveryContext } from "../utils/delivery-context.types.js";
1313

1414
const DEFAULT_STREAM_FLUSH_MS = 2_500;
1515
const DEFAULT_NO_OUTPUT_NOTICE_MS = 60_000;

‎src/agents/plugin-tool-delivery-defaults.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { DeliveryContext } from "../utils/delivery-context.js";
1+
import type { DeliveryContext } from "../utils/delivery-context.types.js";
22
import type { AnyAgentTool } from "./tools/common.js";
33

44
export function applyPluginToolDeliveryDefaults(params: {

‎src/agents/subagent-registry-queries.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { DeliveryContext } from "../utils/delivery-context.js";
1+
import type { DeliveryContext } from "../utils/delivery-context.types.js";
22
import type { SubagentRunRecord } from "./subagent-registry.types.js";
33

44
function resolveControllerSessionKey(entry: SubagentRunRecord): string {

‎src/agents/subagent-registry.types.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { DeliveryContext } from "../utils/delivery-context.js";
1+
import type { DeliveryContext } from "../utils/delivery-context.types.js";
22
import type { SubagentRunOutcome } from "./subagent-announce-output.js";
33
import type { SubagentLifecycleEndedReason } from "./subagent-lifecycle-events.js";
44
import type { SpawnSubagentMode } from "./subagent-spawn.types.js";

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export {
1010
} from "../gateway/session-utils.js";
1111
export { getGlobalHookRunner } from "../plugins/hook-runner-global.js";
1212
export { emitSessionLifecycleEvent } from "../sessions/session-lifecycle-events.js";
13-
export { normalizeDeliveryContext } from "../utils/delivery-context.js";
13+
export { normalizeDeliveryContext } from "../utils/delivery-context.shared.js";
1414
export { resolveAgentConfig } from "./agent-scope.js";
1515
export { AGENT_LANE_SUBAGENT } from "./lanes.js";
1616
export { resolveSubagentSpawnModelSelection } from "./model-selection.js";

‎src/agents/subagent-system-prompt.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { DEFAULT_SUBAGENT_MAX_SPAWN_DEPTH } from "../config/agent-limits.js";
2-
import type { DeliveryContext } from "../utils/delivery-context.js";
2+
import type { DeliveryContext } from "../utils/delivery-context.types.js";
33

44
export function buildSubagentSystemPrompt(params: {
55
requesterSessionKey?: string;

‎src/auto-reply/reply/session.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ import {
4242
normalizeOptionalLowercaseString,
4343
normalizeOptionalString,
4444
} from "../../shared/string-coerce.js";
45-
import { normalizeSessionDeliveryFields } from "../../utils/delivery-context.js";
45+
import { normalizeSessionDeliveryFields } from "../../utils/delivery-context.shared.js";
4646
import { isInternalMessageChannel } from "../../utils/message-channel.js";
4747
import { resolveCommandAuthorization } from "../command-auth.js";
4848
import type { MsgContext, TemplateContext } from "../templating.js";

‎src/config/sessions/delivery-info.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { deliveryContextFromSession } from "../../utils/delivery-context.js";
1+
import { deliveryContextFromSession } from "../../utils/delivery-context.shared.js";
22
import { loadConfig } from "../io.js";
33
import { resolveStorePath } from "./paths.js";
44
import { loadSessionStore } from "./store.js";

‎src/config/sessions/store-load.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import fs from "node:fs";
2-
import { normalizeSessionDeliveryFields } from "../../utils/delivery-context.js";
2+
import { normalizeSessionDeliveryFields } from "../../utils/delivery-context.shared.js";
33
import { getFileStatSnapshot } from "../cache-utils.js";
44
import {
55
isSessionStoreCacheEnabled,

‎src/config/sessions/store.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ import {
1313
mergeDeliveryContext,
1414
normalizeDeliveryContext,
1515
normalizeSessionDeliveryFields,
16-
type DeliveryContext,
17-
} from "../../utils/delivery-context.js";
16+
} from "../../utils/delivery-context.shared.js";
17+
import type { DeliveryContext } from "../../utils/delivery-context.types.js";
1818
import { getFileStatSnapshot } from "../cache-utils.js";
1919
import { enforceSessionDiskBudget, type SessionDiskBudgetSweepResult } from "./disk-budget.js";
2020
import { deriveSessionMetaPatch } from "./metadata.js";

0 commit comments

Comments
 (0)