agent-contracts 0.19.4 → 0.20.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/cli-contract.yaml +15 -1
- package/dist/cli.js +25 -6
- package/dist/cli.js.map +1 -1
- package/dist/index.js +25 -6
- package/dist/index.js.map +1 -1
- package/docs/cli-reference.md +58 -16
- package/dsl_base/agent-contracts.yaml +18 -0
- package/dsl_base/agent-runtime.config.yaml +2 -0
- package/dsl_base/agents/dsl-auditor.yaml +176 -0
- package/dsl_base/agents/dsl-designer.yaml +433 -0
- package/dsl_base/artifacts.yaml +73 -0
- package/dsl_base/audit-test.config.yaml +2 -0
- package/dsl_base/components.yaml +110 -0
- package/dsl_base/guardrail-policies.yaml +18 -0
- package/dsl_base/guardrails.yaml +46 -0
- package/dsl_base/handoff-types.yaml +182 -0
- package/dsl_base/tasks.yaml +269 -0
- package/dsl_base/tools.yaml +50 -0
- package/dsl_base/validations.yaml +66 -0
- package/dsl_base/workflow.yaml +91 -0
- package/package.json +3 -2
package/cli-contract.yaml
CHANGED
|
@@ -3,7 +3,7 @@ cliContracts: 0.1.0
|
|
|
3
3
|
|
|
4
4
|
info:
|
|
5
5
|
title: agent-contracts CLI
|
|
6
|
-
version: 0.
|
|
6
|
+
version: 0.20.0
|
|
7
7
|
description: >-
|
|
8
8
|
Declarative YAML DSL toolkit for defining, validating, and rendering
|
|
9
9
|
multi-agent development workflows. Provides static validation,
|
|
@@ -117,6 +117,8 @@ commandSets:
|
|
|
117
117
|
requiresConfirmation: false
|
|
118
118
|
idempotent: true
|
|
119
119
|
sideEffects: []
|
|
120
|
+
expectedDurationMs: 3000
|
|
121
|
+
retryableExitCodes: []
|
|
120
122
|
|
|
121
123
|
# ── validate ──────────────────────────────────────
|
|
122
124
|
validate:
|
|
@@ -206,6 +208,8 @@ commandSets:
|
|
|
206
208
|
requiresConfirmation: false
|
|
207
209
|
idempotent: true
|
|
208
210
|
sideEffects: []
|
|
211
|
+
expectedDurationMs: 3000
|
|
212
|
+
retryableExitCodes: []
|
|
209
213
|
|
|
210
214
|
# ── lint ──────────────────────────────────────────
|
|
211
215
|
lint:
|
|
@@ -294,6 +298,8 @@ commandSets:
|
|
|
294
298
|
requiresConfirmation: false
|
|
295
299
|
idempotent: true
|
|
296
300
|
sideEffects: []
|
|
301
|
+
expectedDurationMs: 3000
|
|
302
|
+
retryableExitCodes: []
|
|
297
303
|
|
|
298
304
|
# ── render ────────────────────────────────────────
|
|
299
305
|
render:
|
|
@@ -369,6 +375,8 @@ commandSets:
|
|
|
369
375
|
recommendedBeforeUse:
|
|
370
376
|
- Ensure agent-contracts.config.yaml exists with render targets.
|
|
371
377
|
- Run validate first to confirm DSL is valid.
|
|
378
|
+
expectedDurationMs: 5000
|
|
379
|
+
retryableExitCodes: []
|
|
372
380
|
|
|
373
381
|
# ── check ─────────────────────────────────────────
|
|
374
382
|
check:
|
|
@@ -449,6 +457,8 @@ commandSets:
|
|
|
449
457
|
sideEffects: []
|
|
450
458
|
recommendedBeforeUse:
|
|
451
459
|
- Ensure agent-contracts.config.yaml exists.
|
|
460
|
+
expectedDurationMs: 10000
|
|
461
|
+
retryableExitCodes: []
|
|
452
462
|
|
|
453
463
|
# ── score ─────────────────────────────────────────
|
|
454
464
|
score:
|
|
@@ -535,6 +545,8 @@ commandSets:
|
|
|
535
545
|
requiresConfirmation: false
|
|
536
546
|
idempotent: true
|
|
537
547
|
sideEffects: []
|
|
548
|
+
expectedDurationMs: 5000
|
|
549
|
+
retryableExitCodes: []
|
|
538
550
|
|
|
539
551
|
# ── audit ───────────────────────────────────────────
|
|
540
552
|
audit:
|
|
@@ -832,3 +844,5 @@ commandSets:
|
|
|
832
844
|
recommendedBeforeUse:
|
|
833
845
|
- Ensure agent-contracts.config.yaml exists with binding definitions.
|
|
834
846
|
- Run validate first to confirm DSL is valid.
|
|
847
|
+
expectedDurationMs: 5000
|
|
848
|
+
retryableExitCodes: []
|
package/dist/cli.js
CHANGED
|
@@ -49565,18 +49565,27 @@ async function resolveRefsDeep(data, baseDir, resolving, rootDoc) {
|
|
|
49565
49565
|
}
|
|
49566
49566
|
resolving.add(refValue);
|
|
49567
49567
|
const target = resolveJsonPointer(rootDoc, refValue);
|
|
49568
|
-
const
|
|
49568
|
+
const resolved = await resolveRefsDeep(
|
|
49569
49569
|
deepClone(target),
|
|
49570
49570
|
baseDir,
|
|
49571
49571
|
resolving,
|
|
49572
49572
|
rootDoc
|
|
49573
49573
|
);
|
|
49574
49574
|
resolving.delete(refValue);
|
|
49575
|
-
return
|
|
49575
|
+
return resolved;
|
|
49576
49576
|
}
|
|
49577
|
-
const
|
|
49577
|
+
const hashIdx = refValue.indexOf("#");
|
|
49578
|
+
const filePart = hashIdx >= 0 ? refValue.slice(0, hashIdx) : refValue;
|
|
49579
|
+
const fragment = hashIdx >= 0 ? refValue.slice(hashIdx) : null;
|
|
49580
|
+
const refTarget = resolve2(baseDir, filePart);
|
|
49578
49581
|
const s2 = await fsStat(refTarget).catch(() => null);
|
|
49579
49582
|
if (s2?.isDirectory()) {
|
|
49583
|
+
if (fragment) {
|
|
49584
|
+
throw new DslLoadError(
|
|
49585
|
+
`Cannot use JSON Pointer fragment with directory $ref: ${refValue}`,
|
|
49586
|
+
refTarget
|
|
49587
|
+
);
|
|
49588
|
+
}
|
|
49580
49589
|
if (resolving.has(refTarget)) {
|
|
49581
49590
|
throw new DslLoadError(
|
|
49582
49591
|
`Circular $ref detected: ${refTarget}`,
|
|
@@ -49599,14 +49608,24 @@ async function resolveRefsDeep(data, baseDir, resolving, rootDoc) {
|
|
|
49599
49608
|
}
|
|
49600
49609
|
resolving.add(refTarget);
|
|
49601
49610
|
const content = await readYaml(refTarget);
|
|
49602
|
-
const
|
|
49611
|
+
const fileRoot = fragment ? content : rootDoc;
|
|
49612
|
+
let fileData = await resolveRefsDeep(
|
|
49603
49613
|
content,
|
|
49604
49614
|
dirname2(refTarget),
|
|
49605
49615
|
resolving,
|
|
49606
|
-
|
|
49616
|
+
fileRoot
|
|
49607
49617
|
);
|
|
49608
49618
|
resolving.delete(refTarget);
|
|
49609
|
-
|
|
49619
|
+
if (fragment && fragment.startsWith("#/")) {
|
|
49620
|
+
if (!isRecord(fileData)) {
|
|
49621
|
+
throw new DslLoadError(
|
|
49622
|
+
`Cannot resolve fragment "${fragment}" in ${refTarget}: file content is not an object`,
|
|
49623
|
+
refTarget
|
|
49624
|
+
);
|
|
49625
|
+
}
|
|
49626
|
+
fileData = resolveJsonPointer(fileData, fragment);
|
|
49627
|
+
}
|
|
49628
|
+
return fileData;
|
|
49610
49629
|
}
|
|
49611
49630
|
let obj = data;
|
|
49612
49631
|
if (hasRefs(obj)) {
|