polpo-ai 0.15.144 → 0.16.0
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/README.md +10 -7
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -356,24 +356,27 @@ export default defineTool({
|
|
|
356
356
|
connections: {
|
|
357
357
|
siteApi: {
|
|
358
358
|
provider: "sitoinchat",
|
|
359
|
+
mode: "gateway",
|
|
359
360
|
scopes: ["site:read", "site:write"],
|
|
360
361
|
},
|
|
361
362
|
},
|
|
362
363
|
async execute(ctx, params) {
|
|
363
364
|
const siteApi = ctx.connections.require("siteApi");
|
|
364
|
-
const response = await
|
|
365
|
+
const response = await siteApi.request({
|
|
365
366
|
method: "POST",
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
"content-type": "application/json",
|
|
369
|
-
},
|
|
370
|
-
body: JSON.stringify(params),
|
|
367
|
+
path: "/sites/current/publish",
|
|
368
|
+
body: params,
|
|
371
369
|
});
|
|
372
|
-
|
|
370
|
+
if (response.status >= 400) throw new Error(`Site API returned ${response.status}`);
|
|
371
|
+
return JSON.stringify(response.body);
|
|
373
372
|
},
|
|
374
373
|
});
|
|
375
374
|
```
|
|
376
375
|
|
|
376
|
+
This example assumes a configured `sitoinchat` HTTP Connector whose request
|
|
377
|
+
policy permits the operation. The gateway attaches credentials outside the
|
|
378
|
+
tool sandbox; the tool receives only the provider response.
|
|
379
|
+
|
|
377
380
|
Strict slots never fall back to a project-level Connection. Missing, denied,
|
|
378
381
|
or ambiguous selections fail before tool code runs. Capabilities are invalidated
|
|
379
382
|
after each call, so revocation and scope changes apply to the next execution.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "polpo-ai",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.16.0",
|
|
4
4
|
"description": "The open backend for AI agents",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"node": ">=20.0.0"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@polpo-ai/node": "0.
|
|
48
|
+
"@polpo-ai/node": "0.16.0"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"@types/better-sqlite3": "^7.6.13",
|