@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.
@@ -70,8 +70,9 @@ Read this before creating or updating anything.
70
70
  1. \`read_*\` the entity (and \`read_*_published\` if you need to see what is live).
71
71
  2. Edit the DRAFT: \`update_*\`, or workflow-edit tools for workflow structure.
72
72
  3. Validate before publish: \`validate_workflow\` / \`analyze_workflow_reachable_outputs\` /
73
- \`validate_tool_code\` / \`format_tool_code\`. These four are stateless and work with
74
- read-only tokens.
73
+ \`validate_tool_code\` / \`format_tool_code\`. These four save nothing, and a
74
+ read-only token may call them — except \`validate_workflow({ workflowId })\`,
75
+ which needs the \`author\` scope.
75
76
  4. Re-read and verify with a saved tool command: \`execute_tool\` /
76
77
  \`execute_stored_connector\`.
77
78
  5. Fix any issues and re-read again.
@@ -157,11 +158,13 @@ has run cleanly once, at its current version.
157
158
 
158
159
  ## Field shape
159
160
  - All fields are camelCase JSON (e.g. \`capabilityTier\`, not \`capability_tier\`).
160
- ONE documented exception: validator specs (\`permissions.outputValidators\`,
161
- \`permissions.exposedValidatorTools\`) use snake_case keys (\`function\`,
161
+ ONE documented exception: validator specs — in an output_schema's
162
+ \`schemaBody\` (\`validators\`, \`preflight\`), a step's
163
+ \`contract.output_validators\` and a conversation step's
164
+ \`answerContract.validators\` — use snake_case keys (\`function\`,
162
165
  \`target\`, \`args\`, \`when_present\`, \`inputs\`, \`error_message\`,
163
- \`tool_name\`, \`validator_name\`) — they are the same shape at every level and
164
- are stored verbatim, so they are NOT camel-aliased. Send them in snake_case.
166
+ \`tool_name\`, \`validator_name\`) — they are stored verbatim, so they are
167
+ NOT camel-aliased. Send them in snake_case.
165
168
  What those keys MEAN, and how a validator is bound to what it judges, is the
166
169
  Validators section.
167
170
  - \`update_*\` is a partial change for agents/tools and a partial patch for
@@ -173,10 +176,10 @@ has run cleanly once, at its current version.
173
176
  undeclared OR MISSPELLED key is a 422 that names it, not a silent drop. So
174
177
  spelling matters and you get told when it is wrong — good. Other entities are
175
178
  more lenient and may drop an unknown key silently; never rely on that.
176
- - \`agent.tags\` is a free label for grouping and reporting. It GATES NOTHING —
177
- what reaches an agent's prompt is a LINK (\`attach_policy_to_agent\`), visible
178
- in a table a human can read and edit. A role-tag gate on a policy used to
179
- decide that invisibly and is refused outright now: sending
179
+ - An agent has no tags: what reaches an agent's prompt is a LINK
180
+ (\`attach_policy_to_agent\`), visible in a table a human can read and edit.
181
+ A role-tag gate on a policy used to decide that invisibly and is refused
182
+ outright now: sending
180
183
  \`activation.tags\` to \`create_policy\`/\`update_policy\` is a 422. The two
181
184
  surviving gates, \`activation.tools\` and \`activation.delegation\`, each say
182
185
  something a link cannot — "only on turns where this agent holds this tool",
@@ -217,17 +220,17 @@ has run cleanly once, at its current version.
217
220
  - A LIST is not the whole list. \`list_workflow_runs\` returns a page —
218
221
  \`{ items, nextCursor, pageSize, hasMore }\`, 20 by default — so counting or
219
222
  concluding from page one while \`hasMore\` is true is how you answer confidently
220
- and wrongly. Follow \`nextCursor\` until it is null. Two further traps: that
221
- route lists LAUNCHES (a 4,415-item FOR EACH is ONE entry carrying
222
- \`forEachProgress\`, so rows are not runs), and the offset-style lists
223
- (\`list_runs\`, \`list_publish_approvals\`) cap silently — a full page means
224
- there may be more, and nothing in the response says so.
223
+ and wrongly. Follow \`nextCursor\` until it is null. And that route lists
224
+ LAUNCHES: a 4,415-item FOR EACH is ONE entry carrying \`forEachProgress\`, so
225
+ rows are not runs. \`list_runs\` pages the same way, by \`nextCursor\` with
226
+ \`hasMore\`. \`list_publish_approvals\` pages by \`offset\` and answers \`total\`
227
+ and \`hasMore\`: raise \`offset\` by \`limit\` until \`hasMore\` is false.
225
228
 
226
229
  ## Delete is recoverable — but not everything is
227
230
  - \`delete_*\` soft-deletes: the entity disappears from \`list_*\` but is not gone.
228
231
  \`restore_*\` brings it back; \`list_deleted_*\` shows what's waiting. This
229
- applies uniformly to workflow, agent, tool, skill, policy, reference_doc,
230
- persona, output_schema, prompt_snippet, and flow.
232
+ applies uniformly to every entity that has a \`delete_*\` and a
233
+ \`restore_*\` tool.
231
234
  - The same applies one level down, to version HISTORY:
232
235
  \`delete_*_version\` removes one entry from history (the current draft and
233
236
  published version are protected and can't be targeted this way);
@@ -236,8 +239,12 @@ has run cleanly once, at its current version.
236
239
  are normal, not a sign of corruption.
237
240
  - \`restore_*\` can itself 409 if a live entity now holds the same name/slot —
238
241
  the error names the conflicting one.
239
- - There is no "archive" state for these ten entities — delete + restore IS the
240
- lifecycle. Runs are the one exception with a true archive/unarchive (see below).
242
+ - Deleting is not archiving. Some entities also have a \`status\` that can be
243
+ \`archived\` — kept, not offered — set with \`update_*\`: \`agent\`, \`tool\`,
244
+ \`skill\`, \`policy\`, \`reference_doc\`, \`output_schema\`, \`data_table\`,
245
+ \`measure\` and \`application\`. The values each takes are in
246
+ \`get_entity_authoring_contract\`. Runs have an archive of their own
247
+ (\`archive_run\` / \`unarchive_run\`, see below).
241
248
 
242
249
  ## Per entity — what to create, and what "complete" means
243
250
 
@@ -287,12 +294,30 @@ made any time before you attach them.
287
294
  so the human approving is not the first to find out.
288
295
  - **An answer that is a file**: \`responseMapping: { "type": "file",
289
296
  "filename": "{{filename}}" }\` keeps the bytes as a file of the run and
290
- returns its reference \`{ fileId, filename, contentType, sizeBytes }\` —
291
- the shape an upload has, so Digitize documents reads it and a
292
- sub-workflow's file parameter takes it. \`filename\` is optional (the
293
- far end's \`Content-Disposition\` name, else \`document\`) and may use
294
- the inputs. No \`responseTransform\` with a file answer. Outside a run
297
+ returns its reference
298
+ \`{ fileId, filename, contentType, sizeBytes, sha256 }\` — the shape an
299
+ upload has, so Digitize documents reads it and a sub-workflow's file
300
+ parameter takes it. \`filename\` is optional (the far end's
301
+ \`Content-Disposition\` name, else \`document\`) and may use the inputs.
302
+ No \`responseTransform\` with a file answer. Outside a run
295
303
  (\`execute_stored_connector\`) nothing is stored: you see name and size.
304
+ - **\`sha256\` in a file reference** is the hex SHA-256 of the bytes,
305
+ computed once when the file was stored. The same bytes have the same
306
+ value under any name, so compare it to recognise a file that was already
307
+ processed (deciding that is the workflow's logic, not the platform's).
308
+ Only a reference in a declared file parameter (\`file\`, or a list of
309
+ \`file\`) is checked against storage. Where one enters a run — a
310
+ manual, API or MCP start, a sub-workflow call (with its copy under
311
+ \`item\` in the child) — its \`filename\`, \`contentType\`,
312
+ \`sizeBytes\` and \`sha256\` are settled from storage, whatever the
313
+ caller wrote. A reference to a file the run may not read keeps what the
314
+ caller wrote and carries no \`sha256\`; at a webhook, cron or
315
+ conditional start that holds for each of them, since such a start links
316
+ no file. A reference anywhere else (an \`object\` field, an undeclared
317
+ key) is not checked and keeps any \`sha256\` the caller wrote. Digitize
318
+ documents always answers the stored \`sha256\` per file it read. So
319
+ compare only the value on a declared file parameter or on Digitize's
320
+ entry, never one in another field or one an agent wrote out.
296
321
  - **executor** — runs a command on a registered executor (a program on
297
322
  the customer's side). The save refuses a tool that names no executor or a
298
323
  command that executor does not know; \`list_executors\` and
@@ -316,17 +341,26 @@ made any time before you attach them.
316
341
  - Required: \`name\`. Enumerated fields, with their ONLY valid values:
317
342
  - \`capabilityTier\`: \`economy\` | \`standard\` (default) | \`smart\` | \`reasoning\`
318
343
  - \`creativityTier\`: \`low\` | \`medium\` (default) | \`high\`
319
- - \`learningMode\`: \`none\` (default) | \`adaptive\` | \`strict\`
320
- - \`avatar\`, \`tags\` (free labels for grouping — they gate nothing; see Field
321
- shape), \`canOwnProcess\` (bool; must be true for an agent to own a
322
- workflow step's flow), \`episodicMemoryEnabled\` (bool).
323
- - \`permissions\` (object): \`planning\`, \`delegation\`, \`verboseOutput\` (bools);
324
- \`outputValidators\` / \`exposedValidatorTools\` (snake_case specs — see Field
325
- shape for the casing, Validators for what they say);
326
- \`expectedOutputSchemaId\` (an output_schema id — MANDATORY whenever you
327
- attach validators here).
344
+ - \`reasoningLevel\`: \`default\` (sends nothing, the model decides) | \`none\` | \`low\` | \`medium\` | \`high\` | \`extra_high\`
345
+ - \`delegation\`: \`off\` (default) | \`on\` (one task to one team member at a time) | \`multi\` (also one task to several at once)
346
+ - \`persona\` (text): who the agent is, in its own words — the character text
347
+ every prompt of this agent opens with. It is a field of the agent and
348
+ publishes with it (axonity-flow#2176); there is no separate persona to
349
+ create, version or publish. To remove it send \`""\`: on an update \`null\`
350
+ leaves it as it is.
351
+ - \`slug\` (its handle, set once at creation; left out: taken from the name),
352
+ \`avatar\`, \`conversational\` (bool: may people talk to it),
353
+ \`delegationBudgetEur\` (what one delegation to it may cost; empty: no
354
+ budget), \`frameworkToolsOff\` (framework tools taken away; \`submit_output\`
355
+ cannot be), \`clearance\` (what it may read; set by an administrator).
356
+ - Output: \`outputSchemaIds\` (the output schemas it answers in — library ids
357
+ or names; a schema outside the list is refused) and \`defaultOutputSchemaId\`
358
+ (the one used when a caller names none; left out: the first). The GATES on
359
+ an output live in the output_schema (see Validators), not on the agent.
328
360
  - Wiring fields — see the Wiring section: \`toolIds\`, \`systemToolIds\`,
329
361
  \`delegationTargetIds\`.
362
+ - Anything else is refused: the body is strict, so a field the platform
363
+ retired (axonity-flow#2176) is a 422 that names it, not a silent drop.
330
364
  - Complete check: an agent with no \`toolIds\`/\`systemToolIds\` has no tools and
331
365
  can only reason/talk. If it is meant to DO something, give it the tools.
332
366
 
@@ -363,14 +397,16 @@ made any time before you attach them.
363
397
  launchable AND has a trigger (see Triggers).
364
398
 
365
399
  ### persona
366
- - An agent's character — 1:1 with an agent. Created only through its agent
367
- (\`create_agent_persona\`: \`name\`, \`characterText\`); then a normal entity
368
- (\`read_persona\`, \`update_persona\`, delete/restore/versions).
400
+ - Not an entity: the agent's \`persona\` field (see agent). Set it with
401
+ \`create_agent\` / \`update_agent\`, or \`create_agent_persona\` (agentId,
402
+ expectedVersion, persona); read it with \`read_agent\` or
403
+ \`read_agent_persona\`. Its history is the agent's versions, and it goes live
404
+ with \`request_publish_agent\`.
369
405
 
370
406
  ### output_schema
371
407
  - A reusable output contract, versioned and publishable. Referenced BY id from a
372
- tool's validators or an agent's \`permissions.expectedOutputSchemaId\` — so
373
- create it first, then point things at the id the create call returns.
408
+ tool's validators or an agent's \`outputSchemaIds\` — so create it first,
409
+ then point things at the id the create call returns.
374
410
  - \`schemaBody\` is a JSON Schema document (\`type\`, \`properties\`,
375
411
  \`required\`) PLUS one key that is not JSON Schema: \`validators\`, the gates
376
412
  run against a submitted output. This is the place a validator can be STEERED
@@ -417,13 +453,24 @@ made any time before you attach them.
417
453
 
418
454
  ## Validators — one shape, one call
419
455
  A validator is a GATE on a submitted output: it runs after an agent produces a
420
- result and can refuse it. Specs are written in two places and carry the same
421
- key names in both — \`permissions.outputValidators\` on an agent, and
422
- \`validators\` inside an output_schema's \`schemaBody\`. The backend's OpenAPI
423
- description of \`schemaBody\` is the source for the full contract, and the
424
- platform's live contract (\`get_entity_authoring_contract\`, output_schema)
425
- wins over this section where this deploy serves it. What follows is the part
426
- you cannot author without, checked against the platform and SUBORDINATE to both.
456
+ result and can refuse it. The backend's OpenAPI description of \`schemaBody\`
457
+ is the source for the full contract, and the platform's live contract
458
+ (\`get_entity_authoring_contract\`, output_schema) wins over this section where
459
+ this deploy serves it. What follows is the part you cannot author without,
460
+ checked against the platform and SUBORDINATE to both.
461
+
462
+ Specs carry the same keys wherever they are written:
463
+ - an output_schema's \`schemaBody\` (\`validators\`, and \`preflight\` for the
464
+ checks an agent may run itself before it submits) — the gate on one value;
465
+ - a workflow step's \`contract.output_validators\` — run on the step's WHOLE
466
+ submission, so a rule about how its outputs relate has something to look at;
467
+ \`validate_workflow\` reports a named validator tool that does not exist;
468
+ - a conversation step's \`answerContract.validators\`, beside its \`schema\` —
469
+ run on the answer the agent hands in; without a \`schema\` nothing runs, and
470
+ \`validate_workflow\` does not report it.
471
+ The agent itself no longer carries specs (axonity-flow#2176): it names the
472
+ schemas it answers in with \`outputSchemaIds\`, and a spec sent on the agent's
473
+ strict create/update body is a 422.
427
474
 
428
475
  - A spec names its check in ONE of two ways, and each brings its own binding:
429
476
  - \`function\` — a shipped predicate (e.g. \`validators.min_length\`), bound
@@ -482,11 +529,8 @@ unresolved values and nothing says so. (Rows whose schema declares no shape are
482
529
  left alone: there is nothing to check against, and guessing would refuse correct
483
530
  configurations.)
484
531
 
485
- WHERE \`field\` AND \`slots\` ARE ACCEPTED: inside an output_schema's
486
- \`schemaBody\`, which is stored verbatim. An agent's
487
- \`permissions.outputValidators\` is a STRICT body — an undeclared key is a 422 —
488
- so a spec written THERE takes neither, and its validator gets the whole output
489
- and no slots. Steer a validator from the output_schema.
532
+ WHERE \`field\` AND \`slots\` ARE CHECKED: when you save an output_schema, in
533
+ its \`schemaBody\`, which is stored verbatim.
490
534
 
491
535
  ### The older, explicit binding
492
536
  A tool spec MAY declare \`inputs\` instead, and a spec with \`inputs\` does NOT
@@ -513,8 +557,9 @@ lives in the entity body:
513
557
  \`update_agent\`. \`toolIds\` and \`systemToolIds\` are DIFFERENT lists; a
514
558
  system-tool id does not go in \`toolIds\`.
515
559
  - agent → agent (delegation): add the callee agent's id to the caller's
516
- \`delegationTargetIds\` (and set \`permissions.delegation: true\`).
517
- - output_schema → agent: \`permissions.expectedOutputSchemaId\` (a single id).
560
+ \`delegationTargetIds\` (and set \`delegation\` to \`on\` or \`multi\`).
561
+ - output_schema → agent: \`outputSchemaIds\` (a list), with
562
+ \`defaultOutputSchemaId\` for the one used when a caller names none.
518
563
  - Changing any of these is read-then-write under optimistic locking: read the
519
564
  agent, edit the field — an id-array is a FULL replace, so include the ids you
520
565
  are keeping — then \`update_agent\` with \`expectedVersion\`.
@@ -588,8 +633,8 @@ doc or a step's activities — and how large each may be, is not decided here: t
588
633
  placement rules are served by the platform and appended to this guide, read live
589
634
  from this deploy each time you call it.
590
635
 
591
- Long-term recall for an agent is the agent's **\`episodicMemoryEnabled\`** flag
592
- (Memory V2, opt-in). Session/workflow memory are RUNTIME, not authored: they are
636
+ An agent has no long-term recall of its own runs: episodic memory went with
637
+ axonity-flow#2176. Session/workflow memory are RUNTIME, not authored: they are
593
638
  written by a run, never set here. This connector does not expose them — the
594
639
  backend serves them per run, but no tool wraps those reads yet, so do not
595
640
  promise a user you can show them.
@@ -615,9 +660,8 @@ elsewhere points at nothing. Do this instead:
615
660
  2. Create the leaf dependencies first (tools, output_schemas). Keep a map from
616
661
  each OLD id to the NEW id the create call returns.
617
662
  3. Create agents, translating every referenced id through your map:
618
- old toolId → new toolId in \`toolIds\`, etc. Never send an old id. If the
619
- source agent has a persona, recreate it with \`create_agent_persona\` on the
620
- new agent.
663
+ old toolId → new toolId in \`toolIds\`, etc. Never send an old id. The
664
+ persona is a field of the agent: copy its \`persona\` text into the create.
621
665
  4. Create workflows; when you add agent/tool references into the document,
622
666
  translate through the map the same way.
623
667
  5. Attach skills/policies/reference-docs by the new ids, then read them back
@@ -628,10 +672,14 @@ The connector never carries a secret across: \`authConfig\` stays placeholders i
628
672
  the new tenant too, and a human fills the real value there.
629
673
 
630
674
  ## Structural workflow edits
631
- - **Start by reading the spec.** \`get_workflow_authoring_spec\` returns FOUR
632
- lists this deploy generates from its own registries: the mutation commands,
633
- the trigger types, the step types (including the ones you may not author, with
634
- the reason), and the schedule-rule shapes with a working example each. Neither
675
+ - **Start by reading the spec.** \`get_workflow_authoring_spec\` returns the
676
+ lists this deploy generates from its own registries: the mutation commands
677
+ (\`operations\`), the trigger types (\`triggerTypes\`), the step types
678
+ (\`stepTypes\`, including the ones you may not author, with the reason), the
679
+ schedule-rule shapes with a working example each (\`scheduleRuleKinds\`), the
680
+ value vocabularies (\`parameterTypes\`, \`outputKinds\`, \`schemaFieldKinds\`),
681
+ the decision evaluators (\`decisionEvaluators\`) and the column kinds of a
682
+ table (\`tableColumnKinds\`). Neither
635
683
  this guide nor the tool descriptions restate any of those lists: a list kept
636
684
  in the connector is right only by maintenance, and it has been wrong twice
637
685
  already, both times in the direction that costs an agent a 422 on something it
@@ -660,7 +708,8 @@ the new tenant too, and a human fills the real value there.
660
708
  Writing \`kind\` on a trigger parameter is not a 422; it is a key nothing
661
709
  reads, so the value silently falls back to text and the workflow runs with
662
710
  the wrong thing. Check which of the three you are writing before you write it.
663
- - \`rulesVersion\` in that response is a content hash over all four lists. While
711
+ - \`rulesVersion\` in that response is a content hash over the whole
712
+ answer. While
664
713
  it is unchanged there is nothing to re-fetch; re-read the spec when it changes,
665
714
  or when a mutation fails with a 422 suggesting your idea of a command is stale.
666
715
  - \`apply_workflow_mutations\` takes a LIST of commands and applies them in order,
@@ -746,13 +795,18 @@ a document to find out what the platform did.
746
795
  \`removedEdges\`. An edge you did not ask for is this, not corruption.
747
796
 
748
797
  ## Validating: two questions, two calls
749
- - \`validate_workflow({ workflowId })\` checks the STORED workflow against the
750
- tenant catalog — it confirms the agents, tools and flows the steps reference
751
- actually exist. This is the "can this run?" answer, and it comes back with
752
- \`catalogChecked: true\`.
753
- - \`validate_workflow({ document })\` is stateless and read-only-token safe, but
754
- without a catalog it can only judge STRUCTURE: \`launchable\` there means the
755
- graph is sound, not that it will run. It says so with \`catalogChecked: false\`.
798
+ - \`validate_workflow({ workflowId })\` checks the workflow as SAVED against the
799
+ tenant catalog — whether the agents, tools and flows the steps reference
800
+ exist and are published — plus its own wiring (its triggers and the knowledge
801
+ attached to it). This is the "can this run?" answer. It needs a token with
802
+ the \`author\` scope.
803
+ - \`validate_workflow({ document })\` judges the document against the same
804
+ catalog, saves nothing, and a read-only token may call it. Without the
805
+ workflow's id it skips the checks about that workflow's own wiring (its
806
+ triggers and the knowledge attached to it), so validate by \`workflowId\` once
807
+ it is saved. Either call answers \`catalogChecked: false\` when the catalog
808
+ could not be built: then \`launchable\` means the graph is sound, not that it
809
+ will run.
756
810
  - Pass exactly one. Before telling a human a workflow is ready, check
757
811
  \`catalogChecked\` — a green structural verdict is the easiest thing to
758
812
  over-read.
@@ -854,8 +908,8 @@ a document to find out what the platform did.
854
908
  have. It is PAGED over the waiting RUNS, so \`items\` can be longer than
855
909
  \`pageSize\` — one run may park several steps. Follow \`nextCursor\` until it
856
910
  is null before concluding anything about how much is waiting.
857
- - Runs are the only thing with a real archive state — \`archive_run\` is
858
- reversible, \`bulk_delete_runs\` is not.
911
+ - A run's archive is reversible (\`archive_run\` / \`unarchive_run\`);
912
+ \`bulk_delete_runs\` is not.
859
913
 
860
914
  ## Subworkflows — one workflow calling another
861
915
  Both halves live in the workflow DOCUMENT, so both are ordinary
@@ -944,13 +998,18 @@ point and it changes without the process changing.
944
998
  editing code, reviewing it and publishing a tool. A business user maintains a
945
999
  table; nobody should need you to change a postcode.
946
1000
 
947
- **Static or dynamic — who owns the rows.**
948
- - \`isDynamic: false\` (the default) is reference data the AUTHOR maintains. A
949
- workflow reads it and cannot change it. \`allowedOperations\` must be empty:
950
- a permission nothing honours is refused, not stored.
951
- - \`isDynamic: true\` lets a workflow change the rows, limited to
1001
+ **Who fills it — \`filledBy\`, one per table** (\`author\`, \`workflow\`,
1002
+ \`query\` or \`source\`).
1003
+ - \`author\` (the default) is reference data the AUTHOR maintains. A workflow
1004
+ reads it and cannot change it. \`allowedOperations\` must be empty: a
1005
+ permission nothing honours is refused, not stored.
1006
+ - \`workflow\` lets a workflow change the rows, limited to
952
1007
  \`allowedOperations\` — any of \`add\` / \`update\` / \`delete\`. READING IS
953
1008
  NEVER LISTED there: it is what a table is for and is always allowed.
1009
+ - \`query\` fills the rows from a named query (\`fillingQueryId\`, on its
1010
+ \`rhythm\` or with \`refresh_data_table\`).
1011
+ - \`source\` holds no rows here: they stay in a data source, and \`external\`
1012
+ says where. \`create_data_table\` describes each filler's fields.
954
1013
  - You edit rows through \`add_data_table_row\` / \`update_data_table_row\` /
955
1014
  \`delete_data_table_row\` whatever the table's mode says — those grants are
956
1015
  about what a RUN may do, not about authoring.
@@ -993,8 +1052,8 @@ value across from one of the others, and do not guess. Every column needs a
993
1052
  \`description\`: an agent reads it to know what the column is for, and a save
994
1053
  without one is refused.
995
1054
 
996
- **\`list_data_tables\` is PAGED**, alone among the library lists — a tenant's
997
- reference data has no ceiling. Page one is not the library. Follow
1055
+ **\`list_data_tables\` is PAGED**, like \`list_measures\`, \`list_queries\` and
1056
+ \`list_applications\` — a tenant's reference data has no ceiling. Page one is not the library. Follow
998
1057
  \`nextCursor\` while \`hasMore\` is true, or better, narrow in the query:
999
1058
  \`name\` is exact and unique per workspace, so "does one called X already
1000
1059
  exist" is a single call rather than a walk. The page carries \`rowCount\`, never
@@ -1 +1 @@
1
- {"version":3,"file":"conventions.js","sourceRoot":"","sources":["../../src/tools/conventions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+CG;AAMH,MAAM,CAAC,MAAM,WAAW,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AC3D,OAAO,GAAG,KAAK,OAAO,uBAAuB,EAAE,CAAC;AAClD,CAAC;AAED,MAAM,UAAU,mBAAmB,CAAC,MAAiB,EAAE,MAAqB;IAC1E,MAAM,CAAC,IAAI,CACT,qBAAqB,EACrB,2EAA2E;QACzE,2EAA2E;QAC3E,2EAA2E;QAC3E,4EAA4E;QAC5E,uEAAuE;QACvE,uEAAuE;QACvE,uEAAuE;QACvE,+DAA+D,EACjE,EAAE,EACF,KAAK,IAAI,EAAE,CAAC,CAAC;QACX,OAAO,EAAE;YACP;gBACE,IAAI,EAAE,MAAe;gBACrB,IAAI,EAAE,GAAG,WAAW,KAAK,MAAM,kBAAkB,CAAC,MAAM,CAAC,EAAE;aAC5D;SACF;KACF,CAAC,CACH,CAAC;IAEF,MAAM,CAAC,IAAI,CACT,8BAA8B,EAC9B,qEAAqE;QACnE,sFAAsF;QACtF,yEAAyE;QACzE,sEAAsE;QACtE,uEAAuE;QACvE,wEAAwE;QACxE,sEAAsE;QACtE,qEAAqE;QACrE,2BAA2B,EAC7B,EAAE,EACF,KAAK,IAAI,EAAE,CAAC,CAAC;QACX,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,MAAM,0BAA0B,CAAC,MAAM,CAAC,EAAE,CAAC;KACrF,CAAC,CACH,CAAC;AACJ,CAAC"}
@@ -170,8 +170,9 @@ export function registerDataTableTools(server, client) {
170
170
  "`fill.lastAt`, `fill.lastRowCount` and `fill.lastError` describe the " +
171
171
  "run. " +
172
172
  "\n\nRefused with a 422 when the table is not filled by a query " +
173
- "(`filledBy` is `author` or `workflow`) — its rows come from a workflow " +
174
- "or an author, and there is nothing to run.", { id: z.string().describe("The table's id.") }, async ({ id }) => guard(async () => jsonResult(await client.post(`${BASE}/${id}/refresh`))));
173
+ "(`filledBy` is `author`, `workflow` or `source`) — its rows come from " +
174
+ "an author or a workflow, or stay in their data source, and there is " +
175
+ "nothing to run.", { id: z.string().describe("The table's id.") }, async ({ id }) => guard(async () => jsonResult(await client.post(`${BASE}/${id}/refresh`))));
175
176
  server.tool("list_data_table_tools", "Which tools this table yields, and which of them a RUN can actually " +
176
177
  "reach. Read-only. " +
177
178
  "\n\nA published table mints its own CRUD tools, so giving an agent " +
@@ -1 +1 @@
1
- {"version":3,"file":"dataTables.js","sourceRoot":"","sources":["../../src/tools/dataTables.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AAGH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEhD,MAAM,IAAI,GAAG,qBAAqB,CAAC;AAEnC;;;;;;;GAOG;AACH,MAAM,KAAK,GAAG;IACZ,WAAW,EAAE,CAAC;SACX,MAAM,EAAE;SACR,QAAQ,CACP,qEAAqE;QACnE,wEAAwE;QACxE,wEAAwE;QACxE,oDAAoD,CACvD;IACH,UAAU,EAAE,CAAC;SACV,MAAM,EAAE;SACR,QAAQ,CACP,wEAAwE;QACtE,8DAA8D;QAC9D,6CAA6C,CAChD;CACJ,CAAC;AAEF,MAAM,UAAU,sBAAsB,CACpC,MAAiB,EACjB,MAAqB;IAErB,MAAM,CAAC,IAAI,CACT,oBAAoB,EACpB,uEAAuE;QACrE,qEAAqE;QACrE,uEAAuE;QACvE,0EAA0E;QAC1E,cAAc;QACd,uEAAuE;QACvE,2EAA2E;QAC3E,gDAAgD;QAChD,mEAAmE;QACnE,2DAA2D;QAC3D,yEAAyE;QACzE,wEAAwE,EAC1E;QACE,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,iBAAiB,CAAC;QAC1C,MAAM,EAAE,CAAC;aACN,MAAM,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC;aACnB,QAAQ,CACP,mEAAmE;YACjE,+CAA+C,CAClD;KACJ,EACD,KAAK,EAAE,EAAE,EAAE,EA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uE;QACvE,oEAAoE;QACpE,uEAAuE;QACvE,OAAO;QACP,iEAAiE;QACjE,wEAAwE;QACxE,sEAAsE;QACtE,iBAAiB,EACnB,EAAE,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,iBAAiB,CAAC,EAAE,EAC9C,KAAK,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CACf,KAAK,CAAC,KAAK,IAAI,EAAE,CAAC,UAAU,CAAC,MAAM,MAAM,CAAC,IAAI,CAAC,GAAG,IAAI,IAAI,EAAE,UAAU,CAAC,CAAC,CAAC,CAC5E,CAAC;IAEF,MAAM,CAAC,IAAI,CACT,uBAAuB,EACvB,sEAAsE;QACpE,oBAAoB;QACpB,qEAAqE;QACrE,yEAAyE;QACzE,oEAAoE;QACpE,qEAAqE;QACrE,0EAA0E;QAC1E,2DAA2D;QAC3D,mEAAmE;QACnE,sEAAsE;QACtE,wEAAwE;QACxE,wEAAwE;QACxE,4DAA4D;QAC5D,mEAAmE;QACnE,qCAAqC,EACvC,EAAE,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,iBAAiB,CAAC,EAAE,EAC9C,KAAK,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CACf,KAAK,CAAC,KAAK,IAAI,EAAE,CAAC,UAAU,CAAC,MAAM,MAAM,CAAC,GAAG,CAAC,GAAG,IAAI,IAAI,EAAE,QAAQ,CAAC,CAAC,CAAC,CACzE,CAAC;AACJ,CAAC"}
@@ -62,9 +62,11 @@ export async function readEntityContract(client, kinds) {
62
62
  }
63
63
  export function registerEntityContractTools(server, client) {
64
64
  server.tool("get_entity_authoring_contract", "Read this deploy's CREATE CONTRACT per entity kind from the platform " +
65
- "itself — tools (each type's `implementation`, connectors included), " +
66
- "agents, personas, knowledge, schemas, tables, toolboxes, secrets and " +
67
- "starts. Answers `{ kinds, contracts, rulesVersion }`: per kind the " +
65
+ "itself, per kind: `tool` (each type's implementation, connectors " +
66
+ "included), `agent` (its persona included), `application`, `measure`, " +
67
+ "`query`, `data_table`, `output_schema`, `policy`, `skill`, " +
68
+ "`reference_doc`, `prompt_snippet`, `toolbox`, `secret`, " +
69
+ "`conditional_trigger` and `trigger_element`. Answers `{ kinds, contracts, rulesVersion }`: per kind the " +
68
70
  "`create` and `update` fields (name, required, type, allowed values, " +
69
71
  "shape, and `refused` with where the value is authored instead), and " +
70
72
  "`publish.rules` — what stops it from going live, each with a `code` " +
@@ -1 +1 @@
1
- {"version":3,"file":"entityContract.js","sourceRoot":"","sources":["../../src/tools/entityContract.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAGH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEtD,kFAAkF;AAClF,MAAM,CAAC,MAAM,qBAAqB,GAAG,oCAAoC,CAAC;AAE1E,qEAAqE;AACrE,MAAM,CAAC,MAAM,2BAA2B,GACtC,+DAA+D;IAC/D,qCAAqC,qBAAqB,KAAK;IAC/D,0EAA0E;IAC1E,2EAA2E;IAC3E,2EAA2E;IAC3E,6EAA6E;IAC7E,yEAAyE;IACzE,qEAAqE;IACrE,4DAA4D,CAAC;AAE/D,qFAAqF;AACrF,MAAM,CAAC,KAAK,UAAU,kBAAkB,CAAC,MAAqB,EAAE,KAAgB;IAC9E,MAAM,MAAM,GAAG,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC;IAC1E,IAAI,CAAC;QACH,OAAO,UAAU,CACf,MAAM,CAAC,MAAM,KAAK,CAAC;YACjB,CAA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AAC;YACjF,OAAO;gBACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,2BAA2B,EAAE,CAAC;aACxE,CAAC;QACJ,CAAC;QACD,OAAO,WAAW,CAAC,GAAG,CAAC,CAAC;IAC1B,CAAC;AACH,CAAC;AAED,MAAM,UAAU,2BAA2B,CAAC,MAAiB,EAAE,MAAqB;IAClF,MAAM,CAAC,IAAI,CACT,+BAA+B,EAC/B,uEAAuE;QACrE,mEAAmE;QACnE,uEAAuE;QACvE,6DAA6D;QAC7D,0DAA0D;QAC1D,0GAA0G;QAC1G,sEAAsE;QACtE,sEAAsE;QACtE,sEAAsE;QACtE,2DAA2D;QAC3D,uEAAuE;QACvE,qEAAqE;QACrE,yCAAyC;QACzC,2EAA2E;QAC3E,wEAAwE;QACxE,wEAAwE;QACxE,sDAAsD;QACtD,wEAAwE;QACxE,0EAA0E;QAC1E,iEAAiE;QACjE,mBAAmB,EACrB;QACE,KAAK,EAAE,CAAC;aACL,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;aACjB,QAAQ,EAAE;aACV,QAAQ,CACP,mEAAmE;YACjE,sEAAsE,CACzE;KACJ,EACD,KAAK,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,kBAAkB,CAAC,MAAM,EAAE,KAAK,CAAC,CACvD,CAAC;AACJ,CAAC"}
@@ -1,16 +1,26 @@
1
1
  /**
2
- * Secondary MCP tools: the agent-scoped persona create/read (personas
3
- * themselves are a full generic entity — see index.ts — but creation and the
4
- * by-agent read have no equivalent generic route), connectors (a tool
5
- * subtype), attaching memory to a target, and a few standalone one-offs.
2
+ * Secondary MCP tools: an agent's persona, connectors (a tool subtype),
3
+ * attaching memory to a target, and a few standalone one-offs.
6
4
  *
7
5
  * These use routes with shapes that don't fit the generic entity registrar:
8
- * a persona is created only through its agent, connectors are a tool with
6
+ * the persona is a field of its agent, connectors are a tool with
9
7
  * `type: "connector"` and MUST NOT carry real credentials, and attach/detach
10
8
  * is a path-only link.
11
9
  */
12
10
  import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
13
11
  import type { AxonityClient } from "../client.js";
12
+ /**
13
+ * The persona is the agent's `persona` field (axonity-flow#2176): the
14
+ * character text every prompt of the agent opens with, published with the
15
+ * agent. The persona entity, its own id, versions, drafts and approvals are
16
+ * gone, and so are the persona routes the tools called (21 persona operations
17
+ * left the API; 19 of them had a tool here).
18
+ *
19
+ * These two tools stay as the migration path: an agent that knows them lands
20
+ * on the field instead of on a 404 it would read as "no such id". Everything
21
+ * else about a persona is the agent's: its history is the agent's versions,
22
+ * it goes live with `request_publish_agent`.
23
+ */
14
24
  export declare function registerPersonaTools(server: McpServer, client: AxonityClient): void;
15
25
  export declare function registerConnectorTools(server: McpServer, client: AxonityClient): void;
16
26
  /** Keep the envelope, project the rows down to identity. */
@@ -1,31 +1,66 @@
1
1
  /**
2
- * Secondary MCP tools: the agent-scoped persona create/read (personas
3
- * themselves are a full generic entity — see index.ts — but creation and the
4
- * by-agent read have no equivalent generic route), connectors (a tool
5
- * subtype), attaching memory to a target, and a few standalone one-offs.
2
+ * Secondary MCP tools: an agent's persona, connectors (a tool subtype),
3
+ * attaching memory to a target, and a few standalone one-offs.
6
4
  *
7
5
  * These use routes with shapes that don't fit the generic entity registrar:
8
- * a persona is created only through its agent, connectors are a tool with
6
+ * the persona is a field of its agent, connectors are a tool with
9
7
  * `type: "connector"` and MUST NOT carry real credentials, and attach/detach
10
8
  * is a path-only link.
11
9
  */
12
10
  import { z } from "zod";
13
11
  import { assertPlaceholderCredentials } from "./credentials.js";
14
12
  import { detachResult, guard, jsonResult } from "./result.js";
13
+ /**
14
+ * The persona is the agent's `persona` field (axonity-flow#2176): the
15
+ * character text every prompt of the agent opens with, published with the
16
+ * agent. The persona entity, its own id, versions, drafts and approvals are
17
+ * gone, and so are the persona routes the tools called (21 persona operations
18
+ * left the API; 19 of them had a tool here).
19
+ *
20
+ * These two tools stay as the migration path: an agent that knows them lands
21
+ * on the field instead of on a 404 it would read as "no such id". Everything
22
+ * else about a persona is the agent's: its history is the agent's versions,
23
+ * it goes live with `request_publish_agent`.
24
+ */
15
25
  export function registerPersonaTools(server, client) {
16
- server.tool("read_agent_persona", "Read an agent's persona (voice/character). A persona is 1:1 with an agent — " +
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`))));
18
- server.tool("create_agent_persona", "Create an agent's persona. Pass name, characterText and optional status.", {
26
+ server.tool("read_agent_persona", "Read an agent's persona: the character text every prompt of this agent " +
27
+ "opens with. It is the agent's `persona` field (also in `read_agent`), " +
28
+ "returned here with the agent's `version`, which `create_agent_persona` " +
29
+ "and `update_agent` take as `expectedVersion`. `persona` is null or `\"\"` " +
30
+ "when the agent has none (null: never set; `\"\"`: removed). Replaces " +
31
+ "`read_persona`, `read_persona_published`, `read_persona_version`, " +
32
+ "`list_persona_versions`, `list_deleted_persona_versions`, " +
33
+ "`list_personas` and `list_deleted_personas`: a persona has no id, " +
34
+ "versions or list of its own any more.", { agentId: z.string().describe("The agent's id.") }, async ({ agentId }) => guard(async () => {
35
+ const agent = (await client.get(`/api/v1/agents/${agentId}`));
36
+ return jsonResult({
37
+ agentId,
38
+ persona: agent.persona ?? null,
39
+ version: agent.version,
40
+ });
41
+ }));
42
+ server.tool("create_agent_persona", "Set an agent's persona: who the agent is, in its own words — the " +
43
+ "character text every prompt of this agent opens with. It writes the " +
44
+ "agent's `persona` field on its draft (the same as `update_agent` with " +
45
+ "`{ persona }`) and goes live with the agent (`request_publish_agent`). " +
46
+ "Setting it again replaces it. Read the agent first (`read_agent` or " +
47
+ "`read_agent_persona`) for `expectedVersion`; on a 409, re-read and retry. " +
48
+ "There is no separate name or status: a persona is only its text. To " +
49
+ "remove it, send `\"\"`; on update_agent `null` changes nothing. Replaces " +
50
+ "`update_persona`, `delete_persona`, `restore_persona`, " +
51
+ "`discard_persona_draft`, `create_persona_major_version`, " +
52
+ "`ensure_persona_major_version`, `name_persona_major_version`, " +
53
+ "`delete_persona_version`, `restore_persona_version`, " +
54
+ "`restore_deleted_persona_version` and `request_publish_persona`: the " +
55
+ "persona's history is the agent's versions, and it goes live with " +
56
+ "`request_publish_agent`.", {
19
57
  agentId: z.string().describe("The agent's id."),
20
- fields: z
21
- .record(z.unknown())
22
- .describe('Persona fields, e.g. { "name": "…", "characterText": "…" }.'),
23
- }, async ({ agentId, fields }) => guard(async () => jsonResult(await client.post(`/api/v1/agents/${agentId}/persona`, fields))));
24
- // Reading/updating a persona by its OWN id (list_personas, read_persona,
25
- // update_persona, delete_persona, restore_persona, …) is generated generically
26
- // from the "persona" EntityDef in index.ts — identical PUT semantics to what
27
- // used to be hand-written here. Only the agent-scoped create/read above are
28
- // bespoke, because personas have no standalone create route.
58
+ expectedVersion: z
59
+ .number()
60
+ .int()
61
+ .describe("The agent's current `version`, from read_agent or read_agent_persona."),
62
+ persona: z.string().describe("The character text, as the agent should read it."),
63
+ }, async ({ agentId, expectedVersion, persona }) => guard(async () => jsonResult(await client.put(`/api/v1/agents/${agentId}`, { expectedVersion, persona }))));
29
64
  }
30
65
  /**
31
66
  * The shape `implementation` must have for a connector to run.
@@ -56,6 +91,11 @@ const CONNECTOR_SHAPE = "\n\nSHAPE OF `implementation` — `headers` and `queryP
56
91
  * file of the run, not parsed. Without this sentence the only mappings an agent
57
92
  * knew were the parsing ones.
58
93
  *
94
+ * `sha256` in the reference (axonity-flow#2299): the hash stored with the
95
+ * bytes, settled from storage where a reference enters a run, so a workflow
96
+ * can recognise a file it already processed. Which value counts is said here
97
+ * because a caller-written hash would silently skip a new document.
98
+ *
59
99
  * Kept short on purpose: the platform's live contract
60
100
  * (`get_entity_authoring_contract`, axonity-flow#2103) is the authority, and
61
101
  * this is guidance until every deploy serves it.
@@ -68,8 +108,20 @@ const CONNECTOR_EFFECT_AND_FILE = "\n\nDECLARE WHAT IT DOES — `implementation.
68
108
  "\n\nAN ANSWER THAT IS A FILE — `implementation.responseMapping: " +
69
109
  '{ "type": "file", "filename": "{{filename}}" }`. The bytes are kept as a ' +
70
110
  "file of the run and the connector returns its reference, `{ fileId, " +
71
- "filename, contentType, sizeBytes }` — the shape an upload has, so Digitize " +
72
- "documents reads it and a sub-workflow's file parameter takes it. " +
111
+ "filename, contentType, sizeBytes, sha256 }` — the shape an upload has, so " +
112
+ "Digitize documents reads it and a sub-workflow's file parameter takes it. " +
113
+ "`sha256` is the hex SHA-256 of the bytes, computed once when the file was " +
114
+ "stored; the same bytes have the same value under any name, so compare it " +
115
+ "to recognise a file that was already processed. Only a reference in a " +
116
+ "declared file parameter (`file`, or a list of `file`) is checked against " +
117
+ "storage: where one enters a run (a manual, API or MCP start, a " +
118
+ "sub-workflow call) its fields are settled from storage. A reference to a " +
119
+ "file the run may not read keeps what the caller wrote and carries no " +
120
+ "`sha256` — at a webhook, cron or conditional start, each of them. A " +
121
+ "reference anywhere else (an `object` field, an undeclared key) is not " +
122
+ "checked and keeps any `sha256` the caller wrote. Digitize documents " +
123
+ "always answers the stored `sha256` per file it read. So compare only the " +
124
+ "value on a declared file parameter or on Digitize's entry. " +
73
125
  "`filename` is optional and may use the inputs (`{{name}}`); without it the " +
74
126
  "far end's `Content-Disposition` name is used, else `document`. A file " +
75
127
  "answer takes no `responseTransform`. Outside a run (e.g. " +