@anchrd/intel-api 0.22.0 → 0.23.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/dist/flows/flows.js +14 -0
- package/package.json +2 -2
package/dist/flows/flows.js
CHANGED
|
@@ -1310,10 +1310,24 @@ export function createFlows(deps) {
|
|
|
1310
1310
|
async previewPublish(actor, input) {
|
|
1311
1311
|
const flow = await requireEdit(actor, input.flowId);
|
|
1312
1312
|
const version = await requireVersion(input.versionId, flow.id);
|
|
1313
|
+
// ⚠️ `available` is asked with the VERY call that publishing uses, not with a cheaper one that
|
|
1314
|
+
// answers a similar question. `unavailableServers` only says whether a server reaches
|
|
1315
|
+
// anything; publishing asks whether THIS step's surface is whole — and those differ exactly
|
|
1316
|
+
// where it hurts: a narrowed step whose allowed function disappeared keeps a reachable
|
|
1317
|
+
// server, so the cheap question says "fine" and the confirmation then answers 409. A preview
|
|
1318
|
+
// that promises a freeze the confirmation denies is worse than no preview.
|
|
1319
|
+
const tools = await Promise.all(toolNodes(version.graph).map(async (node) => ({
|
|
1320
|
+
nodeId: node.id,
|
|
1321
|
+
nodeLabel: node.label,
|
|
1322
|
+
server: node.configuration.server,
|
|
1323
|
+
allow: node.configuration.allow,
|
|
1324
|
+
available: (await deps.toolSurfaceFingerprint(actor, node.configuration.server, node.configuration.allow)) !== null,
|
|
1325
|
+
})));
|
|
1313
1326
|
return {
|
|
1314
1327
|
flowId: flow.id,
|
|
1315
1328
|
versionId: version.id,
|
|
1316
1329
|
calls: await calls(actor, version.graph),
|
|
1330
|
+
tools,
|
|
1317
1331
|
};
|
|
1318
1332
|
},
|
|
1319
1333
|
async publish(actor, input) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@anchrd/intel-api",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.23.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"repository": {
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
45
|
"@anchrd/gate-sdk": "^0.15.0",
|
|
46
|
-
"@anchrd/intel-contract": "^0.
|
|
46
|
+
"@anchrd/intel-contract": "^0.19.0",
|
|
47
47
|
"@cfworker/json-schema": "^4.1.1",
|
|
48
48
|
"@modelcontextprotocol/sdk": "^1.30.0",
|
|
49
49
|
"fflate": "^0.8.3",
|