agent-contracts 0.7.1 → 0.9.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 +22 -4
- package/dist/cli.js +561 -46
- package/dist/cli.js.map +1 -1
- package/dist/index.d.ts +131 -1
- package/dist/index.js +562 -46
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -204,15 +204,30 @@ An **Artifact** defines the objects that move through the workflow:
|
|
|
204
204
|
* required validations
|
|
205
205
|
* visibility
|
|
206
206
|
|
|
207
|
+
### Tool
|
|
208
|
+
|
|
209
|
+
A **Tool** defines an invokable CLI/MCP tool:
|
|
210
|
+
|
|
211
|
+
* kind (cli, mcp, etc.)
|
|
212
|
+
* input/output artifacts
|
|
213
|
+
* invokable_by (which agents can use it)
|
|
214
|
+
* `commands` — structured list of sub-commands with `category`, `reads`, `writes`, and `purpose`
|
|
215
|
+
|
|
207
216
|
### Workflow
|
|
208
217
|
|
|
209
218
|
A **Workflow** defines a phase-level execution sequence:
|
|
210
219
|
|
|
211
|
-
* description
|
|
212
|
-
*
|
|
213
|
-
* trigger
|
|
220
|
+
* `description` — human-readable summary
|
|
221
|
+
* `entry_conditions`
|
|
222
|
+
* `trigger`
|
|
223
|
+
* `external_participants` — actors/participants outside the agent system (e.g., User, external advisory)
|
|
214
224
|
* ordered steps (handoff, validation, decision)
|
|
215
225
|
|
|
226
|
+
Workflow steps support additional properties:
|
|
227
|
+
|
|
228
|
+
* `group` — consecutive steps with the same group are rendered as `par` (parallel) blocks in sequence diagrams
|
|
229
|
+
* `retry` (handoff steps only) — defines a conditional retry loop with `condition`, `fix_task`, and optional `revalidate_task`
|
|
230
|
+
|
|
216
231
|
### Handoff
|
|
217
232
|
|
|
218
233
|
A **Handoff** is a runtime delegation instance.
|
|
@@ -761,7 +776,8 @@ Templates can use these built-in helpers:
|
|
|
761
776
|
| `or` | `{{#if (or a b)}}` | Boolean OR (variadic) |
|
|
762
777
|
| `and` | `{{#if (and a b)}}` | Boolean AND (variadic) |
|
|
763
778
|
| `gt` / `gte` / `lt` | `{{#if (gt a b)}}` | Numeric comparisons |
|
|
764
|
-
| `sequenceDiagram` | `{{{sequenceDiagram}}}` | Generate Mermaid sequence diagram
|
|
779
|
+
| `sequenceDiagram` | `{{{sequenceDiagram}}}` or `{{{sequenceDiagram @key ../dsl}}}` | Generate Mermaid sequence diagram. Supports `external_participants`, `group` (par blocks), `retry` (opt blocks), and read-only agent separation into Audit box |
|
|
780
|
+
| `overviewFlowchart` | `{{{overviewFlowchart dsl}}}` | Generate Mermaid graph showing phases → agents/tools/artifacts relationships (system context) |
|
|
765
781
|
|
|
766
782
|
---
|
|
767
783
|
|
|
@@ -800,6 +816,8 @@ Checks:
|
|
|
800
816
|
* merge integrity
|
|
801
817
|
* read-only write violations
|
|
802
818
|
* prerequisite readability
|
|
819
|
+
* artifact ownership — `produces_artifact`/`reads_artifact` in execution steps vs. artifact producers/editors/consumers
|
|
820
|
+
* tool commands — `commands[].reads`/`commands[].writes` reference valid artifacts and align with `output_artifacts`
|
|
803
821
|
* naming/style issues through Spectral rules
|
|
804
822
|
|
|
805
823
|
---
|