@axonity-ai/mcp 0.3.3 → 0.4.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/client.js +8 -1
- package/dist/client.js.map +1 -1
- package/dist/errors.d.ts +32 -0
- package/dist/errors.js +64 -0
- package/dist/errors.js.map +1 -1
- package/dist/tools/conventions.js +65 -4
- package/dist/tools/conventions.js.map +1 -1
- package/dist/tools/extras.js +9 -10
- package/dist/tools/extras.js.map +1 -1
- package/dist/tools/promptPlacement.js +8 -5
- package/dist/tools/promptPlacement.js.map +1 -1
- package/dist/tools/result.d.ts +24 -0
- package/dist/tools/result.js +27 -0
- package/dist/tools/result.js.map +1 -1
- package/dist/tools/validation.js +121 -14
- package/dist/tools/validation.js.map +1 -1
- package/dist/tools/workflowMutations.d.ts +26 -0
- package/dist/tools/workflowMutations.js +134 -22
- package/dist/tools/workflowMutations.js.map +1 -1
- package/package.json +1 -1
package/dist/client.js
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* the backend re-enforces tenant + scope, so this client is not a trust
|
|
7
7
|
* boundary. Failures are mapped to typed errors (see errors.ts).
|
|
8
8
|
*/
|
|
9
|
-
import { AxonityApiError, errorForStatus } from "./errors.js";
|
|
9
|
+
import { AxonityApiError, errorForStatus, skewErrorFor } from "./errors.js";
|
|
10
10
|
export class AxonityClient {
|
|
11
11
|
config;
|
|
12
12
|
constructor(config) {
|
|
@@ -48,6 +48,13 @@ export class AxonityClient {
|
|
|
48
48
|
const text = await resp.text();
|
|
49
49
|
const parsed = text ? safeJson(text) : undefined;
|
|
50
50
|
if (!resp.ok) {
|
|
51
|
+
// Before the generic mapping: a route this connector needs that the
|
|
52
|
+
// deployed backend does not have. A bare 405 sends the reader hunting for
|
|
53
|
+
// a bug in their own call, when the real answer is that the two are out of
|
|
54
|
+
// step (#30). Checked first so it wins over the plain 404 mapping.
|
|
55
|
+
const skew = skewErrorFor(method, path.split("?")[0], resp.status, parsed);
|
|
56
|
+
if (skew)
|
|
57
|
+
throw skew;
|
|
51
58
|
// Pass the FULL body — errorForStatus reads `code`/`retryable`/`message`
|
|
52
59
|
// off the structured error envelope when present, and falls back
|
|
53
60
|
// gracefully for a bare `detail` string/array from older routes.
|
package/dist/client.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.js","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"client.js","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAO5E,MAAM,OAAO,aAAa;IACK;IAA7B,YAA6B,MAAqB;QAArB,WAAM,GAAN,MAAM,CAAe;IAAG,CAAC;IAE9C,GAAG,CAAC,IAAY,EAAE,KAAa;QACrC,MAAM,IAAI,GAAG,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,GAAG,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,IAAI,EAAE,EAAE,CAAC;QAChF,IAAI,CAAC,KAAK;YAAE,OAAO,IAAI,CAAC;QAExB,MAAM,MAAM,GAAG,IAAI,eAAe,EAAE,CAAC;QACrC,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;YACjD,IAAI,KAAK,KAAK,SAAS;gBAAE,MAAM,CAAC,GAAG,CAAC,GAAG,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;QAC1D,CAAC;QACD,MAAM,EAAE,GAAG,MAAM,CAAC,QAAQ,EAAE,CAAC;QAC7B,OAAO,EAAE,CAAC,CAAC,CAAC,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ddenError extends AxonityApiError {
|
|
|
76
76
|
* version conflict from a non-retryable reference conflict — both are 409.
|
|
77
77
|
*/
|
|
78
78
|
export declare function errorForStatus(status: number, body?: unknown): AxonityApiError;
|
|
79
|
+
/**
|
|
80
|
+
* 405/404 on a route this connector version depends on — the deployed backend
|
|
81
|
+
* is older than the client (#30).
|
|
82
|
+
*
|
|
83
|
+
* 0.3.4 shipped `validate_workflow`'s `workflowId` form. Against a sandbox
|
|
84
|
+
* running a branch 15 commits behind, it answered a bare 405 on every attempt.
|
|
85
|
+
* The client was right and the backend was old, but nothing said so: the reader
|
|
86
|
+
* goes looking for a bug in their own call, and the most valuable check in the
|
|
87
|
+
* release is silently unavailable to anyone who installed it.
|
|
88
|
+
*
|
|
89
|
+
* A 405 is the strong signal — the path exists, the method does not, which on an
|
|
90
|
+
* API this client is written against means the two are out of step. A 404 is
|
|
91
|
+
* weaker (an unknown id looks the same), so it is only reported as skew for the
|
|
92
|
+
* routes listed in `ROUTES_ADDED_IN`, and even then it says "if the id is right".
|
|
93
|
+
*/
|
|
94
|
+
export declare class BackendVersionSkewError extends AxonityApiError {
|
|
95
|
+
constructor(method: string, path: string, status: number,
|
|
96
|
+
/** What added this route on the backend, so a human can check a deploy. */
|
|
97
|
+
addedBy?: string, body?: unknown);
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Routes newer than the oldest backend this connector still works against, and
|
|
101
|
+
* what added them. Only these turn a 404 into a skew report; a 405 does so on
|
|
102
|
+
* any path. Add an entry whenever a tool starts calling a route that a
|
|
103
|
+
* previously-supported backend would not have.
|
|
104
|
+
*/
|
|
105
|
+
export declare const ROUTES_ADDED_IN: {
|
|
106
|
+
pattern: RegExp;
|
|
107
|
+
addedBy: string;
|
|
108
|
+
}[];
|
|
109
|
+
/** The skew error for this call, or undefined when the status says nothing. */
|
|
110
|
+
export declare function skewErrorFor(method: string, path: string, status: number, body?: unknown): BackendVersionSkewError | undefined;
|
package/dist/errors.js
CHANGED
|
@@ -203,4 +203,68 @@ export function errorForStatus(status, body) {
|
|
|
203
203
|
return new AxonityApiError(withDetail(`Axonity API request failed (${status}).`, body), status, body, env?.code, env?.retryable);
|
|
204
204
|
}
|
|
205
205
|
}
|
|
206
|
+
/**
|
|
207
|
+
* 405/404 on a route this connector version depends on — the deployed backend
|
|
208
|
+
* is older than the client (#30).
|
|
209
|
+
*
|
|
210
|
+
* 0.3.4 shipped `validate_workflow`'s `workflowId` form. Against a sandbox
|
|
211
|
+
* running a branch 15 commits behind, it answered a bare 405 on every attempt.
|
|
212
|
+
* The client was right and the backend was old, but nothing said so: the reader
|
|
213
|
+
* goes looking for a bug in their own call, and the most valuable check in the
|
|
214
|
+
* release is silently unavailable to anyone who installed it.
|
|
215
|
+
*
|
|
216
|
+
* A 405 is the strong signal — the path exists, the method does not, which on an
|
|
217
|
+
* API this client is written against means the two are out of step. A 404 is
|
|
218
|
+
* weaker (an unknown id looks the same), so it is only reported as skew for the
|
|
219
|
+
* routes listed in `ROUTES_ADDED_IN`, and even then it says "if the id is right".
|
|
220
|
+
*/
|
|
221
|
+
export class BackendVersionSkewError extends AxonityApiError {
|
|
222
|
+
constructor(method, path, status,
|
|
223
|
+
/** What added this route on the backend, so a human can check a deploy. */
|
|
224
|
+
addedBy, body) {
|
|
225
|
+
const ambiguous = status === 404
|
|
226
|
+
? " (a 404 also means 'no such id', so check the id first)"
|
|
227
|
+
: "";
|
|
228
|
+
super(`The Axonity backend does not have \`${method} ${path}\`, which this ` +
|
|
229
|
+
`version of the connector needs${ambiguous}. The backend is OLDER than ` +
|
|
230
|
+
`this connector — this is a deployment mismatch, not a mistake in your ` +
|
|
231
|
+
`call.` +
|
|
232
|
+
(addedBy ? ` That route was added by ${addedBy}.` : "") +
|
|
233
|
+
" Tell your human which Axonity environment this token points at, and " +
|
|
234
|
+
"do not retry: the same call will keep failing until that backend is " +
|
|
235
|
+
"updated (or you pin an older connector).", status, body, "backend_version_skew", false);
|
|
236
|
+
this.name = "BackendVersionSkewError";
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
/**
|
|
240
|
+
* Routes newer than the oldest backend this connector still works against, and
|
|
241
|
+
* what added them. Only these turn a 404 into a skew report; a 405 does so on
|
|
242
|
+
* any path. Add an entry whenever a tool starts calling a route that a
|
|
243
|
+
* previously-supported backend would not have.
|
|
244
|
+
*/
|
|
245
|
+
export const ROUTES_ADDED_IN = [
|
|
246
|
+
{
|
|
247
|
+
pattern: /^\/api\/v1\/workflows\/[^/]+\/validate$/,
|
|
248
|
+
addedBy: "axonity-flow#770 (catalog-aware validation)",
|
|
249
|
+
},
|
|
250
|
+
{
|
|
251
|
+
pattern: /^\/api\/v1\/tools\/[^/]+\/dry-run$/,
|
|
252
|
+
addedBy: "axonity-flow#792 (dry-run that satisfies the publish gate)",
|
|
253
|
+
},
|
|
254
|
+
{
|
|
255
|
+
pattern: /^\/api\/v1\/publish-approvals\/bulk$/,
|
|
256
|
+
addedBy: "axonity-flow#795 (bulk publish requests)",
|
|
257
|
+
},
|
|
258
|
+
];
|
|
259
|
+
/** The skew error for this call, or undefined when the status says nothing. */
|
|
260
|
+
export function skewErrorFor(method, path, status, body) {
|
|
261
|
+
const known = ROUTES_ADDED_IN.find((r) => r.pattern.test(path));
|
|
262
|
+
if (status === 405) {
|
|
263
|
+
return new BackendVersionSkewError(method, path, status, known?.addedBy, body);
|
|
264
|
+
}
|
|
265
|
+
if (status === 404 && known) {
|
|
266
|
+
return new BackendVersionSkewError(method, path, status, known.addedBy, body);
|
|
267
|
+
}
|
|
268
|
+
return undefined;
|
|
269
|
+
}
|
|
206
270
|
//# sourceMappingURL=errors.js.map
|
package/dist/errors.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAkCH,4FAA4F;AAC5F,MAAM,CAAC,MAAM,eAAe,GAA2B,IAAI,GAAG,CAAC;IAC7D,kBAAkB;I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AC/C,OAAO,EAAE,0CAA0C;KACpD;CACF,CAAC;AAEF,+EAA+E;AAC/E,MAAM,UAAU,YAAY,CAC1B,MAAc,EACd,IAAY,EACZ,MAAc,EACd,IAAc;IAEd,MAAM,KAAK,GAAG,eAAe,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IAChE,IAAI,MAAM,KAAK,GAAG,EAAE,CAAC;QACnB,OAAO,IAAI,uBAAuB,CAAC,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,CAAC,CAAC;IACjF,CAAC;IACD,IAAI,MAAM,KAAK,GAAG,IAAI,KAAK,EAAE,CAAC;QAC5B,OAAO,IAAI,uBAAuB,CAAC,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;IAChF,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC"}
|
|
@@ -39,11 +39,33 @@ Read this before creating or updating anything.
|
|
|
39
39
|
3. Validate before publish: \`validate_workflow\` / \`analyze_workflow_reachable_outputs\` /
|
|
40
40
|
\`validate_tool_code\` / \`format_tool_code\`. These four are stateless and work with
|
|
41
41
|
read-only tokens.
|
|
42
|
-
4. Re-read and verify with a saved tool command: \`execute_tool\` /
|
|
42
|
+
4. Re-read and verify with a saved tool command: \`execute_tool\` /
|
|
43
|
+
\`execute_stored_connector\`.
|
|
43
44
|
5. Fix any issues and re-read again.
|
|
44
|
-
6. \`
|
|
45
|
-
|
|
46
|
-
|
|
45
|
+
6. For a code tool, PROVE it: \`dry_run_tool\` — see "Proving a tool" below. Skip
|
|
46
|
+
this and \`request_publish_tool\` will sit blocked forever.
|
|
47
|
+
7. \`request_publish_*\` — this only QUEUES a human approval. Publishing many
|
|
48
|
+
entities at once (taking a tenant live) is \`request_publish_bulk\`, up to 200
|
|
49
|
+
in one call; it is not transactional, so read the per-entry results.
|
|
50
|
+
8. \`list_publish_approvals\` / \`get_publish_approval\` to see whether it was
|
|
51
|
+
approved or rejected. Readiness there is recomputed as you read it
|
|
52
|
+
(\`readiness\` now, \`readinessAtRequest\` then, \`readinessChanged\` if it
|
|
53
|
+
moved), so a blocker you saw earlier may already be gone.
|
|
54
|
+
|
|
55
|
+
## Proving a tool (the publish gate)
|
|
56
|
+
Before a code tool may be published, the platform requires that its stored code
|
|
57
|
+
has run cleanly once, at its current version.
|
|
58
|
+
- \`dry_run_tool(toolId)\` is the run that counts. It executes the tool's OWN
|
|
59
|
+
saved implementation; you supply only sample input. A clean pass clears the
|
|
60
|
+
\`dry_run_required\` blocker.
|
|
61
|
+
- \`execute_tool\` does NOT count, however green it comes back. It runs the
|
|
62
|
+
functions YOU pass, which need not be what is stored — proving nothing about
|
|
63
|
+
what would ship. Use it while drafting code you have not saved yet.
|
|
64
|
+
- Editing the tool afterwards bumps its version and invalidates the proof, so
|
|
65
|
+
dry-run AFTER your last edit.
|
|
66
|
+
- Connectors, builtin-backed validators and platform-shipped tools have no code
|
|
67
|
+
of their own to prove and will refuse (422/403). That is expected, not a
|
|
68
|
+
failure to work around.
|
|
47
69
|
8. If something went wrong:
|
|
48
70
|
- Bad edit, entity still exists → \`list_*_versions\` then \`restore_*_version\`
|
|
49
71
|
to roll the draft back to an earlier version.
|
|
@@ -381,6 +403,45 @@ the new tenant too, and a human fills the real value there.
|
|
|
381
403
|
- It is NOT transactional. If command N fails, the ones before it stay applied;
|
|
382
404
|
the error tells you how many landed and which index failed. Re-read and resume
|
|
383
405
|
from that index rather than replaying the whole list.
|
|
406
|
+
- The response is a SUMMARY (version, appliedCount, launchable, validationIssues,
|
|
407
|
+
stepCount, edgeCount), not the document. That is deliberate: a real workflow
|
|
408
|
+
document overflows the response limit, and a successful call would come back
|
|
409
|
+
looking like a failure — retrying that is how you end up with duplicate steps.
|
|
410
|
+
Ask for the document with \`returnDocument: true\` or \`read_workflow\`.
|
|
411
|
+
- Command payloads are STRICT and complete:
|
|
412
|
+
- \`add_step\` builds a whole step in ONE call — \`name\` and \`position\` are
|
|
413
|
+
required, and \`id\`, \`type\`, \`config\`, \`contract\`, \`inputs\` and
|
|
414
|
+
\`outputs\` are accepted next to them. No follow-up \`update_step\` is needed
|
|
415
|
+
just to fill the step in.
|
|
416
|
+
- \`add_edge\` takes the document's own \`from\`/\`to\` as well as
|
|
417
|
+
\`fromStepId\`/\`toStepId\`, and keeps an \`id\` you supply.
|
|
418
|
+
- An unknown or misspelled key is a 422 naming it, not a silent drop — so
|
|
419
|
+
spelling matters and you are told when it is wrong.
|
|
420
|
+
|
|
421
|
+
## Two platform invariants that look like bugs
|
|
422
|
+
Both are deliberate, both run after EVERY edit, and both now report themselves in
|
|
423
|
+
the mutation response under \`systemAdjustments\` — so you no longer have to diff
|
|
424
|
+
a document to find out what the platform did.
|
|
425
|
+
- **A bound input's contract is derived, not authored.** An input that reads an
|
|
426
|
+
upstream output takes its contract — description included — FROM that output.
|
|
427
|
+
Write the text on the producing step's output; a downstream description changing
|
|
428
|
+
when you edit an output is this rule at work, not the platform overwriting you.
|
|
429
|
+
The inputs it re-derived come back in \`rederivedInputs\`.
|
|
430
|
+
- **Every step reaches the END point.** The platform guarantees it and wires that
|
|
431
|
+
edge itself; the edges it added or removed come back in \`addedEdges\` /
|
|
432
|
+
\`removedEdges\`. An edge you did not ask for is this, not corruption.
|
|
433
|
+
|
|
434
|
+
## Validating: two questions, two calls
|
|
435
|
+
- \`validate_workflow({ workflowId })\` checks the STORED workflow against the
|
|
436
|
+
tenant catalog — it confirms the agents, tools and flows the steps reference
|
|
437
|
+
actually exist. This is the "can this run?" answer, and it comes back with
|
|
438
|
+
\`catalogChecked: true\`.
|
|
439
|
+
- \`validate_workflow({ document })\` is stateless and read-only-token safe, but
|
|
440
|
+
without a catalog it can only judge STRUCTURE: \`launchable\` there means the
|
|
441
|
+
graph is sound, not that it will run. It says so with \`catalogChecked: false\`.
|
|
442
|
+
- Pass exactly one. Before telling a human a workflow is ready, check
|
|
443
|
+
\`catalogChecked\` — a green structural verdict is the easiest thing to
|
|
444
|
+
over-read.
|
|
384
445
|
|
|
385
446
|
## Triggers
|
|
386
447
|
- A published workflow still does nothing until it has a trigger. Add one with
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conventions.js","sourceRoot":"","sources":["../../src/tools/conventions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAIH,MAAM,WAAW,GAAG
|
|
1
|
+
{"version":3,"file":"conventions.js","sourceRoot":"","sources":["../../src/tools/conventions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAIH,MAAM,WAAW,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAscnB,CAAC;AAEF,MAAM,UAAU,mBAAmB,CAAC,MAAiB;IACnD,MAAM,CAAC,IAAI,CACT,qBAAqB,EACrB,2EAA2E;QACzE,2EAA2E;QAC3E,2EAA2E;QAC3E,4EAA4E;QAC5E,uEAAuE;QACvE,kBAAkB,EACpB,EAAE,EACF,KAAK,IAAI,EAAE,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,WAAW,EAAE,CAAC,EAAE,CAAC,CAC1E,CAAC;AACJ,CAAC"}
|
package/dist/tools/extras.js
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
*/
|
|
12
12
|
import { z } from "zod";
|
|
13
13
|
import { assertPlaceholderCredentials } from "./credentials.js";
|
|
14
|
-
import { guard, jsonResult } from "./result.js";
|
|
14
|
+
import { detachResult, guard, jsonResult } from "./result.js";
|
|
15
15
|
export function registerPersonaTools(server, client) {
|
|
16
16
|
server.tool("read_agent_persona", "Read an agent's persona (voice/character). A persona is 1:1 with an agent — " +
|
|
17
17
|
"there is no standalone persona list.", { agentId: z.string().describe("The agent's id.") }, async ({ agentId }) => guard(async () => jsonResult(await client.get(`/api/v1/agents/${agentId}/persona`))));
|
|
@@ -73,15 +73,14 @@ export function registerAttachTools(server, client) {
|
|
|
73
73
|
: ""), shape, async (args) => guard(async () => jsonResult(await client.post(path(args[firstArg], args[secondArg])))));
|
|
74
74
|
server.tool(`detach_${subject}_from_${target}`, `Unscope a ${subject.replace("_", " ")} from a ${target}. This only ` +
|
|
75
75
|
`removes the link — the ${subject.replace("_", " ")} itself is not deleted ` +
|
|
76
|
-
`and stays available to attach elsewhere
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
}));
|
|
76
|
+
`and stays available to attach elsewhere. The response is the SERVER'S ` +
|
|
77
|
+
`answer, not a success claim by this connector: a detach that had nothing ` +
|
|
78
|
+
`to remove reports that instead of failing, so read the body rather than ` +
|
|
79
|
+
`assuming the link is gone.` +
|
|
80
|
+
(readBack ? ` Confirm what is left with \`${readBack}\`.` : ""), shape, async (args) => guard(async () => detachResult(await client.del(path(args[firstArg], args[secondArg])), {
|
|
81
|
+
readBack,
|
|
82
|
+
request: { [firstArg]: args[firstArg], [secondArg]: args[secondArg] },
|
|
83
|
+
})));
|
|
85
84
|
};
|
|
86
85
|
link("skill", "agent", (agentId, skillId) => `/api/v1/agents/${agentId}/skills-v2/${skillId}`, "agentId", "skillId", "list_agent_skills");
|
|
87
86
|
// No read-back for the workflow-scoped variant: the backend has no
|
package/dist/tools/extras.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extras.js","sourceRoot":"","sources":["../../src/tools/extras.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAGH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAAE,4BAA4B,EAAE,MAAM,kBAAkB,CAAC;AAChE,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"extras.js","sourceRoot":"","sources":["../../src/tools/extras.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAGH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAAE,4BAA4B,EAAE,MAAM,kBAAkB,CAAC;AAChE,OAAO,EAAE,YAAY,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAE9D,MAAM,UAAU,oBAAoB,CAClC,MAAiB,EACjB,MAAqB;IAErB,MAAM,CAAC,IAAI,CACT,oBAAoB,EACpB,8EAA8E;QAC5E,sCAAsC,EACxC,EAAE,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,iBAAiB,CAAC,EAAE,EACnD,KAAK,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,CACpB,KAAK,CAAC,KAAK,IAAI,EAAE,CACf,UAAU,CAAC,MAAM,MAAM,CAAC,GAAG,CAAC,kBAAkB,OAAO,UAAU,CAAC,CAAC,CAClE,CACJ,CAAC;IAEF,MAAM,CAAC,IAAI,CACT,sBAAsB,EACtB,0EAA0E,EAC1E;QACE,OAAO,EAAE,CAAC,CAAC,MAAM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,4EAA4E;QAC1E,2EAA2E;QAC3E,sCAAsC,EACxC,EAAE,EACF,KAAK,IAAI,EAAE,CAAC,KAAK,CAAC,KAAK,IAAI,EAAE,CAAC,UAAU,CAAC,MAAM,MAAM,CAAC,GAAG,CAAC,sBAAsB,CAAC,CAAC,CAAC,CACpF,CAAC;IAEF,MAAM,CAAC,IAAI,CACT,YAAY,EACZ,uEAAuE;QACrE,oEAAoE;QACpE,uEAAuE;QACvE,qEAAqE;QACrE,oEAAoE,EACtE,EAAE,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,gBAAgB,CAAC,EAAE,EACjD,KAAK,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,CACnB,KAAK,CAAC,KAAK,IAAI,EAAE,CAAC,UAAU,CAAC,MAAM,MAAM,CAAC,IAAI,CAAC,iBAAiB,MAAM,QAAQ,CAAC,CAAC,CAAC,CACpF,CAAC;IAEF,MAAM,CAAC,IAAI,CACT,sBAAsB,EACtB,0DAA0D,EAC1D,EAAE,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,0BAA0B,CAAC,EAAE,EAC9D,KAAK,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE,CACtB,KAAK,CAAC,KAAK,IAAI,EAAE,CACf,UAAU,CAAC,MAAM,MAAM,CAAC,IAAI,CAAC,2BAA2B,SAAS,QAAQ,CAAC,CAAC,CAC5E,CACJ,CAAC;AACJ,CAAC"}
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
* module is only the linking layer that the generic registrar can't express.
|
|
12
12
|
*/
|
|
13
13
|
import { z } from "zod";
|
|
14
|
-
import { guard, jsonResult } from "./result.js";
|
|
14
|
+
import { detachResult, guard, jsonResult } from "./result.js";
|
|
15
15
|
/** The two prompt channels a snippet can be placed in. */
|
|
16
16
|
const TARGET = z
|
|
17
17
|
.enum(["system", "user"])
|
|
@@ -79,10 +79,13 @@ export function registerPromptPlacementTools(server, client) {
|
|
|
79
79
|
}))));
|
|
80
80
|
server.tool("detach_prompt_snippet_from_flow_step", "Remove a prompt snippet from a flow step's stack. This only unlinks it — the " +
|
|
81
81
|
"snippet itself is not deleted and stays available to place elsewhere. " +
|
|
82
|
-
"Identify the link by its linkId (from list_flow_step_prompts).
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
82
|
+
"Identify the link by its linkId (from list_flow_step_prompts). This route " +
|
|
83
|
+
"answers 204 with no body, so the result confirms the call was accepted and " +
|
|
84
|
+
"nothing more — read the stack back with list_flow_step_prompts to see what " +
|
|
85
|
+
"is actually attached.", { linkId: z.string().describe("The attachment's link id (not the snippet id).") }, async ({ linkId }) => guard(async () => detachResult(await client.del(`/api/v1/flow-step-prompts/${linkId}`), {
|
|
86
|
+
readBack: "list_flow_step_prompts",
|
|
87
|
+
request: { linkId },
|
|
88
|
+
})));
|
|
86
89
|
server.tool("read_workflow_prompt_stacks", "Resolve a workflow to its flow steps and each step's prompt stack in one " +
|
|
87
90
|
"read: per step you get its flowStepId, name, and its system/user prompt " +
|
|
88
91
|
"snippets (with link ids and order). This is how you discover the " +
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"promptPlacement.js","sourceRoot":"","sources":["../../src/tools/promptPlacement.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAGH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"promptPlacement.js","sourceRoot":"","sources":["../../src/tools/promptPlacement.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAGH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAAE,YAAY,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAE9D,0DAA0D;AAC1D,MAAM,MAAM,GAAG,CAAC;KACb,IAAI,CAAC,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,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,gBAAgB,CAAC,EAAE,EACjD,KAAK,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,CACnB,KAAK,CAAC,KAAK,IAAI,EAAE,CACf,UAAU,CAAC,MAAM,MAAM,CAAC,GAAG,CAAC,iBAAiB,MAAM,gBAAgB,CAAC,CAAC,CACtE,CACJ,CAAC;IAEF,MAAM,CAAC,IAAI,CACT,uBAAuB,EACvB,8EAA8E;QAC5E,uEAAuE;QACvE,sEAAsE;QACtE,8DAA8D,EAChE,EAAE,EACF,KAAK,IAAI,EAAE,CACT,KAAK,CAAC,KAAK,IAAI,EAAE,CAAC,UAAU,CAAC,MAAM,MAAM,CAAC,GAAG,CAAC,0BAA0B,CAAC,CAAC,CAAC,CAC9E,CAAC;AACJ,CAAC"}
|
package/dist/tools/result.d.ts
CHANGED
|
@@ -17,5 +17,29 @@ export declare function errorResult(err: unknown): {
|
|
|
17
17
|
}[];
|
|
18
18
|
isError: boolean;
|
|
19
19
|
};
|
|
20
|
+
/**
|
|
21
|
+
* The result of a detach call — the SERVER's answer, never a local assertion.
|
|
22
|
+
*
|
|
23
|
+
* These tools used to return a hand-made `{ detached: true }` and throw the
|
|
24
|
+
* response away. That is how 27 consecutive detach commands all reported
|
|
25
|
+
* success against links that did not exist: the documents applied tenant-wide,
|
|
26
|
+
* nothing was ever detached, and the client said otherwise every time (#24).
|
|
27
|
+
*
|
|
28
|
+
* Most detach routes do answer — `SkillLinkResponse` carries `linked`, the
|
|
29
|
+
* policy and reference-doc routes have bodies of their own — so forwarding is
|
|
30
|
+
* enough to make "removed something" distinguishable from "removed nothing".
|
|
31
|
+
* Where a route is 204 by design (`DELETE /flow-step-prompts/{id}`) there is
|
|
32
|
+
* nothing to forward, and the honest answer is to say the call completed and
|
|
33
|
+
* name the read-back, not to invent a verdict.
|
|
34
|
+
*/
|
|
35
|
+
export declare function detachResult(body: unknown, options?: {
|
|
36
|
+
readBack?: string;
|
|
37
|
+
request?: Record<string, string>;
|
|
38
|
+
}): {
|
|
39
|
+
content: {
|
|
40
|
+
type: "text";
|
|
41
|
+
text: string;
|
|
42
|
+
}[];
|
|
43
|
+
};
|
|
20
44
|
/** Wrap a handler so any thrown error becomes a clean tool error. */
|
|
21
45
|
export declare function guard(fn: () => Promise<ReturnType<typeof jsonResult>>): Promise<ReturnType<typeof jsonResult> | ReturnType<typeof errorResult>>;
|
package/dist/tools/result.js
CHANGED
|
@@ -18,6 +18,33 @@ export function errorResult(err) {
|
|
|
18
18
|
: String(err);
|
|
19
19
|
return { content: [{ type: "text", text: message }], isError: true };
|
|
20
20
|
}
|
|
21
|
+
/**
|
|
22
|
+
* The result of a detach call — the SERVER's answer, never a local assertion.
|
|
23
|
+
*
|
|
24
|
+
* These tools used to return a hand-made `{ detached: true }` and throw the
|
|
25
|
+
* response away. That is how 27 consecutive detach commands all reported
|
|
26
|
+
* success against links that did not exist: the documents applied tenant-wide,
|
|
27
|
+
* nothing was ever detached, and the client said otherwise every time (#24).
|
|
28
|
+
*
|
|
29
|
+
* Most detach routes do answer — `SkillLinkResponse` carries `linked`, the
|
|
30
|
+
* policy and reference-doc routes have bodies of their own — so forwarding is
|
|
31
|
+
* enough to make "removed something" distinguishable from "removed nothing".
|
|
32
|
+
* Where a route is 204 by design (`DELETE /flow-step-prompts/{id}`) there is
|
|
33
|
+
* nothing to forward, and the honest answer is to say the call completed and
|
|
34
|
+
* name the read-back, not to invent a verdict.
|
|
35
|
+
*/
|
|
36
|
+
export function detachResult(body, options = {}) {
|
|
37
|
+
const empty = body === undefined || body === null || body === "";
|
|
38
|
+
if (!empty)
|
|
39
|
+
return jsonResult(body);
|
|
40
|
+
return jsonResult({
|
|
41
|
+
completed: true,
|
|
42
|
+
...(options.request ? { request: options.request } : {}),
|
|
43
|
+
note: "The server accepted this and returned no content. That is NOT a " +
|
|
44
|
+
"confirmation that a link existed or that anything was removed" +
|
|
45
|
+
(options.readBack ? ` — check with ${options.readBack}.` : "."),
|
|
46
|
+
});
|
|
47
|
+
}
|
|
21
48
|
/** Wrap a handler so any thrown error becomes a clean tool error. */
|
|
22
49
|
export async function guard(fn) {
|
|
23
50
|
try {
|
package/dist/tools/result.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"result.js","sourceRoot":"","sources":["../../src/tools/result.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAE/C,4DAA4D;AAC5D,MAAM,UAAU,UAAU,CAAC,IAAa;IACtC,OAAO;QACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC;KAC1E,CAAC;AACJ,CAAC;AAED,+DAA+D;AAC/D,MAAM,UAAU,WAAW,CAAC,GAAY;IACtC,MAAM,OAAO,GACX,GAAG,YAAY,eAAe;QAC5B,CAAC,CAAC,GAAG,CAAC,OAAO;QACb,CAAC,CAAC,GAAG,YAAY,KAAK;YACpB,CAAC,CAAC,GAAG,CAAC,OAAO;YACb,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;IACpB,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;AAChF,CAAC;AAED,qEAAqE;AACrE,MAAM,CAAC,KAAK,UAAU,KAAK,CACzB,EAAgD;IAEhD,IAAI,CAAC;QACH,OAAO,MAAM,EAAE,EAAE,CAAC;IACpB,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,OAAO,WAAW,CAAC,GAAG,CAAC,CAAC;IAC1B,CAAC;AACH,CAAC"}
|
|
1
|
+
{"version":3,"file":"result.js","sourceRoot":"","sources":["../../src/tools/result.ts"],"names":[],"mappings":"AAAA;;;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GAAG,CAAC;KAClE,CAAC,CAAC;AACL,CAAC;AAED,qEAAqE;AACrE,MAAM,CAAC,KAAK,UAAU,KAAK,CACzB,EAAgD;IAEhD,IAAI,CAAC;QACH,OAAO,MAAM,EAAE,EAAE,CAAC;IACpB,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,OAAO,WAAW,CAAC,GAAG,CAAC,CAAC;IAC1B,CAAC;AACH,CAAC"}
|
package/dist/tools/validation.js
CHANGED
|
@@ -9,17 +9,44 @@
|
|
|
9
9
|
import { z } from "zod";
|
|
10
10
|
import { guard, jsonResult } from "./result.js";
|
|
11
11
|
export function registerValidationTools(server, client) {
|
|
12
|
-
server.tool("validate_workflow", "Check a workflow
|
|
13
|
-
"`
|
|
14
|
-
"
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
"
|
|
18
|
-
"and
|
|
12
|
+
server.tool("validate_workflow", "Check a workflow for problems. Returns `launchable`, `catalogChecked`, and an " +
|
|
13
|
+
"`issues` list (each with code, message, severity, stepIds, edgeIds). " +
|
|
14
|
+
"\n\nPass EXACTLY ONE of workflowId or document — they answer different " +
|
|
15
|
+
"questions:" +
|
|
16
|
+
"\n- workflowId → validates the STORED workflow against this tenant's " +
|
|
17
|
+
"catalog. This is the real 'can this run?': it confirms the agents, tools " +
|
|
18
|
+
"and flows the steps reference actually exist. Answers catalogChecked: true." +
|
|
19
|
+
"\n- document → validates the document you pass, STATELESSLY. No database, " +
|
|
20
|
+
"so read-only service tokens can call it, but with no catalog the " +
|
|
21
|
+
"cross-entity checks cannot run: `launchable` here means 'structurally " +
|
|
22
|
+
"sound', NOT 'this will run'. Answers catalogChecked: false. Use it for a " +
|
|
23
|
+
"draft you have not saved, or for fast feedback while editing." +
|
|
24
|
+
"\n\nA green verdict is what a reader remembers, so check `catalogChecked` " +
|
|
25
|
+
"before telling anyone a workflow is ready. Call this after " +
|
|
26
|
+
"apply_workflow_mutations and before request_publish_workflow.", {
|
|
27
|
+
workflowId: z
|
|
28
|
+
.string()
|
|
29
|
+
.optional()
|
|
30
|
+
.describe("Validate this STORED workflow against the tenant catalog. Omit if you " +
|
|
31
|
+
"are passing a document."),
|
|
19
32
|
document: z
|
|
20
33
|
.record(z.unknown())
|
|
21
|
-
.
|
|
22
|
-
|
|
34
|
+
.optional()
|
|
35
|
+
.describe("Validate this document statelessly (as returned by read_workflow). " +
|
|
36
|
+
"Omit if you are passing a workflowId."),
|
|
37
|
+
}, async ({ workflowId, document }) => guard(async () => {
|
|
38
|
+
// Refuse the ambiguous call rather than silently preferring one: the two
|
|
39
|
+
// routes answer different questions, and guessing would hand back a
|
|
40
|
+
// verdict for something the caller did not ask about.
|
|
41
|
+
if ((workflowId === undefined) === (document === undefined)) {
|
|
42
|
+
throw new Error("Pass exactly one of workflowId or document. workflowId validates the " +
|
|
43
|
+
"stored workflow against the tenant catalog (the 'can this run?' " +
|
|
44
|
+
"answer); document validates an unsaved document structurally.");
|
|
45
|
+
}
|
|
46
|
+
return jsonResult(workflowId === undefined
|
|
47
|
+
? await client.post("/api/v1/workflows/validate", { document })
|
|
48
|
+
: await client.post(`/api/v1/workflows/${workflowId}/validate`));
|
|
49
|
+
}));
|
|
23
50
|
server.tool("analyze_workflow_reachable_outputs", "List the outputs a given step can read — i.e. what upstream steps make " +
|
|
24
51
|
"available to it. Use it to bind a step's inputs to real upstream outputs " +
|
|
25
52
|
"instead of guessing field names. Stateless, and safe for read-only service tokens.", {
|
|
@@ -59,7 +86,11 @@ export function registerApprovalTools(server, client) {
|
|
|
59
86
|
server.tool("list_publish_approvals", "List this tenant's publish approvals and their status — how you find out " +
|
|
60
87
|
"whether a request_publish_* was approved or rejected. Optionally filter " +
|
|
61
88
|
"by status, and page through with limit/offset. Approving and rejecting " +
|
|
62
|
-
"are human-only actions in Axonity; no tool can do them."
|
|
89
|
+
"are human-only actions in Axonity; no tool can do them. " +
|
|
90
|
+
"\n\nReadiness is recomputed WHEN YOU READ, not frozen at request time: " +
|
|
91
|
+
"`readiness` is the verdict right now, `readinessAtRequest` is what the " +
|
|
92
|
+
"requester saw, and `readinessChanged` says whether it moved. So a blocker " +
|
|
93
|
+
"you saw an hour ago may already be resolved — and 'ready' means ready now.", {
|
|
63
94
|
status: z
|
|
64
95
|
.enum(["pending", "approved", "rejected"])
|
|
65
96
|
.optional()
|
|
@@ -68,13 +99,68 @@ export function registerApprovalTools(server, client) {
|
|
|
68
99
|
offset: z.number().int().min(0).optional().describe("Default 0."),
|
|
69
100
|
}, async ({ status, limit, offset }) => guard(async () => jsonResult(await client.get("/api/v1/publish-approvals", { status, limit, offset }))));
|
|
70
101
|
server.tool("get_publish_approval", "Read one publish approval by id — lets you poll a specific request rather " +
|
|
71
|
-
"than re-fetching the whole list.
|
|
102
|
+
"than re-fetching the whole list. Its `readiness` is recomputed on this " +
|
|
103
|
+
"read, so it reflects the entity as it stands NOW; `readinessAtRequest` " +
|
|
104
|
+
"keeps what the requester saw and `readinessChanged` flags a difference. " +
|
|
105
|
+
"This is how you check whether a blocker (for a tool, typically " +
|
|
106
|
+
"`dry_run_required`) has since been cleared.", { approvalId: z.string().describe("The approval's id, from request_publish_* or list_publish_approvals.") }, async ({ approvalId }) => guard(async () => jsonResult(await client.get(`/api/v1/publish-approvals/${approvalId}`))));
|
|
107
|
+
server.tool("request_publish_bulk", "Request publication of MANY entities in one call — the same human approval " +
|
|
108
|
+
"queue as request_publish_*, one entry per entity, up to 200. Taking a " +
|
|
109
|
+
"whole tenant live means hundreds of individual requests otherwise, which " +
|
|
110
|
+
"turns the human review it exists for into clicking through. This does NOT " +
|
|
111
|
+
"publish and does NOT approve: a human still decides, in Axonity. " +
|
|
112
|
+
"\n\nNOT TRANSACTIONAL: each entry carries its own outcome and one failure " +
|
|
113
|
+
"does not undo the entries before it. The response is " +
|
|
114
|
+
"`{ results: [{ id, success, status, error }], succeededCount, " +
|
|
115
|
+
"failedCount }`. Read the per-entry results — retrying the whole list " +
|
|
116
|
+
"because failedCount is non-zero double-requests everything that worked.", {
|
|
117
|
+
requests: z
|
|
118
|
+
.array(z.object({
|
|
119
|
+
entityType: z
|
|
120
|
+
.enum([
|
|
121
|
+
"workflow",
|
|
122
|
+
"agent",
|
|
123
|
+
"tool",
|
|
124
|
+
"skill",
|
|
125
|
+
"policy",
|
|
126
|
+
"reference_doc",
|
|
127
|
+
"persona",
|
|
128
|
+
"output_schema",
|
|
129
|
+
"prompt_snippet",
|
|
130
|
+
"flow",
|
|
131
|
+
"company",
|
|
132
|
+
])
|
|
133
|
+
.describe("What kind of entity this entry publishes."),
|
|
134
|
+
entityId: z
|
|
135
|
+
.string()
|
|
136
|
+
.optional()
|
|
137
|
+
.describe("The entity's id. Omit ONLY for company, which is a singleton " +
|
|
138
|
+
"the server resolves from your tenant."),
|
|
139
|
+
changeSummary: z
|
|
140
|
+
.string()
|
|
141
|
+
.optional()
|
|
142
|
+
.describe("A short note for the approver on what changed and why."),
|
|
143
|
+
}))
|
|
144
|
+
.min(1)
|
|
145
|
+
.max(200)
|
|
146
|
+
.describe("One entry per entity to propose for publishing."),
|
|
147
|
+
}, async ({ requests }) => guard(async () => jsonResult(await client.post("/api/v1/publish-approvals/bulk", { requests }))));
|
|
148
|
+
// Deliberately absent: bulk approve and bulk reject. Those routes exist on the
|
|
149
|
+
// backend for the human review UI. Deciding an approval is a human action in
|
|
150
|
+
// Axonity and no tool of this connector may take it — the same boundary
|
|
151
|
+
// list_publish_approvals states, and test/exclusions.test.ts enforces.
|
|
72
152
|
}
|
|
73
153
|
export function registerExecutionTools(server, client) {
|
|
74
|
-
server.tool("execute_tool", "Run tool code directly,
|
|
75
|
-
"authoring before create_tool/update_tool. Returns stdout/stderr, the " +
|
|
154
|
+
server.tool("execute_tool", "Run tool code directly, WITHOUT saving it — the way to test a tool you are " +
|
|
155
|
+
"authoring, before create_tool/update_tool. Returns stdout/stderr, the " +
|
|
76
156
|
"result, and a typed errorType (timeout/memory/import/runtime/validation) " +
|
|
77
|
-
"on failure. Pass toolId to run against an already-saved tool's context."
|
|
157
|
+
"on failure. Pass toolId to run against an already-saved tool's context. " +
|
|
158
|
+
"\n\nThis does NOT satisfy the publish gate, however cleanly it runs. It " +
|
|
159
|
+
"executes the functions YOU supply, which need not be the tool's stored " +
|
|
160
|
+
"code, so a pass here proves nothing about what would actually ship. To " +
|
|
161
|
+
"clear the `dry_run_required` blocker on a SAVED tool, use `dry_run_tool` — " +
|
|
162
|
+
"that runs the tool's own stored implementation and is the only run that " +
|
|
163
|
+
"counts.", {
|
|
78
164
|
imports: z.string().optional().describe("The import block. Defaults to empty."),
|
|
79
165
|
functions: z
|
|
80
166
|
.array(z.object({ name: z.string(), code: z.string() }))
|
|
@@ -97,6 +183,27 @@ export function registerExecutionTools(server, client) {
|
|
|
97
183
|
...(timeout ? { timeout } : {}),
|
|
98
184
|
...(toolId ? { toolId } : {}),
|
|
99
185
|
}))));
|
|
186
|
+
server.tool("dry_run_tool", "Prove a SAVED tool by running its OWN stored code in the sandbox. This is " +
|
|
187
|
+
"the run that satisfies the publish gate: a clean pass stamps the tool's " +
|
|
188
|
+
"current version and clears the `dry_run_required` blocker, so " +
|
|
189
|
+
"request_publish_tool can succeed. Nothing about the code is supplied by " +
|
|
190
|
+
"you — only sample input — which is exactly why it counts and why " +
|
|
191
|
+
"execute_tool does not.\n" +
|
|
192
|
+
"Editing the tool afterwards bumps its version and invalidates the proof, " +
|
|
193
|
+
"so dry-run again after your last edit, not before it.\n" +
|
|
194
|
+
"Expect a refusal for tools that have no code to prove: 403 for a " +
|
|
195
|
+
"platform-shipped (locked) tool, 422 for a connector, a builtin-backed " +
|
|
196
|
+
"validator, or a tool with an empty implementation.", {
|
|
197
|
+
toolId: z.string().describe("The saved tool's id."),
|
|
198
|
+
inputParams: z
|
|
199
|
+
.record(z.unknown())
|
|
200
|
+
.optional()
|
|
201
|
+
.describe("Sample arguments for the tool's entry-point function. Omit for none — " +
|
|
202
|
+
"but give it realistic input: a run that never reaches the real work " +
|
|
203
|
+
"still stamps the version."),
|
|
204
|
+
}, async ({ toolId, inputParams }) => guard(async () => jsonResult(await client.post(`/api/v1/tools/${toolId}/dry-run`, {
|
|
205
|
+
inputParams: inputParams ?? {},
|
|
206
|
+
}))));
|
|
100
207
|
server.tool("execute_stored_connector", "Test-run an ALREADY-SAVED connector by its tool id — the backend loads its " +
|
|
101
208
|
"stored authConfig and decrypts the real secret server-side; nothing " +
|
|
102
209
|
"credential-shaped ever passes through this tool or through you. Takes " +
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validation.js","sourceRoot":"","sources":["../../src/tools/validation.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEhD,MAAM,UAAU,uBAAuB,CACrC,MAAiB,EACjB,MAAqB;IAErB,MAAM,CAAC,IAAI,CACT,mBAAmB,EACnB,
|
|
1
|
+
{"version":3,"file":"validation.js","sourceRoot":"","sources":["../../src/tools/validation.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEhD,MAAM,UAAU,uBAAuB,CACrC,MAAiB,EACjB,MAAqB;IAErB,MAAM,CAAC,IAAI,CACT,mBAAmB,EACnB,gFAAgF;QAC9E,uEAAuE;QACvE,yEAAyE;QACzE,YAAY;QACZ,uEAAuE;QACvE,2EAA2E;QAC3E,6EAA6E;QAC7E,4EAA4E;QAC5E,mEAAmE;QACnE,wEAAwE;QACxE,2EAA2E;QAC3E,+DAA+D;QAC/D,4EAA4E;QAC5E,6DAA6D;QAC7D,+DAA+D,EACjE;QACE,UAAU,EAAE,CAAC;aACV,MAAM,EAAE;aACR,QAAQ,EAAE;aACV,QAAQ,CACP,wEAAwE;YACtE,yBAAyB,CAC5B;QACH,QA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C,IAAI,CAAC,iBAAiB,MAAM,UAAU,EAAE;QACnD,WAAW,EAAE,WAAW,IAAI,EAAE;KAC/B,CAAC,CACH,CACF,CACJ,CAAC;IAEF,MAAM,CAAC,IAAI,CACT,0BAA0B,EAC1B,6EAA6E;QAC3E,sEAAsE;QACtE,wEAAwE;QACxE,2EAA2E;QAC3E,2EAA2E;QAC3E,4EAA4E;QAC5E,2EAA2E,EAC7E;QACE,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,kDAAkD,CAAC;QAC/E,WAAW,EAAE,CAAC;aACX,MAAM,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC;aACnB,QAAQ,EAAE;aACV,QAAQ,CAAC,oCAAoC,CAAC;KAClD,EACD,KAAK,EAAE,EAAE,MAAM,EAAE,WAAW,EAAE,EAAE,EAAE,CAChC,KAAK,CAAC,KAAK,IAAI,EAAE,CACf,UAAU,CACR,MAAM,MAAM,CAAC,IAAI,CAAC,iBAAiB,MAAM,oBAAoB,EAAE;QAC7D,GAAG,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,WAAW,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KACxC,CAAC,CACH,CACF,CACJ,CAAC;AACJ,CAAC"}
|
|
@@ -19,6 +19,31 @@
|
|
|
19
19
|
*/
|
|
20
20
|
import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
21
21
|
import type { AxonityClient } from "../client.js";
|
|
22
|
+
/** The response shape of a single mutation call. */
|
|
23
|
+
interface MutationResponse {
|
|
24
|
+
version: number;
|
|
25
|
+
document?: unknown;
|
|
26
|
+
launchable?: boolean;
|
|
27
|
+
validationIssues?: unknown[];
|
|
28
|
+
/**
|
|
29
|
+
* What the platform changed on its own in this call: the end-step edges it
|
|
30
|
+
* wired, and the bound inputs whose contract it re-derived. Ids and names
|
|
31
|
+
* only, by design, so it rides safely on the summary — and it is the whole
|
|
32
|
+
* point of forwarding it: an author who found edges they never asked for
|
|
33
|
+
* previously had to diff the entire document to see them.
|
|
34
|
+
*/
|
|
35
|
+
systemAdjustments?: {
|
|
36
|
+
addedEdges?: unknown[];
|
|
37
|
+
removedEdges?: unknown[];
|
|
38
|
+
rederivedInputs?: unknown[];
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Project a mutation response into the compact summary a caller acts on:
|
|
43
|
+
* the new version, what landed, the launchable verdict, validation issues, and
|
|
44
|
+
* cheap orientation counts taken from the document before it is dropped.
|
|
45
|
+
*/
|
|
46
|
+
export declare function summarizeMutation(response: MutationResponse, appliedCount: number, returnDocument: boolean): Record<string, unknown>;
|
|
22
47
|
/**
|
|
23
48
|
* Split one command into the `{ type, payload }` pair the backend expects.
|
|
24
49
|
*
|
|
@@ -31,3 +56,4 @@ export declare function toMutationBody(mutation: Record<string, unknown>, index:
|
|
|
31
56
|
payload: Record<string, unknown>;
|
|
32
57
|
};
|
|
33
58
|
export declare function registerWorkflowMutations(server: McpServer, client: AxonityClient): void;
|
|
59
|
+
export {};
|
|
@@ -24,6 +24,83 @@ import { guard, jsonResult } from "./result.js";
|
|
|
24
24
|
const CONFIRM = z
|
|
25
25
|
.literal(true)
|
|
26
26
|
.describe("Must be true. Acknowledges you understand this is destructive.");
|
|
27
|
+
/** True when the platform reported doing something of its own accord. */
|
|
28
|
+
function hasAdjustments(a) {
|
|
29
|
+
if (!a)
|
|
30
|
+
return false;
|
|
31
|
+
return Boolean(a.addedEdges?.length || a.removedEdges?.length || a.rederivedInputs?.length);
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Why the document is not forwarded by default (#21).
|
|
35
|
+
*
|
|
36
|
+
* The backend answers every mutation with the WHOLE document. A real workflow
|
|
37
|
+
* runs past 100k characters, which overflows the client's response limit — so a
|
|
38
|
+
* change that SUCCEEDED came back as an error. Believing that error and retrying
|
|
39
|
+
* applies the change twice (with `add_step`, a duplicate step). It also made the
|
|
40
|
+
* deliberate non-transactional semantics far worse than they need to be: an
|
|
41
|
+
* unreadable failure on a partially-applied sequence.
|
|
42
|
+
*
|
|
43
|
+
* So the client projects the response down to what a caller acts on, and hands
|
|
44
|
+
* over the document only when asked. Two caps keep even the summary bounded:
|
|
45
|
+
* `validationIssues` is caller-controlled in size, and an API error message can
|
|
46
|
+
* carry the server's body (see `withDetail` in errors.ts) — which is another way
|
|
47
|
+
* a document can reach the response.
|
|
48
|
+
*/
|
|
49
|
+
const MAX_VALIDATION_ISSUES = 25;
|
|
50
|
+
const MAX_REASON_CHARS = 1500;
|
|
51
|
+
/** Shorten a string, saying so rather than truncating silently. */
|
|
52
|
+
function cap(text, limit) {
|
|
53
|
+
if (text.length <= limit)
|
|
54
|
+
return text;
|
|
55
|
+
return `${text.slice(0, limit)}… [truncated ${text.length - limit} of ${text.length} characters]`;
|
|
56
|
+
}
|
|
57
|
+
/** Count array members at a path in the document, when it looks as expected. */
|
|
58
|
+
function countAt(document, key) {
|
|
59
|
+
const steps = document?.steps;
|
|
60
|
+
const value = steps?.[key];
|
|
61
|
+
return Array.isArray(value) ? value.length : undefined;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Project a mutation response into the compact summary a caller acts on:
|
|
65
|
+
* the new version, what landed, the launchable verdict, validation issues, and
|
|
66
|
+
* cheap orientation counts taken from the document before it is dropped.
|
|
67
|
+
*/
|
|
68
|
+
export function summarizeMutation(response, appliedCount, returnDocument) {
|
|
69
|
+
const issues = Array.isArray(response.validationIssues) ? response.validationIssues : [];
|
|
70
|
+
const kept = issues.slice(0, MAX_VALIDATION_ISSUES);
|
|
71
|
+
const stepCount = countAt(response.document, "all");
|
|
72
|
+
const edgeCount = countAt(response.document, "edges");
|
|
73
|
+
return {
|
|
74
|
+
version: response.version,
|
|
75
|
+
appliedCount,
|
|
76
|
+
...(response.launchable === undefined ? {} : { launchable: response.launchable }),
|
|
77
|
+
...(stepCount === undefined ? {} : { stepCount }),
|
|
78
|
+
...(edgeCount === undefined ? {} : { edgeCount }),
|
|
79
|
+
// Only when something actually happened — an empty object on every response
|
|
80
|
+
// trains a reader to skip the field.
|
|
81
|
+
...(hasAdjustments(response.systemAdjustments)
|
|
82
|
+
? { systemAdjustments: response.systemAdjustments }
|
|
83
|
+
: {}),
|
|
84
|
+
validationIssues: kept,
|
|
85
|
+
...(issues.length > kept.length
|
|
86
|
+
? {
|
|
87
|
+
validationIssuesTruncated: issues.length - kept.length,
|
|
88
|
+
validationIssuesTotal: issues.length,
|
|
89
|
+
}
|
|
90
|
+
: {}),
|
|
91
|
+
// Absent by default — say where it is rather than leaving the caller guessing.
|
|
92
|
+
...(returnDocument
|
|
93
|
+
? { document: response.document }
|
|
94
|
+
: { documentOmitted: "Summary only. Pass returnDocument: true, or call read_workflow." }),
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
/** The `returnDocument` opt-in, shared by both document-returning tools. */
|
|
98
|
+
const RETURN_DOCUMENT = z
|
|
99
|
+
.boolean()
|
|
100
|
+
.optional()
|
|
101
|
+
.describe("Include the full workflow document in the response. Defaults to false — a " +
|
|
102
|
+
"real document can exceed the response limit and turn a successful call " +
|
|
103
|
+
"into an error. Prefer read_workflow when you need it.");
|
|
27
104
|
/**
|
|
28
105
|
* Split one command into the `{ type, payload }` pair the backend expects.
|
|
29
106
|
*
|
|
@@ -46,9 +123,12 @@ export function toMutationBody(mutation, index) {
|
|
|
46
123
|
}
|
|
47
124
|
/** Compose the error for a mutation that failed part-way through a sequence. */
|
|
48
125
|
function sequenceError(index, total, type, version, cause) {
|
|
49
|
-
|
|
126
|
+
// An AxonityApiError message can carry the server's response body, and that
|
|
127
|
+
// body is often the whole document — the very thing this tool refuses to
|
|
128
|
+
// forward. Cap it so a mid-sequence failure stays readable (#21).
|
|
129
|
+
const reason = cap(cause instanceof AxonityApiError || cause instanceof Error
|
|
50
130
|
? cause.message
|
|
51
|
-
: String(cause);
|
|
131
|
+
: String(cause), MAX_REASON_CHARS);
|
|
52
132
|
const applied = index;
|
|
53
133
|
const summary = JSON.stringify({ appliedCount: applied, failedIndex: index, failedType: type, currentVersion: version }, null, 2);
|
|
54
134
|
return new Error(`Mutation ${index + 1} of ${total} (\`${type}\`) failed: ${reason}\n\n` +
|
|
@@ -62,15 +142,40 @@ export function registerWorkflowMutations(server, client) {
|
|
|
62
142
|
"connect edges, set conditions). Read the workflow first for its version. " +
|
|
63
143
|
"Commands are applied IN ORDER, one backend call each, with the version " +
|
|
64
144
|
"threaded automatically — pass the version you read, not one per command. " +
|
|
65
|
-
"
|
|
66
|
-
"
|
|
67
|
-
"
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
"
|
|
71
|
-
"
|
|
72
|
-
"
|
|
73
|
-
"
|
|
145
|
+
"\n\nRESPONSE IS A SUMMARY, not the document: version, appliedCount, " +
|
|
146
|
+
"launchable, validationIssues, stepCount, edgeCount. A real workflow " +
|
|
147
|
+
"document can exceed the response limit, which would turn a call that " +
|
|
148
|
+
"SUCCEEDED into an error you must not retry. Pass returnDocument: true, or " +
|
|
149
|
+
"call read_workflow, when you need the document itself. " +
|
|
150
|
+
"\n\nNot transactional: if command N fails, commands before it stay applied " +
|
|
151
|
+
"and the error reports how many landed and which index failed — resume from " +
|
|
152
|
+
"there, do NOT replay the list. On a 409 conflict, re-read and retry. " +
|
|
153
|
+
'\n\nEach command is `{ "type": "add_step", "payload": { … } }`; the flat ' +
|
|
154
|
+
'form `{ "type": "add_step", … }` is accepted too. Valid types: ' +
|
|
155
|
+
"update_workflow, add_trigger, update_trigger, remove_trigger, " +
|
|
156
|
+
"update_trigger_operator, group_triggers, ungroup_triggers, move_trigger, " +
|
|
157
|
+
"add_step, add_loop, update_step, remove_step, move_step, add_edge, " +
|
|
158
|
+
"update_edge, remove_edge, add_decision_condition, convert_to_loop, " +
|
|
159
|
+
"setup_loop_decision, advanced_edit, attach_output_schema, " +
|
|
160
|
+
"detach_output_schema." +
|
|
161
|
+
"\n\nPAYLOAD CONTRACT:" +
|
|
162
|
+
"\n- add_step builds a COMPLETE step in ONE call: { name, position: " +
|
|
163
|
+
"{after|before: <stepId>, …} } are required, and id, type, typeId, config, " +
|
|
164
|
+
"contract, inputs, outputs and edgeType are all accepted alongside them. No " +
|
|
165
|
+
"follow-up update_step is needed merely to fill the step in." +
|
|
166
|
+
"\n- add_edge accepts the document's own from/to as well as " +
|
|
167
|
+
"fromStepId/toStepId, and HONOURS an id you supply rather than replacing it, " +
|
|
168
|
+
"so ids stay diffable against an environment you are reproducing." +
|
|
169
|
+
"\n- Payloads are STRICT: an unknown or misspelled key is a 422 that names " +
|
|
170
|
+
"it, never a silent drop. Read the error instead of assuming a value landed." +
|
|
171
|
+
"\n\nTWO INVARIANTS RUN AFTER EVERY EDIT, and the response reports what they " +
|
|
172
|
+
"did in `systemAdjustments` (addedEdges / removedEdges / rederivedInputs):" +
|
|
173
|
+
"\n- Every step is guaranteed to reach the END point; the platform wires that " +
|
|
174
|
+
"edge itself. An edge you did not ask for is this, and it is listed." +
|
|
175
|
+
"\n- A bound input's contract, its description included, is DERIVED from the " +
|
|
176
|
+
"output it reads and cannot be authored on its own. Set the text on the " +
|
|
177
|
+
"PRODUCING step's output; a downstream description changing by itself is this " +
|
|
178
|
+
"rule at work, and the inputs it re-derived are listed.", {
|
|
74
179
|
id: z.string().describe("The workflow's id."),
|
|
75
180
|
expectedVersion: z
|
|
76
181
|
.number()
|
|
@@ -83,7 +188,8 @@ export function registerWorkflowMutations(server, client) {
|
|
|
83
188
|
.describe("Mutation commands to apply in order, each a JSON object with a " +
|
|
84
189
|
"`type` and its arguments (camelCase), either nested under " +
|
|
85
190
|
"`payload` or inline."),
|
|
86
|
-
|
|
191
|
+
returnDocument: RETURN_DOCUMENT,
|
|
192
|
+
}, async ({ id, expectedVersion, mutations, returnDocument }) => guard(async () => {
|
|
87
193
|
// Reject the whole batch on a malformed command before applying any of
|
|
88
194
|
// it — a shape error is the agent's mistake, not a partial failure.
|
|
89
195
|
const bodies = mutations.map((m, i) => toMutationBody(m, i));
|
|
@@ -98,13 +204,16 @@ export function registerWorkflowMutations(server, client) {
|
|
|
98
204
|
}
|
|
99
205
|
version = last.version;
|
|
100
206
|
}
|
|
101
|
-
return jsonResult({
|
|
207
|
+
return jsonResult(summarizeMutation(last ?? { version }, bodies.length, returnDocument === true));
|
|
102
208
|
}));
|
|
103
|
-
server.tool("replace_workflow_document", "Replace the ENTIRE workflow document in one atomic call. Read the workflow
|
|
104
|
-
"get the current version, then call this again only after rereading
|
|
105
|
-
"`409
|
|
106
|
-
"
|
|
107
|
-
"
|
|
209
|
+
server.tool("replace_workflow_document", "Replace the ENTIRE workflow document in one atomic call. Read the workflow " +
|
|
210
|
+
"first to get the current version, then call this again only after rereading " +
|
|
211
|
+
"on a stale `409`. Unlike `apply_workflow_mutations`, this is a single PUT " +
|
|
212
|
+
"and treats the payload as the complete editable document — prefer the " +
|
|
213
|
+
"mutation commands, which the backend validates and normalises per edit. " +
|
|
214
|
+
"\n\nThe response is the same SUMMARY (version, launchable, " +
|
|
215
|
+
"validationIssues, stepCount, edgeCount), not the stored document; pass " +
|
|
216
|
+
"returnDocument: true or call read_workflow for that.", {
|
|
108
217
|
id: z.string().describe("The workflow's id."),
|
|
109
218
|
expectedVersion: z
|
|
110
219
|
.number()
|
|
@@ -113,10 +222,13 @@ export function registerWorkflowMutations(server, client) {
|
|
|
113
222
|
document: z
|
|
114
223
|
.record(z.unknown())
|
|
115
224
|
.describe("The complete workflow document object to persist."),
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
document
|
|
119
|
-
|
|
225
|
+
returnDocument: RETURN_DOCUMENT,
|
|
226
|
+
}, async ({ id, expectedVersion, document, returnDocument }) => guard(async () => {
|
|
227
|
+
const response = await client.put(`/api/v1/workflows/${id}`, { expectedVersion, document });
|
|
228
|
+
// One document written, so appliedCount is 1 — the same shape as a
|
|
229
|
+
// single-command sequence, which is what a caller compares against.
|
|
230
|
+
return jsonResult(summarizeMutation(response, 1, returnDocument === true));
|
|
231
|
+
}));
|
|
120
232
|
server.tool("read_workflow_trigger_parameters", "Read the input parameters a workflow's triggers expect — what a caller must " +
|
|
121
233
|
"supply to start it. Use this before authoring a webhook/cron/conditional " +
|
|
122
234
|
"trigger, or before start_workflow_run, so the trigger input matches. Read-only.", { workflowId: z.string().describe("The workflow's id.") }, async ({ workflowId }) => guard(async () => jsonResult(await client.get(`/api/v1/workflows/${workflowId}/trigger-parameters`))));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflowMutations.js","sourceRoot":"","sources":["../../src/tools/workflowMutations.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEhD,+EAA+E;AAC/E,MAAM,OAAO,GAAG,CAAC;KACd,OAAO,CAAC,IAAI,CAAC;KACb,QAAQ,CAAC,gEAAgE,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"workflowMutations.js","sourceRoot":"","sources":["../../src/tools/workflowMutations.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEhD,+EAA+E;AAC/E,MAAM,OAAO,GAAG,CAAC;KACd,OAAO,CAAC,IAAI,CAAC;KACb,QAAQ,CAAC,gEAAgE,CAAC,CAAC;AAsB9E,yEAAyE;AACzE,SAAS,cAAc,CAAC,CAAwC;IAC9D,IAAI,CAAC,CAAC;QAAE,OAAO,KAAK,CAAC;IACrB,OAAO,OAAO,CACZ,CAAC,CAAC,UAAU,EAAE,MAAM,IAAI,CAAC,CAAC,YAAY,EAAE,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Ae,EAAE,CAAC;iBACf,MAAM,EAAE;iBACR,GAAG,EAAE;iBACL,QAAQ,CAAC,mDAAmD,CAAC;SACjE,CAAC,CACH;aACA,GAAG,CAAC,CAAC,CAAC;aACN,QAAQ,CAAC,yDAAyD,CAAC;QACtE,OAAO,EAAE,OAAO;KACjB,EACD,KAAK,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE,CACtB,KAAK,CAAC,KAAK,IAAI,EAAE,CACf,UAAU,CAAC,MAAM,MAAM,CAAC,IAAI,CAAC,+BAA+B,EAAE,EAAE,SAAS,EAAE,CAAC,CAAC,CAC9E,CACJ,CAAC;AACJ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@axonity-ai/mcp",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "Model Context Protocol server for Axonity Flow — lets an external agent (e.g. Claude Code) read, draft, and update workflows, agents and tools in an Axonity tenant.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|