import { n as signalProcessTree, t as killProcessTree } from "../kill-tree-kSm0C74g.js";
import { i as streamSimple, n as completeSimple } from "../stream-D_qzEOs4.js";
import { i as validateToolCall, r as validateToolArguments } from "../llm-CzDYq74M.js";
import { $ as COMPACTION_SUMMARY_SUFFIX, A as parseCommandArgs, B as estimateTokens, C as AgentHarness, Ct as resolveAgentCoreStreamFn, D as formatPromptTemplateInvocation, E as loadSourcedSkills, F as prepareBranchEntries, G as prepareCompaction, H as findTurnStartIndex, I as DEFAULT_COMPACTION_SETTINGS, J as Session, K as shouldCompact, L as calculateContextTokens, M as collectEntriesForBranchSummary, N as collectEntriesForBranchSummaryFromBranches, O as loadPromptTemplates, P as generateBranchSummary, Q as COMPACTION_SUMMARY_PREFIX, R as compact, S as formatSkillsForSystemPrompt, St as resolveAgentCoreCompleteFn, T as loadSkills, U as generateSummary, V as findCutPoint, W as getLastAssistantUsage, X as BRANCH_SUMMARY_PREFIX, Y as buildSessionContext, Z as BRANCH_SUMMARY_SUFFIX, _ as createTimestamp, _t as Agent$1, a as DEFAULT_MAX_LINES, at as NodeExecutionEnv, b as toSession, bt as runAgentLoop, c as truncateHead, ct as CompactionError, d as InMemorySessionRepo, dt as SessionError, et as bashExecutionToText, f as InMemorySessionStorage, ft as err, g as createSessionId, gt as toError, h as loadJsonlSessionMetadata, ht as ok, i as DEFAULT_MAX_BYTES, it as createCustomMessage, j as substituteArgs, k as loadSourcedPromptTemplates, l as truncateLine, lt as ExecutionError, m as JsonlSessionStorage, mt as getOrUndefined, n as executeShellWithCapture, nt as createBranchSummaryMessage, o as GREP_MAX_LINE_LENGTH, ot as AgentHarnessError, p as JsonlSessionRepo, pt as getOrThrow, q as serializeConversation, r as sanitizeBinaryOutput, rt as createCompactionSummaryMessage, s as formatSize, st as BranchSummaryError, t as streamProxy, tt as convertToLlm, u as truncateTail, ut as FileError, v as getEntriesToFork, vt as agentLoop, w as formatSkillInvocation, x as uuidv7, xt as runAgentLoopContinue, y as getFileSystemResultOrThrow, yt as agentLoopContinue, z as estimateContextTokens } from "../proxy-BrzL_Db3.js";
//#region src/plugin-sdk/agent-core.ts
const openClawAgentCoreRuntime = {
	completeSimple,
	streamSimple
};
var Agent = class extends Agent$1 {
	constructor(options = {}) {
		super({
			runtime: openClawAgentCoreRuntime,
			...options
		});
	}
};
//#endregion
export { Agent, AgentHarness, AgentHarnessError, BRANCH_SUMMARY_PREFIX, BRANCH_SUMMARY_SUFFIX, BranchSummaryError, COMPACTION_SUMMARY_PREFIX, COMPACTION_SUMMARY_SUFFIX, CompactionError, DEFAULT_COMPACTION_SETTINGS, DEFAULT_MAX_BYTES, DEFAULT_MAX_LINES, ExecutionError, FileError, GREP_MAX_LINE_LENGTH, InMemorySessionRepo, InMemorySessionStorage, JsonlSessionRepo, JsonlSessionStorage, NodeExecutionEnv, Session, SessionError, agentLoop, agentLoopContinue, bashExecutionToText, buildSessionContext, calculateContextTokens, collectEntriesForBranchSummary, collectEntriesForBranchSummaryFromBranches, compact, convertToLlm, createBranchSummaryMessage, createCompactionSummaryMessage, createCustomMessage, createSessionId, createTimestamp, err, estimateContextTokens, estimateTokens, executeShellWithCapture, findCutPoint, findTurnStartIndex, formatPromptTemplateInvocation, formatSize, formatSkillInvocation, formatSkillsForSystemPrompt, generateBranchSummary, generateSummary, getEntriesToFork, getFileSystemResultOrThrow, getLastAssistantUsage, getOrThrow, getOrUndefined, killProcessTree, loadJsonlSessionMetadata, loadPromptTemplates, loadSkills, loadSourcedPromptTemplates, loadSourcedSkills, ok, openClawAgentCoreRuntime, parseCommandArgs, prepareBranchEntries, prepareCompaction, resolveAgentCoreCompleteFn, resolveAgentCoreStreamFn, runAgentLoop, runAgentLoopContinue, sanitizeBinaryOutput, serializeConversation, shouldCompact, signalProcessTree, streamProxy, substituteArgs, toError, toSession, truncateHead, truncateLine, truncateTail, uuidv7, validateToolArguments, validateToolCall };
