@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.
Files changed (59) hide show
  1. package/README.md +1 -0
  2. package/dist/api.d.ts +1 -1
  3. package/dist/api.js +1 -1
  4. package/package.json +2 -2
  5. package/plugins/approval/index.ts +14 -11
  6. package/plugins/approval/policy.ts +34 -16
  7. package/plugins/fs/grep.ts +13 -3
  8. package/plugins/fs/index.ts +5 -5
  9. package/plugins/fs/plugin.json +1 -1
  10. package/plugins/mcp/index.ts +5 -5
  11. package/plugins/mcp/plugin.json +1 -1
  12. package/plugins/models/index.ts +4 -3
  13. package/plugins/models/provider.ts +12 -1
  14. package/plugins/repeats/index.ts +31 -1
  15. package/plugins/screenshot/browser.ts +221 -0
  16. package/plugins/screenshot/index.ts +3 -2
  17. package/plugins/screenshot/tool.ts +27 -51
  18. package/plugins/shell/index.ts +64 -6
  19. package/plugins/shell/plugin.json +1 -1
  20. package/plugins/shell/shell.ts +90 -33
  21. package/plugins/task/index.ts +12 -42
  22. package/plugins/task/plugin.json +1 -2
  23. package/plugins/task/subagent.ts +2 -2
  24. package/plugins/tools/index.ts +50 -0
  25. package/plugins/tools/plugin.json +7 -0
  26. package/plugins/tui/frontend.ts +27 -3
  27. package/plugins/tui/mascot.ts +8 -7
  28. package/plugins/tui/tui.ts +23 -7
  29. package/plugins/web/index.ts +7 -7
  30. package/plugins/web/plugin.json +1 -1
  31. package/plugins-dist/approval/index.js +16 -12
  32. package/plugins-dist/approval/policy.js +30 -15
  33. package/plugins-dist/fs/grep.js +12 -3
  34. package/plugins-dist/fs/index.js +5 -5
  35. package/plugins-dist/fs/plugin.json +1 -1
  36. package/plugins-dist/mcp/index.js +5 -5
  37. package/plugins-dist/mcp/plugin.json +1 -1
  38. package/plugins-dist/models/index.js +4 -3
  39. package/plugins-dist/models/provider.js +13 -1
  40. package/plugins-dist/repeats/index.js +27 -1
  41. package/plugins-dist/screenshot/browser.js +187 -0
  42. package/plugins-dist/screenshot/index.js +3 -2
  43. package/plugins-dist/screenshot/tool.js +27 -49
  44. package/plugins-dist/shell/index.js +68 -5
  45. package/plugins-dist/shell/plugin.json +1 -1
  46. package/plugins-dist/shell/shell.js +82 -30
  47. package/plugins-dist/task/index.js +11 -42
  48. package/plugins-dist/task/plugin.json +1 -3
  49. package/plugins-dist/task/subagent.js +1 -1
  50. package/plugins-dist/tools/index.js +49 -0
  51. package/plugins-dist/tools/plugin.json +9 -0
  52. package/plugins-dist/tui/frontend.js +28 -3
  53. package/plugins-dist/tui/mascot.js +8 -6
  54. package/plugins-dist/tui/tui.js +18 -7
  55. package/plugins-dist/tui/vendor.js +1388 -1088
  56. package/plugins-dist/web/index.js +6 -6
  57. package/plugins-dist/web/plugin.json +1 -1
  58. package/sdk/python/__pycache__/jade_plugin.cpython-312.pyc +0 -0
  59. 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
- // 子 Agent(jade/task)也能查网页:另一套实例;web_search 只在配置了搜索服务时给它。
94
- // web_fetch 带 url 参数,子 Agent 每次都要问用户(URL 能把读到的内容带出去)。
95
- // jade/task 被隔离时它的服务已失效:子 Agent 没有 web 工具,web 工具本身照常
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 task = ctx.service("task@1");
98
- if (task) {
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
- task.tool(tool, tool.name === "web_search" ? { when: () => sub.search().length > 0 } : {});
101
+ shared.register(tool, tool.name === "web_search" ? { when: () => sub.search().length > 0 } : {});
102
102
  }
103
103
  }
104
104
  catch { }
@@ -8,7 +8,7 @@
8
8
  "commands@1",
9
9
  "prompts@1",
10
10
  "renderers@1",
11
- "task@1"
11
+ "tools@1"
12
12
  ],
13
13
  "config": {
14
14
  "search": {
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.1.0";
8
+ export const API_VERSION = "1.2.0";
9
9
 
10
10
  /** 来源层级,后面的层级更高(3.3) */
11
11
  export const LAYERS: readonly PluginLayer[] = ["bundled", "user", "project"];