Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@

## [Unreleased]

### 新增

- 工具设置:单工具 `PATCH /agents/{id}/tool-settings/{name}`;插件工具开关热更新(不再 reload);列表标注能力未挂载工具;harness `tools_disabled`(需 orcakit-harness-agent >=0.9.25)

## [0.9.26] - 2026-08-23

### 新增
Expand Down
80 changes: 80 additions & 0 deletions dashboard/src/api/modules/agentTools.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
import { request } from "../request";

export type ToolSettingsSource = "builtin" | "plugin";

export interface ToolSettingsItem {
name: string;
source: ToolSettingsSource;
category: string;
label: string;
description?: string | null;
enabled: boolean;
disableable: boolean;
available?: boolean;
plugin_id?: string | null;
}

export interface ToolSettingsResponse {
tools: ToolSettingsItem[];
}

export type AgentPluginsConfig = Record<
string,
{
tools?: Record<
string,
{
enabled?: boolean;
config?: Record<string, unknown>;
}
>;
}
>;

export interface ToolSettingsPutBody {
disabled_builtin: string[];
plugins?: AgentPluginsConfig;
}

export interface ToolSettingPatchBody {
enabled: boolean;
source: ToolSettingsSource;
plugin_id?: string | null;
}

export const agentToolsApi = {
get(agentId: string): Promise<ToolSettingsResponse> {
return request<ToolSettingsResponse>(
`/agents/${encodeURIComponent(agentId)}/tool-settings`,
);
},

put(
agentId: string,
body: ToolSettingsPutBody,
): Promise<ToolSettingsResponse> {
return request<ToolSettingsResponse>(
`/agents/${encodeURIComponent(agentId)}/tool-settings`,
{
method: "PUT",
body: JSON.stringify(body),
},
);
},

patch(
agentId: string,
toolName: string,
body: ToolSettingPatchBody,
): Promise<ToolSettingsResponse> {
return request<ToolSettingsResponse>(
`/agents/${encodeURIComponent(
agentId,
)}/tool-settings/${encodeURIComponent(toolName)}`,
{
method: "PATCH",
body: JSON.stringify(body),
},
);
},
};
20 changes: 20 additions & 0 deletions dashboard/src/api/modules/plugins.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,15 @@ export interface InstalledPlugin {
name?: string;
kind?: string;
description?: string;
/** Emoji text or absolute image URL from plugin.yaml. */
icon?: string | null;
requires?: string[];
path?: string;
loaded?: boolean;
/** Global enable switch from config.json (default true). */
enabled?: boolean;
error?: string;
ui?: { entry: string; manifest: string } | null;
tools?: {
name: string;
description?: string;
Expand Down Expand Up @@ -77,6 +83,20 @@ export const pluginsApi = {
});
},

setEnabled(pluginId: string, enabled: boolean): Promise<InstalledPlugin> {
return request(`/plugins/${encodeURIComponent(pluginId)}`, {
method: "PATCH",
body: JSON.stringify({ enabled }),
});
},

reload(): Promise<{
status: string;
loaded: { id: string; version: string; kind: string }[];
}> {
return request("/plugins/reload", { method: "POST" });
},

listAgentTools(agentId: string): Promise<{ tools: AgentPluginTool[] }> {
return request(`/plugins/agents/${encodeURIComponent(agentId)}/tools`);
},
Expand Down
93 changes: 82 additions & 11 deletions dashboard/src/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -902,6 +902,7 @@
"manageSubagents": "Manage subagents",
"subagentsBtn": "Subagents",
"skillsBtn": "Skills",
"toolsBtn": "Tools",
"channelsBtn": "Channels",
"memoryBtn": "Memory"
},
Expand Down Expand Up @@ -1195,7 +1196,36 @@
"mobile_ui_dump": "Mobile UI dump",
"mobile_handoff_to_user": "Hand off to user (mobile)",
"read_env_file": "Read env file",
"write_env_file": "Write env file"
"write_env_file": "Write env file",
"generate_image": "Generate image",
"generate_video": "Generate video"
},
"toolSettings": {
"title": "Tool settings",
"hint": "Turn off tools you do not want the model to call. Required system tools cannot be disabled. Plugin tools need the plugin enabled globally; you can also toggle them per agent under Plugins.",
"empty": "No tools available",
"loadFailed": "Failed to load tool settings",
"saveSuccess": "Tool settings saved",
"saveFailed": "Failed to save tool settings",
"criticalHint": "Required for the agent to function",
"sourceBuiltin": "Built-in",
"sourcePlugin": "Plugin",
"requiredBadge": "Required",
"unavailable": "Not loaded",
"unavailableHint": "This plugin is not enabled globally. Enable it under Plugins first.",
"categories": {
"filesystem": "Files & shell",
"orchestration": "Planning & sub-agents",
"web": "Web & browser",
"media": "Media generation",
"memory": "Memory",
"cron": "Cron jobs",
"knowledge": "Knowledge base",
"mobile": "Mobile",
"teams": "Multi-agent",
"misc": "Other",
"plugin": "Plugin tools"
}
},
"chatUsage": {
"latestRun": "Latest run",
Expand Down Expand Up @@ -3074,9 +3104,10 @@
},
"personalization": {
"title": "Personalization",
"description": "Configure this agent's skills, subagents, channels, personality, and memory.",
"description": "Configure this agent's skills, tools, subagents, channels, personality, and memory.",
"tabs": {
"skills": "Skills",
"tools": "Tools",
"subagents": "Subagents",
"channels": "Channels",
"mbti": "MBTI",
Expand Down Expand Up @@ -4339,29 +4370,65 @@
"uninstallFailed": "Uninstall failed",
"uninstallConfirm": "Uninstall plugin {{id}}?",
"empty": "No plugins installed",
"adminHint": "Plugins are stored under ~/.octop/plugins/ on the server. After installing a tool plugin, open Tool management, pick an agent in the sidebar, and enable its tools.",
"adminHint": "Plugins live under ~/.octop/plugins/ on the server. Use the enable switch to load or unload a plugin. Open Details to enable tools for the agent selected in the sidebar.",
"guideTitle": "How to build and import a plugin",
"guideDevelopTitle": "1. Develop",
"guideDevelopBody": "Create a folder with plugin.yaml and an entry Python file (for example main.py). plugin.yaml needs id, version, name, kind (tool / skill / hook), and entry. In setup(ctx): tool → ctx.tool(...); skill → ctx.skills(\"skills\"); hook → ctx.middleware(...). See the repo plugins/ demos for each kind.",
"guidePackageTitle": "2. Package",
"guidePackageBody": "Zip the plugin so the archive contains exactly one plugin root with plugin.yaml inside it (either at the zip root or in a single top-level folder). Example: zip -r my-plugin.zip my-plugin/",
"guideImportTitle": "3. Import",
"guideImportBody": "Host the .zip where Octop can download it over HTTP(S). Prefer a raw file URL. After install, switch to Tool management, select an agent, enable tools, and configure API keys if needed. Local demos: octop plugin install ./plugins/demo-toolkit --force",
"guideImportBody": "Host the .zip where Octop can download it over HTTP(S). Prefer a raw file URL. After install, open Details on the plugin card, select an agent in the sidebar, and enable tools. Local demos: octop plugin install ./plugins/demo-toolkit --force",
"guideExampleTitle": "Minimal plugin.yaml",
"guideExampleYaml": "id: my-plugin\nversion: 1.0.0\nname: My Plugin\ndescription: Example tool plugin\nkind: tool\nentry: main.py",
"agentHint": "Enable plugin tools so the agent can call them in chat. Configure API keys first when required.",
"guideExampleYaml": "id: my-plugin\nversion: 1.0.0\nname: My Plugin\ndescription: Example tool plugin\nicon: \"🧩\"\nkind: tool\nentry: main.py",
"agentHint": "Once a plugin is enabled, its tools are available to all agents by default. You can turn individual tools off per agent. Configure API keys first when required. New chats pick up the latest tool list.",
"noAgent": "Select an agent in the sidebar first",
"noTools": "No plugin tools available. Ask an admin to install tool plugins in Tool management.",
"noTools": "No plugin tools available. Ask an admin to install tool plugins.",
"enablePluginFirst": "Enable this plugin first. Tools are on by default; you can still turn them off per agent.",
"detailToolsHint": "On by default. Turning a tool off applies only to the agent selected in the sidebar (same config as Experts → Tools). Takes effect on the next turn — no restart needed.",
"configure": "Configure",
"colName": "Name",
"colId": "ID",
"colVersion": "Version",
"colKind": "Kind",
"colStatus": "Status",
"colTools": "Tools",
"colActions": "Actions",
"colIcon": "Icon",
"colPath": "Path",
"colUi": "UI",
"colRequires": "Requires",
"colPluginId": "Plugin ID",
"viewDetails": "Details",
"detailTitle": "Plugin details",
"detailInfo": "Information",
"detailEnableHint": "When enabled, the plugin loads on the server and its tools are available to agents by default.",
"toolDetailTitle": "Tool details",
"statusLoaded": "Loaded",
"statusIdle": "Idle",
"statusIdle": "Not loaded",
"statusError": "Error",
"tabInstalled": "Installed",
"tabAgentTools": "Tool management"
"statusDisabled": "Disabled",
"reload": "Reload",
"reloadSuccess": "Plugins reloaded",
"reloadFailed": "Reload failed",
"tabInstalled": "Installed plugins",
"tabAgentTools": "Tool management",
"tabMarket": "Plugin marketplace",
"marketTitle": "Coming soon",
"marketHint": "The plugin marketplace is under construction. Check back later for curated plugins you can install in one click.",
"colEnabled": "Enabled",
"colTool": "Tool",
"colDescription": "Description",
"viewCard": "Cards",
"viewTable": "Table",
"totalPlugins": "{{count}} plugins",
"totalTools": "{{count}} tools",
"enabledSuccess": "Plugin enabled",
"disabledSuccess": "Plugin disabled",
"enableFailed": "Failed to update plugin",
"noDescription": "No description",
"noToolsListed": "No tools loaded",
"hasUi": "Chat UI",
"hasConfig": "Configurable"
},
"slash": {
"fallback": {
Expand Down Expand Up @@ -4412,6 +4479,10 @@
"title": "Skills",
"subtitle": "Manage installed skills, or install new ones from the skill market"
},
"tools": {
"title": "Tools",
"subtitle": "Enable or disable built-in and plugin tools for this agent"
},
"tokenUsage": {
"title": "Token Usage",
"subtitle": "Account token overview and multi-dimensional analytics"
Expand Down Expand Up @@ -4474,7 +4545,7 @@
},
"adminPlugins": {
"title": "Plugin Management",
"subtitle": "Install plugins and enable or configure tools per agent"
"subtitle": "Install and manage server plugins; enable tools for an agent in the details drawer"
},
"adminUpdates": {
"title": "Updates",
Expand Down
Loading
Loading