fix(cycles): cut madge back-edges in agent and cron types

This commit is contained in:
Vincent Koc
2026-04-12 12:40:25 +01:00
parent bf6116af3f
commit f1b08eea54
6 changed files with 7 additions and 17 deletions

View File

@@ -1,6 +1,6 @@
import { formatCliCommand } from "../../cli/command-format.js";
import { sanitizeForLog } from "../../terminal/ansi.js";
import { normalizeProviderId } from "../model-selection.js";
import { normalizeProviderId } from "../provider-id.js";
export type OAuthRefreshFailureReason =
| "refresh_token_reused"

View File

@@ -1,4 +1,4 @@
import type { FailoverReason } from "./pi-embedded-helpers.js";
import type { FailoverReason } from "./pi-embedded-helpers/types.js";
export type ModelCandidate = {
provider: string;

View File

@@ -1,6 +1,6 @@
import type { StreamFn } from "@mariozechner/pi-agent-core";
import { streamSimple, type AssistantMessageEvent } from "@mariozechner/pi-ai";
import type { PluginTextReplacement, PluginTextTransforms } from "../plugins/types.js";
import type { PluginTextReplacement, PluginTextTransforms } from "../plugins/cli-backend.types.js";
export function mergePluginTextTransforms(
...transforms: Array<PluginTextTransforms | undefined>

View File

@@ -61,7 +61,7 @@ type CommandsStatusRuntimeModule = {
sessionEntry?: SessionEntry;
sessionKey: string;
parentSessionKey?: string;
sessionScope?: "per-sender" | "per-thread" | "shared";
sessionScope?: "global" | "per-sender" | "per-thread" | "shared";
storePath?: string;
statusChannel: string;
provider: string;

View File

@@ -1,3 +1,4 @@
import type { CompactEmbeddedPiSessionDirect } from "../agents/pi-embedded-runner/compact.runtime.types.js";
import { normalizeStructuredPromptSection } from "../agents/prompt-cache-stability.js";
import type { MemoryCitationsMode } from "../config/types.memory.js";
import { buildMemoryPromptSection } from "../plugins/memory-state.js";
@@ -5,18 +6,7 @@ import { importRuntimeModule } from "../shared/runtime-import.js";
import type { ContextEngine, CompactResult, ContextEngineRuntimeContext } from "./types.js";
type CompactRuntimeModule = {
compactEmbeddedPiSessionDirect: (params: Record<string, unknown>) => Promise<{
ok: boolean;
compacted: boolean;
reason?: string;
result?: {
summary?: string;
firstKeptEntryId?: string;
tokensBefore?: number;
tokensAfter?: number;
details?: unknown;
};
}>;
compactEmbeddedPiSessionDirect: CompactEmbeddedPiSessionDirect;
};
const COMPACT_RUNTIME_SPEC = ["../agents/pi-embedded-runner/compact.runtime", ".js"] as const;

View File

@@ -1,4 +1,4 @@
import type { FailoverReason } from "../agents/pi-embedded-helpers.js";
import type { FailoverReason } from "../agents/pi-embedded-helpers/types.js";
import type { ChannelId } from "../channels/plugins/types.public.js";
import type { HookExternalContentSource } from "../security/external-content.js";
import type { CronJobBase } from "./types-shared.js";