agent-contracts 0.10.0 → 0.11.1

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/dist/index.js CHANGED
@@ -158,11 +158,11 @@ function __metadata(metadataKey, metadataValue) {
158
158
  }
159
159
  function __awaiter(thisArg, _arguments, P2, generator) {
160
160
  function adopt(value) {
161
- return value instanceof P2 ? value : new P2(function(resolve5) {
162
- resolve5(value);
161
+ return value instanceof P2 ? value : new P2(function(resolve7) {
162
+ resolve7(value);
163
163
  });
164
164
  }
165
- return new (P2 || (P2 = Promise))(function(resolve5, reject) {
165
+ return new (P2 || (P2 = Promise))(function(resolve7, reject) {
166
166
  function fulfilled(value) {
167
167
  try {
168
168
  step(generator.next(value));
@@ -178,7 +178,7 @@ function __awaiter(thisArg, _arguments, P2, generator) {
178
178
  }
179
179
  }
180
180
  function step(result) {
181
- result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected);
181
+ result.done ? resolve7(result.value) : adopt(result.value).then(fulfilled, rejected);
182
182
  }
183
183
  step((generator = generator.apply(thisArg, _arguments || [])).next());
184
184
  });
@@ -369,14 +369,14 @@ function __asyncValues(o3) {
369
369
  }, i3);
370
370
  function verb(n3) {
371
371
  i3[n3] = o3[n3] && function(v2) {
372
- return new Promise(function(resolve5, reject) {
373
- v2 = o3[n3](v2), settle(resolve5, reject, v2.done, v2.value);
372
+ return new Promise(function(resolve7, reject) {
373
+ v2 = o3[n3](v2), settle(resolve7, reject, v2.done, v2.value);
374
374
  });
375
375
  };
376
376
  }
377
- function settle(resolve5, reject, d2, v2) {
377
+ function settle(resolve7, reject, d2, v2) {
378
378
  Promise.resolve(v2).then(function(v3) {
379
- resolve5({ value: v3, done: d2 });
379
+ resolve7({ value: v3, done: d2 });
380
380
  }, reject);
381
381
  }
382
382
  }
@@ -6292,7 +6292,7 @@ var init_index_es = __esm({
6292
6292
  return { drive: t4.toLowerCase() + ":" };
6293
6293
  }, k2 = function() {
6294
6294
  return { drive: null };
6295
- }, z15 = function() {
6295
+ }, z17 = function() {
6296
6296
  return { drive: null };
6297
6297
  }, B2 = function(t4) {
6298
6298
  return { protocol: null, origin: null, absolute: false, drive: null, ...t4 };
@@ -6333,7 +6333,7 @@ var init_index_es = __esm({
6333
6333
  var t4, n4, r4, e4, o4;
6334
6334
  return t4 = K2, (n4 = rt()) !== c2 && (r4 = et()) !== c2 && (e4 = ut()) !== c2 && (o4 = it()) !== c2 ? (n4 = s2(n4, r4, e4, o4), t4 = n4) : (K2 = t4, t4 = c2), t4 === c2 && (t4 = K2, (n4 = rt()) !== c2 && (r4 = et()) !== c2 && (e4 = (function() {
6335
6335
  var t5;
6336
- return (t5 = x3) !== c2 && (t5 = z15()), t5;
6336
+ return (t5 = x3) !== c2 && (t5 = z17()), t5;
6337
6337
  })()) !== c2 ? (n4 = f2(n4, r4, e4), t4 = n4) : (K2 = t4, t4 = c2)), t4;
6338
6338
  })()) === c2 && (n3 = (function() {
6339
6339
  var n4, r4, e4, o4;
@@ -8022,7 +8022,7 @@ __export(index_es_exports2, {
8022
8022
  resolveExternalRef: () => ye,
8023
8023
  resolveExternalRefWithLocation: () => ge,
8024
8024
  resolveInlineRef: () => B,
8025
- resolveInlineRefWithLocation: () => z13,
8025
+ resolveInlineRefWithLocation: () => z15,
8026
8026
  safeParse: () => de,
8027
8027
  safeStringify: () => ve,
8028
8028
  startsWith: () => be,
@@ -8066,9 +8066,9 @@ function* L(e3, t3, r3) {
8066
8066
  for (const [n3, o3] of t3.entries()) O(e3.value, o3, r3), e3.value = e3.value[o3], A(e3.value) && (j(e3.value), yield [n3, e3.value]);
8067
8067
  }
8068
8068
  function B(e3, t3) {
8069
- return z13(e3, t3).value;
8069
+ return z15(e3, t3).value;
8070
8070
  }
8071
- function z13(e3, t3) {
8071
+ function z15(e3, t3) {
8072
8072
  return (function e4(t4, r3, n3, o3) {
8073
8073
  if (null !== V(r3)) throw new ReferenceError("Cannot resolve external references");
8074
8074
  const i3 = K(r3);
@@ -12936,13 +12936,13 @@ var require_yaml2 = __commonJS({
12936
12936
  function getLocationForJsonPath(result, path) {
12937
12937
  return (0, yaml_1.getLocationForJsonPath)(result, path);
12938
12938
  }
12939
- var parseYaml3 = (input) => (0, yaml_1.parseWithPointers)(input, {
12939
+ var parseYaml4 = (input) => (0, yaml_1.parseWithPointers)(input, {
12940
12940
  ignoreDuplicateKeys: false,
12941
12941
  mergeKeys: true,
12942
12942
  preserveKeyOrder: true,
12943
12943
  attachComments: false
12944
12944
  });
12945
- exports.parseYaml = parseYaml3;
12945
+ exports.parseYaml = parseYaml4;
12946
12946
  exports.Yaml = {
12947
12947
  parse: exports.parseYaml,
12948
12948
  getLocationForJsonPath,
@@ -13032,11 +13032,11 @@ function __metadata2(metadataKey, metadataValue) {
13032
13032
  }
13033
13033
  function __awaiter2(thisArg, _arguments, P2, generator) {
13034
13034
  function adopt(value) {
13035
- return value instanceof P2 ? value : new P2(function(resolve5) {
13036
- resolve5(value);
13035
+ return value instanceof P2 ? value : new P2(function(resolve7) {
13036
+ resolve7(value);
13037
13037
  });
13038
13038
  }
13039
- return new (P2 || (P2 = Promise))(function(resolve5, reject) {
13039
+ return new (P2 || (P2 = Promise))(function(resolve7, reject) {
13040
13040
  function fulfilled(value) {
13041
13041
  try {
13042
13042
  step(generator.next(value));
@@ -13052,7 +13052,7 @@ function __awaiter2(thisArg, _arguments, P2, generator) {
13052
13052
  }
13053
13053
  }
13054
13054
  function step(result) {
13055
- result.done ? resolve5(result.value) : adopt(result.value).then(fulfilled, rejected);
13055
+ result.done ? resolve7(result.value) : adopt(result.value).then(fulfilled, rejected);
13056
13056
  }
13057
13057
  step((generator = generator.apply(thisArg, _arguments || [])).next());
13058
13058
  });
@@ -13230,14 +13230,14 @@ function __asyncValues2(o3) {
13230
13230
  }, i3);
13231
13231
  function verb(n3) {
13232
13232
  i3[n3] = o3[n3] && function(v2) {
13233
- return new Promise(function(resolve5, reject) {
13234
- v2 = o3[n3](v2), settle(resolve5, reject, v2.done, v2.value);
13233
+ return new Promise(function(resolve7, reject) {
13234
+ v2 = o3[n3](v2), settle(resolve7, reject, v2.done, v2.value);
13235
13235
  });
13236
13236
  };
13237
13237
  }
13238
- function settle(resolve5, reject, d2, v2) {
13238
+ function settle(resolve7, reject, d2, v2) {
13239
13239
  Promise.resolve(v2).then(function(v3) {
13240
- resolve5({ value: v3, done: d2 });
13240
+ resolve7({ value: v3, done: d2 });
13241
13241
  }, reject);
13242
13242
  }
13243
13243
  }
@@ -15151,7 +15151,7 @@ function consumeBody() {
15151
15151
  let accum = [];
15152
15152
  let accumBytes = 0;
15153
15153
  let abort = false;
15154
- return new Body.Promise(function(resolve5, reject) {
15154
+ return new Body.Promise(function(resolve7, reject) {
15155
15155
  let resTimeout;
15156
15156
  if (_this4.timeout) {
15157
15157
  resTimeout = setTimeout(function() {
@@ -15185,7 +15185,7 @@ function consumeBody() {
15185
15185
  }
15186
15186
  clearTimeout(resTimeout);
15187
15187
  try {
15188
- resolve5(Buffer.concat(accum, accumBytes));
15188
+ resolve7(Buffer.concat(accum, accumBytes));
15189
15189
  } catch (err) {
15190
15190
  reject(new FetchError(`Could not create Buffer from response body for ${_this4.url}: ${err.message}`, "system", err));
15191
15191
  }
@@ -15448,7 +15448,7 @@ function fetch(url, opts) {
15448
15448
  throw new Error("native promise missing, set fetch.Promise to your favorite alternative");
15449
15449
  }
15450
15450
  Body.Promise = fetch.Promise;
15451
- return new fetch.Promise(function(resolve5, reject) {
15451
+ return new fetch.Promise(function(resolve7, reject) {
15452
15452
  const request = new Request(url, opts);
15453
15453
  const options = getNodeRequestOptions(request);
15454
15454
  const send = (options.protocol === "https:" ? https : http).request;
@@ -15581,7 +15581,7 @@ function fetch(url, opts) {
15581
15581
  requestOpts.body = void 0;
15582
15582
  requestOpts.headers.delete("content-length");
15583
15583
  }
15584
- resolve5(fetch(new Request(locationURL, requestOpts)));
15584
+ resolve7(fetch(new Request(locationURL, requestOpts)));
15585
15585
  finalize();
15586
15586
  return;
15587
15587
  }
@@ -15602,7 +15602,7 @@ function fetch(url, opts) {
15602
15602
  const codings = headers.get("Content-Encoding");
15603
15603
  if (!request.compress || request.method === "HEAD" || codings === null || res.statusCode === 204 || res.statusCode === 304) {
15604
15604
  response = new Response(body, response_options);
15605
- resolve5(response);
15605
+ resolve7(response);
15606
15606
  return;
15607
15607
  }
15608
15608
  const zlibOptions = {
@@ -15612,7 +15612,7 @@ function fetch(url, opts) {
15612
15612
  if (codings == "gzip" || codings == "x-gzip") {
15613
15613
  body = body.pipe(zlib.createGunzip(zlibOptions));
15614
15614
  response = new Response(body, response_options);
15615
- resolve5(response);
15615
+ resolve7(response);
15616
15616
  return;
15617
15617
  }
15618
15618
  if (codings == "deflate" || codings == "x-deflate") {
@@ -15624,12 +15624,12 @@ function fetch(url, opts) {
15624
15624
  body = body.pipe(zlib.createInflateRaw());
15625
15625
  }
15626
15626
  response = new Response(body, response_options);
15627
- resolve5(response);
15627
+ resolve7(response);
15628
15628
  });
15629
15629
  raw.on("end", function() {
15630
15630
  if (!response) {
15631
15631
  response = new Response(body, response_options);
15632
- resolve5(response);
15632
+ resolve7(response);
15633
15633
  }
15634
15634
  });
15635
15635
  return;
@@ -15637,11 +15637,11 @@ function fetch(url, opts) {
15637
15637
  if (codings == "br" && typeof zlib.createBrotliDecompress === "function") {
15638
15638
  body = body.pipe(zlib.createBrotliDecompress());
15639
15639
  response = new Response(body, response_options);
15640
- resolve5(response);
15640
+ resolve7(response);
15641
15641
  return;
15642
15642
  }
15643
15643
  response = new Response(body, response_options);
15644
- resolve5(response);
15644
+ resolve7(response);
15645
15645
  });
15646
15646
  writeToStream(req, request);
15647
15647
  });
@@ -16354,13 +16354,13 @@ var require_file = __commonJS({
16354
16354
  Object.defineProperty(exports, "__esModule", { value: true });
16355
16355
  var fs_1 = __require("fs");
16356
16356
  function resolveFile(ref) {
16357
- return new Promise((resolve5, reject) => {
16357
+ return new Promise((resolve7, reject) => {
16358
16358
  const path = ref.href();
16359
16359
  fs_1.readFile(path, "utf8", (err, data) => {
16360
16360
  if (err) {
16361
16361
  reject(err);
16362
16362
  } else {
16363
- resolve5(data);
16363
+ resolve7(data);
16364
16364
  }
16365
16365
  });
16366
16366
  });
@@ -16898,7 +16898,7 @@ var require_immer_cjs_production_min = __commonJS({
16898
16898
  var t4 = n4[H2];
16899
16899
  return (t4 ? s2(t4) : n4)[r4];
16900
16900
  }
16901
- function z15(n4, r4) {
16901
+ function z17(n4, r4) {
16902
16902
  if (r4 in n4) for (var t4 = Object.getPrototypeOf(n4); t4; ) {
16903
16903
  var e4 = Object.getOwnPropertyDescriptor(t4, r4);
16904
16904
  if (e4) return e4;
@@ -17291,7 +17291,7 @@ var require_immer_cjs_production_min = __commonJS({
17291
17291
  if (r4 === H2) return n4;
17292
17292
  var e4 = s2(n4);
17293
17293
  if (!u2(e4, r4)) return (function(n5, r5, t4) {
17294
- var e5, i5 = z15(r5, t4);
17294
+ var e5, i5 = z17(r5, t4);
17295
17295
  return i5 ? "value" in i5 ? i5.value : null === (e5 = i5.get) || void 0 === e5 ? void 0 : e5.call(n5.k) : void 0;
17296
17296
  })(n4, e4, r4);
17297
17297
  var i4 = e4[r4];
@@ -17301,7 +17301,7 @@ var require_immer_cjs_production_min = __commonJS({
17301
17301
  }, ownKeys: function(n4) {
17302
17302
  return Reflect.ownKeys(s2(n4));
17303
17303
  }, set: function(n4, r4, t4) {
17304
- var e4 = z15(s2(n4), r4);
17304
+ var e4 = z17(s2(n4), r4);
17305
17305
  if (null == e4 ? void 0 : e4.set) return e4.set.call(n4.k, t4), true;
17306
17306
  if (!n4.g) {
17307
17307
  var i4 = A2(s2(n4), r4), o4 = null == i4 ? void 0 : i4[H2];
@@ -23932,7 +23932,7 @@ var require_reader = __commonJS({
23932
23932
  var lodash_1 = require_lodash();
23933
23933
  var fetch_1 = (0, tslib_1.__importDefault)(require_fetch());
23934
23934
  var printError_1 = require_printError();
23935
- async function readFile4(name, opts) {
23935
+ async function readFile6(name, opts) {
23936
23936
  if ((0, path_1.isURL)(name)) {
23937
23937
  let response;
23938
23938
  let timeout = null;
@@ -23963,12 +23963,12 @@ var require_reader = __commonJS({
23963
23963
  }
23964
23964
  } else {
23965
23965
  try {
23966
- return await new Promise((resolve5, reject) => {
23966
+ return await new Promise((resolve7, reject) => {
23967
23967
  fs.readFile(name, opts.encoding, (err, data) => {
23968
23968
  if (err !== null) {
23969
23969
  reject(err);
23970
23970
  } else {
23971
- resolve5(data);
23971
+ resolve7(data);
23972
23972
  }
23973
23973
  });
23974
23974
  });
@@ -23977,10 +23977,10 @@ var require_reader = __commonJS({
23977
23977
  }
23978
23978
  }
23979
23979
  }
23980
- exports.readFile = readFile4;
23980
+ exports.readFile = readFile6;
23981
23981
  async function readParsable(name, opts) {
23982
23982
  try {
23983
- return await readFile4(name, opts);
23983
+ return await readFile6(name, opts);
23984
23984
  } catch (ex) {
23985
23985
  throw new Error(`Could not parse ${name}: ${(0, printError_1.printError)(ex)}`);
23986
23986
  }
@@ -35640,11 +35640,11 @@ var require_brace_expansion = __commonJS({
35640
35640
  if (pad) {
35641
35641
  var need = width - c2.length;
35642
35642
  if (need > 0) {
35643
- var z15 = new Array(need + 1).join("0");
35643
+ var z17 = new Array(need + 1).join("0");
35644
35644
  if (i3 < 0)
35645
- c2 = "-" + z15 + c2.slice(1);
35645
+ c2 = "-" + z17 + c2.slice(1);
35646
35646
  else
35647
- c2 = z15 + c2;
35647
+ c2 = z17 + c2;
35648
35648
  }
35649
35649
  }
35650
35650
  }
@@ -40853,14 +40853,14 @@ var require_AsyncFromSyncIteratorContinuation = __commonJS({
40853
40853
  if (!$Promise) {
40854
40854
  throw new $SyntaxError("This environment does not support Promises.");
40855
40855
  }
40856
- return new $Promise(function(resolve5) {
40856
+ return new $Promise(function(resolve7) {
40857
40857
  var done = IteratorComplete(result);
40858
40858
  var value = IteratorValue(result);
40859
40859
  var valueWrapper = PromiseResolve($Promise, value);
40860
40860
  var onFulfilled = function(value2) {
40861
40861
  return CreateIteratorResultObject(value2, done);
40862
40862
  };
40863
- resolve5($then(valueWrapper, onFulfilled));
40863
+ resolve7($then(valueWrapper, onFulfilled));
40864
40864
  });
40865
40865
  };
40866
40866
  }
@@ -41408,7 +41408,7 @@ var require_CreateAsyncFromSyncIterator = __commonJS({
41408
41408
  var O2 = this;
41409
41409
  SLOT.assert(O2, "[[SyncIteratorRecord]]");
41410
41410
  var argsLength = arguments.length;
41411
- return new $Promise(function(resolve5) {
41411
+ return new $Promise(function(resolve7) {
41412
41412
  var syncIteratorRecord = SLOT.get(O2, "[[SyncIteratorRecord]]");
41413
41413
  var result;
41414
41414
  if (argsLength > 0) {
@@ -41416,7 +41416,7 @@ var require_CreateAsyncFromSyncIterator = __commonJS({
41416
41416
  } else {
41417
41417
  result = IteratorNext(syncIteratorRecord);
41418
41418
  }
41419
- resolve5(AsyncFromSyncIteratorContinuation(result));
41419
+ resolve7(AsyncFromSyncIteratorContinuation(result));
41420
41420
  });
41421
41421
  },
41422
41422
  "return": function() {
@@ -41427,12 +41427,12 @@ var require_CreateAsyncFromSyncIterator = __commonJS({
41427
41427
  SLOT.assert(O2, "[[SyncIteratorRecord]]");
41428
41428
  var valueIsPresent = arguments.length > 0;
41429
41429
  var value = valueIsPresent ? arguments[0] : void 0;
41430
- return new $Promise(function(resolve5, reject) {
41430
+ return new $Promise(function(resolve7, reject) {
41431
41431
  var syncIterator = SLOT.get(O2, "[[SyncIteratorRecord]]")["[[Iterator]]"];
41432
41432
  var iteratorReturn = GetMethod(syncIterator, "return");
41433
41433
  if (typeof iteratorReturn === "undefined") {
41434
41434
  var iterResult = CreateIteratorResultObject(value, true);
41435
- Call(resolve5, void 0, [iterResult]);
41435
+ Call(resolve7, void 0, [iterResult]);
41436
41436
  return;
41437
41437
  }
41438
41438
  var result;
@@ -41445,7 +41445,7 @@ var require_CreateAsyncFromSyncIterator = __commonJS({
41445
41445
  Call(reject, void 0, [new $TypeError("Iterator `return` method returned a non-object value.")]);
41446
41446
  return;
41447
41447
  }
41448
- resolve5(AsyncFromSyncIteratorContinuation(result));
41448
+ resolve7(AsyncFromSyncIteratorContinuation(result));
41449
41449
  });
41450
41450
  },
41451
41451
  "throw": function() {
@@ -41456,7 +41456,7 @@ var require_CreateAsyncFromSyncIterator = __commonJS({
41456
41456
  SLOT.assert(O2, "[[SyncIteratorRecord]]");
41457
41457
  var valueIsPresent = arguments.length > 0;
41458
41458
  var value = valueIsPresent ? arguments[0] : void 0;
41459
- return new $Promise(function(resolve5, reject) {
41459
+ return new $Promise(function(resolve7, reject) {
41460
41460
  var syncIterator = SLOT.get(O2, "[[SyncIteratorRecord]]")["[[Iterator]]"];
41461
41461
  var throwMethod = GetMethod(syncIterator, "throw");
41462
41462
  if (typeof throwMethod === "undefined") {
@@ -41473,7 +41473,7 @@ var require_CreateAsyncFromSyncIterator = __commonJS({
41473
41473
  Call(reject, void 0, [new $TypeError("Iterator `throw` method returned a non-object value.")]);
41474
41474
  return;
41475
41475
  }
41476
- resolve5(AsyncFromSyncIteratorContinuation(
41476
+ resolve7(AsyncFromSyncIteratorContinuation(
41477
41477
  result
41478
41478
  /* , promiseCapability */
41479
41479
  ));
@@ -49168,7 +49168,7 @@ var require_dist10 = __commonJS({
49168
49168
  var getSiblings = (parent) => (node) => getChildren(parent).filter(not(eq(node)));
49169
49169
  var concatAll = (
49170
49170
  /*::<T>*/
49171
- (xs) => (ys) => ys.reduce((zs, z15) => zs.concat(z15), xs)
49171
+ (xs) => (ys) => ys.reduce((zs, z17) => zs.concat(z17), xs)
49172
49172
  );
49173
49173
  function getLastSegment(instancePath) {
49174
49174
  const index4 = instancePath.lastIndexOf("/");
@@ -50480,184 +50480,273 @@ var ArtifactSchema = z2.object({
50480
50480
  visibility: z2.string().optional()
50481
50481
  }).passthrough();
50482
50482
 
50483
+ // src/schema/binding.ts
50484
+ import { z as z3 } from "zod";
50485
+ var CommandRegexMatcherSchema = z3.object({
50486
+ type: z3.literal("command_regex"),
50487
+ pattern: z3.string()
50488
+ });
50489
+ var ContentRegexMatcherSchema = z3.object({
50490
+ type: z3.literal("content_regex"),
50491
+ pattern: z3.string(),
50492
+ file_glob: z3.string().optional(),
50493
+ exclude_glob: z3.string().optional()
50494
+ });
50495
+ var FileGlobMatcherSchema = z3.object({
50496
+ type: z3.literal("file_glob"),
50497
+ pattern: z3.string()
50498
+ });
50499
+ var MatcherSchema = z3.discriminatedUnion("type", [
50500
+ CommandRegexMatcherSchema,
50501
+ ContentRegexMatcherSchema,
50502
+ FileGlobMatcherSchema
50503
+ ]);
50504
+ var CheckSchema = z3.object({
50505
+ matcher: MatcherSchema.optional(),
50506
+ script: z3.string().optional(),
50507
+ message: z3.string().optional()
50508
+ }).passthrough();
50509
+ var BindingOutputSchema = z3.object({
50510
+ target: z3.string(),
50511
+ template: z3.string().optional(),
50512
+ inline_template: z3.string().optional(),
50513
+ mode: z3.enum(["write", "patch"]).default("write"),
50514
+ group_by: z3.string().optional(),
50515
+ executable: z3.boolean().optional()
50516
+ }).passthrough().refine(
50517
+ (data) => !(data.template && data.inline_template),
50518
+ { message: "template and inline_template are mutually exclusive" }
50519
+ );
50520
+ var ReportingSchema = z3.object({
50521
+ commands: z3.record(z3.string(), z3.string()),
50522
+ fail_open: z3.boolean().default(true),
50523
+ timeout_ms: z3.number().default(5e3)
50524
+ }).passthrough();
50525
+ var GuardrailImplSchema = z3.object({
50526
+ checks: z3.array(CheckSchema)
50527
+ });
50528
+ var SoftwareBindingSchema = z3.object({
50529
+ software: z3.string(),
50530
+ version: z3.literal(1),
50531
+ extends: z3.string().optional(),
50532
+ guardrail_impl: z3.record(z3.string(), GuardrailImplSchema).optional(),
50533
+ outputs: z3.record(z3.string(), BindingOutputSchema).optional(),
50534
+ reporting: ReportingSchema.optional()
50535
+ }).passthrough();
50536
+
50483
50537
  // src/schema/dsl.ts
50484
- import { z as z10 } from "zod";
50538
+ import { z as z12 } from "zod";
50485
50539
 
50486
50540
  // src/schema/handoff-type.ts
50487
- import { z as z3 } from "zod";
50488
- var HandoffTypeSchema = z3.object({
50489
- version: z3.number(),
50490
- description: z3.string().optional(),
50491
- schema: z3.record(z3.string(), z3.any()),
50492
- example: z3.record(z3.string(), z3.any()).optional()
50541
+ import { z as z4 } from "zod";
50542
+ var HandoffTypeSchema = z4.object({
50543
+ version: z4.number(),
50544
+ description: z4.string().optional(),
50545
+ schema: z4.record(z4.string(), z4.any()),
50546
+ example: z4.record(z4.string(), z4.any()).optional()
50547
+ }).passthrough();
50548
+
50549
+ // src/schema/guardrail.ts
50550
+ import { z as z5 } from "zod";
50551
+ var GuardrailScopeSchema = z5.object({
50552
+ agents: z5.array(z5.string()).optional(),
50553
+ tasks: z5.array(z5.string()).optional(),
50554
+ tools: z5.array(z5.string()).optional(),
50555
+ artifacts: z5.array(z5.string()).optional(),
50556
+ workflows: z5.array(z5.string()).optional()
50557
+ }).passthrough();
50558
+ var GuardrailSchema = z5.object({
50559
+ description: z5.string(),
50560
+ scope: GuardrailScopeSchema,
50561
+ rationale: z5.string().optional(),
50562
+ tags: z5.array(z5.string()).default([]),
50563
+ exemptions: z5.array(z5.string()).optional()
50564
+ }).passthrough();
50565
+ var GuardrailPolicyRuleEscalationSchema = z5.object({
50566
+ target: z5.string(),
50567
+ condition: z5.string().optional()
50568
+ }).passthrough();
50569
+ var GuardrailPolicyRuleSchema = z5.object({
50570
+ guardrail: z5.string(),
50571
+ severity: z5.enum(["critical", "mandatory", "warning", "info"]),
50572
+ action: z5.enum(["block", "warn", "shadow", "info"]),
50573
+ allow_override: z5.boolean().default(false),
50574
+ override_requires: z5.array(z5.string()).optional(),
50575
+ escalation: GuardrailPolicyRuleEscalationSchema.optional()
50576
+ }).passthrough();
50577
+ var GuardrailPolicySchema = z5.object({
50578
+ description: z5.string().optional(),
50579
+ rules: z5.array(GuardrailPolicyRuleSchema)
50493
50580
  }).passthrough();
50494
50581
 
50495
50582
  // src/schema/policy.ts
50496
- import { z as z4 } from "zod";
50497
- var PolicyWhenSchema = z4.object({
50498
- artifact_type: z4.string().optional(),
50499
- workflow: z4.string().optional()
50583
+ import { z as z6 } from "zod";
50584
+ var PolicyWhenSchema = z6.object({
50585
+ artifact_type: z6.string().optional(),
50586
+ workflow: z6.string().optional()
50500
50587
  }).passthrough();
50501
- var PolicySchema = z4.object({
50588
+ var PolicySchema = z6.object({
50502
50589
  when: PolicyWhenSchema,
50503
- requires_validations: z4.array(z4.string()).optional(),
50504
- requires: z4.array(z4.string()).optional()
50590
+ requires_validations: z6.array(z6.string()).optional(),
50591
+ requires: z6.array(z6.string()).optional()
50505
50592
  }).passthrough();
50506
50593
 
50507
50594
  // src/schema/system.ts
50508
- import { z as z5 } from "zod";
50509
- var VersionLiteralSchema = z5.literal(1);
50510
- var ExtendsSchema = z5.string().optional();
50511
- var SystemSchema = z5.object({
50512
- id: z5.string(),
50513
- name: z5.string(),
50514
- default_workflow_order: z5.array(z5.string())
50595
+ import { z as z7 } from "zod";
50596
+ var VersionLiteralSchema = z7.literal(1);
50597
+ var ExtendsSchema = z7.string().optional();
50598
+ var SystemSchema = z7.object({
50599
+ id: z7.string(),
50600
+ name: z7.string(),
50601
+ default_workflow_order: z7.array(z7.string())
50515
50602
  }).passthrough();
50516
50603
 
50517
50604
  // src/schema/task.ts
50518
- import { z as z6 } from "zod";
50519
- var ExecutionStepSchema = z6.object({
50520
- id: z6.string(),
50521
- action: z6.string(),
50522
- description: z6.string().optional(),
50523
- required: z6.boolean().optional(),
50524
- abort_on_failure: z6.boolean().optional(),
50525
- uses_tool: z6.string().optional(),
50526
- produces_artifact: z6.string().optional(),
50527
- reads_artifact: z6.string().optional(),
50528
- depends_on: z6.array(z6.string()).optional(),
50529
- skip_condition: z6.string().optional(),
50530
- wait_for_approval: z6.boolean().optional()
50605
+ import { z as z8 } from "zod";
50606
+ var ExecutionStepSchema = z8.object({
50607
+ id: z8.string(),
50608
+ action: z8.string(),
50609
+ description: z8.string().optional(),
50610
+ required: z8.boolean().optional(),
50611
+ abort_on_failure: z8.boolean().optional(),
50612
+ uses_tool: z8.string().optional(),
50613
+ produces_artifact: z8.string().optional(),
50614
+ reads_artifact: z8.string().optional(),
50615
+ depends_on: z8.array(z8.string()).optional(),
50616
+ skip_condition: z8.string().optional(),
50617
+ wait_for_approval: z8.boolean().optional()
50531
50618
  }).passthrough();
50532
- var TaskSchema = z6.object({
50533
- description: z6.string(),
50534
- target_agent: z6.string(),
50535
- allowed_from_agents: z6.array(z6.string()),
50536
- workflow: z6.string(),
50537
- input_artifacts: z6.array(z6.string()),
50538
- invocation_handoff: z6.string(),
50539
- result_handoff: z6.string(),
50540
- default_priority: z6.string().optional(),
50541
- responsibilities: z6.array(z6.string()).optional(),
50542
- constraints: z6.array(z6.string()).optional(),
50543
- execution_steps: z6.array(ExecutionStepSchema).optional(),
50544
- completion_criteria: z6.array(z6.string()).optional(),
50545
- rules: z6.array(RuleSchema).optional(),
50546
- anti_patterns: z6.array(z6.string()).optional(),
50547
- escalation_criteria: z6.array(EscalationCriterionSchema).optional(),
50548
- validations: z6.array(z6.string()).default([])
50619
+ var TaskSchema = z8.object({
50620
+ description: z8.string(),
50621
+ target_agent: z8.string(),
50622
+ allowed_from_agents: z8.array(z8.string()),
50623
+ workflow: z8.string(),
50624
+ input_artifacts: z8.array(z8.string()),
50625
+ invocation_handoff: z8.string(),
50626
+ result_handoff: z8.string(),
50627
+ default_priority: z8.string().optional(),
50628
+ responsibilities: z8.array(z8.string()).optional(),
50629
+ constraints: z8.array(z8.string()).optional(),
50630
+ execution_steps: z8.array(ExecutionStepSchema).optional(),
50631
+ completion_criteria: z8.array(z8.string()).optional(),
50632
+ rules: z8.array(RuleSchema).optional(),
50633
+ anti_patterns: z8.array(z8.string()).optional(),
50634
+ escalation_criteria: z8.array(EscalationCriterionSchema).optional(),
50635
+ validations: z8.array(z8.string()).default([])
50549
50636
  }).passthrough();
50550
50637
 
50551
50638
  // src/schema/tool.ts
50552
- import { z as z7 } from "zod";
50553
- var CommandSchema = z7.object({
50554
- command: z7.string(),
50555
- category: z7.string(),
50556
- reads: z7.array(z7.string()).default([]),
50557
- writes: z7.array(z7.string()).default([]),
50558
- purpose: z7.string().optional()
50559
- });
50560
- var ToolSchema = z7.object({
50561
- kind: z7.string(),
50562
- description: z7.string().optional(),
50563
- input_artifacts: z7.array(z7.string()).default([]),
50564
- output_artifacts: z7.array(z7.string()).default([]),
50565
- invokable_by: z7.array(z7.string()),
50566
- side_effects: z7.array(z7.string()).default([]),
50567
- commands: z7.array(CommandSchema).default([])
50639
+ import { z as z9 } from "zod";
50640
+ var CommandSchema = z9.object({
50641
+ command: z9.string(),
50642
+ category: z9.string(),
50643
+ reads: z9.array(z9.string()).default([]),
50644
+ writes: z9.array(z9.string()).default([]),
50645
+ purpose: z9.string().optional()
50646
+ });
50647
+ var ToolSchema = z9.object({
50648
+ kind: z9.string(),
50649
+ description: z9.string().optional(),
50650
+ input_artifacts: z9.array(z9.string()).default([]),
50651
+ output_artifacts: z9.array(z9.string()).default([]),
50652
+ invokable_by: z9.array(z9.string()),
50653
+ side_effects: z9.array(z9.string()).default([]),
50654
+ commands: z9.array(CommandSchema).default([])
50568
50655
  }).passthrough();
50569
50656
 
50570
50657
  // src/schema/validation.ts
50571
- import { z as z8 } from "zod";
50572
- var ValidationSchema = z8.object({
50573
- target_artifact: z8.string(),
50574
- kind: z8.enum(["schema", "mechanical", "semantic", "approval"]),
50575
- executor_type: z8.enum(["tool", "agent"]),
50576
- executor: z8.string(),
50577
- blocking: z8.boolean(),
50578
- produces_evidence: z8.string().optional()
50658
+ import { z as z10 } from "zod";
50659
+ var ValidationSchema = z10.object({
50660
+ target_artifact: z10.string(),
50661
+ kind: z10.enum(["schema", "mechanical", "semantic", "approval"]),
50662
+ executor_type: z10.enum(["tool", "agent"]),
50663
+ executor: z10.string(),
50664
+ blocking: z10.boolean(),
50665
+ produces_evidence: z10.string().optional()
50579
50666
  }).passthrough();
50580
50667
 
50581
50668
  // src/schema/workflow.ts
50582
- import { z as z9 } from "zod";
50583
- var RetrySchema = z9.object({
50584
- condition: z9.string(),
50585
- fix_task: z9.string(),
50586
- revalidate_task: z9.string().optional()
50587
- });
50588
- var ExternalParticipantSchema = z9.object({
50589
- id: z9.string(),
50590
- kind: z9.enum(["actor", "participant"]),
50591
- label: z9.string(),
50592
- description: z9.string().optional()
50593
- });
50594
- var WorkflowDelegateStepSchema = z9.object({
50595
- type: z9.literal("delegate"),
50596
- description: z9.string().optional(),
50597
- task: z9.string(),
50598
- from_agent: z9.string(),
50599
- group: z9.string().optional(),
50669
+ import { z as z11 } from "zod";
50670
+ var RetrySchema = z11.object({
50671
+ condition: z11.string(),
50672
+ fix_task: z11.string(),
50673
+ revalidate_task: z11.string().optional()
50674
+ });
50675
+ var ExternalParticipantSchema = z11.object({
50676
+ id: z11.string(),
50677
+ kind: z11.enum(["actor", "participant"]),
50678
+ label: z11.string(),
50679
+ description: z11.string().optional()
50680
+ });
50681
+ var WorkflowDelegateStepSchema = z11.object({
50682
+ type: z11.literal("delegate"),
50683
+ description: z11.string().optional(),
50684
+ task: z11.string(),
50685
+ from_agent: z11.string(),
50686
+ group: z11.string().optional(),
50600
50687
  retry: RetrySchema.optional()
50601
50688
  }).passthrough();
50602
- var WorkflowGateStepSchema = z9.object({
50603
- type: z9.literal("gate"),
50604
- description: z9.string().optional(),
50605
- gate_kind: z9.string(),
50606
- group: z9.string().optional()
50689
+ var WorkflowGateStepSchema = z11.object({
50690
+ type: z11.literal("gate"),
50691
+ description: z11.string().optional(),
50692
+ gate_kind: z11.string(),
50693
+ group: z11.string().optional()
50607
50694
  }).passthrough();
50608
- var WorkflowHandoffStepSchema = z9.object({
50609
- type: z9.literal("handoff"),
50610
- description: z9.string().optional(),
50611
- handoff_kind: z9.string(),
50612
- task: z9.string().optional(),
50613
- from_agent: z9.string().optional(),
50614
- group: z9.string().optional(),
50695
+ var WorkflowHandoffStepSchema = z11.object({
50696
+ type: z11.literal("handoff"),
50697
+ description: z11.string().optional(),
50698
+ handoff_kind: z11.string(),
50699
+ task: z11.string().optional(),
50700
+ from_agent: z11.string().optional(),
50701
+ group: z11.string().optional(),
50615
50702
  retry: RetrySchema.optional()
50616
50703
  }).passthrough();
50617
- var WorkflowValidationStepSchema = z9.object({
50618
- type: z9.literal("validation"),
50619
- description: z9.string().optional(),
50620
- validation: z9.string(),
50621
- group: z9.string().optional()
50704
+ var WorkflowValidationStepSchema = z11.object({
50705
+ type: z11.literal("validation"),
50706
+ description: z11.string().optional(),
50707
+ validation: z11.string(),
50708
+ group: z11.string().optional()
50622
50709
  }).passthrough();
50623
- var WorkflowDecisionStepSchema = z9.object({
50624
- type: z9.literal("decision"),
50625
- description: z9.string().optional(),
50626
- on: z9.string(),
50627
- branches: z9.record(z9.string(), z9.array(z9.string())),
50628
- group: z9.string().optional()
50710
+ var WorkflowDecisionStepSchema = z11.object({
50711
+ type: z11.literal("decision"),
50712
+ description: z11.string().optional(),
50713
+ on: z11.string(),
50714
+ branches: z11.record(z11.string(), z11.array(z11.string())),
50715
+ group: z11.string().optional()
50629
50716
  }).passthrough();
50630
- var WorkflowStepSchema = z9.discriminatedUnion("type", [
50717
+ var WorkflowStepSchema = z11.discriminatedUnion("type", [
50631
50718
  WorkflowDelegateStepSchema,
50632
50719
  WorkflowGateStepSchema,
50633
50720
  WorkflowHandoffStepSchema,
50634
50721
  WorkflowValidationStepSchema,
50635
50722
  WorkflowDecisionStepSchema
50636
50723
  ]);
50637
- var WorkflowSchema = z9.object({
50638
- description: z9.string().optional(),
50639
- entry_conditions: z9.array(z9.string()).default([]),
50640
- trigger: z9.string().optional(),
50641
- steps: z9.array(WorkflowStepSchema),
50642
- external_participants: z9.array(ExternalParticipantSchema).default([])
50724
+ var WorkflowSchema = z11.object({
50725
+ description: z11.string().optional(),
50726
+ entry_conditions: z11.array(z11.string()).default([]),
50727
+ trigger: z11.string().optional(),
50728
+ steps: z11.array(WorkflowStepSchema),
50729
+ external_participants: z11.array(ExternalParticipantSchema).default([])
50643
50730
  }).passthrough();
50644
50731
 
50645
50732
  // src/schema/dsl.ts
50646
- var ComponentsSchema = z10.object({
50647
- schemas: z10.record(z10.string(), z10.record(z10.string(), z10.any())).default({})
50733
+ var ComponentsSchema = z12.object({
50734
+ schemas: z12.record(z12.string(), z12.record(z12.string(), z12.any())).default({})
50648
50735
  }).passthrough();
50649
- var DslSchema = z10.object({
50650
- version: z10.literal(1),
50651
- extends: z10.string().optional(),
50736
+ var DslSchema = z12.object({
50737
+ version: z12.literal(1),
50738
+ extends: z12.string().optional(),
50652
50739
  system: SystemSchema,
50653
- agents: z10.record(z10.string(), AgentSchema).default({}),
50654
- tasks: z10.record(z10.string(), TaskSchema).default({}),
50655
- artifacts: z10.record(z10.string(), ArtifactSchema).default({}),
50656
- tools: z10.record(z10.string(), ToolSchema).default({}),
50657
- validations: z10.record(z10.string(), ValidationSchema).default({}),
50658
- handoff_types: z10.record(z10.string(), HandoffTypeSchema).default({}),
50659
- workflow: z10.record(z10.string(), WorkflowSchema).default({}),
50660
- policies: z10.record(z10.string(), PolicySchema).default({}),
50740
+ agents: z12.record(z12.string(), AgentSchema).default({}),
50741
+ tasks: z12.record(z12.string(), TaskSchema).default({}),
50742
+ artifacts: z12.record(z12.string(), ArtifactSchema).default({}),
50743
+ tools: z12.record(z12.string(), ToolSchema).default({}),
50744
+ validations: z12.record(z12.string(), ValidationSchema).default({}),
50745
+ handoff_types: z12.record(z12.string(), HandoffTypeSchema).default({}),
50746
+ workflow: z12.record(z12.string(), WorkflowSchema).default({}),
50747
+ policies: z12.record(z12.string(), PolicySchema).default({}),
50748
+ guardrails: z12.record(z12.string(), GuardrailSchema).default({}),
50749
+ guardrail_policies: z12.record(z12.string(), GuardrailPolicySchema).default({}),
50661
50750
  components: ComponentsSchema.default({ schemas: {} })
50662
50751
  }).passthrough();
50663
50752
 
@@ -50710,22 +50799,22 @@ function resolveAllOf(schema) {
50710
50799
  }
50711
50800
 
50712
50801
  // src/schema/merge-operators.ts
50713
- import { z as z11 } from "zod";
50714
- var AppendOperatorSchema = z11.object({
50715
- $append: z11.record(z11.string(), z11.any())
50802
+ import { z as z13 } from "zod";
50803
+ var AppendOperatorSchema = z13.object({
50804
+ $append: z13.record(z13.string(), z13.any())
50716
50805
  });
50717
- var PrependOperatorSchema = z11.object({
50718
- $prepend: z11.record(z11.string(), z11.any())
50806
+ var PrependOperatorSchema = z13.object({
50807
+ $prepend: z13.record(z13.string(), z13.any())
50719
50808
  });
50720
- var InsertAfterOperatorSchema = z11.object({
50721
- $insert_after: z11.object({
50722
- after: z11.string(),
50723
- entries: z11.record(z11.string(), z11.any())
50809
+ var InsertAfterOperatorSchema = z13.object({
50810
+ $insert_after: z13.object({
50811
+ after: z13.string(),
50812
+ entries: z13.record(z13.string(), z13.any())
50724
50813
  })
50725
50814
  });
50726
- var ReplaceOperatorSchema = z11.object({ $replace: z11.any() });
50727
- var RemoveOperatorSchema = z11.object({
50728
- $remove: z11.array(z11.string())
50815
+ var ReplaceOperatorSchema = z13.object({ $replace: z13.any() });
50816
+ var RemoveOperatorSchema = z13.object({
50817
+ $remove: z13.array(z13.string())
50729
50818
  });
50730
50819
 
50731
50820
  // src/loader/loader.ts
@@ -51275,6 +51364,8 @@ var MERGE_SECTIONS = [
51275
51364
  "handoff_types",
51276
51365
  "workflow",
51277
51366
  "policies",
51367
+ "guardrails",
51368
+ "guardrail_policies",
51278
51369
  "components"
51279
51370
  ];
51280
51371
  function mergeDsl(base, project) {
@@ -51330,16 +51421,16 @@ async function resolve3(projectDirOrFile) {
51330
51421
  }
51331
51422
 
51332
51423
  // src/validator/schema-validator.ts
51333
- import { z as z12 } from "zod";
51424
+ import { z as z14 } from "zod";
51334
51425
  function unwrap(schema) {
51335
- if (schema instanceof z12.ZodOptional) return unwrap(schema.unwrap());
51336
- if (schema instanceof z12.ZodDefault) return unwrap(schema.removeDefault());
51337
- if (schema instanceof z12.ZodNullable) return unwrap(schema.unwrap());
51426
+ if (schema instanceof z14.ZodOptional) return unwrap(schema.unwrap());
51427
+ if (schema instanceof z14.ZodDefault) return unwrap(schema.removeDefault());
51428
+ if (schema instanceof z14.ZodNullable) return unwrap(schema.unwrap());
51338
51429
  return schema;
51339
51430
  }
51340
51431
  function checkCustomPropsRecursive(data, schema, path) {
51341
51432
  const inner = unwrap(schema);
51342
- if (inner instanceof z12.ZodObject) {
51433
+ if (inner instanceof z14.ZodObject) {
51343
51434
  if (typeof data !== "object" || data === null || Array.isArray(data)) return [];
51344
51435
  const obj = data;
51345
51436
  const shape = inner.shape;
@@ -51360,7 +51451,7 @@ function checkCustomPropsRecursive(data, schema, path) {
51360
51451
  }
51361
51452
  return diagnostics;
51362
51453
  }
51363
- if (inner instanceof z12.ZodRecord) {
51454
+ if (inner instanceof z14.ZodRecord) {
51364
51455
  if (typeof data !== "object" || data === null || Array.isArray(data)) return [];
51365
51456
  const valueSchema = inner._def.valueType;
51366
51457
  const diagnostics = [];
@@ -51369,7 +51460,7 @@ function checkCustomPropsRecursive(data, schema, path) {
51369
51460
  }
51370
51461
  return diagnostics;
51371
51462
  }
51372
- if (inner instanceof z12.ZodArray) {
51463
+ if (inner instanceof z14.ZodArray) {
51373
51464
  if (!Array.isArray(data)) return [];
51374
51465
  const diagnostics = [];
51375
51466
  for (let i3 = 0; i3 < data.length; i3++) {
@@ -51377,14 +51468,14 @@ function checkCustomPropsRecursive(data, schema, path) {
51377
51468
  }
51378
51469
  return diagnostics;
51379
51470
  }
51380
- if (inner instanceof z12.ZodDiscriminatedUnion) {
51471
+ if (inner instanceof z14.ZodDiscriminatedUnion) {
51381
51472
  if (typeof data !== "object" || data === null) return [];
51382
51473
  const obj = data;
51383
51474
  const disc = inner._def.discriminator;
51384
51475
  const discValue = obj[disc];
51385
51476
  const match = inner.options.find((opt) => {
51386
51477
  const shape = opt.shape;
51387
- return shape[disc] instanceof z12.ZodLiteral && shape[disc].value === discValue;
51478
+ return shape[disc] instanceof z14.ZodLiteral && shape[disc].value === discValue;
51388
51479
  });
51389
51480
  if (match) return checkCustomPropsRecursive(data, match, path);
51390
51481
  return [];
@@ -51418,12 +51509,13 @@ function checkReferences(dsl) {
51418
51509
  const handoffKinds = new Set(Object.keys(dsl.handoff_types));
51419
51510
  const taskIds = new Set(Object.keys(dsl.tasks));
51420
51511
  const workflowIds = new Set(dsl.system.default_workflow_order);
51421
- function checkExists(value, validSet, entityType, path) {
51512
+ const guardrailIds = new Set(Object.keys(dsl.guardrails));
51513
+ function checkExists(value, validSet, entityType, path, code = "reference-not-found") {
51422
51514
  if (!validSet.has(value)) {
51423
51515
  diagnostics.push({
51424
51516
  path,
51425
51517
  message: `Reference "${value}" not found in ${entityType}`,
51426
- code: "reference-not-found"
51518
+ code
51427
51519
  });
51428
51520
  }
51429
51521
  }
@@ -51611,6 +51703,75 @@ function checkReferences(dsl) {
51611
51703
  }
51612
51704
  }
51613
51705
  }
51706
+ for (const [id, guardrail] of Object.entries(dsl.guardrails)) {
51707
+ if (guardrail.scope.agents) {
51708
+ for (const ref of guardrail.scope.agents) {
51709
+ checkExists(
51710
+ ref,
51711
+ agentIds,
51712
+ "agents",
51713
+ `guardrails.${id}.scope.agents`,
51714
+ "guardrail-scope-ref-not-found"
51715
+ );
51716
+ }
51717
+ }
51718
+ if (guardrail.scope.tasks) {
51719
+ for (const ref of guardrail.scope.tasks) {
51720
+ checkExists(
51721
+ ref,
51722
+ taskIds,
51723
+ "tasks",
51724
+ `guardrails.${id}.scope.tasks`,
51725
+ "guardrail-scope-ref-not-found"
51726
+ );
51727
+ }
51728
+ }
51729
+ if (guardrail.scope.tools) {
51730
+ for (const ref of guardrail.scope.tools) {
51731
+ checkExists(
51732
+ ref,
51733
+ toolIds,
51734
+ "tools",
51735
+ `guardrails.${id}.scope.tools`,
51736
+ "guardrail-scope-ref-not-found"
51737
+ );
51738
+ }
51739
+ }
51740
+ if (guardrail.scope.artifacts) {
51741
+ for (const ref of guardrail.scope.artifacts) {
51742
+ checkExists(
51743
+ ref,
51744
+ artifactIds,
51745
+ "artifacts",
51746
+ `guardrails.${id}.scope.artifacts`,
51747
+ "guardrail-scope-ref-not-found"
51748
+ );
51749
+ }
51750
+ }
51751
+ if (guardrail.scope.workflows) {
51752
+ for (const ref of guardrail.scope.workflows) {
51753
+ checkExists(
51754
+ ref,
51755
+ workflowIds,
51756
+ "system.default_workflow_order",
51757
+ `guardrails.${id}.scope.workflows`,
51758
+ "guardrail-scope-ref-not-found"
51759
+ );
51760
+ }
51761
+ }
51762
+ }
51763
+ for (const [policyId, policy] of Object.entries(dsl.guardrail_policies)) {
51764
+ for (let i3 = 0; i3 < policy.rules.length; i3++) {
51765
+ const rule = policy.rules[i3];
51766
+ checkExists(
51767
+ rule.guardrail,
51768
+ guardrailIds,
51769
+ "guardrails",
51770
+ `guardrail_policies.${policyId}.rules[${i3}].guardrail`,
51771
+ "guardrail-policy-ref-not-found"
51772
+ );
51773
+ }
51774
+ }
51614
51775
  return diagnostics;
51615
51776
  }
51616
51777
 
@@ -51985,6 +52146,32 @@ var toolCommandsRule = {
51985
52146
  }
51986
52147
  };
51987
52148
 
52149
+ // src/linter/rules/guardrail-policy-coverage.ts
52150
+ var guardrailPolicyCoverageRule = {
52151
+ id: "guardrail-no-policy-rule",
52152
+ description: "Every guardrail should be referenced by at least one policy rule in guardrail_policies",
52153
+ run(dsl) {
52154
+ const diagnostics = [];
52155
+ const referencedGuardrails = /* @__PURE__ */ new Set();
52156
+ for (const policy of Object.values(dsl.guardrail_policies)) {
52157
+ for (const rule of policy.rules) {
52158
+ referencedGuardrails.add(rule.guardrail);
52159
+ }
52160
+ }
52161
+ for (const guardrailId of Object.keys(dsl.guardrails)) {
52162
+ if (!referencedGuardrails.has(guardrailId)) {
52163
+ diagnostics.push({
52164
+ ruleId: "guardrail-no-policy-rule",
52165
+ severity: "warning",
52166
+ path: `guardrails.${guardrailId}`,
52167
+ message: `Guardrail "${guardrailId}" is not referenced by any policy rule in guardrail_policies`
52168
+ });
52169
+ }
52170
+ }
52171
+ return diagnostics;
52172
+ }
52173
+ };
52174
+
51988
52175
  // src/linter/linter.ts
51989
52176
  var builtinRules = [
51990
52177
  validationCoverageRule,
@@ -51992,7 +52179,8 @@ var builtinRules = [
51992
52179
  taskAgentBindingRule,
51993
52180
  mergeIntegrityRule,
51994
52181
  artifactOwnershipRule,
51995
- toolCommandsRule
52182
+ toolCommandsRule,
52183
+ guardrailPolicyCoverageRule
51996
52184
  ];
51997
52185
  function lint(dsl, rules = builtinRules) {
51998
52186
  const diagnostics = [];
@@ -52654,7 +52842,9 @@ function buildGlobalContext(dsl) {
52654
52842
  validations: dsl.validations,
52655
52843
  handoff_types: dsl.handoff_types,
52656
52844
  workflow: dsl.workflow,
52657
- policies: dsl.policies
52845
+ policies: dsl.policies,
52846
+ guardrails: dsl.guardrails,
52847
+ guardrail_policies: dsl.guardrail_policies
52658
52848
  };
52659
52849
  }
52660
52850
  function buildSystemContext(dsl) {
@@ -52865,6 +53055,16 @@ function buildPolicyContext(dsl, policyId) {
52865
53055
  const policy = { ...policyDef, id: policyId };
52866
53056
  return { policy, dsl };
52867
53057
  }
53058
+ function buildGuardrailContext(dsl, guardrailId) {
53059
+ const guardrailDef = dsl.guardrails[guardrailId];
53060
+ const guardrail = { ...guardrailDef, id: guardrailId };
53061
+ return { guardrail, dsl };
53062
+ }
53063
+ function buildGuardrailPolicyContext(dsl, policyId) {
53064
+ const policyDef = dsl.guardrail_policies[policyId];
53065
+ const guardrail_policy = { ...policyDef, id: policyId };
53066
+ return { guardrail_policy, dsl };
53067
+ }
52868
53068
  function mergeRules(agentRules, taskRules) {
52869
53069
  const result = [...agentRules];
52870
53070
  const existingIds = new Set(result.map((r3) => r3["id"]));
@@ -53712,7 +53912,9 @@ function getDslSection(dsl, context) {
53712
53912
  validation: dsl.validations,
53713
53913
  handoff_type: dsl.handoff_types,
53714
53914
  workflow: dsl.workflow,
53715
- policy: dsl.policies
53915
+ policy: dsl.policies,
53916
+ guardrail: dsl.guardrails,
53917
+ guardrail_policy: dsl.guardrail_policies
53716
53918
  };
53717
53919
  return sectionMap[context] ?? {};
53718
53920
  }
@@ -53745,6 +53947,10 @@ function buildEntityContext(dsl, context, entityId) {
53745
53947
  return buildWorkflowContext(dsl, entityId);
53746
53948
  case "policy":
53747
53949
  return buildPolicyContext(dsl, entityId);
53950
+ case "guardrail":
53951
+ return buildGuardrailContext(dsl, entityId);
53952
+ case "guardrail_policy":
53953
+ return buildGuardrailPolicyContext(dsl, entityId);
53748
53954
  case "system":
53749
53955
  return buildSystemContext(dsl);
53750
53956
  }
@@ -53813,8 +54019,19 @@ async function checkDriftFromConfig(dsl, renderTargets) {
53813
54019
  return { hasDrift: diffs.length > 0, diffs };
53814
54020
  }
53815
54021
 
54022
+ // src/config/binding-loader.ts
54023
+ import { readFile as readFile4 } from "fs/promises";
54024
+ import { dirname as dirname5, resolve as resolve5 } from "path";
54025
+ import { stat as stat2 } from "fs/promises";
54026
+ import { parse as parseYaml3 } from "yaml";
54027
+
54028
+ // src/config/loader.ts
54029
+ import { readFile as readFile3, access } from "fs/promises";
54030
+ import { resolve as resolve4, dirname as dirname4 } from "path";
54031
+ import { parse as parseYaml2 } from "yaml";
54032
+
53816
54033
  // src/config/types.ts
53817
- import { z as z14 } from "zod";
54034
+ import { z as z16 } from "zod";
53818
54035
  var CONTEXT_TYPES = [
53819
54036
  "agent",
53820
54037
  "task",
@@ -53824,18 +54041,20 @@ var CONTEXT_TYPES = [
53824
54041
  "handoff_type",
53825
54042
  "workflow",
53826
54043
  "policy",
54044
+ "guardrail",
54045
+ "guardrail_policy",
53827
54046
  "system"
53828
54047
  ];
53829
- var ContextTypeSchema = z14.enum(CONTEXT_TYPES);
54048
+ var ContextTypeSchema = z16.enum(CONTEXT_TYPES);
53830
54049
  var ITERABLE_CONTEXT_TYPES = CONTEXT_TYPES.filter(
53831
54050
  (t3) => t3 !== "system"
53832
54051
  );
53833
- var RenderTargetSchema = z14.object({
53834
- template: z14.string(),
54052
+ var RenderTargetSchema = z16.object({
54053
+ template: z16.string(),
53835
54054
  context: ContextTypeSchema,
53836
- output: z14.string(),
53837
- include: z14.array(z14.string()).optional(),
53838
- exclude: z14.array(z14.string()).optional()
54055
+ output: z16.string(),
54056
+ include: z16.array(z16.string()).optional(),
54057
+ exclude: z16.array(z16.string()).optional()
53839
54058
  }).refine(
53840
54059
  (data) => !(data.include && data.exclude),
53841
54060
  { message: "include and exclude are mutually exclusive" }
@@ -53848,16 +54067,16 @@ var RenderTargetSchema = z14.object({
53848
54067
  },
53849
54068
  { message: "include/exclude cannot be used with context: system" }
53850
54069
  );
53851
- var AgentContractsConfigSchema = z14.object({
53852
- dsl: z14.string(),
53853
- vars: z14.record(z14.string(), z14.string()).optional(),
53854
- renders: z14.array(RenderTargetSchema).min(1)
54070
+ var AgentContractsConfigSchema = z16.object({
54071
+ dsl: z16.string(),
54072
+ vars: z16.record(z16.string(), z16.string()).optional(),
54073
+ renders: z16.array(RenderTargetSchema).min(1),
54074
+ bindings: z16.array(z16.string()).default([]),
54075
+ active_guardrail_policy: z16.string().optional(),
54076
+ paths: z16.record(z16.string(), z16.string()).optional()
53855
54077
  });
53856
54078
 
53857
54079
  // src/config/loader.ts
53858
- import { readFile as readFile3, access } from "fs/promises";
53859
- import { resolve as resolve4, dirname as dirname4 } from "path";
53860
- import { parse as parseYaml2 } from "yaml";
53861
54080
  var DEFAULT_CONFIG_NAME = "agent-contracts.config.yaml";
53862
54081
  var ConfigLoadError = class extends Error {
53863
54082
  constructor(message, filePath) {
@@ -53925,7 +54144,10 @@ ${issues}`,
53925
54144
  template: resolve4(configDir, r3.template),
53926
54145
  output: resolve4(configDir, r3.output)
53927
54146
  })),
53928
- configDir
54147
+ configDir,
54148
+ bindings: (config.bindings ?? []).map((b3) => resolve4(configDir, b3)),
54149
+ activeGuardrailPolicy: config.active_guardrail_policy,
54150
+ paths: config.paths
53929
54151
  };
53930
54152
  }
53931
54153
  function resolveDslPath(dirArg, dirArgDefault, config) {
@@ -53937,13 +54159,372 @@ function resolveDslPath(dirArg, dirArgDefault, config) {
53937
54159
  }
53938
54160
  return resolve4(dirArgDefault);
53939
54161
  }
54162
+
54163
+ // src/config/binding-merger.ts
54164
+ function isRecord3(v2) {
54165
+ return typeof v2 === "object" && v2 !== null && !Array.isArray(v2);
54166
+ }
54167
+ var BINDING_MERGE_SECTIONS = ["guardrail_impl", "outputs"];
54168
+ function mergeBinding(base, project) {
54169
+ const hasExtends = typeof project["extends"] === "string";
54170
+ const result = { ...base, ...project };
54171
+ for (const section of BINDING_MERGE_SECTIONS) {
54172
+ const baseVal = base[section];
54173
+ const projVal = project[section];
54174
+ if (projVal === void 0) {
54175
+ continue;
54176
+ }
54177
+ const baseMap = isRecord3(baseVal) ? baseVal : {};
54178
+ result[section] = mergeEntityMaps(
54179
+ baseMap,
54180
+ projVal,
54181
+ section,
54182
+ hasExtends
54183
+ );
54184
+ }
54185
+ if (project["reporting"] !== void 0 && isRecord3(base["reporting"]) && isRecord3(project["reporting"])) {
54186
+ result["reporting"] = deepMergeEntities(
54187
+ base["reporting"],
54188
+ project["reporting"],
54189
+ "reporting",
54190
+ hasExtends
54191
+ );
54192
+ }
54193
+ delete result["extends"];
54194
+ return result;
54195
+ }
54196
+
54197
+ // src/config/binding-loader.ts
54198
+ async function loadRawBinding(filePath) {
54199
+ let content;
54200
+ try {
54201
+ content = await readFile4(filePath, "utf8");
54202
+ } catch {
54203
+ throw new ConfigLoadError(
54204
+ `Failed to read binding file: ${filePath}`,
54205
+ filePath
54206
+ );
54207
+ }
54208
+ try {
54209
+ return parseYaml3(content);
54210
+ } catch (err) {
54211
+ const msg = err instanceof Error ? err.message : String(err);
54212
+ throw new ConfigLoadError(
54213
+ `Invalid YAML syntax in binding file ${filePath}: ${msg}`,
54214
+ filePath
54215
+ );
54216
+ }
54217
+ }
54218
+ async function resolveBindingExtends(raw, filePath, seen) {
54219
+ const extendsValue = raw["extends"];
54220
+ if (typeof extendsValue !== "string") {
54221
+ return raw;
54222
+ }
54223
+ const bindingDir = dirname5(filePath);
54224
+ let basePath;
54225
+ if (extendsValue.startsWith("./") || extendsValue.startsWith("../")) {
54226
+ basePath = resolve5(bindingDir, extendsValue);
54227
+ } else {
54228
+ try {
54229
+ const resolved = import.meta.resolve(extendsValue);
54230
+ basePath = new URL(resolved).pathname;
54231
+ } catch {
54232
+ throw new ConfigLoadError(
54233
+ `Could not resolve binding extends package: ${extendsValue}`,
54234
+ filePath
54235
+ );
54236
+ }
54237
+ }
54238
+ try {
54239
+ const s2 = await stat2(basePath);
54240
+ if (s2.isDirectory()) {
54241
+ const candidates = ["binding.yaml", "binding.yml"];
54242
+ let found = false;
54243
+ for (const name of candidates) {
54244
+ const candidate = resolve5(basePath, name);
54245
+ try {
54246
+ const cs = await stat2(candidate);
54247
+ if (cs.isFile()) {
54248
+ basePath = candidate;
54249
+ found = true;
54250
+ break;
54251
+ }
54252
+ } catch {
54253
+ continue;
54254
+ }
54255
+ }
54256
+ if (!found) {
54257
+ throw new ConfigLoadError(
54258
+ `No binding.yaml found in directory: ${basePath}`,
54259
+ filePath
54260
+ );
54261
+ }
54262
+ }
54263
+ } catch (err) {
54264
+ if (err instanceof ConfigLoadError) throw err;
54265
+ throw new ConfigLoadError(
54266
+ `Base binding path not found: ${basePath}`,
54267
+ filePath
54268
+ );
54269
+ }
54270
+ if (seen.has(basePath)) {
54271
+ throw new ConfigLoadError(
54272
+ `Circular binding extends detected: ${basePath}`,
54273
+ filePath
54274
+ );
54275
+ }
54276
+ seen.add(basePath);
54277
+ const baseRaw = await loadRawBinding(basePath);
54278
+ const resolvedBase = await resolveBindingExtends(baseRaw, basePath, seen);
54279
+ return mergeBinding(resolvedBase, raw);
54280
+ }
54281
+ async function loadBindings(bindingPaths) {
54282
+ const results = [];
54283
+ for (const filePath of bindingPaths) {
54284
+ const raw = await loadRawBinding(filePath);
54285
+ const merged = await resolveBindingExtends(raw, filePath, /* @__PURE__ */ new Set([filePath]));
54286
+ const result = SoftwareBindingSchema.safeParse(merged);
54287
+ if (!result.success) {
54288
+ const issues = result.error.issues.map((i3) => ` ${i3.path.join(".")}: ${i3.message}`).join("\n");
54289
+ throw new ConfigLoadError(
54290
+ `Invalid binding schema in ${filePath}:
54291
+ ${issues}`,
54292
+ filePath
54293
+ );
54294
+ }
54295
+ results.push({ filePath, binding: result.data });
54296
+ }
54297
+ return results;
54298
+ }
54299
+
54300
+ // src/guardrail-generator/generator.ts
54301
+ import { readFile as readFile5, writeFile as writeFile2, mkdir as mkdir2, chmod } from "fs/promises";
54302
+ import { resolve as resolve6, dirname as dirname6 } from "path";
54303
+ import Handlebars2 from "handlebars";
54304
+
54305
+ // src/guardrail-generator/resolve-checks.ts
54306
+ function resolveChecks(dsl, binding, policy) {
54307
+ const resolved = [];
54308
+ const diagnostics = [];
54309
+ const guardrailImpl = binding.guardrail_impl ?? {};
54310
+ for (const [guardrailId, impl] of Object.entries(guardrailImpl)) {
54311
+ const guardrail = dsl.guardrails[guardrailId];
54312
+ if (!guardrail) {
54313
+ diagnostics.push({
54314
+ path: `binding.${binding.software}.guardrail_impl.${guardrailId}`,
54315
+ message: `Binding "${binding.software}" implements guardrail "${guardrailId}" which is not defined in the DSL`,
54316
+ severity: "error"
54317
+ });
54318
+ continue;
54319
+ }
54320
+ const policyRule = policy.rules.find((r3) => r3.guardrail === guardrailId);
54321
+ if (!policyRule) {
54322
+ diagnostics.push({
54323
+ path: `binding.${binding.software}.guardrail_impl.${guardrailId}`,
54324
+ message: `Guardrail "${guardrailId}" has no policy rule in the active policy \u2014 skipping`,
54325
+ severity: "info"
54326
+ });
54327
+ continue;
54328
+ }
54329
+ for (const check of impl.checks) {
54330
+ resolved.push({
54331
+ guardrail_id: guardrailId,
54332
+ guardrail,
54333
+ policy_rule: policyRule,
54334
+ check
54335
+ });
54336
+ }
54337
+ }
54338
+ return { resolved, diagnostics };
54339
+ }
54340
+
54341
+ // src/guardrail-generator/resolve-paths.ts
54342
+ function resolveBindingTargetPath(target, paths, bindingSoftware) {
54343
+ const diagnostics = [];
54344
+ const resolved = target.replace(/\{(\w+)\}/g, (match, varName) => {
54345
+ const value = paths[varName];
54346
+ if (value === void 0) {
54347
+ diagnostics.push({
54348
+ path: `binding.${bindingSoftware}.outputs`,
54349
+ message: `Path variable "${varName}" used in target "${target}" but not defined in config.paths`,
54350
+ severity: "error"
54351
+ });
54352
+ return match;
54353
+ }
54354
+ return value;
54355
+ });
54356
+ return { resolved, diagnostics };
54357
+ }
54358
+
54359
+ // src/guardrail-generator/generator.ts
54360
+ Handlebars2.registerHelper("json", (value) => {
54361
+ return new Handlebars2.SafeString(JSON.stringify(value, null, 2));
54362
+ });
54363
+ Handlebars2.registerHelper(
54364
+ "expand",
54365
+ (pattern, options) => {
54366
+ if (typeof pattern !== "string") return "";
54367
+ const hash = options.hash;
54368
+ let result = pattern;
54369
+ for (const [key, val] of Object.entries(hash)) {
54370
+ result = result.replace(new RegExp(`\\{\\{${key}\\}\\}`, "g"), String(val));
54371
+ }
54372
+ return new Handlebars2.SafeString(result);
54373
+ }
54374
+ );
54375
+ async function generateGuardrails(options) {
54376
+ const { dsl, config, loadedBindings, filterBindings, dryRun } = options;
54377
+ const outputFiles = [];
54378
+ const diagnostics = [];
54379
+ const policyName = config.activeGuardrailPolicy;
54380
+ if (!policyName) {
54381
+ diagnostics.push({
54382
+ path: "config.active_guardrail_policy",
54383
+ message: "No active_guardrail_policy specified in config \u2014 no guardrails will be generated",
54384
+ severity: "warning"
54385
+ });
54386
+ return { outputFiles, diagnostics };
54387
+ }
54388
+ const policy = dsl.guardrail_policies[policyName];
54389
+ if (!policy) {
54390
+ diagnostics.push({
54391
+ path: "config.active_guardrail_policy",
54392
+ message: `Active guardrail policy "${policyName}" not found in DSL guardrail_policies`,
54393
+ severity: "error"
54394
+ });
54395
+ return { outputFiles, diagnostics };
54396
+ }
54397
+ const allBindings = {};
54398
+ for (const lb of loadedBindings) {
54399
+ allBindings[lb.binding.software] = lb.binding;
54400
+ }
54401
+ let reporting = null;
54402
+ for (const lb of loadedBindings) {
54403
+ if (lb.binding.reporting) {
54404
+ reporting = {
54405
+ commands: lb.binding.reporting.commands,
54406
+ fail_open: lb.binding.reporting.fail_open,
54407
+ timeout_ms: lb.binding.reporting.timeout_ms
54408
+ };
54409
+ break;
54410
+ }
54411
+ }
54412
+ const paths = config.paths ?? {};
54413
+ const vars = config.vars ?? {};
54414
+ for (const lb of loadedBindings) {
54415
+ const binding = lb.binding;
54416
+ if (filterBindings && !filterBindings.includes(binding.software)) {
54417
+ continue;
54418
+ }
54419
+ if (!binding.outputs) continue;
54420
+ const checkResult = resolveChecks(dsl, binding, policy);
54421
+ diagnostics.push(...checkResult.diagnostics);
54422
+ const ctx = {
54423
+ system: { id: dsl.system.id, name: dsl.system.name },
54424
+ guardrails: dsl.guardrails,
54425
+ policy,
54426
+ binding,
54427
+ all_bindings: allBindings,
54428
+ vars,
54429
+ paths,
54430
+ reporting,
54431
+ resolved_checks: checkResult.resolved
54432
+ };
54433
+ for (const [outputId, outputDef] of Object.entries(binding.outputs)) {
54434
+ const pathResult = resolveBindingTargetPath(
54435
+ outputDef.target,
54436
+ paths,
54437
+ binding.software
54438
+ );
54439
+ diagnostics.push(...pathResult.diagnostics);
54440
+ if (pathResult.diagnostics.some((d2) => d2.severity === "error")) {
54441
+ continue;
54442
+ }
54443
+ const targetPath = resolve6(config.configDir, pathResult.resolved);
54444
+ let templateContent;
54445
+ if (outputDef.inline_template) {
54446
+ templateContent = outputDef.inline_template;
54447
+ } else if (outputDef.template) {
54448
+ if (outputDef.template.startsWith("builtin:")) {
54449
+ diagnostics.push({
54450
+ path: `binding.${binding.software}.outputs.${outputId}`,
54451
+ message: `Builtin template "${outputDef.template}" is not yet implemented \u2014 skipping`,
54452
+ severity: "info"
54453
+ });
54454
+ continue;
54455
+ }
54456
+ const templatePath = resolve6(config.configDir, outputDef.template);
54457
+ try {
54458
+ templateContent = await readFile5(templatePath, "utf8");
54459
+ } catch {
54460
+ diagnostics.push({
54461
+ path: `binding.${binding.software}.outputs.${outputId}`,
54462
+ message: `Template file not found: ${templatePath}`,
54463
+ severity: "error"
54464
+ });
54465
+ continue;
54466
+ }
54467
+ } else {
54468
+ diagnostics.push({
54469
+ path: `binding.${binding.software}.outputs.${outputId}`,
54470
+ message: "Output has neither template nor inline_template",
54471
+ severity: "error"
54472
+ });
54473
+ continue;
54474
+ }
54475
+ if (outputDef.group_by) {
54476
+ const groupField = outputDef.group_by;
54477
+ const groups = /* @__PURE__ */ new Map();
54478
+ for (const rc of checkResult.resolved) {
54479
+ const key = String(
54480
+ rc.check[groupField] ?? "default"
54481
+ );
54482
+ if (!groups.has(key)) groups.set(key, []);
54483
+ groups.get(key).push(rc);
54484
+ }
54485
+ for (const [groupKey, groupChecks] of groups) {
54486
+ const groupCtx = {
54487
+ ...ctx,
54488
+ resolved_checks: groupChecks,
54489
+ current_group: groupKey
54490
+ };
54491
+ const compiled = Handlebars2.compile(templateContent, { noEscape: true });
54492
+ const output = compiled(groupCtx);
54493
+ const groupTarget = resolve6(targetPath, groupKey);
54494
+ if (!dryRun) {
54495
+ await mkdir2(dirname6(groupTarget), { recursive: true });
54496
+ await writeFile2(groupTarget, output, "utf8");
54497
+ if (outputDef.executable) {
54498
+ await chmod(groupTarget, 493);
54499
+ }
54500
+ }
54501
+ outputFiles.push(groupTarget);
54502
+ }
54503
+ } else {
54504
+ const compiled = Handlebars2.compile(templateContent, { noEscape: true });
54505
+ const output = compiled(ctx);
54506
+ if (!dryRun) {
54507
+ await mkdir2(dirname6(targetPath), { recursive: true });
54508
+ await writeFile2(targetPath, output, "utf8");
54509
+ if (outputDef.executable) {
54510
+ await chmod(targetPath, 493);
54511
+ }
54512
+ }
54513
+ outputFiles.push(targetPath);
54514
+ }
54515
+ }
54516
+ }
54517
+ return { outputFiles, diagnostics };
54518
+ }
53940
54519
  export {
53941
54520
  AgentContractsConfigSchema,
53942
54521
  AgentSchema,
53943
54522
  AppendOperatorSchema,
53944
54523
  ArtifactSchema,
53945
54524
  BaseResolveError,
54525
+ BindingOutputSchema,
53946
54526
  CONTEXT_TYPES,
54527
+ CheckSchema,
53947
54528
  CommandSchema,
53948
54529
  ComponentsSchema,
53949
54530
  ConfigLoadError,
@@ -53953,8 +54534,14 @@ export {
53953
54534
  EscalationCriterionSchema,
53954
54535
  ExecutionStepSchema,
53955
54536
  ExtendsSchema,
54537
+ GuardrailPolicyRuleEscalationSchema,
54538
+ GuardrailPolicyRuleSchema,
54539
+ GuardrailPolicySchema,
54540
+ GuardrailSchema,
54541
+ GuardrailScopeSchema,
53956
54542
  HandoffTypeSchema,
53957
54543
  InsertAfterOperatorSchema,
54544
+ MatcherSchema,
53958
54545
  MergeError,
53959
54546
  PolicySchema,
53960
54547
  PolicyWhenSchema,
@@ -53963,7 +54550,9 @@ export {
53963
54550
  RemoveOperatorSchema,
53964
54551
  RenderTargetSchema,
53965
54552
  ReplaceOperatorSchema,
54553
+ ReportingSchema,
53966
54554
  RuleSchema,
54555
+ SoftwareBindingSchema,
53967
54556
  SystemSchema,
53968
54557
  TaskSchema,
53969
54558
  ToolSchema,
@@ -53973,6 +54562,8 @@ export {
53973
54562
  WorkflowStepSchema,
53974
54563
  buildArtifactContext,
53975
54564
  buildGlobalContext,
54565
+ buildGuardrailContext,
54566
+ buildGuardrailPolicyContext,
53976
54567
  buildHandoffTypeContext,
53977
54568
  buildPerAgentContext,
53978
54569
  buildPolicyContext,
@@ -53984,7 +54575,9 @@ export {
53984
54575
  builtinRules,
53985
54576
  checkDriftFromConfig,
53986
54577
  checkReferences,
54578
+ generateGuardrails,
53987
54579
  lint,
54580
+ loadBindings,
53988
54581
  loadConfig,
53989
54582
  loadDsl,
53990
54583
  mergeDsl,
@@ -53992,6 +54585,8 @@ export {
53992
54585
  resolve3 as resolve,
53993
54586
  resolveAllOf,
53994
54587
  resolveBase,
54588
+ resolveBindingTargetPath,
54589
+ resolveChecks,
53995
54590
  resolveDslPath,
53996
54591
  spectralLint,
53997
54592
  validateHandoffSchemas,