ocsmarttools 0.1.6 → 0.1.8
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/CHANGELOG.md +16 -0
- package/README.md +8 -4
- package/package.json +1 -1
- package/src/commands/cli.ts +5 -5
- package/src/lib/tool-catalog.ts +37 -4
- package/src/tools/tool-search.ts +2 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,22 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to `ocsmarttools` are documented here.
|
|
4
4
|
|
|
5
|
+
## [0.1.8] - 2026-02-22
|
|
6
|
+
|
|
7
|
+
### Changed
|
|
8
|
+
- Improved `tool_search` fallback discovery for skill-driven workflows by adding relevance keywords for browser/playwright/stealth-style usage.
|
|
9
|
+
- Added explicit skill-compatibility note in search results and README.
|
|
10
|
+
|
|
11
|
+
## [0.1.7] - 2026-02-22
|
|
12
|
+
|
|
13
|
+
### Fixed
|
|
14
|
+
- CLI command compatibility on older OpenClaw builds by avoiding nested CLI subcommands that could collide.
|
|
15
|
+
- Replaced nested CLI forms with stable commands:
|
|
16
|
+
- `stats-reset`
|
|
17
|
+
- `config-keys`
|
|
18
|
+
- `config-set`
|
|
19
|
+
- `config-reset`
|
|
20
|
+
|
|
5
21
|
## [0.1.6] - 2026-02-22
|
|
6
22
|
|
|
7
23
|
### Changed
|
package/README.md
CHANGED
|
@@ -11,6 +11,10 @@ Provider-agnostic tool orchestration for lower latency and lower token cost.
|
|
|
11
11
|
- `tool_batch`: runs bounded multi-step workflows (`call` + `foreach`)
|
|
12
12
|
- `tool_result_get`: retrieves large stored outputs by handle
|
|
13
13
|
|
|
14
|
+
Skills compatibility:
|
|
15
|
+
- Works with OpenClaw skills because skills are instructions layered on top of tools.
|
|
16
|
+
- For blocked websites, skill workflows that use `browser`/Playwright-style flows are compatible with `tool_dispatch` and `tool_batch`.
|
|
17
|
+
|
|
14
18
|
## Why It Helps
|
|
15
19
|
|
|
16
20
|
```mermaid
|
|
@@ -93,13 +97,13 @@ Model note:
|
|
|
93
97
|
| `openclaw ocsmarttools strict <on\|off>` | Turns strict routing on/off |
|
|
94
98
|
| `openclaw ocsmarttools sync` | Rewrites the managed routing block in `AGENTS.md` |
|
|
95
99
|
| `openclaw ocsmarttools stats` | Shows calls, errors, timeouts, latency, and estimated savings |
|
|
96
|
-
| `openclaw ocsmarttools stats
|
|
100
|
+
| `openclaw ocsmarttools stats-reset` | Resets plugin stats |
|
|
97
101
|
| `openclaw ocsmarttools setup [safe\|standard]` | Applies recommended defaults |
|
|
98
102
|
| `openclaw ocsmarttools mode <safe\|standard>` | Changes mode only |
|
|
99
103
|
| `openclaw ocsmarttools config` | Shows plugin config |
|
|
100
|
-
| `openclaw ocsmarttools config
|
|
101
|
-
| `openclaw ocsmarttools config
|
|
102
|
-
| `openclaw ocsmarttools config
|
|
104
|
+
| `openclaw ocsmarttools config-keys` | Lists editable config keys |
|
|
105
|
+
| `openclaw ocsmarttools config-set <key> <value>` | Changes one config value |
|
|
106
|
+
| `openclaw ocsmarttools config-reset [key]` | Resets one key or all keys |
|
|
103
107
|
| `openclaw ocsmarttools version` | Shows installed plugin version |
|
|
104
108
|
|
|
105
109
|
## Common Config Actions
|
package/package.json
CHANGED
package/src/commands/cli.ts
CHANGED
|
@@ -59,8 +59,8 @@ export function registerCliCommands(api: OpenClawPluginApi, metrics: MetricsStor
|
|
|
59
59
|
// eslint-disable-next-line no-console
|
|
60
60
|
console.log(renderStats(metrics));
|
|
61
61
|
});
|
|
62
|
-
|
|
63
|
-
.command("reset")
|
|
62
|
+
adv
|
|
63
|
+
.command("stats-reset")
|
|
64
64
|
.description("Reset usage/savings metrics window")
|
|
65
65
|
.action(() => {
|
|
66
66
|
// eslint-disable-next-line no-console
|
|
@@ -126,7 +126,7 @@ export function registerCliCommands(api: OpenClawPluginApi, metrics: MetricsStor
|
|
|
126
126
|
});
|
|
127
127
|
|
|
128
128
|
adv
|
|
129
|
-
.command("config
|
|
129
|
+
.command("config-keys")
|
|
130
130
|
.description("List editable plugin config keys")
|
|
131
131
|
.action(() => {
|
|
132
132
|
// eslint-disable-next-line no-console
|
|
@@ -134,7 +134,7 @@ export function registerCliCommands(api: OpenClawPluginApi, metrics: MetricsStor
|
|
|
134
134
|
});
|
|
135
135
|
|
|
136
136
|
adv
|
|
137
|
-
.command("config
|
|
137
|
+
.command("config-set <key> <value>")
|
|
138
138
|
.description("Set one plugin config key")
|
|
139
139
|
.action(async (key: string, value: string) => {
|
|
140
140
|
const text = await setConfigKey(api, key, value);
|
|
@@ -143,7 +143,7 @@ export function registerCliCommands(api: OpenClawPluginApi, metrics: MetricsStor
|
|
|
143
143
|
});
|
|
144
144
|
|
|
145
145
|
adv
|
|
146
|
-
.command("config
|
|
146
|
+
.command("config-reset [key]")
|
|
147
147
|
.description("Reset all plugin config to defaults or reset one key")
|
|
148
148
|
.action(async (key?: string) => {
|
|
149
149
|
const text = await resetConfig(api, key);
|
package/src/lib/tool-catalog.ts
CHANGED
|
@@ -5,11 +5,19 @@ export type ToolEntry = {
|
|
|
5
5
|
group: string;
|
|
6
6
|
description: string;
|
|
7
7
|
paramsHint?: string;
|
|
8
|
+
keywords?: string[];
|
|
8
9
|
source: "builtin" | "policy" | "live";
|
|
9
10
|
};
|
|
10
11
|
|
|
11
12
|
const BUILTIN: ToolEntry[] = [
|
|
12
|
-
{
|
|
13
|
+
{
|
|
14
|
+
name: "exec",
|
|
15
|
+
group: "runtime",
|
|
16
|
+
description: "Run shell commands.",
|
|
17
|
+
paramsHint: "{ command }",
|
|
18
|
+
keywords: ["script", "python", "node", "playwright", "stealth", "scrape"],
|
|
19
|
+
source: "builtin",
|
|
20
|
+
},
|
|
13
21
|
{ name: "bash", group: "runtime", description: "Alias for exec in many contexts.", paramsHint: "{ command }", source: "builtin" },
|
|
14
22
|
{ name: "process", group: "runtime", description: "Manage background command sessions.", paramsHint: "{ action, sessionId? }", source: "builtin" },
|
|
15
23
|
{ name: "read", group: "fs", description: "Read files.", paramsHint: "{ path }", source: "builtin" },
|
|
@@ -23,9 +31,30 @@ const BUILTIN: ToolEntry[] = [
|
|
|
23
31
|
{ name: "session_status", group: "sessions", description: "Show current session status.", paramsHint: "{}", source: "builtin" },
|
|
24
32
|
{ name: "memory_search", group: "memory", description: "Search memory snippets.", paramsHint: "{ query }", source: "builtin" },
|
|
25
33
|
{ name: "memory_get", group: "memory", description: "Read memory entries.", paramsHint: "{ key }", source: "builtin" },
|
|
26
|
-
{
|
|
27
|
-
|
|
28
|
-
|
|
34
|
+
{
|
|
35
|
+
name: "web_search",
|
|
36
|
+
group: "web",
|
|
37
|
+
description: "Search the web.",
|
|
38
|
+
paramsHint: "{ query }",
|
|
39
|
+
keywords: ["research", "discover", "find"],
|
|
40
|
+
source: "builtin",
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
name: "web_fetch",
|
|
44
|
+
group: "web",
|
|
45
|
+
description: "Fetch and extract web page content.",
|
|
46
|
+
paramsHint: "{ url }",
|
|
47
|
+
keywords: ["read page", "extract", "html"],
|
|
48
|
+
source: "builtin",
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
name: "browser",
|
|
52
|
+
group: "ui",
|
|
53
|
+
description: "Browser automation.",
|
|
54
|
+
paramsHint: "{ action, ... }",
|
|
55
|
+
keywords: ["playwright", "stealth", "anti-bot", "captcha", "dynamic site", "javascript page"],
|
|
56
|
+
source: "builtin",
|
|
57
|
+
},
|
|
29
58
|
{ name: "canvas", group: "ui", description: "Canvas/artifact rendering actions.", paramsHint: "{ action, ... }", source: "builtin" },
|
|
30
59
|
{ name: "cron", group: "automation", description: "Manage scheduled jobs.", paramsHint: "{ action, ... }", source: "builtin" },
|
|
31
60
|
{ name: "gateway", group: "automation", description: "Gateway control-plane actions.", paramsHint: "{ action, ... }", source: "builtin" },
|
|
@@ -298,6 +327,7 @@ function score(query: string, entry: ToolEntry): number {
|
|
|
298
327
|
const n = entry.name.toLowerCase();
|
|
299
328
|
const d = entry.description.toLowerCase();
|
|
300
329
|
const g = entry.group.toLowerCase();
|
|
330
|
+
const keywords = (entry.keywords ?? []).map((v) => v.toLowerCase());
|
|
301
331
|
|
|
302
332
|
let s = 0;
|
|
303
333
|
if (n === q) s += 100;
|
|
@@ -305,10 +335,13 @@ function score(query: string, entry: ToolEntry): number {
|
|
|
305
335
|
if (n.includes(q)) s += 30;
|
|
306
336
|
if (g.includes(q)) s += 15;
|
|
307
337
|
if (d.includes(q)) s += 10;
|
|
338
|
+
if (keywords.includes(q)) s += 25;
|
|
308
339
|
|
|
309
340
|
for (const token of q.split(/\s+/).filter(Boolean)) {
|
|
310
341
|
if (n.includes(token)) s += 12;
|
|
311
342
|
if (d.includes(token)) s += 4;
|
|
343
|
+
if (g.includes(token)) s += 4;
|
|
344
|
+
if (keywords.some((k) => k.includes(token))) s += 8;
|
|
312
345
|
}
|
|
313
346
|
return s;
|
|
314
347
|
}
|
package/src/tools/tool-search.ts
CHANGED
|
@@ -65,6 +65,8 @@ export function createToolSearchTool(api: OpenClawPluginApi): AnyAgentTool {
|
|
|
65
65
|
liveCount: built.liveCount,
|
|
66
66
|
totalCatalogSize: catalog.length,
|
|
67
67
|
count: matches.length,
|
|
68
|
+
note:
|
|
69
|
+
"Skills are instruction layers. OCSmartTools can still dispatch/batch-call runtime and browser tools used by those skills.",
|
|
68
70
|
tools: matches,
|
|
69
71
|
});
|
|
70
72
|
},
|