mirror of
https://github.com/morluto/rea.git
synced 2026-10-27 18:05:45 +00:00
fix(inspector): retain observations after capture failures
This commit is contained in:
1 parent
c267e99227
commit
dea3498b2b
9 files changed
+532
-45
No files matched your search
@@ -27,7 +27,6 @@ const observedJavaScriptRuntimeKindSchema = javascriptRuntimeKindSchema.or(
|
||||
z.literal("unknown"),
|
||||
);
|
||||
|
||||
/** Input for one bounded, attach-only V8 Inspector observation. */
|
||||
/** Input for one passive attach-only V8 Inspector observation. */
|
||||
export const observeJavaScriptRuntimeInputSchema = z.strictObject({
|
||||
...runtimeEndpoint,
|
||||
@@ -49,7 +48,6 @@ export const javascriptRuntimeLocationSchema = z.discriminatedUnion("kind", [
|
||||
z.strictObject({
|
||||
kind: z.literal("file"),
|
||||
file_path: z.string().min(1),
|
||||
authority: z.literal("scope-fallback").optional(),
|
||||
}),
|
||||
z.strictObject({
|
||||
kind: z.literal("url"),
|
||||
@@ -68,8 +66,15 @@ export type JavaScriptRuntimeLocation = z.infer<
|
||||
/** Discovery metadata can identify an endpoint target without verifying its file location. */
|
||||
export const javascriptRuntimeUnresolvedLocationSchema = z.strictObject({
|
||||
kind: z.literal("unresolved"),
|
||||
reported_url: z.string().min(1),
|
||||
reason: z.literal("unverifiable-file-location"),
|
||||
reported_url: z
|
||||
.string()
|
||||
.describe(
|
||||
"Raw Inspector URL, which may be empty for anonymous or evaluated code.",
|
||||
),
|
||||
reason: z.enum([
|
||||
"unverifiable-file-location",
|
||||
"location-authorization-not-attempted",
|
||||
]),
|
||||
});
|
||||
|
||||
/** Verified locations and explicitly unresolved discovery metadata. */
|
||||
@@ -104,7 +109,7 @@ export type JavaScriptRuntimeTargetList = z.infer<
|
||||
|
||||
const javascriptRuntimeScriptSchema = z.strictObject({
|
||||
script_key: prefixedDigestSchema("v8_script"),
|
||||
location: javascriptRuntimeLocationSchema,
|
||||
location: javascriptRuntimeTargetLocationSchema,
|
||||
execution_context_key: z.string().nullable(),
|
||||
cdp_hash: z.string().nullable(),
|
||||
length: z
|
||||
|
||||
Reference in new issue
Block a user