agent-contracts 0.17.0 → 0.18.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 +1 -1
- package/dist/cli.js +16 -7
- package/dist/cli.js.map +1 -1
- package/dist/index.d.ts +106 -19
- package/dist/index.js +18 -7
- package/dist/index.js.map +1 -1
- package/package.json +2 -1
package/cli-contract.yaml
CHANGED
package/dist/cli.js
CHANGED
|
@@ -44940,6 +44940,11 @@ import { parse as parseYaml3 } from "yaml";
|
|
|
44940
44940
|
|
|
44941
44941
|
// src/schema/agent.ts
|
|
44942
44942
|
import { z } from "zod";
|
|
44943
|
+
var SectionSchema = z.object({
|
|
44944
|
+
title: z.string(),
|
|
44945
|
+
content: z.string().optional(),
|
|
44946
|
+
list: z.enum(["agents", "workflow", "validations", "guardrails"]).optional()
|
|
44947
|
+
}).passthrough();
|
|
44943
44948
|
var RuleSchema = z.object({
|
|
44944
44949
|
id: z.string(),
|
|
44945
44950
|
name: z.string().optional(),
|
|
@@ -44978,12 +44983,7 @@ var AgentSchema = z.object({
|
|
|
44978
44983
|
rules: z.array(RuleSchema).optional(),
|
|
44979
44984
|
anti_patterns: z.array(z.string()).optional(),
|
|
44980
44985
|
escalation_criteria: z.array(EscalationCriterionSchema).optional(),
|
|
44981
|
-
sections: z.array(
|
|
44982
|
-
z.object({
|
|
44983
|
-
title: z.string(),
|
|
44984
|
-
content: z.string()
|
|
44985
|
-
})
|
|
44986
|
-
).optional(),
|
|
44986
|
+
sections: z.array(SectionSchema).optional(),
|
|
44987
44987
|
prerequisites: z.array(PrerequisiteSchema).optional(),
|
|
44988
44988
|
guardrails: z.array(z.string()).optional()
|
|
44989
44989
|
}).passthrough();
|
|
@@ -45177,10 +45177,13 @@ var PolicySchema = z7.object({
|
|
|
45177
45177
|
import { z as z8 } from "zod";
|
|
45178
45178
|
var VersionLiteralSchema = z8.literal(1);
|
|
45179
45179
|
var ExtendsSchema = z8.string().optional();
|
|
45180
|
+
var ContextLoadingSchema = z8.record(z8.string(), z8.array(z8.string())).optional();
|
|
45180
45181
|
var SystemSchema = z8.object({
|
|
45181
45182
|
id: z8.string(),
|
|
45182
45183
|
name: z8.string(),
|
|
45183
|
-
default_workflow_order: z8.array(z8.string())
|
|
45184
|
+
default_workflow_order: z8.array(z8.string()),
|
|
45185
|
+
sections: z8.array(SectionSchema).optional(),
|
|
45186
|
+
context_loading: ContextLoadingSchema
|
|
45184
45187
|
}).passthrough();
|
|
45185
45188
|
|
|
45186
45189
|
// src/schema/task.ts
|
|
@@ -45214,6 +45217,7 @@ var TaskSchema = z9.object({
|
|
|
45214
45217
|
rules: z9.array(RuleSchema).optional(),
|
|
45215
45218
|
anti_patterns: z9.array(z9.string()).optional(),
|
|
45216
45219
|
escalation_criteria: z9.array(EscalationCriterionSchema).optional(),
|
|
45220
|
+
sections: z9.array(SectionSchema).optional(),
|
|
45217
45221
|
validations: z9.array(z9.string()).default([]),
|
|
45218
45222
|
guardrails: z9.array(z9.string()).optional()
|
|
45219
45223
|
}).passthrough();
|
|
@@ -45351,6 +45355,7 @@ var WorkflowSchema = z14.object({
|
|
|
45351
45355
|
entry_conditions: z14.array(z14.string()).default([]),
|
|
45352
45356
|
trigger: z14.string().optional(),
|
|
45353
45357
|
steps: z14.array(WorkflowStepSchema),
|
|
45358
|
+
sections: z14.array(SectionSchema).optional(),
|
|
45354
45359
|
external_participants: z14.array(ExternalParticipantSchema).default([])
|
|
45355
45360
|
}).passthrough();
|
|
45356
45361
|
|
|
@@ -50421,6 +50426,10 @@ Handlebars.registerHelper("or", (...args) => {
|
|
|
50421
50426
|
const _options = args.pop();
|
|
50422
50427
|
return args.some((a3) => !!a3);
|
|
50423
50428
|
});
|
|
50429
|
+
Handlebars.registerHelper("coalesce", (...args) => {
|
|
50430
|
+
const _options = args.pop();
|
|
50431
|
+
return args.find((a3) => a3 != null && a3 !== false && a3 !== "");
|
|
50432
|
+
});
|
|
50424
50433
|
Handlebars.registerHelper("and", (...args) => {
|
|
50425
50434
|
const _options = args.pop();
|
|
50426
50435
|
return args.every((a3) => !!a3);
|