tickflow-assist 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +0 -13
- package/dist/plugin.d.ts +1 -7
- package/dist/runtime/plugin-api.d.ts +18 -3
- package/dist/runtime/plugin-api.js +9 -2
- package/openclaw.plugin.json +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -65,20 +65,7 @@ openclaw plugins enable tickflow-assist
|
|
|
65
65
|
openclaw gateway restart
|
|
66
66
|
```
|
|
67
67
|
|
|
68
|
-
### 社区安装(npm / 社区插件)
|
|
69
68
|
|
|
70
|
-
发布到 npm 后,社区安装不需要源码目录,也不需要 `setup-tickflow.sh`:
|
|
71
|
-
|
|
72
|
-
```bash
|
|
73
|
-
openclaw plugins install tickflow-assist
|
|
74
|
-
npx -y tickflow-assist configure-openclaw
|
|
75
|
-
```
|
|
76
|
-
|
|
77
|
-
第二条命令会自动写入 `plugins.entries["tickflow-assist"].config`、补 `tools.allow += ["tickflow-assist"]`,并默认执行 `openclaw plugins enable`、`openclaw config validate` 与 `openclaw gateway restart`。如需保留手动控制,可追加 `--no-enable` 或 `--no-restart`。
|
|
78
|
-
|
|
79
|
-
正式插件运行读取 `~/.openclaw/openclaw.json` 中的 `plugins.entries["tickflow-assist"].config`。本地调试与 CLI 读取项目根目录 `local.config.json` 下的 `plugin` 字段,两套配置互不共享。
|
|
80
|
-
|
|
81
|
-
从 `0.2.0` 起,`add_stock`、`remove_stock`、`start_monitor`、`stop_monitor`、`start_daily_update`、`stop_daily_update`、`update_all`、`test_alert` 以及自选资料刷新工具按 OpenClaw 官方建议注册为 optional agent tools。若你给 Agent 显式配置了 `tools.allow`,请把插件 id `tickflow-assist` 或这些工具名加入允许列表;Slash Command 不受影响。
|
|
82
69
|
|
|
83
70
|
## 🚀 使用方式
|
|
84
71
|
|
package/dist/plugin.d.ts
CHANGED
|
@@ -1,8 +1,2 @@
|
|
|
1
|
-
declare const _default:
|
|
2
|
-
id: string;
|
|
3
|
-
name: string;
|
|
4
|
-
description: string;
|
|
5
|
-
configSchema: import("openclaw/plugin-sdk").OpenClawPluginConfigSchema;
|
|
6
|
-
register: NonNullable<import("openclaw/plugin-sdk/core").OpenClawPluginDefinition["register"]>;
|
|
7
|
-
} & Pick<import("openclaw/plugin-sdk/core").OpenClawPluginDefinition, "kind">;
|
|
1
|
+
declare const _default: import("./runtime/plugin-api.js").PluginEntryResult;
|
|
8
2
|
export default _default;
|
|
@@ -1,7 +1,21 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import type { AnyAgentTool, OpenClawConfig, OpenClawPluginApi, OpenClawPluginCommandDefinition, OpenClawPluginService, OpenClawPluginServiceContext, PluginCommandContext, PluginLogger } from "openclaw/plugin-sdk/plugin-entry";
|
|
1
|
+
import type { AnyAgentTool, OpenClawConfig, OpenClawPluginApi, OpenClawPluginCommandDefinition, OpenClawPluginDefinition, OpenClawPluginService, OpenClawPluginServiceContext, PluginCommandContext, PluginLogger } from "openclaw/plugin-sdk/plugin-entry";
|
|
3
2
|
import type { PluginRuntime } from "openclaw/plugin-sdk/runtime-store";
|
|
4
|
-
|
|
3
|
+
interface DefinePluginEntryOptions {
|
|
4
|
+
id: string;
|
|
5
|
+
name: string;
|
|
6
|
+
description: string;
|
|
7
|
+
kind?: OpenClawPluginDefinition["kind"];
|
|
8
|
+
configSchema?: unknown;
|
|
9
|
+
register: (api: OpenClawPluginApi) => void;
|
|
10
|
+
}
|
|
11
|
+
export interface PluginEntryResult {
|
|
12
|
+
id: string;
|
|
13
|
+
name: string;
|
|
14
|
+
description: string;
|
|
15
|
+
kind?: string;
|
|
16
|
+
register: (api: OpenClawPluginApi) => void;
|
|
17
|
+
}
|
|
18
|
+
export declare function definePluginEntry({ id, name, description, kind, register, }: DefinePluginEntryOptions): PluginEntryResult;
|
|
5
19
|
export interface ToolContext {
|
|
6
20
|
rawInput?: unknown;
|
|
7
21
|
}
|
|
@@ -20,3 +34,4 @@ export type CommandContext = PluginCommandContext;
|
|
|
20
34
|
export type OpenClawPluginConfig = OpenClawConfig;
|
|
21
35
|
export type OpenClawPluginRuntime = PluginRuntime;
|
|
22
36
|
export type OpenClawPluginLogger = PluginLogger;
|
|
37
|
+
export {};
|
|
@@ -1,2 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
export function definePluginEntry({ id, name, description, kind, register, }) {
|
|
2
|
+
return {
|
|
3
|
+
id,
|
|
4
|
+
name,
|
|
5
|
+
description,
|
|
6
|
+
...(kind ? { kind } : {}),
|
|
7
|
+
register,
|
|
8
|
+
};
|
|
9
|
+
}
|
package/openclaw.plugin.json
CHANGED