agent-inspect 6.23.0 → 6.25.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.
@@ -12499,12 +12499,31 @@ ${cases}
12499
12499
  </testsuite>
12500
12500
  </testsuites>`;
12501
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
+ }
12502
12508
  function renderGateReport(result, options = {}) {
12503
12509
  const format = options.format ?? "markdown";
12504
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
+ }
12505
12523
  if (format === "html") return renderGateReportHtml(result);
12506
12524
  if (format === "junit") return renderGateJUnit(result);
12507
12525
  if (format === "github") return renderGateGithubStepSummary(result);
12526
+ if (format === "github-annotations") return renderGateGithubAnnotations(result);
12508
12527
  return renderGateSummaryMarkdown(result);
12509
12528
  }
12510
12529
  var init_render3 = __esm({
@@ -13044,7 +13063,7 @@ var init_src = __esm({
13044
13063
  });
13045
13064
 
13046
13065
  // package.json
13047
- var version = "6.23.0";
13066
+ var version = "6.25.0";
13048
13067
 
13049
13068
  // packages/cli/src/list.ts
13050
13069
  init_advanced();
@@ -24222,11 +24241,14 @@ var TRACE_DIR = ".agent-inspect";
24222
24241
  var GITKEEP = ".agent-inspect/.gitkeep";
24223
24242
  function normalizeFramework(value) {
24224
24243
  const raw = (value ?? "custom").trim();
24244
+ if (raw === "observe" || raw === "manual") {
24245
+ return "custom";
24246
+ }
24225
24247
  if (raw === "ai-sdk" || raw === "openai-agents" || raw === "langchain" || raw === "langgraph" || raw === "custom") {
24226
24248
  return raw;
24227
24249
  }
24228
24250
  throw new Error(
24229
- "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."
24230
24252
  );
24231
24253
  }
24232
24254
  function configTemplate(framework) {
@@ -25805,7 +25827,15 @@ async function cohortCommand(options = {}) {
25805
25827
 
25806
25828
  // packages/cli/src/gate.ts
25807
25829
  init_advanced();
25808
- 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
+ ]);
25809
25839
  function collectList(value) {
25810
25840
  if (value === void 0) return [];
25811
25841
  const items = Array.isArray(value) ? value : [value];
@@ -25840,7 +25870,8 @@ async function writeArtifacts2(result, outputDir) {
25840
25870
  markdownPath: path33__default.default.join(outputDir, "gate-summary.md"),
25841
25871
  htmlPath: path33__default.default.join(outputDir, "gate-report.html"),
25842
25872
  junitPath: path33__default.default.join(outputDir, "junit.xml"),
25843
- 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")
25844
25875
  };
25845
25876
  await promises.writeFile(
25846
25877
  paths.jsonPath,
@@ -25869,6 +25900,12 @@ async function writeArtifacts2(result, outputDir) {
25869
25900
  await promises.writeFile(
25870
25901
  paths.githubPath,
25871
25902
  `${renderGateReport(result, { format: "github" })}
25903
+ `,
25904
+ "utf-8"
25905
+ );
25906
+ await promises.writeFile(
25907
+ paths.annotationsPath,
25908
+ `${renderGateReport(result, { format: "github-annotations" })}
25872
25909
  `,
25873
25910
  "utf-8"
25874
25911
  );
@@ -26419,7 +26456,9 @@ function createCliProgram() {
26419
26456
  "openai-agents",
26420
26457
  "langchain",
26421
26458
  "langgraph",
26422
- "custom"
26459
+ "custom",
26460
+ "observe",
26461
+ "manual"
26423
26462
  ])
26424
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) => {
26425
26464
  runCommand(() => initCommand(opts));