agent-inspect 6.17.7 → 6.17.8
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 +8 -0
- package/README.md +1 -1
- package/SECURITY.md +5 -0
- package/docs/STANDARDS.md +1 -0
- package/package.json +1 -1
- package/packages/cli/dist/index.cjs +14 -10
- package/packages/cli/dist/index.cjs.map +1 -1
- package/packages/cli/dist/index.mjs +14 -10
- package/packages/cli/dist/index.mjs.map +1 -1
|
@@ -13,7 +13,7 @@ import { createServer } from 'http';
|
|
|
13
13
|
import { createRequire } from 'module';
|
|
14
14
|
|
|
15
15
|
// package.json
|
|
16
|
-
var version = "6.17.
|
|
16
|
+
var version = "6.17.8";
|
|
17
17
|
|
|
18
18
|
// packages/cli/src/trace-dir-scale.ts
|
|
19
19
|
var TRACE_COUNT_WARN = 1e3;
|
|
@@ -162,13 +162,14 @@ async function list(options = {}) {
|
|
|
162
162
|
process.exitCode = 1;
|
|
163
163
|
}
|
|
164
164
|
}
|
|
165
|
+
var DECIMAL_INTEGER_PATTERN = /^\d+$/;
|
|
165
166
|
function parseKeep(raw) {
|
|
166
167
|
const trimmed = typeof raw === "string" ? raw.trim() : "";
|
|
167
|
-
if (trimmed
|
|
168
|
+
if (!DECIMAL_INTEGER_PATTERN.test(trimmed)) {
|
|
168
169
|
throw new Error(`Invalid --keep value: ${raw}. Provide a positive integer.`);
|
|
169
170
|
}
|
|
170
|
-
const n = Number
|
|
171
|
-
if (!Number.
|
|
171
|
+
const n = Number(trimmed);
|
|
172
|
+
if (!Number.isSafeInteger(n) || n <= 0) {
|
|
172
173
|
throw new Error(`Invalid --keep value: ${raw}. Provide a positive integer.`);
|
|
173
174
|
}
|
|
174
175
|
return n;
|
|
@@ -10953,6 +10954,9 @@ async function initCommand(options = {}) {
|
|
|
10953
10954
|
process.exitCode = 1;
|
|
10954
10955
|
}
|
|
10955
10956
|
}
|
|
10957
|
+
var DOCS_BASE = "https://github.com/rajudandigam/agent-inspect/blob/main/docs";
|
|
10958
|
+
var AGENT_INSPECT_NOT_RESOLVABLE_MESSAGE = "agent-inspect does not resolve from this project. A global CLI install is not enough \u2014 the package must be a dependency here.";
|
|
10959
|
+
var AGENT_INSPECT_NOT_RESOLVABLE_REMEDIATION = `Install it in this project: npm install agent-inspect (or pnpm add agent-inspect). See ${DOCS_BASE}/FIRST-TRACE-IN-5-MINUTES.md`;
|
|
10956
10960
|
var OPTIONAL_PACKAGES = {
|
|
10957
10961
|
custom: [],
|
|
10958
10962
|
"ai-sdk": ["@agent-inspect/ai-sdk"],
|
|
@@ -10967,7 +10971,7 @@ function nodeVersionCheck() {
|
|
|
10967
10971
|
id: "node-version",
|
|
10968
10972
|
status: "fail",
|
|
10969
10973
|
message: `Node ${process2.versions.node} is below the supported minimum (20).`,
|
|
10970
|
-
remediation:
|
|
10974
|
+
remediation: `Upgrade to Node 20 LTS or newer, then reinstall. See ${DOCS_BASE}/GETTING-STARTED.md`,
|
|
10971
10975
|
evidence: process2.versions.node
|
|
10972
10976
|
};
|
|
10973
10977
|
}
|
|
@@ -11011,7 +11015,7 @@ async function traceDirWritable(traceDir) {
|
|
|
11011
11015
|
id: "trace-dir-writable",
|
|
11012
11016
|
status: "fail",
|
|
11013
11017
|
message: `Trace directory is not writable: ${resolved}`,
|
|
11014
|
-
remediation:
|
|
11018
|
+
remediation: `Create the directory or set AGENT_INSPECT_TRACE_DIR to a writable path. See ${DOCS_BASE}/GETTING-STARTED.md`,
|
|
11015
11019
|
evidence: error instanceof Error ? error.message : String(error)
|
|
11016
11020
|
};
|
|
11017
11021
|
}
|
|
@@ -11074,8 +11078,8 @@ function importSmoke(cwd) {
|
|
|
11074
11078
|
results.push({
|
|
11075
11079
|
id: "import-agent-inspect",
|
|
11076
11080
|
status: "warn",
|
|
11077
|
-
message:
|
|
11078
|
-
remediation:
|
|
11081
|
+
message: AGENT_INSPECT_NOT_RESOLVABLE_MESSAGE,
|
|
11082
|
+
remediation: AGENT_INSPECT_NOT_RESOLVABLE_REMEDIATION
|
|
11079
11083
|
});
|
|
11080
11084
|
results.push({
|
|
11081
11085
|
id: "import-agent-inspect-cjs",
|
|
@@ -11124,8 +11128,8 @@ function versionMismatchCheck(cwd) {
|
|
|
11124
11128
|
return {
|
|
11125
11129
|
id: "version-alignment",
|
|
11126
11130
|
status: "warn",
|
|
11127
|
-
message: `CLI version ${version} differs from local agent-inspect@${root.version}.`,
|
|
11128
|
-
remediation:
|
|
11131
|
+
message: `CLI version ${version} differs from local agent-inspect@${root.version}. A packed consumer can hit this when npx uses a cached global CLI.`,
|
|
11132
|
+
remediation: `Align versions with npm install agent-inspect@${version}, or run via the local binary. See ${DOCS_BASE}/KNOWN-ISSUES.md`,
|
|
11129
11133
|
evidence: `cli=${version};local=${root.version}`
|
|
11130
11134
|
};
|
|
11131
11135
|
}
|