@uncarved/jade 0.3.0 → 0.3.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 +1 -0
- package/dist/api.d.ts +1 -1
- package/dist/api.js +1 -1
- package/package.json +2 -2
- package/plugins/approval/index.ts +14 -11
- package/plugins/approval/policy.ts +34 -16
- package/plugins/fs/grep.ts +13 -3
- package/plugins/fs/index.ts +5 -5
- package/plugins/fs/plugin.json +1 -1
- package/plugins/mcp/index.ts +5 -5
- package/plugins/mcp/plugin.json +1 -1
- package/plugins/models/index.ts +4 -3
- package/plugins/models/provider.ts +12 -1
- package/plugins/repeats/index.ts +31 -1
- package/plugins/screenshot/browser.ts +221 -0
- package/plugins/screenshot/index.ts +3 -2
- package/plugins/screenshot/tool.ts +27 -51
- package/plugins/shell/index.ts +64 -6
- package/plugins/shell/plugin.json +1 -1
- package/plugins/shell/shell.ts +90 -33
- package/plugins/task/index.ts +12 -42
- package/plugins/task/plugin.json +1 -2
- package/plugins/task/subagent.ts +2 -2
- package/plugins/tools/index.ts +50 -0
- package/plugins/tools/plugin.json +7 -0
- package/plugins/tui/frontend.ts +27 -3
- package/plugins/tui/mascot.ts +8 -7
- package/plugins/tui/tui.ts +23 -7
- package/plugins/web/index.ts +7 -7
- package/plugins/web/plugin.json +1 -1
- package/plugins-dist/approval/index.js +16 -12
- package/plugins-dist/approval/policy.js +30 -15
- package/plugins-dist/fs/grep.js +12 -3
- package/plugins-dist/fs/index.js +5 -5
- package/plugins-dist/fs/plugin.json +1 -1
- package/plugins-dist/mcp/index.js +5 -5
- package/plugins-dist/mcp/plugin.json +1 -1
- package/plugins-dist/models/index.js +4 -3
- package/plugins-dist/models/provider.js +13 -1
- package/plugins-dist/repeats/index.js +27 -1
- package/plugins-dist/screenshot/browser.js +187 -0
- package/plugins-dist/screenshot/index.js +3 -2
- package/plugins-dist/screenshot/tool.js +27 -49
- package/plugins-dist/shell/index.js +68 -5
- package/plugins-dist/shell/plugin.json +1 -1
- package/plugins-dist/shell/shell.js +82 -30
- package/plugins-dist/task/index.js +11 -42
- package/plugins-dist/task/plugin.json +1 -3
- package/plugins-dist/task/subagent.js +1 -1
- package/plugins-dist/tools/index.js +49 -0
- package/plugins-dist/tools/plugin.json +9 -0
- package/plugins-dist/tui/frontend.js +28 -3
- package/plugins-dist/tui/mascot.js +8 -6
- package/plugins-dist/tui/tui.js +18 -7
- package/plugins-dist/tui/vendor.js +1388 -1088
- package/plugins-dist/web/index.js +6 -6
- package/plugins-dist/web/plugin.json +1 -1
- package/sdk/python/__pycache__/jade_plugin.cpython-312.pyc +0 -0
- package/src/api.ts +1 -1
|
@@ -90,15 +90,15 @@ export default definePlugin({
|
|
|
90
90
|
const web = webTools({ ...opts, env: () => keys ?? env });
|
|
91
91
|
for (const tool of web.tools)
|
|
92
92
|
ctx.kernel.tool(tool);
|
|
93
|
-
//
|
|
94
|
-
// web_fetch 带 url
|
|
95
|
-
// jade/
|
|
93
|
+
// 嵌套 Agent(例如 jade/task 的子 Agent)也能查网页:另一套实例;web_search 只在配置了搜索服务时给它。
|
|
94
|
+
// web_fetch 带 url 参数,jade/task 的子 Agent 每次都要问用户(URL 能把读到的内容带出去)。
|
|
95
|
+
// jade/tools 被隔离时它的服务已失效:嵌套 Agent 没有 web 工具,web 工具本身照常
|
|
96
96
|
try {
|
|
97
|
-
const
|
|
98
|
-
if (
|
|
97
|
+
const shared = ctx.service("tools@1");
|
|
98
|
+
if (shared) {
|
|
99
99
|
const sub = webTools({ ...opts, env: () => keys ?? env });
|
|
100
100
|
for (const tool of sub.tools)
|
|
101
|
-
|
|
101
|
+
shared.register(tool, tool.name === "web_search" ? { when: () => sub.search().length > 0 } : {});
|
|
102
102
|
}
|
|
103
103
|
}
|
|
104
104
|
catch { }
|
|
Binary file
|
package/src/api.ts
CHANGED
|
@@ -5,7 +5,7 @@ import type { PluginLayer } from "@uncarved/jade-api";
|
|
|
5
5
|
export * from "@uncarved/jade-api";
|
|
6
6
|
|
|
7
7
|
/** 插件 API 的版本,插件在 plugin.json 的 api 字段里用 ^ 范围声明。和 @uncarved/jade-api 的版本一致 */
|
|
8
|
-
export const API_VERSION = "1.
|
|
8
|
+
export const API_VERSION = "1.2.0";
|
|
9
9
|
|
|
10
10
|
/** 来源层级,后面的层级更高(3.3) */
|
|
11
11
|
export const LAYERS: readonly PluginLayer[] = ["bundled", "user", "project"];
|