agent-inspect 6.22.0 → 6.24.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.
@@ -7264,12 +7264,38 @@ var init_contract_scope = __esm({
7264
7264
  init_metadata();
7265
7265
  }
7266
7266
  });
7267
+
7268
+ // packages/core/src/checks/control-rules.ts
7269
+ var init_control_rules = __esm({
7270
+ "packages/core/src/checks/control-rules.ts"() {
7271
+ init_logical_events();
7272
+ }
7273
+ });
7274
+
7275
+ // packages/core/src/checks/retry-safety.ts
7276
+ var init_retry_safety = __esm({
7277
+ "packages/core/src/checks/retry-safety.ts"() {
7278
+ init_logical_events();
7279
+ init_metadata();
7280
+ }
7281
+ });
7282
+
7283
+ // packages/core/src/checks/tool-arguments.ts
7284
+ var init_tool_arguments = __esm({
7285
+ "packages/core/src/checks/tool-arguments.ts"() {
7286
+ }
7287
+ });
7267
7288
  var init_contract = __esm({
7268
7289
  "packages/core/src/checks/contract.ts"() {
7269
7290
  init_checks2();
7270
7291
  init_contract_scope();
7292
+ init_logical_events();
7293
+ init_control_rules();
7294
+ init_retry_safety();
7295
+ init_tool_arguments();
7271
7296
  init_outcomes();
7272
7297
  init_contract_scope();
7298
+ init_tool_arguments();
7273
7299
  new Set(OBSERVED_OUTCOME_METHODS);
7274
7300
  }
7275
7301
  });
@@ -12473,12 +12499,31 @@ ${cases}
12473
12499
  </testsuite>
12474
12500
  </testsuites>`;
12475
12501
  }
12502
+ function renderGateGithubAnnotations(result) {
12503
+ return result.checks.filter((check) => !check.ok).map((check) => {
12504
+ const message = check.message.replace(/\r?\n/g, " ").replace(/%/g, "%25");
12505
+ return `::error title=${check.name}::${message}`;
12506
+ }).join("\n");
12507
+ }
12476
12508
  function renderGateReport(result, options = {}) {
12477
12509
  const format = options.format ?? "markdown";
12478
12510
  if (format === "json") return JSON.stringify(result, null, 2);
12511
+ if (format === "json-compact") {
12512
+ return JSON.stringify({
12513
+ ok: result.ok,
12514
+ exitCode: result.exitCode,
12515
+ failed: result.checks.filter((check) => !check.ok).map((check) => check.name),
12516
+ checks: result.checks.map((check) => ({
12517
+ name: check.name,
12518
+ ok: check.ok,
12519
+ message: check.message
12520
+ }))
12521
+ });
12522
+ }
12479
12523
  if (format === "html") return renderGateReportHtml(result);
12480
12524
  if (format === "junit") return renderGateJUnit(result);
12481
12525
  if (format === "github") return renderGateGithubStepSummary(result);
12526
+ if (format === "github-annotations") return renderGateGithubAnnotations(result);
12482
12527
  return renderGateSummaryMarkdown(result);
12483
12528
  }
12484
12529
  var init_render3 = __esm({
@@ -13018,7 +13063,7 @@ var init_src = __esm({
13018
13063
  });
13019
13064
 
13020
13065
  // package.json
13021
- var version = "6.22.0";
13066
+ var version = "6.24.0";
13022
13067
 
13023
13068
  // packages/cli/src/list.ts
13024
13069
  init_advanced();
@@ -24196,11 +24241,14 @@ var TRACE_DIR = ".agent-inspect";
24196
24241
  var GITKEEP = ".agent-inspect/.gitkeep";
24197
24242
  function normalizeFramework(value) {
24198
24243
  const raw = (value ?? "custom").trim();
24244
+ if (raw === "observe" || raw === "manual") {
24245
+ return "custom";
24246
+ }
24199
24247
  if (raw === "ai-sdk" || raw === "openai-agents" || raw === "langchain" || raw === "langgraph" || raw === "custom") {
24200
24248
  return raw;
24201
24249
  }
24202
24250
  throw new Error(
24203
- "Unsupported --framework value. Use ai-sdk, openai-agents, langchain, langgraph, or custom."
24251
+ "Unsupported --framework value. Use ai-sdk, openai-agents, langchain, langgraph, custom, observe, or manual."
24204
24252
  );
24205
24253
  }
24206
24254
  function configTemplate(framework) {
@@ -25779,7 +25827,15 @@ async function cohortCommand(options = {}) {
25779
25827
 
25780
25828
  // packages/cli/src/gate.ts
25781
25829
  init_advanced();
25782
- var SUPPORTED_FORMATS = /* @__PURE__ */ new Set(["markdown", "json", "html", "junit", "github"]);
25830
+ var SUPPORTED_FORMATS = /* @__PURE__ */ new Set([
25831
+ "markdown",
25832
+ "json",
25833
+ "json-compact",
25834
+ "html",
25835
+ "junit",
25836
+ "github",
25837
+ "github-annotations"
25838
+ ]);
25783
25839
  function collectList(value) {
25784
25840
  if (value === void 0) return [];
25785
25841
  const items = Array.isArray(value) ? value : [value];
@@ -25814,7 +25870,8 @@ async function writeArtifacts2(result, outputDir) {
25814
25870
  markdownPath: path33__default.default.join(outputDir, "gate-summary.md"),
25815
25871
  htmlPath: path33__default.default.join(outputDir, "gate-report.html"),
25816
25872
  junitPath: path33__default.default.join(outputDir, "junit.xml"),
25817
- githubPath: path33__default.default.join(outputDir, "github-step-summary.md")
25873
+ githubPath: path33__default.default.join(outputDir, "github-step-summary.md"),
25874
+ annotationsPath: path33__default.default.join(outputDir, "github-annotations.txt")
25818
25875
  };
25819
25876
  await promises.writeFile(
25820
25877
  paths.jsonPath,
@@ -25843,6 +25900,12 @@ async function writeArtifacts2(result, outputDir) {
25843
25900
  await promises.writeFile(
25844
25901
  paths.githubPath,
25845
25902
  `${renderGateReport(result, { format: "github" })}
25903
+ `,
25904
+ "utf-8"
25905
+ );
25906
+ await promises.writeFile(
25907
+ paths.annotationsPath,
25908
+ `${renderGateReport(result, { format: "github-annotations" })}
25846
25909
  `,
25847
25910
  "utf-8"
25848
25911
  );
@@ -26393,7 +26456,9 @@ function createCliProgram() {
26393
26456
  "openai-agents",
26394
26457
  "langchain",
26395
26458
  "langgraph",
26396
- "custom"
26459
+ "custom",
26460
+ "observe",
26461
+ "manual"
26397
26462
  ])
26398
26463
  ).addOption(new commander.Option("--ci <provider>", "optional CI snippet").choices(["github"])).option("--dry-run", "print planned files without writing").option("--yes", "non-interactive; skip existing files").option("--json", "print deterministic JSON plan/result").action((opts) => {
26399
26464
  runCommand(() => initCommand(opts));