mirror of
https://github.com/openclaw/openclaw.git
synced 2026-03-19 22:10:51 +00:00
Plugins: remove public extension-api surface (#48462)
* Plugins: remove public extension-api surface * Plugins: fix loader setup routing follow-ups * CI: ignore non-extension helper dirs in extension-fast * Docs: note extension-api removal as breaking
This commit is contained in:
36
src/plugins/runtime/runtime-agent.ts
Normal file
36
src/plugins/runtime/runtime-agent.ts
Normal file
@@ -0,0 +1,36 @@
|
||||
import { resolveAgentDir, resolveAgentWorkspaceDir } from "../../agents/agent-scope.js";
|
||||
import { DEFAULT_MODEL, DEFAULT_PROVIDER } from "../../agents/defaults.js";
|
||||
import { resolveAgentIdentity } from "../../agents/identity.js";
|
||||
import { resolveThinkingDefault } from "../../agents/model-selection.js";
|
||||
import { runEmbeddedPiAgent } from "../../agents/pi-embedded.js";
|
||||
import { resolveAgentTimeoutMs } from "../../agents/timeout.js";
|
||||
import { ensureAgentWorkspace } from "../../agents/workspace.js";
|
||||
import {
|
||||
loadSessionStore,
|
||||
resolveSessionFilePath,
|
||||
resolveStorePath,
|
||||
saveSessionStore,
|
||||
} from "../../config/sessions.js";
|
||||
import type { PluginRuntime } from "./types.js";
|
||||
|
||||
export function createRuntimeAgent(): PluginRuntime["agent"] {
|
||||
return {
|
||||
defaults: {
|
||||
model: DEFAULT_MODEL,
|
||||
provider: DEFAULT_PROVIDER,
|
||||
},
|
||||
resolveAgentDir,
|
||||
resolveAgentWorkspaceDir,
|
||||
resolveAgentIdentity,
|
||||
resolveThinkingDefault,
|
||||
runEmbeddedPiAgent,
|
||||
resolveAgentTimeoutMs,
|
||||
ensureAgentWorkspace,
|
||||
session: {
|
||||
resolveStorePath,
|
||||
loadSessionStore,
|
||||
saveSessionStore,
|
||||
resolveSessionFilePath,
|
||||
},
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user