agent-inspect 6.7.3 → 6.7.5
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/CHANGELOG.md +21 -0
- package/README.md +1 -1
- package/docs/CLI.md +4 -4
- package/docs/NESTJS.md +10 -0
- package/package.json +2 -2
- package/packages/cli/dist/{chunk-EMYDJREA.mjs → chunk-TO4VENHV.mjs} +228 -234
- package/packages/cli/dist/chunk-TO4VENHV.mjs.map +1 -0
- package/packages/cli/dist/index.cjs +523 -1176
- package/packages/cli/dist/index.cjs.map +1 -1
- package/packages/cli/dist/index.mjs +126 -44
- package/packages/cli/dist/index.mjs.map +1 -1
- package/packages/cli/dist/src-Z5W27YCW.mjs +419 -0
- package/packages/cli/dist/src-Z5W27YCW.mjs.map +1 -0
- package/packages/core/dist/advanced.cjs +225 -199
- package/packages/core/dist/advanced.cjs.map +1 -1
- package/packages/core/dist/advanced.mjs +26 -241
- package/packages/core/dist/advanced.mjs.map +1 -1
- package/packages/core/dist/{chunk-X2FLDF7M.mjs → chunk-CTA6XNDP.mjs} +3 -3
- package/packages/core/dist/{chunk-X2FLDF7M.mjs.map → chunk-CTA6XNDP.mjs.map} +1 -1
- package/packages/core/dist/{chunk-3USJVBLA.mjs → chunk-KDDU2R5P.mjs} +236 -5
- package/packages/core/dist/chunk-KDDU2R5P.mjs.map +1 -0
- package/packages/core/dist/{chunk-E5F2LQCX.mjs → chunk-T5MASTIW.mjs} +15 -4
- package/packages/core/dist/chunk-T5MASTIW.mjs.map +1 -0
- package/packages/core/dist/{chunk-KNYL56KZ.mjs → chunk-UOPVGCOB.mjs} +3 -3
- package/packages/core/dist/{chunk-KNYL56KZ.mjs.map → chunk-UOPVGCOB.mjs.map} +1 -1
- package/packages/core/dist/exporters.cjs +136 -129
- package/packages/core/dist/exporters.cjs.map +1 -1
- package/packages/core/dist/exporters.mjs +1 -1
- package/packages/core/dist/logs.cjs +13 -2
- package/packages/core/dist/logs.cjs.map +1 -1
- package/packages/core/dist/logs.mjs +2 -2
- package/packages/core/dist/persisted.cjs +13 -2
- package/packages/core/dist/persisted.cjs.map +1 -1
- package/packages/core/dist/persisted.mjs +3 -3
- package/packages/core/dist/readers.cjs +13 -2
- package/packages/core/dist/readers.cjs.map +1 -1
- package/packages/core/dist/readers.mjs +3 -3
- package/packages/cli/dist/chunk-EMYDJREA.mjs.map +0 -1
- package/packages/cli/dist/src-IPJNFV37.mjs +0 -1160
- package/packages/cli/dist/src-IPJNFV37.mjs.map +0 -1
- package/packages/core/dist/chunk-3USJVBLA.mjs.map +0 -1
- package/packages/core/dist/chunk-E5F2LQCX.mjs.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { createSafetyRawContentRule, createSafetyRedactionRule, createSafetySecretPatternRule, createSafetyOversizedAttributeRule, resolveTraceDir, parseDuration, buildSessionIndex, enrichSessionRunRecord, TraceDirectory, loadTraceMetadataList, loadSessionRunRecords, extractMetadata, filterTraces, truncateName, getTraceFilePath, buildRunSummary, formatDuration, formatTimestamp, isAgentInspectTrace, openTrace, TraceReadError, filterMetasBySessionScope, runTraceChecks, aggregateSessionCheckResults, createBaselineRegressionRule, resolveBundleRunIds, aggregateBundleSafeStatus, bundleFailsOnSafety, bundleRunAssetRelativePath, buildPlaceholderArtifact, buildBundleMetadata, buildBundleSummaryMarkdown, buildRunTimeline, renderTimeline, buildTraceStats, renderTraceStats, parseDurationFilter, searchTraces, buildActivitySummary, renderActivitySummaryHuman, buildRunWhatSummary, renderRunWhat, buildLocalExplanation, resolveSuiteTemplate, defaultSuiteConfigTemplate, loadSuiteConfig, validateSuiteConfig, runSuite, renderSuiteReport, analyzeCohort, renderCohortReport, gateHasThresholds, runGate, renderGateReport, persistedInspectEventsToTraceEvents, renderStepLine, renderErrorLine, getIndent, Redactor, TreeBuilder, zeroKinds, validateEvent, traceEventToPersistedInspectEvent, isPersistedInspectEvent, createRunStatusRule, createStructureOrphanRule, createStructureCycleRule, createRunDurationRule, createMaxStepDurationRule, createRequireCompletedRule, createStallDetectionRule, createObservedOutcomeRule, createRunDepthRule, createToolUsageRule, createLlmUsageRule, createStructureRelationshipRule, createStructureParallelWidthRule, normalizeBundleOutputPath, sanitizeBundleRunId, defaultBundleOutputPath, assertBundlePathContained, summarizeObservedOutcomes, extractOutcomesFromTraceEvents, renderObservedOutcomesMarkdown, renderObservedOutcomesHtml, escapeMarkdown, escapeHtml, DEFAULT_SUITE_ARTIFACTS_DIR, parseCohortMetricList, COHORT_METRIC_IDS, parseGateList, nanoid, resolveRedactionProfile, applyProfileMetadataCaps, flattenTree, safeString, compactAttributes, stableJson, truncateStringForProfile } from './chunk-
|
|
3
|
-
import { realpathSync, constants as constants$1 } from 'fs';
|
|
2
|
+
import { createSafetyRawContentRule, createSafetyRedactionRule, createSafetySecretPatternRule, createSafetyOversizedAttributeRule, resolveTraceDir, parseDuration, buildSessionIndex, enrichSessionRunRecord, TraceDirectory, loadTraceMetadataList, loadSessionRunRecords, extractMetadata, filterTraces, truncateName, getTraceFilePath, buildRunSummary, formatDuration, formatTimestamp, isAgentInspectTrace, openTrace, TraceReadError, filterMetasBySessionScope, runTraceChecks, aggregateSessionCheckResults, createBaselineRegressionRule, resolveBundleRunIds, aggregateBundleSafeStatus, bundleFailsOnSafety, bundleRunAssetRelativePath, buildPlaceholderArtifact, buildBundleMetadata, buildBundleSummaryMarkdown, buildRunTimeline, renderTimeline, buildTraceStats, renderTraceStats, parseDurationFilter, searchTraces, buildActivitySummary, renderActivitySummaryHuman, buildRunWhatSummary, renderRunWhat, buildLocalExplanation, resolveSuiteTemplate, defaultSuiteConfigTemplate, loadSuiteConfig, validateSuiteConfig, runSuite, renderSuiteReport, analyzeCohort, renderCohortReport, gateHasThresholds, runGate, renderGateReport, persistedInspectEventsToTraceEvents, renderStepLine, renderErrorLine, getIndent, Redactor, TreeBuilder, zeroKinds, validateEvent, traceEventToPersistedInspectEvent, isPersistedInspectEvent, createRunStatusRule, createStructureOrphanRule, createStructureCycleRule, createRunDurationRule, createMaxStepDurationRule, createRequireCompletedRule, createStallDetectionRule, createObservedOutcomeRule, createRunDepthRule, createToolUsageRule, createLlmUsageRule, createStructureRelationshipRule, createStructureParallelWidthRule, normalizeBundleOutputPath, sanitizeBundleRunId, defaultBundleOutputPath, assertBundlePathContained, summarizeObservedOutcomes, extractOutcomesFromTraceEvents, renderObservedOutcomesMarkdown, renderObservedOutcomesHtml, escapeMarkdown, escapeHtml, DEFAULT_SUITE_ARTIFACTS_DIR, parseCohortMetricList, COHORT_METRIC_IDS, parseGateList, nanoid, resolveRedactionProfile, applyProfileMetadataCaps, flattenTree, safeString, compactAttributes, stableJson, truncateStringForProfile } from './chunk-TO4VENHV.mjs';
|
|
3
|
+
import { realpathSync, constants as constants$1, existsSync, readFileSync } from 'fs';
|
|
4
4
|
import path14 from 'path';
|
|
5
5
|
import { fileURLToPath, pathToFileURL } from 'url';
|
|
6
6
|
import { Command, Option } from 'commander';
|
|
@@ -11,7 +11,7 @@ import { createServer } from 'http';
|
|
|
11
11
|
import { createRequire } from 'module';
|
|
12
12
|
|
|
13
13
|
// package.json
|
|
14
|
-
var version = "6.7.
|
|
14
|
+
var version = "6.7.5";
|
|
15
15
|
|
|
16
16
|
// packages/cli/src/trace-dir-scale.ts
|
|
17
17
|
var TRACE_COUNT_WARN = 1e3;
|
|
@@ -2878,6 +2878,20 @@ ${attrsSection}
|
|
|
2878
2878
|
};
|
|
2879
2879
|
}
|
|
2880
2880
|
|
|
2881
|
+
// packages/cli/src/cli-option-aliases.ts
|
|
2882
|
+
function resolveOutputOption(options) {
|
|
2883
|
+
const canonical = options.output?.trim();
|
|
2884
|
+
if (canonical) return canonical;
|
|
2885
|
+
const legacy = options.out?.trim();
|
|
2886
|
+
return legacy || void 0;
|
|
2887
|
+
}
|
|
2888
|
+
function resolveRedactionProfileOption(options) {
|
|
2889
|
+
const canonical = options.redactionProfile?.trim();
|
|
2890
|
+
if (canonical) return canonical;
|
|
2891
|
+
const legacy = options.profile?.trim();
|
|
2892
|
+
return legacy || void 0;
|
|
2893
|
+
}
|
|
2894
|
+
|
|
2881
2895
|
// packages/cli/src/export.ts
|
|
2882
2896
|
function parseRedactionProfile(s) {
|
|
2883
2897
|
const v = (s ?? "local").trim().toLowerCase();
|
|
@@ -2908,7 +2922,7 @@ async function exportCommand(runId, options = {}) {
|
|
|
2908
2922
|
let redactionProfile;
|
|
2909
2923
|
try {
|
|
2910
2924
|
format = parseExportFormat(options.format);
|
|
2911
|
-
redactionProfile = parseRedactionProfile(options
|
|
2925
|
+
redactionProfile = parseRedactionProfile(resolveRedactionProfileOption(options));
|
|
2912
2926
|
} catch (e) {
|
|
2913
2927
|
const msg = e instanceof Error ? e.message : String(e);
|
|
2914
2928
|
console.error(msg);
|
|
@@ -2956,7 +2970,8 @@ Trace directory: ${traceDir}`);
|
|
|
2956
2970
|
if (validation !== void 0 && !validation.ok) {
|
|
2957
2971
|
process.exitCode = 1;
|
|
2958
2972
|
}
|
|
2959
|
-
const
|
|
2973
|
+
const resolvedOutput = resolveOutputOption(options);
|
|
2974
|
+
const outPath = resolvedOutput !== void 0 ? path14.resolve(resolvedOutput) : void 0;
|
|
2960
2975
|
if (outPath !== void 0) {
|
|
2961
2976
|
await mkdir(path14.dirname(outPath), { recursive: true });
|
|
2962
2977
|
await writeFile(outPath, result.content, "utf-8");
|
|
@@ -3793,7 +3808,7 @@ async function newestTraceMtimeMs(traceDir) {
|
|
|
3793
3808
|
}
|
|
3794
3809
|
async function loadSessionRuns(traceDir) {
|
|
3795
3810
|
try {
|
|
3796
|
-
const mod = await import('./src-
|
|
3811
|
+
const mod = await import('./src-Z5W27YCW.mjs');
|
|
3797
3812
|
const dbPath = mod.resolveIndexDbPath(traceDir);
|
|
3798
3813
|
const status = mod.indexStatus(dbPath);
|
|
3799
3814
|
if (!status.healthy) {
|
|
@@ -4209,7 +4224,7 @@ async function reportCommand(runId, options = {}) {
|
|
|
4209
4224
|
let redactionProfile;
|
|
4210
4225
|
try {
|
|
4211
4226
|
format = parseReportFormat(options.format);
|
|
4212
|
-
redactionProfile = parseRedactionProfile2(options
|
|
4227
|
+
redactionProfile = parseRedactionProfile2(resolveRedactionProfileOption(options));
|
|
4213
4228
|
} catch (e) {
|
|
4214
4229
|
const msg = e instanceof Error ? e.message : String(e);
|
|
4215
4230
|
console.error(msg);
|
|
@@ -4241,7 +4256,8 @@ async function reportCommand(runId, options = {}) {
|
|
|
4241
4256
|
correlation: !options.noCorrelation,
|
|
4242
4257
|
...options.section ? { section: options.section } : {}
|
|
4243
4258
|
});
|
|
4244
|
-
const
|
|
4259
|
+
const resolvedOutput = resolveOutputOption(options);
|
|
4260
|
+
const outPath = resolvedOutput !== void 0 ? path14.resolve(resolvedOutput) : void 0;
|
|
4245
4261
|
if (outPath !== void 0) {
|
|
4246
4262
|
await mkdir(path14.dirname(outPath), { recursive: true });
|
|
4247
4263
|
await writeFile(outPath, result.content, "utf-8");
|
|
@@ -4754,11 +4770,12 @@ function redactTraceContent(content, profile) {
|
|
|
4754
4770
|
return redactDocument(content, profile);
|
|
4755
4771
|
}
|
|
4756
4772
|
async function redactCommand(target, options = {}, stdin = process.stdin) {
|
|
4757
|
-
const profile = parseRedactionProfile3(options
|
|
4773
|
+
const profile = parseRedactionProfile3(resolveRedactionProfileOption(options));
|
|
4758
4774
|
const source = await contentFromTarget(target, options, stdin);
|
|
4759
4775
|
const redacted = redactDocument(source.content, profile);
|
|
4760
|
-
|
|
4761
|
-
|
|
4776
|
+
const outputPath = resolveOutputOption(options);
|
|
4777
|
+
if (outputPath !== void 0) {
|
|
4778
|
+
await writeFile(outputPath, redacted.content, "utf-8");
|
|
4762
4779
|
}
|
|
4763
4780
|
if (options.json) {
|
|
4764
4781
|
console.log(
|
|
@@ -4767,9 +4784,9 @@ async function redactCommand(target, options = {}, stdin = process.stdin) {
|
|
|
4767
4784
|
ok: true,
|
|
4768
4785
|
profile,
|
|
4769
4786
|
source: source.source,
|
|
4770
|
-
output:
|
|
4787
|
+
output: outputPath,
|
|
4771
4788
|
findings: redacted.findings,
|
|
4772
|
-
content:
|
|
4789
|
+
content: outputPath === void 0 ? redacted.content : void 0
|
|
4773
4790
|
}),
|
|
4774
4791
|
null,
|
|
4775
4792
|
2
|
|
@@ -4777,7 +4794,7 @@ async function redactCommand(target, options = {}, stdin = process.stdin) {
|
|
|
4777
4794
|
);
|
|
4778
4795
|
return;
|
|
4779
4796
|
}
|
|
4780
|
-
if (
|
|
4797
|
+
if (outputPath === void 0) {
|
|
4781
4798
|
process.stdout.write(redacted.content);
|
|
4782
4799
|
}
|
|
4783
4800
|
}
|
|
@@ -4854,7 +4871,7 @@ async function explainCommand(target, options = {}, stdin = process.stdin) {
|
|
|
4854
4871
|
}
|
|
4855
4872
|
let redactionProfile;
|
|
4856
4873
|
try {
|
|
4857
|
-
redactionProfile = parseRedactionProfile4(options
|
|
4874
|
+
redactionProfile = parseRedactionProfile4(resolveRedactionProfileOption(options));
|
|
4858
4875
|
} catch (error) {
|
|
4859
4876
|
process.exitCode = 1;
|
|
4860
4877
|
console.error(error instanceof Error ? error.message : String(error));
|
|
@@ -6012,9 +6029,20 @@ function buildRules(config, options) {
|
|
|
6012
6029
|
...asStringArray(checks2.select) ?? [],
|
|
6013
6030
|
...options.rule ?? []
|
|
6014
6031
|
];
|
|
6032
|
+
if (select.length === 0) {
|
|
6033
|
+
const auto = new Set(DEFAULT_SELECT);
|
|
6034
|
+
for (const rule of rules) {
|
|
6035
|
+
if (rule.id !== "run.status") auto.add(rule.id);
|
|
6036
|
+
}
|
|
6037
|
+
return {
|
|
6038
|
+
rules,
|
|
6039
|
+
select: [...auto],
|
|
6040
|
+
diagnostics
|
|
6041
|
+
};
|
|
6042
|
+
}
|
|
6015
6043
|
return {
|
|
6016
6044
|
rules,
|
|
6017
|
-
select
|
|
6045
|
+
select,
|
|
6018
6046
|
diagnostics
|
|
6019
6047
|
};
|
|
6020
6048
|
}
|
|
@@ -8783,8 +8811,9 @@ function safetyStatusFromAssess(status) {
|
|
|
8783
8811
|
return "UNKNOWN";
|
|
8784
8812
|
}
|
|
8785
8813
|
async function resolveOutputDir(options, runIds, cwd) {
|
|
8786
|
-
|
|
8787
|
-
|
|
8814
|
+
const out = resolveOutputOption(options);
|
|
8815
|
+
if (out !== void 0) {
|
|
8816
|
+
const normalized = normalizeBundleOutputPath(out);
|
|
8788
8817
|
try {
|
|
8789
8818
|
const location = resolveWorkspaceLocation(cwd);
|
|
8790
8819
|
const manifest = await readWorkspaceManifestFile(location);
|
|
@@ -8854,7 +8883,7 @@ function extractHtmlBody(content) {
|
|
|
8854
8883
|
return match?.[1]?.trim() ?? content;
|
|
8855
8884
|
}
|
|
8856
8885
|
async function bundleCommand(runIdArg, options = {}) {
|
|
8857
|
-
const profile = parseBundleProfile(options
|
|
8886
|
+
const profile = parseBundleProfile(resolveRedactionProfileOption(options));
|
|
8858
8887
|
const traceDir = resolveTraceDir({ dir: options.dir });
|
|
8859
8888
|
const cwd = process.cwd();
|
|
8860
8889
|
let resolveResult;
|
|
@@ -9739,42 +9768,67 @@ async function traceDirWritable(traceDir) {
|
|
|
9739
9768
|
};
|
|
9740
9769
|
}
|
|
9741
9770
|
}
|
|
9742
|
-
function
|
|
9771
|
+
function readPackageVersionNearEntry(entryPath, packageName) {
|
|
9772
|
+
let dir = path14.dirname(path14.resolve(entryPath));
|
|
9773
|
+
const { root } = path14.parse(dir);
|
|
9774
|
+
while (true) {
|
|
9775
|
+
const candidate = path14.join(dir, "package.json");
|
|
9776
|
+
if (existsSync(candidate)) {
|
|
9777
|
+
try {
|
|
9778
|
+
const pkg = JSON.parse(readFileSync(candidate, "utf8"));
|
|
9779
|
+
if (pkg.name === packageName && typeof pkg.version === "string") {
|
|
9780
|
+
return pkg.version;
|
|
9781
|
+
}
|
|
9782
|
+
} catch {
|
|
9783
|
+
}
|
|
9784
|
+
}
|
|
9785
|
+
if (dir === root) break;
|
|
9786
|
+
const parent = path14.dirname(dir);
|
|
9787
|
+
if (parent === dir) break;
|
|
9788
|
+
dir = parent;
|
|
9789
|
+
}
|
|
9790
|
+
return void 0;
|
|
9791
|
+
}
|
|
9792
|
+
function resolveInstalledPackage(cwd, name) {
|
|
9743
9793
|
const require2 = createRequire(path14.join(cwd, "package.json"));
|
|
9744
9794
|
try {
|
|
9745
|
-
const
|
|
9746
|
-
|
|
9747
|
-
|
|
9795
|
+
const entry = require2.resolve(name);
|
|
9796
|
+
let version2;
|
|
9797
|
+
try {
|
|
9798
|
+
const pkgPath = require2.resolve(`${name}/package.json`);
|
|
9799
|
+
const pkg = require2(pkgPath);
|
|
9800
|
+
if (typeof pkg.version === "string") version2 = pkg.version;
|
|
9801
|
+
} catch {
|
|
9802
|
+
version2 = readPackageVersionNearEntry(entry, name);
|
|
9803
|
+
}
|
|
9804
|
+
return { ok: true, version: version2, entry };
|
|
9748
9805
|
} catch {
|
|
9749
9806
|
return { ok: false };
|
|
9750
9807
|
}
|
|
9751
9808
|
}
|
|
9752
9809
|
function importSmoke(cwd) {
|
|
9753
9810
|
const results = [];
|
|
9754
|
-
const
|
|
9755
|
-
|
|
9756
|
-
require2.resolve("agent-inspect");
|
|
9811
|
+
const resolved = resolveInstalledPackage(cwd, "agent-inspect");
|
|
9812
|
+
if (resolved.ok) {
|
|
9757
9813
|
results.push({
|
|
9758
9814
|
id: "import-agent-inspect",
|
|
9759
9815
|
status: "pass",
|
|
9760
|
-
message: "agent-inspect resolves from the current project."
|
|
9816
|
+
message: "agent-inspect resolves from the current project.",
|
|
9817
|
+
evidence: resolved.entry
|
|
9761
9818
|
});
|
|
9762
|
-
|
|
9819
|
+
results.push({
|
|
9820
|
+
id: "import-agent-inspect-cjs",
|
|
9821
|
+
status: "pass",
|
|
9822
|
+
message: "CJS resolution for agent-inspect succeeded.",
|
|
9823
|
+
evidence: resolved.entry
|
|
9824
|
+
});
|
|
9825
|
+
} else {
|
|
9763
9826
|
results.push({
|
|
9764
9827
|
id: "import-agent-inspect",
|
|
9765
9828
|
status: "warn",
|
|
9766
9829
|
message: "agent-inspect is not installed in the current project.",
|
|
9767
9830
|
remediation: "Run npm install agent-inspect (or pnpm add agent-inspect)."
|
|
9768
9831
|
});
|
|
9769
|
-
}
|
|
9770
|
-
try {
|
|
9771
|
-
require2.resolve("agent-inspect/package.json");
|
|
9772
|
-
results.push({
|
|
9773
|
-
id: "import-agent-inspect-cjs",
|
|
9774
|
-
status: "pass",
|
|
9775
|
-
message: "CJS resolution for agent-inspect succeeded."
|
|
9776
|
-
});
|
|
9777
|
-
} catch {
|
|
9778
9832
|
results.push({
|
|
9779
9833
|
id: "import-agent-inspect-cjs",
|
|
9780
9834
|
status: "skipped",
|
|
@@ -9792,7 +9846,7 @@ function optionalPackageChecks(cwd, framework) {
|
|
|
9792
9846
|
"@agent-inspect/eval"
|
|
9793
9847
|
];
|
|
9794
9848
|
return packages.map((name) => {
|
|
9795
|
-
const resolved =
|
|
9849
|
+
const resolved = resolveInstalledPackage(cwd, name);
|
|
9796
9850
|
if (!resolved.ok) {
|
|
9797
9851
|
return {
|
|
9798
9852
|
id: `optional-package-${name}`,
|
|
@@ -9810,7 +9864,7 @@ function optionalPackageChecks(cwd, framework) {
|
|
|
9810
9864
|
});
|
|
9811
9865
|
}
|
|
9812
9866
|
function versionMismatchCheck(cwd) {
|
|
9813
|
-
const root =
|
|
9867
|
+
const root = resolveInstalledPackage(cwd, "agent-inspect");
|
|
9814
9868
|
if (!root.ok || root.version === void 0) {
|
|
9815
9869
|
return {
|
|
9816
9870
|
id: "version-alignment",
|
|
@@ -10369,7 +10423,7 @@ function isModuleNotFound4(e) {
|
|
|
10369
10423
|
}
|
|
10370
10424
|
async function loadIndexSqlite() {
|
|
10371
10425
|
try {
|
|
10372
|
-
return await import('./src-
|
|
10426
|
+
return await import('./src-Z5W27YCW.mjs');
|
|
10373
10427
|
} catch (e) {
|
|
10374
10428
|
if (isModuleNotFound4(e)) {
|
|
10375
10429
|
console.error(
|
|
@@ -11158,11 +11212,17 @@ function createCliProgram() {
|
|
|
11158
11212
|
"openinference",
|
|
11159
11213
|
"otlp-json"
|
|
11160
11214
|
])
|
|
11161
|
-
).option("-o, --output <path>", "write export to file (creates parent dirs)").option("--json", "emit JSON wrapper about the export (includes content when writing to stdout)").option("--validate", "validate exported payload shape after generation").option("--include-attributes", "include bounded attributes (review before sharing)").option("--no-metadata", "omit summary / metadata sections").option("--no-errors", "omit error sections").addOption(
|
|
11215
|
+
).option("-o, --output <path>", "write export to file (creates parent dirs)").option("--out <path>", "alias for --output").option("--json", "emit JSON wrapper about the export (includes content when writing to stdout)").option("--validate", "validate exported payload shape after generation").option("--include-attributes", "include bounded attributes (review before sharing)").option("--no-metadata", "omit summary / metadata sections").option("--no-errors", "omit error sections").addOption(
|
|
11162
11216
|
new Option(
|
|
11163
11217
|
"--redaction-profile <profile>",
|
|
11164
11218
|
"redaction profile for exported copies: local, share, strict (default: local)"
|
|
11165
11219
|
).choices(["local", "share", "strict"])
|
|
11220
|
+
).addOption(
|
|
11221
|
+
new Option("--profile <profile>", "alias for --redaction-profile").choices([
|
|
11222
|
+
"local",
|
|
11223
|
+
"share",
|
|
11224
|
+
"strict"
|
|
11225
|
+
])
|
|
11166
11226
|
).action((runId, opts) => {
|
|
11167
11227
|
runCommand(() => exportCommand(runId, opts));
|
|
11168
11228
|
});
|
|
@@ -11298,7 +11358,12 @@ function createCliProgram() {
|
|
|
11298
11358
|
});
|
|
11299
11359
|
program.command("bundle").description("Create a share-safe offline trace bundle (local folder)").argument("[run-id]", "run id to bundle (optional with --session or --since)").option("--dir <path>", "trace directory for run/session lookup").option("--session <session-id>", "bundle all runs in a session").option("--since <duration>", "bundle runs with activity since a duration (e.g. 24h)").addOption(
|
|
11300
11360
|
new Option("--profile <profile>", "redaction profile for exported copies").choices(["local", "share", "strict"]).default("share")
|
|
11301
|
-
).
|
|
11361
|
+
).addOption(
|
|
11362
|
+
new Option(
|
|
11363
|
+
"--redaction-profile <profile>",
|
|
11364
|
+
"alias for --profile (canonical spelling)"
|
|
11365
|
+
).choices(["local", "share", "strict"])
|
|
11366
|
+
).option("--out <path>", "output directory (folder; .zip suffix is stripped)").option("--output <path>", "alias for --out (canonical spelling)").option("--allow-unsafe", "write bundle even when verify-safe reports UNSAFE").option("--json", "print deterministic JSON manifest").action((runId, opts) => {
|
|
11302
11367
|
runCommand(() => bundleCommand(runId, opts));
|
|
11303
11368
|
});
|
|
11304
11369
|
program.command("ci-summary").description("Summarize local reporter artifact manifests for CI").argument("<manifest...>", "reporter artifact manifest JSON files").option("-o, --output <path>", "write Markdown summary to a local file").option("--github-summary <path>", "append Markdown summary to this local file, e.g. GITHUB_STEP_SUMMARY").option("--json", "print deterministic JSON summary").action((manifest, opts) => {
|
|
@@ -11391,7 +11456,7 @@ function createCliProgram() {
|
|
|
11391
11456
|
"markdown",
|
|
11392
11457
|
"html"
|
|
11393
11458
|
])
|
|
11394
|
-
).option("-o, --output <path>", "write report to file (creates parent dirs)").option("--json", "emit JSON wrapper (includes content when writing to stdout)").option("--include-attributes", "include bounded step attributes in tree section").option("--no-errors", "omit error details from tree section").option("--no-correlation", "omit correlation metadata from what section").addOption(
|
|
11459
|
+
).option("-o, --output <path>", "write report to file (creates parent dirs)").option("--out <path>", "alias for --output").option("--json", "emit JSON wrapper (includes content when writing to stdout)").option("--include-attributes", "include bounded step attributes in tree section").option("--no-errors", "omit error details from tree section").option("--no-correlation", "omit correlation metadata from what section").addOption(
|
|
11395
11460
|
new Option("--section <section>", "report section (default: all)").choices([
|
|
11396
11461
|
"all",
|
|
11397
11462
|
"observations",
|
|
@@ -11404,6 +11469,12 @@ function createCliProgram() {
|
|
|
11404
11469
|
"--redaction-profile <profile>",
|
|
11405
11470
|
"redaction profile for entire report: local, share, strict (default: local)"
|
|
11406
11471
|
).choices(["local", "share", "strict"])
|
|
11472
|
+
).addOption(
|
|
11473
|
+
new Option("--profile <profile>", "alias for --redaction-profile").choices([
|
|
11474
|
+
"local",
|
|
11475
|
+
"share",
|
|
11476
|
+
"strict"
|
|
11477
|
+
])
|
|
11407
11478
|
).action((runId, opts) => {
|
|
11408
11479
|
runCommand(() => reportCommand(runId, opts));
|
|
11409
11480
|
});
|
|
@@ -11412,7 +11483,12 @@ function createCliProgram() {
|
|
|
11412
11483
|
"--profile <profile>",
|
|
11413
11484
|
"redaction profile: local, share, strict (default: share)"
|
|
11414
11485
|
).choices(["local", "share", "strict"])
|
|
11415
|
-
).
|
|
11486
|
+
).addOption(
|
|
11487
|
+
new Option(
|
|
11488
|
+
"--redaction-profile <profile>",
|
|
11489
|
+
"alias for --profile (canonical spelling)"
|
|
11490
|
+
).choices(["local", "share", "strict"])
|
|
11491
|
+
).option("-o, --output <path>", "write redacted content to a file").option("--out <path>", "alias for --output").option("--json", "print deterministic JSON wrapper with findings").action((target, opts) => {
|
|
11416
11492
|
runCommand(() => redactCommand(target, opts));
|
|
11417
11493
|
});
|
|
11418
11494
|
program.command("explain").description("Explain a local trace with deterministic facts (no provider calls)").argument("<trace-path-or-run-id>", "trace file, directory, stdin -, or run id").option("--dir <path>", "trace directory for run-id lookup").addOption(
|
|
@@ -11429,6 +11505,12 @@ function createCliProgram() {
|
|
|
11429
11505
|
"--redaction-profile <profile>",
|
|
11430
11506
|
"redaction profile for explanation payload: local, share, strict (default: local)"
|
|
11431
11507
|
).choices(["local", "share", "strict"])
|
|
11508
|
+
).addOption(
|
|
11509
|
+
new Option("--profile <profile>", "alias for --redaction-profile").choices([
|
|
11510
|
+
"local",
|
|
11511
|
+
"share",
|
|
11512
|
+
"strict"
|
|
11513
|
+
])
|
|
11432
11514
|
).action((target, opts) => {
|
|
11433
11515
|
runCommand(() => explainCommand(target, opts));
|
|
11434
11516
|
});
|