@easynet/agent-tool 1.0.18 → 1.0.19

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 (71) hide show
  1. package/dist/api/expose/mcpServer.d.ts.map +1 -1
  2. package/dist/api/expose/openapi.d.ts +2 -2
  3. package/dist/api/expose/openapi.d.ts.map +1 -1
  4. package/dist/api/main.cjs +17 -16
  5. package/dist/api/main.js +6 -5
  6. package/dist/canonicalCoreSchemas-DNBAHSUC.js +4 -0
  7. package/dist/{canonicalCoreSchemas-YLHVHYJZ.js.map → canonicalCoreSchemas-DNBAHSUC.js.map} +1 -1
  8. package/dist/canonicalCoreSchemas-IBTSIPJV.cjs +21 -0
  9. package/dist/{canonicalCoreSchemas-CTW6CCFY.cjs.map → canonicalCoreSchemas-IBTSIPJV.cjs.map} +1 -1
  10. package/dist/{chunk-FR2CXERF.js → chunk-46XYOB3H.js} +23 -20
  11. package/dist/chunk-46XYOB3H.js.map +1 -0
  12. package/dist/{chunk-6F5JHLZ7.cjs → chunk-EAI37B5W.cjs} +23 -20
  13. package/dist/chunk-EAI37B5W.cjs.map +1 -0
  14. package/dist/{chunk-SOFUWEZ6.cjs → chunk-FGGTT32N.cjs} +9 -3
  15. package/dist/chunk-FGGTT32N.cjs.map +1 -0
  16. package/dist/{chunk-ETWGKCOP.js → chunk-GGKQQR54.js} +9 -8
  17. package/dist/chunk-GGKQQR54.js.map +1 -0
  18. package/dist/{chunk-5SWSNVMI.js → chunk-GWBJEGS7.js} +9 -4
  19. package/dist/chunk-GWBJEGS7.js.map +1 -0
  20. package/dist/{chunk-OXTQULXH.cjs → chunk-H2UMNHDE.cjs} +14 -13
  21. package/dist/chunk-H2UMNHDE.cjs.map +1 -0
  22. package/dist/{chunk-ZIFQWIN3.cjs → chunk-HISF2FEL.cjs} +18 -18
  23. package/dist/{chunk-ZIFQWIN3.cjs.map → chunk-HISF2FEL.cjs.map} +1 -1
  24. package/dist/{chunk-AE6FSNGY.js → chunk-IU35EFPK.js} +14 -10
  25. package/dist/chunk-IU35EFPK.js.map +1 -0
  26. package/dist/{chunk-EMI67SPN.cjs → chunk-NNOTTUB2.cjs} +23 -20
  27. package/dist/chunk-NNOTTUB2.cjs.map +1 -0
  28. package/dist/{chunk-ZNJBRLKN.cjs → chunk-ONIBCU2Y.cjs} +14 -10
  29. package/dist/chunk-ONIBCU2Y.cjs.map +1 -0
  30. package/dist/{chunk-7MRBWT2T.js → chunk-QB5ALDM3.js} +4 -4
  31. package/dist/{chunk-7MRBWT2T.js.map → chunk-QB5ALDM3.js.map} +1 -1
  32. package/dist/{chunk-YK2MQDNJ.cjs → chunk-TPWEGGKQ.cjs} +11 -11
  33. package/dist/{chunk-YK2MQDNJ.cjs.map → chunk-TPWEGGKQ.cjs.map} +1 -1
  34. package/dist/{chunk-RKN4PT7P.js → chunk-TTYAOTOR.js} +9 -6
  35. package/dist/chunk-TTYAOTOR.js.map +1 -0
  36. package/dist/{chunk-7WI5VK5G.js → chunk-Y33OLGAJ.js} +3 -3
  37. package/dist/{chunk-7WI5VK5G.js.map → chunk-Y33OLGAJ.js.map} +1 -1
  38. package/dist/core/index.cjs +4 -4
  39. package/dist/core/index.js +1 -1
  40. package/dist/core/registry/ToolRegistry.d.ts +2 -2
  41. package/dist/core/registry/ToolRegistry.d.ts.map +1 -1
  42. package/dist/core/runtime/PTCRuntimePipeline.d.ts +1 -1
  43. package/dist/core/runtime/PTCRuntimePipeline.d.ts.map +1 -1
  44. package/dist/core/runtime.cjs +6 -5
  45. package/dist/core/runtime.js +2 -1
  46. package/dist/core/types/ToolSpec.d.ts +5 -0
  47. package/dist/core/types/ToolSpec.d.ts.map +1 -1
  48. package/dist/index.cjs +77 -73
  49. package/dist/index.d.ts +1 -1
  50. package/dist/index.d.ts.map +1 -1
  51. package/dist/index.js +10 -10
  52. package/dist/tools/util/canonicalCoreSchemas.d.ts.map +1 -1
  53. package/dist/tools/util/toolDescriptor.d.ts +2 -13
  54. package/dist/tools/util/toolDescriptor.d.ts.map +1 -1
  55. package/dist/utils/cli/index.cjs +23 -23
  56. package/dist/utils/cli/index.cjs.map +1 -1
  57. package/dist/utils/cli/index.js +8 -8
  58. package/dist/utils/cli/index.js.map +1 -1
  59. package/package.json +1 -1
  60. package/dist/canonicalCoreSchemas-CTW6CCFY.cjs +0 -20
  61. package/dist/canonicalCoreSchemas-YLHVHYJZ.js +0 -3
  62. package/dist/chunk-5SWSNVMI.js.map +0 -1
  63. package/dist/chunk-6F5JHLZ7.cjs.map +0 -1
  64. package/dist/chunk-AE6FSNGY.js.map +0 -1
  65. package/dist/chunk-EMI67SPN.cjs.map +0 -1
  66. package/dist/chunk-ETWGKCOP.js.map +0 -1
  67. package/dist/chunk-FR2CXERF.js.map +0 -1
  68. package/dist/chunk-OXTQULXH.cjs.map +0 -1
  69. package/dist/chunk-RKN4PT7P.js.map +0 -1
  70. package/dist/chunk-SOFUWEZ6.cjs.map +0 -1
  71. package/dist/chunk-ZNJBRLKN.cjs.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"mcpServer.d.ts","sourceRoot":"","sources":["../../../src/api/expose/mcpServer.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AACjE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AACnE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAIpE,MAAM,WAAW,gBAAgB;IAC/B,0CAA0C;IAC1C,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,wCAAwC;IACxC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,kEAAkE;IAClE,kBAAkB,CAAC,EAAE,MAAM,WAAW,CAAC;CACxC;AAWD,MAAM,WAAW,eAAe;IAC9B,8BAA8B;IAC9B,MAAM,EAAE;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B,OAAO,CAAC,wBAAwB,CAAC,CAAC;AAsCrC,MAAM,WAAW,oCAAqC,SAAQ,gBAAgB;IAC5E,8CAA8C;IAC9C,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,0CAA0C;IAC1C,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,2BAA2B;IAC3B,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;;GAGG;AACH,wBAAgB,6BAA6B,CAC3C,OAAO,EAAE,UAAU,EACnB,OAAO,CAAC,EAAE,oCAAoC,GAC7C,OAAO,CAAC,6BAA6B,CAAC,CAAC;AAE1C,wBAAgB,6BAA6B,CAC3C,MAAM,EAAE,oBAAoB,EAC5B,OAAO,CAAC,EAAE,oCAAoC,GAC7C,OAAO,CAAC,6BAA6B,CAAC,CAAC;AAqC1C;;;GAGG;AACH,wBAAsB,qBAAqB,CACzC,OAAO,EAAE,UAAU,EACnB,OAAO,GAAE,gBAAqB,GAC7B,OAAO,CAAC,eAAe,CAAC,CAI1B"}
@@ -11,9 +11,9 @@ export interface OpenAPISpecOptions {
11
11
  /** Base path for the API (default: "") */
12
12
  basePath?: string;
13
13
  }
14
- /** Tool name to URL path segment: "core/fs.readText" -> "core~fs.readText" */
14
+ /** Tool name to URL path segment: "core.fs.readText" -> "core~fs~readText" (dots to ~ in path) */
15
15
  export declare function toolNameToSlug(name: string): string;
16
- /** URL path segment back to tool name: "core~fs.readText" -> "core/fs.readText" */
16
+ /** URL path segment back to tool name: "core~fs~readText" -> "core.fs.readText" */
17
17
  export declare function slugToToolName(slug: string): string;
18
18
  /**
19
19
  * Build OpenAPI 3.0 document from the tool registry.
@@ -1 +1 @@
1
- {"version":3,"file":"openapi.d.ts","sourceRoot":"","sources":["../../../src/api/expose/openapi.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qCAAqC,CAAC;AAIxE,MAAM,WAAW,kBAAkB;IACjC,sCAAsC;IACtC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,qCAAqC;IACrC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,0CAA0C;IAC1C,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,8EAA8E;AAC9E,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEnD;AAED,mFAAmF;AACnF,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEnD;AAsBD;;;GAGG;AACH,wBAAgB,kBAAkB,CAChC,QAAQ,EAAE,YAAY,EACtB,OAAO,GAAE,kBAAuB,GAC/B,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CA2HzB"}
1
+ {"version":3,"file":"openapi.d.ts","sourceRoot":"","sources":["../../../src/api/expose/openapi.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qCAAqC,CAAC;AAIxE,MAAM,WAAW,kBAAkB;IACjC,sCAAsC;IACtC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,qCAAqC;IACrC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,0CAA0C;IAC1C,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,kGAAkG;AAClG,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEnD;AAED,mFAAmF;AACnF,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEnD;AAsBD;;;GAGG;AACH,wBAAgB,kBAAkB,CAChC,QAAQ,EAAE,YAAY,EACtB,OAAO,GAAE,kBAAuB,GAC/B,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CA2HzB"}
package/dist/api/main.cjs CHANGED
@@ -1,56 +1,57 @@
1
1
  'use strict';
2
2
 
3
- var chunkZIFQWIN3_cjs = require('../chunk-ZIFQWIN3.cjs');
4
- var chunkOXTQULXH_cjs = require('../chunk-OXTQULXH.cjs');
5
- var chunkEMI67SPN_cjs = require('../chunk-EMI67SPN.cjs');
6
- require('../chunk-ZNJBRLKN.cjs');
7
- require('../chunk-6F5JHLZ7.cjs');
3
+ var chunkHISF2FEL_cjs = require('../chunk-HISF2FEL.cjs');
4
+ var chunkH2UMNHDE_cjs = require('../chunk-H2UMNHDE.cjs');
5
+ var chunkNNOTTUB2_cjs = require('../chunk-NNOTTUB2.cjs');
6
+ require('../chunk-ONIBCU2Y.cjs');
7
+ require('../chunk-EAI37B5W.cjs');
8
+ require('../chunk-FGGTT32N.cjs');
8
9
 
9
10
 
10
11
 
11
12
  Object.defineProperty(exports, "createAgentTools", {
12
13
  enumerable: true,
13
- get: function () { return chunkZIFQWIN3_cjs.createAgentTools; }
14
+ get: function () { return chunkHISF2FEL_cjs.createAgentTools; }
14
15
  });
15
16
  Object.defineProperty(exports, "createLangChainToolsAsync", {
16
17
  enumerable: true,
17
- get: function () { return chunkZIFQWIN3_cjs.createLangChainToolsAsync; }
18
+ get: function () { return chunkHISF2FEL_cjs.createLangChainToolsAsync; }
18
19
  });
19
20
  Object.defineProperty(exports, "createHttpService", {
20
21
  enumerable: true,
21
- get: function () { return chunkOXTQULXH_cjs.createHttpService; }
22
+ get: function () { return chunkH2UMNHDE_cjs.createHttpService; }
22
23
  });
23
24
  Object.defineProperty(exports, "createMCPServer", {
24
25
  enumerable: true,
25
- get: function () { return chunkOXTQULXH_cjs.createMCPServer; }
26
+ get: function () { return chunkH2UMNHDE_cjs.createMCPServer; }
26
27
  });
27
28
  Object.defineProperty(exports, "createMCPServerStreamableHttp", {
28
29
  enumerable: true,
29
- get: function () { return chunkOXTQULXH_cjs.createMCPServerStreamableHttp; }
30
+ get: function () { return chunkH2UMNHDE_cjs.createMCPServerStreamableHttp; }
30
31
  });
31
32
  Object.defineProperty(exports, "createMCPStreamableHttpHandler", {
32
33
  enumerable: true,
33
- get: function () { return chunkOXTQULXH_cjs.createMCPStreamableHttpHandler; }
34
+ get: function () { return chunkH2UMNHDE_cjs.createMCPStreamableHttpHandler; }
34
35
  });
35
36
  Object.defineProperty(exports, "createOpenAPIServer", {
36
37
  enumerable: true,
37
- get: function () { return chunkOXTQULXH_cjs.createHttpService; }
38
+ get: function () { return chunkH2UMNHDE_cjs.createHttpService; }
38
39
  });
39
40
  Object.defineProperty(exports, "runMCPServerOverStdio", {
40
41
  enumerable: true,
41
- get: function () { return chunkOXTQULXH_cjs.runMCPServerOverStdio; }
42
+ get: function () { return chunkH2UMNHDE_cjs.runMCPServerOverStdio; }
42
43
  });
43
44
  Object.defineProperty(exports, "PTCRuntime", {
44
45
  enumerable: true,
45
- get: function () { return chunkEMI67SPN_cjs.PTCRuntime; }
46
+ get: function () { return chunkNNOTTUB2_cjs.PTCRuntime; }
46
47
  });
47
48
  Object.defineProperty(exports, "createRuntimeFromConfig", {
48
49
  enumerable: true,
49
- get: function () { return chunkEMI67SPN_cjs.createRuntimeFromConfig; }
50
+ get: function () { return chunkNNOTTUB2_cjs.createRuntimeFromConfig; }
50
51
  });
51
52
  Object.defineProperty(exports, "createRuntimeFromConfigSync", {
52
53
  enumerable: true,
53
- get: function () { return chunkEMI67SPN_cjs.createRuntimeFromConfigSync; }
54
+ get: function () { return chunkNNOTTUB2_cjs.createRuntimeFromConfigSync; }
54
55
  });
55
56
  //# sourceMappingURL=main.cjs.map
56
57
  //# sourceMappingURL=main.cjs.map
package/dist/api/main.js CHANGED
@@ -1,7 +1,8 @@
1
- export { createAgentTools, createLangChainToolsAsync } from '../chunk-7WI5VK5G.js';
2
- export { createHttpService, createMCPServer, createMCPServerStreamableHttp, createMCPStreamableHttpHandler, createHttpService as createOpenAPIServer, runMCPServerOverStdio } from '../chunk-ETWGKCOP.js';
3
- export { PTCRuntime, createRuntimeFromConfig, createRuntimeFromConfigSync } from '../chunk-RKN4PT7P.js';
4
- import '../chunk-AE6FSNGY.js';
5
- import '../chunk-FR2CXERF.js';
1
+ export { createAgentTools, createLangChainToolsAsync } from '../chunk-Y33OLGAJ.js';
2
+ export { createHttpService, createMCPServer, createMCPServerStreamableHttp, createMCPStreamableHttpHandler, createHttpService as createOpenAPIServer, runMCPServerOverStdio } from '../chunk-GGKQQR54.js';
3
+ export { PTCRuntime, createRuntimeFromConfig, createRuntimeFromConfigSync } from '../chunk-TTYAOTOR.js';
4
+ import '../chunk-IU35EFPK.js';
5
+ import '../chunk-46XYOB3H.js';
6
+ import '../chunk-GWBJEGS7.js';
6
7
  //# sourceMappingURL=main.js.map
7
8
  //# sourceMappingURL=main.js.map
@@ -0,0 +1,4 @@
1
+ export { CORE_TOOL_SCHEMAS, enrichSpecWithCanonicalSchema, isGenericSchema } from './chunk-46XYOB3H.js';
2
+ import './chunk-GWBJEGS7.js';
3
+ //# sourceMappingURL=canonicalCoreSchemas-DNBAHSUC.js.map
4
+ //# sourceMappingURL=canonicalCoreSchemas-DNBAHSUC.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","file":"canonicalCoreSchemas-YLHVHYJZ.js"}
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"canonicalCoreSchemas-DNBAHSUC.js"}
@@ -0,0 +1,21 @@
1
+ 'use strict';
2
+
3
+ var chunkEAI37B5W_cjs = require('./chunk-EAI37B5W.cjs');
4
+ require('./chunk-FGGTT32N.cjs');
5
+
6
+
7
+
8
+ Object.defineProperty(exports, "CORE_TOOL_SCHEMAS", {
9
+ enumerable: true,
10
+ get: function () { return chunkEAI37B5W_cjs.CORE_TOOL_SCHEMAS; }
11
+ });
12
+ Object.defineProperty(exports, "enrichSpecWithCanonicalSchema", {
13
+ enumerable: true,
14
+ get: function () { return chunkEAI37B5W_cjs.enrichSpecWithCanonicalSchema; }
15
+ });
16
+ Object.defineProperty(exports, "isGenericSchema", {
17
+ enumerable: true,
18
+ get: function () { return chunkEAI37B5W_cjs.isGenericSchema; }
19
+ });
20
+ //# sourceMappingURL=canonicalCoreSchemas-IBTSIPJV.cjs.map
21
+ //# sourceMappingURL=canonicalCoreSchemas-IBTSIPJV.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","file":"canonicalCoreSchemas-CTW6CCFY.cjs"}
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"canonicalCoreSchemas-IBTSIPJV.cjs"}
@@ -1,3 +1,5 @@
1
+ import { normalizeToolName } from './chunk-GWBJEGS7.js';
2
+
1
3
  // src/tools/util/canonicalCoreSchemas.ts
2
4
  var S = (o) => o;
3
5
  var CORE_TOOL_SCHEMAS = {
@@ -25,7 +27,7 @@ var CORE_TOOL_SCHEMAS = {
25
27
  }
26
28
  })
27
29
  },
28
- "core/fs.writeText": {
30
+ "core.fs.writeText": {
29
31
  inputSchema: S({
30
32
  type: "object",
31
33
  properties: {
@@ -36,7 +38,7 @@ var CORE_TOOL_SCHEMAS = {
36
38
  additionalProperties: false
37
39
  })
38
40
  },
39
- "core/fs.listDir": {
41
+ "core.fs.listDir": {
40
42
  inputSchema: S({
41
43
  type: "object",
42
44
  properties: {
@@ -47,7 +49,7 @@ var CORE_TOOL_SCHEMAS = {
47
49
  additionalProperties: false
48
50
  })
49
51
  },
50
- "core/fs.searchText": {
52
+ "core.fs.searchText": {
51
53
  inputSchema: S({
52
54
  type: "object",
53
55
  properties: {
@@ -59,7 +61,7 @@ var CORE_TOOL_SCHEMAS = {
59
61
  additionalProperties: false
60
62
  })
61
63
  },
62
- "core/fs.sha256": {
64
+ "core.fs.sha256": {
63
65
  inputSchema: S({
64
66
  type: "object",
65
67
  properties: {
@@ -69,7 +71,7 @@ var CORE_TOOL_SCHEMAS = {
69
71
  additionalProperties: false
70
72
  })
71
73
  },
72
- "core/fs.deletePath": {
74
+ "core.fs.deletePath": {
73
75
  inputSchema: S({
74
76
  type: "object",
75
77
  properties: {
@@ -79,7 +81,7 @@ var CORE_TOOL_SCHEMAS = {
79
81
  additionalProperties: false
80
82
  })
81
83
  },
82
- "core/http.fetchText": {
84
+ "core.http.fetchText": {
83
85
  inputSchema: S({
84
86
  type: "object",
85
87
  properties: {
@@ -91,7 +93,7 @@ var CORE_TOOL_SCHEMAS = {
91
93
  additionalProperties: false
92
94
  })
93
95
  },
94
- "core/http.fetchJson": {
96
+ "core.http.fetchJson": {
95
97
  inputSchema: S({
96
98
  type: "object",
97
99
  properties: {
@@ -102,7 +104,7 @@ var CORE_TOOL_SCHEMAS = {
102
104
  additionalProperties: false
103
105
  })
104
106
  },
105
- "core/http.downloadFile": {
107
+ "core.http.downloadFile": {
106
108
  inputSchema: S({
107
109
  type: "object",
108
110
  properties: {
@@ -114,7 +116,7 @@ var CORE_TOOL_SCHEMAS = {
114
116
  additionalProperties: false
115
117
  })
116
118
  },
117
- "core/http.head": {
119
+ "core.http.head": {
118
120
  inputSchema: S({
119
121
  type: "object",
120
122
  properties: {
@@ -124,7 +126,7 @@ var CORE_TOOL_SCHEMAS = {
124
126
  additionalProperties: false
125
127
  })
126
128
  },
127
- "core/http.duckduckgoSearch": {
129
+ "core.http.duckduckgoSearch": {
128
130
  inputSchema: S({
129
131
  type: "object",
130
132
  properties: {
@@ -135,7 +137,7 @@ var CORE_TOOL_SCHEMAS = {
135
137
  additionalProperties: false
136
138
  })
137
139
  },
138
- "core/http.fetchPageMainContent": {
140
+ "core.http.fetchPageMainContent": {
139
141
  inputSchema: S({
140
142
  type: "object",
141
143
  properties: {
@@ -146,7 +148,7 @@ var CORE_TOOL_SCHEMAS = {
146
148
  additionalProperties: false
147
149
  })
148
150
  },
149
- "core/util.json.select": {
151
+ "core.util.json.select": {
150
152
  inputSchema: S({
151
153
  type: "object",
152
154
  properties: {
@@ -157,7 +159,7 @@ var CORE_TOOL_SCHEMAS = {
157
159
  additionalProperties: false
158
160
  })
159
161
  },
160
- "core/util.text.truncate": {
162
+ "core.util.text.truncate": {
161
163
  inputSchema: S({
162
164
  type: "object",
163
165
  properties: {
@@ -168,7 +170,7 @@ var CORE_TOOL_SCHEMAS = {
168
170
  additionalProperties: false
169
171
  })
170
172
  },
171
- "core/util.hash.sha256Text": {
173
+ "core.util.hash.sha256Text": {
172
174
  inputSchema: S({
173
175
  type: "object",
174
176
  properties: {
@@ -178,7 +180,7 @@ var CORE_TOOL_SCHEMAS = {
178
180
  additionalProperties: false
179
181
  })
180
182
  },
181
- "core/util.time.now": {
183
+ "core.util.time.now": {
182
184
  inputSchema: S({
183
185
  type: "object",
184
186
  properties: {
@@ -187,7 +189,7 @@ var CORE_TOOL_SCHEMAS = {
187
189
  additionalProperties: false
188
190
  })
189
191
  },
190
- "core/util.template.render": {
192
+ "core.util.template.render": {
191
193
  inputSchema: S({
192
194
  type: "object",
193
195
  properties: {
@@ -198,7 +200,7 @@ var CORE_TOOL_SCHEMAS = {
198
200
  additionalProperties: false
199
201
  })
200
202
  },
201
- "core/exec.runCommand": {
203
+ "core.exec.runCommand": {
202
204
  inputSchema: S({
203
205
  type: "object",
204
206
  properties: {
@@ -222,7 +224,8 @@ function isGenericSchema(schema) {
222
224
  }
223
225
  function enrichSpecWithCanonicalSchema(spec) {
224
226
  if (spec.kind !== "core") return spec;
225
- const canonical = CORE_TOOL_SCHEMAS[spec.name];
227
+ const key = normalizeToolName(spec.name);
228
+ const canonical = CORE_TOOL_SCHEMAS[key];
226
229
  if (!canonical) return spec;
227
230
  const useInput = isGenericSchema(spec.inputSchema) ? canonical.inputSchema : spec.inputSchema;
228
231
  const useOutput = canonical.outputSchema && isGenericSchema(spec.outputSchema) ? canonical.outputSchema : spec.outputSchema;
@@ -235,5 +238,5 @@ function enrichSpecWithCanonicalSchema(spec) {
235
238
  }
236
239
 
237
240
  export { CORE_TOOL_SCHEMAS, enrichSpecWithCanonicalSchema, isGenericSchema };
238
- //# sourceMappingURL=chunk-FR2CXERF.js.map
239
- //# sourceMappingURL=chunk-FR2CXERF.js.map
241
+ //# sourceMappingURL=chunk-46XYOB3H.js.map
242
+ //# sourceMappingURL=chunk-46XYOB3H.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/tools/util/canonicalCoreSchemas.ts"],"names":[],"mappings":";;;AASA,IAAM,CAA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,KAAS,MAAA,EAAQ,OAAO,IAAA;AACjC,EAAA,MAAM,GAAA,GAAM,iBAAA,CAAkB,IAAA,CAAK,IAAI,CAAA;AACvC,EAAA,MAAM,SAAA,GAAY,kBAAkB,GAAG,CAAA;AACvC,EAAA,IAAI,CAAC,WAAW,OAAO,IAAA;AACvB,EAAA,MAAM,WAAW,eAAA,CAAgB,IAAA,CAAK,WAAW,CAAA,GAAI,SAAA,CAAU,cAAc,IAAA,CAAK,WAAA;AAClF,EAAA,MAAM,SAAA,GACJ,UAAU,YAAA,IAAgB,eAAA,CAAgB,KAAK,YAAY,CAAA,GACvD,SAAA,CAAU,YAAA,GACV,IAAA,CAAK,YAAA;AACX,EAAA,IAAI,aAAa,IAAA,CAAK,WAAA,IAAe,SAAA,KAAc,IAAA,CAAK,cAAc,OAAO,IAAA;AAC7E,EAAA,OAAO;AAAA,IACL,GAAG,IAAA;AAAA,IACH,WAAA,EAAa,QAAA;AAAA,IACb,YAAA,EAAc;AAAA,GAChB;AACF","file":"chunk-46XYOB3H.js","sourcesContent":["/**\n * Canonical input/output schemas for core (builtin) tools.\n * Used when the builtin package registers specs with generic schema\n * (type: object, additionalProperties: true) so CLI describe and OpenAPI show real schemas.\n */\n\nimport type { ToolSpec } from \"../../core/types/ToolSpec.js\";\nimport { normalizeToolName } from \"../../core/types/ToolSpec.js\";\n\nconst S = (o: object) => o as Record<string, unknown>;\n\n/** Canonical inputSchema (and optional outputSchema) by tool name (e.g. core/fs.readText). */\nexport const CORE_TOOL_SCHEMAS: Record<\n string,\n { inputSchema: object; outputSchema?: object }\n> = {\n \"core/fs.readText\": {\n inputSchema: S({\n type: \"object\",\n properties: {\n path: { type: \"string\", description: \"Path to the file (within sandbox)\" },\n maxBytes: { type: \"number\", description: \"Max bytes to read (optional)\" },\n },\n required: [\"path\"],\n additionalProperties: false,\n }),\n outputSchema: S({\n type: \"object\",\n properties: {\n result: {\n type: \"object\",\n properties: {\n path: { type: \"string\" },\n text: { type: \"string\" },\n bytes: { type: \"number\" },\n },\n },\n },\n }),\n },\n \"core.fs.writeText\": {\n inputSchema: S({\n type: \"object\",\n properties: {\n path: { type: \"string\", description: \"Path to write (within sandbox)\" },\n content: { type: \"string\", description: \"UTF-8 content to write\" },\n },\n required: [\"path\", \"content\"],\n additionalProperties: false,\n }),\n },\n \"core.fs.listDir\": {\n inputSchema: S({\n type: \"object\",\n properties: {\n path: { type: \"string\", description: \"Directory path (within sandbox)\" },\n maxEntries: { type: \"number\", description: \"Max entries to return (optional)\" },\n },\n required: [\"path\"],\n additionalProperties: false,\n }),\n },\n \"core.fs.searchText\": {\n inputSchema: S({\n type: \"object\",\n properties: {\n path: { type: \"string\", description: \"Path to file or directory\" },\n pattern: { type: \"string\", description: \"Search pattern (regex or literal)\" },\n maxMatches: { type: \"number\", description: \"Max matches (optional)\" },\n },\n required: [\"path\", \"pattern\"],\n additionalProperties: false,\n }),\n },\n \"core.fs.sha256\": {\n inputSchema: S({\n type: \"object\",\n properties: {\n path: { type: \"string\", description: \"Path to file (within sandbox)\" },\n },\n required: [\"path\"],\n additionalProperties: false,\n }),\n },\n \"core.fs.deletePath\": {\n inputSchema: S({\n type: \"object\",\n properties: {\n path: { type: \"string\", description: \"Path to delete (within sandbox)\" },\n },\n required: [\"path\"],\n additionalProperties: false,\n }),\n },\n \"core.http.fetchText\": {\n inputSchema: S({\n type: \"object\",\n properties: {\n url: { type: \"string\", description: \"URL to fetch\" },\n headers: { type: \"object\", additionalProperties: { type: \"string\" }, description: \"Optional request headers\" },\n timeoutMs: { type: \"number\", description: \"Request timeout in ms (optional)\" },\n },\n required: [\"url\"],\n additionalProperties: false,\n }),\n },\n \"core.http.fetchJson\": {\n inputSchema: S({\n type: \"object\",\n properties: {\n url: { type: \"string\", description: \"URL to fetch\" },\n headers: { type: \"object\", additionalProperties: { type: \"string\" } },\n },\n required: [\"url\"],\n additionalProperties: false,\n }),\n },\n \"core.http.downloadFile\": {\n inputSchema: S({\n type: \"object\",\n properties: {\n url: { type: \"string\", description: \"URL to download\" },\n destPath: { type: \"string\", description: \"Destination path (within sandbox)\" },\n headers: { type: \"object\", additionalProperties: { type: \"string\" } },\n },\n required: [\"url\", \"destPath\"],\n additionalProperties: false,\n }),\n },\n \"core.http.head\": {\n inputSchema: S({\n type: \"object\",\n properties: {\n url: { type: \"string\", description: \"URL for HEAD request\" },\n },\n required: [\"url\"],\n additionalProperties: false,\n }),\n },\n \"core.http.duckduckgoSearch\": {\n inputSchema: S({\n type: \"object\",\n properties: {\n query: { type: \"string\", description: \"Search query\" },\n maxResults: { type: \"number\", description: \"Max results (optional)\" },\n },\n required: [\"query\"],\n additionalProperties: false,\n }),\n },\n \"core.http.fetchPageMainContent\": {\n inputSchema: S({\n type: \"object\",\n properties: {\n url: { type: \"string\", description: \"Page URL\" },\n maxLength: { type: \"number\", description: \"Max content length (optional)\" },\n },\n required: [\"url\"],\n additionalProperties: false,\n }),\n },\n \"core.util.json.select\": {\n inputSchema: S({\n type: \"object\",\n properties: {\n json: { description: \"JSON value (object or string)\" },\n selector: { type: \"string\", description: \"JSONPath or selector\" },\n },\n required: [\"json\", \"selector\"],\n additionalProperties: false,\n }),\n },\n \"core.util.text.truncate\": {\n inputSchema: S({\n type: \"object\",\n properties: {\n text: { type: \"string\", description: \"Text to truncate\" },\n maxLength: { type: \"number\", description: \"Max length\" },\n },\n required: [\"text\", \"maxLength\"],\n additionalProperties: false,\n }),\n },\n \"core.util.hash.sha256Text\": {\n inputSchema: S({\n type: \"object\",\n properties: {\n text: { type: \"string\", description: \"Text to hash\" },\n },\n required: [\"text\"],\n additionalProperties: false,\n }),\n },\n \"core.util.time.now\": {\n inputSchema: S({\n type: \"object\",\n properties: {\n timezone: { type: \"string\", description: \"IANA timezone (optional)\" },\n },\n additionalProperties: false,\n }),\n },\n \"core.util.template.render\": {\n inputSchema: S({\n type: \"object\",\n properties: {\n template: { type: \"string\", description: \"Template string (e.g. Mustache)\" },\n data: { type: \"object\", description: \"Data object for template\" },\n },\n required: [\"template\", \"data\"],\n additionalProperties: false,\n }),\n },\n \"core.exec.runCommand\": {\n inputSchema: S({\n type: \"object\",\n properties: {\n command: { type: \"string\", description: \"Command to run\" },\n args: { type: \"array\", items: { type: \"string\" }, description: \"Arguments (optional)\" },\n cwd: { type: \"string\", description: \"Working directory (optional)\" },\n timeoutMs: { type: \"number\", description: \"Timeout in ms (optional)\" },\n },\n required: [\"command\"],\n additionalProperties: false,\n }),\n },\n};\n\n/** True if schema looks like the generic permissive one. */\nexport function isGenericSchema(schema: unknown): boolean {\n if (schema === null || typeof schema !== \"object\") return false;\n const s = schema as Record<string, unknown>;\n if (s.type !== \"object\") return false;\n if (s.additionalProperties === true && !s.properties) return true;\n if (s.properties === undefined && s.required === undefined) return true;\n return false;\n}\n\n/**\n * If spec is a core tool with generic input/output schema, return spec with canonical schema.\n * Otherwise return spec unchanged.\n */\nexport function enrichSpecWithCanonicalSchema(spec: ToolSpec): ToolSpec {\n if (spec.kind !== \"core\") return spec;\n const key = normalizeToolName(spec.name);\n const canonical = CORE_TOOL_SCHEMAS[key];\n if (!canonical) return spec;\n const useInput = isGenericSchema(spec.inputSchema) ? canonical.inputSchema : spec.inputSchema;\n const useOutput =\n canonical.outputSchema && isGenericSchema(spec.outputSchema)\n ? canonical.outputSchema\n : spec.outputSchema;\n if (useInput === spec.inputSchema && useOutput === spec.outputSchema) return spec;\n return {\n ...spec,\n inputSchema: useInput,\n outputSchema: useOutput,\n };\n}\n"]}
@@ -1,5 +1,7 @@
1
1
  'use strict';
2
2
 
3
+ var chunkFGGTT32N_cjs = require('./chunk-FGGTT32N.cjs');
4
+
3
5
  // src/tools/util/canonicalCoreSchemas.ts
4
6
  var S = (o) => o;
5
7
  var CORE_TOOL_SCHEMAS = {
@@ -27,7 +29,7 @@ var CORE_TOOL_SCHEMAS = {
27
29
  }
28
30
  })
29
31
  },
30
- "core/fs.writeText": {
32
+ "core.fs.writeText": {
31
33
  inputSchema: S({
32
34
  type: "object",
33
35
  properties: {
@@ -38,7 +40,7 @@ var CORE_TOOL_SCHEMAS = {
38
40
  additionalProperties: false
39
41
  })
40
42
  },
41
- "core/fs.listDir": {
43
+ "core.fs.listDir": {
42
44
  inputSchema: S({
43
45
  type: "object",
44
46
  properties: {
@@ -49,7 +51,7 @@ var CORE_TOOL_SCHEMAS = {
49
51
  additionalProperties: false
50
52
  })
51
53
  },
52
- "core/fs.searchText": {
54
+ "core.fs.searchText": {
53
55
  inputSchema: S({
54
56
  type: "object",
55
57
  properties: {
@@ -61,7 +63,7 @@ var CORE_TOOL_SCHEMAS = {
61
63
  additionalProperties: false
62
64
  })
63
65
  },
64
- "core/fs.sha256": {
66
+ "core.fs.sha256": {
65
67
  inputSchema: S({
66
68
  type: "object",
67
69
  properties: {
@@ -71,7 +73,7 @@ var CORE_TOOL_SCHEMAS = {
71
73
  additionalProperties: false
72
74
  })
73
75
  },
74
- "core/fs.deletePath": {
76
+ "core.fs.deletePath": {
75
77
  inputSchema: S({
76
78
  type: "object",
77
79
  properties: {
@@ -81,7 +83,7 @@ var CORE_TOOL_SCHEMAS = {
81
83
  additionalProperties: false
82
84
  })
83
85
  },
84
- "core/http.fetchText": {
86
+ "core.http.fetchText": {
85
87
  inputSchema: S({
86
88
  type: "object",
87
89
  properties: {
@@ -93,7 +95,7 @@ var CORE_TOOL_SCHEMAS = {
93
95
  additionalProperties: false
94
96
  })
95
97
  },
96
- "core/http.fetchJson": {
98
+ "core.http.fetchJson": {
97
99
  inputSchema: S({
98
100
  type: "object",
99
101
  properties: {
@@ -104,7 +106,7 @@ var CORE_TOOL_SCHEMAS = {
104
106
  additionalProperties: false
105
107
  })
106
108
  },
107
- "core/http.downloadFile": {
109
+ "core.http.downloadFile": {
108
110
  inputSchema: S({
109
111
  type: "object",
110
112
  properties: {
@@ -116,7 +118,7 @@ var CORE_TOOL_SCHEMAS = {
116
118
  additionalProperties: false
117
119
  })
118
120
  },
119
- "core/http.head": {
121
+ "core.http.head": {
120
122
  inputSchema: S({
121
123
  type: "object",
122
124
  properties: {
@@ -126,7 +128,7 @@ var CORE_TOOL_SCHEMAS = {
126
128
  additionalProperties: false
127
129
  })
128
130
  },
129
- "core/http.duckduckgoSearch": {
131
+ "core.http.duckduckgoSearch": {
130
132
  inputSchema: S({
131
133
  type: "object",
132
134
  properties: {
@@ -137,7 +139,7 @@ var CORE_TOOL_SCHEMAS = {
137
139
  additionalProperties: false
138
140
  })
139
141
  },
140
- "core/http.fetchPageMainContent": {
142
+ "core.http.fetchPageMainContent": {
141
143
  inputSchema: S({
142
144
  type: "object",
143
145
  properties: {
@@ -148,7 +150,7 @@ var CORE_TOOL_SCHEMAS = {
148
150
  additionalProperties: false
149
151
  })
150
152
  },
151
- "core/util.json.select": {
153
+ "core.util.json.select": {
152
154
  inputSchema: S({
153
155
  type: "object",
154
156
  properties: {
@@ -159,7 +161,7 @@ var CORE_TOOL_SCHEMAS = {
159
161
  additionalProperties: false
160
162
  })
161
163
  },
162
- "core/util.text.truncate": {
164
+ "core.util.text.truncate": {
163
165
  inputSchema: S({
164
166
  type: "object",
165
167
  properties: {
@@ -170,7 +172,7 @@ var CORE_TOOL_SCHEMAS = {
170
172
  additionalProperties: false
171
173
  })
172
174
  },
173
- "core/util.hash.sha256Text": {
175
+ "core.util.hash.sha256Text": {
174
176
  inputSchema: S({
175
177
  type: "object",
176
178
  properties: {
@@ -180,7 +182,7 @@ var CORE_TOOL_SCHEMAS = {
180
182
  additionalProperties: false
181
183
  })
182
184
  },
183
- "core/util.time.now": {
185
+ "core.util.time.now": {
184
186
  inputSchema: S({
185
187
  type: "object",
186
188
  properties: {
@@ -189,7 +191,7 @@ var CORE_TOOL_SCHEMAS = {
189
191
  additionalProperties: false
190
192
  })
191
193
  },
192
- "core/util.template.render": {
194
+ "core.util.template.render": {
193
195
  inputSchema: S({
194
196
  type: "object",
195
197
  properties: {
@@ -200,7 +202,7 @@ var CORE_TOOL_SCHEMAS = {
200
202
  additionalProperties: false
201
203
  })
202
204
  },
203
- "core/exec.runCommand": {
205
+ "core.exec.runCommand": {
204
206
  inputSchema: S({
205
207
  type: "object",
206
208
  properties: {
@@ -224,7 +226,8 @@ function isGenericSchema(schema) {
224
226
  }
225
227
  function enrichSpecWithCanonicalSchema(spec) {
226
228
  if (spec.kind !== "core") return spec;
227
- const canonical = CORE_TOOL_SCHEMAS[spec.name];
229
+ const key = chunkFGGTT32N_cjs.normalizeToolName(spec.name);
230
+ const canonical = CORE_TOOL_SCHEMAS[key];
228
231
  if (!canonical) return spec;
229
232
  const useInput = isGenericSchema(spec.inputSchema) ? canonical.inputSchema : spec.inputSchema;
230
233
  const useOutput = canonical.outputSchema && isGenericSchema(spec.outputSchema) ? canonical.outputSchema : spec.outputSchema;
@@ -239,5 +242,5 @@ function enrichSpecWithCanonicalSchema(spec) {
239
242
  exports.CORE_TOOL_SCHEMAS = CORE_TOOL_SCHEMAS;
240
243
  exports.enrichSpecWithCanonicalSchema = enrichSpecWithCanonicalSchema;
241
244
  exports.isGenericSchema = isGenericSchema;
242
- //# sourceMappingURL=chunk-6F5JHLZ7.cjs.map
243
- //# sourceMappingURL=chunk-6F5JHLZ7.cjs.map
245
+ //# sourceMappingURL=chunk-EAI37B5W.cjs.map
246
+ //# sourceMappingURL=chunk-EAI37B5W.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/tools/util/canonicalCoreSchemas.ts"],"names":["normalizeToolName"],"mappings":";;;;;AASA,IAAM,CAAA,GAAI,CAAC,CAAA,KAAc,CAAA;AAGlB,IAAM,iBAAA,GAGT;AAAA,EACF,kBAAA,EAAoB;AAAA,IAClB,aAAa,CAAA,CAAE;AAAA,MACb,IAAA,EAAM,QAAA;AAAA,MACN,UAAA,EAAY;AAAA,QACV,IAAA,EAAM,EAAE,IAAA,EAAM,QAAA,EAAU,aAAa,mCAAA,EAAoC;AAAA,QACzE,QAAA,EAAU,EAAE,IAAA,EAAM,QAAA,EAAU,aAAa,8BAAA;AAA+B,OAC1E;AAAA,MACA,QAAA,EAAU,CAA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eAAA,CAAgB,KAAK,YAAY,CAAA,GACvD,SAAA,CAAU,YAAA,GACV,IAAA,CAAK,YAAA;AACX,EAAA,IAAI,aAAa,IAAA,CAAK,WAAA,IAAe,SAAA,KAAc,IAAA,CAAK,cAAc,OAAO,IAAA;AAC7E,EAAA,OAAO;AAAA,IACL,GAAG,IAAA;AAAA,IACH,WAAA,EAAa,QAAA;AAAA,IACb,YAAA,EAAc;AAAA,GAChB;AACF","file":"chunk-EAI37B5W.cjs","sourcesContent":["/**\n * Canonical input/output schemas for core (builtin) tools.\n * Used when the builtin package registers specs with generic schema\n * (type: object, additionalProperties: true) so CLI describe and OpenAPI show real schemas.\n */\n\nimport type { ToolSpec } from \"../../core/types/ToolSpec.js\";\nimport { normalizeToolName } from \"../../core/types/ToolSpec.js\";\n\nconst S = (o: object) => o as Record<string, unknown>;\n\n/** Canonical inputSchema (and optional outputSchema) by tool name (e.g. core/fs.readText). */\nexport const CORE_TOOL_SCHEMAS: Record<\n string,\n { inputSchema: object; outputSchema?: object }\n> = {\n \"core/fs.readText\": {\n inputSchema: S({\n type: \"object\",\n properties: {\n path: { type: \"string\", description: \"Path to the file (within sandbox)\" },\n maxBytes: { type: \"number\", description: \"Max bytes to read (optional)\" },\n },\n required: [\"path\"],\n additionalProperties: false,\n }),\n outputSchema: S({\n type: \"object\",\n properties: {\n result: {\n type: \"object\",\n properties: {\n path: { type: \"string\" },\n text: { type: \"string\" },\n bytes: { type: \"number\" },\n },\n },\n },\n }),\n },\n \"core.fs.writeText\": {\n inputSchema: S({\n type: \"object\",\n properties: {\n path: { type: \"string\", description: \"Path to write (within sandbox)\" },\n content: { type: \"string\", description: \"UTF-8 content to write\" },\n },\n required: [\"path\", \"content\"],\n additionalProperties: false,\n }),\n },\n \"core.fs.listDir\": {\n inputSchema: S({\n type: \"object\",\n properties: {\n path: { type: \"string\", description: \"Directory path (within sandbox)\" },\n maxEntries: { type: \"number\", description: \"Max entries to return (optional)\" },\n },\n required: [\"path\"],\n additionalProperties: false,\n }),\n },\n \"core.fs.searchText\": {\n inputSchema: S({\n type: \"object\",\n properties: {\n path: { type: \"string\", description: \"Path to file or directory\" },\n pattern: { type: \"string\", description: \"Search pattern (regex or literal)\" },\n maxMatches: { type: \"number\", description: \"Max matches (optional)\" },\n },\n required: [\"path\", \"pattern\"],\n additionalProperties: false,\n }),\n },\n \"core.fs.sha256\": {\n inputSchema: S({\n type: \"object\",\n properties: {\n path: { type: \"string\", description: \"Path to file (within sandbox)\" },\n },\n required: [\"path\"],\n additionalProperties: false,\n }),\n },\n \"core.fs.deletePath\": {\n inputSchema: S({\n type: \"object\",\n properties: {\n path: { type: \"string\", description: \"Path to delete (within sandbox)\" },\n },\n required: [\"path\"],\n additionalProperties: false,\n }),\n },\n \"core.http.fetchText\": {\n inputSchema: S({\n type: \"object\",\n properties: {\n url: { type: \"string\", description: \"URL to fetch\" },\n headers: { type: \"object\", additionalProperties: { type: \"string\" }, description: \"Optional request headers\" },\n timeoutMs: { type: \"number\", description: \"Request timeout in ms (optional)\" },\n },\n required: [\"url\"],\n additionalProperties: false,\n }),\n },\n \"core.http.fetchJson\": {\n inputSchema: S({\n type: \"object\",\n properties: {\n url: { type: \"string\", description: \"URL to fetch\" },\n headers: { type: \"object\", additionalProperties: { type: \"string\" } },\n },\n required: [\"url\"],\n additionalProperties: false,\n }),\n },\n \"core.http.downloadFile\": {\n inputSchema: S({\n type: \"object\",\n properties: {\n url: { type: \"string\", description: \"URL to download\" },\n destPath: { type: \"string\", description: \"Destination path (within sandbox)\" },\n headers: { type: \"object\", additionalProperties: { type: \"string\" } },\n },\n required: [\"url\", \"destPath\"],\n additionalProperties: false,\n }),\n },\n \"core.http.head\": {\n inputSchema: S({\n type: \"object\",\n properties: {\n url: { type: \"string\", description: \"URL for HEAD request\" },\n },\n required: [\"url\"],\n additionalProperties: false,\n }),\n },\n \"core.http.duckduckgoSearch\": {\n inputSchema: S({\n type: \"object\",\n properties: {\n query: { type: \"string\", description: \"Search query\" },\n maxResults: { type: \"number\", description: \"Max results (optional)\" },\n },\n required: [\"query\"],\n additionalProperties: false,\n }),\n },\n \"core.http.fetchPageMainContent\": {\n inputSchema: S({\n type: \"object\",\n properties: {\n url: { type: \"string\", description: \"Page URL\" },\n maxLength: { type: \"number\", description: \"Max content length (optional)\" },\n },\n required: [\"url\"],\n additionalProperties: false,\n }),\n },\n \"core.util.json.select\": {\n inputSchema: S({\n type: \"object\",\n properties: {\n json: { description: \"JSON value (object or string)\" },\n selector: { type: \"string\", description: \"JSONPath or selector\" },\n },\n required: [\"json\", \"selector\"],\n additionalProperties: false,\n }),\n },\n \"core.util.text.truncate\": {\n inputSchema: S({\n type: \"object\",\n properties: {\n text: { type: \"string\", description: \"Text to truncate\" },\n maxLength: { type: \"number\", description: \"Max length\" },\n },\n required: [\"text\", \"maxLength\"],\n additionalProperties: false,\n }),\n },\n \"core.util.hash.sha256Text\": {\n inputSchema: S({\n type: \"object\",\n properties: {\n text: { type: \"string\", description: \"Text to hash\" },\n },\n required: [\"text\"],\n additionalProperties: false,\n }),\n },\n \"core.util.time.now\": {\n inputSchema: S({\n type: \"object\",\n properties: {\n timezone: { type: \"string\", description: \"IANA timezone (optional)\" },\n },\n additionalProperties: false,\n }),\n },\n \"core.util.template.render\": {\n inputSchema: S({\n type: \"object\",\n properties: {\n template: { type: \"string\", description: \"Template string (e.g. Mustache)\" },\n data: { type: \"object\", description: \"Data object for template\" },\n },\n required: [\"template\", \"data\"],\n additionalProperties: false,\n }),\n },\n \"core.exec.runCommand\": {\n inputSchema: S({\n type: \"object\",\n properties: {\n command: { type: \"string\", description: \"Command to run\" },\n args: { type: \"array\", items: { type: \"string\" }, description: \"Arguments (optional)\" },\n cwd: { type: \"string\", description: \"Working directory (optional)\" },\n timeoutMs: { type: \"number\", description: \"Timeout in ms (optional)\" },\n },\n required: [\"command\"],\n additionalProperties: false,\n }),\n },\n};\n\n/** True if schema looks like the generic permissive one. */\nexport function isGenericSchema(schema: unknown): boolean {\n if (schema === null || typeof schema !== \"object\") return false;\n const s = schema as Record<string, unknown>;\n if (s.type !== \"object\") return false;\n if (s.additionalProperties === true && !s.properties) return true;\n if (s.properties === undefined && s.required === undefined) return true;\n return false;\n}\n\n/**\n * If spec is a core tool with generic input/output schema, return spec with canonical schema.\n * Otherwise return spec unchanged.\n */\nexport function enrichSpecWithCanonicalSchema(spec: ToolSpec): ToolSpec {\n if (spec.kind !== \"core\") return spec;\n const key = normalizeToolName(spec.name);\n const canonical = CORE_TOOL_SCHEMAS[key];\n if (!canonical) return spec;\n const useInput = isGenericSchema(spec.inputSchema) ? canonical.inputSchema : spec.inputSchema;\n const useOutput =\n canonical.outputSchema && isGenericSchema(spec.outputSchema)\n ? canonical.outputSchema\n : spec.outputSchema;\n if (useInput === spec.inputSchema && useOutput === spec.outputSchema) return spec;\n return {\n ...spec,\n inputSchema: useInput,\n outputSchema: useOutput,\n };\n}\n"]}
@@ -1,6 +1,10 @@
1
1
  'use strict';
2
2
 
3
3
  // src/core/types/ToolSpec.ts
4
+ function normalizeToolName(name) {
5
+ if (typeof name !== "string" || !name) return name;
6
+ return name.replace(/[^a-zA-Z0-9]/g, ".").replace(/\.+/g, ".");
7
+ }
4
8
  var DEFAULT_INPUT_SCHEMA = {
5
9
  type: "object",
6
10
  additionalProperties: true
@@ -11,8 +15,9 @@ var DEFAULT_OUTPUT_SCHEMA = {
11
15
  };
12
16
  function createToolSpec(opts) {
13
17
  const sideEffect = opts.sideEffect ?? "none";
18
+ const name = normalizeToolName(opts.name);
14
19
  return {
15
- name: opts.name,
20
+ name,
16
21
  version: opts.version ?? "1.0.0",
17
22
  kind: opts.kind,
18
23
  description: opts.description,
@@ -28,5 +33,6 @@ function createToolSpec(opts) {
28
33
  exports.DEFAULT_INPUT_SCHEMA = DEFAULT_INPUT_SCHEMA;
29
34
  exports.DEFAULT_OUTPUT_SCHEMA = DEFAULT_OUTPUT_SCHEMA;
30
35
  exports.createToolSpec = createToolSpec;
31
- //# sourceMappingURL=chunk-SOFUWEZ6.cjs.map
32
- //# sourceMappingURL=chunk-SOFUWEZ6.cjs.map
36
+ exports.normalizeToolName = normalizeToolName;
37
+ //# sourceMappingURL=chunk-FGGTT32N.cjs.map
38
+ //# sourceMappingURL=chunk-FGGTT32N.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/core/types/ToolSpec.ts"],"names":[],"mappings":";;;AAsFO,SAAS,kBAAkB,IAAA,EAAsB;AACtD,EAAA,IAAI,OAAO,IAAA,KAAS,QAAA,IAAY,CAAC,MAAM,OAAO,IAAA;AAC9C,EAAA,OAAO,KACJ,OAAA,CAAQ,eAAA,EAAiB,GAAG,CAAA,CAC5B,OAAA,CAAQ,QAAQ,GAAG,CAAA;AACxB;AAGO,IAAM,oBAAA,GAA+B;AAAA,EAC1C,IAAA,EAAM,QAAA;AAAA,EACN,oBAAA,EAAsB;AACxB;AAGO,IAAM,qBAAA,GAAgC;AAAA,EAC3C,IAAA,EAAM,QAAA;AAAA,EACN,oBAAA,EAAsB;AACxB;AA2BO,SAAS,eAAe,IAAA,EAAuC;AACpE,EAAA,MAAM,UAAA,GAAa,KAAK,UAAA,IAAc,MAAA;AACtC,EAAA,MAAM,IAAA,GAAO,iBAAA,CAAkB,IAAA,CAAK,IAAI,CAAA;AACxC,EAAA,OAAO;AAAA,IACL,IAAA;AAAA,IACA,OAAA,EAAS,KAAK,OAAA,IAAW,OAAA;AAAA,IACzB,MAAM,IAAA,CAAK,IAAA;AAAA,IACX,aAAa,IAAA,CAAK,WAAA;AAAA,IAClB,MAAM,IAAA,CAAK,IAAA;AAAA,IACX,WAAA,EAAa,KAAK,WAAA,IAAe,oBAAA;AAAA,IACjC,YAAA,EAAc,KAAK,YAAA,IAAgB,qBAAA;AAAA,IACnC,cAAc,IAAA,CAAK,YAAA;AAAA,IACnB,WAAW,IAAA,CAAK,SAAA;AAAA,IAChB,KAAA,EAAO,EAAE,IAAA,EAAM,EAAE,YAAW;AAAE,GAChC;AACF","file":"chunk-FGGTT32N.cjs","sourcesContent":["/**\n * Unified tool kinds supported by the tools package.\n */\nexport type ToolKind = \"mcp\" | \"langchain\" | \"n8n\" | \"comfyui\" | \"skill\" | \"function\" | \"core\" | \"example\";\n\n/**\n * Capability declarations for tools.\n * Used by PolicyEngine for permission gating.\n */\nexport type Capability =\n | \"read:web\"\n | \"read:fs\"\n | \"write:fs\"\n | \"read:db\"\n | \"write:db\"\n | \"network\"\n | \"gpu\"\n | \"workflow\"\n | \"danger:destructive\"\n | \"exec\";\n\n/**\n * HITL (Human-in-the-Loop) side-effect classification.\n * Used to gate execution: external_write / destructive require human approval when onApprovalRequired is set.\n */\nexport type HitlSideEffect = \"none\" | \"local_write\" | \"external_write\" | \"destructive\";\n\n/**\n * Cost hints for tools, used by Budget and routing.\n */\nexport interface CostHints {\n latencyMsP50?: number;\n latencyMsP95?: number;\n isAsync?: boolean;\n}\n\n/**\n * Unified tool specification.\n * All tool types (MCP, LangChain, n8n, SKILL) are described by this interface.\n *\n * Safety: each tool declares capabilities (permission gating) and _meta.hitl.sideEffect\n * (HITL approval for external_write/destructive). Caller uses these to decide handling.\n */\nexport interface ToolSpec {\n /** Globally unique name, recommended format: namespace/name */\n name: string;\n /** Semver version */\n version: string;\n /** Tool kind determines which adapter handles execution */\n kind: ToolKind;\n\n description?: string;\n tags?: string[];\n\n /** JSON Schema for input validation */\n inputSchema: object;\n /** JSON Schema for output validation */\n outputSchema: object;\n\n /** Required capabilities for this tool (safety: PolicyEngine gates by ExecContext.permissions) */\n capabilities: Capability[];\n costHints?: CostHints;\n\n /** HITL and adapter-specific metadata. Adapters may use _meta.sourcePath, _meta.exportName, _meta.projectPath (function), etc. */\n _meta?: {\n hitl?: { sideEffect?: HitlSideEffect };\n /** Function kind: path to source file relative to projectPath */\n sourcePath?: string;\n /** Function kind: export name of the handler */\n exportName?: string;\n /** Function/skill kind: project root for resolving sourcePath */\n projectPath?: string;\n };\n\n /** Adapter-specific: endpoint URL (MCP/n8n) */\n endpoint?: string;\n /** Adapter-specific: resource identifier (workflowId, promptId, etc.) */\n resourceId?: string;\n /** Adapter-specific: implementation reference (LangChain Tool instance, skill handler) */\n impl?: unknown;\n}\n\n/**\n * Normalize tool name: only [a-zA-Z0-9] and \".\" allowed; all other characters become \".\".\n * Consecutive dots are collapsed to one. Used for registry lookup and storage.\n */\nexport function normalizeToolName(name: string): string {\n if (typeof name !== \"string\" || !name) return name;\n return name\n .replace(/[^a-zA-Z0-9]/g, \".\")\n .replace(/\\.+/g, \".\");\n}\n\n/** Default permissive input schema when not provided (framework supports auto-derived schema). */\nexport const DEFAULT_INPUT_SCHEMA: object = {\n type: \"object\",\n additionalProperties: true,\n};\n\n/** Default permissive output schema when not provided (framework supports auto-derived schema). */\nexport const DEFAULT_OUTPUT_SCHEMA: object = {\n type: \"object\",\n additionalProperties: true,\n};\n\n/**\n * Minimal options to build a ToolSpec. Use with @effect in JSDoc for HITL sideEffect.\n * Framework fills _meta.hitl.sideEffect from the sideEffect parameter (matches @effect annotation).\n * inputSchema/outputSchema are optional: when omitted, permissive defaults are used (framework supports auto-derived schema at build time in scan/mcp-build).\n */\nexport interface CreateToolSpecOptions {\n name: string;\n version?: string;\n kind: ToolKind;\n description?: string;\n tags?: string[];\n /** Optional: when omitted, DEFAULT_INPUT_SCHEMA is used. Codegen can derive from handler params. */\n inputSchema?: object;\n /** Optional: when omitted, DEFAULT_OUTPUT_SCHEMA is used. Codegen can derive from handler return type. */\n outputSchema?: object;\n capabilities: Capability[];\n costHints?: CostHints;\n /** HITL: from @effect annotation (none | local_write | external_write | destructive). Default \"none\". */\n sideEffect?: HitlSideEffect;\n}\n\n/**\n * Build a ToolSpec from minimal options. Use @effect in handler JSDoc as annotation; pass same value as sideEffect.\n * When inputSchema/outputSchema are omitted, permissive defaults are used (schema can be auto-derived at build time).\n */\nexport function createToolSpec(opts: CreateToolSpecOptions): ToolSpec {\n const sideEffect = opts.sideEffect ?? \"none\";\n const name = normalizeToolName(opts.name);\n return {\n name,\n version: opts.version ?? \"1.0.0\",\n kind: opts.kind,\n description: opts.description,\n tags: opts.tags,\n inputSchema: opts.inputSchema ?? DEFAULT_INPUT_SCHEMA,\n outputSchema: opts.outputSchema ?? DEFAULT_OUTPUT_SCHEMA,\n capabilities: opts.capabilities,\n costHints: opts.costHints,\n _meta: { hitl: { sideEffect } },\n };\n}\n\n/**\n * Unified adapter interface.\n * Each tool kind has its own invoke path; PTCRuntime looks up adapter by spec.kind and calls adapter.invoke(spec, args, ctx).\n * Implementations: core/example (extensions), mcp (MCPClientAdapter); function/skill/n8n/langchain in-process adapters TBD (see tools/README and ToolTypeHandler).\n */\nexport interface ToolAdapter {\n kind: ToolKind;\n /** Optional: supports dynamic tool discovery */\n listTools?(): Promise<ToolSpec[]>;\n /** Execute the tool with validated args */\n invoke(\n spec: ToolSpec,\n args: unknown,\n ctx: import(\"./ToolIntent.js\").ExecContext,\n ): Promise<{ result: unknown; raw?: unknown }>;\n}\n"]}