@aria-cli/tools 1.0.12 → 1.0.14

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 (233) hide show
  1. package/dist/index.js +378 -70
  2. package/dist/network-runtime/index.js +8 -12
  3. package/dist-cjs/index.js +400 -435
  4. package/dist-cjs/network-runtime/index.js +8 -172
  5. package/package.json +8 -6
  6. package/dist/.tsbuildinfo +0 -1
  7. package/dist/ask-user-interaction.js +0 -22
  8. package/dist/cache/web-cache.js +0 -66
  9. package/dist/definitions/arion.js +0 -104
  10. package/dist/definitions/browser/browser.js +0 -418
  11. package/dist/definitions/browser/index.js +0 -4
  12. package/dist/definitions/browser/pw-downloads.js +0 -114
  13. package/dist/definitions/browser/pw-interactions.js +0 -199
  14. package/dist/definitions/browser/pw-responses.js +0 -76
  15. package/dist/definitions/browser/pw-session.js +0 -310
  16. package/dist/definitions/browser/pw-shared.js +0 -66
  17. package/dist/definitions/browser/pw-snapshot.js +0 -301
  18. package/dist/definitions/browser/pw-state.js +0 -62
  19. package/dist/definitions/browser/types.js +0 -4
  20. package/dist/definitions/code-intelligence.js +0 -470
  21. package/dist/definitions/core.js +0 -109
  22. package/dist/definitions/delegation.js +0 -512
  23. package/dist/definitions/deploy.js +0 -65
  24. package/dist/definitions/filesystem.js +0 -196
  25. package/dist/definitions/frg.js +0 -63
  26. package/dist/definitions/index.js +0 -20
  27. package/dist/definitions/memory.js +0 -123
  28. package/dist/definitions/messaging.js +0 -625
  29. package/dist/definitions/meta.js +0 -349
  30. package/dist/definitions/network.js +0 -159
  31. package/dist/definitions/outlook.js +0 -277
  32. package/dist/definitions/patch/apply-patch.js +0 -184
  33. package/dist/definitions/patch/fuzzy-match.js +0 -166
  34. package/dist/definitions/patch/index.js +0 -1
  35. package/dist/definitions/patch/patch-parser.js +0 -207
  36. package/dist/definitions/patch/sandbox-paths.js +0 -105
  37. package/dist/definitions/process/index.js +0 -4
  38. package/dist/definitions/process/process-registry.js +0 -213
  39. package/dist/definitions/process/process.js +0 -386
  40. package/dist/definitions/process/pty-keys.js +0 -254
  41. package/dist/definitions/process/session-slug.js +0 -142
  42. package/dist/definitions/quip.js +0 -195
  43. package/dist/definitions/search.js +0 -60
  44. package/dist/definitions/session-history.js +0 -69
  45. package/dist/definitions/shell.js +0 -181
  46. package/dist/definitions/slack.js +0 -180
  47. package/dist/definitions/web.js +0 -109
  48. package/dist/executors/apply-patch.js +0 -901
  49. package/dist/executors/arion.js +0 -119
  50. package/dist/executors/code-intelligence.js +0 -882
  51. package/dist/executors/deploy.js +0 -848
  52. package/dist/executors/filesystem.js +0 -1122
  53. package/dist/executors/frg-freshness.js +0 -576
  54. package/dist/executors/frg.js +0 -298
  55. package/dist/executors/index.js +0 -46
  56. package/dist/executors/learning-meta.js +0 -1146
  57. package/dist/executors/lsp-client.js +0 -296
  58. package/dist/executors/memory.js +0 -750
  59. package/dist/executors/meta.js +0 -220
  60. package/dist/executors/process-registry.js +0 -465
  61. package/dist/executors/pty-session-store.js +0 -30
  62. package/dist/executors/pty.js +0 -271
  63. package/dist/executors/restart.js +0 -119
  64. package/dist/executors/search-freshness.js +0 -195
  65. package/dist/executors/search-types.js +0 -52
  66. package/dist/executors/search.js +0 -66
  67. package/dist/executors/self-diagnose.js +0 -398
  68. package/dist/executors/session-history.js +0 -283
  69. package/dist/executors/shell-safety.js +0 -473
  70. package/dist/executors/shell.js +0 -954
  71. package/dist/executors/utils.js +0 -33
  72. package/dist/executors/web.js +0 -542
  73. package/dist/extraction/content-extraction.js +0 -235
  74. package/dist/extraction/index.js +0 -4
  75. package/dist/headless-control-contract.js +0 -967
  76. package/dist/local-control-http-auth.js +0 -2
  77. package/dist/mcp/client.js +0 -181
  78. package/dist/mcp/connection.js +0 -480
  79. package/dist/mcp/index.js +0 -10
  80. package/dist/mcp/jsonrpc.js +0 -144
  81. package/dist/mcp/types.js +0 -7
  82. package/dist/network-control-adapter.js +0 -72
  83. package/dist/network-runtime/address-types.js +0 -165
  84. package/dist/network-runtime/db-owner-fencing.js +0 -69
  85. package/dist/network-runtime/delivery-receipts.js +0 -267
  86. package/dist/network-runtime/direct-endpoint-authority.js +0 -25
  87. package/dist/network-runtime/local-control-contract.js +0 -627
  88. package/dist/network-runtime/node-store-contract.js +0 -34
  89. package/dist/network-runtime/pair-route-contract.js +0 -77
  90. package/dist/network-runtime/peer-capabilities.js +0 -28
  91. package/dist/network-runtime/peer-principal-ref.js +0 -12
  92. package/dist/network-runtime/peer-state-machine.js +0 -121
  93. package/dist/network-runtime/protocol-schemas.js +0 -205
  94. package/dist/network-runtime/runtime-bootstrap-contract.js +0 -60
  95. package/dist/outlook/desktop-session.js +0 -279
  96. package/dist/policy.js +0 -149
  97. package/dist/providers/brave.js +0 -62
  98. package/dist/providers/duckduckgo.js +0 -176
  99. package/dist/providers/exa.js +0 -63
  100. package/dist/providers/firecrawl.js +0 -55
  101. package/dist/providers/index.js +0 -7
  102. package/dist/providers/jina.js +0 -49
  103. package/dist/providers/router.js +0 -96
  104. package/dist/providers/search-provider.js +0 -32
  105. package/dist/providers/tavily.js +0 -54
  106. package/dist/quip/desktop-session.js +0 -317
  107. package/dist/registry/index.js +0 -1
  108. package/dist/registry/registry.js +0 -756
  109. package/dist/runtime-socket-local-control-client.js +0 -330
  110. package/dist/security/dns-normalization.js +0 -19
  111. package/dist/security/dns-pinning.js +0 -123
  112. package/dist/security/external-content.js +0 -91
  113. package/dist/security/ssrf.js +0 -181
  114. package/dist/slack/desktop-session.js +0 -324
  115. package/dist/tool-factory.js +0 -47
  116. package/dist/types.js +0 -7
  117. package/dist/utils/retry.js +0 -132
  118. package/dist/utils/safe-parse-json.js +0 -160
  119. package/dist/utils/url.js +0 -19
  120. package/dist-cjs/.tsbuildinfo +0 -1
  121. package/dist-cjs/ask-user-interaction.js +0 -27
  122. package/dist-cjs/cache/web-cache.js +0 -70
  123. package/dist-cjs/definitions/arion.js +0 -107
  124. package/dist-cjs/definitions/browser/browser.js +0 -421
  125. package/dist-cjs/definitions/browser/index.js +0 -8
  126. package/dist-cjs/definitions/browser/pw-downloads.js +0 -117
  127. package/dist-cjs/definitions/browser/pw-interactions.js +0 -213
  128. package/dist-cjs/definitions/browser/pw-responses.js +0 -84
  129. package/dist-cjs/definitions/browser/pw-session.js +0 -326
  130. package/dist-cjs/definitions/browser/pw-shared.js +0 -72
  131. package/dist-cjs/definitions/browser/pw-snapshot.js +0 -307
  132. package/dist-cjs/definitions/browser/pw-state.js +0 -70
  133. package/dist-cjs/definitions/browser/types.js +0 -5
  134. package/dist-cjs/definitions/code-intelligence.js +0 -473
  135. package/dist-cjs/definitions/core.js +0 -133
  136. package/dist-cjs/definitions/delegation.js +0 -515
  137. package/dist-cjs/definitions/deploy.js +0 -68
  138. package/dist-cjs/definitions/filesystem.js +0 -199
  139. package/dist-cjs/definitions/frg.js +0 -66
  140. package/dist-cjs/definitions/index.js +0 -43
  141. package/dist-cjs/definitions/memory.js +0 -126
  142. package/dist-cjs/definitions/messaging.js +0 -631
  143. package/dist-cjs/definitions/meta.js +0 -352
  144. package/dist-cjs/definitions/network.js +0 -162
  145. package/dist-cjs/definitions/outlook.js +0 -280
  146. package/dist-cjs/definitions/patch/apply-patch.js +0 -191
  147. package/dist-cjs/definitions/patch/fuzzy-match.js +0 -172
  148. package/dist-cjs/definitions/patch/index.js +0 -5
  149. package/dist-cjs/definitions/patch/patch-parser.js +0 -215
  150. package/dist-cjs/definitions/patch/sandbox-paths.js +0 -113
  151. package/dist-cjs/definitions/process/index.js +0 -8
  152. package/dist-cjs/definitions/process/process-registry.js +0 -231
  153. package/dist-cjs/definitions/process/process.js +0 -389
  154. package/dist-cjs/definitions/process/pty-keys.js +0 -259
  155. package/dist-cjs/definitions/process/session-slug.js +0 -145
  156. package/dist-cjs/definitions/quip.js +0 -198
  157. package/dist-cjs/definitions/search.js +0 -63
  158. package/dist-cjs/definitions/session-history.js +0 -72
  159. package/dist-cjs/definitions/shell.js +0 -184
  160. package/dist-cjs/definitions/slack.js +0 -183
  161. package/dist-cjs/definitions/web.js +0 -112
  162. package/dist-cjs/executors/apply-patch.js +0 -938
  163. package/dist-cjs/executors/arion.js +0 -125
  164. package/dist-cjs/executors/code-intelligence.js +0 -925
  165. package/dist-cjs/executors/deploy.js +0 -869
  166. package/dist-cjs/executors/filesystem.js +0 -1167
  167. package/dist-cjs/executors/frg-freshness.js +0 -627
  168. package/dist-cjs/executors/frg.js +0 -334
  169. package/dist-cjs/executors/index.js +0 -143
  170. package/dist-cjs/executors/learning-meta.js +0 -1165
  171. package/dist-cjs/executors/lsp-client.js +0 -310
  172. package/dist-cjs/executors/memory.js +0 -796
  173. package/dist-cjs/executors/meta.js +0 -226
  174. package/dist-cjs/executors/process-registry.js +0 -469
  175. package/dist-cjs/executors/pty-session-store.js +0 -34
  176. package/dist-cjs/executors/pty.js +0 -312
  177. package/dist-cjs/executors/restart.js +0 -155
  178. package/dist-cjs/executors/search-freshness.js +0 -234
  179. package/dist-cjs/executors/search-types.js +0 -56
  180. package/dist-cjs/executors/search.js +0 -102
  181. package/dist-cjs/executors/self-diagnose.js +0 -434
  182. package/dist-cjs/executors/session-history.js +0 -320
  183. package/dist-cjs/executors/shell-safety.js +0 -478
  184. package/dist-cjs/executors/shell.js +0 -1001
  185. package/dist-cjs/executors/utils.js +0 -73
  186. package/dist-cjs/executors/web.js +0 -547
  187. package/dist-cjs/extraction/content-extraction.js +0 -243
  188. package/dist-cjs/extraction/index.js +0 -8
  189. package/dist-cjs/headless-control-contract.js +0 -972
  190. package/dist-cjs/local-control-http-auth.js +0 -5
  191. package/dist-cjs/mcp/client.js +0 -185
  192. package/dist-cjs/mcp/connection.js +0 -484
  193. package/dist-cjs/mcp/index.js +0 -30
  194. package/dist-cjs/mcp/jsonrpc.js +0 -148
  195. package/dist-cjs/mcp/types.js +0 -8
  196. package/dist-cjs/network-control-adapter.js +0 -77
  197. package/dist-cjs/network-runtime/address-types.js +0 -168
  198. package/dist-cjs/network-runtime/db-owner-fencing.js +0 -76
  199. package/dist-cjs/network-runtime/delivery-receipts.js +0 -276
  200. package/dist-cjs/network-runtime/direct-endpoint-authority.js +0 -29
  201. package/dist-cjs/network-runtime/local-control-contract.js +0 -633
  202. package/dist-cjs/network-runtime/node-store-contract.js +0 -38
  203. package/dist-cjs/network-runtime/pair-route-contract.js +0 -80
  204. package/dist-cjs/network-runtime/peer-capabilities.js +0 -37
  205. package/dist-cjs/network-runtime/peer-principal-ref.js +0 -15
  206. package/dist-cjs/network-runtime/peer-state-machine.js +0 -129
  207. package/dist-cjs/network-runtime/protocol-schemas.js +0 -212
  208. package/dist-cjs/network-runtime/runtime-bootstrap-contract.js +0 -63
  209. package/dist-cjs/outlook/desktop-session.js +0 -318
  210. package/dist-cjs/policy.js +0 -155
  211. package/dist-cjs/providers/brave.js +0 -66
  212. package/dist-cjs/providers/duckduckgo.js +0 -180
  213. package/dist-cjs/providers/exa.js +0 -67
  214. package/dist-cjs/providers/firecrawl.js +0 -59
  215. package/dist-cjs/providers/index.js +0 -17
  216. package/dist-cjs/providers/jina.js +0 -53
  217. package/dist-cjs/providers/router.js +0 -100
  218. package/dist-cjs/providers/search-provider.js +0 -36
  219. package/dist-cjs/providers/tavily.js +0 -58
  220. package/dist-cjs/quip/desktop-session.js +0 -353
  221. package/dist-cjs/registry/index.js +0 -6
  222. package/dist-cjs/registry/registry.js +0 -761
  223. package/dist-cjs/runtime-socket-local-control-client.js +0 -367
  224. package/dist-cjs/security/dns-normalization.js +0 -22
  225. package/dist-cjs/security/dns-pinning.js +0 -160
  226. package/dist-cjs/security/external-content.js +0 -95
  227. package/dist-cjs/security/ssrf.js +0 -221
  228. package/dist-cjs/slack/desktop-session.js +0 -366
  229. package/dist-cjs/tool-factory.js +0 -50
  230. package/dist-cjs/types.js +0 -8
  231. package/dist-cjs/utils/retry.js +0 -169
  232. package/dist-cjs/utils/safe-parse-json.js +0 -164
  233. package/dist-cjs/utils/url.js +0 -23
@@ -1,145 +0,0 @@
1
- "use strict";
2
- // Originally from OpenClaw (MIT License, Copyright 2025 Peter Steinberger)
3
- // https://github.com/openclaw/openclaw
4
- // Modified for ARIA — stripped OpenClaw runtime, rewired to ARIA Tool interface
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.createSessionSlug = createSessionSlug;
7
- const SLUG_ADJECTIVES = [
8
- "amber",
9
- "briny",
10
- "brisk",
11
- "calm",
12
- "clear",
13
- "cool",
14
- "crisp",
15
- "dawn",
16
- "delta",
17
- "ember",
18
- "faint",
19
- "fast",
20
- "fresh",
21
- "gentle",
22
- "glow",
23
- "good",
24
- "grand",
25
- "keen",
26
- "kind",
27
- "lucky",
28
- "marine",
29
- "mellow",
30
- "mild",
31
- "neat",
32
- "nimble",
33
- "nova",
34
- "oceanic",
35
- "plaid",
36
- "quick",
37
- "quiet",
38
- "rapid",
39
- "salty",
40
- "sharp",
41
- "swift",
42
- "tender",
43
- "tidal",
44
- "tidy",
45
- "tide",
46
- "vivid",
47
- "warm",
48
- "wild",
49
- "young",
50
- ];
51
- const SLUG_NOUNS = [
52
- "atlas",
53
- "basil",
54
- "bison",
55
- "bloom",
56
- "breeze",
57
- "canyon",
58
- "cedar",
59
- "claw",
60
- "cloud",
61
- "comet",
62
- "coral",
63
- "cove",
64
- "crest",
65
- "crustacean",
66
- "daisy",
67
- "dune",
68
- "ember",
69
- "falcon",
70
- "fjord",
71
- "forest",
72
- "glade",
73
- "gulf",
74
- "harbor",
75
- "haven",
76
- "kelp",
77
- "lagoon",
78
- "lobster",
79
- "meadow",
80
- "mist",
81
- "nudibranch",
82
- "nexus",
83
- "ocean",
84
- "orbit",
85
- "otter",
86
- "pine",
87
- "prairie",
88
- "reef",
89
- "ridge",
90
- "river",
91
- "rook",
92
- "sable",
93
- "sage",
94
- "seaslug",
95
- "shell",
96
- "shoal",
97
- "shore",
98
- "slug",
99
- "summit",
100
- "tidepool",
101
- "trail",
102
- "valley",
103
- "wharf",
104
- "willow",
105
- "zephyr",
106
- ];
107
- function randomChoice(values, fallback) {
108
- return values[Math.floor(Math.random() * values.length)] ?? fallback;
109
- }
110
- function createSlugBase(words = 2) {
111
- const parts = [randomChoice(SLUG_ADJECTIVES, "steady"), randomChoice(SLUG_NOUNS, "harbor")];
112
- if (words > 2) {
113
- parts.push(randomChoice(SLUG_NOUNS, "reef"));
114
- }
115
- return parts.join("-");
116
- }
117
- function createSessionSlug(isTaken) {
118
- const isIdTaken = isTaken ?? (() => false);
119
- for (let attempt = 0; attempt < 12; attempt += 1) {
120
- const base = createSlugBase(2);
121
- if (!isIdTaken(base)) {
122
- return base;
123
- }
124
- for (let i = 2; i <= 12; i += 1) {
125
- const candidate = `${base}-${i}`;
126
- if (!isIdTaken(candidate)) {
127
- return candidate;
128
- }
129
- }
130
- }
131
- for (let attempt = 0; attempt < 12; attempt += 1) {
132
- const base = createSlugBase(3);
133
- if (!isIdTaken(base)) {
134
- return base;
135
- }
136
- for (let i = 2; i <= 12; i += 1) {
137
- const candidate = `${base}-${i}`;
138
- if (!isIdTaken(candidate)) {
139
- return candidate;
140
- }
141
- }
142
- }
143
- const fallback = `${createSlugBase(3)}-${Math.random().toString(36).slice(2, 5)}`;
144
- return isIdTaken(fallback) ? `${fallback}-${Date.now().toString(36)}` : fallback;
145
- }
@@ -1,198 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.QUIP_TOOL_DEFINITIONS = void 0;
4
- const node_child_process_1 = require("node:child_process");
5
- const node_os_1 = require("node:os");
6
- const node_path_1 = require("node:path");
7
- const QUIP_PY = (0, node_path_1.join)((0, node_os_1.homedir)(), ".aria", "tools", "quip.py");
8
- function runQuip(args) {
9
- return new Promise((resolve, reject) => {
10
- (0, node_child_process_1.execFile)(QUIP_PY, args, { timeout: 30_000 }, (err, stdout, stderr) => {
11
- if (err) {
12
- reject(new Error(stderr?.trim() || err.message));
13
- }
14
- else {
15
- resolve(stdout);
16
- }
17
- });
18
- });
19
- }
20
- const check_quip_documents = {
21
- name: "check_quip_documents",
22
- description: "Read, search, or list Quip documents and comments using the local Quip session on this machine. " +
23
- "Actions: 'recent' lists recent docs, 'search' finds docs by query, 'read' gets full document content, 'comments' lists comments on a document.",
24
- category: "messaging",
25
- parameters: {
26
- type: "object",
27
- properties: {
28
- action: {
29
- type: "string",
30
- enum: ["recent", "search", "read", "comments"],
31
- description: "What to do: 'recent' (list recent docs), 'search' (find docs), 'read' (get document content), 'comments' (list comments).",
32
- },
33
- query: {
34
- type: "string",
35
- description: "Search query (required for 'search' action).",
36
- },
37
- threadId: {
38
- type: "string",
39
- description: "Quip thread/document ID (required for 'read' and 'comments' actions).",
40
- },
41
- limit: {
42
- type: "number",
43
- description: "Maximum number of results to return (default 20, max 50).",
44
- default: 20,
45
- },
46
- },
47
- required: ["action"],
48
- },
49
- riskLevel: "safe",
50
- isReadOnly: true,
51
- loadingTier: "always",
52
- execute: async (input) => {
53
- const typedInput = input;
54
- try {
55
- const action = String(typedInput.action ?? "recent");
56
- const limit = String(typeof typedInput.limit === "number" ? typedInput.limit : 20);
57
- if (action === "recent") {
58
- const raw = await runQuip(["recent", limit]);
59
- return { success: true, message: `Recent Quip documents.`, data: { output: raw } };
60
- }
61
- if (action === "search") {
62
- const query = String(typedInput.query ?? "");
63
- if (!query)
64
- return { success: false, message: "'search' requires a 'query' parameter." };
65
- const raw = await runQuip(["search", query, "--limit", limit]);
66
- return { success: true, message: `Search results for "${query}".`, data: { output: raw } };
67
- }
68
- if (action === "read") {
69
- const threadId = String(typedInput.threadId ?? "");
70
- if (!threadId)
71
- return { success: false, message: "'read' requires a 'threadId' parameter." };
72
- const raw = await runQuip(["read", threadId]);
73
- return { success: true, message: `Read document ${threadId}.`, data: { output: raw } };
74
- }
75
- if (action === "comments") {
76
- const threadId = String(typedInput.threadId ?? "");
77
- if (!threadId)
78
- return { success: false, message: "'comments' requires a 'threadId' parameter." };
79
- const raw = await runQuip(["comments", threadId]);
80
- return { success: true, message: `Comments on ${threadId}.`, data: { output: raw } };
81
- }
82
- return {
83
- success: false,
84
- message: `Unknown action: ${action}. Use recent, search, read, or comments.`,
85
- };
86
- }
87
- catch (error) {
88
- return {
89
- success: false,
90
- message: error instanceof Error ? error.message : "Quip read failed.",
91
- };
92
- }
93
- },
94
- };
95
- const send_quip_comment = {
96
- name: "send_quip_comment",
97
- description: "Add a comment to a Quip document using the local Quip session on this machine. " +
98
- "Requires confirmation because it posts externally.",
99
- category: "messaging",
100
- parameters: {
101
- type: "object",
102
- properties: {
103
- threadId: {
104
- type: "string",
105
- description: "Quip thread/document ID to comment on.",
106
- },
107
- content: {
108
- type: "string",
109
- description: "Comment text to post.",
110
- },
111
- },
112
- required: ["threadId", "content"],
113
- },
114
- riskLevel: "dangerous",
115
- requiresConfirmation: true,
116
- isReadOnly: false,
117
- loadingTier: "always",
118
- execute: async (input) => {
119
- const typedInput = input;
120
- try {
121
- const raw = await runQuip([
122
- "comment",
123
- String(typedInput.threadId ?? ""),
124
- String(typedInput.content ?? ""),
125
- ]);
126
- return { success: true, message: `Posted comment.`, data: { output: raw } };
127
- }
128
- catch (error) {
129
- return {
130
- success: false,
131
- message: error instanceof Error ? error.message : "Quip comment failed.",
132
- };
133
- }
134
- },
135
- };
136
- const create_quip_document = {
137
- name: "create_quip_document",
138
- description: "Create a new Quip document using the local Quip session on this machine. " +
139
- "Requires confirmation because it creates external content.",
140
- category: "messaging",
141
- parameters: {
142
- type: "object",
143
- properties: {
144
- title: {
145
- type: "string",
146
- description: "Document title.",
147
- },
148
- content: {
149
- type: "string",
150
- description: "Document body content.",
151
- },
152
- format: {
153
- type: "string",
154
- enum: ["markdown", "html"],
155
- description: "Content format (default 'markdown').",
156
- default: "markdown",
157
- },
158
- folderId: {
159
- type: "string",
160
- description: "Optional folder ID to place the document in.",
161
- },
162
- },
163
- required: ["title", "content"],
164
- },
165
- riskLevel: "dangerous",
166
- requiresConfirmation: true,
167
- isReadOnly: false,
168
- loadingTier: "always",
169
- execute: async (input) => {
170
- const typedInput = input;
171
- try {
172
- const args = [
173
- "create",
174
- "--title",
175
- String(typedInput.title ?? ""),
176
- "--body",
177
- String(typedInput.content ?? ""),
178
- ];
179
- if (typedInput.format)
180
- args.push("--format", typedInput.format);
181
- if (typedInput.folderId)
182
- args.push("--folder", typedInput.folderId);
183
- const raw = await runQuip(args);
184
- return { success: true, message: `Created document.`, data: { output: raw } };
185
- }
186
- catch (error) {
187
- return {
188
- success: false,
189
- message: error instanceof Error ? error.message : "Quip create failed.",
190
- };
191
- }
192
- },
193
- };
194
- exports.QUIP_TOOL_DEFINITIONS = [
195
- check_quip_documents,
196
- send_quip_comment,
197
- create_quip_document,
198
- ];
@@ -1,63 +0,0 @@
1
- "use strict";
2
- /**
3
- * Native indexed regex search tool definition.
4
- *
5
- * Uses @aria-cli/search (Rust napi-rs addon) for sub-millisecond indexed search.
6
- * Registered alongside (not replacing) the existing grep tool.
7
- */
8
- Object.defineProperty(exports, "__esModule", { value: true });
9
- exports.SEARCH_TOOL_DEFINITIONS = exports.searchTool = void 0;
10
- const search_js_1 = require("../executors/search.js");
11
- exports.searchTool = {
12
- name: "grep",
13
- description: "Search for patterns in files using regular expressions. Indexed for sub-millisecond speed. Builds index automatically on first use. Supports regex, literal strings, file type filters, and glob patterns.",
14
- category: "filesystem",
15
- parameters: {
16
- type: "object",
17
- properties: {
18
- pattern: {
19
- type: "string",
20
- description: "Regex pattern to search for. Use literal: true for exact string matching.",
21
- },
22
- directory: {
23
- type: "string",
24
- description: "Directory to search in (default: current working directory)",
25
- default: ".",
26
- },
27
- fileGlob: {
28
- type: "string",
29
- description: "Glob pattern to filter files (e.g. '*.ts', 'src/**/*.rs')",
30
- },
31
- fileType: {
32
- type: "string",
33
- description: "File extension filter (e.g. 'ts', 'rs', 'py'). Simpler than glob for single types.",
34
- },
35
- caseSensitive: {
36
- type: "boolean",
37
- description: "Case-sensitive matching (default: true)",
38
- default: true,
39
- },
40
- literal: {
41
- type: "boolean",
42
- description: "Treat pattern as a literal string, not regex (default: false)",
43
- default: false,
44
- },
45
- maxResults: {
46
- type: "number",
47
- description: "Maximum number of matches to return (default: 1000)",
48
- default: 1000,
49
- },
50
- context: {
51
- type: "number",
52
- description: "Number of context lines before and after each match (default: 0)",
53
- default: 0,
54
- },
55
- },
56
- required: ["pattern"],
57
- },
58
- riskLevel: "safe",
59
- isReadOnly: true,
60
- loadingTier: "always",
61
- execute: search_js_1.executeSearch,
62
- };
63
- exports.SEARCH_TOOL_DEFINITIONS = [exports.searchTool];
@@ -1,72 +0,0 @@
1
- "use strict";
2
- /**
3
- * Session History tool definitions
4
- *
5
- * Tools: session_history (1 tool with multi-action pattern)
6
- *
7
- * Provides list, search, get, current, stats, delete, and set_title
8
- * actions against the SessionHistory SQLite database.
9
- */
10
- Object.defineProperty(exports, "__esModule", { value: true });
11
- exports.SESSION_HISTORY_TOOL_DEFINITIONS = void 0;
12
- const session_history_js_1 = require("../executors/session-history.js");
13
- const sessionHistory = {
14
- name: "session_history",
15
- description: "List, search, and manage conversation session history. Actions: " +
16
- "'list' shows recent sessions, 'search' finds sessions by message content (full-text search), " +
17
- "'get' retrieves a full session transcript, 'current' shows current session info, " +
18
- "'stats' shows session statistics, 'delete' removes a session, " +
19
- "'set_title' renames a session.",
20
- category: "memory",
21
- parameters: {
22
- type: "object",
23
- properties: {
24
- action: {
25
- type: "string",
26
- enum: ["list", "search", "get", "current", "stats", "delete", "set_title"],
27
- description: "Action to perform",
28
- },
29
- query: {
30
- type: "string",
31
- description: "Search query (required for 'search' action)",
32
- },
33
- sessionId: {
34
- type: "string",
35
- description: "Session ID or prefix — 8+ chars for prefix match, full UUID for exact match (required for 'get', 'delete', 'set_title')",
36
- },
37
- title: {
38
- type: "string",
39
- description: "New title (required for 'set_title' action)",
40
- },
41
- limit: {
42
- type: "number",
43
- description: "Maximum number of results to return (default 20)",
44
- default: 20,
45
- },
46
- offset: {
47
- type: "number",
48
- description: "Pagination offset (default 0)",
49
- default: 0,
50
- },
51
- messageLimit: {
52
- type: "number",
53
- description: "Maximum messages to return per session for 'get' action (default 50)",
54
- default: 50,
55
- },
56
- },
57
- required: ["action"],
58
- },
59
- riskLevel: "moderate",
60
- isReadOnly: false,
61
- loadingTier: "deferred",
62
- // Only 'delete' needs confirmation — all other actions are safe
63
- skipApprovalForInput: (input) => {
64
- const i = input;
65
- return i?.action !== "delete";
66
- },
67
- execute: (input, ctx) => {
68
- return (0, session_history_js_1.executeSessionHistory)(input, ctx);
69
- },
70
- };
71
- /** Session History tool definitions (1) */
72
- exports.SESSION_HISTORY_TOOL_DEFINITIONS = [sessionHistory];
@@ -1,184 +0,0 @@
1
- "use strict";
2
- /**
3
- * Shell tool definitions
4
- *
5
- * Tools: bash, exec, spawn, kill, write_stdin, list_processes, wait_process (7 tools)
6
- */
7
- Object.defineProperty(exports, "__esModule", { value: true });
8
- exports.SHELL_TOOL_DEFINITIONS = void 0;
9
- const index_js_1 = require("../executors/index.js");
10
- const shell_js_1 = require("../executors/shell.js");
11
- const shell_safety_js_1 = require("../executors/shell-safety.js");
12
- const bash = {
13
- name: "bash",
14
- description: "Execute a shell command in a bash environment. Returns stdout and stderr.",
15
- category: "shell",
16
- parameters: {
17
- type: "object",
18
- properties: {
19
- command: { type: "string", description: "Command to execute" },
20
- cwd: { type: "string", description: "Working directory" },
21
- env: { type: "object", description: "Environment variables" },
22
- timeout: { type: "number", description: "Timeout in milliseconds" },
23
- },
24
- required: ["command"],
25
- },
26
- riskLevel: "dangerous",
27
- requiresConfirmation: true,
28
- isReadOnly: false,
29
- loadingTier: "always",
30
- skipApprovalForInput: (input) => {
31
- const cmd = input?.command;
32
- return typeof cmd === "string" && (0, shell_safety_js_1.classifyCommand)(cmd) === "safe";
33
- },
34
- execute: index_js_1.executeBash,
35
- };
36
- const exec = {
37
- name: "exec",
38
- description: "Execute a program directly without shell interpretation. Safer than bash for untrusted input.",
39
- category: "shell",
40
- parameters: {
41
- type: "object",
42
- properties: {
43
- program: { type: "string", description: "Program to execute" },
44
- args: {
45
- type: "array",
46
- items: { type: "string" },
47
- description: "Command arguments",
48
- },
49
- cwd: { type: "string", description: "Working directory" },
50
- env: { type: "object", description: "Environment variables" },
51
- timeout: { type: "number", description: "Timeout in milliseconds" },
52
- },
53
- required: ["program"],
54
- },
55
- riskLevel: "dangerous",
56
- isReadOnly: false,
57
- loadingTier: "always",
58
- execute: index_js_1.executeExec,
59
- };
60
- const spawn = {
61
- name: "spawn",
62
- description: "Start a long-running process in the background. Returns a process ID for management.",
63
- category: "shell",
64
- parameters: {
65
- type: "object",
66
- properties: {
67
- program: { type: "string", description: "Program to spawn" },
68
- args: {
69
- type: "array",
70
- items: { type: "string" },
71
- description: "Command arguments",
72
- },
73
- cwd: { type: "string", description: "Working directory" },
74
- env: { type: "object", description: "Environment variables" },
75
- interactive: {
76
- type: "boolean",
77
- description: "Start as interactive PTY session (enables write_stdin). Default: false",
78
- default: false,
79
- },
80
- },
81
- required: ["program"],
82
- },
83
- riskLevel: "dangerous",
84
- isReadOnly: false,
85
- loadingTier: "always",
86
- execute: index_js_1.executeSpawn,
87
- };
88
- const kill = {
89
- name: "kill",
90
- description: "Terminate a running process by its process ID.",
91
- category: "shell",
92
- parameters: {
93
- type: "object",
94
- properties: {
95
- pid: { type: "number", description: "Process ID to kill" },
96
- signal: {
97
- type: "string",
98
- description: "Signal to send",
99
- default: "SIGTERM",
100
- },
101
- },
102
- required: ["pid"],
103
- },
104
- riskLevel: "dangerous",
105
- requiresConfirmation: true,
106
- isReadOnly: false,
107
- loadingTier: "always",
108
- execute: index_js_1.executeKill,
109
- };
110
- const write_stdin = {
111
- name: "write_stdin",
112
- description: "Send input to an interactive PTY session by PID. Use after spawning a process with interactive=true. Returns recent output from the session.",
113
- category: "shell",
114
- parameters: {
115
- type: "object",
116
- properties: {
117
- pid: { type: "number", description: "PID of the interactive process" },
118
- input: { type: "string", description: "Input string to send to the process" },
119
- timeout: {
120
- type: "number",
121
- description: "Milliseconds to wait for output after writing (max 30000)",
122
- },
123
- },
124
- required: ["pid", "input"],
125
- },
126
- riskLevel: "moderate",
127
- isReadOnly: false,
128
- loadingTier: "always",
129
- execute: index_js_1.executeWriteStdin,
130
- };
131
- const list_processes = {
132
- name: "list_processes",
133
- description: "List tracked shell processes started in this session with metadata and runtime status.",
134
- category: "shell",
135
- parameters: {
136
- type: "object",
137
- properties: {
138
- includeExited: {
139
- type: "boolean",
140
- description: "Include recently exited processes from registry history (default: false).",
141
- default: false,
142
- },
143
- },
144
- required: [],
145
- },
146
- riskLevel: "safe",
147
- isReadOnly: true,
148
- loadingTier: "always",
149
- execute: shell_js_1.executeListProcesses,
150
- };
151
- const wait_process = {
152
- name: "wait_process",
153
- description: "Wait for a tracked process to exit and return exit metadata. Fails on timeout.",
154
- category: "shell",
155
- parameters: {
156
- type: "object",
157
- properties: {
158
- pid: { type: "number", description: "PID of the process to wait for" },
159
- timeoutMs: {
160
- type: "number",
161
- description: "Maximum milliseconds to wait (max 300000, default 30000).",
162
- },
163
- timeout: {
164
- type: "number",
165
- description: "Deprecated alias for timeoutMs.",
166
- },
167
- },
168
- required: ["pid"],
169
- },
170
- riskLevel: "safe",
171
- isReadOnly: true,
172
- loadingTier: "always",
173
- execute: shell_js_1.executeWaitProcess,
174
- };
175
- /** Shell tool definitions (7) */
176
- exports.SHELL_TOOL_DEFINITIONS = [
177
- bash,
178
- exec,
179
- spawn,
180
- kill,
181
- write_stdin,
182
- list_processes,
183
- wait_process,
184
- ];