@axonity-ai/mcp 0.6.0 → 0.8.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.
Files changed (59) hide show
  1. package/README.md +251 -14
  2. package/dist/client.d.ts +15 -2
  3. package/dist/client.js +8 -1
  4. package/dist/client.js.map +1 -1
  5. package/dist/contract.d.ts +109 -0
  6. package/dist/contract.js +272 -0
  7. package/dist/contract.js.map +1 -0
  8. package/dist/errors.d.ts +15 -3
  9. package/dist/errors.js +27 -3
  10. package/dist/errors.js.map +1 -1
  11. package/dist/generated/listFilters.d.ts +19 -0
  12. package/dist/generated/listFilters.js +78 -0
  13. package/dist/generated/listFilters.js.map +1 -0
  14. package/dist/index.js +29 -2
  15. package/dist/index.js.map +1 -1
  16. package/dist/tools/authoringSpec.d.ts +76 -0
  17. package/dist/tools/authoringSpec.js +169 -0
  18. package/dist/tools/authoringSpec.js.map +1 -0
  19. package/dist/tools/company.d.ts +5 -2
  20. package/dist/tools/company.js +79 -2
  21. package/dist/tools/company.js.map +1 -1
  22. package/dist/tools/conventions.d.ts +16 -0
  23. package/dist/tools/conventions.js +299 -19
  24. package/dist/tools/conventions.js.map +1 -1
  25. package/dist/tools/credentials.d.ts +20 -0
  26. package/dist/tools/credentials.js +41 -0
  27. package/dist/tools/credentials.js.map +1 -1
  28. package/dist/tools/extras.d.ts +17 -0
  29. package/dist/tools/extras.js +151 -9
  30. package/dist/tools/extras.js.map +1 -1
  31. package/dist/tools/operations.d.ts +28 -0
  32. package/dist/tools/operations.js +160 -0
  33. package/dist/tools/operations.js.map +1 -0
  34. package/dist/tools/register.d.ts +27 -0
  35. package/dist/tools/register.js +19 -1
  36. package/dist/tools/register.js.map +1 -1
  37. package/dist/tools/runs.d.ts +24 -0
  38. package/dist/tools/runs.js +304 -26
  39. package/dist/tools/runs.js.map +1 -1
  40. package/dist/tools/secrets.d.ts +33 -0
  41. package/dist/tools/secrets.js +69 -0
  42. package/dist/tools/secrets.js.map +1 -0
  43. package/dist/tools/subworkflows.d.ts +20 -0
  44. package/dist/tools/subworkflows.js +42 -0
  45. package/dist/tools/subworkflows.js.map +1 -0
  46. package/dist/tools/toolboxes.d.ts +32 -0
  47. package/dist/tools/toolboxes.js +165 -0
  48. package/dist/tools/toolboxes.js.map +1 -0
  49. package/dist/tools/triggers.d.ts +8 -0
  50. package/dist/tools/triggers.js +65 -7
  51. package/dist/tools/triggers.js.map +1 -1
  52. package/dist/tools/validation.js +74 -4
  53. package/dist/tools/validation.js.map +1 -1
  54. package/dist/tools/versions.d.ts +9 -0
  55. package/dist/tools/versions.js +36 -0
  56. package/dist/tools/versions.js.map +1 -1
  57. package/dist/tools/workflowMutations.js +53 -12
  58. package/dist/tools/workflowMutations.js.map +1 -1
  59. package/package.json +3 -1
@@ -12,6 +12,22 @@
12
12
  * and the enums quoted below to a vendored snapshot of that schema, so a drift
13
13
  * between this prose and the backend fails CI rather than misleading an agent.
14
14
  * Keep enum lists in this doc in step with what that test asserts.
15
+ *
16
+ * BETTER STILL, DO NOT QUOTE A LIST AT ALL. Four vocabularies used to live here
17
+ * and every one of them drifted: the mutation commands (#32/#44), and then the
18
+ * step types, trigger types and schedule-rule shapes — this guide named nine
19
+ * step types where seven validate. All four are now read from
20
+ * `get_workflow_authoring_spec`, generated by the backend from the registries
21
+ * that ENFORCE them, and this document states none of those LISTS. A pinned
22
+ * list fails CI when it drifts; a list you never wrote cannot. When you are
23
+ * about to write out a set of accepted values here, point at the spec instead —
24
+ * `test/conformance.test.ts` asserts the absence.
25
+ *
26
+ * Naming ONE value to state behaviour is a different thing and stays: that
27
+ * `typeId: "subprocess-invocation"` is what makes a workflow callable is not
28
+ * something the catalogue can say — it can only say the id exists. The line is
29
+ * the one #44 drew: a mention is guidance, an enumeration is a claim about what
30
+ * exists, and it is the claim that goes stale.
15
31
  */
16
32
  const CONVENTIONS = `# Authoring conventions for Axonity entities
17
33
 
@@ -138,10 +154,14 @@ has run cleanly once, at its current version.
138
154
  undeclared OR MISSPELLED key is a 422 that names it, not a silent drop. So
139
155
  spelling matters and you get told when it is wrong — good. Other entities are
140
156
  more lenient and may drop an unknown key silently; never rely on that.
141
- - \`agent.tags\` is not cosmetic: it drives which policies apply to the agent at
142
- runtime. An untagged agent looks correct everywhere in the UI and silently
143
- skips policies scoped to those tags. If you create or update an agent that
144
- should be governed by a policy, check its tags match what the policy expects.
157
+ - \`agent.tags\` is a free label for grouping and reporting. It GATES NOTHING —
158
+ what reaches an agent's prompt is a LINK (\`attach_policy_to_agent\`), visible
159
+ in a table a human can read and edit. A role-tag gate on a policy used to
160
+ decide that invisibly and is refused outright now: sending
161
+ \`activation.tags\` to \`create_policy\`/\`update_policy\` is a 422. The two
162
+ surviving gates, \`activation.tools\` and \`activation.delegation\`, each say
163
+ something a link cannot — "only on turns where this agent holds this tool",
164
+ and "only when (not) delegated".
145
165
 
146
166
  ## After you write, verify
147
167
  - A 200 means the request was accepted, NOT that it did what you meant. Re-read
@@ -162,6 +182,19 @@ has run cleanly once, at its current version.
162
182
  (\`read_run\` / \`read_run_trace\` / \`read_run_cost\`). Note it runs the PUBLISHED
163
183
  workflow and really executes (cost, connector side effects), so publish first,
164
184
  and only test-run when a human is expecting it.
185
+ - Read \`read_workflow_trigger_parameters\` first and pass \`triggerId\`: a
186
+ workflow can have several starts, each with different fields, and omitting
187
+ it fires whichever comes first. Never send a parameter marked \`pinned\` —
188
+ the author owns that value and it is overwritten anyway.
189
+ - **A run can park instead of finishing.** A step that asks a question waits
190
+ for an answer, so "it never came back" usually means "it is waiting on you".
191
+ \`read_run_waiting_on\` says what for; \`answer_run_question\` (or
192
+ \`send_run_message\` on a conversation run) resumes it. Answer your own test
193
+ runs; on a run a human is depending on, the answer is theirs to give.
194
+ - A FOR EACH launch is not one result. \`read_run_items_summary\` is the
195
+ roll-up ("4,415 processed · 12 failed") and \`list_run_items\` the rows —
196
+ with \`outcome: "failed"\`, because the failures are scattered and filtering
197
+ page one finds none of them.
165
198
  - A LIST is not the whole list. \`list_workflow_runs\` returns a page —
166
199
  \`{ items, nextCursor, pageSize, hasMore }\`, 20 by default — so counting or
167
200
  concluding from page one while \`hasMore\` is true is how you answer confidently
@@ -224,14 +257,17 @@ made any time before you attach them.
224
257
  use rather than inventing one.
225
258
  - Complete check: the tool has the I/O schemas its callers need AND a non-empty
226
259
  implementation of the right shape for its type.
260
+ - \`toolboxId\` files the tool in a toolbox on creation. Read \`list_toolboxes\`
261
+ BEFORE you create: a tool made without one is ungrouped, which is valid and
262
+ is also how nobody finds it. See Toolboxes below.
227
263
 
228
264
  ### agent (\`create_agent\`, strict body)
229
265
  - Required: \`name\`. Enumerated fields, with their ONLY valid values:
230
266
  - \`capabilityTier\`: \`economy\` | \`standard\` (default) | \`smart\` | \`reasoning\`
231
267
  - \`creativityTier\`: \`low\` | \`medium\` (default) | \`high\`
232
268
  - \`learningMode\`: \`none\` (default) | \`adaptive\` | \`strict\`
233
- - \`avatar\`, \`tags\` (role tags — see Field shape; set them or policies silently
234
- skip the agent), \`canOwnProcess\` (bool; must be true for an agent to own a
269
+ - \`avatar\`, \`tags\` (free labels for grouping — they gate nothing; see Field
270
+ shape), \`canOwnProcess\` (bool; must be true for an agent to own a
235
271
  workflow step's flow), \`episodicMemoryEnabled\` (bool).
236
272
  - \`permissions\` (object): \`planning\`, \`delegation\`, \`verboseOutput\` (bools);
237
273
  \`outputValidators\` / \`exposedValidatorTools\` (snake_case specs, see Field
@@ -249,9 +285,14 @@ made any time before you attach them.
249
285
  (preferred: the backend validates each and threads the version), or
250
286
  - \`replace_workflow_document\` — a full-document atomic PUT.
251
287
  - The document is a graph: \`steps.all[]\` (each \`{ id, type, name, ... }\`) and
252
- \`steps.edges[]\` (each \`{ id, from, to, type? }\`) plus \`triggers\`. Step
253
- \`type\` is one of: \`manual\`, \`agent\`, \`automation\`, \`subprocess\`,
254
- \`connector\`, \`decision\`, \`loop\`, \`for_each\`, \`end\`.
288
+ \`steps.edges[]\` (each \`{ id, from, to, type? }\`) plus \`triggers\`.
289
+ - WHICH VALUES a step's \`type\` and a trigger's \`typeId\` may hold is answered
290
+ by \`get_workflow_authoring_spec\`, read live from this deploy. This guide
291
+ does not list them, on purpose: it used to name nine step types where seven
292
+ validate, and a list nobody could read is a list that goes wrong. The spec
293
+ also lists the types you may NOT author, each with the reason and how to
294
+ express that intention instead — so reaching for one gets you an answer
295
+ rather than a \`step_invalid_type\`.
255
296
  - Referential integrity is enforced: step and trigger ids must be unique, and
256
297
  every edge \`from\`/\`to\` must reference an id that exists in the document
257
298
  (\`from\` may be a trigger or step; \`to\` must be a step). A dangling edge is a
@@ -321,13 +362,18 @@ DELETE a link and do NOT touch the entity body:
321
362
  - reference_doc → agent: \`attach_reference_to_agent\` (agents only — there is no
322
363
  workflow-scoped reference-doc route).
323
364
  - VERIFY every one of these with the read-back before \`request_publish_*\`:
324
- \`list_agent_skills\`, \`list_agent_policies\`, \`list_agent_reference_docs\`.
325
- This is not optional politeness — because a link lives OUTSIDE the entity body,
326
- \`read_agent\` will not show it, so the read-back is the only way to tell an
327
- attach that landed from one that silently did nothing. (Mechanism A is
328
- different: those ids ARE in the body, so re-reading the agent proves them.
329
- \`attach_skill_to_workflow\` has no read-back — the backend has no list route
330
- for it.)
365
+ \`list_agent_skills\`, \`list_agent_policies\`, \`list_agent_reference_docs\`,
366
+ and \`list_workflow_skills\` for the workflow-scoped variant. This is not
367
+ optional politeness — because a link lives OUTSIDE the entity body,
368
+ \`read_agent\` / \`read_workflow\` will not show it, so the read-back is the
369
+ only way to tell an attach that landed from one that silently did nothing.
370
+ (Mechanism A is different: those ids ARE in the body, so re-reading the agent
371
+ proves them.)
372
+ - The three agent read-backs also take \`workflowId\`. With it you get the
373
+ COMPOSED runtime view — what this agent's prompt actually assembles inside
374
+ that workflow, with a \`linkSource\` per row saying WHY each item is there (an
375
+ explicit link, tenant-wide, or scoped to the workflow). Without it you see the
376
+ agent on its own, which is not what a run assembles.
331
377
 
332
378
  **C) Reference an id INSIDE the workflow document** (this is how agents and tools
333
379
  get "into" a workflow — there is no attach route for it):
@@ -407,6 +453,41 @@ The connector never carries a secret across: \`authConfig\` stays placeholders i
407
453
  the new tenant too, and a human fills the real value there.
408
454
 
409
455
  ## Structural workflow edits
456
+ - **Start by reading the spec.** \`get_workflow_authoring_spec\` returns FOUR
457
+ lists this deploy generates from its own registries: the mutation commands,
458
+ the trigger types, the step types (including the ones you may not author, with
459
+ the reason), and the schedule-rule shapes with a working example each. Neither
460
+ this guide nor the tool descriptions restate any of those lists: a list kept
461
+ in the connector is right only by maintenance, and it has been wrong twice
462
+ already, both times in the direction that costs an agent a 422 on something it
463
+ was told to use. Pass \`types\` for the live payload schema of a command you
464
+ are about to write.
465
+ - **The payload schemas describe themselves.** What may go inside
466
+ \`parameters\`, \`inputs\`, \`outputs\` and \`contract\` is IN those schemas —
467
+ including the fact that a bound input DERIVES its contract from the output it
468
+ reads. Ask the spec for the command's \`types\` rather than looking for prose
469
+ about the shape here; there deliberately is none.
470
+ - **One thing the schemas do not make obvious: which KEY carries the value's
471
+ type, because it is not the same key everywhere.**
472
+ - A TRIGGER PARAMETER and a WORKFLOW CONSTANT use \`type\`.
473
+ - A step INPUT or OUTPUT uses \`kind\`.
474
+ - Where a field carries a nested \`schema\` object, \`schema.kind\` is what
475
+ wins.
476
+
477
+ This asymmetry is real, not a typo to normalise: the shapes came from
478
+ different surfaces, and normalising them would make one reader wrong. The
479
+ VALUES differ too — \`get_workflow_authoring_spec\` returns one list per key
480
+ (\`parameterTypes\`, \`outputKinds\`, \`schemaFieldKinds\`), and they are not
481
+ interchangeable: only one knows \`constant\`, and they disagree on how to
482
+ spell a yes/no. Read the list that matches the shape you are writing; this
483
+ guide does not restate them, for the same reason it restates no other list.
484
+
485
+ Writing \`kind\` on a trigger parameter is not a 422; it is a key nothing
486
+ reads, so the value silently falls back to text and the workflow runs with
487
+ the wrong thing. Check which of the three you are writing before you write it.
488
+ - \`rulesVersion\` in that response is a content hash over all four lists. While
489
+ it is unchanged there is nothing to re-fetch; re-read the spec when it changes,
490
+ or when a mutation fails with a 422 suggesting your idea of a command is stale.
410
491
  - \`apply_workflow_mutations\` takes a LIST of commands and applies them in order,
411
492
  threading the version for you — pass the version you read, not one per command.
412
493
  - It is NOT transactional. If command N fails, the ones before it stay applied;
@@ -429,11 +510,53 @@ the new tenant too, and a human fills the real value there.
429
510
  required, and \`id\`, \`type\`, \`config\`, \`contract\`, \`inputs\` and
430
511
  \`outputs\` are accepted next to them. No follow-up \`update_step\` is needed
431
512
  just to fill the step in.
513
+ - \`add_trigger\` does the same for a trigger: \`parameters\` and \`outputs\`
514
+ go in that call. This is what makes a callable workflow declarable in one
515
+ mutation, since a trigger's parameter list IS its signature.
432
516
  - \`add_edge\` takes the document's own \`from\`/\`to\` as well as
433
517
  \`fromStepId\`/\`toStepId\`, and keeps an \`id\` you supply.
434
518
  - An unknown or misspelled key is a 422 naming it, not a silent drop — so
435
519
  spelling matters and you are told when it is wrong.
436
520
 
521
+ ## Inputs and constants — the two lists that belong to the PROCESS
522
+ A workflow declares two whole-list things of its own, both edited the same way
523
+ (read the list, change it, write it back — there is no per-entry command,
524
+ because the identity is the \`name\` and renaming is the common edit):
525
+ - \`set_workflow_inputs\` — what the process NEEDS to start. Carried by every
526
+ start, and the list a caller fills in whichever trigger fired. A start's own
527
+ \`parameters\` are what that start declares on top; where a name is in both,
528
+ the process-level one wins.
529
+ - \`set_workflow_constants\` — what the AUTHOR pins, described below.
530
+ Read both back with \`read_workflow_trigger_parameters\`, which answers
531
+ \`{ inputs, triggers, constants }\`.
532
+
533
+ ## Constants — values the AUTHOR owns
534
+ A constant is applied on EVERY run whichever trigger fired, and it OVERWRITES
535
+ whatever a caller sent. That is deliberate: a field the operator's form does not
536
+ show must not become an injection point for anyone who learns its name.
537
+ - Set them with the \`set_workflow_constants\` command. It replaces the WHOLE
538
+ list, the way \`advanced_edit\` replaces steps and edges — read the list, edit
539
+ it, write it back. There is no per-constant command, because a constant's
540
+ identity is its name and renaming is the common edit.
541
+ - Every entry needs a \`name\`: it is what a step binds to and how the run
542
+ payload keys it. A nameless entry is refused rather than stored, because at
543
+ run time it would simply be skipped.
544
+ - **A constant with no value blocks publishing.** \`constant_without_value\` is
545
+ an error, not a warning, and it names the constant. It has to be: an entry
546
+ with no value was never written into the run at all, so the workflow validated
547
+ clean, published, and ran without it.
548
+ - ABSENCE, not falsiness. \`0\`, \`""\`, \`false\` and \`[]\` are values and pass.
549
+ - The value lives in \`defaultValue\`. On a constant that is not a fallback —
550
+ it IS the value, written on every run. A constant carries no \`required\`
551
+ (nobody is being asked to fill it in) and needs no flag saying it is one.
552
+ - **A trigger parameter can be pinned the same way**, and the platform reads
553
+ TWO spellings: \`constant: true\`, or the older \`type: "constant"\`. Both
554
+ mean the author owns it and the caller must not send it, so treat a parameter
555
+ carrying either as off-limits when you build \`triggerInput\`.
556
+ \`read_workflow_trigger_parameters\` collapses both into \`pinned\`, on the
557
+ workflow's constants and on each start's parameters — read that rather than
558
+ checking the two spellings yourself.
559
+
437
560
  ## Two platform invariants that look like bugs
438
561
  Both are deliberate, both run after EVERY edit, and both now report themselves in
439
562
  the mutation response under \`systemAdjustments\` — so you no longer have to diff
@@ -458,31 +581,188 @@ a document to find out what the platform did.
458
581
  - Pass exactly one. Before telling a human a workflow is ready, check
459
582
  \`catalogChecked\` — a green structural verdict is the easiest thing to
460
583
  over-read.
584
+ - Read the \`issues\` rather than only \`launchable\`: the validator now reports
585
+ a sub-process call with no target, one pointing at itself, one whose target
586
+ is deleted or was never published or has no invocation trigger, a constant
587
+ with no value, and a trigger drawn on the canvas that nothing is wired to.
588
+ Some of those are warnings and still let a workflow publish — read the
589
+ \`severity\`, and read the \`code\`, which is stable where the message is not.
461
590
 
462
591
  ## Triggers
463
- - A published workflow still does nothing until it has a trigger. Add one with
464
- \`create_cron_schedule\`, \`create_webhook_trigger\`, or
465
- \`create_conditional_trigger\`.
592
+ - A published workflow still does nothing until it has a trigger. A trigger has
593
+ TWO halves, and drawing one on the canvas is only the first.
594
+ - **A schedule is reconciled for you.** Draw it in the document, publish, and
595
+ the firing row is brought into line. That is the exception.
596
+ - **A webhook or conditional trigger is NOT.** Its row must be created
597
+ separately — \`create_webhook_trigger\` / \`create_conditional_trigger\` —
598
+ and publishing will not create one. A webhook drawn and published with no row
599
+ is an endpoint that does not exist; the validator says so with
600
+ \`trigger_not_wired\`, a WARNING, so the publish still goes through. Take the
601
+ warning seriously: nothing else will tell you.
466
602
  - Trigger deletes are HARD deletes — no restore. Webhook tokens are shown once
467
603
  at create/rotate and are never retrievable; hand them straight to your human
468
604
  and never store one in an entity field.
605
+ - **A schedule is a claim — check it.** \`run_cron_schedule_now\` fires one
606
+ immediately without moving \`nextFireAt\`, so you can prove a schedule starts
607
+ something instead of waiting until tomorrow to find out it does not. It runs
608
+ for real, with real cost and side effects.
609
+ - **To PAUSE a schedule, disarm it** (\`set_cron_schedule_enabled\`), never
610
+ delete it. Deleting throws away the rules the author wrote and makes "stop
611
+ this for a week" indistinguishable from "we do not do this any more".
612
+ - \`create_cron_schedule\` takes EITHER \`cronExpr\` OR \`rules\`, and the
613
+ trigger must exist in the PUBLISHED document. For the rule shapes, read
614
+ \`scheduleRuleKinds\` from \`get_workflow_authoring_spec\` — do not invent one.
615
+ - \`list_all_cron_schedules\` answers "what runs tonight?" across the tenant;
616
+ \`reconcile_cron_schedules\` answers "is that actually what runs?". The second
617
+ reports rather than tidying silently and never arms something switched off.
469
618
 
470
619
  ## Evaluating what you built
471
620
  - There is no findings endpoint and no evaluator entity. To judge a run, read it:
472
621
  \`read_run\` (its \`validatorVerdicts\` and \`agentInvocations\`) and
473
622
  \`read_run_trace\` (the step-by-step tool calls).
623
+ - **Start with \`read_run_outline\`, not \`read_run\`.** The outline is the run's
624
+ table of contents and carries no bodies, so it costs what the run's SHAPE
625
+ costs rather than its content — a fan-out over four thousand items reads about
626
+ as cheaply as one over four. Then open only what you need:
627
+ \`read_run_value\` for one large step value (by the digest in \`stepStates\`),
628
+ \`read_run_invocation_messages\` for one agent's transcript (by the id in
629
+ \`agentInvocations\`). Reading a whole run to find one message is the habit
630
+ this replaces.
631
+ - \`itemCap\` on the outline bounds items listed per fan-out step; the remainder
632
+ is counted in \`counts.truncated\`, never dropped in silence.
633
+ - **What an agent wrote to itself is readable.** \`list_run_session_memory\`
634
+ lists the files an agent left during a run (metadata only) and
635
+ \`read_run_session_memory_file\` opens one. When the trace shows a decision but
636
+ not what it was reading, this is usually where the reason is. Workflow-bound
637
+ reference material is NOT here — that lives in \`reference_docs\`.
638
+ - **\`list_todo_steps\`** is every step in the tenant waiting on a human, across
639
+ all runs; \`read_run_waiting_on\` is the same question for one run you already
640
+ have. It is PAGED over the waiting RUNS, so \`items\` can be longer than
641
+ \`pageSize\` — one run may park several steps. Follow \`nextCursor\` until it
642
+ is null before concluding anything about how much is waiting.
474
643
  - Runs are the only thing with a real archive state — \`archive_run\` is
475
644
  reversible, \`bulk_delete_runs\` is not.
476
645
 
646
+ ## Subworkflows — one workflow calling another
647
+ Both halves live in the workflow DOCUMENT, so both are ordinary
648
+ \`apply_workflow_mutations\` work. There is no separate "link" route.
649
+ - **To make a workflow callable**, it needs TWO things: a trigger with
650
+ \`typeId: "subprocess-invocation"\` (\`add_trigger\`), which is what makes it
651
+ callable at all, and a declared SIGNATURE.
652
+ - **The signature belongs to the PROCESS, not to the trigger.** Declare it with
653
+ \`set_workflow_inputs\` — one list, carried by every start, and the same list
654
+ a caller of any kind fills in. A trigger's own \`parameters\` are what THAT
655
+ start declares on top; \`parameters\` goes in the \`add_trigger\` call itself,
656
+ so a start that does add fields needs no follow-up \`update_trigger\`.
657
+ - Older documents declared everything on the invocation trigger instead, and
658
+ that still works: both are read, and where a name appears in both the
659
+ PROCESS-level one wins. When you are editing a workflow you did not author,
660
+ read \`read_workflow_trigger_parameters\` and see which list actually holds
661
+ its fields before adding to either.
662
+ - \`set_workflow_inputs\` REPLACES the whole list, like
663
+ \`set_workflow_constants\`: read, edit, write back. An entry with no \`name\`
664
+ is refused rather than stored — the name is how a caller passes the value and
665
+ how the run payload keys it, so a nameless one would be skipped silently at
666
+ run time.
667
+ - For what an input or a parameter may contain, ask
668
+ \`get_workflow_authoring_spec\` for the payload schema of the command you are
669
+ about to write, rather than a shape written down here.
670
+ - **It must also be PUBLISHED.** The catalogue reads the published document, so
671
+ a draft-only workflow comes back \`callable: false\` with "Never published".
672
+ Authoring the caller first and publishing the callee later is a run-time
673
+ failure waiting to happen.
674
+ - **To call it**, add a step with \`type: "subprocess"\` and
675
+ \`config: { targetWorkflowId, ownerAgentId }\` — both required, both workflow/
676
+ agent ids. Bind the step's \`inputs\` by NAME to the callee's \`parameters\`;
677
+ that is the whole mapping, there is no separate argument block.
678
+ - \`config.waitForCompletion\` is **IGNORED** if you write it. Drawing a step
679
+ after this one already means "after", so waiting is implied. The one thing the
680
+ graph cannot say is fire-and-forget: \`config.fireAndForget: true\`, and then
681
+ nothing downstream may depend on the result.
682
+ - \`config.errorStrategy\` ("fail" | "skip") is only honoured when the step
683
+ ITERATES (\`config.iteration.enabled\`). On a single call "skip" would report
684
+ a failed child as success, so it is forced to fail-fast.
685
+ - **A workflow cannot call itself** — every run would spawn a child that reaches
686
+ the same step again. Pass \`exclude: <the workflow you are editing>\` to
687
+ \`list_callable_workflows\` and it is kept out of the list.
688
+ - **What comes back** is the callee's \`outcomes\`: its end steps, each with the
689
+ fields bound into it. WHICH end was reached is itself part of the answer.
690
+ - **\`validate_workflow\` checks this now.** A missing target, a workflow
691
+ calling itself, a target that is deleted, never published, or has no
692
+ invocation trigger — each has its own issue code, and the ones that resolve to
693
+ nothing are errors that block publishing. Still run
694
+ \`list_callable_workflows\` BEFORE you author the step: it is how you pick a
695
+ target and see the interface you are binding to, where the validator only
696
+ tells you afterwards that the one you picked was wrong.
697
+
477
698
  ## Secrets
478
699
  - Never handle a real credential. A connector's \`authConfig\` takes placeholders
479
700
  only ("{{ MY_SECRET }}" or ""); a human fills the real value in Axonity. This
480
701
  is enforced — a write carrying something that looks like a real secret is
481
702
  rejected before it leaves this connector.
703
+ - You CAN read the catalogue: \`list_secrets\` (id, name, authType) and
704
+ \`read_secret\`. That is how you get the id for a connector's
705
+ \`authConfig.secretId\` — do not ask a human to copy one out of the UI.
706
+ - Before you wire a connector to a secret, check \`valueKeys\` on
707
+ \`read_secret\`. An empty list means nobody has filled the secret in yet: the
708
+ connector will author fine and fail at RUN time. Say so to your human, with the
709
+ secret's name, rather than reporting the wiring as done.
710
+ - You cannot create, change or delete a secret. That is a human act in Axonity →
711
+ Settings → Secrets, and the backend refuses it from this connector's token.
712
+ - A secret's \`metadata\` (connection config, e.g. a session_cookie handshake)
713
+ comes back with credential-shaped entries withheld, listed under
714
+ \`metadataRedacted\`. If you need one of those values, a human reads it in
715
+ Axonity — do not try another route to it.
716
+
717
+ ## Toolboxes — where a tool is filed
718
+ - A toolbox is a per-tenant grouping label over tools. Read \`list_toolboxes\`
719
+ before \`create_tool\` and pass the box's id as \`toolboxId\`; a tool created
720
+ without one is ungrouped. Move an existing tool with
721
+ \`assign_tool_toolbox\` (\`toolboxId: null\` takes it out of its box).
722
+ - \`set_toolbox_tools\` DECLARES the membership — it does not add to it. A tool
723
+ in the box and absent from your list is evicted. To add one tool, read the
724
+ box's contents first, or use \`assign_tool_toolbox\`, which cannot evict
725
+ anything by accident. A tool is in at most one box.
726
+ - A toolbox NEVER changes what an agent may call. An agent is linked to
727
+ individual tools (\`agent.toolIds\`), never to a box; there is no route that
728
+ grants a whole box, and "give this agent the Carerix toolbox" is a bulk write
729
+ of individual links. What the box decides is how a tool is ADVERTISED: a boxed
730
+ tool with \`surfacing: "inherit"\` is found via discover_tools instead of
731
+ riding in every prompt. Read \`effectiveSurfacing\` on the tool to answer "is
732
+ it in the prompt?"; \`surfacing\` is the raw stored choice.
733
+ - Deleting a toolbox does NOT delete its tools — they survive, ungrouped. The
734
+ box itself has no restore.
735
+ - Platform-shipped tools cannot be moved. The \`Axonity\`, \`Checks\` and
736
+ \`Branching\` boxes hold locked tools; the API refuses and NAMES the tool it
737
+ refused. Read that name to your human instead of bisecting the selection.
738
+ - \`set_toolbox_auth\` sets the credential a box's tools SHARE — ten Microsoft
739
+ Mail tools, one mailbox, said once. A tool with its own auth keeps it; only a
740
+ tool with none inherits. Same rule as anywhere else: point \`secretId\` at a
741
+ stored secret, never a real value. Before you clear or replace it, or delete
742
+ the box, call \`list_toolbox_dependent_tools\` — it names the tools that would
743
+ start failing at run time with a bare 401.
482
744
 
483
745
  ## Tenant
484
746
  - Your token fixes the tenant. You cannot act across tenants; never send a
485
747
  tenant id in a body.
748
+ - \`read_model_tier_map\` says what \`capabilityTier\` actually RESOLVES TO on
749
+ this tenant. The tier is the field you write; the model is what you are
750
+ choosing. Read it before you pick one.
751
+ - When a run does not start, look outward before blaming the workflow:
752
+ \`read_concurrency_status\` (is the tenant at its cap?),
753
+ \`read_queue_overview\` (is dispatch alive?), \`list_task_queue\` (did
754
+ something fail in the layer beneath the run?). \`read_for_each_rate\` explains
755
+ a fan-out that is pacing itself rather than stalling.
756
+ - You can READ those and not change them. Caps, rate ceilings and the tier map
757
+ are operator decisions — report what you found, and to whom, rather than
758
+ looking for another route to it.
759
+ - \`read_deploy_contract\` says what THIS deploy speaks: build, environment and
760
+ the routes it mounts. Read it when a call fails in a way that suggests the
761
+ backend is older or newer than you expect.
762
+ - \`list_users\` is where an \`ownerId\` comes from. Look one up instead of
763
+ asking a human to copy it out of the UI.
764
+ - \`list_audit_events({ actorKind: "service_token" })\` reads back what external
765
+ agents — including you — actually changed.
486
766
  `;
487
767
  export function registerConventions(server) {
488
768
  server.tool("axonity_conventions", "Read the authoring conventions BEFORE creating or updating anything: the " +
@@ -1 +1 @@
1
- {"version":3,"file":"conventions.js","sourceRoot":"","sources":["../../src/tools/conventions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAIH,MAAM,WAAW,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8tBnB,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"}
@@ -25,6 +25,26 @@ export declare function isPlaceholder(value: unknown): boolean;
25
25
  * Exported for testing; `assertPlaceholderCredentials` is the enforcement point.
26
26
  */
27
27
  export declare function findCredentialViolations(value: unknown, path?: string): string[];
28
+ /** What a redacted leaf is replaced with. Names where the real value lives. */
29
+ export declare const REDACTION = "[redacted by the connector \u2014 read it in Axonity]";
30
+ export interface Redaction {
31
+ /** The input with every credential-ish leaf replaced by `REDACTION`. */
32
+ value: unknown;
33
+ /** Where a replacement happened, e.g. `metadata.handshakeHeaders.Authorization`. */
34
+ redactedPaths: string[];
35
+ }
36
+ /**
37
+ * The mirror image of `findCredentialViolations`: same walk, same rules, but it
38
+ * rewrites what it finds instead of throwing. For data coming BACK from Axonity.
39
+ *
40
+ * A secret's `metadata` is stored unencrypted and returned verbatim by a route
41
+ * every user in the tenant can call (axonity-flow#908), and the handshake form
42
+ * invites an `Authorization` header straight into it. Returning that to an agent
43
+ * would put a real credential in its context through the one surface built on
44
+ * the promise that values never leave the server — so the structure comes back
45
+ * (an agent needs to see WHICH fields a handshake has) and the credential does not.
46
+ */
47
+ export declare function redactCredentials(value: unknown, path?: string): Redaction;
28
48
  /**
29
49
  * Throw if a connector's fields carry anything that looks like a real
30
50
  * credential. Safe to call with any tool's fields — it is a no-op when there is
@@ -84,6 +84,47 @@ export function findCredentialViolations(value, path = "authConfig") {
84
84
  walk(value, path, false);
85
85
  return findings;
86
86
  }
87
+ /** What a redacted leaf is replaced with. Names where the real value lives. */
88
+ export const REDACTION = "[redacted by the connector — read it in Axonity]";
89
+ /**
90
+ * The mirror image of `findCredentialViolations`: same walk, same rules, but it
91
+ * rewrites what it finds instead of throwing. For data coming BACK from Axonity.
92
+ *
93
+ * A secret's `metadata` is stored unencrypted and returned verbatim by a route
94
+ * every user in the tenant can call (axonity-flow#908), and the handshake form
95
+ * invites an `Authorization` header straight into it. Returning that to an agent
96
+ * would put a real credential in its context through the one surface built on
97
+ * the promise that values never leave the server — so the structure comes back
98
+ * (an agent needs to see WHICH fields a handshake has) and the credential does not.
99
+ */
100
+ export function redactCredentials(value, path = "metadata") {
101
+ const redactedPaths = [];
102
+ const walk = (node, at, keyIsCredential) => {
103
+ if (Array.isArray(node)) {
104
+ return node.map((item, i) => walk(item, `${at}[${i}]`, keyIsCredential));
105
+ }
106
+ if (node !== null && typeof node === "object") {
107
+ const out = {};
108
+ for (const [key, child] of Object.entries(node)) {
109
+ out[key] = walk(child, `${at}.${key}`, isCredentialKey(key));
110
+ }
111
+ return out;
112
+ }
113
+ if (typeof node === "string" && SECRET_PATTERNS.some(([, re]) => re.test(node))) {
114
+ redactedPaths.push(at);
115
+ return REDACTION;
116
+ }
117
+ // A credential-named leaf goes whatever its type — but a placeholder or an
118
+ // empty string is not a credential, and blanking it would hide that the
119
+ // field is unfilled, which is exactly what a reader is checking for.
120
+ if (keyIsCredential && !isPlaceholder(node)) {
121
+ redactedPaths.push(at);
122
+ return REDACTION;
123
+ }
124
+ return node;
125
+ };
126
+ return { value: walk(value, path, false), redactedPaths };
127
+ }
87
128
  /**
88
129
  * Throw if a connector's fields carry anything that looks like a real
89
130
  * credential. Safe to call with any tool's fields — it is a no-op when there is
@@ -1 +1 @@
1
- {"version":3,"file":"credentials.js","sourceRoot":"","sources":["../../src/tools/credentials.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,mFAAmF;AACnF,MAAM,cAAc,GAClB,oGAAoG,CAAC;AAEvG;;;;;;GAMG;AACH,MAAM,cAAc,GAClB,2EAA2E,CAAC;AAE9E,uEAAuE;AACvE,MAAM,eAAe,GAAuB;IAC1C,CAAC,mBAAmB,EAAE,oCAAoC,CAAC;IAC3D,CAAC,mBAAmB,EAAE,sBAAsB,CAAC;IAC7C,CAAC,cAAc,EAAE,gCAAgC,CAAC;IAClD,CAAC,aAAa,EAAE,kCAAkC,CAAC;IACnD,CAAC,gBAAgB,EAAE,2BAA2B,CAAC;IAC/C,CAAC,mBAAmB,EAAE,uCAAuC,CAAC;IAC9D,CAAC,KAAK,EAAE,gEAAgE,CAAC;IACzE,CAAC,oBAAoB,EAAE,2BAA2B,CAAC;CACpD,CAAC;AAEF,oEAAoE;AACpE,MAAM,UAAU,aAAa,CAAC,KAAc;IAC1C,IAAI,KAAK,KAAK,EAAE,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS;QAAE,OAAO,IA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B,CAAC,MAA+B;IAC1E,MAAM,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;IACrC,IAAI,UAAU,KAAK,SAAS,IAAI,UAAU,KAAK,IAAI;QAAE,OAAO;IAE5D,MAAM,QAAQ,GAAG,wBAAwB,CAAC,UAAU,CAAC,CAAC;IACtD,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO;IAElC,MAAM,IAAI,KAAK,CACb,4EAA4E;QAC1E,uEAAuE;QACvE,kDAAkD,QAAQ;aACvD,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC;aACtB,IAAI,CAAC,IAAI,CAAC,EAAE,CAClB,CAAC;AACJ,CAAC"}
@@ -16,6 +16,23 @@ export declare function registerConnectorTools(server: McpServer, client: Axonit
16
16
  /** Keep the envelope, project the rows down to identity. */
17
17
  export declare function projectLinkRows(response: Record<string, unknown>, rowsKey: string): Record<string, unknown>;
18
18
  export declare function registerAttachTools(server: McpServer, client: AxonityClient): void;
19
+ /**
20
+ * "What breaks if I change this" — the reverse look-up, for both halves of the
21
+ * catalogue (axonity-flow#845 S5 and #961 S8).
22
+ *
23
+ * A shared library item is edited on the assumption that someone knows what
24
+ * uses it. Three items could answer that agent-first; the rest of the catalogue
25
+ * could not answer it at all, and there a broken reference stops a RUN rather
26
+ * than merely thinning a prompt. The only way to find out was to validate every
27
+ * workflow in the tenant and see where it went wrong.
28
+ *
29
+ * It was never queryable because these are not rows in a join table: they are
30
+ * keys inside a JSON document, and per entity in more than one place — an agent
31
+ * is a step OWNER and the `ownerAgentId` of a subprocess step; a tool appears in
32
+ * a step contract, in a plan activity, and on an automation step's config. The
33
+ * backend answers through one reader for exactly that reason.
34
+ */
35
+ export declare function registerDependencyTools(server: McpServer, client: AxonityClient): void;
19
36
  /**
20
37
  * Small standalone tools that don't fit any of the other groupings: the
21
38
  * system-tools catalog (read-only — there is no grant/revoke route; enabling