@tonyclaw/agent-inspector 3.1.20 → 3.1.21
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/.output/backend/nitro.json +1 -1
- package/.output/cli.js +137 -20
- package/.output/server/_ssr/index.mjs +2 -2
- package/.output/server/_ssr/{router-DpXchCXm.mjs → router-Be6BLuut.mjs} +2371 -1171
- package/.output/server/_tanstack-start-manifest_v-ClTaMkEj.mjs +4 -0
- package/.output/server/index.mjs +1 -1
- package/.output/ui/assets/{CompareDrawer-4i1QHaQf.js → CompareDrawer-CGk2HFI1.js} +1 -1
- package/.output/ui/assets/{InspectorPet-Cw6VJLr7.js → InspectorPet-CDM7SdOT.js} +1 -1
- package/.output/ui/assets/ProxyViewerContainer-CaWD78tw.js +60 -0
- package/.output/ui/assets/{ReplayDialog-DTs575iW.js → ReplayDialog-DqaeV1He.js} +1 -1
- package/.output/ui/assets/{RequestAnatomy-Cl6Es3gv.js → RequestAnatomy-BtHl9P0k.js} +1 -1
- package/.output/ui/assets/{ResponseView-DNCCLkzG.js → ResponseView-C6t1vpxs.js} +1 -1
- package/.output/ui/assets/{StreamingChunkSequence-DKaxRL9U.js → StreamingChunkSequence-R4mgd3GQ.js} +1 -1
- package/.output/ui/assets/{_sessionId-C-YjWz50.js → _sessionId-CL3hdLlQ.js} +1 -1
- package/.output/ui/assets/{_sessionId-rkR3WgRq.js → _sessionId-HS666S72.js} +1 -1
- package/.output/ui/assets/index-B-Qod-aA.css +1 -0
- package/.output/ui/assets/{index-DxiecWHw.js → index-Bd9jPL4n.js} +1 -1
- package/.output/ui/assets/{index-DYbzZTDM.js → index-C4NHrclw.js} +1 -1
- package/.output/ui/assets/{index-D0d-V67x.js → index-UF1PJEcq.js} +1 -1
- package/.output/ui/assets/{index-B48RD1-5.js → index-tX38BNV2.js} +2 -2
- package/.output/ui/assets/{json-viewer-CjAwZhHA.js → json-viewer-KSgzN_Ov.js} +1 -1
- package/.output/ui/assets/{jszip.min-DEGEN1HP.js → jszip.min-BiMDxghN.js} +1 -1
- package/.output/ui/index.html +2 -2
- package/.output/workers/logFinalizer.worker.js +258 -0
- package/.output/workers/sessionWorkerEntry.js +258 -0
- package/package.json +13 -6
- package/src/backend/routes/api/logs.$id.replay.ts +6 -1
- package/src/backend/routes/api/logs.stream.ts +7 -0
- package/src/backend/routes/api/providers.$providerId.model-metadata.ts +15 -4
- package/src/backend/routes/api/storage.ts +56 -0
- package/src/backend/routes/metrics.ts +14 -0
- package/src/cli/doctor.ts +135 -2
- package/src/cli.ts +7 -4
- package/src/components/ProxyViewerContainer.tsx +41 -24
- package/src/components/providers/SettingsDialog.tsx +261 -70
- package/src/components/proxy-viewer/LogEntry.tsx +19 -5
- package/src/components/proxy-viewer/bodyHydration.ts +67 -0
- package/src/components/proxy-viewer/proxyViewerContainerLogic.ts +78 -0
- package/src/knowledge/openclawClient.ts +11 -2
- package/src/knowledge/openclawGatewayClient.ts +6 -1
- package/src/lib/resourceLimits.ts +191 -0
- package/src/lib/safeFetch.ts +428 -20
- package/src/proxy/ecosystemTasks.ts +20 -0
- package/src/proxy/handler.ts +17 -4
- package/src/proxy/identityProxy.ts +36 -16
- package/src/proxy/logIndex.ts +38 -6
- package/src/proxy/logger.ts +4 -0
- package/src/proxy/rawStreamCapture.ts +16 -1
- package/src/proxy/runtimeHealth.ts +4 -2
- package/src/proxy/runtimeMetrics.ts +149 -0
- package/src/proxy/sessionRuntime.ts +38 -0
- package/src/proxy/sqliteLogIndex.ts +51 -0
- package/src/proxy/storageLifecycle.ts +432 -0
- package/src/proxy/store.ts +62 -12
- package/.output/server/_tanstack-start-manifest_v-DnbdNeun.mjs +0 -4
- package/.output/ui/assets/ProxyViewerContainer-BST0B7lY.js +0 -60
- package/.output/ui/assets/index-IBEDJoV_.css +0 -1
package/.output/cli.js
CHANGED
|
@@ -20,7 +20,7 @@ var init_package = __esm({
|
|
|
20
20
|
"package.json"() {
|
|
21
21
|
package_default = {
|
|
22
22
|
name: "@tonyclaw/agent-inspector",
|
|
23
|
-
version: "3.1.
|
|
23
|
+
version: "3.1.21",
|
|
24
24
|
type: "module",
|
|
25
25
|
description: "Agent observability and knowledge capture layer for AI coding tools.",
|
|
26
26
|
license: "MIT",
|
|
@@ -84,6 +84,7 @@ var init_package = __esm({
|
|
|
84
84
|
"test:integration": "node scripts/run-local-bun.mjs scripts/run-test-suite.mjs integration",
|
|
85
85
|
"test:changed": "node scripts/run-local-bun.mjs scripts/run-test-suite.mjs changed",
|
|
86
86
|
"test:all": "node scripts/run-local-bun.mjs scripts/run-test-suite.mjs all",
|
|
87
|
+
"test:hostile-inputs": "bun test src/proxy/identityProxy.test.ts src/proxy/handler.cancellationCompatibility.test.ts src/proxy/logImporter.test.ts src/backend/routes/api/-logs.stream.test.ts src/proxy/handler.admission.test.ts src/proxy/runtimeHealth.test.ts src/proxy/storageLifecycle.test.ts",
|
|
87
88
|
"test:compatibility-tooling": "node scripts/run-compatibility-tests.mjs ultra",
|
|
88
89
|
"test:compatibility-tooling:extended": "node scripts/run-compatibility-tests.mjs extended",
|
|
89
90
|
"test:compatibility-conformance": "node scripts/run-compatibility-tests.mjs conformance",
|
|
@@ -102,6 +103,9 @@ var init_package = __esm({
|
|
|
102
103
|
"smoke:ui-preview": "node scripts/smoke-decoupled-ui-preview.mjs",
|
|
103
104
|
"check:bundle": "node scripts/check-client-bundle.mjs",
|
|
104
105
|
"check:boundaries": "node scripts/check-runtime-boundaries.mjs",
|
|
106
|
+
"check:commercial-performance": "node scripts/check-commercial-performance-budgets.mjs",
|
|
107
|
+
"check:hostile-inputs": "node scripts/check-hostile-input-coverage.mjs",
|
|
108
|
+
"check:supply-chain": "node scripts/check-commercial-supply-chain.mjs",
|
|
105
109
|
"compatibility:bdd": "node scripts/lint-bdd-catalog.mjs",
|
|
106
110
|
"compatibility:compare": "node scripts/compatibility/cli.mjs compare",
|
|
107
111
|
"compatibility:drift": "node scripts/check-backend-compatibility.mjs",
|
|
@@ -118,7 +122,10 @@ var init_package = __esm({
|
|
|
118
122
|
"rust:pack-package": "node scripts/rust/pack-platform.mjs",
|
|
119
123
|
"rust:native-artifact": "node scripts/rust/create-native-artifact.mjs",
|
|
120
124
|
"rust:native:aggregate": "node scripts/rust/aggregate-native-artifacts.mjs",
|
|
121
|
-
"
|
|
125
|
+
"rust:release-gate:preflight": "node scripts/rust/release-gate-preflight.mjs",
|
|
126
|
+
"commercial:release-gate:preflight": "node scripts/commercial-release-preflight.mjs",
|
|
127
|
+
"test:commercial-release-gate": "bun test scripts/commercialReleasePreflight.test.ts",
|
|
128
|
+
"test:rust-packaging": "bun test scripts/rust/npmPackaging.test.ts scripts/rust/nativeReleaseContract.test.ts scripts/rust/nativeStartupSmoke.test.ts scripts/rust/releaseGatePreflight.test.ts scripts/releaseCore.test.ts",
|
|
122
129
|
"rust:packages:check": "node scripts/rust/sync-package-versions.mjs",
|
|
123
130
|
"rust:packages:sync": "node scripts/rust/sync-package-versions.mjs --write",
|
|
124
131
|
"themes:generate": "node scripts/generate-theme-scales.mjs",
|
|
@@ -136,7 +143,7 @@ var init_package = __esm({
|
|
|
136
143
|
"extension:release": "node scripts/release-chrome-extension.mjs",
|
|
137
144
|
release: "node scripts/release.mjs",
|
|
138
145
|
knip: "knip",
|
|
139
|
-
check: "bun scripts/run-static-checks.mjs --format && bun check:boundaries && bun compatibility:bdd && bun rust:packages:check",
|
|
146
|
+
check: "bun scripts/run-static-checks.mjs --format && bun check:boundaries && bun check:commercial-performance && bun check:hostile-inputs && bun compatibility:bdd && bun rust:packages:check",
|
|
140
147
|
prepare: "husky",
|
|
141
148
|
ladle: "ladle serve",
|
|
142
149
|
"ladle:build": "ladle build"
|
|
@@ -166,9 +173,9 @@ var init_package = __esm({
|
|
|
166
173
|
zod: "^4.4.3"
|
|
167
174
|
},
|
|
168
175
|
optionalDependencies: {
|
|
169
|
-
"@tonyclaw/agent-inspector-backend-darwin-arm64": "3.1.
|
|
170
|
-
"@tonyclaw/agent-inspector-backend-linux-x64-gnu": "3.1.
|
|
171
|
-
"@tonyclaw/agent-inspector-backend-win32-x64-msvc": "3.1.
|
|
176
|
+
"@tonyclaw/agent-inspector-backend-darwin-arm64": "3.1.21",
|
|
177
|
+
"@tonyclaw/agent-inspector-backend-linux-x64-gnu": "3.1.21",
|
|
178
|
+
"@tonyclaw/agent-inspector-backend-win32-x64-msvc": "3.1.21",
|
|
172
179
|
"better-sqlite3": "^12.11.1",
|
|
173
180
|
rcedit: "4.0.1"
|
|
174
181
|
},
|
|
@@ -20961,10 +20968,12 @@ var init_onboard = __esm({
|
|
|
20961
20968
|
var doctor_exports = {};
|
|
20962
20969
|
__export(doctor_exports, {
|
|
20963
20970
|
buildDoctorReport: () => buildDoctorReport,
|
|
20971
|
+
buildDoctorSupportBundle: () => buildDoctorSupportBundle,
|
|
20964
20972
|
createDoctorDeps: () => createDoctorDeps,
|
|
20965
20973
|
doctorHelp: () => doctorHelp,
|
|
20966
20974
|
formatDoctorJson: () => formatDoctorJson,
|
|
20967
20975
|
formatDoctorReport: () => formatDoctorReport,
|
|
20976
|
+
formatDoctorSupportBundle: () => formatDoctorSupportBundle,
|
|
20968
20977
|
parseDoctorArgs: () => parseDoctorArgs,
|
|
20969
20978
|
runDoctor: () => runDoctor
|
|
20970
20979
|
});
|
|
@@ -20994,6 +21003,7 @@ function parseDoctorArgs(argv, env = process.env) {
|
|
|
20994
21003
|
chromeExtension: false,
|
|
20995
21004
|
fix: false,
|
|
20996
21005
|
json: false,
|
|
21006
|
+
supportBundle: false,
|
|
20997
21007
|
verbose: false,
|
|
20998
21008
|
help: false
|
|
20999
21009
|
};
|
|
@@ -21043,6 +21053,10 @@ function parseDoctorArgs(argv, env = process.env) {
|
|
|
21043
21053
|
case "--json":
|
|
21044
21054
|
options.json = true;
|
|
21045
21055
|
break;
|
|
21056
|
+
case "--support-bundle":
|
|
21057
|
+
options.supportBundle = true;
|
|
21058
|
+
options.json = true;
|
|
21059
|
+
break;
|
|
21046
21060
|
case "--verbose":
|
|
21047
21061
|
options.verbose = true;
|
|
21048
21062
|
break;
|
|
@@ -21186,6 +21200,39 @@ async function checkProxyHealth(port, deps) {
|
|
|
21186
21200
|
"Start with `agent-inspector`, `agent-inspector --background`, or `bun run dev`."
|
|
21187
21201
|
);
|
|
21188
21202
|
}
|
|
21203
|
+
function readinessChecks(readiness) {
|
|
21204
|
+
if (!readiness.ok) {
|
|
21205
|
+
const suffix = readiness.status === null ? "" : ` (HTTP ${readiness.status})`;
|
|
21206
|
+
return [
|
|
21207
|
+
check2(
|
|
21208
|
+
"Readiness",
|
|
21209
|
+
"warn",
|
|
21210
|
+
`Readiness probe is unavailable${suffix}.`,
|
|
21211
|
+
"Use /readyz locally or run with --verbose for storage and worker hints."
|
|
21212
|
+
)
|
|
21213
|
+
];
|
|
21214
|
+
}
|
|
21215
|
+
if (!isObject3(readiness.body)) {
|
|
21216
|
+
return [check2("Readiness", "warn", "Readiness response was not an object.")];
|
|
21217
|
+
}
|
|
21218
|
+
const status = readiness.body["status"];
|
|
21219
|
+
const checks = readiness.body["checks"];
|
|
21220
|
+
if (typeof status !== "string" || !isObject3(checks)) {
|
|
21221
|
+
return [check2("Readiness", "warn", "Readiness response did not include status/checks.")];
|
|
21222
|
+
}
|
|
21223
|
+
const degraded = Object.entries(checks).filter(([, value]) => value !== "ok").map(([name, value]) => `${name}=${String(value)}`);
|
|
21224
|
+
if (degraded.length === 0) {
|
|
21225
|
+
return [check2("Readiness", "pass", `Runtime readiness is ${status}.`)];
|
|
21226
|
+
}
|
|
21227
|
+
return [
|
|
21228
|
+
check2(
|
|
21229
|
+
"Readiness",
|
|
21230
|
+
status === "unavailable" ? "fail" : "warn",
|
|
21231
|
+
`Runtime readiness is ${status}: ${degraded.join(", ")}.`,
|
|
21232
|
+
"Inspect /readyz and /metrics for safe aggregate runtime details."
|
|
21233
|
+
)
|
|
21234
|
+
];
|
|
21235
|
+
}
|
|
21189
21236
|
function findProjectRoot(startDir, deps) {
|
|
21190
21237
|
let current = resolve5(startDir);
|
|
21191
21238
|
for (let i = 0; i < 6; i++) {
|
|
@@ -21376,8 +21423,11 @@ function checkExtensionPackage(rootDir, deps) {
|
|
|
21376
21423
|
}
|
|
21377
21424
|
async function buildDoctorReport(options, deps = createDoctorDeps()) {
|
|
21378
21425
|
const rootDir = findProjectRoot(deps.cwd, deps);
|
|
21426
|
+
const basePath = getConfiguredBasePath(deps.env);
|
|
21427
|
+
const readiness = await deps.fetchReadiness(options.port, basePath);
|
|
21379
21428
|
const coreChecks = [
|
|
21380
21429
|
await checkProxyHealth(options.port, deps),
|
|
21430
|
+
...readinessChecks(readiness),
|
|
21381
21431
|
checkProviderConfig(options, deps),
|
|
21382
21432
|
checkPackage(rootDir, deps)
|
|
21383
21433
|
];
|
|
@@ -21388,12 +21438,30 @@ async function buildDoctorReport(options, deps = createDoctorDeps()) {
|
|
|
21388
21438
|
const failCount = checks.filter((item) => item.severity === "fail").length;
|
|
21389
21439
|
return {
|
|
21390
21440
|
checks,
|
|
21441
|
+
readiness,
|
|
21391
21442
|
passCount,
|
|
21392
21443
|
warnCount,
|
|
21393
21444
|
failCount,
|
|
21394
21445
|
exitCode: failCount > 0 ? 1 : 0
|
|
21395
21446
|
};
|
|
21396
21447
|
}
|
|
21448
|
+
function buildDoctorSupportBundle(options, deps, report) {
|
|
21449
|
+
return {
|
|
21450
|
+
schema: "agent-inspector.support-bundle/v1",
|
|
21451
|
+
createdAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
21452
|
+
report,
|
|
21453
|
+
environment: {
|
|
21454
|
+
platform: deps.platform,
|
|
21455
|
+
cwd: deps.cwd,
|
|
21456
|
+
basePath: getConfiguredBasePath(deps.env),
|
|
21457
|
+
port: options.port,
|
|
21458
|
+
hasControlToken: deps.env["AGENT_INSPECTOR_CONTROL_TOKEN"] !== void 0 || deps.env["AGENT_INSPECTOR_API_TOKEN"] !== void 0,
|
|
21459
|
+
hasProxyToken: deps.env["AGENT_INSPECTOR_PROXY_TOKEN"] !== void 0,
|
|
21460
|
+
hasProviderJsonOverride: options.providersJson !== null || deps.env["AGENT_INSPECTOR_PROVIDERS_JSON"] !== void 0
|
|
21461
|
+
},
|
|
21462
|
+
storage: verboseChecks(options, deps).filter((item) => item.name.includes("storage"))
|
|
21463
|
+
};
|
|
21464
|
+
}
|
|
21397
21465
|
function formatDoctorReport(report) {
|
|
21398
21466
|
const lines = ["agent-inspector doctor", ""];
|
|
21399
21467
|
for (const item of report.checks) {
|
|
@@ -21413,17 +21481,22 @@ function formatDoctorJson(report) {
|
|
|
21413
21481
|
return `${JSON.stringify(report, null, 2)}
|
|
21414
21482
|
`;
|
|
21415
21483
|
}
|
|
21484
|
+
function formatDoctorSupportBundle(bundle) {
|
|
21485
|
+
return `${JSON.stringify(bundle, null, 2)}
|
|
21486
|
+
`;
|
|
21487
|
+
}
|
|
21416
21488
|
function doctorHelp() {
|
|
21417
21489
|
return [
|
|
21418
21490
|
"agent-inspector doctor",
|
|
21419
21491
|
"",
|
|
21420
21492
|
"Usage:",
|
|
21421
|
-
" agent-inspector doctor [--port <port>] [--config-dir <dir>] [--providers <json>] [--fix] [--json] [--verbose] [--chrome-extension]",
|
|
21493
|
+
" agent-inspector doctor [--port <port>] [--config-dir <dir>] [--providers <json>] [--fix] [--json] [--support-bundle] [--verbose] [--chrome-extension]",
|
|
21422
21494
|
"",
|
|
21423
21495
|
"Checks local backend health, provider config presence, and package metadata.",
|
|
21424
21496
|
"The backend check probes the local health endpoint and does not require a composed Web UI.",
|
|
21425
21497
|
"Pass --fix to run safe local repairs before checks, including legacy data-dir migration.",
|
|
21426
21498
|
"Pass --json to emit a machine-readable report for CI, scripts, and Jenkins.",
|
|
21499
|
+
"Pass --support-bundle to emit a redacted JSON bundle with readiness causes and storage summary.",
|
|
21427
21500
|
"Pass --verbose to include local paths, capture mode, and log storage checks.",
|
|
21428
21501
|
"Pass --chrome-extension to also check Chrome companion source and packaged artifacts.",
|
|
21429
21502
|
""
|
|
@@ -21447,6 +21520,30 @@ async function fetchHealth(port, basePath) {
|
|
|
21447
21520
|
clearTimeout(timeout);
|
|
21448
21521
|
}
|
|
21449
21522
|
}
|
|
21523
|
+
async function fetchReadiness(port, basePath) {
|
|
21524
|
+
const controller = new AbortController();
|
|
21525
|
+
const timeout = setTimeout(() => controller.abort(), PROBE_TIMEOUT_MS);
|
|
21526
|
+
try {
|
|
21527
|
+
const response = await fetch(
|
|
21528
|
+
appendBasePathToOrigin(`http://127.0.0.1:${port}`, "/readyz", basePath),
|
|
21529
|
+
{
|
|
21530
|
+
cache: "no-store",
|
|
21531
|
+
signal: controller.signal
|
|
21532
|
+
}
|
|
21533
|
+
);
|
|
21534
|
+
let body = null;
|
|
21535
|
+
try {
|
|
21536
|
+
body = await response.json();
|
|
21537
|
+
} catch {
|
|
21538
|
+
body = null;
|
|
21539
|
+
}
|
|
21540
|
+
return { ok: response.ok, status: response.status, body };
|
|
21541
|
+
} catch {
|
|
21542
|
+
return { ok: false, status: null, body: null };
|
|
21543
|
+
} finally {
|
|
21544
|
+
clearTimeout(timeout);
|
|
21545
|
+
}
|
|
21546
|
+
}
|
|
21450
21547
|
function isPortOpen(port) {
|
|
21451
21548
|
return new Promise((resolveOpen) => {
|
|
21452
21549
|
const socket = createConnection({ host: "127.0.0.1", port });
|
|
@@ -21493,6 +21590,7 @@ function createDoctorDeps() {
|
|
|
21493
21590
|
listDir,
|
|
21494
21591
|
stat: stat3,
|
|
21495
21592
|
fetchHealth,
|
|
21593
|
+
fetchReadiness,
|
|
21496
21594
|
isPortOpen
|
|
21497
21595
|
};
|
|
21498
21596
|
}
|
|
@@ -21511,7 +21609,14 @@ async function runDoctor(argv) {
|
|
|
21511
21609
|
migrateLegacyDataDirs();
|
|
21512
21610
|
}
|
|
21513
21611
|
const report = await buildDoctorReport(parsed.options);
|
|
21514
|
-
|
|
21612
|
+
if (parsed.options.supportBundle) {
|
|
21613
|
+
const bundle = buildDoctorSupportBundle(parsed.options, createDoctorDeps(), report);
|
|
21614
|
+
process.stdout.write(formatDoctorSupportBundle(bundle));
|
|
21615
|
+
} else {
|
|
21616
|
+
process.stdout.write(
|
|
21617
|
+
parsed.options.json ? formatDoctorJson(report) : formatDoctorReport(report)
|
|
21618
|
+
);
|
|
21619
|
+
}
|
|
21515
21620
|
return report.exitCode;
|
|
21516
21621
|
}
|
|
21517
21622
|
var DEFAULT_PORT3, PROBE_TIMEOUT_MS, EXTENSION_REQUIRED_FILES;
|
|
@@ -23851,9 +23956,10 @@ function normalizedHostname(value) {
|
|
|
23851
23956
|
}
|
|
23852
23957
|
}
|
|
23853
23958
|
function isLoopbackHostname(hostname3) {
|
|
23854
|
-
|
|
23855
|
-
if (
|
|
23856
|
-
|
|
23959
|
+
const normalized = hostname3.toLowerCase().replace(/^\[|]$/g, "");
|
|
23960
|
+
if (normalized === "localhost" || normalized === "::1") return true;
|
|
23961
|
+
if (isIP2(normalized) !== 4) return false;
|
|
23962
|
+
return normalized.split(".", 1)[0] === "127";
|
|
23857
23963
|
}
|
|
23858
23964
|
function parseUrl(value) {
|
|
23859
23965
|
try {
|
|
@@ -23910,11 +24016,20 @@ function normalizedRequestOrigin(origin) {
|
|
|
23910
24016
|
return null;
|
|
23911
24017
|
}
|
|
23912
24018
|
}
|
|
24019
|
+
function parsedRequestOrigin(origin) {
|
|
24020
|
+
const normalized = normalizedRequestOrigin(origin);
|
|
24021
|
+
if (normalized === null) return null;
|
|
24022
|
+
return new URL(normalized);
|
|
24023
|
+
}
|
|
24024
|
+
function isSameOrLoopbackAliasOrigin(left, right) {
|
|
24025
|
+
if (left.origin === right.origin) return true;
|
|
24026
|
+
return left.protocol === right.protocol && left.port === right.port && isLoopbackHostname(left.hostname) && isLoopbackHostname(right.hostname);
|
|
24027
|
+
}
|
|
23913
24028
|
function isSameRequestOrigin(origin, host, publicOrigin) {
|
|
23914
|
-
const parsedOrigin =
|
|
24029
|
+
const parsedOrigin = parsedRequestOrigin(origin);
|
|
23915
24030
|
if (parsedOrigin === null) return false;
|
|
23916
|
-
const expected =
|
|
23917
|
-
return expected !== null && parsedOrigin
|
|
24031
|
+
const expected = parsedRequestOrigin(publicOrigin ?? `http://${host ?? "localhost"}`);
|
|
24032
|
+
return expected !== null && isSameOrLoopbackAliasOrigin(parsedOrigin, expected);
|
|
23918
24033
|
}
|
|
23919
24034
|
function matchedUiOrigin(origin, allowedUiOrigins) {
|
|
23920
24035
|
if (origin === void 0) return null;
|
|
@@ -23998,18 +24113,19 @@ function isBrowserMutationAllowed(input) {
|
|
|
23998
24113
|
const fetchSite = input.secFetchSite?.toLowerCase();
|
|
23999
24114
|
const browserRequest = input.origin !== void 0 || fetchSite !== void 0;
|
|
24000
24115
|
if (!browserRequest) return true;
|
|
24116
|
+
const sameOrigin = input.origin !== void 0 ? isSameRequestOrigin(input.origin, input.host, input.publicOrigin) : false;
|
|
24001
24117
|
if (isModelProxyPath(pathname)) {
|
|
24002
|
-
if (fetchSite !== void 0 && fetchSite !== "same-origin") return false;
|
|
24003
|
-
if (input.origin !== void 0 && !
|
|
24118
|
+
if (fetchSite !== void 0 && fetchSite !== "same-origin" && !sameOrigin) return false;
|
|
24119
|
+
if (input.origin !== void 0 && !sameOrigin) {
|
|
24004
24120
|
return false;
|
|
24005
24121
|
}
|
|
24006
24122
|
return input.csrfToken === "1";
|
|
24007
24123
|
}
|
|
24008
24124
|
const allowedOrigin = matchedUiOrigin(input.origin, input.allowedUiOrigins);
|
|
24009
|
-
if (fetchSite !== void 0 && fetchSite !== "same-origin" && allowedOrigin === null)
|
|
24125
|
+
if (fetchSite !== void 0 && fetchSite !== "same-origin" && !sameOrigin && allowedOrigin === null)
|
|
24010
24126
|
return false;
|
|
24011
24127
|
if (input.origin !== void 0) {
|
|
24012
|
-
if (!
|
|
24128
|
+
if (!sameOrigin && allowedOrigin === null) {
|
|
24013
24129
|
return false;
|
|
24014
24130
|
}
|
|
24015
24131
|
}
|
|
@@ -25686,8 +25802,9 @@ async function runStart(args) {
|
|
|
25686
25802
|
}
|
|
25687
25803
|
const runningInBackgroundSupervisor = process.env[AGENT_INSPECTOR_BACKGROUND_SUPERVISOR_ENV] === "1";
|
|
25688
25804
|
const backgroundSupervisorLogs = runningInBackgroundSupervisor ? createBackgroundSupervisorLogs(serverEnv) : null;
|
|
25805
|
+
const shouldPipeBackgroundRuntimeLogs = backgroundSupervisorLogs !== null;
|
|
25689
25806
|
const serverProcess = spawn2(serverCommand.command, serverCommand.args, {
|
|
25690
|
-
stdio: managedLaunch === null ? background ? ["ignore", "ignore", "ignore"] : ["ignore", "pipe", "pipe"] : backend === "typescript" ? background ? ["ignore", "ignore", "ignore", "ipc"] : ["ignore", "pipe", "pipe", "ipc"] : background ? ["ignore", "ignore", "ignore"] : ["ignore", "pipe", "pipe"],
|
|
25807
|
+
stdio: managedLaunch === null ? background && !shouldPipeBackgroundRuntimeLogs ? ["ignore", "ignore", "ignore"] : ["ignore", "pipe", "pipe"] : backend === "typescript" ? background && !shouldPipeBackgroundRuntimeLogs ? ["ignore", "ignore", "ignore", "ipc"] : ["ignore", "pipe", "pipe", "ipc"] : background ? shouldPipeBackgroundRuntimeLogs ? ["ignore", "pipe", "pipe"] : ["ignore", "ignore", "ignore"] : ["ignore", "pipe", "pipe"],
|
|
25691
25808
|
detached: background,
|
|
25692
25809
|
env: serverEnv,
|
|
25693
25810
|
windowsHide: background || runningInBackgroundSupervisor
|
|
@@ -25696,7 +25813,7 @@ async function runStart(args) {
|
|
|
25696
25813
|
console.error(`Failed to start Agent Inspector runtime: ${err.message}`);
|
|
25697
25814
|
});
|
|
25698
25815
|
const serverExit = waitForProcessExit(serverProcess);
|
|
25699
|
-
if (!background) {
|
|
25816
|
+
if (!background || backgroundSupervisorLogs !== null) {
|
|
25700
25817
|
const outputContext = {
|
|
25701
25818
|
enableIdentityProxy,
|
|
25702
25819
|
publicPort: port,
|
|
@@ -85,7 +85,7 @@ function getResponse() {
|
|
|
85
85
|
}
|
|
86
86
|
var HEADERS = { TSS_SHELL: "X-TSS_SHELL" };
|
|
87
87
|
async function getStartManifest(matchedRoutes) {
|
|
88
|
-
const { tsrStartManifest } = await import("../_tanstack-start-manifest_v-
|
|
88
|
+
const { tsrStartManifest } = await import("../_tanstack-start-manifest_v-ClTaMkEj.mjs");
|
|
89
89
|
const startManifest = tsrStartManifest();
|
|
90
90
|
let routes = startManifest.routes;
|
|
91
91
|
routes[rootRouteId];
|
|
@@ -1162,7 +1162,7 @@ var getBaseManifest = getProdBaseManifest;
|
|
|
1162
1162
|
var createEarlyHintsForRequest = createEarlyHintsCollector;
|
|
1163
1163
|
async function loadEntries() {
|
|
1164
1164
|
const [routerEntry, startEntry, pluginAdapters] = await Promise.all([
|
|
1165
|
-
import("./router-
|
|
1165
|
+
import("./router-Be6BLuut.mjs"),
|
|
1166
1166
|
import("./start-COQu_AgD.mjs"),
|
|
1167
1167
|
import("./empty-plugin-adapters-BFgPZ6_d.mjs")
|
|
1168
1168
|
]);
|