Class ToolsConfigLoader
java.lang.Object
io.agentscope.harness.agent.tools.ToolsConfigLoader
Loads
workspace/tools.json into a ToolsConfig.
Reads through WorkspaceManager.readManagedWorkspaceFileUtf8(io.agentscope.core.agent.RuntimeContext, java.lang.String) so that the
filesystem-overlay (sandbox / remote) path is honoured exactly like AGENTS.md. Performs
${ENV_VAR} substitution against System.getenv(java.lang.String) on the raw JSON text before
parsing so that secrets in headers, env entries, urls, etc. are kept out of the file. Parse
failures never throw — they log and return Optional.empty() so the agent still builds
with its default toolkit.
-
Method Summary
Modifier and TypeMethodDescriptionstatic Optional<ToolsConfig>load(WorkspaceManager wsManager) Readstools.jsonrelative to the workspace managed bywsManager.
-
Method Details
-
load
Readstools.jsonrelative to the workspace managed bywsManager. ReturnsOptional.empty()when the file is missing, blank, unreadable (e.g. sandbox filesystem accessed before its call context exists), or unparseable.
-