agent-inspect 5.3.0 → 6.0.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/CHANGELOG.md +12 -0
- package/docs/CLI.md +5 -1
- package/package.json +2 -2
- package/packages/cli/dist/{chunk-4LKKB4Z5.mjs → chunk-YS2I722C.mjs} +112 -3
- package/packages/cli/dist/chunk-YS2I722C.mjs.map +1 -0
- package/packages/cli/dist/index.cjs +198 -11
- package/packages/cli/dist/index.cjs.map +1 -1
- package/packages/cli/dist/index.mjs +85 -14
- package/packages/cli/dist/index.mjs.map +1 -1
- package/packages/cli/dist/{src-4SGS3Q2D.mjs → src-FVNE44UA.mjs} +3 -3
- package/packages/cli/dist/{src-4SGS3Q2D.mjs.map → src-FVNE44UA.mjs.map} +1 -1
- package/packages/core/dist/advanced.cjs +116 -0
- package/packages/core/dist/advanced.cjs.map +1 -1
- package/packages/core/dist/advanced.d.cts +7 -1
- package/packages/core/dist/advanced.d.ts +7 -1
- package/packages/core/dist/advanced.mjs +113 -1
- package/packages/core/dist/advanced.mjs.map +1 -1
- package/packages/cli/dist/chunk-4LKKB4Z5.mjs.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 6.0.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- Add self-hosted Studio (`@agent-inspect/studio`): optional read-only multi-project analyzer with `agent-inspect studio`, SQLite metadata cache, registry import, search/diff/reports views, optional basic auth, and self-hosting docs. Localhost by default; no maintainer cloud; no default upload.
|
|
8
|
+
|
|
9
|
+
## 5.4.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- 31d5324: Add PM/QA suite templates and `suite init --template` for eight common agent scenarios.
|
|
14
|
+
|
|
3
15
|
## 5.3.0
|
|
4
16
|
|
|
5
17
|
### Minor Changes
|
package/docs/CLI.md
CHANGED
|
@@ -901,7 +901,7 @@ Recipe: [shareable-bundle-basic](../examples/recipes/shareable-bundle-basic/READ
|
|
|
901
901
|
Define and run **local trace suites** for CI trajectory checks (v5.0+). Suites read existing traces only — no agent replay, no model calls, no upload.
|
|
902
902
|
|
|
903
903
|
```bash
|
|
904
|
-
agent-inspect suite init
|
|
904
|
+
agent-inspect suite init [--template <name>]
|
|
905
905
|
agent-inspect suite validate [--config path]
|
|
906
906
|
agent-inspect suite list [--config path]
|
|
907
907
|
agent-inspect suite run [--config path] [--json] [--markdown] [-o dir]
|
|
@@ -914,6 +914,10 @@ Options (shared):
|
|
|
914
914
|
|
|
915
915
|
- `--config <path>` — suite config (`.json`, `.js`, `.mjs`, `.cjs`)
|
|
916
916
|
|
|
917
|
+
`init` also supports:
|
|
918
|
+
|
|
919
|
+
- `--template <name>` — PM/QA template (v5.4+): `customer-support-agent`, `refund-agent`, `sales-assistant`, `browser-task-agent`, `mcp-tool-agent`, `workflow-agent`, `rag-answer-agent`, `human-approval-agent`
|
|
920
|
+
|
|
917
921
|
`run` also supports:
|
|
918
922
|
|
|
919
923
|
- `-o, --output <dir>` — write JSON run artifact (default: `.agent-inspect/suite-runs`)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agent-inspect",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "6.0.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "Trace, check, and safely share TypeScript AI-agent runs locally — no account, no upload, metadata-only by default",
|
|
@@ -206,7 +206,7 @@
|
|
|
206
206
|
},
|
|
207
207
|
"scripts": {
|
|
208
208
|
"clean": "pnpm -r exec -- rm -rf dist",
|
|
209
|
-
"build": "pnpm exec tsup --config tsup.core.config.ts && pnpm exec tsup --config tsup.cli.config.ts && pnpm exec tsup --config tsup.langchain.config.ts && pnpm exec tsup --config tsup.tui.config.ts && pnpm exec tsup --config tsup.ai-sdk.config.ts && pnpm exec tsup --config tsup.vitest.config.ts && pnpm exec tsup --config tsup.jest.config.ts && pnpm exec tsup --config tsup.openai-agents.config.ts && pnpm exec tsup --config tsup.harness.config.ts && pnpm exec tsup --config tsup.redact.config.ts && pnpm exec tsup --config tsup.eval.config.ts && pnpm exec tsup --config tsup.mcp.config.ts && pnpm exec tsup --config tsup.guardrails.config.ts && pnpm exec tsup --config tsup.circuit.config.ts && pnpm exec tsup --config tsup.viewer.config.ts && pnpm exec tsup --config tsup.mcp-server.config.ts && pnpm exec tsup --config tsup.adapter-sdk.config.ts && pnpm exec tsup --config tsup.vscode.config.ts && pnpm exec tsup --config tsup.index-sqlite.config.ts",
|
|
209
|
+
"build": "pnpm exec tsup --config tsup.core.config.ts && pnpm exec tsup --config tsup.cli.config.ts && pnpm exec tsup --config tsup.langchain.config.ts && pnpm exec tsup --config tsup.tui.config.ts && pnpm exec tsup --config tsup.ai-sdk.config.ts && pnpm exec tsup --config tsup.vitest.config.ts && pnpm exec tsup --config tsup.jest.config.ts && pnpm exec tsup --config tsup.openai-agents.config.ts && pnpm exec tsup --config tsup.harness.config.ts && pnpm exec tsup --config tsup.redact.config.ts && pnpm exec tsup --config tsup.eval.config.ts && pnpm exec tsup --config tsup.mcp.config.ts && pnpm exec tsup --config tsup.guardrails.config.ts && pnpm exec tsup --config tsup.circuit.config.ts && pnpm exec tsup --config tsup.viewer.config.ts && pnpm exec tsup --config tsup.mcp-server.config.ts && pnpm exec tsup --config tsup.adapter-sdk.config.ts && pnpm exec tsup --config tsup.vscode.config.ts && pnpm exec tsup --config tsup.index-sqlite.config.ts && pnpm exec tsup --config tsup.studio.config.ts",
|
|
210
210
|
"typecheck": "tsc --noEmit",
|
|
211
211
|
"test": "vitest run",
|
|
212
212
|
"test:watch": "vitest",
|
|
@@ -7876,6 +7876,115 @@ function renderSuiteReport(result, options = {}) {
|
|
|
7876
7876
|
return renderSuiteReportMarkdown(result);
|
|
7877
7877
|
}
|
|
7878
7878
|
|
|
7879
|
+
// packages/core/src/suite/templates.ts
|
|
7880
|
+
var SUITE_TEMPLATE_IDS = [
|
|
7881
|
+
"customer-support-agent",
|
|
7882
|
+
"refund-agent",
|
|
7883
|
+
"sales-assistant",
|
|
7884
|
+
"browser-task-agent",
|
|
7885
|
+
"mcp-tool-agent",
|
|
7886
|
+
"workflow-agent",
|
|
7887
|
+
"rag-answer-agent",
|
|
7888
|
+
"human-approval-agent"
|
|
7889
|
+
];
|
|
7890
|
+
function baseTemplate(name, cases) {
|
|
7891
|
+
return {
|
|
7892
|
+
name,
|
|
7893
|
+
traces: "./.agent-inspect",
|
|
7894
|
+
cases,
|
|
7895
|
+
checks: {
|
|
7896
|
+
select: ["run.status", "outcome.status"],
|
|
7897
|
+
run: { maxDurationMs: 6e4 }
|
|
7898
|
+
},
|
|
7899
|
+
redactionProfile: "local",
|
|
7900
|
+
artifacts: { outputDir: ".agent-inspect/suite-runs" }
|
|
7901
|
+
};
|
|
7902
|
+
}
|
|
7903
|
+
var TEMPLATES = {
|
|
7904
|
+
"customer-support-agent": baseTemplate("customer-support-agent", [
|
|
7905
|
+
{
|
|
7906
|
+
id: "support-ticket",
|
|
7907
|
+
runId: "support-ticket",
|
|
7908
|
+
requireTools: ["searchDocs"],
|
|
7909
|
+
forbidTools: ["deleteAccount"],
|
|
7910
|
+
expectedObservations: ["answerReady"],
|
|
7911
|
+
maxDurationMs: 45e3
|
|
7912
|
+
}
|
|
7913
|
+
]),
|
|
7914
|
+
"refund-agent": baseTemplate("refund-agent", [
|
|
7915
|
+
{
|
|
7916
|
+
id: "refund-flow",
|
|
7917
|
+
runId: "refund-flow",
|
|
7918
|
+
requireTools: ["searchDocs"],
|
|
7919
|
+
forbidTools: ["deleteAccount"],
|
|
7920
|
+
expectedObservations: ["policyShown"],
|
|
7921
|
+
maxDurationMs: 3e4
|
|
7922
|
+
}
|
|
7923
|
+
]),
|
|
7924
|
+
"sales-assistant": baseTemplate("sales-assistant", [
|
|
7925
|
+
{
|
|
7926
|
+
id: "quote-request",
|
|
7927
|
+
runId: "quote-request",
|
|
7928
|
+
requireTools: ["lookupPricing"],
|
|
7929
|
+
maxDurationMs: 3e4
|
|
7930
|
+
}
|
|
7931
|
+
]),
|
|
7932
|
+
"browser-task-agent": baseTemplate("browser-task-agent", [
|
|
7933
|
+
{
|
|
7934
|
+
id: "browser-nav",
|
|
7935
|
+
runId: "browser-nav",
|
|
7936
|
+
requireTools: ["browserNavigate"],
|
|
7937
|
+
maxDurationMs: 12e4
|
|
7938
|
+
}
|
|
7939
|
+
]),
|
|
7940
|
+
"mcp-tool-agent": baseTemplate("mcp-tool-agent", [
|
|
7941
|
+
{
|
|
7942
|
+
id: "mcp-call",
|
|
7943
|
+
runId: "mcp-call",
|
|
7944
|
+
requireTools: ["mcp:tools/list"],
|
|
7945
|
+
maxDurationMs: 3e4
|
|
7946
|
+
}
|
|
7947
|
+
]),
|
|
7948
|
+
"workflow-agent": baseTemplate("workflow-agent", [
|
|
7949
|
+
{
|
|
7950
|
+
id: "workflow-handoff",
|
|
7951
|
+
runId: "workflow-handoff",
|
|
7952
|
+
requireTools: ["handoff"],
|
|
7953
|
+
maxDurationMs: 6e4
|
|
7954
|
+
}
|
|
7955
|
+
]),
|
|
7956
|
+
"rag-answer-agent": baseTemplate("rag-answer-agent", [
|
|
7957
|
+
{
|
|
7958
|
+
id: "rag-answer",
|
|
7959
|
+
runId: "rag-answer",
|
|
7960
|
+
requireTools: ["retrieve", "answer"],
|
|
7961
|
+
expectedObservations: ["citationShown"],
|
|
7962
|
+
maxDurationMs: 45e3
|
|
7963
|
+
}
|
|
7964
|
+
]),
|
|
7965
|
+
"human-approval-agent": baseTemplate("human-approval-agent", [
|
|
7966
|
+
{
|
|
7967
|
+
id: "approval-gate",
|
|
7968
|
+
runId: "approval-gate",
|
|
7969
|
+
expectedObservations: ["approvalRequested", "approvalGranted"],
|
|
7970
|
+
maxDurationMs: 6e4
|
|
7971
|
+
}
|
|
7972
|
+
])
|
|
7973
|
+
};
|
|
7974
|
+
function getSuiteTemplate(id) {
|
|
7975
|
+
if (!SUITE_TEMPLATE_IDS.includes(id)) return void 0;
|
|
7976
|
+
return structuredClone(TEMPLATES[id]);
|
|
7977
|
+
}
|
|
7978
|
+
function resolveSuiteTemplate(id) {
|
|
7979
|
+
const template = getSuiteTemplate(id);
|
|
7980
|
+
if (template === void 0) {
|
|
7981
|
+
throw new Error(
|
|
7982
|
+
`Unknown suite template "${id}". Available: ${SUITE_TEMPLATE_IDS.join(", ")}`
|
|
7983
|
+
);
|
|
7984
|
+
}
|
|
7985
|
+
return template;
|
|
7986
|
+
}
|
|
7987
|
+
|
|
7879
7988
|
// packages/core/src/cohort/types.ts
|
|
7880
7989
|
var COHORT_METRIC_IDS = [
|
|
7881
7990
|
"errorRate",
|
|
@@ -8888,6 +8997,6 @@ function renderGateReport(result, options = {}) {
|
|
|
8888
8997
|
return renderGateSummaryMarkdown(result);
|
|
8889
8998
|
}
|
|
8890
8999
|
|
|
8891
|
-
export { COHORT_METRIC_IDS, DEFAULT_SUITE_ARTIFACTS_DIR, Redactor, TraceDirectory, TraceReadError, TreeBuilder, __commonJS, __require, __toESM, aggregateBundleSafeStatus, aggregateSessionCheckResults, analyzeCohort, applyProfileMetadataCaps, buildActivitySummary, buildBundleMetadata, buildBundleSummaryMarkdown, buildLocalExplanation, buildPlaceholderArtifact, buildRunSummary, buildRunTimeline, buildRunWhatSummary, buildSessionIndex, buildTraceStats, bundleFailsOnSafety, compactAttributes3 as compactAttributes, createBaselineRegressionRule, createLlmUsageRule, createMaxStepDurationRule, createObservedOutcomeRule, createRequireCompletedRule, createRunDepthRule, createRunDurationRule, createRunStatusRule, createSafetyOversizedAttributeRule, createSafetyRawContentRule, createSafetyRedactionRule, createSafetySecretPatternRule, createStallDetectionRule, createStructureCycleRule, createStructureOrphanRule, createStructureParallelWidthRule, createStructureRelationshipRule, createToolUsageRule, defaultBundleOutputPath, defaultSuiteConfigTemplate, enrichSessionRunRecord, escapeHtml, escapeMarkdown, extractMetadata, extractOutcomesFromTraceEvents, filterMetasBySessionScope, filterTraces, flattenTree, formatDuration2 as formatDuration, formatTimestamp, gateHasThresholds, getIndent, getTraceFilePath, isAgentInspectTrace, isPersistedInspectEvent, loadSessionRunRecords, loadSuiteConfig, loadTraceMetadataList, nanoid, normalizeBundleOutputPath, openTrace, parseCohortMetricList, parseDuration, parseDurationFilter, parseGateList, parseTraceJsonl, persistedInspectEventsToTraceEvents, renderActivitySummaryHuman, renderCohortReport, renderErrorLine, renderGateReport, renderObservedOutcomesHtml, renderObservedOutcomesMarkdown, renderRunWhat, renderStepLine, renderSuiteReport, renderTimeline, renderTraceStats, resolveBundleRunIds, resolveRedactionProfile, resolveTraceDir, runGate, runSuite, runTraceChecks, safeString, searchTraces, source_default, stableJson, summarizeObservedOutcomes, traceEventToPersistedInspectEvent, truncateName, truncateStringForProfile, validateEvent, validateSuiteConfig, zeroKinds };
|
|
8892
|
-
//# sourceMappingURL=chunk-
|
|
8893
|
-
//# sourceMappingURL=chunk-
|
|
9000
|
+
export { COHORT_METRIC_IDS, DEFAULT_SUITE_ARTIFACTS_DIR, Redactor, TraceDirectory, TraceReadError, TreeBuilder, __commonJS, __require, __toESM, aggregateBundleSafeStatus, aggregateSessionCheckResults, analyzeCohort, applyProfileMetadataCaps, buildActivitySummary, buildBundleMetadata, buildBundleSummaryMarkdown, buildLocalExplanation, buildPlaceholderArtifact, buildRunSummary, buildRunTimeline, buildRunWhatSummary, buildSessionIndex, buildTraceStats, bundleFailsOnSafety, compactAttributes3 as compactAttributes, createBaselineRegressionRule, createLlmUsageRule, createMaxStepDurationRule, createObservedOutcomeRule, createRequireCompletedRule, createRunDepthRule, createRunDurationRule, createRunStatusRule, createSafetyOversizedAttributeRule, createSafetyRawContentRule, createSafetyRedactionRule, createSafetySecretPatternRule, createStallDetectionRule, createStructureCycleRule, createStructureOrphanRule, createStructureParallelWidthRule, createStructureRelationshipRule, createToolUsageRule, defaultBundleOutputPath, defaultSuiteConfigTemplate, enrichSessionRunRecord, escapeHtml, escapeMarkdown, extractMetadata, extractOutcomesFromTraceEvents, filterMetasBySessionScope, filterTraces, flattenTree, formatDuration2 as formatDuration, formatTimestamp, gateHasThresholds, getIndent, getTraceFilePath, isAgentInspectTrace, isPersistedInspectEvent, loadSessionRunRecords, loadSuiteConfig, loadTraceMetadataList, nanoid, normalizeBundleOutputPath, openTrace, parseCohortMetricList, parseDuration, parseDurationFilter, parseGateList, parseTraceJsonl, persistedInspectEventsToTraceEvents, renderActivitySummaryHuman, renderCohortReport, renderErrorLine, renderGateReport, renderObservedOutcomesHtml, renderObservedOutcomesMarkdown, renderRunWhat, renderStepLine, renderSuiteReport, renderTimeline, renderTraceStats, resolveBundleRunIds, resolveRedactionProfile, resolveSuiteTemplate, resolveTraceDir, runGate, runSuite, runTraceChecks, safeString, searchTraces, source_default, stableJson, summarizeObservedOutcomes, traceEventToPersistedInspectEvent, truncateName, truncateStringForProfile, validateEvent, validateSuiteConfig, zeroKinds };
|
|
9001
|
+
//# sourceMappingURL=chunk-YS2I722C.mjs.map
|
|
9002
|
+
//# sourceMappingURL=chunk-YS2I722C.mjs.map
|