@aria-cli/tools 1.0.9 → 1.0.11

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 (241) hide show
  1. package/package.json +9 -5
  2. package/src/__tests__/web-fetch-download.test.ts +0 -433
  3. package/src/__tests__/web-tools.test.ts +0 -619
  4. package/src/ask-user-interaction.ts +0 -33
  5. package/src/cache/web-cache.ts +0 -110
  6. package/src/definitions/arion.ts +0 -118
  7. package/src/definitions/browser/browser.ts +0 -502
  8. package/src/definitions/browser/index.ts +0 -5
  9. package/src/definitions/browser/pw-downloads.ts +0 -142
  10. package/src/definitions/browser/pw-interactions.ts +0 -282
  11. package/src/definitions/browser/pw-responses.ts +0 -98
  12. package/src/definitions/browser/pw-session.ts +0 -405
  13. package/src/definitions/browser/pw-shared.ts +0 -85
  14. package/src/definitions/browser/pw-snapshot.ts +0 -383
  15. package/src/definitions/browser/pw-state.ts +0 -101
  16. package/src/definitions/browser/types.ts +0 -203
  17. package/src/definitions/code-intelligence.ts +0 -526
  18. package/src/definitions/core.ts +0 -118
  19. package/src/definitions/delegation.ts +0 -567
  20. package/src/definitions/deploy.ts +0 -73
  21. package/src/definitions/filesystem.ts +0 -217
  22. package/src/definitions/frg.ts +0 -67
  23. package/src/definitions/index.ts +0 -28
  24. package/src/definitions/memory.ts +0 -150
  25. package/src/definitions/messaging.ts +0 -734
  26. package/src/definitions/meta.ts +0 -392
  27. package/src/definitions/network.ts +0 -179
  28. package/src/definitions/outlook.ts +0 -318
  29. package/src/definitions/patch/apply-patch.ts +0 -235
  30. package/src/definitions/patch/fuzzy-match.ts +0 -217
  31. package/src/definitions/patch/index.ts +0 -1
  32. package/src/definitions/patch/patch-parser.ts +0 -297
  33. package/src/definitions/patch/sandbox-paths.ts +0 -129
  34. package/src/definitions/process/index.ts +0 -5
  35. package/src/definitions/process/process-registry.ts +0 -303
  36. package/src/definitions/process/process.ts +0 -456
  37. package/src/definitions/process/pty-keys.ts +0 -298
  38. package/src/definitions/process/session-slug.ts +0 -147
  39. package/src/definitions/quip.ts +0 -225
  40. package/src/definitions/search.ts +0 -67
  41. package/src/definitions/session-history.ts +0 -79
  42. package/src/definitions/shell.ts +0 -202
  43. package/src/definitions/slack.ts +0 -211
  44. package/src/definitions/web.ts +0 -119
  45. package/src/executors/apply-patch.ts +0 -1035
  46. package/src/executors/arion.ts +0 -199
  47. package/src/executors/code-intelligence.ts +0 -1179
  48. package/src/executors/deploy.ts +0 -1066
  49. package/src/executors/filesystem.ts +0 -1428
  50. package/src/executors/frg-freshness.ts +0 -743
  51. package/src/executors/frg.ts +0 -394
  52. package/src/executors/index.ts +0 -280
  53. package/src/executors/learning-meta.ts +0 -1367
  54. package/src/executors/lsp-client.ts +0 -355
  55. package/src/executors/memory.ts +0 -978
  56. package/src/executors/meta.ts +0 -293
  57. package/src/executors/process-registry.ts +0 -570
  58. package/src/executors/pty-session-store.ts +0 -43
  59. package/src/executors/pty.ts +0 -342
  60. package/src/executors/restart.ts +0 -133
  61. package/src/executors/search-freshness.ts +0 -249
  62. package/src/executors/search-types.ts +0 -98
  63. package/src/executors/search.ts +0 -89
  64. package/src/executors/self-diagnose.ts +0 -552
  65. package/src/executors/session-history.ts +0 -435
  66. package/src/executors/shell-safety.ts +0 -519
  67. package/src/executors/shell.ts +0 -1243
  68. package/src/executors/utils.ts +0 -40
  69. package/src/executors/web.ts +0 -786
  70. package/src/extraction/content-extraction.ts +0 -281
  71. package/src/extraction/index.ts +0 -5
  72. package/src/headless-control-contract.ts +0 -1149
  73. package/src/index.ts +0 -788
  74. package/src/local-control-http-auth.ts +0 -2
  75. package/src/mcp/client.ts +0 -218
  76. package/src/mcp/connection.ts +0 -568
  77. package/src/mcp/index.ts +0 -11
  78. package/src/mcp/jsonrpc.ts +0 -195
  79. package/src/mcp/types.ts +0 -199
  80. package/src/network-control-adapter.ts +0 -88
  81. package/src/network-runtime/address-types.ts +0 -218
  82. package/src/network-runtime/db-owner-fencing.ts +0 -91
  83. package/src/network-runtime/delivery-receipts.ts +0 -372
  84. package/src/network-runtime/direct-endpoint-authority.ts +0 -35
  85. package/src/network-runtime/index.ts +0 -316
  86. package/src/network-runtime/local-control-contract.ts +0 -784
  87. package/src/network-runtime/node-store-contract.ts +0 -46
  88. package/src/network-runtime/pair-route-contract.ts +0 -97
  89. package/src/network-runtime/peer-capabilities.ts +0 -48
  90. package/src/network-runtime/peer-principal-ref.ts +0 -20
  91. package/src/network-runtime/peer-state-machine.ts +0 -160
  92. package/src/network-runtime/protocol-schemas.ts +0 -265
  93. package/src/network-runtime/runtime-bootstrap-contract.ts +0 -83
  94. package/src/outlook/desktop-session.ts +0 -409
  95. package/src/policy.ts +0 -171
  96. package/src/providers/brave.ts +0 -80
  97. package/src/providers/duckduckgo.ts +0 -199
  98. package/src/providers/exa.ts +0 -85
  99. package/src/providers/firecrawl.ts +0 -77
  100. package/src/providers/index.ts +0 -8
  101. package/src/providers/jina.ts +0 -70
  102. package/src/providers/router.ts +0 -121
  103. package/src/providers/search-provider.ts +0 -74
  104. package/src/providers/tavily.ts +0 -74
  105. package/src/quip/desktop-session.ts +0 -435
  106. package/src/registry/index.ts +0 -1
  107. package/src/registry/registry.ts +0 -905
  108. package/src/runtime-socket-local-control-client.ts +0 -632
  109. package/src/security/dns-normalization.ts +0 -34
  110. package/src/security/dns-pinning.ts +0 -138
  111. package/src/security/external-content.ts +0 -129
  112. package/src/security/ssrf.ts +0 -207
  113. package/src/slack/desktop-session.ts +0 -493
  114. package/src/tool-factory.ts +0 -91
  115. package/src/types.ts +0 -1341
  116. package/src/utils/retry.ts +0 -163
  117. package/src/utils/safe-parse-json.ts +0 -176
  118. package/src/utils/url.ts +0 -20
  119. package/tests/benchmarks/registry.bench.ts +0 -57
  120. package/tests/cache/web-cache.test.ts +0 -147
  121. package/tests/critical-integration.test.ts +0 -1465
  122. package/tests/definitions/apply-patch.test.ts +0 -586
  123. package/tests/definitions/browser.test.ts +0 -495
  124. package/tests/definitions/delegation-pause-resume.test.ts +0 -758
  125. package/tests/definitions/execution.test.ts +0 -671
  126. package/tests/definitions/messaging-inbox-scope.test.ts +0 -229
  127. package/tests/definitions/messaging.test.ts +0 -1468
  128. package/tests/definitions/outlook.test.ts +0 -30
  129. package/tests/definitions/process.test.ts +0 -469
  130. package/tests/definitions/slack.test.ts +0 -28
  131. package/tests/definitions/tool-inventory.test.ts +0 -218
  132. package/tests/e2e/delegation-quest-orchestration.e2e.test.ts +0 -433
  133. package/tests/e2e/memory-tool-discovery-contract.e2e.test.ts +0 -81
  134. package/tests/executors/apply-patch.test.ts +0 -538
  135. package/tests/executors/arion.test.ts +0 -309
  136. package/tests/executors/conversation-primitives.test.ts +0 -250
  137. package/tests/executors/deploy.test.ts +0 -746
  138. package/tests/executors/filesystem-tools.test.ts +0 -357
  139. package/tests/executors/filesystem.test.ts +0 -959
  140. package/tests/executors/frg-freshness.test.ts +0 -136
  141. package/tests/executors/frg-merge.test.ts +0 -70
  142. package/tests/executors/frg-session-content.test.ts +0 -40
  143. package/tests/executors/frg.test.ts +0 -56
  144. package/tests/executors/memory-bugfixes.test.ts +0 -257
  145. package/tests/executors/memory-real-memoria.integration.test.ts +0 -316
  146. package/tests/executors/memory.test.ts +0 -853
  147. package/tests/executors/meta-tools.test.ts +0 -411
  148. package/tests/executors/meta.test.ts +0 -683
  149. package/tests/executors/path-containment.test.ts +0 -51
  150. package/tests/executors/process-registry.test.ts +0 -505
  151. package/tests/executors/pty.test.ts +0 -664
  152. package/tests/executors/quest-security.test.ts +0 -249
  153. package/tests/executors/read-file-media.test.ts +0 -230
  154. package/tests/executors/recall-knowledge-schema.test.ts +0 -209
  155. package/tests/executors/recall-tags.test.ts +0 -278
  156. package/tests/executors/remember-null-safety.contract.test.ts +0 -41
  157. package/tests/executors/restart.test.ts +0 -67
  158. package/tests/executors/search-unified.test.ts +0 -381
  159. package/tests/executors/session-history.test.ts +0 -340
  160. package/tests/executors/session-transcript.test.ts +0 -561
  161. package/tests/executors/shell-abort.test.ts +0 -416
  162. package/tests/executors/shell-env-blocklist.test.ts +0 -648
  163. package/tests/executors/shell-env-process.test.ts +0 -245
  164. package/tests/executors/shell-process-registry.test.ts +0 -334
  165. package/tests/executors/shell-tools.test.ts +0 -393
  166. package/tests/executors/shell.test.ts +0 -690
  167. package/tests/executors/web-abort-vs-timeout.test.ts +0 -213
  168. package/tests/executors/web-integration.test.ts +0 -633
  169. package/tests/executors/web-symlink.test.ts +0 -18
  170. package/tests/executors/web.test.ts +0 -1400
  171. package/tests/executors/write-stdin.test.ts +0 -145
  172. package/tests/extraction/content-extraction.test.ts +0 -153
  173. package/tests/guards/tools-default-test-lane.integration.test.ts +0 -21
  174. package/tests/guards/tools-package-test-commands.e2e.test.ts +0 -43
  175. package/tests/guards/tools-test-lane-manifest.contract.test.ts +0 -76
  176. package/tests/guards/tools-vitest-workspace-alias.contract.test.ts +0 -63
  177. package/tests/helpers/async-waits.ts +0 -53
  178. package/tests/integration/headless-control-contract.integration.test.ts +0 -153
  179. package/tests/integration/memory-tool-schema-parity.integration.test.ts +0 -67
  180. package/tests/integration/meta-tools-round-trip.integration.test.ts +0 -506
  181. package/tests/integration/quest-round-trip.test.ts +0 -303
  182. package/tests/integration/registry-executor-flow.test.ts +0 -85
  183. package/tests/integration.test.ts +0 -177
  184. package/tests/loading-tier.test.ts +0 -126
  185. package/tests/mcp/client-reconnect.test.ts +0 -267
  186. package/tests/mcp/connection.test.ts +0 -846
  187. package/tests/mcp/injectable-logger.test.ts +0 -83
  188. package/tests/mcp/jsonrpc.test.ts +0 -109
  189. package/tests/mcp/lifecycle.test.ts +0 -879
  190. package/tests/network-runtime/address-types.contract.test.ts +0 -143
  191. package/tests/network-runtime/continuity-bind-schema.contract.test.ts +0 -203
  192. package/tests/network-runtime/local-control-contract.test.ts +0 -869
  193. package/tests/network-runtime/local-control-invite-token.contract.test.ts +0 -146
  194. package/tests/network-runtime/node-store-contract.test.ts +0 -11
  195. package/tests/network-runtime/pair-protocol-nodeid.contract.test.ts +0 -15
  196. package/tests/network-runtime/peer-state-machine.contract.test.ts +0 -148
  197. package/tests/network-runtime/protocol-schemas.contract.test.ts +0 -512
  198. package/tests/network-runtime/relay-pending-nodeid.contract.test.ts +0 -62
  199. package/tests/network-runtime/runtime-bootstrap-contract.test.ts +0 -227
  200. package/tests/network-runtime/runtime-socket-local-control-client.test.ts +0 -621
  201. package/tests/network-runtime/wait-for-message-script.test.ts +0 -288
  202. package/tests/parallel.test.ts +0 -71
  203. package/tests/policy.test.ts +0 -184
  204. package/tests/print-default-test-lane.ts +0 -14
  205. package/tests/print-test-lane-manifest.ts +0 -22
  206. package/tests/providers/brave.test.ts +0 -159
  207. package/tests/providers/duckduckgo.test.ts +0 -207
  208. package/tests/providers/exa.test.ts +0 -175
  209. package/tests/providers/firecrawl.test.ts +0 -168
  210. package/tests/providers/jina.test.ts +0 -144
  211. package/tests/providers/router.test.ts +0 -328
  212. package/tests/providers/tavily.test.ts +0 -165
  213. package/tests/registry/discovery.test.ts +0 -154
  214. package/tests/registry/injectable-logger.test.ts +0 -230
  215. package/tests/registry/input-validation.test.ts +0 -361
  216. package/tests/registry/interface-completeness.test.ts +0 -85
  217. package/tests/registry/mcp-integration.test.ts +0 -103
  218. package/tests/registry/mcp-read-only-hint.test.ts +0 -60
  219. package/tests/registry/memoria-discovery.test.ts +0 -390
  220. package/tests/registry/nested-validation.test.ts +0 -283
  221. package/tests/registry/pseudo-tool-filtering.test.ts +0 -258
  222. package/tests/registry/registration-lifecycle.test.ts +0 -133
  223. package/tests/registry-validation.test.ts +0 -424
  224. package/tests/registry.test.ts +0 -460
  225. package/tests/security/dns-pinning.test.ts +0 -162
  226. package/tests/security/external-content.test.ts +0 -144
  227. package/tests/security/ssrf.test.ts +0 -118
  228. package/tests/shell-safety-integration.test.ts +0 -32
  229. package/tests/shell-safety.test.ts +0 -365
  230. package/tests/slack/desktop-session.test.ts +0 -50
  231. package/tests/test-lane-manifest.ts +0 -440
  232. package/tests/test-utils.ts +0 -27
  233. package/tests/tool-factory.test.ts +0 -188
  234. package/tests/utils/retry.test.ts +0 -231
  235. package/tests/utils/url.test.ts +0 -63
  236. package/tsconfig.cjs.json +0 -24
  237. package/tsconfig.json +0 -12
  238. package/vitest.config.ts +0 -55
  239. package/vitest.e2e.config.ts +0 -24
  240. package/vitest.integration.config.ts +0 -24
  241. package/vitest.native.config.ts +0 -24
@@ -1,217 +0,0 @@
1
- /**
2
- * Filesystem tool definitions
3
- *
4
- * Tools: read_file, write_file, edit_file, glob, ls, apply_patch (6 tools)
5
- * Note: grep replaced by native indexed search in SEARCH_TOOL_DEFINITIONS
6
- */
7
-
8
- import type { JSONSchema7 } from "json-schema";
9
- import type { Tool } from "../types.js";
10
- import {
11
- executeReadFile,
12
- executeWriteFile,
13
- executeEditFile,
14
- executeLs,
15
- executeGlob,
16
- } from "../executors/index.js";
17
-
18
- const read_file: Tool = {
19
- name: "read_file",
20
- description: "Read the contents of a file from the filesystem.",
21
- category: "filesystem",
22
- parameters: {
23
- type: "object",
24
- properties: {
25
- path: { type: "string", description: "Path to the file to read" },
26
- encoding: {
27
- type: "string",
28
- enum: [
29
- "utf-8",
30
- "utf8",
31
- "latin1",
32
- "ascii",
33
- "base64",
34
- "base64url",
35
- "utf16le",
36
- "ucs2",
37
- "hex",
38
- "binary",
39
- ],
40
- description: "File encoding",
41
- default: "utf-8",
42
- },
43
- offset: { type: "number", description: "Starting line offset (0-based)" },
44
- limit: { type: "number", description: "Maximum number of lines to read" },
45
- },
46
- required: ["path"],
47
- } as JSONSchema7,
48
- riskLevel: "safe",
49
- isReadOnly: true,
50
- loadingTier: "always",
51
- execute: executeReadFile,
52
- };
53
-
54
- const write_file: Tool = {
55
- name: "write_file",
56
- description: "Write content to a file on the filesystem. Creates the file if it does not exist.",
57
- category: "filesystem",
58
- parameters: {
59
- type: "object",
60
- properties: {
61
- path: { type: "string", description: "Path to the file to write" },
62
- content: { type: "string", description: "Content to write" },
63
- encoding: {
64
- type: "string",
65
- enum: [
66
- "utf-8",
67
- "utf8",
68
- "latin1",
69
- "ascii",
70
- "base64",
71
- "base64url",
72
- "utf16le",
73
- "ucs2",
74
- "hex",
75
- "binary",
76
- ],
77
- description: "File encoding",
78
- default: "utf-8",
79
- },
80
- append: {
81
- type: "boolean",
82
- description: "Append to existing file",
83
- default: false,
84
- },
85
- expectedHash: {
86
- type: "string",
87
- description:
88
- "Optional SHA-256 hash of the current file content. When provided, write fails if the file has changed.",
89
- },
90
- },
91
- required: ["path", "content"],
92
- } as JSONSchema7,
93
- riskLevel: "dangerous",
94
- isReadOnly: false,
95
- loadingTier: "always",
96
- execute: executeWriteFile,
97
- };
98
-
99
- const edit_file: Tool = {
100
- name: "edit_file",
101
- description:
102
- "Edit a file by replacing text. Uses exact match first, then resilient matching strategies for whitespace and indentation drift.",
103
- category: "filesystem",
104
- parameters: {
105
- type: "object",
106
- properties: {
107
- path: { type: "string", description: "Path to the file to edit" },
108
- oldText: { type: "string", description: "Text to find and replace" },
109
- newText: { type: "string", description: "Replacement text" },
110
- replaceAll: {
111
- type: "boolean",
112
- description: "Replace all occurrences instead of just the first",
113
- default: false,
114
- },
115
- expectedReplacements: {
116
- type: "number",
117
- description:
118
- "Optional safety check. If provided, the tool will fail unless exactly this many replacements are applied.",
119
- },
120
- expectedHash: {
121
- type: "string",
122
- description:
123
- "Optional SHA-256 hash of the current file content. Edit fails if the file changed since it was read.",
124
- },
125
- },
126
- required: ["path", "oldText", "newText"],
127
- } as JSONSchema7,
128
- riskLevel: "dangerous",
129
- isReadOnly: false,
130
- loadingTier: "always",
131
- execute: executeEditFile,
132
- };
133
-
134
- const glob: Tool = {
135
- name: "glob",
136
- description: "Find files matching a glob pattern.",
137
- category: "filesystem",
138
- parameters: {
139
- type: "object",
140
- properties: {
141
- pattern: {
142
- type: "string",
143
- description: 'Glob pattern to match (e.g., "**/*.ts")',
144
- },
145
- cwd: { type: "string", description: "Working directory for the pattern" },
146
- ignore: {
147
- type: "array",
148
- items: { type: "string" },
149
- description: "Patterns to ignore",
150
- },
151
- },
152
- required: ["pattern"],
153
- } as JSONSchema7,
154
- riskLevel: "safe",
155
- isReadOnly: true,
156
- loadingTier: "always",
157
- execute: executeGlob,
158
- };
159
-
160
- const ls: Tool = {
161
- name: "ls",
162
- description:
163
- "List files and directories with a structured response including entries, depth/limit/offset/ignore, and truncated metadata.",
164
- category: "filesystem",
165
- parameters: {
166
- type: "object",
167
- properties: {
168
- path: { type: "string", description: "Path to list", default: "." },
169
- all: {
170
- type: "boolean",
171
- description: "Include hidden files",
172
- default: false,
173
- },
174
- long: {
175
- type: "boolean",
176
- description: "Include detailed metadata when available (size, mode, mtimeMs, modifiedAt)",
177
- default: false,
178
- },
179
- depth: {
180
- type: "number",
181
- description: "Recursion depth where 1 lists immediate children",
182
- },
183
- limit: {
184
- type: "number",
185
- description: "Maximum number of entries to return",
186
- },
187
- offset: {
188
- type: "number",
189
- description: "Number of entries to skip before returning results",
190
- },
191
- ignore: {
192
- type: "array",
193
- items: { type: "string" },
194
- description: "Glob patterns to ignore while listing",
195
- },
196
- },
197
- required: [],
198
- } as JSONSchema7,
199
- riskLevel: "safe",
200
- isReadOnly: true,
201
- loadingTier: "always",
202
- execute: executeLs,
203
- };
204
-
205
- // apply_patch: forked from OpenClaw (MIT) — includes fuzzy matching for robust patching.
206
- // Replaces the simple inline version with the full implementation from ./patch/.
207
- import { applyPatchTool } from "./patch/index.js";
208
-
209
- /** Filesystem tool definitions (6) — grep replaced by native indexed search in SEARCH_TOOL_DEFINITIONS */
210
- export const FILESYSTEM_TOOL_DEFINITIONS: Tool[] = [
211
- read_file,
212
- write_file,
213
- edit_file,
214
- glob,
215
- ls,
216
- applyPatchTool,
217
- ];
@@ -1,67 +0,0 @@
1
- import { z } from "zod";
2
- import type { Tool } from "../types.js";
3
- import { tool } from "../tool-factory.js";
4
- import { executeFrg } from "../executors/frg.js";
5
-
6
- export const frgTool = tool({
7
- name: "frg",
8
- description:
9
- "Native fastripgrep tool via napi-rs. Wraps the original frg commands in one tool: init, index, search, update, status, replace, man, completions, watch, and upgrade-safe metadata.",
10
- category: "code",
11
- riskLevel: "safe",
12
- isReadOnly: false,
13
- loadingTier: "always",
14
- parameters: z.object({
15
- command: z
16
- .enum([
17
- "init",
18
- "index",
19
- "search",
20
- "update",
21
- "status",
22
- "replace",
23
- "man",
24
- "completions",
25
- "watch",
26
- "upgrade",
27
- ])
28
- .describe("Original frg command to run"),
29
- pattern: z.string().optional().describe("Regex pattern for search/replace"),
30
- replacement: z.string().optional().describe("Replacement string for replace"),
31
- path: z
32
- .string()
33
- .optional()
34
- .describe("Repository or directory to operate on (defaults to current working directory)"),
35
- noIndex: z.boolean().optional().describe("Skip the index and do a brute-force scan for search"),
36
- literal: z.boolean().optional().describe("Treat pattern as a fixed string"),
37
- caseInsensitive: z.boolean().optional().describe("Enable case-insensitive matching"),
38
- smartCase: z.boolean().optional().describe("Use smart-case matching"),
39
- filesOnly: z.boolean().optional().describe("Return only file paths with matches"),
40
- count: z.boolean().optional().describe("Return match counts per file"),
41
- maxCount: z.number().optional().describe("Maximum matches per file"),
42
- quiet: z.boolean().optional().describe("Only report whether a match exists"),
43
- context: z.number().optional().describe("Context lines for search matches"),
44
- json: z.boolean().optional().describe("Compatibility flag matching upstream JSON mode"),
45
- glob: z.string().optional().describe("Glob filter for candidate files"),
46
- fileType: z.string().optional().describe("File extension/type filter"),
47
- follow: z.boolean().optional().describe("Follow symbolic links"),
48
- extraPatterns: z
49
- .array(z.string())
50
- .optional()
51
- .describe("Additional regex patterns combined with OR"),
52
- maxFilesize: z
53
- .number()
54
- .optional()
55
- .describe("Maximum file size in bytes while indexing/updating/init"),
56
- force: z.boolean().optional().describe("Compatibility flag for forced rebuilds"),
57
- write: z.boolean().optional().describe("Actually apply replace changes instead of previewing"),
58
- hook: z.boolean().optional().describe("Install a post-commit git hook when using init"),
59
- shell: z
60
- .enum(["bash", "elvish", "fish", "powershell", "zsh"])
61
- .optional()
62
- .describe("Shell target when using completions"),
63
- }),
64
- execute: executeFrg,
65
- });
66
-
67
- export const FRG_TOOL_DEFINITIONS: Tool[] = [frgTool];
@@ -1,28 +0,0 @@
1
- /**
2
- * Tool definitions exports
3
- */
4
-
5
- export {
6
- CORE_TOOL_DEFINITIONS,
7
- getCoreTools,
8
- getCoreTool,
9
- getCoreToolsByCategory,
10
- getCoreToolsByRiskLevel,
11
- } from "./core.js";
12
-
13
- // Category-specific definition arrays
14
- export { MEMORY_TOOL_DEFINITIONS } from "./memory.js";
15
- export { WEB_TOOL_DEFINITIONS } from "./web.js";
16
- export { FILESYSTEM_TOOL_DEFINITIONS } from "./filesystem.js";
17
- export { SHELL_TOOL_DEFINITIONS } from "./shell.js";
18
- export { ARION_TOOL_DEFINITIONS } from "./arion.js";
19
- export { DELEGATION_TOOL_DEFINITIONS } from "./delegation.js";
20
- export { MESSAGING_TOOL_DEFINITIONS } from "./messaging.js";
21
- export { SLACK_TOOL_DEFINITIONS } from "./slack.js";
22
- export { QUIP_TOOL_DEFINITIONS } from "./quip.js";
23
- export { NETWORK_TOOL_DEFINITIONS } from "./network.js";
24
- export { META_TOOL_DEFINITIONS } from "./meta.js";
25
- export { SESSION_HISTORY_TOOL_DEFINITIONS } from "./session-history.js";
26
- export { FRG_TOOL_DEFINITIONS } from "./frg.js";
27
- export { CODE_INTELLIGENCE_TOOL_DEFINITIONS } from "./code-intelligence.js";
28
- export { SEARCH_TOOL_DEFINITIONS } from "./search.js";
@@ -1,150 +0,0 @@
1
- /**
2
- * Memory tool definitions
3
- *
4
- * Tools: remember, recall, forget, recall_knowledge, reflect (5 tools)
5
- */
6
-
7
- import type { JSONSchema7 } from "json-schema";
8
- import type { Tool, ToolContext, ToolResult } from "../types.js";
9
- import {
10
- executeRemember,
11
- executeRecall,
12
- executeForget,
13
- executeDiscover,
14
- executeReflect,
15
- executeLearnLegacy,
16
- executeSearchKnowledge,
17
- } from "../executors/index.js";
18
-
19
- const remember: Tool = {
20
- name: "remember",
21
- description:
22
- "Store information in memory for later recall. Use this to save important facts, decisions, or context. (Deprecated — use learn instead)",
23
- category: "memory",
24
- parameters: {
25
- type: "object",
26
- properties: {
27
- content: { type: "string", description: "The content to remember" },
28
- importance: { type: "number", description: "Importance score from 0-1" },
29
- },
30
- required: ["content"],
31
- } as JSONSchema7,
32
- riskLevel: "moderate",
33
- isReadOnly: false,
34
- loadingTier: "always",
35
- execute: (input: Record<string, unknown>, ctx: ToolContext): Promise<ToolResult> => {
36
- // Delegate to learn with content-only input
37
- return executeLearnLegacy({ content: String(input.content ?? "") }, ctx);
38
- },
39
- };
40
-
41
- const recall: Tool = {
42
- name: "recall",
43
- description:
44
- "Retrieve information from memory based on a query. Supports temporal queries to see what was known at a specific date.",
45
- category: "memory",
46
- parameters: {
47
- type: "object",
48
- properties: {
49
- query: {
50
- type: "string",
51
- description: "The query to search for in memory",
52
- },
53
- limit: {
54
- type: "number",
55
- description: "Maximum number of results to return",
56
- default: 10,
57
- },
58
- date: {
59
- type: "string",
60
- description:
61
- "ISO 8601 date string for temporal query — returns memories valid at this date. Example: '2026-01-15'",
62
- },
63
- },
64
- required: ["query"],
65
- } as JSONSchema7,
66
- riskLevel: "safe",
67
- isReadOnly: true,
68
- loadingTier: "always",
69
- execute: executeRecall,
70
- };
71
-
72
- const forget: Tool = {
73
- name: "forget",
74
- description:
75
- "Remove information from memory. Use sparingly to clean up outdated or incorrect information.",
76
- category: "memory",
77
- parameters: {
78
- type: "object",
79
- properties: {
80
- id: { type: "string", description: "ID of the memory to forget" },
81
- },
82
- required: ["id"],
83
- } as JSONSchema7,
84
- riskLevel: "dangerous",
85
- requiresConfirmation: true,
86
- isReadOnly: false,
87
- loadingTier: "always",
88
- execute: executeForget,
89
- };
90
-
91
- const recallKnowledge: Tool = {
92
- name: "recall_knowledge",
93
- description:
94
- "Search for tools, skills, or both in memory, local skill files, and the web. (Deprecated — use search instead)",
95
- category: "memory",
96
- parameters: {
97
- type: "object",
98
- properties: {
99
- topic: { type: "string", description: "Topic to search knowledge for" },
100
- limit: {
101
- type: "number",
102
- description: "Maximum number of knowledge items to retrieve",
103
- default: 10,
104
- },
105
- kind: {
106
- type: "string",
107
- enum: ["tool", "skill"],
108
- description: "Kind of knowledge to filter by",
109
- },
110
- },
111
- required: ["topic"],
112
- } as JSONSchema7,
113
- riskLevel: "safe",
114
- isReadOnly: true,
115
- loadingTier: "always",
116
- execute: (input: Record<string, unknown>, ctx: ToolContext): Promise<ToolResult> => {
117
- // Delegate to search with query mapped from topic
118
- return executeSearchKnowledge(
119
- { query: String(input.topic ?? ""), limit: input.limit as number | undefined },
120
- ctx,
121
- );
122
- },
123
- };
124
-
125
- const reflect: Tool = {
126
- name: "reflect",
127
- description:
128
- "Reflect on the current conversation to identify genuine learnings about yourself — " +
129
- "limitations, non-obvious strategies, user preferences, or blind spots. " +
130
- "Use sparingly: most conversations teach nothing new.",
131
- category: "memory",
132
- parameters: {
133
- type: "object",
134
- properties: {
135
- summary: {
136
- type: "string",
137
- description:
138
- "Summary of what happened in the conversation — what you did, what worked, what didn't",
139
- },
140
- },
141
- required: ["summary"],
142
- } as JSONSchema7,
143
- riskLevel: "moderate",
144
- isReadOnly: false,
145
- loadingTier: "always",
146
- execute: executeReflect,
147
- };
148
-
149
- /** Memory tool definitions (5) */
150
- export const MEMORY_TOOL_DEFINITIONS: Tool[] = [remember, recall, forget, recallKnowledge, reflect];