@axonity-ai/mcp 0.25.0 → 0.26.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 +54 -36
- package/dist/contract.d.ts +14 -2
- package/dist/contract.js +30 -10
- package/dist/contract.js.map +1 -1
- package/dist/errors.d.ts +14 -4
- package/dist/errors.js +45 -15
- package/dist/errors.js.map +1 -1
- package/dist/generated/listFilters.d.ts +1 -1
- package/dist/generated/listFilters.js +2 -2
- package/dist/generated/listFilters.js.map +1 -1
- package/dist/index.d.ts +8 -0
- package/dist/index.js +50 -22
- package/dist/index.js.map +1 -1
- package/dist/tools/authoringSpec.js +7 -2
- package/dist/tools/authoringSpec.js.map +1 -1
- package/dist/tools/conventions.d.ts +1 -1
- package/dist/tools/conventions.js +137 -78
- package/dist/tools/conventions.js.map +1 -1
- package/dist/tools/dataTables.js +3 -2
- package/dist/tools/dataTables.js.map +1 -1
- package/dist/tools/entityContract.js +5 -3
- package/dist/tools/entityContract.js.map +1 -1
- package/dist/tools/extras.d.ts +15 -5
- package/dist/tools/extras.js +71 -19
- package/dist/tools/extras.js.map +1 -1
- package/dist/tools/register.d.ts +14 -3
- package/dist/tools/register.js +3 -1
- package/dist/tools/register.js.map +1 -1
- package/dist/tools/runs.js +70 -41
- package/dist/tools/runs.js.map +1 -1
- package/dist/tools/validation.d.ts +5 -4
- package/dist/tools/validation.js +29 -19
- package/dist/tools/validation.js.map +1 -1
- package/dist/tools/versions.d.ts +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,8 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
A local [Model Context Protocol](https://modelcontextprotocol.io) server that lets
|
|
4
4
|
an external agent (e.g. **Claude Code** on your laptop) read, draft, update, and
|
|
5
|
-
recoverably delete **workflows, agents, tools, skills,
|
|
6
|
-
|
|
5
|
+
recoverably delete **workflows, agents (with their persona), tools, skills,
|
|
6
|
+
policies, reference docs, output schemas, prompt snippets and flows** in your
|
|
7
|
+
Axonity tenant —
|
|
7
8
|
the same verbs the internal Builder team has, minus direct publish.
|
|
8
9
|
|
|
9
10
|
It runs on your machine and talks to Axonity **only over the public REST API**,
|
|
@@ -56,8 +57,8 @@ was kept here. A conformance test asserts their absence.
|
|
|
56
57
|
### The generic entity family
|
|
57
58
|
|
|
58
59
|
Thirteen entities — **workflow, agent, tool, skill, policy, reference_doc,
|
|
59
|
-
|
|
60
|
-
|
|
60
|
+
output_schema, prompt_snippet, flow, data_table, measure, query, application** —
|
|
61
|
+
share one shape,
|
|
61
62
|
though not every entity gets every verb (see the per-entity notes below for the
|
|
62
63
|
exceptions):
|
|
63
64
|
|
|
@@ -73,8 +74,7 @@ exceptions):
|
|
|
73
74
|
| `discard_<entity>_draft` | Reset the draft to the last published state. |
|
|
74
75
|
| `request_publish_<entity>` | Ask for a draft to be published — creates a pending approval; never publishes. |
|
|
75
76
|
|
|
76
|
-
|
|
77
|
-
`create_agent_persona`). And `list_data_tables` (like `list_measures` and
|
|
77
|
+
Exception: `list_data_tables` (like `list_measures`, `list_queries` and
|
|
78
78
|
`list_applications`) answers **one page**, not the whole library — see Tables
|
|
79
79
|
below.
|
|
80
80
|
|
|
@@ -91,10 +91,12 @@ backend applies it before the rows come back:
|
|
|
91
91
|
`list_policies({ scope?, ownerId? })`,
|
|
92
92
|
`list_reference_docs({ scope?, ownerId? })`,
|
|
93
93
|
`list_prompt_snippets({ deleted? })`,
|
|
94
|
-
`list_data_tables({ name?, status?, isDynamic? })`,
|
|
94
|
+
`list_data_tables({ name?, status?, isDynamic?, filledBy? })`,
|
|
95
95
|
`list_data_sources({ enabled? })`,
|
|
96
96
|
`list_table_relationships({ tableId? })`,
|
|
97
|
-
`
|
|
97
|
+
`list_measures({ tableId? })`,
|
|
98
|
+
`list_applications({ name? })`,
|
|
99
|
+
`list_queries({ dataSourceId? })`.
|
|
98
100
|
|
|
99
101
|
That table is **generated** from the pinned schema's own query parameters
|
|
100
102
|
(`npm run generate:filters` → `src/generated/listFilters.ts`), not hand-listed.
|
|
@@ -113,16 +115,20 @@ Plus:
|
|
|
113
115
|
are not interchangeable** — `parameterTypes` (a trigger parameter's or
|
|
114
116
|
workflow constant's `type`), `outputKinds` (a step output's or input's
|
|
115
117
|
`kind` — narrower, *different key*) and `schemaFieldKinds` (inside a field's
|
|
116
|
-
`schema`, which wins where present)
|
|
118
|
+
`schema`, which wins where present), plus `decisionEvaluators` (what a
|
|
119
|
+
decision may branch with) and `tableColumnKinds` (a table column's kind).
|
|
120
|
+
Getting the three value vocabularies wrong is silent:
|
|
117
121
|
a `kind` written on a trigger parameter is not a 422, it is a key nothing
|
|
118
122
|
reads, so the value falls back to text. Every list is generated from the
|
|
119
123
|
registry that *enforces* it, so the connector states none of them and a new
|
|
120
124
|
value is discoverable without a release here. `operations` is an index by
|
|
121
125
|
default; pass `types` for a command's live payload schema. `rulesVersion` is
|
|
122
|
-
a content hash over all
|
|
126
|
+
a content hash over all of them — same hash, nothing to re-fetch.
|
|
123
127
|
- `get_entity_authoring_contract` — the platform's **create contract per
|
|
124
|
-
entity kind** (
|
|
125
|
-
|
|
128
|
+
entity kind** (`tool` with each type's implementation, `agent` with its
|
|
129
|
+
persona, `application`, `measure`, `query`, `data_table`, `output_schema`,
|
|
130
|
+
`policy`, `skill`, `reference_doc`, `prompt_snippet`, `toolbox`, `secret`,
|
|
131
|
+
`conditional_trigger`, `trigger_element`), read live from
|
|
126
132
|
`GET /api/v1/authoring/entity-contracts` (axonity-flow#2103):
|
|
127
133
|
`{ kinds, contracts, rulesVersion }`, per kind the create/update fields and
|
|
128
134
|
the `publish.rules` that stop it going live. Pass `kinds` to narrow it (sent
|
|
@@ -167,10 +173,13 @@ across these routes — the tool parameter names say which.
|
|
|
167
173
|
|
|
168
174
|
### Also
|
|
169
175
|
|
|
170
|
-
- **Personas**:
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
entity
|
|
176
|
+
- **Personas**: since axonity-flow#2176 a persona is the agent's `persona` field
|
|
177
|
+
(the character text every prompt of the agent opens with), set with
|
|
178
|
+
`create_agent` / `update_agent` and published with the agent. There is no
|
|
179
|
+
persona entity any more: no id, versions or approvals of its own.
|
|
180
|
+
`read_agent_persona` reads the field (with the agent's `version`) and
|
|
181
|
+
`create_agent_persona` writes it (`agentId`, `expectedVersion`, `persona`);
|
|
182
|
+
`""` removes it, `null` on an update leaves it as it is.
|
|
174
183
|
- **Connectors** (a tool of type `connector`): `create_connector`,
|
|
175
184
|
`update_connector` — `authConfig` must be placeholders only; a human fills real
|
|
176
185
|
secrets in Axonity. (`create_tool`/`update_tool` carry the same guard, so a
|
|
@@ -263,8 +272,9 @@ across these routes — the tool parameter names say which.
|
|
|
263
272
|
author designs and maintains, and agents and decisions read. The whole
|
|
264
273
|
lifecycle is the generic family above; three things are not, and each is a
|
|
265
274
|
way to be quietly wrong:
|
|
266
|
-
- `list_data_tables` is **paged** (20 by default, 200 max),
|
|
267
|
-
|
|
275
|
+
- `list_data_tables` is **paged** (20 by default, 200 max), like
|
|
276
|
+
`list_measures`, `list_queries` and `list_applications`, because a tenant's
|
|
277
|
+
reference data has no ceiling. Page one
|
|
268
278
|
is not the library — follow `nextCursor` while `hasMore`, or narrow with
|
|
269
279
|
`name`, which is exact and unique per workspace.
|
|
270
280
|
- **`rows` and `columns` are whole-collection fields.** Sending `rows`
|
|
@@ -304,12 +314,15 @@ across these routes — the tool parameter names say which.
|
|
|
304
314
|
`list_query_live_versions`. It carries the SQL, the source, the grain,
|
|
305
315
|
its typed `parameters` and its described `returns`.
|
|
306
316
|
- **There is no sync object, and no `provenance`.** A table says what fills
|
|
307
|
-
it in `filledBy` — `author`, `workflow` or `
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
317
|
+
it in `filledBy` — `author`, `workflow`, `query` or `source` (the rows stay
|
|
318
|
+
in a data source; `external` says where) — and a query-filled table names
|
|
319
|
+
its query in `fillingQueryId` and when it runs in `rhythm`
|
|
320
|
+
(`{ cron, timezone, keyColumns, mode, enabled }`). Whether a table is read
|
|
321
|
+
live or as published follows from its `versioning` (`live` or `config`;
|
|
322
|
+
only an author's table may choose), and a measure reads every table whose
|
|
323
|
+
rows Flow holds. `refresh_data_table` fills a query-filled table now
|
|
324
|
+
instead of at its next turn (it does not wait for the result; read the
|
|
325
|
+
table's `fill` afterwards).
|
|
313
326
|
- **Concept links**: a concept's `refersTo` points at one thing;
|
|
314
327
|
`link_concept`, `unlink_concept` and `list_concept_links` hang the same
|
|
315
328
|
word on every column, table, measure, value or query that means it. The
|
|
@@ -430,7 +443,7 @@ across these routes — the tool parameter names say which.
|
|
|
430
443
|
|
|
431
444
|
| Tool | What it does |
|
|
432
445
|
|------|--------------|
|
|
433
|
-
| `validate_workflow` |
|
|
446
|
+
| `validate_workflow` | Check a workflow against the tenant's catalog. By `document`: the document as it stands, saves nothing, read-only-token safe; skips only the checks about that workflow's own wiring (its triggers and attached knowledge). By `workflowId`: the saved workflow with those checks too; needs a token with the `author` scope. Read `catalogChecked`. |
|
|
434
447
|
| `analyze_workflow_reachable_outputs` | What a given step can read from upstream — bind inputs to real fields instead of guessing. Stateless and read-only-token safe. |
|
|
435
448
|
| `validate_tool_code` | Syntax and banned-pattern check for Python tool code. Stateless and read-only-token safe. |
|
|
436
449
|
| `format_tool_code` | Format tool code with Black. Stateless and read-only-token safe. |
|
|
@@ -525,12 +538,14 @@ service token) and the retired `workflow-memory` placeholder.
|
|
|
525
538
|
**Testing the Dashboard Analyst.** A chat about a dashboard is a run of kind
|
|
526
539
|
`conversation`; `list_runs` asks for workflow runs only. `list_conversations`
|
|
527
540
|
lists the chats (paged, newest first, only the ones opened by the person the
|
|
528
|
-
token belongs to) in one of two ways: for one dashboard (`dashboardId`,
|
|
529
|
-
|
|
530
|
-
`
|
|
531
|
-
`
|
|
532
|
-
|
|
533
|
-
|
|
541
|
+
token belongs to) in one of two ways: for one dashboard (`dashboardId`, with `status`,
|
|
542
|
+
`createdAfter`/`createdBefore` and `q`, text in the opening question — the
|
|
543
|
+
backend's `GET /conversations`), or across every dashboard that person can see,
|
|
544
|
+
filtered by `status`, `createdAfter`/`createdBefore` and `includeArchived` (the
|
|
545
|
+
backend's `GET /runs?kind=conversation`). What one route has and the other has
|
|
546
|
+
not is refused instead of dropped: `includeArchived` with a dashboard, and `q` without one.
|
|
547
|
+
The two read a bare `createdBefore` date differently; the tool says how. Who
|
|
548
|
+
opened a chat cannot be filtered on at all. `start_conversation` opens a new one with an opening
|
|
534
549
|
question and, optionally, the tile it is about (`focus`) — the same request the
|
|
535
550
|
dashboard's chat window sends. A follow-up is `send_run_message`. The answer and
|
|
536
551
|
the tools the analyst called (`read_measure`, `show_visual`, with their
|
|
@@ -574,8 +589,9 @@ route; the `offset` it used to take is no longer read.
|
|
|
574
589
|
human-only actions in Axonity.
|
|
575
590
|
|
|
576
591
|
`request_publish_release({ workflowId, changeSummary? })` proposes a **release**:
|
|
577
|
-
a workflow *and everything its run needs* — the agents it runs
|
|
578
|
-
|
|
592
|
+
a workflow *and everything its run needs* — the agents it runs (each with its
|
|
593
|
+
persona), their tools, the flows it pins, the memory scoped to those agents —
|
|
594
|
+
as ONE approval.
|
|
579
595
|
Prefer it over a request per entity. Taking a tenant live entity-by-entity means
|
|
580
596
|
a hundred-odd approvals, none of which means anything on its own, and a human
|
|
581
597
|
asked that many times is not reviewing. `list_publish_releases` and
|
|
@@ -611,10 +627,12 @@ These are enforced by the backend, not merely by convention:
|
|
|
611
627
|
live. A direct publish from a service token is refused with a 403, so there is
|
|
612
628
|
no tool for it and no way around it.
|
|
613
629
|
- **A read-only token is genuinely read-only for mutations.** Any write from a token
|
|
614
|
-
without the `
|
|
615
|
-
|
|
630
|
+
without the `author` scope is refused with a 403 (`write` is its older name;
|
|
631
|
+
a token with only `operate` may only answer, message and recover runs).
|
|
632
|
+
- **The four analysis tools are the exception:** `validate_workflow({ document })`,
|
|
616
633
|
`analyze_workflow_reachable_outputs`, `validate_tool_code`, and `format_tool_code`
|
|
617
|
-
can be called by read-only
|
|
634
|
+
can be called by read-only tokens because they never mutate state;
|
|
635
|
+
`validate_workflow({ workflowId })` needs the `author` scope.
|
|
618
636
|
- **The token is tenant-bound.** An agent cannot reach another tenant.
|
|
619
637
|
- **Secrets never pass through the agent.** A connector's `authConfig` accepts
|
|
620
638
|
placeholders only; a write carrying something that looks like a real
|
package/dist/contract.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Asking the deploy what it can do, once, at startup (axonity-mcp#48 M2).
|
|
3
3
|
*
|
|
4
|
-
* `src/errors.ts` already turns a
|
|
5
|
-
*
|
|
4
|
+
* `src/errors.ts` already turns a 405, or a 404 on a route it records adding,
|
|
5
|
+
* into a skew message (a 404 on a route with an id reads as "most likely no
|
|
6
|
+
* such id" first) — but only AFTER the call has failed, which means a user is mid-task on the
|
|
6
7
|
* one call that mattered. And it decides which 404s count from `ROUTES_ADDED_IN`,
|
|
7
8
|
* a list this repository keeps by hand about routes the server owns. That is the
|
|
8
9
|
* shape of #32 and #44, and it has the same failure mode: a route added here
|
|
@@ -89,6 +90,17 @@ export declare function matchesRoute(call: CalledRoute, entry: string): boolean;
|
|
|
89
90
|
* makes a short list look like an emergency.
|
|
90
91
|
*/
|
|
91
92
|
export declare function missingFromContract(calls: CalledRoute[], routes: string[]): string[];
|
|
93
|
+
/**
|
|
94
|
+
* Which side moved, as far as this build can know.
|
|
95
|
+
*
|
|
96
|
+
* A route this repository records ADDING is missing because the backend has
|
|
97
|
+
* not got it yet: the backend is older. Any other missing route says nothing
|
|
98
|
+
* about direction — the backend may also have REMOVED it, as axonity-flow#2176
|
|
99
|
+
* removed the persona routes while this connector still called them, and then
|
|
100
|
+
* "the backend is older, pin an older connector" is the wrong way round and
|
|
101
|
+
* the wrong fix. So the verdict is only as strong as the evidence.
|
|
102
|
+
*/
|
|
103
|
+
export declare function skewDirection(missing: string[]): string;
|
|
92
104
|
export interface ContractCheckOptions {
|
|
93
105
|
/** Base URL, used to key the cache so two tenants do not share a verdict. */
|
|
94
106
|
apiUrl: string;
|
package/dist/contract.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Asking the deploy what it can do, once, at startup (axonity-mcp#48 M2).
|
|
3
3
|
*
|
|
4
|
-
* `src/errors.ts` already turns a
|
|
5
|
-
*
|
|
4
|
+
* `src/errors.ts` already turns a 405, or a 404 on a route it records adding,
|
|
5
|
+
* into a skew message (a 404 on a route with an id reads as "most likely no
|
|
6
|
+
* such id" first) — but only AFTER the call has failed, which means a user is mid-task on the
|
|
6
7
|
* one call that mattered. And it decides which 404s count from `ROUTES_ADDED_IN`,
|
|
7
8
|
* a list this repository keeps by hand about routes the server owns. That is the
|
|
8
9
|
* shape of #32 and #44, and it has the same failure mode: a route added here
|
|
@@ -22,7 +23,7 @@
|
|
|
22
23
|
import { readFileSync, writeFileSync } from "node:fs";
|
|
23
24
|
import { tmpdir } from "node:os";
|
|
24
25
|
import { join } from "node:path";
|
|
25
|
-
import { AxonityApiError, ROUTES_ADDED_IN } from "./errors.js";
|
|
26
|
+
import { AxonityApiError, ROUTES_ADDED_IN, SKEW_EITHER_WAY } from "./errors.js";
|
|
26
27
|
/**
|
|
27
28
|
* One filled-in value per argument name any tool takes, so a blind replay
|
|
28
29
|
* reaches as much of the route surface as possible.
|
|
@@ -92,8 +93,8 @@ export const PROBE_VARIANTS = [
|
|
|
92
93
|
{ workflowId: undefined },
|
|
93
94
|
// get_measure_formula_spec — the workspace's vocabulary only when asked.
|
|
94
95
|
{ includeWorkspace: true },
|
|
95
|
-
// list_conversations —
|
|
96
|
-
// cross-dashboard
|
|
96
|
+
// list_conversations — the per-dashboard route instead of the
|
|
97
|
+
// cross-dashboard one. (start_conversation reads it too; harmless.)
|
|
97
98
|
{ dashboardId: "x" },
|
|
98
99
|
];
|
|
99
100
|
/**
|
|
@@ -192,9 +193,29 @@ export function missingFromContract(calls, routes) {
|
|
|
192
193
|
* a 404 counts.
|
|
193
194
|
*/
|
|
194
195
|
function attribute(route) {
|
|
196
|
+
const known = addedBy(route);
|
|
197
|
+
return known ? `${route} — added by ${known}` : route;
|
|
198
|
+
}
|
|
199
|
+
function addedBy(route) {
|
|
195
200
|
const path = route.slice(route.indexOf(" ") + 1);
|
|
196
|
-
|
|
197
|
-
|
|
201
|
+
return ROUTES_ADDED_IN.find((entry) => entry.pattern.test(path))?.addedBy;
|
|
202
|
+
}
|
|
203
|
+
/**
|
|
204
|
+
* Which side moved, as far as this build can know.
|
|
205
|
+
*
|
|
206
|
+
* A route this repository records ADDING is missing because the backend has
|
|
207
|
+
* not got it yet: the backend is older. Any other missing route says nothing
|
|
208
|
+
* about direction — the backend may also have REMOVED it, as axonity-flow#2176
|
|
209
|
+
* removed the persona routes while this connector still called them, and then
|
|
210
|
+
* "the backend is older, pin an older connector" is the wrong way round and
|
|
211
|
+
* the wrong fix. So the verdict is only as strong as the evidence.
|
|
212
|
+
*/
|
|
213
|
+
export function skewDirection(missing) {
|
|
214
|
+
if (missing.length > 0 && missing.every((route) => addedBy(route))) {
|
|
215
|
+
return ("The backend is OLDER than this connector. Tell your human which Axonity " +
|
|
216
|
+
"environment this token points at, or pin an older connector.");
|
|
217
|
+
}
|
|
218
|
+
return SKEW_EITHER_WAY;
|
|
198
219
|
}
|
|
199
220
|
/** Where the "already checked this contract" marker lives, per API URL. */
|
|
200
221
|
function cachePath(apiUrl) {
|
|
@@ -287,9 +308,8 @@ export async function reportContractSkew(client, register, options) {
|
|
|
287
308
|
`connector needs.\n` +
|
|
288
309
|
` Backend: ${build} (${environment}) at ${options.apiUrl}\n` +
|
|
289
310
|
missing.map((route) => ` - ${attribute(route)}`).join("\n") +
|
|
290
|
-
`\
|
|
291
|
-
`
|
|
292
|
-
`environment this token points at, or pin an older connector.`);
|
|
311
|
+
`\n${skewDirection(missing)} Tools that use those routes will fail; ` +
|
|
312
|
+
`everything else works.`);
|
|
293
313
|
return "missing";
|
|
294
314
|
}
|
|
295
315
|
//# sourceMappingURL=contract.js.map
|
package/dist/contract.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contract.js","sourceRoot":"","sources":["../src/contract.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"contract.js","sourceRoot":"","sources":["../src/contract.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACtD,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACjC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAGjC,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAoBhF;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,UAAU,GAA4B;IACjD,EAAE,EAAE,GAAG,EAAE,UAAU,EAAE,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG,EAAE,UAAU,EAAE,GAAG;IAChF,MAAM,EAAE,GAAG,EAAE,SAAS,EAAE,GAAG,EAAE,UAAU,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,SAAS,EAAE,GAAG;IACzE,UAAU,EAAE,GAAG,EAAE,SAAS,EAAE,GAAG,EAAE,QAAQ,EAAE,GAAG,EAAE,SAAS,EAAE,GAAG,EAAE,OAAO,EAAE,CAAC;IAC1E,YAAY,EAAE,CAAC,EAAE,eAAe,EAAE,CAAC,EAAE,YAAY,EAAE,CAAC,EAAE,IAAI,EAAE,GAAG;IAC/D,QAAQ,EAAE,WAAW,EAAE,aAAa,EAAE,GAAG,EAAE,qBAAqB,EAAE,CAAC;IACnE,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE;IACzD,SAAS,EAAE,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AC;IAED,MAAM,KAAK,GACT,OAAO,QAAQ,CAAC,YAAY,KAAK,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC,CAAC,SAAS,CAAC;IAChF,MAAM,WAAW,GACf,OAAO,QAAQ,CAAC,WAAW,KAAK,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS,CAAC;IAE9E,GAAG,CACD,uCAAuC,OAAO,CAAC,MAAM,iBAAiB;QACpE,oBAAoB;QACpB,cAAc,KAAK,KAAK,WAAW,QAAQ,OAAO,CAAC,MAAM,IAAI;QAC7D,OAAO,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,OAAO,SAAS,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;QAC5D,KAAK,aAAa,CAAC,OAAO,CAAC,0CAA0C;QACrE,wBAAwB,CAC3B,CAAC;IACF,OAAO,SAAS,CAAC;AACnB,CAAC"}
|
package/dist/errors.d.ts
CHANGED
|
@@ -76,9 +76,11 @@ export declare class ForbiddenError 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
|
+
/** Shared with the reactive error, so the two never disagree on the advice. */
|
|
80
|
+
export declare const SKEW_EITHER_WAY: string;
|
|
79
81
|
/**
|
|
80
82
|
* 405/404 on a route this connector version depends on — the deployed backend
|
|
81
|
-
*
|
|
83
|
+
* and the client are out of step (#30): older, or newer and the route removed.
|
|
82
84
|
*
|
|
83
85
|
* 0.3.4 shipped `validate_workflow`'s `workflowId` form. Against a sandbox
|
|
84
86
|
* running a branch 15 commits behind, it answered a bare 405 on every attempt.
|
|
@@ -88,13 +90,21 @@ export declare function errorForStatus(status: number, body?: unknown): AxonityA
|
|
|
88
90
|
*
|
|
89
91
|
* A 405 is the strong signal — the path exists, the method does not, which on an
|
|
90
92
|
* API this client is written against means the two are out of step. A 404 is
|
|
91
|
-
* weaker
|
|
92
|
-
*
|
|
93
|
+
* weaker, and only reported here for the routes listed in `ROUTES_ADDED_IN`:
|
|
94
|
+
* - on a route WITHOUT an id in its path (`/workflows/operations`), a 404 can
|
|
95
|
+
* only mean the route is missing, so the backend is older;
|
|
96
|
+
* - on a route WITH an id (`/workflows/{id}/validate`), every backend that has
|
|
97
|
+
* the route answers 404 for an id that does not exist, so that is the likely
|
|
98
|
+
* reading, and the older backend only the other one. The message says so,
|
|
99
|
+
* in that order, and does not call it a deployment mismatch (review 13 of
|
|
100
|
+
* axonity-mcp#107).
|
|
93
101
|
*/
|
|
94
102
|
export declare class BackendVersionSkewError extends AxonityApiError {
|
|
95
103
|
constructor(method: string, path: string, status: number,
|
|
96
104
|
/** What added this route on the backend, so a human can check a deploy. */
|
|
97
|
-
addedBy?: string, body?: unknown
|
|
105
|
+
addedBy?: string, body?: unknown,
|
|
106
|
+
/** The route's path carries an id: a 404 then most likely means no such id. */
|
|
107
|
+
idInPath?: boolean);
|
|
98
108
|
}
|
|
99
109
|
/**
|
|
100
110
|
* Routes newer than the oldest backend this connector still works against, and
|
package/dist/errors.js
CHANGED
|
@@ -251,9 +251,15 @@ export function errorForStatus(status, body) {
|
|
|
251
251
|
return new AxonityApiError(withDetail(`Axonity API request failed (${status}).`, body), status, body, env?.code, env?.retryable);
|
|
252
252
|
}
|
|
253
253
|
}
|
|
254
|
+
/** Shared with the reactive error, so the two never disagree on the advice. */
|
|
255
|
+
export const SKEW_EITHER_WAY = "This connector and this backend are out of step, and nothing here says " +
|
|
256
|
+
"which way: the backend may be OLDER (it has not got the route yet: wait for " +
|
|
257
|
+
"the deploy or pin an older connector), or NEWER (it removed the route: " +
|
|
258
|
+
"update this connector). Tell your human which Axonity environment this " +
|
|
259
|
+
"token points at and which connector version runs.";
|
|
254
260
|
/**
|
|
255
261
|
* 405/404 on a route this connector version depends on — the deployed backend
|
|
256
|
-
*
|
|
262
|
+
* and the client are out of step (#30): older, or newer and the route removed.
|
|
257
263
|
*
|
|
258
264
|
* 0.3.4 shipped `validate_workflow`'s `workflowId` form. Against a sandbox
|
|
259
265
|
* running a branch 15 commits behind, it answered a bare 405 on every attempt.
|
|
@@ -263,24 +269,45 @@ export function errorForStatus(status, body) {
|
|
|
263
269
|
*
|
|
264
270
|
* A 405 is the strong signal — the path exists, the method does not, which on an
|
|
265
271
|
* API this client is written against means the two are out of step. A 404 is
|
|
266
|
-
* weaker
|
|
267
|
-
*
|
|
272
|
+
* weaker, and only reported here for the routes listed in `ROUTES_ADDED_IN`:
|
|
273
|
+
* - on a route WITHOUT an id in its path (`/workflows/operations`), a 404 can
|
|
274
|
+
* only mean the route is missing, so the backend is older;
|
|
275
|
+
* - on a route WITH an id (`/workflows/{id}/validate`), every backend that has
|
|
276
|
+
* the route answers 404 for an id that does not exist, so that is the likely
|
|
277
|
+
* reading, and the older backend only the other one. The message says so,
|
|
278
|
+
* in that order, and does not call it a deployment mismatch (review 13 of
|
|
279
|
+
* axonity-mcp#107).
|
|
268
280
|
*/
|
|
269
281
|
export class BackendVersionSkewError extends AxonityApiError {
|
|
270
282
|
constructor(method, path, status,
|
|
271
283
|
/** What added this route on the backend, so a human can check a deploy. */
|
|
272
|
-
addedBy, body
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
284
|
+
addedBy, body,
|
|
285
|
+
/** The route's path carries an id: a 404 then most likely means no such id. */
|
|
286
|
+
idInPath = false) {
|
|
287
|
+
if (status === 404 && idInPath) {
|
|
288
|
+
super(`Not found (404) on \`${method} ${path}\`. Most likely there is no such id: ` +
|
|
289
|
+
"check it, or list the collection to find it — a deleted entity also " +
|
|
290
|
+
"reads as not found. Only if the id is right: this backend may be older " +
|
|
291
|
+
"than this connector and lack the route" +
|
|
292
|
+
(addedBy ? `, which was added by ${addedBy}` : "") +
|
|
293
|
+
"; then tell your human which Axonity environment this token points at.", status, body, "not_found", false);
|
|
294
|
+
this.name = "BackendVersionSkewError";
|
|
295
|
+
return;
|
|
296
|
+
}
|
|
297
|
+
// Only a route this repository records adding proves the backend is the
|
|
298
|
+
// older side; a 405 elsewhere can as well be a route the backend removed.
|
|
299
|
+
const direction = addedBy
|
|
300
|
+
? " The backend is OLDER than this connector — this is a deployment " +
|
|
301
|
+
`mismatch, not a mistake in your call. That route was added by ${addedBy}.` +
|
|
302
|
+
" Tell your human which Axonity environment this token points at, and " +
|
|
303
|
+
"do not retry: the same call will keep failing until that backend is " +
|
|
304
|
+
"updated (or you pin an older connector)."
|
|
305
|
+
: " This is a deployment mismatch, not a mistake in your call. " +
|
|
306
|
+
SKEW_EITHER_WAY +
|
|
307
|
+
" Do not retry: the same call will keep failing until they match.";
|
|
276
308
|
super(`The Axonity backend does not have \`${method} ${path}\`, which this ` +
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
`call.` +
|
|
280
|
-
(addedBy ? ` That route was added by ${addedBy}.` : "") +
|
|
281
|
-
" Tell your human which Axonity environment this token points at, and " +
|
|
282
|
-
"do not retry: the same call will keep failing until that backend is " +
|
|
283
|
-
"updated (or you pin an older connector).", status, body, "backend_version_skew", false);
|
|
309
|
+
"version of the connector needs." +
|
|
310
|
+
direction, status, body, "backend_version_skew", false);
|
|
284
311
|
this.name = "BackendVersionSkewError";
|
|
285
312
|
}
|
|
286
313
|
}
|
|
@@ -339,7 +366,10 @@ export function skewErrorFor(method, path, status, body) {
|
|
|
339
366
|
return new BackendVersionSkewError(method, path, status, known?.addedBy, body);
|
|
340
367
|
}
|
|
341
368
|
if (status === 404 && known) {
|
|
342
|
-
|
|
369
|
+
// A route whose pattern matches an id segment: a 404 is most likely a
|
|
370
|
+
// wrong id, not a missing route (see BackendVersionSkewError).
|
|
371
|
+
const idInPath = known.pattern.source.includes("[^/]+");
|
|
372
|
+
return new BackendVersionSkewError(method, path, status, known.addedBy, body, idInPath);
|
|
343
373
|
}
|
|
344
374
|
return undefined;
|
|
345
375
|
}
|
package/dist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,EAAE,oDAAoD;KAC9D;IACD;QACE,OAAO,EAAE,kCAAkC;QAC3C,OAAO,EAAE,kDAAkD;KAC5D;IACD;QACE,OAAO,EAAE,oCAAoC;QAC7C,OAAO,EAAE,mDAAmD;KAC7D;IACD;QACE,OAAO,EAAE,0CAA0C;QACnD,OAAO,EAAE,8DAA8D;KACxE;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,sEAAsE;QACtE,+DAA+D;QAC/D,MAAM,QAAQ,GAAG,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;QACxD,OAAO,IAAI,uBAAuB,CAAC,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,CAAC,OAAO,EAAE,IAAI,EAAE,QAAQ,CAAC,CAAC;IAC1F,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC"}
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
* route declares. The two differ on most of these, and that inconsistency is
|
|
12
12
|
* real — it is exactly what a caller should not have to know.
|
|
13
13
|
*
|
|
14
|
-
* `test/
|
|
14
|
+
* `test/driftMechanism.test.ts` regenerates this in memory and fails if it has
|
|
15
15
|
* drifted from the snapshot, so a refreshed snapshot cannot leave a filter
|
|
16
16
|
* unexposed in silence.
|
|
17
17
|
*/
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
* route declares. The two differ on most of these, and that inconsistency is
|
|
12
12
|
* real — it is exactly what a caller should not have to know.
|
|
13
13
|
*
|
|
14
|
-
* `test/
|
|
14
|
+
* `test/driftMechanism.test.ts` regenerates this in memory and fails if it has
|
|
15
15
|
* drifted from the snapshot, so a refreshed snapshot cannot leave a filter
|
|
16
16
|
* unexposed in silence.
|
|
17
17
|
*/
|
|
@@ -97,7 +97,7 @@ export const LIST_FILTERS = {
|
|
|
97
97
|
arg: "filledBy",
|
|
98
98
|
query: "filled_by",
|
|
99
99
|
type: "string",
|
|
100
|
-
description: "Only tables filled this way: author, workflow or
|
|
100
|
+
description: "Only tables filled this way: author, workflow, query or source (the rows stay in a data source). A value outside the four is refused rather than silently ignored.",
|
|
101
101
|
},
|
|
102
102
|
],
|
|
103
103
|
"data_source": [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"listFilters.js","sourceRoot":"","sources":["../../src/generated/listFilters.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAIH,MAAM,CAAC,MAAM,YAAY,GAAiC;IACxD,UAAU,EAAE;QACV;YACE,GAAG,EAAE,SAAS;YACd,KAAK,EAAE,UAAU;YACjB,IAAI,EAAE,QAAQ;YACd,WAAW,EACT,sGAAsG;SACzG;QACD;YACE,GAAG,EAAE,cAAc;YACnB,KAAK,EAAE,eAAe;YACtB,IAAI,EAAE,QAAQ;YACd,WAAW,EACT,kFAAkF;SACrF;KACF;IACD,OAAO,EAAE;QACP;YACE,GAAG,EAAE,eAAe;YACpB,KAAK,EAAE,eAAe;YACtB,IAAI,EAAE,SAAS;YACf,WAAW,EACT,uNAAuN;SAC1N;KACF;IACD,QAAQ,EAAE;QACR;YACE,GAAG,EAAE,OAAO;YACZ,KAAK,EAAE,OAAO;YACd,IAAI,EAAE,QAAQ;YACd,WAAW,EACT,0PAA0P;SAC7P;QACD;YACE,GAAG,EAAE,SAAS;YACd,KAAK,EAAE,UAAU;YACjB,IAAI,EAAE,QAAQ;YACd,WAAW,EACT,uGAAuG;SAC1G;KACF;IACD,eAAe,EAAE;QACf;YACE,GAAG,EAAE,OAAO;YACZ,KAAK,EAAE,OAAO;YACd,IAAI,EAAE,QAAQ;YACd,WAAW,EACT,0PAA0P;SAC7P;QACD;YACE,GAAG,EAAE,SAAS;YACd,KAAK,EAAE,UAAU;YACjB,IAAI,EAAE,QAAQ;YACd,WAAW,EACT,uGAAuG;SAC1G;KACF;IACD,gBAAgB,EAAE;QAChB;YACE,GAAG,EAAE,SAAS;YACd,KAAK,EAAE,SAAS;YAChB,IAAI,EAAE,SAAS;YACf,WAAW,EACT,oKAAoK;SACvK;KACF;IACD,YAAY,EAAE;QACZ;YACE,GAAG,EAAE,MAAM;YACX,KAAK,EAAE,MAAM;YACb,IAAI,EAAE,QAAQ;YACd,WAAW,EACT,gOAAgO;SACnO;QACD;YACE,GAAG,EAAE,QAAQ;YACb,KAAK,EAAE,QAAQ;YACf,IAAI,EAAE,QAAQ;YACd,WAAW,EACT,2JAA2J;SAC9J;QACD;YACE,GAAG,EAAE,WAAW;YAChB,KAAK,EAAE,YAAY;YACnB,IAAI,EAAE,SAAS;YACf,WAAW,EACT,+LAA+L;SAClM;QACD;YACE,GAAG,EAAE,UAAU;YACf,KAAK,EAAE,WAAW;YAClB,IAAI,EAAE,QAAQ;YACd,WAAW,EACT,
|
|
1
|
+
{"version":3,"file":"listFilters.js","sourceRoot":"","sources":["../../src/generated/listFilters.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAIH,MAAM,CAAC,MAAM,YAAY,GAAiC;IACxD,UAAU,EAAE;QACV;YACE,GAAG,EAAE,SAAS;YACd,KAAK,EAAE,UAAU;YACjB,IAAI,EAAE,QAAQ;YACd,WAAW,EACT,sGAAsG;SACzG;QACD;YACE,GAAG,EAAE,cAAc;YACnB,KAAK,EAAE,eAAe;YACtB,IAAI,EAAE,QAAQ;Y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b;YACE,GAAG,EAAE,SAAS;YACd,KAAK,EAAE,SAAS;YAChB,IAAI,EAAE,SAAS;YACf,WAAW,EACT,4FAA4F;SAC/F;KACF;IACD,oBAAoB,EAAE;QACpB;YACE,GAAG,EAAE,SAAS;YACd,KAAK,EAAE,UAAU;YACjB,IAAI,EAAE,QAAQ;YACd,WAAW,EACT,0IAA0I;SAC7I;KACF;IACD,SAAS,EAAE;QACT;YACE,GAAG,EAAE,SAAS;YACd,KAAK,EAAE,SAAS;YAChB,IAAI,EAAE,QAAQ;YACd,WAAW,EACT,mEAAmE;SACtE;KACF;IACD,aAAa,EAAE;QACb;YACE,GAAG,EAAE,MAAM;YACX,KAAK,EAAE,MAAM;YACb,IAAI,EAAE,QAAQ;YACd,WAAW,EACT,8CAA8C;SACjD;KACF;IACD,OAAO,EAAE;QACP;YACE,GAAG,EAAE,cAAc;YACnB,KAAK,EAAE,cAAc;YACrB,IAAI,EAAE,QAAQ;YACd,WAAW,EACT,yCAAyC;SAC5C;KACF;CACF,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -17,6 +17,14 @@
|
|
|
17
17
|
*/
|
|
18
18
|
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
19
19
|
import { AxonityClient } from "./client.js";
|
|
20
|
+
import { type EntityDef } from "./tools/register.js";
|
|
21
|
+
/**
|
|
22
|
+
* The entities the connector covers. Core entities (C4), memory entities (C5)
|
|
23
|
+
* — skills, policies, reference docs — which have the same draft→publish
|
|
24
|
+
* lifecycle via #443's unified versioning, and `data_table` (axonity-flow#1217),
|
|
25
|
+
* which joins them on exactly the same shape.
|
|
26
|
+
*/
|
|
27
|
+
export declare const ENTITIES: EntityDef[];
|
|
20
28
|
/**
|
|
21
29
|
* Register the whole tool surface onto a server. Split out from `buildServer`
|
|
22
30
|
* so a test can drive the real registration against a recording server — e.g.
|