agent-contracts 0.24.1 → 0.30.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/dist/cli.js CHANGED
@@ -159,11 +159,11 @@ function __metadata(metadataKey, metadataValue) {
159
159
  }
160
160
  function __awaiter(thisArg, _arguments, P2, generator) {
161
161
  function adopt(value) {
162
- return value instanceof P2 ? value : new P2(function(resolve9) {
163
- resolve9(value);
162
+ return value instanceof P2 ? value : new P2(function(resolve10) {
163
+ resolve10(value);
164
164
  });
165
165
  }
166
- return new (P2 || (P2 = Promise))(function(resolve9, reject) {
166
+ return new (P2 || (P2 = Promise))(function(resolve10, reject) {
167
167
  function fulfilled(value) {
168
168
  try {
169
169
  step(generator.next(value));
@@ -179,7 +179,7 @@ function __awaiter(thisArg, _arguments, P2, generator) {
179
179
  }
180
180
  }
181
181
  function step(result) {
182
- result.done ? resolve9(result.value) : adopt(result.value).then(fulfilled, rejected);
182
+ result.done ? resolve10(result.value) : adopt(result.value).then(fulfilled, rejected);
183
183
  }
184
184
  step((generator = generator.apply(thisArg, _arguments || [])).next());
185
185
  });
@@ -370,14 +370,14 @@ function __asyncValues(o3) {
370
370
  }, i3);
371
371
  function verb(n3) {
372
372
  i3[n3] = o3[n3] && function(v2) {
373
- return new Promise(function(resolve9, reject) {
374
- v2 = o3[n3](v2), settle(resolve9, reject, v2.done, v2.value);
373
+ return new Promise(function(resolve10, reject) {
374
+ v2 = o3[n3](v2), settle(resolve10, reject, v2.done, v2.value);
375
375
  });
376
376
  };
377
377
  }
378
- function settle(resolve9, reject, d2, v2) {
378
+ function settle(resolve10, reject, d2, v2) {
379
379
  Promise.resolve(v2).then(function(v3) {
380
- resolve9({ value: v3, done: d2 });
380
+ resolve10({ value: v3, done: d2 });
381
381
  }, reject);
382
382
  }
383
383
  }
@@ -12937,13 +12937,13 @@ var require_yaml2 = __commonJS({
12937
12937
  function getLocationForJsonPath(result, path) {
12938
12938
  return (0, yaml_1.getLocationForJsonPath)(result, path);
12939
12939
  }
12940
- var parseYaml5 = (input) => (0, yaml_1.parseWithPointers)(input, {
12940
+ var parseYaml6 = (input) => (0, yaml_1.parseWithPointers)(input, {
12941
12941
  ignoreDuplicateKeys: false,
12942
12942
  mergeKeys: true,
12943
12943
  preserveKeyOrder: true,
12944
12944
  attachComments: false
12945
12945
  });
12946
- exports.parseYaml = parseYaml5;
12946
+ exports.parseYaml = parseYaml6;
12947
12947
  exports.Yaml = {
12948
12948
  parse: exports.parseYaml,
12949
12949
  getLocationForJsonPath,
@@ -13033,11 +13033,11 @@ function __metadata2(metadataKey, metadataValue) {
13033
13033
  }
13034
13034
  function __awaiter2(thisArg, _arguments, P2, generator) {
13035
13035
  function adopt(value) {
13036
- return value instanceof P2 ? value : new P2(function(resolve9) {
13037
- resolve9(value);
13036
+ return value instanceof P2 ? value : new P2(function(resolve10) {
13037
+ resolve10(value);
13038
13038
  });
13039
13039
  }
13040
- return new (P2 || (P2 = Promise))(function(resolve9, reject) {
13040
+ return new (P2 || (P2 = Promise))(function(resolve10, reject) {
13041
13041
  function fulfilled(value) {
13042
13042
  try {
13043
13043
  step(generator.next(value));
@@ -13053,7 +13053,7 @@ function __awaiter2(thisArg, _arguments, P2, generator) {
13053
13053
  }
13054
13054
  }
13055
13055
  function step(result) {
13056
- result.done ? resolve9(result.value) : adopt(result.value).then(fulfilled, rejected);
13056
+ result.done ? resolve10(result.value) : adopt(result.value).then(fulfilled, rejected);
13057
13057
  }
13058
13058
  step((generator = generator.apply(thisArg, _arguments || [])).next());
13059
13059
  });
@@ -13231,14 +13231,14 @@ function __asyncValues2(o3) {
13231
13231
  }, i3);
13232
13232
  function verb(n3) {
13233
13233
  i3[n3] = o3[n3] && function(v2) {
13234
- return new Promise(function(resolve9, reject) {
13235
- v2 = o3[n3](v2), settle(resolve9, reject, v2.done, v2.value);
13234
+ return new Promise(function(resolve10, reject) {
13235
+ v2 = o3[n3](v2), settle(resolve10, reject, v2.done, v2.value);
13236
13236
  });
13237
13237
  };
13238
13238
  }
13239
- function settle(resolve9, reject, d2, v2) {
13239
+ function settle(resolve10, reject, d2, v2) {
13240
13240
  Promise.resolve(v2).then(function(v3) {
13241
- resolve9({ value: v3, done: d2 });
13241
+ resolve10({ value: v3, done: d2 });
13242
13242
  }, reject);
13243
13243
  }
13244
13244
  }
@@ -18836,7 +18836,7 @@ function consumeBody() {
18836
18836
  let accum = [];
18837
18837
  let accumBytes = 0;
18838
18838
  let abort = false;
18839
- return new Body.Promise(function(resolve9, reject) {
18839
+ return new Body.Promise(function(resolve10, reject) {
18840
18840
  let resTimeout;
18841
18841
  if (_this4.timeout) {
18842
18842
  resTimeout = setTimeout(function() {
@@ -18870,7 +18870,7 @@ function consumeBody() {
18870
18870
  }
18871
18871
  clearTimeout(resTimeout);
18872
18872
  try {
18873
- resolve9(Buffer.concat(accum, accumBytes));
18873
+ resolve10(Buffer.concat(accum, accumBytes));
18874
18874
  } catch (err) {
18875
18875
  reject(new FetchError(`Could not create Buffer from response body for ${_this4.url}: ${err.message}`, "system", err));
18876
18876
  }
@@ -19133,7 +19133,7 @@ function fetch(url, opts) {
19133
19133
  throw new Error("native promise missing, set fetch.Promise to your favorite alternative");
19134
19134
  }
19135
19135
  Body.Promise = fetch.Promise;
19136
- return new fetch.Promise(function(resolve9, reject) {
19136
+ return new fetch.Promise(function(resolve10, reject) {
19137
19137
  const request = new Request(url, opts);
19138
19138
  const options = getNodeRequestOptions(request);
19139
19139
  const send = (options.protocol === "https:" ? https : http).request;
@@ -19266,7 +19266,7 @@ function fetch(url, opts) {
19266
19266
  requestOpts.body = void 0;
19267
19267
  requestOpts.headers.delete("content-length");
19268
19268
  }
19269
- resolve9(fetch(new Request(locationURL, requestOpts)));
19269
+ resolve10(fetch(new Request(locationURL, requestOpts)));
19270
19270
  finalize();
19271
19271
  return;
19272
19272
  }
@@ -19287,7 +19287,7 @@ function fetch(url, opts) {
19287
19287
  const codings = headers.get("Content-Encoding");
19288
19288
  if (!request.compress || request.method === "HEAD" || codings === null || res.statusCode === 204 || res.statusCode === 304) {
19289
19289
  response = new Response(body, response_options);
19290
- resolve9(response);
19290
+ resolve10(response);
19291
19291
  return;
19292
19292
  }
19293
19293
  const zlibOptions = {
@@ -19297,7 +19297,7 @@ function fetch(url, opts) {
19297
19297
  if (codings == "gzip" || codings == "x-gzip") {
19298
19298
  body = body.pipe(zlib.createGunzip(zlibOptions));
19299
19299
  response = new Response(body, response_options);
19300
- resolve9(response);
19300
+ resolve10(response);
19301
19301
  return;
19302
19302
  }
19303
19303
  if (codings == "deflate" || codings == "x-deflate") {
@@ -19309,12 +19309,12 @@ function fetch(url, opts) {
19309
19309
  body = body.pipe(zlib.createInflateRaw());
19310
19310
  }
19311
19311
  response = new Response(body, response_options);
19312
- resolve9(response);
19312
+ resolve10(response);
19313
19313
  });
19314
19314
  raw.on("end", function() {
19315
19315
  if (!response) {
19316
19316
  response = new Response(body, response_options);
19317
- resolve9(response);
19317
+ resolve10(response);
19318
19318
  }
19319
19319
  });
19320
19320
  return;
@@ -19322,11 +19322,11 @@ function fetch(url, opts) {
19322
19322
  if (codings == "br" && typeof zlib.createBrotliDecompress === "function") {
19323
19323
  body = body.pipe(zlib.createBrotliDecompress());
19324
19324
  response = new Response(body, response_options);
19325
- resolve9(response);
19325
+ resolve10(response);
19326
19326
  return;
19327
19327
  }
19328
19328
  response = new Response(body, response_options);
19329
- resolve9(response);
19329
+ resolve10(response);
19330
19330
  });
19331
19331
  writeToStream(req, request);
19332
19332
  });
@@ -20039,13 +20039,13 @@ var require_file = __commonJS({
20039
20039
  Object.defineProperty(exports, "__esModule", { value: true });
20040
20040
  var fs_1 = __require("fs");
20041
20041
  function resolveFile(ref) {
20042
- return new Promise((resolve9, reject) => {
20042
+ return new Promise((resolve10, reject) => {
20043
20043
  const path = ref.href();
20044
20044
  fs_1.readFile(path, "utf8", (err, data) => {
20045
20045
  if (err) {
20046
20046
  reject(err);
20047
20047
  } else {
20048
- resolve9(data);
20048
+ resolve10(data);
20049
20049
  }
20050
20050
  });
20051
20051
  });
@@ -27648,12 +27648,12 @@ var require_reader = __commonJS({
27648
27648
  }
27649
27649
  } else {
27650
27650
  try {
27651
- return await new Promise((resolve9, reject) => {
27651
+ return await new Promise((resolve10, reject) => {
27652
27652
  fs.readFile(name, opts.encoding, (err, data) => {
27653
27653
  if (err !== null) {
27654
27654
  reject(err);
27655
27655
  } else {
27656
- resolve9(data);
27656
+ resolve10(data);
27657
27657
  }
27658
27658
  });
27659
27659
  });
@@ -44538,14 +44538,14 @@ var require_AsyncFromSyncIteratorContinuation = __commonJS({
44538
44538
  if (!$Promise) {
44539
44539
  throw new $SyntaxError("This environment does not support Promises.");
44540
44540
  }
44541
- return new $Promise(function(resolve9) {
44541
+ return new $Promise(function(resolve10) {
44542
44542
  var done = IteratorComplete(result);
44543
44543
  var value = IteratorValue(result);
44544
44544
  var valueWrapper = PromiseResolve($Promise, value);
44545
44545
  var onFulfilled = function(value2) {
44546
44546
  return CreateIteratorResultObject(value2, done);
44547
44547
  };
44548
- resolve9($then(valueWrapper, onFulfilled));
44548
+ resolve10($then(valueWrapper, onFulfilled));
44549
44549
  });
44550
44550
  };
44551
44551
  }
@@ -45093,7 +45093,7 @@ var require_CreateAsyncFromSyncIterator = __commonJS({
45093
45093
  var O2 = this;
45094
45094
  SLOT.assert(O2, "[[SyncIteratorRecord]]");
45095
45095
  var argsLength = arguments.length;
45096
- return new $Promise(function(resolve9) {
45096
+ return new $Promise(function(resolve10) {
45097
45097
  var syncIteratorRecord = SLOT.get(O2, "[[SyncIteratorRecord]]");
45098
45098
  var result;
45099
45099
  if (argsLength > 0) {
@@ -45101,7 +45101,7 @@ var require_CreateAsyncFromSyncIterator = __commonJS({
45101
45101
  } else {
45102
45102
  result = IteratorNext(syncIteratorRecord);
45103
45103
  }
45104
- resolve9(AsyncFromSyncIteratorContinuation(result));
45104
+ resolve10(AsyncFromSyncIteratorContinuation(result));
45105
45105
  });
45106
45106
  },
45107
45107
  "return": function() {
@@ -45112,12 +45112,12 @@ var require_CreateAsyncFromSyncIterator = __commonJS({
45112
45112
  SLOT.assert(O2, "[[SyncIteratorRecord]]");
45113
45113
  var valueIsPresent = arguments.length > 0;
45114
45114
  var value = valueIsPresent ? arguments[0] : void 0;
45115
- return new $Promise(function(resolve9, reject) {
45115
+ return new $Promise(function(resolve10, reject) {
45116
45116
  var syncIterator = SLOT.get(O2, "[[SyncIteratorRecord]]")["[[Iterator]]"];
45117
45117
  var iteratorReturn = GetMethod(syncIterator, "return");
45118
45118
  if (typeof iteratorReturn === "undefined") {
45119
45119
  var iterResult = CreateIteratorResultObject(value, true);
45120
- Call(resolve9, void 0, [iterResult]);
45120
+ Call(resolve10, void 0, [iterResult]);
45121
45121
  return;
45122
45122
  }
45123
45123
  var result;
@@ -45130,7 +45130,7 @@ var require_CreateAsyncFromSyncIterator = __commonJS({
45130
45130
  Call(reject, void 0, [new $TypeError("Iterator `return` method returned a non-object value.")]);
45131
45131
  return;
45132
45132
  }
45133
- resolve9(AsyncFromSyncIteratorContinuation(result));
45133
+ resolve10(AsyncFromSyncIteratorContinuation(result));
45134
45134
  });
45135
45135
  },
45136
45136
  "throw": function() {
@@ -45141,7 +45141,7 @@ var require_CreateAsyncFromSyncIterator = __commonJS({
45141
45141
  SLOT.assert(O2, "[[SyncIteratorRecord]]");
45142
45142
  var valueIsPresent = arguments.length > 0;
45143
45143
  var value = valueIsPresent ? arguments[0] : void 0;
45144
- return new $Promise(function(resolve9, reject) {
45144
+ return new $Promise(function(resolve10, reject) {
45145
45145
  var syncIterator = SLOT.get(O2, "[[SyncIteratorRecord]]")["[[Iterator]]"];
45146
45146
  var throwMethod = GetMethod(syncIterator, "throw");
45147
45147
  if (typeof throwMethod === "undefined") {
@@ -45158,7 +45158,7 @@ var require_CreateAsyncFromSyncIterator = __commonJS({
45158
45158
  Call(reject, void 0, [new $TypeError("Iterator `throw` method returned a non-object value.")]);
45159
45159
  return;
45160
45160
  }
45161
- resolve9(AsyncFromSyncIteratorContinuation(
45161
+ resolve10(AsyncFromSyncIteratorContinuation(
45162
45162
  result
45163
45163
  /* , promiseCapability */
45164
45164
  ));
@@ -48889,9 +48889,9 @@ var require_dist14 = __commonJS({
48889
48889
  });
48890
48890
 
48891
48891
  // src/cli/cli.ts
48892
- import { readFileSync as readFileSync2 } from "fs";
48892
+ import { readFileSync as readFileSync3 } from "fs";
48893
48893
  import { fileURLToPath } from "url";
48894
- import { resolve as resolve8, dirname as dirname8 } from "path";
48894
+ import { resolve as resolve9, dirname as dirname8 } from "path";
48895
48895
 
48896
48896
  // src/generated/cli-contract/program.ts
48897
48897
  import { Command } from "commander";
@@ -48930,9 +48930,9 @@ function derivePolicy(input) {
48930
48930
  const riskLevels = [];
48931
48931
  let executionMode;
48932
48932
  let explicitConfirmation;
48933
- if (input.commandEffects) {
48934
- const ce2 = input.commandEffects;
48935
- riskLevels.push(ce2.riskLevel ?? "low");
48933
+ if (input.command_effects) {
48934
+ const ce2 = input.command_effects;
48935
+ riskLevels.push(ce2.risk_level ?? "low");
48936
48936
  if (ce2.writes) {
48937
48937
  sideEffects.add("file_write");
48938
48938
  for (const w2 of ce2.writes) {
@@ -48943,9 +48943,9 @@ function derivePolicy(input) {
48943
48943
  overwrite: w2.overwrite,
48944
48944
  destructive: w2.destructive,
48945
48945
  ...w2.idempotent !== void 0 ? { idempotent: w2.idempotent } : {},
48946
- ...w2.idempotencyKey ? { idempotencyKey: w2.idempotencyKey } : {},
48947
- ...w2.idempotentNote ? { idempotentNote: w2.idempotentNote } : {},
48948
- source: `command:${input.commandId}`
48946
+ ...w2.idempotency_key ? { idempotency_key: w2.idempotency_key } : {},
48947
+ ...w2.idempotent_note ? { idempotent_note: w2.idempotent_note } : {},
48948
+ source: `command:${input.command_id}`
48949
48949
  });
48950
48950
  }
48951
48951
  }
@@ -48955,7 +48955,7 @@ function derivePolicy(input) {
48955
48955
  kind: "semantic",
48956
48956
  target: r3.target,
48957
48957
  description: r3.description,
48958
- source: `command:${input.commandId}`
48958
+ source: `command:${input.command_id}`
48959
48959
  });
48960
48960
  }
48961
48961
  }
@@ -48966,17 +48966,17 @@ function derivePolicy(input) {
48966
48966
  ...ce2.network.description ? { description: ce2.network.description } : {},
48967
48967
  ...ce2.network.domains ? { domains: ce2.network.domains } : {},
48968
48968
  ...ce2.network.idempotent !== void 0 ? { idempotent: ce2.network.idempotent } : {},
48969
- ...ce2.network.idempotencyKey ? { idempotencyKey: ce2.network.idempotencyKey } : {},
48970
- ...ce2.network.idempotentNote ? { idempotentNote: ce2.network.idempotentNote } : {},
48971
- source: `command:${input.commandId}`
48969
+ ...ce2.network.idempotency_key ? { idempotency_key: ce2.network.idempotency_key } : {},
48970
+ ...ce2.network.idempotent_note ? { idempotent_note: ce2.network.idempotent_note } : {},
48971
+ source: `command:${input.command_id}`
48972
48972
  });
48973
48973
  }
48974
48974
  }
48975
- if (ce2.executionMode) {
48976
- executionMode = ce2.executionMode;
48975
+ if (ce2.execution_mode) {
48976
+ executionMode = ce2.execution_mode;
48977
48977
  }
48978
- if (ce2.requiresConfirmation !== void 0) {
48979
- explicitConfirmation = ce2.requiresConfirmation;
48978
+ if (ce2.requires_confirmation !== void 0) {
48979
+ explicitConfirmation = ce2.requires_confirmation;
48980
48980
  }
48981
48981
  }
48982
48982
  for (const [optName, optInput] of Object.entries(input.options)) {
@@ -49007,7 +49007,7 @@ function derivePolicy(input) {
49007
49007
  }
49008
49008
  if (definition.effects) {
49009
49009
  const eff = definition.effects;
49010
- riskLevels.push(eff.riskLevel ?? "low");
49010
+ riskLevels.push(eff.risk_level ?? "low");
49011
49011
  if (eff.writes) {
49012
49012
  sideEffects.add("file_write");
49013
49013
  for (const w2 of eff.writes) {
@@ -49018,8 +49018,8 @@ function derivePolicy(input) {
49018
49018
  overwrite: w2.overwrite,
49019
49019
  destructive: w2.destructive,
49020
49020
  ...w2.idempotent !== void 0 ? { idempotent: w2.idempotent } : {},
49021
- ...w2.idempotencyKey ? { idempotencyKey: w2.idempotencyKey } : {},
49022
- ...w2.idempotentNote ? { idempotentNote: w2.idempotentNote } : {},
49021
+ ...w2.idempotency_key ? { idempotency_key: w2.idempotency_key } : {},
49022
+ ...w2.idempotent_note ? { idempotent_note: w2.idempotent_note } : {},
49023
49023
  source: `option:${optName}`
49024
49024
  });
49025
49025
  }
@@ -49041,17 +49041,17 @@ function derivePolicy(input) {
49041
49041
  ...eff.network.description ? { description: eff.network.description } : {},
49042
49042
  ...eff.network.domains ? { domains: eff.network.domains } : {},
49043
49043
  ...eff.network.idempotent !== void 0 ? { idempotent: eff.network.idempotent } : {},
49044
- ...eff.network.idempotencyKey ? { idempotencyKey: eff.network.idempotencyKey } : {},
49045
- ...eff.network.idempotentNote ? { idempotentNote: eff.network.idempotentNote } : {},
49044
+ ...eff.network.idempotency_key ? { idempotency_key: eff.network.idempotency_key } : {},
49045
+ ...eff.network.idempotent_note ? { idempotent_note: eff.network.idempotent_note } : {},
49046
49046
  source: `option:${optName}`
49047
49047
  });
49048
49048
  }
49049
49049
  }
49050
- if (eff.executionMode && !executionMode) {
49051
- executionMode = eff.executionMode;
49050
+ if (eff.execution_mode && !executionMode) {
49051
+ executionMode = eff.execution_mode;
49052
49052
  }
49053
- if (eff.requiresConfirmation !== void 0 && explicitConfirmation === void 0) {
49054
- explicitConfirmation = eff.requiresConfirmation;
49053
+ if (eff.requires_confirmation !== void 0 && explicitConfirmation === void 0) {
49054
+ explicitConfirmation = eff.requires_confirmation;
49055
49055
  }
49056
49056
  }
49057
49057
  }
@@ -49072,15 +49072,15 @@ function derivePolicy(input) {
49072
49072
  const semanticWrites = writes.filter((w2) => w2.kind === "semantic");
49073
49073
  const idempotent = semanticWrites.every((w2) => w2.idempotent === true) && networkEffects.every((n3) => n3.idempotent === true);
49074
49074
  return {
49075
- riskLevel: finalRiskLevel,
49076
- requiresConfirmation,
49075
+ risk_level: finalRiskLevel,
49076
+ requires_confirmation: requiresConfirmation,
49077
49077
  idempotent,
49078
- sideEffects: [...sideEffects],
49078
+ side_effects: [...sideEffects],
49079
49079
  reads,
49080
49080
  writes,
49081
49081
  ...networkEffects.length > 0 ? { network: networkEffects } : {},
49082
- ...executionMode ? { executionMode } : {},
49083
- ...requiresSecrets ? { requiresSecrets } : {}
49082
+ ...executionMode ? { execution_mode: executionMode } : {},
49083
+ ...requiresSecrets ? { requires_secrets: requiresSecrets } : {}
49084
49084
  };
49085
49085
  }
49086
49086
 
@@ -49096,7 +49096,7 @@ var commandDefinitions = {
49096
49096
  "file": {
49097
49097
  "mode": "read",
49098
49098
  "exists": false,
49099
- "mediaType": "application/yaml",
49099
+ "media_type": "application/yaml",
49100
49100
  "encoding": "utf-8"
49101
49101
  }
49102
49102
  },
@@ -49136,7 +49136,7 @@ var commandDefinitions = {
49136
49136
  "file": {
49137
49137
  "mode": "read",
49138
49138
  "exists": false,
49139
- "mediaType": "application/yaml",
49139
+ "media_type": "application/yaml",
49140
49140
  "encoding": "utf-8"
49141
49141
  }
49142
49142
  },
@@ -49183,7 +49183,7 @@ var commandDefinitions = {
49183
49183
  "file": {
49184
49184
  "mode": "read",
49185
49185
  "exists": false,
49186
- "mediaType": "application/yaml",
49186
+ "media_type": "application/yaml",
49187
49187
  "encoding": "utf-8"
49188
49188
  }
49189
49189
  },
@@ -49222,14 +49222,14 @@ var commandDefinitions = {
49222
49222
  },
49223
49223
  "render": {
49224
49224
  "effects": {
49225
- "riskLevel": "medium",
49225
+ "risk_level": "medium",
49226
49226
  "writes": [
49227
49227
  {
49228
49228
  "target": "configured render output paths",
49229
49229
  "description": "rendered template files from DSL input",
49230
49230
  "overwrite": true,
49231
49231
  "idempotent": true,
49232
- "idempotentNote": "Output is deterministic from DSL input and templates. Repeated runs produce identical files."
49232
+ "idempotent_note": "Output is deterministic from DSL input and templates. Repeated runs produce identical files."
49233
49233
  }
49234
49234
  ]
49235
49235
  },
@@ -49242,7 +49242,7 @@ var commandDefinitions = {
49242
49242
  "file": {
49243
49243
  "mode": "read",
49244
49244
  "exists": false,
49245
- "mediaType": "application/yaml",
49245
+ "media_type": "application/yaml",
49246
49246
  "encoding": "utf-8"
49247
49247
  }
49248
49248
  },
@@ -49278,7 +49278,7 @@ var commandDefinitions = {
49278
49278
  "file": {
49279
49279
  "mode": "read",
49280
49280
  "exists": false,
49281
- "mediaType": "application/yaml",
49281
+ "media_type": "application/yaml",
49282
49282
  "encoding": "utf-8"
49283
49283
  }
49284
49284
  },
@@ -49325,7 +49325,7 @@ var commandDefinitions = {
49325
49325
  "file": {
49326
49326
  "mode": "read",
49327
49327
  "exists": false,
49328
- "mediaType": "application/yaml",
49328
+ "media_type": "application/yaml",
49329
49329
  "encoding": "utf-8"
49330
49330
  }
49331
49331
  },
@@ -49356,11 +49356,11 @@ var commandDefinitions = {
49356
49356
  },
49357
49357
  "audit": {
49358
49358
  "effects": {
49359
- "riskLevel": "medium",
49359
+ "risk_level": "medium",
49360
49360
  "network": {
49361
49361
  "description": "LLM API calls to configured adapter (e.g. OpenAI, Gemini, Cursor). Incurs token cost and sends DSL content to the LLM provider.",
49362
49362
  "idempotent": false,
49363
- "idempotentNote": "LLM inference is non-deterministic \u2014 identical inputs may produce different findings across runs."
49363
+ "idempotent_note": "LLM inference is non-deterministic \u2014 identical inputs may produce different findings across runs."
49364
49364
  }
49365
49365
  },
49366
49366
  "options": [
@@ -49372,7 +49372,7 @@ var commandDefinitions = {
49372
49372
  "file": {
49373
49373
  "mode": "read",
49374
49374
  "exists": false,
49375
- "mediaType": "application/yaml",
49375
+ "media_type": "application/yaml",
49376
49376
  "encoding": "utf-8"
49377
49377
  }
49378
49378
  },
@@ -49458,14 +49458,14 @@ var commandDefinitions = {
49458
49458
  },
49459
49459
  "generate": {
49460
49460
  "effects": {
49461
- "riskLevel": "low",
49461
+ "risk_level": "low",
49462
49462
  "writes": [
49463
49463
  {
49464
49464
  "target": "configured render, guardrail, and interface output paths",
49465
49465
  "description": "template files, guardrail binding files, and/or team interface files generated from DSL input",
49466
49466
  "overwrite": true,
49467
49467
  "idempotent": true,
49468
- "idempotentNote": "Output is deterministic from DSL input, templates, policies, and bindings. Repeated runs produce identical files."
49468
+ "idempotent_note": "Output is deterministic from DSL input, templates, policies, and bindings. Repeated runs produce identical files."
49469
49469
  }
49470
49470
  ]
49471
49471
  },
@@ -49478,7 +49478,7 @@ var commandDefinitions = {
49478
49478
  "file": {
49479
49479
  "mode": "read",
49480
49480
  "exists": false,
49481
- "mediaType": "application/yaml",
49481
+ "media_type": "application/yaml",
49482
49482
  "encoding": "utf-8"
49483
49483
  }
49484
49484
  },
@@ -49509,7 +49509,7 @@ var commandDefinitions = {
49509
49509
  },
49510
49510
  "file": {
49511
49511
  "mode": "write",
49512
- "mediaType": "application/yaml",
49512
+ "media_type": "application/yaml",
49513
49513
  "encoding": "utf-8"
49514
49514
  }
49515
49515
  },
@@ -49539,29 +49539,75 @@ var commandDefinitions = {
49539
49539
  }
49540
49540
  }
49541
49541
  ]
49542
+ },
49543
+ "navigation-index": {
49544
+ "options": [
49545
+ {
49546
+ "name": "config",
49547
+ "schema": {
49548
+ "type": "string"
49549
+ },
49550
+ "file": {
49551
+ "mode": "read",
49552
+ "exists": false,
49553
+ "media_type": "application/yaml",
49554
+ "encoding": "utf-8"
49555
+ }
49556
+ },
49557
+ {
49558
+ "name": "team",
49559
+ "schema": {
49560
+ "type": "string"
49561
+ }
49562
+ },
49563
+ {
49564
+ "name": "format",
49565
+ "schema": {
49566
+ "type": "string",
49567
+ "enum": [
49568
+ "json",
49569
+ "yaml"
49570
+ ],
49571
+ "default": "json"
49572
+ }
49573
+ },
49574
+ {
49575
+ "name": "artifact",
49576
+ "schema": {
49577
+ "type": "string"
49578
+ }
49579
+ },
49580
+ {
49581
+ "name": "quiet",
49582
+ "schema": {
49583
+ "type": "boolean",
49584
+ "default": false
49585
+ }
49586
+ }
49587
+ ]
49542
49588
  }
49543
49589
  };
49544
- function deriveCommandPolicy(commandId, optionValues) {
49545
- const def = commandDefinitions[commandId];
49546
- if (!def) throw new Error(`Unknown command: ${commandId}`);
49590
+ function deriveCommandPolicy(command_id, optionValues) {
49591
+ const def = commandDefinitions[command_id];
49592
+ if (!def) throw new Error(`Unknown command: ${command_id}`);
49547
49593
  const cmdDef = def;
49548
49594
  const options = {};
49549
- const activeOptions = [];
49595
+ const active_options = [];
49550
49596
  for (const optDef of cmdDef.options ?? []) {
49551
49597
  const value = optionValues[optDef.name];
49552
49598
  const specified = optDef.name in optionValues && value !== void 0;
49553
49599
  options[optDef.name] = { value, specified, definition: optDef };
49554
49600
  if (isOptionActive(optDef, value, specified)) {
49555
- activeOptions.push(optDef.name);
49601
+ active_options.push(optDef.name);
49556
49602
  }
49557
49603
  }
49558
49604
  const policy = derivePolicy({
49559
- commandId,
49560
- commandEffects: cmdDef.effects,
49605
+ command_id,
49606
+ command_effects: cmdDef.effects,
49561
49607
  options,
49562
49608
  env: cmdDef.env
49563
49609
  });
49564
- return { command: commandId, activeOptions, policy };
49610
+ return { command: command_id, active_options, policy };
49565
49611
  }
49566
49612
 
49567
49613
  // src/generated/cli-contract/program.ts
@@ -49641,16 +49687,25 @@ function createProgram(handlers2, version) {
49641
49687
  }
49642
49688
  await handlers2.generate(type, opts, globalOpts);
49643
49689
  });
49690
+ program2.command("navigation-index").description("Build artifact-centric navigation index from resolved DSL.").argument("[dir]", "Path to agent-contracts.yaml.").option("-c, --config <path>", "Path to agent-contracts.config.yaml.").option("--team <id>", "Limit to one team (multi-team config only).").option("--format <format>", "Output format.", "json").option("--artifact <id>", "Filter output to a single artifact by ID.").option("--quiet", "Suppress informational output.", false).action(async (dir, opts, cmd) => {
49691
+ const globalOpts = cmd.optsWithGlobals();
49692
+ if (globalOpts.introspect) {
49693
+ const policy = deriveCommandPolicy("navigation-index", opts);
49694
+ console.log(JSON.stringify(policy, null, 2));
49695
+ return;
49696
+ }
49697
+ await handlers2.navigationIndex(dir, opts, globalOpts);
49698
+ });
49644
49699
  return program2;
49645
49700
  }
49646
49701
 
49647
49702
  // src/cli/handlers.ts
49648
49703
  import { writeFileSync as writeFileSync2 } from "fs";
49649
- import { existsSync, readFileSync } from "fs";
49704
+ import { existsSync as existsSync2, readFileSync as readFileSync2 } from "fs";
49650
49705
  import { join as join3, dirname as dirname7 } from "path";
49651
49706
  import { resolve as pathResolve } from "path";
49652
49707
  import { access as access2 } from "fs/promises";
49653
- import { stringify as stringify3, parse as parseYaml4 } from "yaml";
49708
+ import { stringify as stringify3, parse as parseYaml5 } from "yaml";
49654
49709
 
49655
49710
  // src/config/binding-loader.ts
49656
49711
  import { readFile as readFile3 } from "fs/promises";
@@ -49690,6 +49745,7 @@ var PrerequisiteSchema = z.object({
49690
49745
  var AgentSchema = z.object({
49691
49746
  role_name: z.string(),
49692
49747
  purpose: z.string(),
49748
+ own_artifacts: z.array(z.string()).default([]),
49693
49749
  can_read_artifacts: z.array(z.string()).default([]),
49694
49750
  can_write_artifacts: z.array(z.string()).default([]),
49695
49751
  can_execute_tools: z.array(z.string()).default([]),
@@ -49745,11 +49801,12 @@ var CONTEXT_TYPES = [
49745
49801
  "policy",
49746
49802
  "guardrail",
49747
49803
  "guardrail_policy",
49748
- "system"
49804
+ "system",
49805
+ "navigation_index"
49749
49806
  ];
49750
49807
  var ContextTypeSchema = z3.enum(CONTEXT_TYPES);
49751
49808
  var ITERABLE_CONTEXT_TYPES = CONTEXT_TYPES.filter(
49752
- (t3) => t3 !== "system"
49809
+ (t3) => t3 !== "system" && t3 !== "navigation_index"
49753
49810
  );
49754
49811
 
49755
49812
  // src/schema/binding.ts
@@ -49923,6 +49980,8 @@ var ExecutionStepSchema = z9.object({
49923
49980
  uses_tool: z9.string().optional(),
49924
49981
  produces_artifact: z9.string().optional(),
49925
49982
  reads_artifact: z9.string().optional(),
49983
+ validates_artifact: z9.string().optional(),
49984
+ validation_kind: z9.enum(["schema", "mechanical", "semantic", "approval", "provenance", "traceability", "fidelity"]).optional(),
49926
49985
  depends_on: z9.array(z9.string()).optional(),
49927
49986
  skip_condition: z9.string().optional(),
49928
49987
  wait_for_approval: z9.boolean().optional()
@@ -49985,11 +50044,15 @@ var CommandSchema = z12.object({
49985
50044
  purpose: z12.string().optional()
49986
50045
  });
49987
50046
  var ToolSchema = z12.object({
49988
- kind: z12.string(),
50047
+ kind: z12.string().optional(),
50048
+ extends: z12.string().optional(),
50049
+ command: z12.string().optional(),
49989
50050
  description: z12.string().optional(),
49990
50051
  input_artifacts: z12.array(z12.string()).default([]),
49991
50052
  output_artifacts: z12.array(z12.string()).default([]),
49992
50053
  invokable_by: z12.array(z12.string()).default([]),
50054
+ cli_contract: z12.string().optional(),
50055
+ artifact_bindings: z12.record(z12.string(), z12.string()).default({}),
49993
50056
  side_effects: z12.array(z12.string()).default([]),
49994
50057
  commands: z12.array(CommandSchema).default([]),
49995
50058
  guardrails: z12.array(z12.string()).optional()
@@ -50000,8 +50063,8 @@ import { z as z13 } from "zod";
50000
50063
  var ValidationSchema = z13.object({
50001
50064
  target_artifact: z13.string(),
50002
50065
  kind: z13.enum(["schema", "mechanical", "semantic", "approval", "provenance", "traceability", "fidelity"]),
50003
- executor_type: z13.enum(["tool", "agent"]),
50004
- executor: z13.string(),
50066
+ executor_type: z13.enum(["tool", "agent"]).optional(),
50067
+ executor: z13.string().optional(),
50005
50068
  blocking: z13.boolean(),
50006
50069
  produces_evidence: z13.string().optional(),
50007
50070
  description: z13.string().optional()
@@ -51134,6 +51197,123 @@ function mergeDsl(base, project) {
51134
51197
 
51135
51198
  // src/resolver/resolve.ts
51136
51199
  import { dirname as dirname3, resolve as resolvePath } from "path";
51200
+
51201
+ // src/resolver/tool-extends.ts
51202
+ var ToolExtendsError = class extends Error {
51203
+ constructor(message) {
51204
+ super(message);
51205
+ this.name = "ToolExtendsError";
51206
+ }
51207
+ };
51208
+ function asStringArray(value) {
51209
+ return Array.isArray(value) ? value : [];
51210
+ }
51211
+ function asRecord(value) {
51212
+ if (value !== null && typeof value === "object" && !Array.isArray(value)) {
51213
+ return value;
51214
+ }
51215
+ return {};
51216
+ }
51217
+ function asCommands(value) {
51218
+ return Array.isArray(value) ? value : [];
51219
+ }
51220
+ function isUnset(value) {
51221
+ return value === void 0 || value === null;
51222
+ }
51223
+ function mergeToolFields(base, child) {
51224
+ const merged = { ...child };
51225
+ merged.artifact_bindings = {
51226
+ ...asRecord(base.artifact_bindings),
51227
+ ...asRecord(child.artifact_bindings)
51228
+ };
51229
+ if (isUnset(child.kind) && !isUnset(base.kind)) {
51230
+ merged.kind = base.kind;
51231
+ }
51232
+ if (isUnset(child.cli_contract) && !isUnset(base.cli_contract)) {
51233
+ merged.cli_contract = base.cli_contract;
51234
+ }
51235
+ if (isUnset(child.description) && !isUnset(base.description)) {
51236
+ merged.description = base.description;
51237
+ }
51238
+ const childInvokableBy = asStringArray(child.invokable_by);
51239
+ const baseInvokableBy = asStringArray(base.invokable_by);
51240
+ if (childInvokableBy.length === 0 && baseInvokableBy.length > 0) {
51241
+ merged.invokable_by = [...baseInvokableBy];
51242
+ }
51243
+ const childInputArtifacts = asStringArray(child.input_artifacts);
51244
+ const baseInputArtifacts = asStringArray(base.input_artifacts);
51245
+ if (childInputArtifacts.length === 0 && baseInputArtifacts.length > 0) {
51246
+ merged.input_artifacts = [...baseInputArtifacts];
51247
+ }
51248
+ const childOutputArtifacts = asStringArray(child.output_artifacts);
51249
+ const baseOutputArtifacts = asStringArray(base.output_artifacts);
51250
+ if (childOutputArtifacts.length === 0 && baseOutputArtifacts.length > 0) {
51251
+ merged.output_artifacts = [...baseOutputArtifacts];
51252
+ }
51253
+ const childSideEffects = asStringArray(child.side_effects);
51254
+ const baseSideEffects = asStringArray(base.side_effects);
51255
+ if (childSideEffects.length === 0 && baseSideEffects.length > 0) {
51256
+ merged.side_effects = [...baseSideEffects];
51257
+ }
51258
+ const childCommands = asCommands(child.commands);
51259
+ const baseCommands = asCommands(base.commands);
51260
+ if (childCommands.length === 0 && baseCommands.length > 0) {
51261
+ merged.commands = [...baseCommands];
51262
+ }
51263
+ if (isUnset(child.guardrails) && !isUnset(base.guardrails)) {
51264
+ merged.guardrails = base.guardrails;
51265
+ }
51266
+ return merged;
51267
+ }
51268
+ function resolveToolChain(id, tools, resolving, resolved) {
51269
+ const cached = resolved.get(id);
51270
+ if (cached !== void 0) {
51271
+ return cached;
51272
+ }
51273
+ const tool = tools[id];
51274
+ if (tool === void 0) {
51275
+ throw new ToolExtendsError(`Tool "${id}" not found`);
51276
+ }
51277
+ const extendsId = tool.extends;
51278
+ if (extendsId === void 0) {
51279
+ resolved.set(id, tool);
51280
+ return tool;
51281
+ }
51282
+ if (resolving.has(id)) {
51283
+ throw new ToolExtendsError(
51284
+ `Circular tool extends detected involving "${id}"`
51285
+ );
51286
+ }
51287
+ const baseTool = tools[extendsId];
51288
+ if (baseTool === void 0) {
51289
+ resolved.set(id, tool);
51290
+ return tool;
51291
+ }
51292
+ resolving.add(id);
51293
+ try {
51294
+ const resolvedBase = resolveToolChain(
51295
+ extendsId,
51296
+ tools,
51297
+ resolving,
51298
+ resolved
51299
+ );
51300
+ const merged = mergeToolFields(resolvedBase, tool);
51301
+ resolved.set(id, merged);
51302
+ return merged;
51303
+ } finally {
51304
+ resolving.delete(id);
51305
+ }
51306
+ }
51307
+ function resolveToolExtends(tools) {
51308
+ const resolved = /* @__PURE__ */ new Map();
51309
+ const result = {};
51310
+ for (const id of Object.keys(tools)) {
51311
+ result[id] = resolveToolChain(id, tools, /* @__PURE__ */ new Set(), resolved);
51312
+ }
51313
+ return result;
51314
+ }
51315
+
51316
+ // src/resolver/resolve.ts
51137
51317
  async function resolveExtendsChain(data, filePath, seen) {
51138
51318
  const extendsValue = data["extends"];
51139
51319
  if (typeof extendsValue !== "string") {
@@ -51163,6 +51343,10 @@ async function resolve4(projectDirOrFile) {
51163
51343
  projectResult.filePath,
51164
51344
  /* @__PURE__ */ new Set()
51165
51345
  );
51346
+ const tools = data["tools"];
51347
+ if (tools !== void 0 && tools !== null && typeof tools === "object" && !Array.isArray(tools)) {
51348
+ data["tools"] = resolveToolExtends(tools);
51349
+ }
51166
51350
  return {
51167
51351
  data,
51168
51352
  projectPath: projectResult.filePath,
@@ -52103,6 +52287,9 @@ function checkReferences(dsl) {
52103
52287
  }
52104
52288
  }
52105
52289
  for (const [id, agent] of Object.entries(dsl.agents)) {
52290
+ for (const ref of agent.own_artifacts) {
52291
+ checkExists(ref, artifactIds, "artifacts", `agents.${id}.own_artifacts`);
52292
+ }
52106
52293
  for (const ref of agent.can_read_artifacts) {
52107
52294
  checkExists(ref, artifactIds, "artifacts", `agents.${id}.can_read_artifacts`);
52108
52295
  }
@@ -52148,7 +52335,7 @@ function checkReferences(dsl) {
52148
52335
  for (const [id, art] of Object.entries(dsl.artifacts)) {
52149
52336
  if (art.owner) {
52150
52337
  const ownerAgent = dsl.agents[art.owner];
52151
- if (ownerAgent && !ownerAgent.can_read_artifacts.includes(id)) {
52338
+ if (ownerAgent && ownerAgent.can_read_artifacts.length > 0 && !ownerAgent.can_read_artifacts.includes(id)) {
52152
52339
  diagnostics.push({
52153
52340
  path: `artifacts.${id}.owner`,
52154
52341
  message: `Agent "${art.owner}" owns artifact "${id}" but cannot read it (missing from can_read_artifacts)`,
@@ -52158,7 +52345,7 @@ function checkReferences(dsl) {
52158
52345
  }
52159
52346
  for (const valId of art.required_validations) {
52160
52347
  const validation = dsl.validations[valId];
52161
- if (validation?.executor_type === "tool") {
52348
+ if (validation?.executor_type === "tool" && validation.executor) {
52162
52349
  const tool = dsl.tools[validation.executor];
52163
52350
  if (tool && tool.invokable_by.length === 0) {
52164
52351
  diagnostics.push({
@@ -52171,17 +52358,29 @@ function checkReferences(dsl) {
52171
52358
  }
52172
52359
  }
52173
52360
  for (const [id, tool] of Object.entries(dsl.tools)) {
52361
+ if (tool.extends) {
52362
+ checkExists(
52363
+ tool.extends,
52364
+ toolIds,
52365
+ "tools",
52366
+ `tools.${id}.extends`,
52367
+ "tool-extends-not-found"
52368
+ );
52369
+ }
52174
52370
  if (tool.invokable_by.length > 0) {
52175
52371
  for (const ref of tool.invokable_by) {
52176
52372
  checkExists(ref, agentIds, "agents", `tools.${id}.invokable_by`);
52177
52373
  }
52178
52374
  }
52375
+ for (const ref of Object.values(tool.artifact_bindings)) {
52376
+ checkExists(ref, artifactIds, "artifacts", `tools.${id}.artifact_bindings`);
52377
+ }
52179
52378
  }
52180
52379
  for (const [id, val] of Object.entries(dsl.validations)) {
52181
52380
  checkExists(val.target_artifact, artifactIds, "artifacts", `validations.${id}.target_artifact`);
52182
- if (val.executor_type === "tool") {
52381
+ if (val.executor_type === "tool" && val.executor) {
52183
52382
  checkExists(val.executor, toolIds, "tools", `validations.${id}.executor`);
52184
- } else if (val.executor_type === "agent") {
52383
+ } else if (val.executor_type === "agent" && val.executor) {
52185
52384
  checkExists(val.executor, agentIds, "agents", `validations.${id}.executor`);
52186
52385
  }
52187
52386
  }
@@ -52250,14 +52449,16 @@ function checkReferences(dsl) {
52250
52449
  code: "result-handoff-not-returnable"
52251
52450
  });
52252
52451
  }
52253
- for (let j2 = 0; j2 < task.input_artifacts.length; j2++) {
52254
- const inputId = task.input_artifacts[j2];
52255
- if (!targetAgent.can_read_artifacts.includes(inputId)) {
52256
- diagnostics.push({
52257
- path: `tasks.${id}.input_artifacts[${j2}]`,
52258
- message: `Input artifact "${inputId}" is not in target agent "${task.target_agent}" can_read_artifacts`,
52259
- code: "input-artifact-not-readable"
52260
- });
52452
+ if (targetAgent.can_read_artifacts.length > 0) {
52453
+ for (let j2 = 0; j2 < task.input_artifacts.length; j2++) {
52454
+ const inputId = task.input_artifacts[j2];
52455
+ if (!targetAgent.can_read_artifacts.includes(inputId)) {
52456
+ diagnostics.push({
52457
+ path: `tasks.${id}.input_artifacts[${j2}]`,
52458
+ message: `Input artifact "${inputId}" is not in target agent "${task.target_agent}" can_read_artifacts`,
52459
+ code: "input-artifact-not-readable"
52460
+ });
52461
+ }
52261
52462
  }
52262
52463
  }
52263
52464
  }
@@ -52273,7 +52474,7 @@ function checkReferences(dsl) {
52273
52474
  if (agent.prerequisites) {
52274
52475
  for (let j2 = 0; j2 < agent.prerequisites.length; j2++) {
52275
52476
  const pre = agent.prerequisites[j2];
52276
- if (!agent.can_read_artifacts.includes(pre.target)) {
52477
+ if (agent.can_read_artifacts.length > 0 && !agent.can_read_artifacts.includes(pre.target)) {
52277
52478
  diagnostics.push({
52278
52479
  path: `agents.${id}.prerequisites[${j2}].target`,
52279
52480
  message: `Prerequisite target "${pre.target}" is not in agent "${id}" can_read_artifacts`,
@@ -52605,7 +52806,7 @@ var toolExecutionRule = {
52605
52806
  }
52606
52807
  }
52607
52808
  for (const [valId, val] of Object.entries(dsl.validations)) {
52608
- if (val.executor_type !== "tool") continue;
52809
+ if (val.executor_type !== "tool" || !val.executor) continue;
52609
52810
  const hasExecutor = Object.values(dsl.agents).some(
52610
52811
  (a3) => a3.can_execute_tools.includes(val.executor)
52611
52812
  );
@@ -52664,14 +52865,16 @@ var taskAgentBindingRule = {
52664
52865
  for (const [taskId, task] of Object.entries(dsl.tasks)) {
52665
52866
  const targetAgent = dsl.agents[task.target_agent];
52666
52867
  if (!targetAgent) continue;
52667
- for (const ref of task.input_artifacts) {
52668
- if (!targetAgent.can_read_artifacts.includes(ref)) {
52669
- diagnostics.push({
52670
- ruleId: "task-agent-binding",
52671
- severity: "error",
52672
- path: `tasks.${taskId}.input_artifacts`,
52673
- message: `Task "${taskId}" input_artifact "${ref}" not in target agent "${task.target_agent}" can_read_artifacts`
52674
- });
52868
+ if (targetAgent.can_read_artifacts.length > 0) {
52869
+ for (const ref of task.input_artifacts) {
52870
+ if (!targetAgent.can_read_artifacts.includes(ref)) {
52871
+ diagnostics.push({
52872
+ ruleId: "task-agent-binding",
52873
+ severity: "error",
52874
+ path: `tasks.${taskId}.input_artifacts`,
52875
+ message: `Task "${taskId}" input_artifact "${ref}" not in target agent "${task.target_agent}" can_read_artifacts`
52876
+ });
52877
+ }
52675
52878
  }
52676
52879
  }
52677
52880
  if (!targetAgent.can_return_handoffs.includes(task.result_handoff)) {
@@ -52707,7 +52910,7 @@ var taskAgentBindingRule = {
52707
52910
  });
52708
52911
  }
52709
52912
  }
52710
- if (step.produces_artifact) {
52913
+ if (step.produces_artifact && targetAgent.can_write_artifacts.length > 0) {
52711
52914
  if (!targetAgent.can_write_artifacts.includes(step.produces_artifact)) {
52712
52915
  diagnostics.push({
52713
52916
  ruleId: "task-agent-binding",
@@ -52717,7 +52920,7 @@ var taskAgentBindingRule = {
52717
52920
  });
52718
52921
  }
52719
52922
  }
52720
- if (step.reads_artifact) {
52923
+ if (step.reads_artifact && targetAgent.can_read_artifacts.length > 0) {
52721
52924
  if (!targetAgent.can_read_artifacts.includes(step.reads_artifact)) {
52722
52925
  diagnostics.push({
52723
52926
  ruleId: "task-agent-binding",
@@ -52782,7 +52985,8 @@ var artifactOwnershipRule = {
52782
52985
  }
52783
52986
  if (step.reads_artifact) {
52784
52987
  const artifact = dsl.artifacts[step.reads_artifact];
52785
- if (artifact && (artifact.consumers.length > 0 || artifact.producers.length > 0 || artifact.editors.length > 0)) {
52988
+ const hasDeprecatedOwnership = !!artifact?.owner || (artifact?.producers.length ?? 0) > 0 || (artifact?.editors.length ?? 0) > 0 || (artifact?.consumers.length ?? 0) > 0;
52989
+ if (artifact && hasDeprecatedOwnership) {
52786
52990
  const canRead = artifact.consumers.includes(agentId) || artifact.producers.includes(agentId) || artifact.editors.includes(agentId);
52787
52991
  if (!canRead) {
52788
52992
  diagnostics.push({
@@ -53185,6 +53389,7 @@ var validationExecutorNoContextRule = {
53185
53389
  run(dsl) {
53186
53390
  const diagnostics = [];
53187
53391
  for (const [validationId, val] of Object.entries(dsl.validations)) {
53392
+ if (!val.executor) continue;
53188
53393
  if (val.executor_type === "agent") {
53189
53394
  const agent = dsl.agents[val.executor];
53190
53395
  if (!agent) continue;
@@ -53212,6 +53417,103 @@ var validationExecutorNoContextRule = {
53212
53417
  }
53213
53418
  };
53214
53419
 
53420
+ // src/linter/rules/artifact-ownership-consistency.ts
53421
+ var artifactOwnershipConsistencyRule = {
53422
+ id: "artifact-ownership-consistency",
53423
+ description: "Ensure own_artifacts entries are included in can_read_artifacts and check deprecated owner field consistency",
53424
+ run(dsl) {
53425
+ const diagnostics = [];
53426
+ for (const [agentId, agent] of Object.entries(dsl.agents)) {
53427
+ if (agent.own_artifacts.length === 0) continue;
53428
+ for (const artId of agent.own_artifacts) {
53429
+ if (!agent.can_read_artifacts.includes(artId)) {
53430
+ diagnostics.push({
53431
+ ruleId: "artifact-ownership-consistency",
53432
+ severity: "warning",
53433
+ path: `agents.${agentId}.own_artifacts`,
53434
+ message: `Agent "${agentId}" owns artifact "${artId}" but does not include it in can_read_artifacts`
53435
+ });
53436
+ }
53437
+ }
53438
+ }
53439
+ for (const [artId, art] of Object.entries(dsl.artifacts)) {
53440
+ if (!art.owner) continue;
53441
+ const ownerAgent = dsl.agents[art.owner];
53442
+ if (ownerAgent && !ownerAgent.own_artifacts.includes(artId)) {
53443
+ diagnostics.push({
53444
+ ruleId: "artifact-ownership-consistency",
53445
+ severity: "warning",
53446
+ path: `artifacts.${artId}.owner`,
53447
+ message: `Artifact "${artId}" has deprecated owner "${art.owner}" but agent does not list it in own_artifacts`
53448
+ });
53449
+ }
53450
+ }
53451
+ return diagnostics;
53452
+ }
53453
+ };
53454
+
53455
+ // src/linter/rules/deprecated-ownership-fields.ts
53456
+ var ARTIFACT_FIELDS = ["owner", "producers", "editors", "consumers"];
53457
+ var AGENT_FIELDS = [
53458
+ "own_artifacts",
53459
+ "can_read_artifacts",
53460
+ "can_write_artifacts"
53461
+ ];
53462
+ function isArtifactFieldUsed(artifact, field) {
53463
+ switch (field) {
53464
+ case "owner":
53465
+ return !!artifact.owner;
53466
+ case "producers":
53467
+ return artifact.producers.length > 0;
53468
+ case "editors":
53469
+ return artifact.editors.length > 0;
53470
+ case "consumers":
53471
+ return artifact.consumers.length > 0;
53472
+ }
53473
+ }
53474
+ function isAgentFieldUsed(agent, field) {
53475
+ switch (field) {
53476
+ case "own_artifacts":
53477
+ return agent.own_artifacts.length > 0;
53478
+ case "can_read_artifacts":
53479
+ return agent.can_read_artifacts.length > 0;
53480
+ case "can_write_artifacts":
53481
+ return agent.can_write_artifacts.length > 0;
53482
+ }
53483
+ }
53484
+ var deprecatedOwnershipFieldsRule = {
53485
+ id: "deprecated-ownership-fields",
53486
+ description: "Warn when deprecated ownership/permission fields are used instead of artifact_bindings + artifact_slots",
53487
+ run(dsl) {
53488
+ const diagnostics = [];
53489
+ for (const [artId, artifact] of Object.entries(dsl.artifacts)) {
53490
+ for (const field of ARTIFACT_FIELDS) {
53491
+ if (isArtifactFieldUsed(artifact, field)) {
53492
+ diagnostics.push({
53493
+ ruleId: "deprecated-ownership-fields",
53494
+ severity: "warning",
53495
+ path: `artifacts.${artId}.${field}`,
53496
+ message: `Artifact "${artId}" uses deprecated field "${field}". Ownership is derived from artifact_bindings + artifact_slots in the binding model.`
53497
+ });
53498
+ }
53499
+ }
53500
+ }
53501
+ for (const [agentId, agent] of Object.entries(dsl.agents)) {
53502
+ for (const field of AGENT_FIELDS) {
53503
+ if (isAgentFieldUsed(agent, field)) {
53504
+ diagnostics.push({
53505
+ ruleId: "deprecated-ownership-fields",
53506
+ severity: "warning",
53507
+ path: `agents.${agentId}.${field}`,
53508
+ message: `Agent "${agentId}" uses deprecated field "${field}". Artifact permissions are derived from artifact_bindings + artifact_slots in the binding model.`
53509
+ });
53510
+ }
53511
+ }
53512
+ }
53513
+ return diagnostics;
53514
+ }
53515
+ };
53516
+
53215
53517
  // src/linter/rules/extension-consumption.ts
53216
53518
  function isRecord4(v2) {
53217
53519
  return typeof v2 === "object" && v2 !== null && !Array.isArray(v2);
@@ -53382,6 +53684,194 @@ var extensionUndeclaredUsageRule = {
53382
53684
  }
53383
53685
  };
53384
53686
 
53687
+ // src/navigation-index/cli-contract-loader.ts
53688
+ import { existsSync, readFileSync } from "fs";
53689
+ import { isAbsolute, resolve as resolve6 } from "path";
53690
+ import { parse as parseYaml4 } from "yaml";
53691
+ function extractStringArray(value) {
53692
+ if (!Array.isArray(value)) return [];
53693
+ return value.filter((item) => typeof item === "string");
53694
+ }
53695
+ function extractArtifactSlots(doc) {
53696
+ const slots = doc.artifact_slots;
53697
+ if (!slots || typeof slots !== "object") return null;
53698
+ const result = {};
53699
+ for (const [name, slotDef] of Object.entries(slots)) {
53700
+ if (!slotDef || typeof slotDef !== "object") continue;
53701
+ const direction = slotDef.direction;
53702
+ if (direction === "read" || direction === "write" || direction === "readwrite") {
53703
+ result[name] = { direction };
53704
+ }
53705
+ }
53706
+ return Object.keys(result).length > 0 ? result : null;
53707
+ }
53708
+ function extractCommandEffects(doc) {
53709
+ const result = {};
53710
+ const commandSets = doc.command_sets;
53711
+ if (!commandSets || typeof commandSets !== "object") return result;
53712
+ for (const setDef of Object.values(commandSets)) {
53713
+ if (!setDef || typeof setDef !== "object") continue;
53714
+ const commands = setDef.commands;
53715
+ if (!commands || typeof commands !== "object") continue;
53716
+ for (const [cmdName, cmdDef] of Object.entries(commands)) {
53717
+ if (!cmdDef || typeof cmdDef !== "object") continue;
53718
+ const effects = cmdDef.effects;
53719
+ if (!effects || typeof effects !== "object") continue;
53720
+ result[cmdName] = {
53721
+ reads: extractStringArray(effects.reads),
53722
+ writes: extractStringArray(effects.writes)
53723
+ };
53724
+ }
53725
+ }
53726
+ return result;
53727
+ }
53728
+ function resolveCliContractPath(cliContractPath) {
53729
+ return isAbsolute(cliContractPath) ? cliContractPath : resolve6(process.cwd(), cliContractPath);
53730
+ }
53731
+ function loadCliContractSlots(cliContractPath) {
53732
+ const filePath = resolveCliContractPath(cliContractPath);
53733
+ if (!existsSync(filePath)) return null;
53734
+ let doc;
53735
+ try {
53736
+ doc = parseYaml4(readFileSync(filePath, "utf8"));
53737
+ } catch {
53738
+ return null;
53739
+ }
53740
+ if (!doc || typeof doc !== "object") return null;
53741
+ const artifactSlots = extractArtifactSlots(doc);
53742
+ if (!artifactSlots) return null;
53743
+ return {
53744
+ artifactSlots,
53745
+ commandEffects: extractCommandEffects(doc)
53746
+ };
53747
+ }
53748
+ function resolveSlotDirection(slot, command, slotInfo) {
53749
+ const cmdEffects = slotInfo.commandEffects[command];
53750
+ if (cmdEffects) {
53751
+ if (cmdEffects.writes.includes(slot)) return "write";
53752
+ if (cmdEffects.reads.includes(slot)) return "read";
53753
+ }
53754
+ const slotDecl = slotInfo.artifactSlots[slot];
53755
+ if (slotDecl) {
53756
+ if (slotDecl.direction === "write" || slotDecl.direction === "readwrite") {
53757
+ return "write";
53758
+ }
53759
+ return "read";
53760
+ }
53761
+ return "read";
53762
+ }
53763
+
53764
+ // src/linter/rules/binding-completeness.ts
53765
+ var bindingCompletenessRule = {
53766
+ id: "binding-completeness",
53767
+ description: "Check that artifact_bindings cover all slots referenced in the cli-contract command effects",
53768
+ run(dsl) {
53769
+ const diagnostics = [];
53770
+ for (const [toolId, tool] of Object.entries(dsl.tools)) {
53771
+ if (!tool.cli_contract || !tool.artifact_bindings) continue;
53772
+ const slotInfo = loadCliContractSlots(tool.cli_contract);
53773
+ if (!slotInfo?.artifactSlots) continue;
53774
+ const command = tool.command ?? "";
53775
+ const effects = slotInfo.commandEffects[command];
53776
+ if (!effects) continue;
53777
+ const referencedSlots = [...effects.reads, ...effects.writes];
53778
+ const boundSlots = new Set(Object.keys(tool.artifact_bindings));
53779
+ for (const slot of referencedSlots) {
53780
+ if (boundSlots.has(slot)) continue;
53781
+ diagnostics.push({
53782
+ ruleId: "binding-completeness",
53783
+ severity: "warning",
53784
+ path: `tools.${toolId}.artifact_bindings`,
53785
+ message: `Command "${command}" references slot "${slot}" but tool has no artifact_bindings entry for it`
53786
+ });
53787
+ }
53788
+ }
53789
+ return diagnostics;
53790
+ }
53791
+ };
53792
+
53793
+ // src/linter/rules/binding-direction-match.ts
53794
+ function agentCanWriteArtifact(agentId, artifactId, dsl) {
53795
+ const agent = dsl.agents[agentId];
53796
+ if (!agent) return false;
53797
+ return agent.can_write_artifacts.includes(artifactId) || agent.own_artifacts.includes(artifactId);
53798
+ }
53799
+ var bindingDirectionMatchRule = {
53800
+ id: "binding-direction-match",
53801
+ description: "Check that agents invoking a tool can write artifacts bound via write slots",
53802
+ run(dsl) {
53803
+ const diagnostics = [];
53804
+ for (const [toolId, tool] of Object.entries(dsl.tools)) {
53805
+ if (!tool.cli_contract || !tool.artifact_bindings) continue;
53806
+ const slotInfo = loadCliContractSlots(tool.cli_contract);
53807
+ if (!slotInfo) continue;
53808
+ const command = tool.command ?? "";
53809
+ for (const [slot, artifactId] of Object.entries(tool.artifact_bindings)) {
53810
+ const direction = resolveSlotDirection(slot, command, slotInfo);
53811
+ if (direction !== "write") continue;
53812
+ for (const agentId of tool.invokable_by) {
53813
+ if (agentCanWriteArtifact(agentId, artifactId, dsl)) continue;
53814
+ diagnostics.push({
53815
+ ruleId: "binding-direction-match",
53816
+ severity: "warning",
53817
+ path: `tools.${toolId}.artifact_bindings.${slot}`,
53818
+ message: `Agent "${agentId}" invokes tool "${toolId}" which writes to artifact "${artifactId}" via slot "${slot}", but agent lacks can_write_artifacts or own_artifacts for it`
53819
+ });
53820
+ }
53821
+ }
53822
+ }
53823
+ return diagnostics;
53824
+ }
53825
+ };
53826
+
53827
+ // src/linter/rules/slot-declaration-exists.ts
53828
+ var slotDeclarationExistsRule = {
53829
+ id: "slot-declaration-exists",
53830
+ description: "Check that artifact_bindings keys reference slot names declared in the cli-contract",
53831
+ run(dsl) {
53832
+ const diagnostics = [];
53833
+ for (const [toolId, tool] of Object.entries(dsl.tools)) {
53834
+ if (!tool.cli_contract || !tool.artifact_bindings) continue;
53835
+ const slotInfo = loadCliContractSlots(tool.cli_contract);
53836
+ if (!slotInfo?.artifactSlots) continue;
53837
+ for (const slot of Object.keys(tool.artifact_bindings)) {
53838
+ if (slot in slotInfo.artifactSlots) continue;
53839
+ diagnostics.push({
53840
+ ruleId: "slot-declaration-exists",
53841
+ severity: "warning",
53842
+ path: `tools.${toolId}.artifact_bindings.${slot}`,
53843
+ message: `artifact_bindings key "${slot}" is not declared in cli-contract artifactSlots`
53844
+ });
53845
+ }
53846
+ }
53847
+ return diagnostics;
53848
+ }
53849
+ };
53850
+
53851
+ // src/linter/rules/config-path-consistency.ts
53852
+ var configPathConsistencyRule = {
53853
+ id: "config-path-consistency",
53854
+ description: "Check that control-authority artifacts bound by tools have path_patterns defined",
53855
+ run(dsl) {
53856
+ const diagnostics = [];
53857
+ for (const [toolId, tool] of Object.entries(dsl.tools)) {
53858
+ if (!tool.artifact_bindings) continue;
53859
+ for (const [slot, artifactId] of Object.entries(tool.artifact_bindings)) {
53860
+ const artifact = dsl.artifacts[artifactId];
53861
+ if (!artifact || artifact.authority !== "control") continue;
53862
+ if (artifact.path_patterns && artifact.path_patterns.length > 0) continue;
53863
+ diagnostics.push({
53864
+ ruleId: "config-path-consistency",
53865
+ severity: "info",
53866
+ path: `tools.${toolId}.artifact_bindings.${slot}`,
53867
+ message: `Config artifact "${artifactId}" has no path_patterns; consider adding them for path-based lookup`
53868
+ });
53869
+ }
53870
+ }
53871
+ return diagnostics;
53872
+ }
53873
+ };
53874
+
53385
53875
  // src/linter/linter.ts
53386
53876
  var builtinRules = [
53387
53877
  validationCoverageRule,
@@ -53399,9 +53889,15 @@ var builtinRules = [
53399
53889
  entityNoGuardrailsRule,
53400
53890
  guardrailOrphanedRule,
53401
53891
  validationExecutorNoContextRule,
53892
+ artifactOwnershipConsistencyRule,
53893
+ deprecatedOwnershipFieldsRule,
53402
53894
  extensionDeclaredButUnusedRule,
53403
53895
  extensionScopeMismatchRule,
53404
- extensionUndeclaredUsageRule
53896
+ extensionUndeclaredUsageRule,
53897
+ bindingCompletenessRule,
53898
+ bindingDirectionMatchRule,
53899
+ slotDeclarationExistsRule,
53900
+ configPathConsistencyRule
53405
53901
  ];
53406
53902
  function lint(dsl, rules = builtinRules) {
53407
53903
  const diagnostics = [];
@@ -53455,9 +53951,18 @@ var ref_exists_default = (0, import_spectral_core.createRulesetFunction)(
53455
53951
 
53456
53952
  // src/linter/spectral/functions/editors-not-empty.ts
53457
53953
  var import_spectral_core2 = __toESM(require_dist9(), 1);
53954
+ function allDeprecatedOwnershipFieldsEmpty(art) {
53955
+ return !art.owner && (art.producers?.length ?? 0) === 0 && (art.editors?.length ?? 0) === 0 && (art.consumers?.length ?? 0) === 0;
53956
+ }
53458
53957
  var editors_not_empty_default = (0, import_spectral_core2.createRulesetFunction)(
53459
53958
  { input: { type: "array" }, options: null },
53460
- (targetVal, _options, _context) => {
53959
+ (targetVal, _options, context) => {
53960
+ const root = context.document.data;
53961
+ const artId = context.path.length >= 2 ? String(context.path[1]) : void 0;
53962
+ const artifact = artId && root.artifacts ? root.artifacts[artId] : void 0;
53963
+ if (artifact && allDeprecatedOwnershipFieldsEmpty(artifact)) {
53964
+ return [];
53965
+ }
53461
53966
  if (targetVal.length === 0) {
53462
53967
  return [{ message: "editors must not be empty" }];
53463
53968
  }
@@ -53489,6 +53994,7 @@ var prerequisite_readable_default = (0, import_spectral_core4.createRulesetFunct
53489
53994
  (targetVal, _options, context) => {
53490
53995
  const readable = new Set(targetVal.can_read_artifacts ?? []);
53491
53996
  const prereqs = targetVal.prerequisites ?? [];
53997
+ if (readable.size === 0) return [];
53492
53998
  const results = [];
53493
53999
  for (let i3 = 0; i3 < prereqs.length; i3++) {
53494
54000
  const p2 = prereqs[i3];
@@ -53890,7 +54396,7 @@ var ruleset = {
53890
54396
  },
53891
54397
  "artifact-owner-exists": {
53892
54398
  description: "(deprecated) Every artifact must have an owner",
53893
- severity: "warn",
54399
+ severity: "off",
53894
54400
  given: "$.artifacts.*",
53895
54401
  then: {
53896
54402
  field: "owner",
@@ -54594,8 +55100,8 @@ function collectReferencedIds(workflow, dsl, relatedTasks) {
54594
55100
  } else if (step.type === "validation") {
54595
55101
  const val = dsl.validations[step.validation];
54596
55102
  if (val) {
54597
- if (val.executor_type === "agent") addAgent(val.executor);
54598
- else tools.add(val.executor);
55103
+ if (val.executor && val.executor_type === "agent") addAgent(val.executor);
55104
+ else if (val.executor) tools.add(val.executor);
54599
55105
  artifacts.add(val.target_artifact);
54600
55106
  }
54601
55107
  }
@@ -54749,7 +55255,7 @@ function emitExecutionStep(es, agentAlias2, participants, lines, indent) {
54749
55255
  }
54750
55256
  function emitValidationStep(step, participants, dsl, lastFromAgent, lines, indent) {
54751
55257
  const val = dsl.validations[step.validation];
54752
- if (!val) return;
55258
+ if (!val || !val.executor) return;
54753
55259
  const executorAlias = participantAlias(participants, val.executor);
54754
55260
  const artifactAlias = participantAlias(participants, val.target_artifact);
54755
55261
  const fromAlias = lastFromAgent ? participantAlias(participants, lastFromAgent) : null;
@@ -54971,9 +55477,9 @@ function collectPhaseOps(dsl, wfId) {
54971
55477
  } else if (step.type === "validation") {
54972
55478
  const val = dsl.validations[step.validation];
54973
55479
  if (val) {
54974
- if (val.executor_type === "agent") {
55480
+ if (val.executor_type === "agent" && val.executor) {
54975
55481
  addOp(agentOps, val.executor, "validate");
54976
- } else {
55482
+ } else if (val.executor) {
54977
55483
  addOp(toolOps, val.executor, "verification");
54978
55484
  }
54979
55485
  addOp(artifactOps, val.target_artifact, "V");
@@ -55052,6 +55558,299 @@ function generateOverviewFlowchart(dsl) {
55052
55558
  return sections.join("\n\n");
55053
55559
  }
55054
55560
 
55561
+ // src/navigation-index/builder.ts
55562
+ var VALIDATOR_KINDS = /* @__PURE__ */ new Set(["linter", "checker", "validator", "test"]);
55563
+ var VALIDATION_TERMS = ["lint", "check", "validate", "test", "verify", "audit"];
55564
+ function sortUnique(values) {
55565
+ return [...new Set(values)].sort();
55566
+ }
55567
+ function matchesValidationTerm(value) {
55568
+ const lower = value.toLowerCase();
55569
+ return VALIDATION_TERMS.some((term) => lower.includes(term));
55570
+ }
55571
+ function isValidatorTool(tool) {
55572
+ if (tool.kind && VALIDATOR_KINDS.has(tool.kind)) {
55573
+ return true;
55574
+ }
55575
+ if (tool.command && matchesValidationTerm(tool.command)) {
55576
+ return true;
55577
+ }
55578
+ for (const cmd of tool.commands ?? []) {
55579
+ if (matchesValidationTerm(cmd.category) || matchesValidationTerm(cmd.command)) {
55580
+ return true;
55581
+ }
55582
+ }
55583
+ return false;
55584
+ }
55585
+ function extractToolArtifactLinks(toolId, tool) {
55586
+ const links = [];
55587
+ if (tool.cli_contract) {
55588
+ const command = tool.command ?? "";
55589
+ const slotInfo = loadCliContractSlots(tool.cli_contract);
55590
+ for (const [slot, artifactId] of Object.entries(tool.artifact_bindings ?? {})) {
55591
+ const direction = slotInfo ? resolveSlotDirection(slot, command, slotInfo) : "read";
55592
+ links.push({
55593
+ toolId,
55594
+ artifactId,
55595
+ direction,
55596
+ slot,
55597
+ command
55598
+ });
55599
+ }
55600
+ return links;
55601
+ }
55602
+ for (const cmd of tool.commands ?? []) {
55603
+ for (const artifactId of cmd.reads ?? []) {
55604
+ links.push({
55605
+ toolId,
55606
+ artifactId,
55607
+ direction: "read",
55608
+ slot: "",
55609
+ command: cmd.command
55610
+ });
55611
+ }
55612
+ for (const artifactId of cmd.writes ?? []) {
55613
+ links.push({
55614
+ toolId,
55615
+ artifactId,
55616
+ direction: "write",
55617
+ slot: "",
55618
+ command: cmd.command
55619
+ });
55620
+ }
55621
+ }
55622
+ return links;
55623
+ }
55624
+ function buildOperation(toolId, tool, link) {
55625
+ return {
55626
+ tool: toolId,
55627
+ cli_contract: tool.cli_contract ?? "",
55628
+ command: link.command || tool.command || "",
55629
+ slot: link.slot,
55630
+ invokable_by: [...tool.invokable_by ?? []]
55631
+ };
55632
+ }
55633
+ function operationKey(op) {
55634
+ return `${op.tool}:${op.command}:${op.slot}`;
55635
+ }
55636
+ function dedupeOperations(operations) {
55637
+ const seen = /* @__PURE__ */ new Set();
55638
+ const result = [];
55639
+ for (const op of operations) {
55640
+ const key = operationKey(op);
55641
+ if (seen.has(key)) continue;
55642
+ seen.add(key);
55643
+ result.push(op);
55644
+ }
55645
+ return result.sort((a3, b3) => a3.tool.localeCompare(b3.tool) || a3.slot.localeCompare(b3.slot));
55646
+ }
55647
+ function buildAgentMapping(dsl, artifactId) {
55648
+ const owners = [];
55649
+ const editors = [];
55650
+ const readers = [];
55651
+ for (const [agentId, agent] of Object.entries(dsl.agents)) {
55652
+ if (agent.own_artifacts?.includes(artifactId)) owners.push(agentId);
55653
+ if (agent.can_write_artifacts?.includes(artifactId)) editors.push(agentId);
55654
+ if (agent.can_read_artifacts?.includes(artifactId)) readers.push(agentId);
55655
+ }
55656
+ return {
55657
+ owners: sortUnique(owners),
55658
+ editors: sortUnique(editors),
55659
+ readers: sortUnique(readers)
55660
+ };
55661
+ }
55662
+ function buildRelations(artifactId, authority, linksByArtifact, allLinks) {
55663
+ const sourceArtifacts = /* @__PURE__ */ new Set();
55664
+ const derivedArtifacts = /* @__PURE__ */ new Set();
55665
+ const writesToThis = allLinks.filter(
55666
+ (link) => link.artifactId === artifactId && link.direction === "write"
55667
+ );
55668
+ if (authority === "generated" || authority === "derived") {
55669
+ for (const writeLink of writesToThis) {
55670
+ for (const readLink of allLinks) {
55671
+ if (readLink.toolId === writeLink.toolId && readLink.direction === "read") {
55672
+ sourceArtifacts.add(readLink.artifactId);
55673
+ }
55674
+ }
55675
+ }
55676
+ }
55677
+ const readsThis = allLinks.filter(
55678
+ (link) => link.artifactId === artifactId && link.direction === "read"
55679
+ );
55680
+ for (const readLink of readsThis) {
55681
+ for (const writeLink of allLinks) {
55682
+ if (writeLink.toolId === readLink.toolId && writeLink.direction === "write") {
55683
+ derivedArtifacts.add(writeLink.artifactId);
55684
+ }
55685
+ }
55686
+ }
55687
+ const knownArtifacts = new Set(linksByArtifact.keys());
55688
+ return {
55689
+ source_artifacts: sortUnique(
55690
+ [...sourceArtifacts].filter((id) => id !== artifactId && knownArtifacts.has(id))
55691
+ ),
55692
+ derived_artifacts: sortUnique(
55693
+ [...derivedArtifacts].filter((id) => id !== artifactId && knownArtifacts.has(id))
55694
+ )
55695
+ };
55696
+ }
55697
+ function buildValidateRoutes(validators) {
55698
+ return validators.map((validator) => ({
55699
+ purpose: "validate",
55700
+ steps: [
55701
+ {
55702
+ type: "run_operation",
55703
+ operation: validator.tool,
55704
+ candidate_agents: [...validator.invokable_by]
55705
+ }
55706
+ ]
55707
+ }));
55708
+ }
55709
+ function buildRegenerateRoutes(sourceArtifacts, producers, agentsByArtifact) {
55710
+ if (producers.length === 0) return [];
55711
+ const editSteps = sourceArtifacts.map((artifactId) => ({
55712
+ type: "edit_artifact",
55713
+ artifact: artifactId,
55714
+ candidate_agents: agentsByArtifact.get(artifactId)?.editors ?? []
55715
+ }));
55716
+ const runSteps = producers.map((producer) => ({
55717
+ type: "run_operation",
55718
+ operation: producer.tool,
55719
+ candidate_agents: [...producer.invokable_by]
55720
+ }));
55721
+ return [
55722
+ {
55723
+ purpose: "regenerate",
55724
+ steps: [...editSteps, ...runSteps]
55725
+ }
55726
+ ];
55727
+ }
55728
+ function buildUpdateRoutes(artifactId, validators, editors) {
55729
+ const steps = [
55730
+ {
55731
+ type: "edit_artifact",
55732
+ artifact: artifactId,
55733
+ candidate_agents: [...editors]
55734
+ }
55735
+ ];
55736
+ for (const validator of validators) {
55737
+ steps.push({
55738
+ type: "run_operation",
55739
+ operation: validator.tool,
55740
+ candidate_agents: [...validator.invokable_by]
55741
+ });
55742
+ }
55743
+ return [
55744
+ {
55745
+ purpose: "update",
55746
+ steps
55747
+ }
55748
+ ];
55749
+ }
55750
+ function defaultProperties(artifact) {
55751
+ return {
55752
+ type: artifact.type,
55753
+ authority: artifact.authority ?? "canonical",
55754
+ manual_edit: artifact.manual_edit ?? "allowed",
55755
+ change_control: artifact.change_control ?? "none"
55756
+ };
55757
+ }
55758
+ function buildNavigationIndex(dsl) {
55759
+ const resolvedTools = resolveToolExtends(dsl.tools);
55760
+ const allLinks = [];
55761
+ for (const [toolId, tool] of Object.entries(resolvedTools)) {
55762
+ allLinks.push(...extractToolArtifactLinks(toolId, tool));
55763
+ }
55764
+ const linksByArtifact = /* @__PURE__ */ new Map();
55765
+ for (const link of allLinks) {
55766
+ const existing = linksByArtifact.get(link.artifactId) ?? [];
55767
+ existing.push(link);
55768
+ linksByArtifact.set(link.artifactId, existing);
55769
+ }
55770
+ const toolWrites = /* @__PURE__ */ new Map();
55771
+ for (const link of allLinks) {
55772
+ if (link.direction !== "write") continue;
55773
+ const writes = toolWrites.get(link.toolId) ?? /* @__PURE__ */ new Set();
55774
+ writes.add(link.artifactId);
55775
+ toolWrites.set(link.toolId, writes);
55776
+ }
55777
+ const artifacts = {};
55778
+ const agentsByArtifact = /* @__PURE__ */ new Map();
55779
+ for (const [artifactId, artifactDef] of Object.entries(dsl.artifacts)) {
55780
+ const properties = defaultProperties(artifactDef);
55781
+ const agents = buildAgentMapping(dsl, artifactId);
55782
+ agentsByArtifact.set(artifactId, agents);
55783
+ const artifactLinks = linksByArtifact.get(artifactId) ?? [];
55784
+ const producers = [];
55785
+ const validators = [];
55786
+ const consumers = [];
55787
+ const processedPairs = /* @__PURE__ */ new Set();
55788
+ for (const link of artifactLinks) {
55789
+ const tool = resolvedTools[link.toolId];
55790
+ if (!tool) continue;
55791
+ const pairKey = `${link.toolId}:${link.direction}:${link.slot}:${link.command}`;
55792
+ if (processedPairs.has(pairKey)) continue;
55793
+ processedPairs.add(pairKey);
55794
+ const operation = buildOperation(link.toolId, tool, link);
55795
+ const toolWritesArtifacts = toolWrites.get(link.toolId) ?? /* @__PURE__ */ new Set();
55796
+ if (link.direction === "write" || toolWritesArtifacts.has(artifactId)) {
55797
+ producers.push(operation);
55798
+ } else if (isValidatorTool(tool)) {
55799
+ validators.push(operation);
55800
+ } else if (link.direction === "read") {
55801
+ consumers.push(operation);
55802
+ }
55803
+ }
55804
+ const relations = buildRelations(
55805
+ artifactId,
55806
+ properties.authority,
55807
+ linksByArtifact,
55808
+ allLinks
55809
+ );
55810
+ const routes = {};
55811
+ const dedupedValidators = dedupeOperations(validators);
55812
+ const dedupedProducers = dedupeOperations(producers);
55813
+ if (dedupedValidators.length > 0) {
55814
+ routes.validate = buildValidateRoutes(dedupedValidators);
55815
+ }
55816
+ if (properties.authority === "generated" && dedupedProducers.length > 0 && relations.source_artifacts.length > 0) {
55817
+ routes.regenerate = buildRegenerateRoutes(
55818
+ relations.source_artifacts,
55819
+ dedupedProducers,
55820
+ agentsByArtifact
55821
+ );
55822
+ }
55823
+ if (properties.authority === "canonical") {
55824
+ routes.update = buildUpdateRoutes(artifactId, dedupedValidators, agents.editors);
55825
+ }
55826
+ artifacts[artifactId] = {
55827
+ id: artifactId,
55828
+ files: {
55829
+ path_patterns: artifactDef.path_patterns ?? [],
55830
+ exclude_patterns: artifactDef.exclude_patterns ?? []
55831
+ },
55832
+ properties,
55833
+ relations,
55834
+ operations: {
55835
+ producers: dedupeOperations(producers),
55836
+ validators: dedupedValidators,
55837
+ consumers: dedupeOperations(consumers)
55838
+ },
55839
+ agents,
55840
+ routes
55841
+ };
55842
+ }
55843
+ return {
55844
+ version: "1.0.0",
55845
+ generated_at: (/* @__PURE__ */ new Date()).toISOString(),
55846
+ system: {
55847
+ id: dsl.system.id,
55848
+ name: dsl.system.name
55849
+ },
55850
+ artifacts
55851
+ };
55852
+ }
55853
+
55055
55854
  // src/renderer/renderer.ts
55056
55855
  Handlebars.registerHelper("eq", (a3, b3) => a3 === b3);
55057
55856
  Handlebars.registerHelper("notEmpty", (obj) => {
@@ -55361,6 +56160,8 @@ function buildEntityContext(dsl, context, entityId) {
55361
56160
  return buildGuardrailPolicyContext(dsl, entityId);
55362
56161
  case "system":
55363
56162
  return buildSystemContext(dsl);
56163
+ case "navigation_index":
56164
+ return buildNavigationIndex(dsl);
55364
56165
  }
55365
56166
  }
55366
56167
  async function loadTemplate(templatePath) {
@@ -55380,8 +56181,8 @@ async function renderFromConfig(dsl, renderTargets, options) {
55380
56181
  for (const target of renderTargets) {
55381
56182
  const templateContent = await loadTemplate(target.template);
55382
56183
  const compiled = Handlebars.compile(templateContent, { noEscape: false });
55383
- if (target.context === "system") {
55384
- const ctx = buildSystemContext(dsl, options);
56184
+ if (target.context === "system" || target.context === "navigation_index") {
56185
+ const ctx = target.context === "system" ? buildSystemContext(dsl, options) : buildNavigationIndex(dsl);
55385
56186
  const output = compiled(ctx);
55386
56187
  if (target.skip_empty && isEffectivelyEmpty(output)) {
55387
56188
  await removeIfExists(target.output);
@@ -55437,8 +56238,8 @@ async function checkDriftFromConfig(dsl, renderTargets, options) {
55437
56238
  for (const target of renderTargets) {
55438
56239
  const templateContent = await loadTemplate(target.template);
55439
56240
  const compiled = Handlebars.compile(templateContent, { noEscape: false });
55440
- if (target.context === "system") {
55441
- const ctx = buildSystemContext(dsl, options);
56241
+ if (target.context === "system" || target.context === "navigation_index") {
56242
+ const ctx = target.context === "system" ? buildSystemContext(dsl, options) : buildNavigationIndex(dsl);
55442
56243
  const expected = compiled(ctx);
55443
56244
  await checkExpectedVsExisting(expected, target.output, target.skip_empty, diffs);
55444
56245
  } else {
@@ -55717,7 +56518,7 @@ function score(dsl) {
55717
56518
 
55718
56519
  // src/guardrail-generator/generator.ts
55719
56520
  import { readFile as readFile5, writeFile as writeFile2, mkdir as mkdir2, chmod, unlink as unlink2, copyFile } from "fs/promises";
55720
- import { resolve as resolve6, dirname as dirname6 } from "path";
56521
+ import { resolve as resolve7, dirname as dirname6 } from "path";
55721
56522
  import Handlebars2 from "handlebars";
55722
56523
  import YAML from "yaml";
55723
56524
 
@@ -55939,9 +56740,9 @@ async function generateGuardrails(options) {
55939
56740
  if (pathResult.diagnostics.some((d2) => d2.severity === "error")) {
55940
56741
  continue;
55941
56742
  }
55942
- const targetPath = resolve6(config.configDir, pathResult.resolved);
56743
+ const targetPath = resolve7(config.configDir, pathResult.resolved);
55943
56744
  if (outputDef.source) {
55944
- const sourcePath = resolve6(config.configDir, outputDef.source);
56745
+ const sourcePath = resolve7(config.configDir, outputDef.source);
55945
56746
  if (!dryRun) {
55946
56747
  try {
55947
56748
  await mkdir2(dirname6(targetPath), { recursive: true });
@@ -55977,7 +56778,7 @@ async function generateGuardrails(options) {
55977
56778
  });
55978
56779
  continue;
55979
56780
  }
55980
- const templatePath = resolve6(config.configDir, outputDef.template);
56781
+ const templatePath = resolve7(config.configDir, outputDef.template);
55981
56782
  try {
55982
56783
  templateContent = await readFile5(templatePath, "utf8");
55983
56784
  } catch {
@@ -56016,7 +56817,7 @@ async function generateGuardrails(options) {
56016
56817
  };
56017
56818
  const compiled = Handlebars2.compile(templateContent, { noEscape: true });
56018
56819
  const rendered = compiled(groupCtx);
56019
- const groupTarget = resolve6(targetPath, groupKey);
56820
+ const groupTarget = resolve7(targetPath, groupKey);
56020
56821
  if (shouldSkipEmpty && rendered.trim().length === 0) {
56021
56822
  if (!dryRun) {
56022
56823
  try {
@@ -56064,7 +56865,7 @@ async function generateGuardrails(options) {
56064
56865
  if (renderTarget.inline_template) {
56065
56866
  templateContent = renderTarget.inline_template;
56066
56867
  } else if (renderTarget.template) {
56067
- const templatePath = resolve6(config.configDir, renderTarget.template);
56868
+ const templatePath = resolve7(config.configDir, renderTarget.template);
56068
56869
  try {
56069
56870
  templateContent = await readFile5(templatePath, "utf8");
56070
56871
  } catch {
@@ -56086,12 +56887,12 @@ async function generateGuardrails(options) {
56086
56887
  const compiled = Handlebars2.compile(templateContent, { noEscape: true });
56087
56888
  const shouldSkipEmpty = renderTarget.skip_empty === true;
56088
56889
  const context = renderTarget.context;
56089
- if (context === "system") {
56090
- const sysCtx = buildSystemContext(dsl);
56091
- const mergedCtx = { ...sysCtx, vars, paths, binding, resolved_checks: checkResult.resolved };
56890
+ if (context === "system" || context === "navigation_index") {
56891
+ const baseCtx = context === "system" ? buildSystemContext(dsl) : buildNavigationIndex(dsl);
56892
+ const mergedCtx = { ...baseCtx, vars, paths, binding, resolved_checks: checkResult.resolved };
56092
56893
  const rendered = compiled(mergedCtx);
56093
56894
  const resolvedOutput = resolveBindingRenderOutputPath(renderTarget.output, paths);
56094
- const outputPath = resolve6(config.configDir, resolvedOutput);
56895
+ const outputPath = resolve7(config.configDir, resolvedOutput);
56095
56896
  if (shouldSkipEmpty && rendered.trim().length === 0) {
56096
56897
  if (!dryRun) {
56097
56898
  try {
@@ -56121,7 +56922,7 @@ async function generateGuardrails(options) {
56121
56922
  const expandedOutput = expandOutputPath(renderTarget.output, context, entityId, entity);
56122
56923
  if (hasUnresolvedPathVars(expandedOutput)) continue;
56123
56924
  const resolvedOutput = resolveBindingRenderOutputPath(expandedOutput, paths);
56124
- const outputPath = resolve6(config.configDir, resolvedOutput);
56925
+ const outputPath = resolve7(config.configDir, resolvedOutput);
56125
56926
  if (shouldSkipEmpty && rendered.trim().length === 0) {
56126
56927
  if (!dryRun) {
56127
56928
  try {
@@ -56337,10 +57138,10 @@ function collectAllXUsages(dsl) {
56337
57138
  function extractTemplateXReferences(config) {
56338
57139
  const refs = [];
56339
57140
  try {
56340
- const { readFileSync: readFileSync3 } = __require("fs");
57141
+ const { readFileSync: readFileSync4 } = __require("fs");
56341
57142
  for (const target of config.renders) {
56342
57143
  try {
56343
- const content = readFileSync3(target.template, "utf8");
57144
+ const content = readFileSync4(target.template, "utf8");
56344
57145
  const matches = content.matchAll(/\{\{[^}]*?(x-[\w-]+)[^}]*?\}\}/g);
56345
57146
  for (const m2 of matches) refs.push(m2[1]);
56346
57147
  } catch {
@@ -56865,7 +57666,7 @@ var DslTaskResultSchema = z20.object({
56865
57666
  });
56866
57667
  var AuditResultSchema = z20.object({
56867
57668
  summary: z20.string(),
56868
- riskLevel: z20.enum(["low", "medium", "high", "critical"]),
57669
+ risk_level: z20.enum(["low", "medium", "high", "critical"]),
56869
57670
  findings: z20.array(z20.object({
56870
57671
  id: z20.string().optional(),
56871
57672
  severity: z20.enum(["info", "warning", "error", "critical"]),
@@ -56883,7 +57684,7 @@ var AuditResultSchema = z20.object({
56883
57684
  })).optional(),
56884
57685
  details: z20.record(z20.string(), z20.unknown()).optional()
56885
57686
  })),
56886
- recommendedActions: z20.array(z20.object({
57687
+ recommended_actions: z20.array(z20.object({
56887
57688
  kind: z20.enum(["run_command", "edit_file", "review", "confirm", "block", "ignore"]),
56888
57689
  title: z20.string(),
56889
57690
  command: z20.string().optional(),
@@ -56894,7 +57695,7 @@ var AuditResultSchema = z20.object({
56894
57695
  tool: z20.string().optional(),
56895
57696
  command: z20.string().optional(),
56896
57697
  version: z20.string().optional(),
56897
- generatedAt: z20.string().optional(),
57698
+ generated_at: z20.string().optional(),
56898
57699
  adapter: z20.string().optional(),
56899
57700
  model: z20.string().optional()
56900
57701
  }).optional()
@@ -57205,13 +58006,13 @@ function getTeamEntries(config, teamFilter) {
57205
58006
 
57206
58007
  // src/cli/commands/generate-interface.ts
57207
58008
  import { writeFileSync } from "fs";
57208
- import { resolve as resolve7 } from "path";
58009
+ import { resolve as resolve8 } from "path";
57209
58010
  function runGenerateInterfaceCli(opts) {
57210
58011
  if (!opts.dsl.team_interface) {
57211
58012
  process.stderr.write("Error: DSL has no team_interface section.\n");
57212
58013
  process.exit(1);
57213
58014
  }
57214
- const outputPath = resolve7(process.cwd(), opts.output ?? "team-interface.yaml");
58015
+ const outputPath = resolve8(process.cwd(), opts.output ?? "team-interface.yaml");
57215
58016
  const result = generateInterface({
57216
58017
  dsl: opts.dsl,
57217
58018
  output: outputPath,
@@ -57607,12 +58408,12 @@ var handleCheck = async (opts) => {
57607
58408
  }
57608
58409
  if (schemaResult.data.team_interface) {
57609
58410
  const interfacePath = join3(config.configDir, "team-interface.yaml");
57610
- if (existsSync(interfacePath)) {
58411
+ if (existsSync2(interfacePath)) {
57611
58412
  const result = generateInterface({ dsl: schemaResult.data, dryRun: true, format: "yaml" });
57612
- const existing = readFileSync(interfacePath, "utf8");
58413
+ const existing = readFileSync2(interfacePath, "utf8");
57613
58414
  const normalize = (raw) => {
57614
58415
  try {
57615
- const parsed = parseYaml4(raw);
58416
+ const parsed = parseYaml5(raw);
57616
58417
  if (parsed && typeof parsed === "object" && !Array.isArray(parsed)) {
57617
58418
  const { generated_at: _t, ...rest } = parsed;
57618
58419
  return `${stringify3(rest, { sortMapEntries: true })}
@@ -58024,6 +58825,105 @@ var handleGenerate = async (type, opts) => {
58024
58825
  process.exit(1);
58025
58826
  }
58026
58827
  };
58828
+ function filterIndexByArtifact(index3, artifactId) {
58829
+ const node = index3.artifacts[artifactId];
58830
+ if (!node) {
58831
+ throw new Error(`Artifact not found: ${artifactId}`);
58832
+ }
58833
+ return {
58834
+ ...index3,
58835
+ artifacts: { [artifactId]: node }
58836
+ };
58837
+ }
58838
+ function writeNavigationIndex(index3, format2) {
58839
+ if (format2 === "json") {
58840
+ process.stdout.write(JSON.stringify(index3, null, 2) + "\n");
58841
+ } else {
58842
+ process.stdout.write(stringify3(index3));
58843
+ }
58844
+ }
58845
+ async function buildNavigationIndexForDsl(dslPath, vars, artifactFilter) {
58846
+ const resolved = await resolve4(dslPath);
58847
+ const data = vars ? substituteVars(resolved.data, vars) : resolved.data;
58848
+ const schemaResult = validateSchema(data);
58849
+ if (!schemaResult.success) {
58850
+ const issues = schemaResult.diagnostics.map((d2) => ` ${d2.path}: ${d2.message}`).join("\n");
58851
+ process.stderr.write(`Schema validation failed:
58852
+ ${issues}
58853
+ `);
58854
+ throw new Error("schema validation failed");
58855
+ }
58856
+ let index3 = buildNavigationIndex(schemaResult.data);
58857
+ if (artifactFilter) {
58858
+ index3 = filterIndexByArtifact(index3, artifactFilter);
58859
+ }
58860
+ return index3;
58861
+ }
58862
+ var handleNavigationIndex = async (dir, opts) => {
58863
+ const fmt = opts.format ?? "json";
58864
+ if (fmt !== "json" && fmt !== "yaml") {
58865
+ process.stderr.write(`Invalid --format: expected json or yaml, got ${fmt}
58866
+ `);
58867
+ process.exit(1);
58868
+ }
58869
+ try {
58870
+ const config = await loadConfig(opts.config);
58871
+ if (config !== null && isMultiTeamConfig(config)) {
58872
+ const teamEntries = getTeamEntries(config, opts.team);
58873
+ let hasErrors = false;
58874
+ if (fmt === "json") {
58875
+ const out = {};
58876
+ for (const [teamId, teamConfig] of teamEntries) {
58877
+ try {
58878
+ out[teamId] = await buildNavigationIndexForDsl(
58879
+ teamConfig.dsl,
58880
+ teamConfig.vars,
58881
+ opts.artifact
58882
+ );
58883
+ } catch (err) {
58884
+ if (err instanceof Error && err.message === "schema validation failed") {
58885
+ hasErrors = true;
58886
+ continue;
58887
+ }
58888
+ throw err;
58889
+ }
58890
+ }
58891
+ if (hasErrors) process.exit(1);
58892
+ process.stdout.write(JSON.stringify(out, null, 2) + "\n");
58893
+ } else {
58894
+ for (const [teamId, teamConfig] of teamEntries) {
58895
+ if (!opts.quiet) process.stdout.write(`
58896
+ --- Team: ${teamId} ---
58897
+ `);
58898
+ try {
58899
+ const index4 = await buildNavigationIndexForDsl(
58900
+ teamConfig.dsl,
58901
+ teamConfig.vars,
58902
+ opts.artifact
58903
+ );
58904
+ process.stdout.write(stringify3(index4));
58905
+ } catch (err) {
58906
+ if (err instanceof Error && err.message === "schema validation failed") {
58907
+ hasErrors = true;
58908
+ continue;
58909
+ }
58910
+ throw err;
58911
+ }
58912
+ }
58913
+ if (hasErrors) process.exit(1);
58914
+ }
58915
+ return;
58916
+ }
58917
+ const dslPath = resolveDslPath(dir ?? DIR_DEFAULT, DIR_DEFAULT, config);
58918
+ const index3 = await buildNavigationIndexForDsl(dslPath, config?.vars, opts.artifact);
58919
+ writeNavigationIndex(index3, fmt);
58920
+ } catch (err) {
58921
+ const msg = err instanceof Error ? err.message : String(err);
58922
+ process.stderr.write(`Error: ${msg}
58923
+ `);
58924
+ process.exit(1);
58925
+ }
58926
+ };
58027
58927
  var handlers = {
58028
58928
  resolve: handleResolve,
58029
58929
  validate: handleValidate,
@@ -58032,12 +58932,13 @@ var handlers = {
58032
58932
  check: handleCheck,
58033
58933
  score: handleScore,
58034
58934
  audit: handleAudit,
58035
- generate: handleGenerate
58935
+ generate: handleGenerate,
58936
+ navigationIndex: handleNavigationIndex
58036
58937
  };
58037
58938
 
58038
58939
  // src/cli/cli.ts
58039
58940
  var __dirname = dirname8(fileURLToPath(import.meta.url));
58040
- var pkg = JSON.parse(readFileSync2(resolve8(__dirname, "../package.json"), "utf8"));
58941
+ var pkg = JSON.parse(readFileSync3(resolve9(__dirname, "../package.json"), "utf8"));
58041
58942
  var program = createProgram(handlers, pkg.version);
58042
58943
  program.parse();
58043
58944
  /*! Bundled license information: