@wrongstack/tools 0.255.0 → 0.256.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/dist/builtin.js CHANGED
@@ -832,6 +832,7 @@ var auditTool = {
832
832
  usageHint: "CRITICAL SECURITY TOOL:\n\n- Run regularly and especially before any release.\n- Use `level` to focus on high/critical issues.\n- `fix` can attempt automatic remediation for some vulnerabilities.\nThis is one of the most important tools for supply chain security.",
833
833
  permission: "confirm",
834
834
  mutating: false,
835
+ capabilities: ["shell.restricted"],
835
836
  timeoutMs: 6e4,
836
837
  inputSchema: {
837
838
  type: "object",
@@ -1277,6 +1278,7 @@ var batchToolUseTool = {
1277
1278
  permission: "confirm",
1278
1279
  mutating: true,
1279
1280
  timeoutMs: 12e4,
1281
+ capabilities: ["tool.mutate.any"],
1280
1282
  inputSchema: {
1281
1283
  type: "object",
1282
1284
  properties: {
@@ -4248,6 +4250,7 @@ var documentTool = {
4248
4250
  permission: "auto",
4249
4251
  mutating: false,
4250
4252
  timeoutMs: 3e4,
4253
+ capabilities: ["fs.read"],
4251
4254
  inputSchema: {
4252
4255
  type: "object",
4253
4256
  properties: {
@@ -6043,6 +6046,7 @@ var jsonTool = {
6043
6046
  permission: "auto",
6044
6047
  mutating: false,
6045
6048
  timeoutMs: 5e3,
6049
+ capabilities: ["fs.read"],
6046
6050
  inputSchema: {
6047
6051
  type: "object",
6048
6052
  properties: {
@@ -6166,6 +6170,7 @@ var lintTool = {
6166
6170
  permission: "confirm",
6167
6171
  mutating: false,
6168
6172
  timeoutMs: 6e4,
6173
+ capabilities: ["shell.restricted"],
6169
6174
  inputSchema: {
6170
6175
  type: "object",
6171
6176
  properties: {
@@ -6258,6 +6263,7 @@ var logsTool = {
6258
6263
  permission: "confirm",
6259
6264
  mutating: false,
6260
6265
  timeoutMs: 3e4,
6266
+ capabilities: ["shell.restricted"],
6261
6267
  inputSchema: {
6262
6268
  type: "object",
6263
6269
  properties: {
@@ -6455,9 +6461,23 @@ var outdatedTool = {
6455
6461
  name: "outdated",
6456
6462
  category: "Package Management",
6457
6463
  description: "Check for outdated dependencies in the project. Reports current, wanted (semver range), and latest versions available.",
6458
- usageHint: "MAINTENANCE & SECURITY TOOL:\n\n- Run periodically or before dependency-related work.\n- Helps surface packages that may need updates for security or features.\n- Safe, read-only operation.\nUse the output to decide on upgrades. Prefer this over manual shell commands for dependency hygiene.",
6459
- permission: "auto",
6460
- mutating: false,
6464
+ usageHint: "MAINTENANCE & SECURITY TOOL:\n\n- Run periodically or before dependency-related work.\n- Helps surface packages that may need updates for security or features.\n- Hits the package registry over HTTP, so it is NOT purely local \u2014 flagged as mutating for the confirmation gate.\nUse the output to decide on upgrades. Prefer this over manual shell commands for dependency hygiene.",
6465
+ permission: "confirm",
6466
+ // Network side-effecting (registry HTTP). Pairs with `mutating: true`
6467
+ // so the H7 invariant test (`no auto-permission tool declares
6468
+ // mutating: true`) passes — a tool claiming `'auto'` must be purely
6469
+ // read-only, but `outdated` makes outbound HTTP calls to the
6470
+ // registry. The 'confirm' permission routes the call through the
6471
+ // tool.confirm_needed flow on every invocation. M-1 originally
6472
+ // fixed four sibling tools (mcp_control, shellcheck, shellcheck_scan,
6473
+ // web_search) but missed this one; applying the same contract here.
6474
+ mutating: true,
6475
+ // Capability is just "network" — the tool only hits the package
6476
+ // registry over HTTP, never touches the filesystem or runs shell.
6477
+ // The H7 invariant test requires this array to be non-empty for
6478
+ // any mutating:true tool (meta-tools whitelisted). See
6479
+ // tests/permission-mutating-invariant.test.ts:92.
6480
+ capabilities: ["network"],
6461
6481
  timeoutMs: 6e4,
6462
6482
  inputSchema: {
6463
6483
  type: "object",
@@ -7910,6 +7930,7 @@ var testTool = {
7910
7930
  permission: "confirm",
7911
7931
  mutating: false,
7912
7932
  timeoutMs: 12e4,
7933
+ capabilities: ["shell.restricted"],
7913
7934
  inputSchema: {
7914
7935
  type: "object",
7915
7936
  properties: {
@@ -8066,6 +8087,7 @@ var todoTool = {
8066
8087
  mutating: false,
8067
8088
  // mutates only conversation state (ctx.todos), not external state — no confirmation needed
8068
8089
  timeoutMs: 1e3,
8090
+ capabilities: ["session.todo"],
8069
8091
  inputSchema: {
8070
8092
  type: "object",
8071
8093
  properties: {
@@ -8173,6 +8195,7 @@ var toolHelpTool = {
8173
8195
  permission: "auto",
8174
8196
  mutating: false,
8175
8197
  timeoutMs: 5e3,
8198
+ capabilities: ["tool.meta"],
8176
8199
  inputSchema: {
8177
8200
  type: "object",
8178
8201
  properties: {
@@ -8295,6 +8318,7 @@ var toolSearchTool = {
8295
8318
  permission: "auto",
8296
8319
  mutating: false,
8297
8320
  timeoutMs: 1e3,
8321
+ capabilities: ["tool.meta"],
8298
8322
  inputSchema: {
8299
8323
  type: "object",
8300
8324
  properties: {
@@ -8373,6 +8397,7 @@ var toolUseTool = {
8373
8397
  permission: "confirm",
8374
8398
  mutating: true,
8375
8399
  timeoutMs: 6e4,
8400
+ capabilities: ["tool.mutate.any"],
8376
8401
  inputSchema: {
8377
8402
  type: "object",
8378
8403
  properties: {
@@ -8617,6 +8642,7 @@ var typecheckTool = {
8617
8642
  permission: "confirm",
8618
8643
  mutating: false,
8619
8644
  timeoutMs: 12e4,
8645
+ capabilities: ["shell.restricted"],
8620
8646
  inputSchema: {
8621
8647
  type: "object",
8622
8648
  properties: {
@@ -8757,6 +8783,34 @@ var writeTool = {
8757
8783
  };
8758
8784
 
8759
8785
  // src/builtin.ts
8786
+ var OPTIONAL_TOOLS = [
8787
+ installTool,
8788
+ auditTool,
8789
+ outdatedTool,
8790
+ logsTool,
8791
+ documentTool,
8792
+ scaffoldTool,
8793
+ toolSearchTool,
8794
+ toolUseTool,
8795
+ batchToolUseTool,
8796
+ toolHelpTool,
8797
+ codebaseIndexTool,
8798
+ codebaseSearchTool,
8799
+ codebaseStatsTool,
8800
+ setWorkingDirTool
8801
+ ];
8802
+ var TIER1_TOOLS = [
8803
+ readTool,
8804
+ writeTool,
8805
+ editTool,
8806
+ bashTool,
8807
+ grepTool,
8808
+ globTool,
8809
+ diffTool,
8810
+ patchTool,
8811
+ jsonTool,
8812
+ searchTool
8813
+ ];
8760
8814
  var builtinTools = [
8761
8815
  readTool,
8762
8816
  writeTool,
@@ -8796,6 +8850,6 @@ var builtinTools = [
8796
8850
  setWorkingDirTool
8797
8851
  ];
8798
8852
 
8799
- export { builtinTools };
8853
+ export { OPTIONAL_TOOLS, TIER1_TOOLS, builtinTools };
8800
8854
  //# sourceMappingURL=builtin.js.map
8801
8855
  //# sourceMappingURL=builtin.js.map