@yak-io/rest 0.1.2 → 0.1.3
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/adapters.d.ts.map +1 -1
- package/dist/adapters.js +4 -1
- package/package.json +2 -2
package/dist/adapters.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"adapters.d.ts","sourceRoot":"","sources":["../src/adapters.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAc,WAAW,EAAE,WAAW,EAAkB,MAAM,oBAAoB,CAAC;AAE/F,gDAAgD;AAChD,MAAM,MAAM,qBAAqB,GAAG;IAClC,mEAAmE;IACnE,IAAI,EAAE,MAAM,CAAC;IACb,wGAAwG;IACxG,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC;IACvC;;;;;;OAMG;IACH,OAAO,EAAE,CAAC,OAAO,EAAE,WAAW,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAC9D,4DAA4D;IAC5D,EAAE,CAAC,EAAE,MAAM,CAAC;CACb,CAAC;AA2BF;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,qBAAqB,GAAG,WAAW,
|
|
1
|
+
{"version":3,"file":"adapters.d.ts","sourceRoot":"","sources":["../src/adapters.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAc,WAAW,EAAE,WAAW,EAAkB,MAAM,oBAAoB,CAAC;AAE/F,gDAAgD;AAChD,MAAM,MAAM,qBAAqB,GAAG;IAClC,mEAAmE;IACnE,IAAI,EAAE,MAAM,CAAC;IACb,wGAAwG;IACxG,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC;IACvC;;;;;;OAMG;IACH,OAAO,EAAE,CAAC,OAAO,EAAE,WAAW,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAC9D,4DAA4D;IAC5D,EAAE,CAAC,EAAE,MAAM,CAAC;CACb,CAAC;AA2BF;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,qBAAqB,GAAG,WAAW,CA+BhF"}
|
package/dist/adapters.js
CHANGED
|
@@ -42,7 +42,10 @@ const REST_INPUT_SCHEMA = {
|
|
|
42
42
|
*/
|
|
43
43
|
export function createRESTToolAdapter(config) {
|
|
44
44
|
const toolName = `rest_${config.name}`;
|
|
45
|
-
|
|
45
|
+
// Minified, not pretty-printed: the model reads compact JSON identically, and the
|
|
46
|
+
// spec is embedded verbatim in the tool description sent to the LLM on every turn —
|
|
47
|
+
// dropping the indentation/newlines is a free token saving for large specs.
|
|
48
|
+
const specStr = typeof config.spec === "string" ? config.spec : JSON.stringify(config.spec);
|
|
46
49
|
const tool = {
|
|
47
50
|
name: toolName,
|
|
48
51
|
description: `Make a REST API call to the ${config.name} API. Based on the OpenAPI spec below, ` +
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yak-io/rest",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"description": "REST/OpenAPI adapter for yak chatbot - exposes a REST API as a chatbot tool",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"./package.json": "./package.json"
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@yak-io/javascript": "0.10.
|
|
45
|
+
"@yak-io/javascript": "0.10.1"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@types/node": "^24.12.4",
|