chore: rename plugin ID to 1h-tools
This commit is contained in:
1 parent
2011077fcd
commit
69877803ca
11 files changed
+29
-21
No files matched your search
+2
-2
@@ -24,7 +24,7 @@ OpenClaw 图像生成驱动模块,适配标准 **OpenAI Images API**(`/v1/im
|
||||
支持通过 **Web 控制台(Control UI)** 或直接编辑 `~/.openclaw/openclaw.json`。
|
||||
|
||||
### 方式 1:Web 控制台可视化配置
|
||||
进入 **Settings → Plugins → Tools**:
|
||||
进入 **Settings → Plugins → 1-h Tools**:
|
||||
* **Image Base URL**:填写图像上游端点(例如 `https://Direct-Bifrost.oo1.dev/v1` 或内部反代地址)
|
||||
* **Image API Key**:填写 API Key 或 SecretRef(留空时自动回退读取环境变量 `OPENAI_IMAGE_API_KEY`、`BIFROST_API_KEY`、`CCLOAD_API_KEY` 或 `OPENAI_API_KEY`)
|
||||
* **Default Image Model**:例如 `gpt-image-2`
|
||||
@@ -37,7 +37,7 @@ OpenClaw 图像生成驱动模块,适配标准 **OpenAI Images API**(`/v1/im
|
||||
{
|
||||
"plugins": {
|
||||
"entries": {
|
||||
"tools": {
|
||||
"1h-tools": {
|
||||
"enabled": true,
|
||||
"config": {
|
||||
"image": {
|
||||
|
||||
+3
-1
@@ -64,7 +64,9 @@ export function resolveImageConfig(
|
||||
cfg: ImageGenerationRequest["cfg"] | undefined,
|
||||
apiPluginConfig?: Record<string, unknown>,
|
||||
): ImagePluginConfig | undefined {
|
||||
const toolsConfig = (apiPluginConfig ?? cfg?.plugins?.entries?.["tools"]?.config) as
|
||||
const toolsConfig = (apiPluginConfig ??
|
||||
cfg?.plugins?.entries?.["1h-tools"]?.config ??
|
||||
cfg?.plugins?.entries?.["tools"]?.config) as
|
||||
| {
|
||||
image?: ImagePluginConfig;
|
||||
baseUrl?: string;
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@ import { describe, expect, it, vi } from "vitest";
|
||||
import entry from "./index.js";
|
||||
import { getToolPluginMetadata } from "openclaw/plugin-sdk/tool-plugin";
|
||||
|
||||
describe("tools", () => {
|
||||
describe("1h-tools", () => {
|
||||
it("declares tool metadata", () => {
|
||||
expect(getToolPluginMetadata(entry)?.tools.map((tool) => tool.name)).toEqual(["echo"]);
|
||||
});
|
||||
|
||||
+4
-4
@@ -6,8 +6,8 @@ import { buildOpenAIVideoGenerationProvider } from "./video/index.js";
|
||||
import { buildOpenAIImageGenerationProvider } from "./image/index.js";
|
||||
|
||||
const entry = definePluginEntry({
|
||||
id: "tools",
|
||||
name: "Tools",
|
||||
id: "1h-tools",
|
||||
name: "1-h Tools",
|
||||
description: "Custom Tools and Media Providers for OpenClaw.",
|
||||
register(api) {
|
||||
// 1. Register tools
|
||||
@@ -42,8 +42,8 @@ const entry = definePluginEntry({
|
||||
|
||||
Object.defineProperty(entry, toolPluginMetadataSymbol, {
|
||||
value: {
|
||||
id: "tools",
|
||||
name: "Tools",
|
||||
id: "1h-tools",
|
||||
name: "1-h Tools",
|
||||
description: "Custom Tools and Media Providers for OpenClaw.",
|
||||
tools: [echoTool],
|
||||
},
|
||||
|
||||
+2
-2
@@ -15,7 +15,7 @@ OpenClaw 视频生成驱动模块,适配标准 **OpenAI Videos API**(`/v1/vi
|
||||
支持通过 **Web 控制台(Control UI)** 或直接编辑 `~/.openclaw/openclaw.json`。
|
||||
|
||||
### 方式 1:Web 控制台可视化配置
|
||||
进入 **Settings → Plugins → Tools**:
|
||||
进入 **Settings → Plugins → 1-h Tools**:
|
||||
* **API Base URL**:填写视频上游端点(例如 `http://host.incus.internal:8083/v1` 或内部网关地址)
|
||||
* **API Key**:填写 API Key 或 SecretRef(留空时自动回退读取环境变量 `OPENAI_VIDEO_API_KEY`、`CCLOAD_API_KEY` 或 `BIFROST_API_KEY`)
|
||||
* **默认视频模型**:例如 `gemini-video` 或 `sora-2`
|
||||
@@ -28,7 +28,7 @@ OpenClaw 视频生成驱动模块,适配标准 **OpenAI Videos API**(`/v1/vi
|
||||
{
|
||||
"plugins": {
|
||||
"entries": {
|
||||
"tools": {
|
||||
"1h-tools": {
|
||||
"enabled": true,
|
||||
"config": {
|
||||
"video": {
|
||||
|
||||
+3
-1
@@ -75,7 +75,9 @@ export function resolveVideoConfig(
|
||||
cfg: VideoGenerationRequest["cfg"] | undefined,
|
||||
apiPluginConfig?: Record<string, unknown>,
|
||||
): VideoPluginConfig | undefined {
|
||||
const toolsConfig = (apiPluginConfig ?? cfg?.plugins?.entries?.["tools"]?.config) as
|
||||
const toolsConfig = (apiPluginConfig ??
|
||||
cfg?.plugins?.entries?.["1h-tools"]?.config ??
|
||||
cfg?.plugins?.entries?.["tools"]?.config) as
|
||||
| { video?: VideoPluginConfig; baseUrl?: string; apiKey?: string | SecretRefObject; defaultModel?: string; models?: string[]; allowPrivateNetwork?: boolean }
|
||||
| undefined;
|
||||
|
||||
|
||||
Reference in new issue
Block a user