assassinlike commited on
Commit
84f71a9
·
verified ·
1 Parent(s): abe1078

Add files using upload-large-folder tool

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. data/conda_envs/evalclaw/lib/python3.11/site-packages/inspect_ai/_view/www/src/@types/asciicinema-player.d.ts +26 -0
  2. data/conda_envs/evalclaw/lib/python3.11/site-packages/inspect_ai/_view/www/src/@types/jsondiffpatch.d.ts +8 -0
  3. data/conda_envs/evalclaw/lib/python3.11/site-packages/inspect_ai/_view/www/src/@types/log.d.ts +2238 -0
  4. data/conda_envs/evalclaw/lib/python3.11/site-packages/inspect_ai/_view/www/src/@types/markdown-it-mathjax3.d.ts +35 -0
  5. data/conda_envs/evalclaw/lib/python3.11/site-packages/inspect_ai/_view/www/src/@types/prism.d.ts +15 -0
  6. data/conda_envs/evalclaw/lib/python3.11/site-packages/inspect_ai/_view/www/src/app/App.css +1300 -0
  7. data/conda_envs/evalclaw/lib/python3.11/site-packages/inspect_ai/_view/www/src/app/App.tsx +209 -0
  8. data/conda_envs/evalclaw/lib/python3.11/site-packages/inspect_ai/_view/www/src/app/AppErrorBoundary.tsx +47 -0
  9. data/conda_envs/evalclaw/lib/python3.11/site-packages/inspect_ai/_view/www/src/app/appearance/colors.ts +9 -0
  10. data/conda_envs/evalclaw/lib/python3.11/site-packages/inspect_ai/_view/www/src/app/appearance/fonts.ts +39 -0
  11. data/conda_envs/evalclaw/lib/python3.11/site-packages/inspect_ai/_view/www/src/app/types.ts +219 -0
  12. data/conda_envs/evalclaw/lib/python3.11/site-packages/inspect_ai/_view/www/src/components/ActivityBar.module.css +38 -0
  13. data/conda_envs/evalclaw/lib/python3.11/site-packages/inspect_ai/_view/www/src/components/ActivityBar.tsx +24 -0
  14. data/conda_envs/evalclaw/lib/python3.11/site-packages/inspect_ai/_view/www/src/components/AnsiDisplay.tsx +278 -0
  15. data/conda_envs/evalclaw/lib/python3.11/site-packages/inspect_ai/_view/www/src/components/AsciinemaPlayer.tsx +86 -0
  16. data/conda_envs/evalclaw/lib/python3.11/site-packages/inspect_ai/_view/www/src/components/Card.css +62 -0
  17. data/conda_envs/evalclaw/lib/python3.11/site-packages/inspect_ai/_view/www/src/components/Card.tsx +125 -0
  18. data/conda_envs/evalclaw/lib/python3.11/site-packages/inspect_ai/_view/www/src/components/CodePanel.module.css +15 -0
  19. data/conda_envs/evalclaw/lib/python3.11/site-packages/inspect_ai/_view/www/src/components/CodePanel.tsx +24 -0
  20. data/conda_envs/evalclaw/lib/python3.11/site-packages/inspect_ai/_view/www/src/components/CopyButton.module.css +11 -0
  21. data/conda_envs/evalclaw/lib/python3.11/site-packages/inspect_ai/_view/www/src/components/CopyButton.tsx +56 -0
  22. data/conda_envs/evalclaw/lib/python3.11/site-packages/inspect_ai/_view/www/src/components/DownloadButton.css +4 -0
  23. data/conda_envs/evalclaw/lib/python3.11/site-packages/inspect_ai/_view/www/src/components/DownloadButton.tsx +26 -0
  24. data/conda_envs/evalclaw/lib/python3.11/site-packages/inspect_ai/_view/www/src/components/DownloadLogButton.tsx +80 -0
  25. data/conda_envs/evalclaw/lib/python3.11/site-packages/inspect_ai/_view/www/src/components/DownloadPanel.css +10 -0
  26. data/conda_envs/evalclaw/lib/python3.11/site-packages/inspect_ai/_view/www/src/components/DownloadPanel.tsx +30 -0
  27. data/conda_envs/evalclaw/lib/python3.11/site-packages/inspect_ai/_view/www/src/components/EmptyPanel.css +12 -0
  28. data/conda_envs/evalclaw/lib/python3.11/site-packages/inspect_ai/_view/www/src/components/EmptyPanel.tsx +15 -0
  29. data/conda_envs/evalclaw/lib/python3.11/site-packages/inspect_ai/_view/www/src/components/ErrorPanel.css +37 -0
  30. data/conda_envs/evalclaw/lib/python3.11/site-packages/inspect_ai/_view/www/src/components/ErrorPanel.tsx +40 -0
  31. data/conda_envs/evalclaw/lib/python3.11/site-packages/inspect_ai/_view/www/src/components/ExpandablePanel.module.css +58 -0
  32. data/conda_envs/evalclaw/lib/python3.11/site-packages/inspect_ai/_view/www/src/components/ExpandablePanel.tsx +150 -0
  33. data/conda_envs/evalclaw/lib/python3.11/site-packages/inspect_ai/_view/www/src/components/ExtendedFindContext.tsx +137 -0
  34. data/conda_envs/evalclaw/lib/python3.11/site-packages/inspect_ai/_view/www/src/components/FindBand.css +60 -0
  35. data/conda_envs/evalclaw/lib/python3.11/site-packages/inspect_ai/_view/www/src/components/FindBand.tsx +556 -0
  36. data/conda_envs/evalclaw/lib/python3.11/site-packages/inspect_ai/_view/www/src/components/HumanBaselineView.css +41 -0
  37. data/conda_envs/evalclaw/lib/python3.11/site-packages/inspect_ai/_view/www/src/components/HumanBaselineView.tsx +149 -0
  38. data/conda_envs/evalclaw/lib/python3.11/site-packages/inspect_ai/_view/www/src/components/JsonPanel.css +20 -0
  39. data/conda_envs/evalclaw/lib/python3.11/site-packages/inspect_ai/_view/www/src/components/JsonPanel.tsx +74 -0
  40. data/conda_envs/evalclaw/lib/python3.11/site-packages/inspect_ai/_view/www/src/components/LabeledValue.css +20 -0
  41. data/conda_envs/evalclaw/lib/python3.11/site-packages/inspect_ai/_view/www/src/components/LabeledValue.tsx +42 -0
  42. data/conda_envs/evalclaw/lib/python3.11/site-packages/inspect_ai/_view/www/src/components/LargeModal.tsx +182 -0
  43. data/conda_envs/evalclaw/lib/python3.11/site-packages/inspect_ai/_view/www/src/components/LightboxCarousel.module.css +99 -0
  44. data/conda_envs/evalclaw/lib/python3.11/site-packages/inspect_ai/_view/www/src/components/LinkButton.module.css +16 -0
  45. data/conda_envs/evalclaw/lib/python3.11/site-packages/inspect_ai/_view/www/src/components/LinkButton.tsx +33 -0
  46. data/conda_envs/evalclaw/lib/python3.11/site-packages/inspect_ai/_view/www/src/components/LiveVirtualList.module.css +11 -0
  47. data/conda_envs/evalclaw/lib/python3.11/site-packages/inspect_ai/_view/www/src/components/LiveVirtualList.tsx +419 -0
  48. data/conda_envs/evalclaw/lib/python3.11/site-packages/inspect_ai/_view/www/src/components/MarkdownDiv.css +7 -0
  49. data/conda_envs/evalclaw/lib/python3.11/site-packages/inspect_ai/_view/www/src/components/MarkdownDiv.tsx +440 -0
  50. data/conda_envs/evalclaw/lib/python3.11/site-packages/inspect_ai/_view/www/src/components/MessageBand.css +43 -0
data/conda_envs/evalclaw/lib/python3.11/site-packages/inspect_ai/_view/www/src/@types/asciicinema-player.d.ts ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ declare module "asciinema-player" {
2
+ export const create: (
3
+ src: string | Object,
4
+ el: HTMLElement,
5
+ opts: {
6
+ cols?: number;
7
+ rows?: number;
8
+ autoPlay?: boolean;
9
+ preload?: boolean;
10
+ loop?: boolean;
11
+ theme?: string;
12
+ startAt?: number | string;
13
+ speed?: number;
14
+ idleTimeLimit?: number;
15
+ poster?: string;
16
+ fit?: string;
17
+ controls?: boolean;
18
+ markers?: Array<number> | Array<[number, string]>;
19
+ pauseOnMarkers?: boolean;
20
+ terminalFontSize?: string;
21
+ terminalFontFamily?: string;
22
+ terminalLineHeight?: string;
23
+ logger?: Object;
24
+ },
25
+ ) => any;
26
+ }
data/conda_envs/evalclaw/lib/python3.11/site-packages/inspect_ai/_view/www/src/@types/jsondiffpatch.d.ts ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ declare module "jsondiffpatch/formatters/html" {
2
+ export {
3
+ default as HtmlFormatter,
4
+ showUnchanged,
5
+ hideUnchanged,
6
+ format,
7
+ } from "jsondiffpatch/lib/formatters/html";
8
+ }
data/conda_envs/evalclaw/lib/python3.11/site-packages/inspect_ai/_view/www/src/@types/log.d.ts ADDED
@@ -0,0 +1,2238 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * This file is automatically generated by schema.py
3
+ * DO NOT MODIFY IT BY HAND.
4
+ * To regenerate, run: python -m ../schema.py from within the
5
+ * src/inspect_ai/_view/www directory.
6
+ */
7
+
8
+ export type Version = number;
9
+ export type Status = "started" | "success" | "cancelled" | "error";
10
+ export type EvalSetId = string | null;
11
+ export type EvalId = string;
12
+ export type RunId = string;
13
+ export type Created = string;
14
+ export type Task = string;
15
+ export type TaskId = string;
16
+ export type TaskVersion = number | string;
17
+ export type TaskFile = string | null;
18
+ export type TaskDisplayName = string | null;
19
+ export type TaskRegistryName = string | null;
20
+ export type Solver = string | null;
21
+ export type SolverArgs = {
22
+ [k: string]: unknown;
23
+ } | null;
24
+ export type SolverArgsPassed = {
25
+ [k: string]: unknown;
26
+ } | null;
27
+ export type Tags = string[] | null;
28
+ export type Name = string | null;
29
+ export type Location = string | null;
30
+ export type Samples = number | null;
31
+ export type SampleIds = string[] | number[] | (string | number)[] | null;
32
+ export type Shuffled = boolean | null;
33
+ export type Type = string;
34
+ export type Model = string;
35
+ export type MaxRetries = number | null;
36
+ export type Timeout = number | null;
37
+ export type AttemptTimeout = number | null;
38
+ export type MaxConnections = number | null;
39
+ export type SystemMessage = string | null;
40
+ export type MaxTokens = number | null;
41
+ export type TopP = number | null;
42
+ export type Temperature = number | null;
43
+ export type StopSeqs = string[] | null;
44
+ export type BestOf = number | null;
45
+ export type FrequencyPenalty = number | null;
46
+ export type PresencePenalty = number | null;
47
+ export type LogitBias = {
48
+ [k: string]: number;
49
+ } | null;
50
+ export type Seed = number | null;
51
+ export type TopK = number | null;
52
+ export type NumChoices = number | null;
53
+ export type Logprobs = boolean | null;
54
+ export type TopLogprobs = number | null;
55
+ export type ParallelToolCalls = boolean | null;
56
+ export type InternalTools = boolean | null;
57
+ export type MaxToolOutput = number | null;
58
+ export type CachePrompt = "auto" | boolean | null;
59
+ export type Verbosity = ("low" | "medium" | "high") | null;
60
+ export type Effort = ("low" | "medium" | "high" | "max") | null;
61
+ export type ReasoningEffort =
62
+ | ("none" | "minimal" | "low" | "medium" | "high" | "xhigh")
63
+ | null;
64
+ export type ReasoningTokens = number | null;
65
+ export type ReasoningSummary =
66
+ | ("none" | "concise" | "detailed" | "auto")
67
+ | null;
68
+ export type ReasoningHistory = ("none" | "all" | "last" | "auto") | null;
69
+ export type Name1 = string;
70
+ export type Type1 =
71
+ | ("string" | "integer" | "number" | "boolean" | "array" | "object" | "null")
72
+ | (
73
+ | "string"
74
+ | "integer"
75
+ | "number"
76
+ | "boolean"
77
+ | "array"
78
+ | "object"
79
+ | "null"
80
+ )[]
81
+ | null;
82
+ export type Format = string | null;
83
+ export type Description = string | null;
84
+ export type Enum = unknown[] | null;
85
+ export type Properties = {
86
+ [k: string]: JSONSchema;
87
+ } | null;
88
+ export type Additionalproperties = JSONSchema | boolean | null;
89
+ export type Anyof = JSONSchema[] | null;
90
+ export type Required = string[] | null;
91
+ export type Description1 = string | null;
92
+ export type Strict = boolean | null;
93
+ export type ExtraHeaders = {
94
+ [k: string]: string;
95
+ } | null;
96
+ export type ExtraBody = {
97
+ [k: string]: unknown;
98
+ } | null;
99
+ export type Modalities = ("image" | ImageOutput)[] | null;
100
+ export type Options = {
101
+ [k: string]: {
102
+ [k: string]: unknown;
103
+ };
104
+ } | null;
105
+ export type Cache = boolean | CachePolicy | null;
106
+ export type Expiry = string | null;
107
+ export type PerEpoch = boolean;
108
+ export type Batch = boolean | number | BatchConfig | null;
109
+ export type Size = number | null;
110
+ export type MaxSize = number | null;
111
+ export type SendDelay = number | null;
112
+ export type Tick = number | null;
113
+ export type MaxBatches = number | null;
114
+ export type MaxConsecutiveCheckFailures = number | null;
115
+ export type ModelBaseUrl = string | null;
116
+ export type ModelRoles = {
117
+ [k: string]: ModelConfig;
118
+ } | null;
119
+ export type Model1 = string;
120
+ export type BaseUrl = string | null;
121
+ export type Limit = number | [unknown, unknown] | null;
122
+ export type SampleId =
123
+ | string
124
+ | number
125
+ | string[]
126
+ | number[]
127
+ | (string | number)[]
128
+ | null;
129
+ export type SampleShuffle = boolean | number | null;
130
+ export type Epochs = number | null;
131
+ export type EpochsReducer = string[] | null;
132
+ export type Name2 = string;
133
+ export type Tools = string | string[];
134
+ export type Approvers = ApproverPolicyConfig[];
135
+ export type FailOnError = boolean | number | null;
136
+ export type ContinueOnFail = boolean | null;
137
+ export type RetryOnError = number | null;
138
+ export type MessageLimit = number | null;
139
+ export type TokenLimit = number | null;
140
+ export type TimeLimit = number | null;
141
+ export type WorkingLimit = number | null;
142
+ export type CostLimit = number | null;
143
+ export type MaxSamples = number | null;
144
+ export type MaxDatasetMemory = number | null;
145
+ export type MaxTasks = number | null;
146
+ export type MaxSubprocesses = number | null;
147
+ export type MaxSandboxes = number | null;
148
+ export type SandboxCleanup = boolean | null;
149
+ export type LogSamples = boolean | null;
150
+ export type LogRealtime = boolean | null;
151
+ export type LogImages = boolean | null;
152
+ export type LogModelApi = boolean | null;
153
+ export type LogBuffer = number | null;
154
+ export type LogShared = number | null;
155
+ export type ScoreDisplay = boolean | null;
156
+ export type Type2 = "git";
157
+ export type Origin = string;
158
+ export type Commit = string;
159
+ export type Dirty = boolean | null;
160
+ export type Metadata = {
161
+ [k: string]: unknown;
162
+ } | null;
163
+ export type Scorers = EvalScorer[] | null;
164
+ export type Name3 = string;
165
+ export type Options1 = {
166
+ [k: string]: unknown;
167
+ } | null;
168
+ export type Metrics =
169
+ | (
170
+ | EvalMetricDefinition
171
+ | {
172
+ [k: string]: EvalMetricDefinition[];
173
+ }
174
+ )[]
175
+ | {
176
+ [k: string]: EvalMetricDefinition[];
177
+ }
178
+ | null;
179
+ export type Name4 = string;
180
+ export type Options2 = {
181
+ [k: string]: unknown;
182
+ } | null;
183
+ export type Metadata1 = {
184
+ [k: string]: unknown;
185
+ } | null;
186
+ export type Metrics1 =
187
+ | (
188
+ | EvalMetricDefinition
189
+ | {
190
+ [k: string]: EvalMetricDefinition[];
191
+ }
192
+ )[]
193
+ | {
194
+ [k: string]: EvalMetricDefinition[];
195
+ }
196
+ | null;
197
+ export type Name5 = string;
198
+ export type Solver1 = string;
199
+ export type Steps = EvalPlanStep[];
200
+ export type TotalSamples = number;
201
+ export type CompletedSamples = number;
202
+ export type Manager = string;
203
+ export type Id = string | number;
204
+ export type Epoch = number;
205
+ export type Reason = string | null;
206
+ export type Metadata2 = {
207
+ [k: string]: JsonValue;
208
+ } | null;
209
+ export type JsonValue = unknown;
210
+ export type EarlyStops = EarlyStop[];
211
+ export type Name6 = string;
212
+ export type Scorer = string;
213
+ export type Reducer = string | null;
214
+ export type ScoredSamples = number | null;
215
+ export type UnscoredSamples = number | null;
216
+ export type Name7 = string;
217
+ export type Value = number;
218
+ export type Metadata4 = {
219
+ [k: string]: unknown;
220
+ } | null;
221
+ export type Metadata5 = {
222
+ [k: string]: unknown;
223
+ } | null;
224
+ export type Scores = EvalScore[];
225
+ export type Metadata6 = {
226
+ [k: string]: unknown;
227
+ } | null;
228
+ export type StartedAt = string | "";
229
+ export type CompletedAt = string | "";
230
+ export type InputTokens = number;
231
+ export type OutputTokens = number;
232
+ export type TotalTokens = number;
233
+ export type InputTokensCacheWrite = number | null;
234
+ export type InputTokensCacheRead = number | null;
235
+ export type ReasoningTokens1 = number | null;
236
+ export type TotalCost = number | null;
237
+ export type Message = string;
238
+ export type Traceback = string;
239
+ export type TracebackAnsi = string;
240
+ export type Invalidated = boolean;
241
+ export type LogUpdates = LogUpdate[] | null;
242
+ export type Type3 = "tags";
243
+ export type TagsAdd = string[];
244
+ export type TagsRemove = string[];
245
+ export type Type4 = "metadata";
246
+ export type MetadataRemove = string[];
247
+ export type Edits = (TagsEdit | MetadataEdit)[];
248
+ export type Timestamp = string;
249
+ export type Author = string;
250
+ export type Reason1 = string | null;
251
+ export type Tags1 = string[];
252
+ export type Samples1 = EvalSample[] | null;
253
+ export type Id1 = number | string;
254
+ export type Epoch1 = number;
255
+ export type Input =
256
+ | string
257
+ | (
258
+ | ChatMessageSystem
259
+ | ChatMessageUser
260
+ | ChatMessageAssistant
261
+ | ChatMessageTool
262
+ )[];
263
+ export type Id2 = string | null;
264
+ export type Content =
265
+ | string
266
+ | (
267
+ | ContentText
268
+ | ContentReasoning
269
+ | ContentImage
270
+ | ContentAudio
271
+ | ContentVideo
272
+ | ContentData
273
+ | ContentToolUse
274
+ | ContentDocument
275
+ )[];
276
+ export type Type5 = "text";
277
+ export type Text = string;
278
+ export type Refusal = boolean | null;
279
+ export type Citations =
280
+ | (ContentCitation | DocumentCitation | UrlCitation)[]
281
+ | null;
282
+ export type CitedText = string | [number, number] | null;
283
+ export type Title = string | null;
284
+ export type Internal = {
285
+ [k: string]: JsonValue;
286
+ } | null;
287
+ export type Type6 = "content";
288
+ export type CitedText1 = string | [number, number] | null;
289
+ export type Title1 = string | null;
290
+ export type Internal1 = {
291
+ [k: string]: JsonValue;
292
+ } | null;
293
+ export type Type7 = "document";
294
+ export type Type8 = "block" | "page" | "char";
295
+ export type StartIndex = number;
296
+ export type EndIndex = number;
297
+ export type CitedText2 = string | [number, number] | null;
298
+ export type Title2 = string | null;
299
+ export type Internal2 = {
300
+ [k: string]: JsonValue;
301
+ } | null;
302
+ export type Type9 = "url";
303
+ export type Url = string;
304
+ export type Type10 = "reasoning";
305
+ export type Reasoning = string;
306
+ export type Summary = string | null;
307
+ export type Signature = string | null;
308
+ export type Redacted = boolean;
309
+ export type Type11 = "image";
310
+ export type Image = string;
311
+ export type Detail = "auto" | "low" | "high" | "original";
312
+ export type Type12 = "audio";
313
+ export type Audio = string;
314
+ export type Format1 = "wav" | "mp3";
315
+ export type Type13 = "video";
316
+ export type Video = string;
317
+ export type Format2 = "mp4" | "mpeg" | "mov";
318
+ export type Type14 = "data";
319
+ export type Type15 = "tool_use";
320
+ export type ToolType = "web_search" | "mcp_call" | "code_execution";
321
+ export type Id3 = string;
322
+ export type Name8 = string;
323
+ export type Context = string | null;
324
+ export type Arguments = string;
325
+ export type Result = string;
326
+ export type Error = string | null;
327
+ export type Type16 = "document";
328
+ export type Document = string;
329
+ export type Filename = string;
330
+ export type MimeType = string;
331
+ export type Source = ("input" | "generate") | null;
332
+ export type Metadata9 = {
333
+ [k: string]: unknown;
334
+ } | null;
335
+ export type Role = "system";
336
+ export type Id4 = string | null;
337
+ export type Content1 =
338
+ | string
339
+ | (
340
+ | ContentText
341
+ | ContentReasoning
342
+ | ContentImage
343
+ | ContentAudio
344
+ | ContentVideo
345
+ | ContentData
346
+ | ContentToolUse
347
+ | ContentDocument
348
+ )[];
349
+ export type Source1 = ("input" | "generate") | null;
350
+ export type Metadata10 = {
351
+ [k: string]: unknown;
352
+ } | null;
353
+ export type Role1 = "user";
354
+ export type ToolCallId = string[] | null;
355
+ export type Id5 = string | null;
356
+ export type Content2 =
357
+ | string
358
+ | (
359
+ | ContentText
360
+ | ContentReasoning
361
+ | ContentImage
362
+ | ContentAudio
363
+ | ContentVideo
364
+ | ContentData
365
+ | ContentToolUse
366
+ | ContentDocument
367
+ )[];
368
+ export type Source2 = ("input" | "generate") | null;
369
+ export type Metadata11 = {
370
+ [k: string]: unknown;
371
+ } | null;
372
+ export type Role2 = "assistant";
373
+ export type ToolCalls = ToolCall[] | null;
374
+ export type Id6 = string;
375
+ export type Function = string;
376
+ export type ParseError = string | null;
377
+ export type Title3 = string | null;
378
+ export type Format3 = "text" | "markdown";
379
+ export type Content3 = string;
380
+ export type Type17 = "function" | "custom";
381
+ export type Model2 = string | null;
382
+ export type Id7 = string | null;
383
+ export type Content4 =
384
+ | string
385
+ | (
386
+ | ContentText
387
+ | ContentReasoning
388
+ | ContentImage
389
+ | ContentAudio
390
+ | ContentVideo
391
+ | ContentData
392
+ | ContentToolUse
393
+ | ContentDocument
394
+ )[];
395
+ export type Source3 = ("input" | "generate") | null;
396
+ export type Metadata12 = {
397
+ [k: string]: unknown;
398
+ } | null;
399
+ export type Role3 = "tool";
400
+ export type ToolCallId1 = string | null;
401
+ export type Function1 = string | null;
402
+ export type Type18 =
403
+ | "parsing"
404
+ | "timeout"
405
+ | "unicode_decode"
406
+ | "permission"
407
+ | "file_not_found"
408
+ | "is_a_directory"
409
+ | "limit"
410
+ | "approval"
411
+ | "unknown"
412
+ | "output_limit";
413
+ export type Message1 = string;
414
+ export type Choices = string[] | null;
415
+ export type Target = string | string[];
416
+ export type Files = string[] | null;
417
+ export type Setup = string | null;
418
+ export type Messages = (
419
+ | ChatMessageSystem
420
+ | ChatMessageUser
421
+ | ChatMessageAssistant
422
+ | ChatMessageTool
423
+ )[];
424
+ export type Model3 = string;
425
+ export type StopReason =
426
+ | "stop"
427
+ | "max_tokens"
428
+ | "model_length"
429
+ | "tool_calls"
430
+ | "content_filter"
431
+ | "unknown";
432
+ export type Token = string;
433
+ export type Logprob1 = number;
434
+ export type Bytes = number[] | null;
435
+ export type TopLogprobs1 = TopLogprob[] | null;
436
+ export type Token1 = string;
437
+ export type Logprob2 = number;
438
+ export type Bytes1 = number[] | null;
439
+ export type Content5 = Logprob[];
440
+ export type Choices1 = ChatCompletionChoice[];
441
+ export type Completion = string;
442
+ export type Time = number | null;
443
+ export type Metadata13 = {
444
+ [k: string]: unknown;
445
+ } | null;
446
+ export type Error1 = string | null;
447
+ export type Scores1 = {
448
+ [k: string]: Score;
449
+ } | null;
450
+ export type Value1 =
451
+ | string
452
+ | number
453
+ | boolean
454
+ | (string | number | boolean)[]
455
+ | {
456
+ [k: string]: string | number | boolean | null;
457
+ };
458
+ export type Answer = string | null;
459
+ export type Explanation = string | null;
460
+ export type Metadata14 = {
461
+ [k: string]: unknown;
462
+ } | null;
463
+ export type Value2 =
464
+ | string
465
+ | number
466
+ | boolean
467
+ | (string | number | boolean)[]
468
+ | {
469
+ [k: string]: string | number | boolean | null;
470
+ }
471
+ | "UNCHANGED";
472
+ export type Answer1 = string | "UNCHANGED" | null;
473
+ export type Explanation1 = string | "UNCHANGED" | null;
474
+ export type Metadata15 =
475
+ | {
476
+ [k: string]: unknown;
477
+ }
478
+ | "UNCHANGED";
479
+ export type History = ScoreEdit[];
480
+ export type Uuid = string | null;
481
+ export type SpanId = string | null;
482
+ export type Timestamp1 = string;
483
+ export type WorkingStart = number;
484
+ export type Metadata17 = {
485
+ [k: string]: unknown;
486
+ } | null;
487
+ export type Pending = boolean | null;
488
+ export type Event = "sample_init";
489
+ export type Input1 =
490
+ | string
491
+ | (
492
+ | ChatMessageSystem
493
+ | ChatMessageUser
494
+ | ChatMessageAssistant
495
+ | ChatMessageTool
496
+ )[];
497
+ export type Choices2 = string[] | null;
498
+ export type Target1 = string | string[];
499
+ export type Id8 = number | string | null;
500
+ export type Metadata18 = {
501
+ [k: string]: unknown;
502
+ } | null;
503
+ export type Files1 = {
504
+ [k: string]: string;
505
+ } | null;
506
+ export type Setup1 = string | null;
507
+ export type Uuid1 = string | null;
508
+ export type SpanId1 = string | null;
509
+ export type Timestamp2 = string;
510
+ export type WorkingStart1 = number;
511
+ export type Metadata19 = {
512
+ [k: string]: unknown;
513
+ } | null;
514
+ export type Pending1 = boolean | null;
515
+ export type Event1 = "sample_limit";
516
+ export type Type19 =
517
+ | "message"
518
+ | "time"
519
+ | "working"
520
+ | "token"
521
+ | "cost"
522
+ | "operator"
523
+ | "custom";
524
+ export type Message2 = string;
525
+ export type Limit1 = number | null;
526
+ export type Uuid2 = string | null;
527
+ export type SpanId2 = string | null;
528
+ export type Timestamp3 = string;
529
+ export type WorkingStart2 = number;
530
+ export type Metadata20 = {
531
+ [k: string]: unknown;
532
+ } | null;
533
+ export type Pending2 = boolean | null;
534
+ export type Event2 = "sandbox";
535
+ export type Action = "exec" | "read_file" | "write_file";
536
+ export type Cmd = string | null;
537
+ export type Options3 = {
538
+ [k: string]: JsonValue;
539
+ } | null;
540
+ export type File = string | null;
541
+ export type Input2 = string | null;
542
+ export type Result1 = number | null;
543
+ export type Output = string | null;
544
+ export type Completed = string | null;
545
+ export type Uuid3 = string | null;
546
+ export type SpanId3 = string | null;
547
+ export type Timestamp4 = string;
548
+ export type WorkingStart3 = number;
549
+ export type Metadata21 = {
550
+ [k: string]: unknown;
551
+ } | null;
552
+ export type Pending3 = boolean | null;
553
+ export type Event3 = "state";
554
+ export type Op = "remove" | "add" | "replace" | "move" | "test" | "copy";
555
+ export type Path = string;
556
+ export type From = string | null;
557
+ export type Changes = JsonChange[];
558
+ export type Uuid4 = string | null;
559
+ export type SpanId4 = string | null;
560
+ export type Timestamp5 = string;
561
+ export type WorkingStart4 = number;
562
+ export type Metadata22 = {
563
+ [k: string]: unknown;
564
+ } | null;
565
+ export type Pending4 = boolean | null;
566
+ export type Event4 = "store";
567
+ export type Changes1 = JsonChange[];
568
+ export type Uuid5 = string | null;
569
+ export type SpanId5 = string | null;
570
+ export type Timestamp6 = string;
571
+ export type WorkingStart5 = number;
572
+ export type Metadata23 = {
573
+ [k: string]: unknown;
574
+ } | null;
575
+ export type Pending5 = boolean | null;
576
+ export type Event5 = "model";
577
+ export type Model4 = string;
578
+ export type Role4 = string | null;
579
+ export type Input3 = (
580
+ | ChatMessageSystem
581
+ | ChatMessageUser
582
+ | ChatMessageAssistant
583
+ | ChatMessageTool
584
+ )[];
585
+ export type InputRefs = [unknown, unknown][] | null;
586
+ export type Name9 = string;
587
+ export type Description2 = string;
588
+ export type Type20 = "object";
589
+ export type Required1 = string[];
590
+ export type Additionalproperties1 = JSONSchema | boolean | null;
591
+ export type Options4 = {
592
+ [k: string]: unknown;
593
+ } | null;
594
+ export type Tools1 = ToolInfo[];
595
+ export type ToolChoice = ("auto" | "any" | "none") | ToolFunction;
596
+ export type Name10 = string;
597
+ export type Retries = number | null;
598
+ export type Error2 = string | null;
599
+ export type Traceback1 = string | null;
600
+ export type TracebackAnsi1 = string | null;
601
+ export type Cache1 = ("read" | "write") | null;
602
+ export type Response = {
603
+ [k: string]: JsonValue;
604
+ } | null;
605
+ export type Error3 = boolean | null;
606
+ export type Time1 = number | null;
607
+ export type CallRefs = [unknown, unknown][] | null;
608
+ export type CallKey = string | null;
609
+ export type Completed1 = string | null;
610
+ export type WorkingTime = number | null;
611
+ export type Uuid6 = string | null;
612
+ export type SpanId6 = string | null;
613
+ export type Timestamp7 = string;
614
+ export type WorkingStart6 = number;
615
+ export type Metadata24 = {
616
+ [k: string]: unknown;
617
+ } | null;
618
+ export type Pending6 = boolean | null;
619
+ export type Event6 = "tool";
620
+ export type Type21 = "function";
621
+ export type Id9 = string;
622
+ export type Function2 = string;
623
+ export type Result2 =
624
+ | string
625
+ | number
626
+ | boolean
627
+ | ContentText
628
+ | ContentImage
629
+ | ContentAudio
630
+ | ContentVideo
631
+ | ContentDocument
632
+ | (
633
+ | ContentText
634
+ | ContentImage
635
+ | ContentAudio
636
+ | ContentVideo
637
+ | ContentDocument
638
+ )[];
639
+ export type Truncated = [unknown, unknown] | null;
640
+ export type Events1 = unknown[];
641
+ export type Completed2 = string | null;
642
+ export type WorkingTime1 = number | null;
643
+ export type Agent = string | null;
644
+ export type AgentSpanId = string | null;
645
+ export type Failed = boolean | null;
646
+ export type MessageId = string | null;
647
+ export type Uuid7 = string | null;
648
+ export type SpanId7 = string | null;
649
+ export type Timestamp8 = string;
650
+ export type WorkingStart7 = number;
651
+ export type Metadata25 = {
652
+ [k: string]: unknown;
653
+ } | null;
654
+ export type Pending7 = boolean | null;
655
+ export type Event7 = "approval";
656
+ export type Message3 = string;
657
+ export type Approver = string;
658
+ export type Decision =
659
+ | "approve"
660
+ | "modify"
661
+ | "reject"
662
+ | "escalate"
663
+ | "terminate";
664
+ export type Explanation2 = string | null;
665
+ export type Uuid8 = string | null;
666
+ export type SpanId8 = string | null;
667
+ export type Timestamp9 = string;
668
+ export type WorkingStart8 = number;
669
+ export type Metadata26 = {
670
+ [k: string]: unknown;
671
+ } | null;
672
+ export type Pending8 = boolean | null;
673
+ export type Event8 = "compaction";
674
+ export type Type22 = "summary" | "edit" | "trim";
675
+ export type TokensBefore = number | null;
676
+ export type TokensAfter = number | null;
677
+ export type Source4 = string | null;
678
+ export type Uuid9 = string | null;
679
+ export type SpanId9 = string | null;
680
+ export type Timestamp10 = string;
681
+ export type WorkingStart9 = number;
682
+ export type Metadata27 = {
683
+ [k: string]: unknown;
684
+ } | null;
685
+ export type Pending9 = boolean | null;
686
+ export type Event9 = "input";
687
+ export type Input4 = string;
688
+ export type InputAnsi = string;
689
+ export type Uuid10 = string | null;
690
+ export type SpanId10 = string | null;
691
+ export type Timestamp11 = string;
692
+ export type WorkingStart10 = number;
693
+ export type Metadata28 = {
694
+ [k: string]: unknown;
695
+ } | null;
696
+ export type Pending10 = boolean | null;
697
+ export type Event10 = "score";
698
+ export type Target2 = string | string[] | null;
699
+ export type Intermediate = boolean;
700
+ export type ModelUsage2 = {
701
+ [k: string]: ModelUsage1;
702
+ } | null;
703
+ export type RoleUsage1 = {
704
+ [k: string]: ModelUsage1;
705
+ } | null;
706
+ export type Uuid11 = string | null;
707
+ export type SpanId11 = string | null;
708
+ export type Timestamp12 = string;
709
+ export type WorkingStart11 = number;
710
+ export type Metadata29 = {
711
+ [k: string]: unknown;
712
+ } | null;
713
+ export type Pending11 = boolean | null;
714
+ export type Event11 = "score_edit";
715
+ export type ScoreName = string;
716
+ export type Uuid12 = string | null;
717
+ export type SpanId12 = string | null;
718
+ export type Timestamp13 = string;
719
+ export type WorkingStart12 = number;
720
+ export type Metadata30 = {
721
+ [k: string]: unknown;
722
+ } | null;
723
+ export type Pending12 = boolean | null;
724
+ export type Event12 = "error";
725
+ export type Uuid13 = string | null;
726
+ export type SpanId13 = string | null;
727
+ export type Timestamp14 = string;
728
+ export type WorkingStart13 = number;
729
+ export type Metadata31 = {
730
+ [k: string]: unknown;
731
+ } | null;
732
+ export type Pending13 = boolean | null;
733
+ export type Event13 = "logger";
734
+ export type Name11 = string | null;
735
+ export type Level =
736
+ | "debug"
737
+ | "trace"
738
+ | "http"
739
+ | "sandbox"
740
+ | "info"
741
+ | "warning"
742
+ | "error"
743
+ | "critical";
744
+ export type Message4 = string;
745
+ export type Created1 = number;
746
+ export type Filename1 = string;
747
+ export type Module = string;
748
+ export type Lineno = number;
749
+ export type Uuid14 = string | null;
750
+ export type SpanId14 = string | null;
751
+ export type Timestamp15 = string;
752
+ export type WorkingStart14 = number;
753
+ export type Metadata32 = {
754
+ [k: string]: unknown;
755
+ } | null;
756
+ export type Pending14 = boolean | null;
757
+ export type Event14 = "info";
758
+ export type Source5 = string | null;
759
+ export type Uuid15 = string | null;
760
+ export type SpanId15 = string | null;
761
+ export type Timestamp16 = string;
762
+ export type WorkingStart15 = number;
763
+ export type Metadata33 = {
764
+ [k: string]: unknown;
765
+ } | null;
766
+ export type Pending15 = boolean | null;
767
+ export type Event15 = "span_begin";
768
+ export type Id10 = string;
769
+ export type ParentId = string | null;
770
+ export type Type23 = string | null;
771
+ export type Name12 = string;
772
+ export type Uuid16 = string | null;
773
+ export type SpanId16 = string | null;
774
+ export type Timestamp17 = string;
775
+ export type WorkingStart16 = number;
776
+ export type Metadata34 = {
777
+ [k: string]: unknown;
778
+ } | null;
779
+ export type Pending16 = boolean | null;
780
+ export type Event16 = "span_end";
781
+ export type Id11 = string;
782
+ export type Uuid17 = string | null;
783
+ export type SpanId17 = string | null;
784
+ export type Timestamp18 = string;
785
+ export type WorkingStart17 = number;
786
+ export type Metadata35 = {
787
+ [k: string]: unknown;
788
+ } | null;
789
+ export type Pending17 = boolean | null;
790
+ export type Event17 = "step";
791
+ export type Action1 = "begin" | "end";
792
+ export type Type24 = string | null;
793
+ export type Name13 = string;
794
+ export type Uuid18 = string | null;
795
+ export type SpanId18 = string | null;
796
+ export type Timestamp19 = string;
797
+ export type WorkingStart18 = number;
798
+ export type Metadata36 = {
799
+ [k: string]: unknown;
800
+ } | null;
801
+ export type Pending18 = boolean | null;
802
+ export type Event18 = "subtask";
803
+ export type Name14 = string;
804
+ export type Type25 = string | null;
805
+ export type Events2 = unknown[];
806
+ export type Completed3 = string | null;
807
+ export type WorkingTime2 = number | null;
808
+ export type Events = (
809
+ | SampleInitEvent
810
+ | SampleLimitEvent
811
+ | SandboxEvent
812
+ | StateEvent
813
+ | StoreEvent
814
+ | ModelEvent
815
+ | ToolEvent
816
+ | ApprovalEvent
817
+ | CompactionEvent
818
+ | InputEvent
819
+ | ScoreEvent
820
+ | ScoreEditEvent
821
+ | ErrorEvent
822
+ | LoggerEvent
823
+ | InfoEvent
824
+ | SpanBeginEvent
825
+ | SpanEndEvent
826
+ | StepEvent
827
+ | SubtaskEvent
828
+ )[];
829
+ export type Timelines = Timeline[] | null;
830
+ export type Name15 = string;
831
+ export type Description3 = string;
832
+ export type Type26 = "span";
833
+ export type Id12 = string;
834
+ export type Name16 = string;
835
+ export type SpanType = string | null;
836
+ export type Type27 = "event";
837
+ export type Event19 =
838
+ | SampleInitEvent
839
+ | SampleLimitEvent
840
+ | SandboxEvent
841
+ | StateEvent
842
+ | StoreEvent
843
+ | ModelEvent
844
+ | ToolEvent
845
+ | ApprovalEvent
846
+ | CompactionEvent
847
+ | InputEvent
848
+ | ScoreEvent
849
+ | ScoreEditEvent
850
+ | ErrorEvent
851
+ | LoggerEvent
852
+ | InfoEvent
853
+ | SpanBeginEvent
854
+ | SpanEndEvent
855
+ | StepEvent
856
+ | SubtaskEvent;
857
+ export type Content6 = (TimelineEvent | TimelineSpan)[];
858
+ export type Type28 = "branch";
859
+ export type ForkedAt = string;
860
+ export type Content7 = (TimelineEvent | TimelineSpan)[];
861
+ export type Branches = TimelineBranch[];
862
+ export type Description4 = string | null;
863
+ export type Utility = boolean;
864
+ export type AgentResult = string | null;
865
+ export type Event20 = string;
866
+ export type Children = OutlineNode[];
867
+ export type Nodes = OutlineNode[];
868
+ export type StartedAt1 = string | null;
869
+ export type CompletedAt1 = string | null;
870
+ export type TotalTime = number | null;
871
+ export type WorkingTime3 = number | null;
872
+ export type Uuid19 = string | null;
873
+ export type ErrorRetries = EvalError[] | null;
874
+ export type MessagePool = (
875
+ | ChatMessageSystem
876
+ | ChatMessageUser
877
+ | ChatMessageAssistant
878
+ | ChatMessageTool
879
+ )[];
880
+ export type CallPool = JsonValue[];
881
+ export type Type29 =
882
+ | "context"
883
+ | "time"
884
+ | "working"
885
+ | "message"
886
+ | "token"
887
+ | "cost"
888
+ | "operator"
889
+ | "custom";
890
+ export type Limit2 = number;
891
+ export type Reductions = EvalSampleReductions[] | null;
892
+ export type Scorer1 = string;
893
+ export type Reducer1 = string | null;
894
+ export type Value3 =
895
+ | string
896
+ | number
897
+ | boolean
898
+ | (string | number | boolean)[]
899
+ | {
900
+ [k: string]: string | number | boolean | null;
901
+ };
902
+ export type Answer2 = string | null;
903
+ export type Explanation3 = string | null;
904
+ export type Metadata37 = {
905
+ [k: string]: unknown;
906
+ } | null;
907
+ export type History1 = ScoreEdit[];
908
+ export type SampleId1 = string | number | null;
909
+ export type Samples2 = EvalSampleScore[];
910
+ export type Location1 = string;
911
+ export type Etag = string | null;
912
+ export type EvalSetId1 = string;
913
+ export type Name17 = string | null;
914
+ export type TaskId1 = string;
915
+ export type TaskFile1 = string | null;
916
+ export type Model5 = string;
917
+ export type ModelRoles1 = {
918
+ [k: string]: string;
919
+ } | null;
920
+ export type Sequence = number;
921
+ export type Tasks = EvalSetTask[];
922
+
923
+ /**
924
+ * Evaluation log.
925
+ */
926
+ export interface EvalLog {
927
+ version?: Version;
928
+ status?: Status;
929
+ eval: EvalSpec;
930
+ plan?: EvalPlan;
931
+ results?: EvalResults | null;
932
+ stats?: EvalStats;
933
+ error?: EvalError | null;
934
+ invalidated?: Invalidated;
935
+ log_updates?: LogUpdates;
936
+ tags?: Tags1;
937
+ metadata?: Metadata8;
938
+ samples?: Samples1;
939
+ reductions?: Reductions;
940
+ location?: Location1;
941
+ etag?: Etag;
942
+ eval_set_info?: EvalSet | null;
943
+ }
944
+ /**
945
+ * Eval target and configuration.
946
+ */
947
+ export interface EvalSpec {
948
+ eval_set_id: EvalSetId;
949
+ eval_id: EvalId;
950
+ run_id: RunId;
951
+ created: Created;
952
+ task: Task;
953
+ task_id: TaskId;
954
+ task_version: TaskVersion;
955
+ task_file: TaskFile;
956
+ task_display_name: TaskDisplayName;
957
+ task_registry_name: TaskRegistryName;
958
+ task_attribs: TaskAttribs;
959
+ task_args: TaskArgs;
960
+ task_args_passed: TaskArgsPassed;
961
+ solver: Solver;
962
+ solver_args: SolverArgs;
963
+ solver_args_passed: SolverArgsPassed;
964
+ tags: Tags;
965
+ dataset: EvalDataset;
966
+ sandbox: SandboxEnvironmentSpec | null;
967
+ model: Model;
968
+ model_generate_config: GenerateConfig;
969
+ model_base_url: ModelBaseUrl;
970
+ model_args: ModelArgs;
971
+ model_roles: ModelRoles;
972
+ config: EvalConfig;
973
+ revision: EvalRevision | null;
974
+ packages: Packages;
975
+ metadata: Metadata;
976
+ scorers: Scorers;
977
+ metrics: Metrics1;
978
+ }
979
+ export interface TaskAttribs {
980
+ [k: string]: unknown;
981
+ }
982
+ export interface TaskArgs {
983
+ [k: string]: unknown;
984
+ }
985
+ export interface TaskArgsPassed {
986
+ [k: string]: unknown;
987
+ }
988
+ /**
989
+ * Dataset used for evaluation.
990
+ */
991
+ export interface EvalDataset {
992
+ name: Name;
993
+ location: Location;
994
+ samples: Samples;
995
+ sample_ids: SampleIds;
996
+ shuffled: Shuffled;
997
+ }
998
+ /**
999
+ * Specification of a SandboxEnvironment.
1000
+ */
1001
+ export interface SandboxEnvironmentSpec {
1002
+ type: Type;
1003
+ config: Config;
1004
+ }
1005
+ export interface Config {
1006
+ [k: string]: unknown;
1007
+ }
1008
+ /**
1009
+ * Model generation options.
1010
+ */
1011
+ export interface GenerateConfig {
1012
+ max_retries: MaxRetries;
1013
+ timeout: Timeout;
1014
+ attempt_timeout: AttemptTimeout;
1015
+ max_connections: MaxConnections;
1016
+ system_message: SystemMessage;
1017
+ max_tokens: MaxTokens;
1018
+ top_p: TopP;
1019
+ temperature: Temperature;
1020
+ stop_seqs: StopSeqs;
1021
+ best_of: BestOf;
1022
+ frequency_penalty: FrequencyPenalty;
1023
+ presence_penalty: PresencePenalty;
1024
+ logit_bias: LogitBias;
1025
+ seed: Seed;
1026
+ top_k: TopK;
1027
+ num_choices: NumChoices;
1028
+ logprobs: Logprobs;
1029
+ top_logprobs: TopLogprobs;
1030
+ parallel_tool_calls: ParallelToolCalls;
1031
+ internal_tools: InternalTools;
1032
+ max_tool_output: MaxToolOutput;
1033
+ cache_prompt: CachePrompt;
1034
+ verbosity: Verbosity;
1035
+ effort: Effort;
1036
+ reasoning_effort: ReasoningEffort;
1037
+ reasoning_tokens: ReasoningTokens;
1038
+ reasoning_summary: ReasoningSummary;
1039
+ reasoning_history: ReasoningHistory;
1040
+ response_schema: ResponseSchema | null;
1041
+ extra_headers: ExtraHeaders;
1042
+ extra_body: ExtraBody;
1043
+ modalities: Modalities;
1044
+ cache: Cache;
1045
+ batch: Batch;
1046
+ }
1047
+ /**
1048
+ * Schema for model response when using Structured Output.
1049
+ */
1050
+ export interface ResponseSchema {
1051
+ name: Name1;
1052
+ json_schema: JSONSchema;
1053
+ description: Description1;
1054
+ strict: Strict;
1055
+ }
1056
+ /**
1057
+ * JSON Schema for type.
1058
+ */
1059
+ export interface JSONSchema {
1060
+ type: Type1;
1061
+ format: Format;
1062
+ description: Description;
1063
+ default: Default;
1064
+ enum: Enum;
1065
+ items: JSONSchema | null;
1066
+ properties: Properties;
1067
+ additionalProperties: Additionalproperties;
1068
+ anyOf: Anyof;
1069
+ required: Required;
1070
+ }
1071
+ export interface Default {
1072
+ [k: string]: unknown;
1073
+ }
1074
+ /**
1075
+ * Image output configuration.
1076
+ *
1077
+ * Use the `options` field to pass provider-specific options directly
1078
+ * to the underlying API (e.g. OpenAI image_generation tool parameters).
1079
+ */
1080
+ export interface ImageOutput {
1081
+ options: Options;
1082
+ }
1083
+ /**
1084
+ * Caching options for model generation.
1085
+ */
1086
+ export interface CachePolicy {
1087
+ expiry: Expiry;
1088
+ per_epoch: PerEpoch;
1089
+ scopes: Scopes;
1090
+ }
1091
+ export interface Scopes {
1092
+ [k: string]: string;
1093
+ }
1094
+ /**
1095
+ * Batch processing configuration.
1096
+ */
1097
+ export interface BatchConfig {
1098
+ size: Size;
1099
+ max_size: MaxSize;
1100
+ send_delay: SendDelay;
1101
+ tick: Tick;
1102
+ max_batches: MaxBatches;
1103
+ max_consecutive_check_failures: MaxConsecutiveCheckFailures;
1104
+ }
1105
+ export interface ModelArgs {
1106
+ [k: string]: unknown;
1107
+ }
1108
+ /**
1109
+ * Model config.
1110
+ */
1111
+ export interface ModelConfig {
1112
+ model: Model1;
1113
+ config: GenerateConfig;
1114
+ base_url: BaseUrl;
1115
+ args: Args;
1116
+ }
1117
+ export interface Args {
1118
+ [k: string]: unknown;
1119
+ }
1120
+ /**
1121
+ * Configuration used for evaluation.
1122
+ */
1123
+ export interface EvalConfig {
1124
+ limit: Limit;
1125
+ sample_id: SampleId;
1126
+ sample_shuffle: SampleShuffle;
1127
+ epochs: Epochs;
1128
+ epochs_reducer: EpochsReducer;
1129
+ approval: ApprovalPolicyConfig | null;
1130
+ fail_on_error: FailOnError;
1131
+ continue_on_fail: ContinueOnFail;
1132
+ retry_on_error: RetryOnError;
1133
+ message_limit: MessageLimit;
1134
+ token_limit: TokenLimit;
1135
+ time_limit: TimeLimit;
1136
+ working_limit: WorkingLimit;
1137
+ cost_limit: CostLimit;
1138
+ max_samples: MaxSamples;
1139
+ max_dataset_memory: MaxDatasetMemory;
1140
+ max_tasks: MaxTasks;
1141
+ max_subprocesses: MaxSubprocesses;
1142
+ max_sandboxes: MaxSandboxes;
1143
+ sandbox_cleanup: SandboxCleanup;
1144
+ log_samples: LogSamples;
1145
+ log_realtime: LogRealtime;
1146
+ log_images: LogImages;
1147
+ log_model_api: LogModelApi;
1148
+ log_buffer: LogBuffer;
1149
+ log_shared: LogShared;
1150
+ score_display: ScoreDisplay;
1151
+ }
1152
+ export interface ApprovalPolicyConfig {
1153
+ approvers: Approvers;
1154
+ }
1155
+ /**
1156
+ * Configuration format for approver policies.
1157
+ *
1158
+ * For example, here is a configuration in YAML:
1159
+ *
1160
+ * ```yaml
1161
+ * approvers:
1162
+ * - name: human
1163
+ * tools: web_browser*, bash, pyhton
1164
+ * choices: [approve, reject]
1165
+ *
1166
+ * - name: auto
1167
+ * tools: *
1168
+ * decision: approve
1169
+ * ```
1170
+ */
1171
+ export interface ApproverPolicyConfig {
1172
+ name: Name2;
1173
+ tools: Tools;
1174
+ params: Params;
1175
+ }
1176
+ export interface Params {
1177
+ [k: string]: unknown;
1178
+ }
1179
+ /**
1180
+ * Git revision for evaluation.
1181
+ */
1182
+ export interface EvalRevision {
1183
+ type: Type2;
1184
+ origin: Origin;
1185
+ commit: Commit;
1186
+ dirty: Dirty;
1187
+ }
1188
+ export interface Packages {
1189
+ [k: string]: string;
1190
+ }
1191
+ export interface EvalScorer {
1192
+ name: Name3;
1193
+ options: Options1;
1194
+ metrics: Metrics;
1195
+ metadata: Metadata1;
1196
+ }
1197
+ export interface EvalMetricDefinition {
1198
+ name: Name4;
1199
+ options: Options2;
1200
+ }
1201
+ /**
1202
+ * Plan (solvers) used in evaluation.
1203
+ */
1204
+ export interface EvalPlan {
1205
+ name: Name5;
1206
+ steps: Steps;
1207
+ finish: EvalPlanStep | null;
1208
+ config: GenerateConfig1;
1209
+ }
1210
+ /**
1211
+ * Solver step.
1212
+ */
1213
+ export interface EvalPlanStep {
1214
+ solver: Solver1;
1215
+ params: Params1;
1216
+ params_passed: ParamsPassed;
1217
+ }
1218
+ export interface Params1 {
1219
+ [k: string]: unknown;
1220
+ }
1221
+ export interface ParamsPassed {
1222
+ [k: string]: unknown;
1223
+ }
1224
+ /**
1225
+ * Model generation options.
1226
+ */
1227
+ export interface GenerateConfig1 {
1228
+ max_retries: MaxRetries;
1229
+ timeout: Timeout;
1230
+ attempt_timeout: AttemptTimeout;
1231
+ max_connections: MaxConnections;
1232
+ system_message: SystemMessage;
1233
+ max_tokens: MaxTokens;
1234
+ top_p: TopP;
1235
+ temperature: Temperature;
1236
+ stop_seqs: StopSeqs;
1237
+ best_of: BestOf;
1238
+ frequency_penalty: FrequencyPenalty;
1239
+ presence_penalty: PresencePenalty;
1240
+ logit_bias: LogitBias;
1241
+ seed: Seed;
1242
+ top_k: TopK;
1243
+ num_choices: NumChoices;
1244
+ logprobs: Logprobs;
1245
+ top_logprobs: TopLogprobs;
1246
+ parallel_tool_calls: ParallelToolCalls;
1247
+ internal_tools: InternalTools;
1248
+ max_tool_output: MaxToolOutput;
1249
+ cache_prompt: CachePrompt;
1250
+ verbosity: Verbosity;
1251
+ effort: Effort;
1252
+ reasoning_effort: ReasoningEffort;
1253
+ reasoning_tokens: ReasoningTokens;
1254
+ reasoning_summary: ReasoningSummary;
1255
+ reasoning_history: ReasoningHistory;
1256
+ response_schema: ResponseSchema | null;
1257
+ extra_headers: ExtraHeaders;
1258
+ extra_body: ExtraBody;
1259
+ modalities: Modalities;
1260
+ cache: Cache;
1261
+ batch: Batch;
1262
+ }
1263
+ /**
1264
+ * Scoring results from evaluation.
1265
+ */
1266
+ export interface EvalResults {
1267
+ total_samples: TotalSamples;
1268
+ completed_samples: CompletedSamples;
1269
+ early_stopping: EarlyStoppingSummary | null;
1270
+ scores: Scores;
1271
+ metadata: Metadata6;
1272
+ }
1273
+ /**
1274
+ * Summary of early stopping applied to task.
1275
+ */
1276
+ export interface EarlyStoppingSummary {
1277
+ manager: Manager;
1278
+ early_stops: EarlyStops;
1279
+ metadata: Metadata3;
1280
+ }
1281
+ /**
1282
+ * Directive to stop a sample early.
1283
+ */
1284
+ export interface EarlyStop {
1285
+ id: Id;
1286
+ epoch: Epoch;
1287
+ reason: Reason;
1288
+ metadata: Metadata2;
1289
+ }
1290
+ export interface Metadata3 {
1291
+ [k: string]: JsonValue;
1292
+ }
1293
+ /**
1294
+ * Score for evaluation task.
1295
+ */
1296
+ export interface EvalScore {
1297
+ name: Name6;
1298
+ scorer: Scorer;
1299
+ reducer: Reducer;
1300
+ scored_samples: ScoredSamples;
1301
+ unscored_samples: UnscoredSamples;
1302
+ params: Params2;
1303
+ metrics: Metrics2;
1304
+ metadata: Metadata5;
1305
+ }
1306
+ export interface Params2 {
1307
+ [k: string]: unknown;
1308
+ }
1309
+ export interface Metrics2 {
1310
+ [k: string]: EvalMetric;
1311
+ }
1312
+ /**
1313
+ * Metric for evaluation score.
1314
+ */
1315
+ export interface EvalMetric {
1316
+ name: Name7;
1317
+ value: Value;
1318
+ params: Params3;
1319
+ metadata: Metadata4;
1320
+ }
1321
+ export interface Params3 {
1322
+ [k: string]: unknown;
1323
+ }
1324
+ /**
1325
+ * Timing and usage statistics.
1326
+ */
1327
+ export interface EvalStats {
1328
+ started_at: StartedAt;
1329
+ completed_at: CompletedAt;
1330
+ model_usage: ModelUsage;
1331
+ role_usage: RoleUsage;
1332
+ }
1333
+ export interface ModelUsage {
1334
+ [k: string]: ModelUsage1;
1335
+ }
1336
+ /**
1337
+ * Token usage for completion.
1338
+ */
1339
+ export interface ModelUsage1 {
1340
+ input_tokens: InputTokens;
1341
+ output_tokens: OutputTokens;
1342
+ total_tokens: TotalTokens;
1343
+ input_tokens_cache_write: InputTokensCacheWrite;
1344
+ input_tokens_cache_read: InputTokensCacheRead;
1345
+ reasoning_tokens: ReasoningTokens1;
1346
+ total_cost: TotalCost;
1347
+ }
1348
+ export interface RoleUsage {
1349
+ [k: string]: ModelUsage1;
1350
+ }
1351
+ /**
1352
+ * Eval error details.
1353
+ */
1354
+ export interface EvalError {
1355
+ message: Message;
1356
+ traceback: Traceback;
1357
+ traceback_ansi: TracebackAnsi;
1358
+ }
1359
+ /**
1360
+ * A group of edits that share provenance.
1361
+ */
1362
+ export interface LogUpdate {
1363
+ edits: Edits;
1364
+ provenance: ProvenanceData;
1365
+ }
1366
+ /**
1367
+ * Edit action for tags.
1368
+ */
1369
+ export interface TagsEdit {
1370
+ type: Type3;
1371
+ tags_add: TagsAdd;
1372
+ tags_remove: TagsRemove;
1373
+ }
1374
+ /**
1375
+ * Edit action for metadata.
1376
+ */
1377
+ export interface MetadataEdit {
1378
+ type: Type4;
1379
+ metadata_set: MetadataSet;
1380
+ metadata_remove: MetadataRemove;
1381
+ }
1382
+ export interface MetadataSet {
1383
+ [k: string]: unknown;
1384
+ }
1385
+ /**
1386
+ * Metadata about who made an edit and why.
1387
+ */
1388
+ export interface ProvenanceData {
1389
+ timestamp: Timestamp;
1390
+ author: Author;
1391
+ reason: Reason1;
1392
+ metadata: Metadata7;
1393
+ }
1394
+ export interface Metadata7 {
1395
+ [k: string]: unknown;
1396
+ }
1397
+ export interface Metadata8 {
1398
+ [k: string]: unknown;
1399
+ }
1400
+ /**
1401
+ * Sample from evaluation task.
1402
+ */
1403
+ export interface EvalSample {
1404
+ id: Id1;
1405
+ epoch: Epoch1;
1406
+ input: Input;
1407
+ choices: Choices;
1408
+ target: Target;
1409
+ sandbox: SandboxEnvironmentSpec | null;
1410
+ files: Files;
1411
+ setup: Setup;
1412
+ messages: Messages;
1413
+ output: ModelOutput;
1414
+ scores: Scores1;
1415
+ metadata: Metadata16;
1416
+ store: Store;
1417
+ events: Events;
1418
+ timelines: Timelines;
1419
+ model_usage: ModelUsage3;
1420
+ role_usage: RoleUsage2;
1421
+ started_at: StartedAt1;
1422
+ completed_at: CompletedAt1;
1423
+ total_time: TotalTime;
1424
+ working_time: WorkingTime3;
1425
+ uuid: Uuid19;
1426
+ invalidation: ProvenanceData | null;
1427
+ error: EvalError | null;
1428
+ error_retries: ErrorRetries;
1429
+ attachments: Attachments;
1430
+ message_pool: MessagePool;
1431
+ call_pool: CallPool;
1432
+ limit: EvalSampleLimit | null;
1433
+ }
1434
+ /**
1435
+ * System chat message.
1436
+ */
1437
+ export interface ChatMessageSystem {
1438
+ id: Id2;
1439
+ content: Content;
1440
+ source: Source;
1441
+ metadata: Metadata9;
1442
+ role: Role;
1443
+ }
1444
+ /**
1445
+ * Text content.
1446
+ */
1447
+ export interface ContentText {
1448
+ internal: unknown;
1449
+ type: Type5;
1450
+ text: Text;
1451
+ refusal: Refusal;
1452
+ citations: Citations;
1453
+ }
1454
+ /**
1455
+ * A generic content citation.
1456
+ */
1457
+ export interface ContentCitation {
1458
+ cited_text: CitedText;
1459
+ title: Title;
1460
+ internal: Internal;
1461
+ type: Type6;
1462
+ }
1463
+ /**
1464
+ * A citation that refers to a page range in a document.
1465
+ */
1466
+ export interface DocumentCitation {
1467
+ cited_text: CitedText1;
1468
+ title: Title1;
1469
+ internal: Internal1;
1470
+ type: Type7;
1471
+ range: DocumentRange | null;
1472
+ }
1473
+ /**
1474
+ * A range specifying a section of a document.
1475
+ */
1476
+ export interface DocumentRange {
1477
+ type: Type8;
1478
+ start_index: StartIndex;
1479
+ end_index: EndIndex;
1480
+ }
1481
+ /**
1482
+ * A citation that refers to a URL.
1483
+ */
1484
+ export interface UrlCitation {
1485
+ cited_text: CitedText2;
1486
+ title: Title2;
1487
+ internal: Internal2;
1488
+ type: Type9;
1489
+ url: Url;
1490
+ }
1491
+ /**
1492
+ * Reasoning content.
1493
+ *
1494
+ * See the specification for [thinking blocks](https://docs.anthropic.com/en/docs/build-with-claude/extended-thinking#understanding-thinking-blocks) for Claude models.
1495
+ */
1496
+ export interface ContentReasoning {
1497
+ internal: unknown;
1498
+ type: Type10;
1499
+ reasoning: Reasoning;
1500
+ summary: Summary;
1501
+ signature: Signature;
1502
+ redacted: Redacted;
1503
+ }
1504
+ /**
1505
+ * Image content.
1506
+ */
1507
+ export interface ContentImage {
1508
+ internal: unknown;
1509
+ type: Type11;
1510
+ image: Image;
1511
+ detail: Detail;
1512
+ }
1513
+ /**
1514
+ * Audio content.
1515
+ */
1516
+ export interface ContentAudio {
1517
+ internal: unknown;
1518
+ type: Type12;
1519
+ audio: Audio;
1520
+ format: Format1;
1521
+ }
1522
+ /**
1523
+ * Video content.
1524
+ */
1525
+ export interface ContentVideo {
1526
+ internal: unknown;
1527
+ type: Type13;
1528
+ video: Video;
1529
+ format: Format2;
1530
+ }
1531
+ /**
1532
+ * Model internal.
1533
+ */
1534
+ export interface ContentData {
1535
+ internal: unknown;
1536
+ type: Type14;
1537
+ data: Data;
1538
+ }
1539
+ export interface Data {
1540
+ [k: string]: JsonValue;
1541
+ }
1542
+ /**
1543
+ * Server side tool use.
1544
+ */
1545
+ export interface ContentToolUse {
1546
+ internal: unknown;
1547
+ type: Type15;
1548
+ tool_type: ToolType;
1549
+ id: Id3;
1550
+ name: Name8;
1551
+ context: Context;
1552
+ arguments: Arguments;
1553
+ result: Result;
1554
+ error: Error;
1555
+ }
1556
+ /**
1557
+ * Document content (e.g. a PDF).
1558
+ */
1559
+ export interface ContentDocument {
1560
+ internal: unknown;
1561
+ type: Type16;
1562
+ document: Document;
1563
+ filename: Filename;
1564
+ mime_type: MimeType;
1565
+ }
1566
+ /**
1567
+ * User chat message.
1568
+ */
1569
+ export interface ChatMessageUser {
1570
+ id: Id4;
1571
+ content: Content1;
1572
+ source: Source1;
1573
+ metadata: Metadata10;
1574
+ role: Role1;
1575
+ tool_call_id: ToolCallId;
1576
+ }
1577
+ /**
1578
+ * Assistant chat message.
1579
+ */
1580
+ export interface ChatMessageAssistant {
1581
+ id: Id5;
1582
+ content: Content2;
1583
+ source: Source2;
1584
+ metadata: Metadata11;
1585
+ role: Role2;
1586
+ tool_calls: ToolCalls;
1587
+ model: Model2;
1588
+ }
1589
+ export interface ToolCall {
1590
+ id: Id6;
1591
+ function: Function;
1592
+ arguments: Arguments1;
1593
+ parse_error: ParseError;
1594
+ view: ToolCallContent | null;
1595
+ type: Type17;
1596
+ }
1597
+ export interface Arguments1 {
1598
+ [k: string]: unknown;
1599
+ }
1600
+ /**
1601
+ * Content to include in tool call view.
1602
+ */
1603
+ export interface ToolCallContent {
1604
+ title: Title3;
1605
+ format: Format3;
1606
+ content: Content3;
1607
+ }
1608
+ /**
1609
+ * Tool chat message.
1610
+ */
1611
+ export interface ChatMessageTool {
1612
+ id: Id7;
1613
+ content: Content4;
1614
+ source: Source3;
1615
+ metadata: Metadata12;
1616
+ role: Role3;
1617
+ tool_call_id: ToolCallId1;
1618
+ function: Function1;
1619
+ error: ToolCallError | null;
1620
+ }
1621
+ export interface ToolCallError {
1622
+ type: Type18;
1623
+ message: Message1;
1624
+ }
1625
+ /**
1626
+ * Output from model generation.
1627
+ */
1628
+ export interface ModelOutput {
1629
+ model: Model3;
1630
+ choices: Choices1;
1631
+ completion: Completion;
1632
+ usage: ModelUsage1 | null;
1633
+ time: Time;
1634
+ metadata: Metadata13;
1635
+ error: Error1;
1636
+ }
1637
+ /**
1638
+ * Choice generated for completion.
1639
+ */
1640
+ export interface ChatCompletionChoice {
1641
+ message: ChatMessageAssistant;
1642
+ stop_reason: StopReason;
1643
+ logprobs: Logprobs1 | null;
1644
+ }
1645
+ /**
1646
+ * Log probability information for a completion choice.
1647
+ */
1648
+ export interface Logprobs1 {
1649
+ content: Content5;
1650
+ }
1651
+ /**
1652
+ * Log probability for a token.
1653
+ */
1654
+ export interface Logprob {
1655
+ token: Token;
1656
+ logprob: Logprob1;
1657
+ bytes: Bytes;
1658
+ top_logprobs: TopLogprobs1;
1659
+ }
1660
+ /**
1661
+ * List of the most likely tokens and their log probability, at this token position.
1662
+ */
1663
+ export interface TopLogprob {
1664
+ token: Token1;
1665
+ logprob: Logprob2;
1666
+ bytes: Bytes1;
1667
+ }
1668
+ /**
1669
+ * Score generated by a scorer.
1670
+ */
1671
+ export interface Score {
1672
+ value: Value1;
1673
+ answer: Answer;
1674
+ explanation: Explanation;
1675
+ metadata: Metadata14;
1676
+ history: History;
1677
+ }
1678
+ /**
1679
+ * A single edit to a score.
1680
+ */
1681
+ export interface ScoreEdit {
1682
+ value: Value2;
1683
+ answer: Answer1;
1684
+ explanation: Explanation1;
1685
+ metadata: Metadata15;
1686
+ provenance: ProvenanceData | null;
1687
+ }
1688
+ export interface Metadata16 {
1689
+ [k: string]: unknown;
1690
+ }
1691
+ export interface Store {
1692
+ [k: string]: unknown;
1693
+ }
1694
+ /**
1695
+ * Beginning of processing a Sample.
1696
+ */
1697
+ export interface SampleInitEvent {
1698
+ uuid: Uuid;
1699
+ span_id: SpanId;
1700
+ timestamp: Timestamp1;
1701
+ working_start: WorkingStart;
1702
+ metadata: Metadata17;
1703
+ pending: Pending;
1704
+ event: Event;
1705
+ sample: Sample;
1706
+ state: JsonValue;
1707
+ }
1708
+ /**
1709
+ * Sample for an evaluation task.
1710
+ */
1711
+ export interface Sample {
1712
+ input: Input1;
1713
+ choices: Choices2;
1714
+ target: Target1;
1715
+ id: Id8;
1716
+ metadata: Metadata18;
1717
+ sandbox: SandboxEnvironmentSpec | null;
1718
+ files: Files1;
1719
+ setup: Setup1;
1720
+ }
1721
+ /**
1722
+ * The sample was unable to finish processing due to a limit
1723
+ */
1724
+ export interface SampleLimitEvent {
1725
+ uuid: Uuid1;
1726
+ span_id: SpanId1;
1727
+ timestamp: Timestamp2;
1728
+ working_start: WorkingStart1;
1729
+ metadata: Metadata19;
1730
+ pending: Pending1;
1731
+ event: Event1;
1732
+ type: Type19;
1733
+ message: Message2;
1734
+ limit: Limit1;
1735
+ }
1736
+ /**
1737
+ * Sandbox execution or I/O
1738
+ */
1739
+ export interface SandboxEvent {
1740
+ uuid: Uuid2;
1741
+ span_id: SpanId2;
1742
+ timestamp: Timestamp3;
1743
+ working_start: WorkingStart2;
1744
+ metadata: Metadata20;
1745
+ pending: Pending2;
1746
+ event: Event2;
1747
+ action: Action;
1748
+ cmd: Cmd;
1749
+ options: Options3;
1750
+ file: File;
1751
+ input: Input2;
1752
+ result: Result1;
1753
+ output: Output;
1754
+ completed: Completed;
1755
+ }
1756
+ /**
1757
+ * Change to the current `TaskState`
1758
+ */
1759
+ export interface StateEvent {
1760
+ uuid: Uuid3;
1761
+ span_id: SpanId3;
1762
+ timestamp: Timestamp4;
1763
+ working_start: WorkingStart3;
1764
+ metadata: Metadata21;
1765
+ pending: Pending3;
1766
+ event: Event3;
1767
+ changes: Changes;
1768
+ }
1769
+ /**
1770
+ * Describes a change to data using JSON Patch format.
1771
+ */
1772
+ export interface JsonChange {
1773
+ op: Op;
1774
+ path: Path;
1775
+ from: From;
1776
+ value: {
1777
+ [k: string]: unknown;
1778
+ };
1779
+ replaced: {
1780
+ [k: string]: unknown;
1781
+ };
1782
+ }
1783
+ /**
1784
+ * Change to data within the current `Store`.
1785
+ */
1786
+ export interface StoreEvent {
1787
+ uuid: Uuid4;
1788
+ span_id: SpanId4;
1789
+ timestamp: Timestamp5;
1790
+ working_start: WorkingStart4;
1791
+ metadata: Metadata22;
1792
+ pending: Pending4;
1793
+ event: Event4;
1794
+ changes: Changes1;
1795
+ }
1796
+ /**
1797
+ * Call to a language model.
1798
+ */
1799
+ export interface ModelEvent {
1800
+ uuid: Uuid5;
1801
+ span_id: SpanId5;
1802
+ timestamp: Timestamp6;
1803
+ working_start: WorkingStart5;
1804
+ metadata: Metadata23;
1805
+ pending: Pending5;
1806
+ event: Event5;
1807
+ model: Model4;
1808
+ role: Role4;
1809
+ input: Input3;
1810
+ input_refs: InputRefs;
1811
+ tools: Tools1;
1812
+ tool_choice: ToolChoice;
1813
+ config: GenerateConfig;
1814
+ output: ModelOutput;
1815
+ retries: Retries;
1816
+ error: Error2;
1817
+ traceback: Traceback1;
1818
+ traceback_ansi: TracebackAnsi1;
1819
+ cache: Cache1;
1820
+ call: ModelCall | null;
1821
+ completed: Completed1;
1822
+ working_time: WorkingTime;
1823
+ }
1824
+ /**
1825
+ * Specification of a tool (JSON Schema compatible)
1826
+ *
1827
+ * If you are implementing a ModelAPI, most LLM libraries can
1828
+ * be passed this object (dumped to a dict) directly as a function
1829
+ * specification. For example, in the OpenAI provider:
1830
+ *
1831
+ * ```python
1832
+ * ChatCompletionToolParam(
1833
+ * type="function",
1834
+ * function=tool.model_dump(exclude_none=True),
1835
+ * )
1836
+ * ```
1837
+ *
1838
+ * In some cases the field names don't match up exactly. In that case
1839
+ * call `model_dump()` on the `parameters` field. For example, in the
1840
+ * Anthropic provider:
1841
+ *
1842
+ * ```python
1843
+ * ToolParam(
1844
+ * name=tool.name,
1845
+ * description=tool.description,
1846
+ * input_schema=tool.parameters.model_dump(exclude_none=True),
1847
+ * )
1848
+ * ```
1849
+ */
1850
+ export interface ToolInfo {
1851
+ name: Name9;
1852
+ description: Description2;
1853
+ parameters: ToolParams;
1854
+ options: Options4;
1855
+ }
1856
+ /**
1857
+ * Description of tool parameters object in JSON Schema format.
1858
+ */
1859
+ export interface ToolParams {
1860
+ type: Type20;
1861
+ properties: Properties1;
1862
+ required: Required1;
1863
+ additionalProperties: Additionalproperties1;
1864
+ }
1865
+ export interface Properties1 {
1866
+ [k: string]: JSONSchema;
1867
+ }
1868
+ export interface ToolFunction {
1869
+ name: Name10;
1870
+ }
1871
+ /**
1872
+ * Model call (raw request/response data).
1873
+ */
1874
+ export interface ModelCall {
1875
+ request: Request;
1876
+ response: Response;
1877
+ error: Error3;
1878
+ time: Time1;
1879
+ call_refs: CallRefs;
1880
+ call_key: CallKey;
1881
+ }
1882
+ export interface Request {
1883
+ [k: string]: JsonValue;
1884
+ }
1885
+ /**
1886
+ * Call to a tool.
1887
+ */
1888
+ export interface ToolEvent {
1889
+ uuid: Uuid6;
1890
+ span_id: SpanId6;
1891
+ timestamp: Timestamp7;
1892
+ working_start: WorkingStart6;
1893
+ metadata: Metadata24;
1894
+ pending: Pending6;
1895
+ event: Event6;
1896
+ type: Type21;
1897
+ id: Id9;
1898
+ function: Function2;
1899
+ arguments: Arguments2;
1900
+ view: ToolCallContent | null;
1901
+ result: Result2;
1902
+ truncated: Truncated;
1903
+ error: ToolCallError | null;
1904
+ events: Events1;
1905
+ completed: Completed2;
1906
+ working_time: WorkingTime1;
1907
+ agent: Agent;
1908
+ agent_span_id: AgentSpanId;
1909
+ failed: Failed;
1910
+ message_id: MessageId;
1911
+ }
1912
+ export interface Arguments2 {
1913
+ [k: string]: JsonValue;
1914
+ }
1915
+ /**
1916
+ * Tool approval.
1917
+ */
1918
+ export interface ApprovalEvent {
1919
+ uuid: Uuid7;
1920
+ span_id: SpanId7;
1921
+ timestamp: Timestamp8;
1922
+ working_start: WorkingStart7;
1923
+ metadata: Metadata25;
1924
+ pending: Pending7;
1925
+ event: Event7;
1926
+ message: Message3;
1927
+ call: ToolCall;
1928
+ view: ToolCallView | null;
1929
+ approver: Approver;
1930
+ decision: Decision;
1931
+ modified: ToolCall | null;
1932
+ explanation: Explanation2;
1933
+ }
1934
+ /**
1935
+ * Custom view of a tool call.
1936
+ *
1937
+ * Both `context` and `call` are optional. If `call` is not specified
1938
+ * then the view will default to a syntax highlighted Python function call.
1939
+ */
1940
+ export interface ToolCallView {
1941
+ context: ToolCallContent | null;
1942
+ call: ToolCallContent | null;
1943
+ }
1944
+ /**
1945
+ * Compaction of conversation history.
1946
+ */
1947
+ export interface CompactionEvent {
1948
+ uuid: Uuid8;
1949
+ span_id: SpanId8;
1950
+ timestamp: Timestamp9;
1951
+ working_start: WorkingStart8;
1952
+ metadata: Metadata26;
1953
+ pending: Pending8;
1954
+ event: Event8;
1955
+ type: Type22;
1956
+ tokens_before: TokensBefore;
1957
+ tokens_after: TokensAfter;
1958
+ source: Source4;
1959
+ }
1960
+ /**
1961
+ * Input screen interaction.
1962
+ */
1963
+ export interface InputEvent {
1964
+ uuid: Uuid9;
1965
+ span_id: SpanId9;
1966
+ timestamp: Timestamp10;
1967
+ working_start: WorkingStart9;
1968
+ metadata: Metadata27;
1969
+ pending: Pending9;
1970
+ event: Event9;
1971
+ input: Input4;
1972
+ input_ansi: InputAnsi;
1973
+ }
1974
+ /**
1975
+ * Event with score.
1976
+ *
1977
+ * Can be the final score for a `Sample`, or can be an intermediate score
1978
+ * resulting from a call to `score`.
1979
+ */
1980
+ export interface ScoreEvent {
1981
+ uuid: Uuid10;
1982
+ span_id: SpanId10;
1983
+ timestamp: Timestamp11;
1984
+ working_start: WorkingStart10;
1985
+ metadata: Metadata28;
1986
+ pending: Pending10;
1987
+ event: Event10;
1988
+ score: Score;
1989
+ target: Target2;
1990
+ intermediate: Intermediate;
1991
+ model_usage: ModelUsage2;
1992
+ role_usage: RoleUsage1;
1993
+ }
1994
+ /**
1995
+ * Event recorded when a score is edited.
1996
+ */
1997
+ export interface ScoreEditEvent {
1998
+ uuid: Uuid11;
1999
+ span_id: SpanId11;
2000
+ timestamp: Timestamp12;
2001
+ working_start: WorkingStart11;
2002
+ metadata: Metadata29;
2003
+ pending: Pending11;
2004
+ event: Event11;
2005
+ score_name: ScoreName;
2006
+ edit: ScoreEdit;
2007
+ }
2008
+ /**
2009
+ * Event with sample error.
2010
+ */
2011
+ export interface ErrorEvent {
2012
+ uuid: Uuid12;
2013
+ span_id: SpanId12;
2014
+ timestamp: Timestamp13;
2015
+ working_start: WorkingStart12;
2016
+ metadata: Metadata30;
2017
+ pending: Pending12;
2018
+ event: Event12;
2019
+ error: EvalError;
2020
+ }
2021
+ /**
2022
+ * Log message recorded with Python logger.
2023
+ */
2024
+ export interface LoggerEvent {
2025
+ uuid: Uuid13;
2026
+ span_id: SpanId13;
2027
+ timestamp: Timestamp14;
2028
+ working_start: WorkingStart13;
2029
+ metadata: Metadata31;
2030
+ pending: Pending13;
2031
+ event: Event13;
2032
+ message: LoggingMessage;
2033
+ }
2034
+ /**
2035
+ * Message written to Python log.
2036
+ */
2037
+ export interface LoggingMessage {
2038
+ name: Name11;
2039
+ level: Level;
2040
+ message: Message4;
2041
+ created: Created1;
2042
+ filename: Filename1;
2043
+ module: Module;
2044
+ lineno: Lineno;
2045
+ }
2046
+ /**
2047
+ * Event with custom info/data.
2048
+ */
2049
+ export interface InfoEvent {
2050
+ uuid: Uuid14;
2051
+ span_id: SpanId14;
2052
+ timestamp: Timestamp15;
2053
+ working_start: WorkingStart14;
2054
+ metadata: Metadata32;
2055
+ pending: Pending14;
2056
+ event: Event14;
2057
+ source: Source5;
2058
+ data: JsonValue;
2059
+ }
2060
+ /**
2061
+ * Mark the beginning of a transcript span.
2062
+ */
2063
+ export interface SpanBeginEvent {
2064
+ uuid: Uuid15;
2065
+ span_id: SpanId15;
2066
+ timestamp: Timestamp16;
2067
+ working_start: WorkingStart15;
2068
+ metadata: Metadata33;
2069
+ pending: Pending15;
2070
+ event: Event15;
2071
+ id: Id10;
2072
+ parent_id: ParentId;
2073
+ type: Type23;
2074
+ name: Name12;
2075
+ }
2076
+ /**
2077
+ * Mark the end of a transcript span.
2078
+ */
2079
+ export interface SpanEndEvent {
2080
+ uuid: Uuid16;
2081
+ span_id: SpanId16;
2082
+ timestamp: Timestamp17;
2083
+ working_start: WorkingStart16;
2084
+ metadata: Metadata34;
2085
+ pending: Pending16;
2086
+ event: Event16;
2087
+ id: Id11;
2088
+ }
2089
+ /**
2090
+ * Step within current sample or subtask.
2091
+ */
2092
+ export interface StepEvent {
2093
+ uuid: Uuid17;
2094
+ span_id: SpanId17;
2095
+ timestamp: Timestamp18;
2096
+ working_start: WorkingStart17;
2097
+ metadata: Metadata35;
2098
+ pending: Pending17;
2099
+ event: Event17;
2100
+ action: Action1;
2101
+ type: Type24;
2102
+ name: Name13;
2103
+ }
2104
+ /**
2105
+ * Subtask spawned.
2106
+ */
2107
+ export interface SubtaskEvent {
2108
+ uuid: Uuid18;
2109
+ span_id: SpanId18;
2110
+ timestamp: Timestamp19;
2111
+ working_start: WorkingStart18;
2112
+ metadata: Metadata36;
2113
+ pending: Pending18;
2114
+ event: Event18;
2115
+ name: Name14;
2116
+ type: Type25;
2117
+ input: Input5;
2118
+ result: Result3;
2119
+ events: Events2;
2120
+ completed: Completed3;
2121
+ working_time: WorkingTime2;
2122
+ }
2123
+ export interface Input5 {
2124
+ [k: string]: unknown;
2125
+ }
2126
+ export interface Result3 {
2127
+ [k: string]: unknown;
2128
+ }
2129
+ /**
2130
+ * A named timeline view over a transcript.
2131
+ *
2132
+ * Multiple timelines allow different interpretations of the same event
2133
+ * stream — e.g. a default agent-centric view alongside an alternative
2134
+ * grouping or filtered view.
2135
+ */
2136
+ export interface Timeline {
2137
+ name: Name15;
2138
+ description: Description3;
2139
+ root: TimelineSpan;
2140
+ }
2141
+ /**
2142
+ * A span of execution — agent, scorer, tool, or root.
2143
+ */
2144
+ export interface TimelineSpan {
2145
+ type: Type26;
2146
+ id: Id12;
2147
+ name: Name16;
2148
+ span_type: SpanType;
2149
+ content: Content6;
2150
+ branches: Branches;
2151
+ description: Description4;
2152
+ utility: Utility;
2153
+ agent_result: AgentResult;
2154
+ outline: Outline | null;
2155
+ }
2156
+ /**
2157
+ * Wraps a single Event.
2158
+ */
2159
+ export interface TimelineEvent {
2160
+ type: Type27;
2161
+ event: Event19;
2162
+ }
2163
+ /**
2164
+ * A discarded alternative path from a branch point.
2165
+ */
2166
+ export interface TimelineBranch {
2167
+ type: Type28;
2168
+ forked_at: ForkedAt;
2169
+ content: Content7;
2170
+ }
2171
+ /**
2172
+ * Hierarchical outline of events for an agent.
2173
+ */
2174
+ export interface Outline {
2175
+ nodes: Nodes;
2176
+ }
2177
+ /**
2178
+ * A node in an agent's outline, referencing an event by UUID.
2179
+ */
2180
+ export interface OutlineNode {
2181
+ event: Event20;
2182
+ children: Children;
2183
+ }
2184
+ export interface ModelUsage3 {
2185
+ [k: string]: ModelUsage1;
2186
+ }
2187
+ export interface RoleUsage2 {
2188
+ [k: string]: ModelUsage1;
2189
+ }
2190
+ export interface Attachments {
2191
+ [k: string]: string;
2192
+ }
2193
+ /**
2194
+ * Limit encountered by sample.
2195
+ */
2196
+ export interface EvalSampleLimit {
2197
+ type: Type29;
2198
+ limit: Limit2;
2199
+ }
2200
+ /**
2201
+ * Score reductions.
2202
+ */
2203
+ export interface EvalSampleReductions {
2204
+ scorer: Scorer1;
2205
+ reducer: Reducer1;
2206
+ samples: Samples2;
2207
+ }
2208
+ /**
2209
+ * Score and sample_id scored.
2210
+ */
2211
+ export interface EvalSampleScore {
2212
+ value: Value3;
2213
+ answer: Answer2;
2214
+ explanation: Explanation3;
2215
+ metadata: Metadata37;
2216
+ history: History1;
2217
+ sample_id: SampleId1;
2218
+ }
2219
+ export interface EvalSet {
2220
+ eval_set_id: EvalSetId1;
2221
+ tasks: Tasks;
2222
+ }
2223
+ export interface EvalSetTask {
2224
+ name: Name17;
2225
+ task_id: TaskId1;
2226
+ task_file: TaskFile1;
2227
+ task_args: TaskArgs1;
2228
+ model: Model5;
2229
+ model_args: ModelArgs1;
2230
+ model_roles: ModelRoles1;
2231
+ sequence: Sequence;
2232
+ }
2233
+ export interface TaskArgs1 {
2234
+ [k: string]: unknown;
2235
+ }
2236
+ export interface ModelArgs1 {
2237
+ [k: string]: unknown;
2238
+ }
data/conda_envs/evalclaw/lib/python3.11/site-packages/inspect_ai/_view/www/src/@types/markdown-it-mathjax3.d.ts ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ declare module "markdown-it-mathjax3" {
2
+ import MarkdownIt from "markdown-it";
3
+
4
+ interface MathjaxOptions {
5
+ tex?: {
6
+ inlineMath?: [string, string][];
7
+ displayMath?: [string, string][];
8
+ tags?: string;
9
+ tagSide?: string;
10
+ tagIndent?: string;
11
+ useLabelIds?: boolean;
12
+ multlineWidth?: string;
13
+ maxMacros?: number;
14
+ maxBuffer?: number;
15
+ };
16
+ svg?: {
17
+ fontCache?: string;
18
+ localID?: string | null;
19
+ };
20
+ chtml?: {
21
+ scale?: number;
22
+ minScale?: number;
23
+ matchFontHeight?: boolean;
24
+ fontURL?: string;
25
+ };
26
+ startup?: {
27
+ typeset?: boolean;
28
+ ready?: () => void;
29
+ };
30
+ }
31
+
32
+ const markdownItMathjax3: (md: MarkdownIt, options?: MathjaxOptions) => void;
33
+
34
+ export default markdownItMathjax3;
35
+ }
data/conda_envs/evalclaw/lib/python3.11/site-packages/inspect_ai/_view/www/src/@types/prism.d.ts ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ declare var Prism: {
2
+ languages: any;
3
+ highlight(contents: any, tokens: any, type: any): string;
4
+ highlightElement(
5
+ element: HTMLElement,
6
+ async?: boolean,
7
+ callback?: (element: HTMLElement) => void,
8
+ );
9
+
10
+ highlightAllUnder(
11
+ element: HTMLElement,
12
+ async?: boolean,
13
+ callback?: (element: HTMLElement) => void,
14
+ );
15
+ };
data/conda_envs/evalclaw/lib/python3.11/site-packages/inspect_ai/_view/www/src/app/App.css ADDED
@@ -0,0 +1,1300 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ :root {
2
+ --bs-border-radius: 3px;
3
+ --bs-border-radius-lg: 4px;
4
+ --bs-popover-max-width: 50%;
5
+ --bs-code-color: #8b0000;
6
+ --inspect-find-background: var(--bs-body-bg);
7
+ --inspect-find-foreground: var(--bs-body-color);
8
+ --inspect-input-background: var(--bs-body-bg);
9
+ --inspect-input-foreground: var(--bs-body-color);
10
+ --inspect-input-border: var(--bs-light-border-subtle);
11
+ --inspect-diff-add-color: #dafbe1;
12
+ --inspect-diff-remove-color: #ffebe9;
13
+ --inspect-inactive-selection-background: var(
14
+ --vscode-editor-inactiveSelectionBackground,
15
+ #d9d9d9
16
+ );
17
+ --inspect-active-selection-background: var(
18
+ --vscode-editor-selectionBackground,
19
+ #d7d4f0
20
+ );
21
+ --inspect-focus-border-color: #86b7fe;
22
+ --inspect-focus-border-shadow: 0 0 0 0.25rem rgba(var(--bs-primary-rgb), 0.25);
23
+ --inspect-focus-border-gray-color: #808080;
24
+ --inspect-focus-border-gray-shadow: 0 0 0 0.25rem rgba(48, 48, 48, 0.25);
25
+
26
+ /* Inspect Font Sizes */
27
+ --inspect-font-size-title: 1.5rem;
28
+ --inspect-font-size-title-secondary: 1.3rem;
29
+ --inspect-font-size-largest: 1.2rem;
30
+ --inspect-font-size-larger: 1.1rem;
31
+ --inspect-font-size-large: 1rem;
32
+ --inspect-font-size-base: 0.9rem;
33
+ --inspect-font-size-small: 0.8rem;
34
+ --inspect-font-size-smaller: 0.8rem;
35
+ --inspect-font-size-smallest: 0.7rem;
36
+ --inspect-font-size-smallestest: 0.6rem;
37
+
38
+ /* Inspect Glass */
39
+ --inspect-glass-color: #000000;
40
+ --inspect-glass-opacity: 0.3;
41
+
42
+ --inspect-event-panel-sticky-top: 30px;
43
+ --inspect-event-panel-sticky-margin: -5px -10px -5px 0;
44
+ --inspect-event-panel-sticky-stuck-margin-left: -22px;
45
+ --inspect-event-panel-sticky-stuck-margin-right: -10px;
46
+ }
47
+
48
+ body:not([class^="vscode-"]) button {
49
+ --bs-nav-pills-link-active-bg: #e3eaf1;
50
+ --bs-nav-pills-link-active-color: black;
51
+ --bs-nav-link-color: black;
52
+ }
53
+
54
+ /* AG Grid Theming */
55
+ body {
56
+ --ag-background-color: var(--bs-body-bg);
57
+ --ag-foreground-color: var(--bs-body-color);
58
+ --ag-header-background-color: var(--bs-light-bg);
59
+ --ag-header-font-size: var(--inspect-font-size-small);
60
+ --ag-header-font-weight: 500;
61
+ --ag-header-text-color: var(--bs-secondary);
62
+
63
+ --ag-font-family: var(--bs-body-font-family);
64
+ --ag-wrapper-border: none;
65
+ --ag-row-hover-color: var(--bs-secondary-bg-subtle);
66
+ --ag-selected-row-background-color: var(--bs-secondary-bg-subtle);
67
+ }
68
+
69
+ #app {
70
+ height: 100vh;
71
+ overflow-y: hidden;
72
+ }
73
+
74
+ .app-main-grid {
75
+ display: grid;
76
+ height: 100vh;
77
+ overflow-y: hidden;
78
+ grid-template-rows: max-content max-content 1fr;
79
+ }
80
+
81
+ a {
82
+ color: var(--bs-link-color);
83
+ }
84
+
85
+ a:hover {
86
+ color: var(--bs-link-hover-color);
87
+ }
88
+
89
+ .modal {
90
+ --bs-modal-margin: 0.25rem;
91
+ }
92
+
93
+ li > p {
94
+ margin-bottom: 0;
95
+ }
96
+
97
+ li > ol,
98
+ li > ul {
99
+ margin-bottom: 0.5rem;
100
+ }
101
+
102
+ .modal-backdrop {
103
+ --bs-backdrop-opacity: 0.4;
104
+ }
105
+
106
+ .app-main-grid.single-file-mode {
107
+ grid-template-rows: max-content max-content 1fr;
108
+ }
109
+
110
+ /* Inspect Text Styles */
111
+ .text-style-label {
112
+ text-transform: uppercase !important;
113
+ }
114
+
115
+ .text-style-secondary {
116
+ color: var(--bs-secondary) !important;
117
+ }
118
+
119
+ .text-style-tertiary {
120
+ color: var(--bs-tertiary-color) !important;
121
+ }
122
+
123
+ /* Inspect Font Size Styles */
124
+ .text-size-title {
125
+ font-size: var(--inspect-font-size-title) !important;
126
+ }
127
+
128
+ .text-size-title-secondary {
129
+ font-size: var(--inspect-font-size-title-secondary) !important;
130
+ }
131
+
132
+ .text-size-largest {
133
+ font-size: var(--inspect-font-size-largest) !important;
134
+ }
135
+
136
+ .text-size-larger {
137
+ font-size: var(--inspect-font-size-larger) !important;
138
+ }
139
+
140
+ .text-size-large {
141
+ font-size: var(--inspect-font-size-large) !important;
142
+ }
143
+
144
+ .text-size-base {
145
+ font-size: var(--inspect-font-size-base) !important;
146
+ }
147
+
148
+ .text-size-small {
149
+ font-size: var(--inspect-font-size-small) !important;
150
+ }
151
+
152
+ .text-size-smaller {
153
+ font-size: var(--inspect-font-size-smaller) !important;
154
+ }
155
+
156
+ .text-size-smallest {
157
+ font-size: var(--inspect-font-size-smallest) !important;
158
+ }
159
+
160
+ .text-size-smallestest {
161
+ font-size: var(--inspect-font-size-smallestest) !important;
162
+ }
163
+
164
+ .text-truncate {
165
+ white-space: nowrap;
166
+ text-overflow: ellipsis;
167
+ overflow: hidden;
168
+ }
169
+
170
+ .three-line-clamp {
171
+ display: -webkit-box;
172
+ -webkit-line-clamp: 3;
173
+ -webkit-box-orient: vertical;
174
+ overflow: hidden;
175
+ max-height: calc(3em * var(--bs-body-line-height));
176
+ }
177
+
178
+ body[class^="vscode-"] {
179
+ --bs-border-radius: 0;
180
+ --bs-border-radius-lg: 0;
181
+ --bs-body-bg: var(--vscode-editor-background);
182
+ --bs-secondary-bg-subtle: var(--vscode-editorHoverWidget-background);
183
+ --bs-card-bg: var(--vscode-editor-background);
184
+ --bs-table-bg: var(--vscode-editor-background);
185
+ --bs-light-bg-subtle: var(--vscode-sideBar-background);
186
+ --bs-light-border-subtle: var(--vscode-editorHoverWidget-border);
187
+ --bs-body-color: var(--vscode-editor-foreground);
188
+ --bs-table-color: var(--vscode-editor-foreground);
189
+ --bs-accordion-btn-color: var(--vscode-editor-foreground);
190
+ --bs-emphasis-color: var(--vscode-editor-foreground);
191
+ --bs-navbar-brand-color: var(--vscode-editor-foreground);
192
+ --bs-navbar-brand-hover-color: var(--vscode-editor-foreground);
193
+ --bs-code-color: var(--vscode-editorInfo-foreground);
194
+ --bs-light: var(--vscode-sideBar-background);
195
+ --bs-btn-bg: var(--vscode-peekViewTitle-background);
196
+ --bs-primary: var(--vscode-banner-iconForeground);
197
+ --bs-nav-pills-link-active-bg: var(--vscode-banner-iconForeground);
198
+ --bs-link-color: var(--vscode-textLink-foreground);
199
+ --bs-link-hover-color: var(--vscode-textLink-activeForeground);
200
+ --bs-secondary: var(--vscode-breadcrumb-foreground);
201
+ --bs-secondary-bg: var(--vscode-list-inactiveSelectionBackground);
202
+ --bs-border-color: var(--vscode-editorGroup-border);
203
+ --bs-card-border-color: var(--vscode-editorGroup-border);
204
+ --bs-warning-bg-subtle: var(--vscode-inputValidation-warningBackground);
205
+ --bs-warning-text-emphasis: var(--vscode-input-foreground);
206
+ --bs-breadcrumb-divider-color: var(--vscode-foreground);
207
+ --inspect-find-background: var(--vscode-editorWidget-background);
208
+ --inspect-find-foreground: var(--vscode-editorWidget-foreground);
209
+ --inspect-input-background: var(--vscode-input-background);
210
+ --inspect-input-foreground: var(--vscode-input-foreground);
211
+ --inspect-input-border: var(--vscode-input-border);
212
+ --inspect-diff-add-color: var(--vscode-diffEditor-insertedTextBackground);
213
+ --inspect-diff-remove-color: var(--vscode-diffEditor-removedTextBackground);
214
+ --inspect-glass-color: var(--vscode-editor-foreground);
215
+ --inspect-glass-opacity: 0.15;
216
+ --inspect-event-panel-sticky-top: 25px;
217
+ --inspect-event-panel-sticky-margin: 0px -10px -5px 0;
218
+ --inspect-event-panel-sticky-stuck-margin-left: -19px;
219
+ --inspect-event-panel-sticky-stuck-margin-right: -10px;
220
+ }
221
+
222
+ html.vscode {
223
+ font-size: 13px;
224
+ }
225
+
226
+ html.vscode .sample-input {
227
+ line-height: 1.3em;
228
+ -webkit-line-clamp: 4 !important;
229
+ }
230
+
231
+ body[class^="vscode-"] .modal-backdrop {
232
+ --bs-backdrop-opacity: 0.15;
233
+ --bs-backdrop-bg: var(--vscode-editor-foreground);
234
+ }
235
+
236
+ body[class^="vscode-"] code {
237
+ background-color: transparent;
238
+ }
239
+
240
+ body[class^="vscode-"] .popover.rendered-content,
241
+ body[class^="vscode-"] .modal-dialog {
242
+ border: solid 1px var(--bs-border-color);
243
+ }
244
+
245
+ body[class^="vscode-"] .popover-arrow::before {
246
+ border-left-color: var(--bs-border-color) !important;
247
+ }
248
+
249
+ body[class^="vscode-"]
250
+ [data-popper-placement^="bottom"]
251
+ > .popper-arrow-container
252
+ > div,
253
+ body[class^="vscode-"]
254
+ [data-popper-placement^="left"]
255
+ > .popper-arrow-container
256
+ > div,
257
+ body[class^="vscode-"]
258
+ [data-popper-placement^="right"]
259
+ > .popper-arrow-container
260
+ > div {
261
+ border-color: transparent transparent var(--bs-card-border-color) !important;
262
+ }
263
+
264
+ body[class^="vscode-"] .modal-content {
265
+ background-clip: unset;
266
+ }
267
+
268
+ body[class^="vscode-"] .multi-score-label {
269
+ margin-bottom: 5px;
270
+ }
271
+
272
+ body[class^="vscode-"] {
273
+ min-width: 400px;
274
+ }
275
+
276
+ body[class^="vscode-"] .navbar-brand {
277
+ font-size: 1.1em;
278
+ }
279
+ body[class^="vscode-"] .navbar-brand > div {
280
+ margin-top: -0.2rem !important;
281
+ }
282
+
283
+ body[class^="vscode-"] .task-title {
284
+ margin-top: 0.4em;
285
+ }
286
+
287
+ body[class^="vscode-"] .task-model {
288
+ margin-top: 0.2rem;
289
+ font-size: 0.9rem;
290
+ }
291
+
292
+ body[class^="vscode-"] .accordion-button::after {
293
+ --bs-accordion-btn-icon: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='black'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
294
+ background: white;
295
+ mask-image: var(--bs-accordion-btn-icon);
296
+ }
297
+
298
+ .copy-button i.bi,
299
+ body[class^="vscode-"] .navbar-text i.bi {
300
+ color: var(--vscode-editor-foreground);
301
+ }
302
+
303
+ body[class^="vscode-"] .btn-tools {
304
+ --bs-btn-hover-bg: var(--vscode-peekViewTitle-background);
305
+ --bs-btn-bg: var(--vscode-peekViewTitle-background);
306
+ --bs-btn-border-color: var(--vscode-peekViewTitle-background);
307
+ --bs-btn-hover-border-color: var(--vscode-peekViewTitle-background);
308
+ --bs-btn-color: var(--vscode-peekViewTitleDescription-foreground);
309
+ --bs-btn-hover-color: var(--vscode-peekViewTitleDescription-foreground);
310
+ }
311
+
312
+ body[class^="vscode-"] .btn-primary {
313
+ --bs-btn-bg: var(--vscode-button-background);
314
+ --bs-btn-border-color: var(--vscode-button-background);
315
+ --bs-btn-hover-bg: var(--vscode-button-hoverBackground);
316
+ --bs-btn-hover-border-color: var(--vscode-button-hoverBackground);
317
+ --bs-btn-color: var(--vscode-button-foreground);
318
+ --bs-btn-hover-color: var(--vscode-button-foreground);
319
+ --bs-btn-disabled-color: var(--vscode-button-foreground);
320
+ --bs-btn-disabled-bg: var(--vscode-button-background);
321
+ --bs-btn-disabled-border-color: var(--vscode-button-background);
322
+ --bs-btn-disabled-opacity: 0.8;
323
+ }
324
+
325
+ body[class^="vscode-"] .navbar-brand {
326
+ --bs-navbar-brand-color: var(--vscode-sideBarSectionHeader-foreground);
327
+ --bs-navbar-brand-hover-color: var(--vscode-sideBarSectionHeader-foreground);
328
+ }
329
+
330
+ body[class^="vscode-"] .navbar-text {
331
+ --bs-navbar-color: var(--vscode-sideBarSectionHeader-foreground);
332
+ }
333
+
334
+ body[class^="vscode-"] .accordion-item {
335
+ --bs-accordion-active-bg: var(--vscode-list-inactiveSelectionBackground);
336
+ }
337
+
338
+ body[class^="vscode-"] .card-header {
339
+ --bs-border-color: var(--vscode-editorGroup-border);
340
+ --bs-card-border-color: var(--vscode-editorGroup-border);
341
+ }
342
+
343
+ body[class^="vscode-"] .card {
344
+ --bs-border-color: var(--vscode-editorGroup-border);
345
+ --bs-card-border-color: var(--vscode-editorGroup-border);
346
+ }
347
+
348
+ body[class^="vscode-"] .nav-pills {
349
+ --bs-nav-pills-link-active-bg: var(--vscode-notifications-background);
350
+ --bs-nav-pills-link-active-color: var(--vscode-notifications-foreground);
351
+ }
352
+
353
+ body[class^="vscode-"] .nav-link {
354
+ --bs-nav-link-color: var(--vscode-notificationLink-foreground);
355
+ --bs-link-hover-color: var(--vscode-notificationLink-foreground);
356
+ }
357
+
358
+ body[class^="vscode-"] .nav-link:hover {
359
+ --bs-nav-link-color: var(--vscode-notificationLink-foreground);
360
+ --bs-nav-link-hover-color: var(--vscode-notificationLink-foreground);
361
+ --bs-nav-tabs-link-hover-border-color: var(
362
+ --vscode-notificationLink-foreground
363
+ );
364
+ }
365
+
366
+ body[class^="vscode-"] .ansi-display {
367
+ --ansiBlack: var(--vscode-terminal-ansiBlack);
368
+ --ansiRed: var(--vscode-terminal-ansiRed);
369
+ --ansiGreen: var(--vscode-terminal-ansiGreen);
370
+ --ansiYellow: var(--vscode-terminal-ansiYellow);
371
+ --ansiBlue: var(--vscode-terminal-ansiBlue);
372
+ --ansiMagenta: var(--vscode-terminal-ansiMagenta);
373
+ --ansiCyan: var(--vscode-terminal-ansiCyan);
374
+ --ansiWhite: var(--vscode-terminal-ansiWhite);
375
+ --ansiBrightBlack: var(--vscode-terminal-ansiBrightBlack);
376
+ --ansiBrightRed: var(--vscode-terminal-ansiBrightRed);
377
+ --ansiBrightGreen: var(--vscode-terminal-ansiBrightGreen);
378
+ --ansiBrightYellow: var(--vscode-terminal-ansiBrightYellow);
379
+ --ansiBrightBlue: var(--vscode-terminal-ansiBrightBlue);
380
+ --ansiBrightMagenta: var(--vscode-terminal-ansiBrightMagenta);
381
+ --ansiBrightCyan: var(--vscode-terminal-ansiBrightCyan);
382
+ --ansiBrightWhite: var(--vscode-terminal-ansiBrightWhite);
383
+ }
384
+
385
+ body[class^="vscode-"] .sidebar .list-group {
386
+ --bs-tertiary-bg: var(--vscode-list-hoverBackground);
387
+ --bs-secondary-color: var(--vscode-foreground);
388
+ --bs-list-group-active-bg: var(--vscode-sideBarSectionHeader-background);
389
+ --bs-list-group-active-border-color: var(
390
+ --vscode-sideBarSectionHeader-background
391
+ );
392
+ --bs-list-group-action-active-bg: var(
393
+ --vscode-sideBarSectionHeader-background
394
+ );
395
+ --bs-list-group-active-color: var(--vscode-sideBarSectionHeader-foreground);
396
+ }
397
+
398
+ body[class^="vscode-"] .breadcrumb-item {
399
+ --bs-breadcrumb-divider-color: var(--vscode-foreground);
400
+ }
401
+
402
+ body[class^="vscode-"] div.ap-control-bar .ap-fullscreen-button {
403
+ display: none;
404
+ }
405
+
406
+ :root {
407
+ --bs-navbar-padding-y: 0;
408
+ --bs-navbar-brand-padding-y: 0;
409
+ --sidebar-width: 550px;
410
+ }
411
+
412
+ body {
413
+ margin: 0;
414
+ padding: 0;
415
+ }
416
+
417
+ .navbar {
418
+ padding-top: 0;
419
+ padding-bottom: 0;
420
+ background-color: var(--bs-light);
421
+ top: 0;
422
+ }
423
+
424
+ .navbar-title-grid {
425
+ display: grid;
426
+ grid-template-columns: minmax(350px, 1fr) 1fr;
427
+ width: 100%;
428
+ }
429
+
430
+ @media (max-width: 575px) {
431
+ .navbar .vertical-metric-label {
432
+ font-size: 0.7rem !important;
433
+ }
434
+ }
435
+
436
+ @media (max-width: 575px) {
437
+ .tab-tools select {
438
+ width: 50px;
439
+ }
440
+ }
441
+
442
+ @media (max-width: 575px) {
443
+ .navbar .vertical-metric-value {
444
+ margin-top: 0.2rem !important;
445
+ font-size: 0.9rem !important;
446
+ }
447
+ }
448
+
449
+ @media (max-width: 575px) {
450
+ .navbar-title-grid {
451
+ grid-template-columns: 1fr auto-fill;
452
+ }
453
+ }
454
+
455
+ [data-bs-theme="dark"] .navbar {
456
+ background-color: unset;
457
+ }
458
+
459
+ .navbar-brand {
460
+ font-weight: 400;
461
+ font-size: 1.4em;
462
+ }
463
+
464
+ .navbar-text {
465
+ padding-top: 0px;
466
+ padding-bottom: 0px;
467
+ }
468
+
469
+ #sidebarToggle > i.bi {
470
+ font-size: 1.5em;
471
+ }
472
+
473
+ .nav-link.active {
474
+ border-bottom-width: 0 !important;
475
+ }
476
+
477
+ .workspace {
478
+ display: flex;
479
+ flex-direction: column;
480
+ }
481
+
482
+ .workspace.full-screen {
483
+ top: 0;
484
+ }
485
+
486
+ @media (min-width: 768px) {
487
+ .workspace {
488
+ left: var(--sidebar-width);
489
+ }
490
+ .workspace.full-screen {
491
+ left: 0;
492
+ }
493
+ .workspace.off-canvas {
494
+ left: 0;
495
+ }
496
+ }
497
+
498
+ .no-last-para-padding > p:last-of-type {
499
+ margin-bottom: 0;
500
+ }
501
+
502
+ .sidebar .list-group-item {
503
+ cursor: pointer;
504
+ border-left-width: none;
505
+ border-top: none;
506
+ border-right: none;
507
+ border-radius: 0;
508
+ }
509
+
510
+ .btn-tools {
511
+ --bs-btn-bg: var(--bs-secondary-bg-subtle);
512
+ --bs-btn-hover-bg: var(--bs-secondary-bg-subtle);
513
+ --bs-btn-border-color: var(--bs-secondary-bg-subtle);
514
+ --bs-btn-hover-border-color: var(--bs-secondary-bg-subtle);
515
+ }
516
+
517
+ .sidebar .list-group {
518
+ --bs-list-group-active-color: var(--bs-gray-700);
519
+ --bs-list-group-active-bg: var(--bs-gray-200);
520
+ --bs-list-group-active-border-color: var(--bs-gray-200);
521
+ }
522
+
523
+ [data-bs-theme="dark"] .sidebar .list-group {
524
+ --bs-list-group-active-color: var(--bs-gray-300);
525
+ --bs-list-group-active-bg: var(--bs-gray-800);
526
+ --bs-list-group-active-border-color: var(--bs-gray-800);
527
+ }
528
+
529
+ .markdown-content pre > code,
530
+ .markdown-content pre {
531
+ white-space: pre-wrap !important;
532
+ word-wrap: anywhere !important;
533
+ }
534
+
535
+ .log pre code {
536
+ white-space: pre-wrap;
537
+ font-size: 0.9em;
538
+ }
539
+
540
+ .log pre[class*="language-"] {
541
+ margin: 0;
542
+ padding: 0.3em;
543
+ }
544
+
545
+ .log :not(pre) > code[class*="language-"],
546
+ .log pre[class*="language-"] {
547
+ background-color: var(--bs-body-background);
548
+ }
549
+
550
+ .workspace pre[class*="language-"] {
551
+ margin: 0;
552
+ padding: 0.3em;
553
+ }
554
+
555
+ .workspace :not(pre) > code[class*="language-"],
556
+ .workspace pre[class*="language-"] {
557
+ background-color: var(--bs-body-background);
558
+ }
559
+
560
+ .tbd {
561
+ font-weight: 300;
562
+ opacity: 0.9;
563
+ width: 100%;
564
+ text-align: center;
565
+ padding-top: 10em;
566
+ }
567
+
568
+ code:not(.sourceCode):not(.source-code):not([class^="language-"]) {
569
+ color: var(--bs-code-color);
570
+ }
571
+
572
+ .token.attr-name,
573
+ .token.builtin,
574
+ .token.char,
575
+ .token.inserted,
576
+ .token.selector,
577
+ .token.string {
578
+ color: var(--bs-body-color);
579
+ }
580
+
581
+ .token.operator {
582
+ background: inherit;
583
+ }
584
+
585
+ pre[class*="language-"] {
586
+ border: unset;
587
+ border-radius: unset;
588
+ box-shadow: unset;
589
+ }
590
+
591
+ .font-title {
592
+ font-size: 1.5rem;
593
+ font-weight: 600;
594
+ }
595
+
596
+ .font-subtitle {
597
+ font-size: 1.1rem;
598
+ font-weight: 200;
599
+ }
600
+
601
+ .tight-paragraphs p {
602
+ margin-bottom: 0;
603
+ }
604
+
605
+ .tight-last-paragraph p:last-of-type {
606
+ margin-bottom: 0;
607
+ }
608
+
609
+ .card {
610
+ margin-bottom: 0.5em;
611
+ }
612
+
613
+ .card-header {
614
+ padding: 0.1em 1em 0.1em 1em;
615
+ font-size: 0.8rem;
616
+ font-weight: 500;
617
+ }
618
+
619
+ .btn .btn-link {
620
+ cursor: pointer;
621
+ }
622
+
623
+ [aria-expanded="false"] .hide-when-collapsed {
624
+ display: none;
625
+ }
626
+
627
+ [aria-expanded="true"] .hide-when-expanded {
628
+ opacity: 0 !important;
629
+ }
630
+
631
+ [aria-expanded="true"] .no-bottom-padding-when-expanded {
632
+ padding-bottom: 0 !important;
633
+ }
634
+
635
+ [aria-expanded="true"] .zerowidth-when-expanded {
636
+ height: 0px !important;
637
+ width: 0px !important;
638
+ padding-left: 0 !important;
639
+ padding-right: 0 !important;
640
+ margin-left: 0 !important;
641
+ margin-right: 0 !important;
642
+ }
643
+
644
+ [aria-expanded="true"] .zeroheight-when-expanded {
645
+ height: 0px !important;
646
+ }
647
+
648
+ .accordion-item:not(.no-highlight) .accordion-button:not(.collapsed) {
649
+ border-left: solid var(--bs-accordion-active-bg) 2px;
650
+ border-right: solid var(--bs-accordion-active-bg) 2px;
651
+ border-top: solid var(--bs-accordion-active-bg) 2px;
652
+ background-color: var(--bs-body-background);
653
+ color: var(--bs-body-color);
654
+ }
655
+
656
+ .accordion-item .accordion-button {
657
+ border-left: solid var(--bs-body-bg) 2px;
658
+ border-right: solid var(--bs-body-bg) 2px;
659
+ border-top: solid var(--bs-body-bg) 2px;
660
+ background-color: var(--bs-body-bg);
661
+ color: var(--bs-body-color);
662
+ }
663
+
664
+ .accordion-button[aria-expanded="true"] .giant-text-when-expanded {
665
+ font-weight: 500;
666
+ font-size: 0.9rem !important;
667
+ flex-grow: 40;
668
+ padding-top: 0rem;
669
+ padding-bottom: 0rem;
670
+ }
671
+
672
+ .accordion-button[aria-expanded="true"] .full-flex-basis-when-expanded {
673
+ flex-basis: content !important;
674
+ flex-shrink: 1;
675
+ }
676
+
677
+ .markdown-content h1,
678
+ .markdown-content h2,
679
+ .markdown-content h3,
680
+ .markdown-content h4,
681
+ .markdown-content h5,
682
+ .markdown-content h6 {
683
+ font-size: 0.9em;
684
+ font-weight: 600;
685
+ margin-top: 0.25em;
686
+ margin-bottom: 0.25em;
687
+ }
688
+
689
+ .sample-answer .markdown-content h1,
690
+ .sample-answer .markdown-content h2,
691
+ .sample-answer .markdown-content h3,
692
+ .sample-answer .markdown-content h4,
693
+ .sample-answer .markdown-content h5,
694
+ .sample-answer .markdown-content h6 {
695
+ font-size: 1em;
696
+ font-weight: 400;
697
+ margin-top: 0em;
698
+ margin-bottom: 0em;
699
+ }
700
+
701
+ .accordion-item:not(.no-highlight) .collapse.show.highlight-when-expanded,
702
+ .accordion-item:not(.no-highlight) .collapsing.highlight-when-expanded,
703
+ .accordion-item:not(.no-highlight)
704
+ .accordion-button[aria-expanded="true"].highlight-when-expanded {
705
+ border-left: solid var(--bs-accordion-active-bg) 2px;
706
+ border-right: solid var(--bs-accordion-active-bg) 2px;
707
+ border-bottom: solid var(--bs-accordion-active-bg) 2px;
708
+ }
709
+
710
+ .accordion-item.no-highlight .accordion-button {
711
+ background-color: var(--bs-body-bg);
712
+ }
713
+
714
+ .accordion-button.toggle-rotated:after {
715
+ background-size: 0.8em;
716
+ height: 0.8em;
717
+ width: 0.8em;
718
+ }
719
+
720
+ .accordion-header > :last-child::after,
721
+ .accordion-button:last-child:after {
722
+ color: white !important;
723
+ }
724
+
725
+ .card .accordion-button.toggle-rotated:after {
726
+ margin-right: 1rem;
727
+ }
728
+
729
+ .no-highlight,
730
+ .no-highlight:hover,
731
+ .no-highlight:active {
732
+ color: inherit;
733
+ }
734
+
735
+ .toggle-rotated:before {
736
+ transition: transform 0.3s linear;
737
+ }
738
+
739
+ [aria-expanded="false"] .toggle-rotated:before {
740
+ transform: none;
741
+ }
742
+
743
+ [aria-expanded="true"] .toggle-rotated:before {
744
+ transform: rotate(90deg);
745
+ }
746
+
747
+ .fadeout-when-not-collapsed:not(.collapsed) {
748
+ opacity: 0 !important;
749
+ }
750
+
751
+ table.table {
752
+ width: unset;
753
+ }
754
+
755
+ .table > :not(caption) > * > * {
756
+ background-color: unset;
757
+ }
758
+
759
+ table.table.table-sm td {
760
+ padding: 0.1em;
761
+ }
762
+
763
+ .popover.rendered-content {
764
+ display: flex;
765
+ flex-direction: column;
766
+ max-height: 80%;
767
+ max-width: 80%;
768
+ /** Do not define an overflow on the wrapper or your arrow to the element will disapear */
769
+ }
770
+
771
+ .popover.rendered-content .popover-header {
772
+ font-size: 0.8em;
773
+ font-weight: 400;
774
+ }
775
+
776
+ .popover.rendered-content .popover-body {
777
+ overflow: auto;
778
+ }
779
+
780
+ .modal-footer button {
781
+ padding: 0.2rem 0.5rem;
782
+ font-size: 0.8em;
783
+ }
784
+
785
+ .tab-tools > * {
786
+ flex: 0 1 auto;
787
+ height: 1.5rem;
788
+ margin-left: 0.5rem;
789
+ }
790
+
791
+ .tab-tools > input {
792
+ font-size: 0.7rem;
793
+ }
794
+
795
+ .tab-tools .btn {
796
+ font-size: 0.7rem;
797
+ padding: 0.2em 0.8em;
798
+ }
799
+
800
+ .tab-tools {
801
+ font-size: 0.7rem;
802
+ }
803
+
804
+ .do-not-collapse-self {
805
+ display: block;
806
+ height: auto !important;
807
+ }
808
+
809
+ [data-tooltip] {
810
+ position: relative;
811
+ }
812
+ [data-tooltip]:hover::after {
813
+ content: attr(data-tooltip);
814
+ position: absolute;
815
+ line-height: 1.25;
816
+ background: var(--bs-light);
817
+ color: var(--bs-body-color);
818
+ opacity: 1;
819
+ padding: 4px 8px;
820
+ border-radius: 4px;
821
+ border: 1px solid var(--bs-border-color);
822
+ box-shadow: 0 2px 10px 0 rgba(0, 0, 0, 0.25);
823
+ white-space: pre-wrap;
824
+ width: max-content;
825
+ max-width: 400px;
826
+ z-index: 1000;
827
+ }
828
+ [data-tooltip][data-tooltip-position="bottom-left"]:hover::after {
829
+ right: 0%;
830
+ top: 100%;
831
+ }
832
+
833
+ /* ANSI Coloring */
834
+ .ansi-display {
835
+ font-family: monospace;
836
+ white-space: pre-wrap;
837
+ --ansiBlack: #000000;
838
+ --ansiRed: #cd3131;
839
+ --ansiGreen: #00bc00;
840
+ --ansiYellow: #949800;
841
+ --ansiBlue: #0451a5;
842
+ --ansiMagenta: #bc05bc;
843
+ --ansiCyan: #0598bc;
844
+ --ansiWhite: #555555;
845
+ --ansiBrightBlack: #666666;
846
+ --ansiBrightRed: #cd3131;
847
+ --ansiBrightGreen: #14ce14;
848
+ --ansiBrightYellow: #b5ba00;
849
+ --ansiBrightBlue: #0451a5;
850
+ --ansiBrightMagenta: #bc05bc;
851
+ --ansiBrightCyan: #0598bc;
852
+ --ansiBrightWhite: #a5a5a5;
853
+ }
854
+
855
+ @keyframes ansi-display-run-blink {
856
+ 50% {
857
+ opacity: 0;
858
+ }
859
+ }
860
+
861
+ .tab-tools .form-select {
862
+ background-position: right 0.3rem center;
863
+ background-size: 10px 10px;
864
+ padding: 0.1rem 20px 0.1rem 10px;
865
+ }
866
+
867
+ .tab-content > .active {
868
+ display: flex;
869
+ }
870
+
871
+ .left-to-right-animate {
872
+ position: absolute;
873
+ animation: moveLeftToRight 2s linear infinite;
874
+ }
875
+
876
+ @keyframes moveLeftToRight {
877
+ from {
878
+ margin-left: 0;
879
+ }
880
+ to {
881
+ margin-left: 95%;
882
+ }
883
+ }
884
+
885
+ .expandable-panel pre {
886
+ overflow: unset;
887
+ }
888
+
889
+ .markdown-content pre[class*="language-"],
890
+ pre[class*="language-"].tool-output,
891
+ .tool-output {
892
+ background-color: #f8f8f8;
893
+ }
894
+
895
+ .vscode-dark .model-call pre[class*="language-"],
896
+ .vscode-dark .markdown-content pre[class*="language-"],
897
+ .vscode-dark pre[class*="language-"].tool-output,
898
+ .vscode-dark .tool-output {
899
+ background-color: #333333;
900
+ }
901
+
902
+ .model-call pre[class*="language-"],
903
+ .markdown-content pre[class*="language-"],
904
+ pre[class*="language-"].tool-output {
905
+ border: none !important;
906
+ box-shadow: none !important;
907
+ border-radius: var(--bs-border-radius) !important;
908
+ }
909
+
910
+ .vscode-dark pre.jsonPanel {
911
+ background: none !important;
912
+ border: none !important;
913
+ box-shadow: none !important;
914
+ border-radius: var(--bs-border-radius) !important;
915
+ }
916
+
917
+ /* lightbox styles */
918
+
919
+ .lightbox-overlay .close-button,
920
+ .lightbox-overlay .nav-button {
921
+ /* Hide by default */
922
+ opacity: 0;
923
+ pointer-events: none; /* so it doesn't register clicks when hidden */
924
+ transition: opacity 0.3s ease;
925
+ }
926
+
927
+ .lightbox-overlay:hover .close-button,
928
+ .lightbox-overlay .nav-button {
929
+ /* Show on hover */
930
+ opacity: 1;
931
+ pointer-events: auto;
932
+ }
933
+
934
+ /* jsondiffpatch */
935
+
936
+ .jsondiffpatch-delta {
937
+ padding: 1em;
938
+ background: var(--bs-light);
939
+ font-family: var(--bs-font-monospace);
940
+ font-size: 0.9em;
941
+ }
942
+ .jsondiffpatch-delta pre {
943
+ white-space: pre-wrap;
944
+ word-wrap: break-word;
945
+ word-break: break-all;
946
+ margin-bottom: 0;
947
+ }
948
+ ul.jsondiffpatch-delta {
949
+ list-style-type: none;
950
+ padding: 0 0 0 1.5em;
951
+ margin: 0;
952
+ }
953
+ .jsondiffpatch-delta ul {
954
+ list-style-type: none;
955
+ padding: 0 0 0 1.5em;
956
+ margin: 0;
957
+ }
958
+ .jsondiffpatch-added,
959
+ .jsondiffpatch-modified .jsondiffpatch-right-value pre,
960
+ .jsondiffpatch-textdiff-added {
961
+ background: var(--inspect-diff-add-color);
962
+ }
963
+
964
+ .jsondiffpatch-deleted .jsondiffpatch-property-name,
965
+ .jsondiffpatch-deleted pre,
966
+ .jsondiffpatch-modified .jsondiffpatch-left-value pre,
967
+ .jsondiffpatch-textdiff-deleted {
968
+ background: var(--inspect-diff-remove-color);
969
+ text-decoration: line-through;
970
+ }
971
+ .jsondiffpatch-unchanged,
972
+ .jsondiffpatch-movedestination {
973
+ color: gray;
974
+ }
975
+ .jsondiffpatch-unchanged,
976
+ .jsondiffpatch-movedestination > .jsondiffpatch-value {
977
+ transition: all 0.5s;
978
+ -webkit-transition: all 0.5s;
979
+ overflow-y: hidden;
980
+ }
981
+ .jsondiffpatch-unchanged-showing .jsondiffpatch-unchanged,
982
+ .jsondiffpatch-unchanged-showing
983
+ .jsondiffpatch-movedestination
984
+ > .jsondiffpatch-value {
985
+ max-height: 100px;
986
+ }
987
+ .jsondiffpatch-unchanged-hidden .jsondiffpatch-unchanged,
988
+ .jsondiffpatch-unchanged-hidden
989
+ .jsondiffpatch-movedestination
990
+ > .jsondiffpatch-value {
991
+ max-height: 0;
992
+ }
993
+ .jsondiffpatch-unchanged-hiding
994
+ .jsondiffpatch-movedestination
995
+ > .jsondiffpatch-value,
996
+ .jsondiffpatch-unchanged-hidden
997
+ .jsondiffpatch-movedestination
998
+ > .jsondiffpatch-value {
999
+ display: block;
1000
+ }
1001
+ .jsondiffpatch-unchanged-visible .jsondiffpatch-unchanged,
1002
+ .jsondiffpatch-unchanged-visible
1003
+ .jsondiffpatch-movedestination
1004
+ > .jsondiffpatch-value {
1005
+ max-height: 100px;
1006
+ }
1007
+ .jsondiffpatch-unchanged-hiding .jsondiffpatch-unchanged,
1008
+ .jsondiffpatch-unchanged-hiding
1009
+ .jsondiffpatch-movedestination
1010
+ > .jsondiffpatch-value {
1011
+ max-height: 0;
1012
+ }
1013
+ .jsondiffpatch-unchanged-showing .jsondiffpatch-arrow,
1014
+ .jsondiffpatch-unchanged-hiding .jsondiffpatch-arrow {
1015
+ display: none;
1016
+ }
1017
+ .jsondiffpatch-value {
1018
+ display: inline-block;
1019
+ }
1020
+ .jsondiffpatch-property-name {
1021
+ display: inline-block;
1022
+ padding-right: 5px;
1023
+ vertical-align: top;
1024
+ }
1025
+ .jsondiffpatch-property-name:after {
1026
+ content: ": ";
1027
+ }
1028
+ .jsondiffpatch-child-node-type-array > .jsondiffpatch-property-name:after {
1029
+ content: ": [";
1030
+ }
1031
+ .jsondiffpatch-child-node-type-array:after {
1032
+ content: "],";
1033
+ }
1034
+ div.jsondiffpatch-child-node-type-array:before {
1035
+ content: "[";
1036
+ }
1037
+ div.jsondiffpatch-child-node-type-array:after {
1038
+ content: "]";
1039
+ }
1040
+ .jsondiffpatch-child-node-type-object > .jsondiffpatch-property-name:after {
1041
+ content: ": {";
1042
+ }
1043
+ .jsondiffpatch-child-node-type-object:after {
1044
+ content: "},";
1045
+ }
1046
+ div.jsondiffpatch-child-node-type-object:before {
1047
+ content: "{";
1048
+ }
1049
+ div.jsondiffpatch-child-node-type-object:after {
1050
+ content: "}";
1051
+ }
1052
+ .jsondiffpatch-value pre:after {
1053
+ content: ",";
1054
+ }
1055
+ li:last-child > .jsondiffpatch-value pre:after,
1056
+ .jsondiffpatch-modified > .jsondiffpatch-left-value pre:after {
1057
+ content: "";
1058
+ }
1059
+ .jsondiffpatch-modified .jsondiffpatch-value {
1060
+ display: inline-block;
1061
+ }
1062
+ .jsondiffpatch-modified .jsondiffpatch-right-value {
1063
+ margin-left: 0;
1064
+ }
1065
+ .jsondiffpatch-moved .jsondiffpatch-value {
1066
+ display: none;
1067
+ }
1068
+ .jsondiffpatch-moved .jsondiffpatch-moved-destination {
1069
+ display: inline-block;
1070
+ background: #ffffbb;
1071
+ color: #888;
1072
+ }
1073
+ .jsondiffpatch-moved .jsondiffpatch-moved-destination:before {
1074
+ content: " => ";
1075
+ }
1076
+ ul.jsondiffpatch-textdiff {
1077
+ padding: 0;
1078
+ }
1079
+ .jsondiffpatch-textdiff-location {
1080
+ color: #bbb;
1081
+ display: inline-block;
1082
+ min-width: 60px;
1083
+ }
1084
+ .jsondiffpatch-textdiff-line {
1085
+ display: inline-block;
1086
+ }
1087
+ .jsondiffpatch-textdiff-line-number:after {
1088
+ content: ",";
1089
+ }
1090
+ .jsondiffpatch-error {
1091
+ background: red;
1092
+ color: white;
1093
+ font-weight: bold;
1094
+ }
1095
+
1096
+ /* prism-custom.css */
1097
+ code[class*="language-"],
1098
+ pre[class*="language-"] {
1099
+ font-size: 0.7rem !important;
1100
+ }
1101
+
1102
+ .token {
1103
+ font-size: 0.7rem !important;
1104
+ }
1105
+
1106
+ /* PrismJS 1.29.0 https://prismjs.com/download.html#themes=prism-dark&languages=markup+css+clike+javascript+bash+python */
1107
+ /* This has been generated from the URL above, then scoped within the
1108
+ * .vscode-dark class. If it needs to be regenerated, be sure to add that back in. */
1109
+ .vscode-dark code[class*="language-"],
1110
+ .vscode-dark pre[class*="language-"] {
1111
+ color: #fff;
1112
+ background: 0 0;
1113
+ text-shadow: 0 -0.1em 0.2em #000;
1114
+ font-family: Consolas, Monaco, "Andale Mono", "Ubuntu Mono", monospace;
1115
+ font-size: 1em;
1116
+ text-align: left;
1117
+ white-space: pre;
1118
+ word-spacing: normal;
1119
+ word-break: normal;
1120
+ word-wrap: normal;
1121
+ line-height: 1.5;
1122
+ -moz-tab-size: 4;
1123
+ -o-tab-size: 4;
1124
+ tab-size: 4;
1125
+ -webkit-hyphens: none;
1126
+ -moz-hyphens: none;
1127
+ -ms-hyphens: none;
1128
+ hyphens: none;
1129
+ }
1130
+ @media print {
1131
+ .vscode-dark code[class*="language-"],
1132
+ .vscode-dark pre[class*="language-"] {
1133
+ text-shadow: none;
1134
+ }
1135
+ }
1136
+ .vscode-dark :not(pre) > code[class*="language-"],
1137
+ .vscode-dark pre[class*="language-"] {
1138
+ background: #4c3f33;
1139
+ }
1140
+ .vscode-dark pre[class*="language-"] {
1141
+ padding: 1em;
1142
+ margin: 0.5em 0;
1143
+ overflow: auto;
1144
+ /* border: 0.3em solid #7a6651; */
1145
+ border-radius: 0.5em;
1146
+ box-shadow: 1px 1px 0.5em #000 inset;
1147
+ }
1148
+ .vscode-dark :not(pre) > code[class*="language-"] {
1149
+ padding: 0.15em 0.2em 0.05em;
1150
+ border-radius: 0.3em;
1151
+ /* border: 0.13em solid #7a6651; */
1152
+ box-shadow: 1px 1px 0.3em -0.1em #000 inset;
1153
+ white-space: normal;
1154
+ }
1155
+ .vscode-dark .token.cdata,
1156
+ .vscode-dark .token.comment,
1157
+ .vscode-dark .token.doctype,
1158
+ .vscode-dark .token.prolog {
1159
+ color: #997f66;
1160
+ }
1161
+ .vscode-dark .token.punctuation {
1162
+ opacity: 0.7;
1163
+ }
1164
+ .vscode-dark .token.namespace {
1165
+ opacity: 0.7;
1166
+ }
1167
+ .vscode-dark .token.boolean,
1168
+ .vscode-dark .token.constant,
1169
+ .vscode-dark .token.number,
1170
+ .vscode-dark .token.property,
1171
+ .vscode-dark .token.symbol,
1172
+ .vscode-dark .token.tag {
1173
+ color: #d1939e;
1174
+ }
1175
+ .vscode-dark .token.attr-name,
1176
+ .vscode-dark .token.builtin,
1177
+ .vscode-dark .token.char,
1178
+ .vscode-dark .token.inserted,
1179
+ .vscode-dark .token.selector,
1180
+ .vscode-dark .token.string {
1181
+ color: #bce051;
1182
+ }
1183
+ .vscode-dark .language-css .token.string,
1184
+ .vscode-dark .style .token.string,
1185
+ .vscode-dark .token.entity,
1186
+ .vscode-dark .token.operator,
1187
+ .vscode-dark .token.url,
1188
+ .vscode-dark .token.variable {
1189
+ color: #f4b73d;
1190
+ }
1191
+ .vscode-dark .token.atrule,
1192
+ .vscode-dark .token.attr-value,
1193
+ .vscode-dark .token.keyword {
1194
+ color: #d1939e;
1195
+ }
1196
+ .vscode-dark .token.important,
1197
+ .vscode-dark .token.regex {
1198
+ color: #e90;
1199
+ }
1200
+ .vscode-dark .token.bold,
1201
+ .vscode-dark .token.important {
1202
+ font-weight: 700;
1203
+ }
1204
+ .vscode-dark .token.italic {
1205
+ font-style: italic;
1206
+ }
1207
+ .vscode-dark .token.entity {
1208
+ cursor: help;
1209
+ }
1210
+ .vscode-dark .token.deleted {
1211
+ color: red;
1212
+ }
1213
+ /* END PrismJS */
1214
+
1215
+ /* SVG Icon styles - following Bootstrap Icons pattern */
1216
+ .ii:before {
1217
+ background-color: var(--bs-body-color);
1218
+ }
1219
+
1220
+ .inspect-icon-16::before {
1221
+ content: "";
1222
+ width: 1em;
1223
+ height: 1em;
1224
+ display: inline-block;
1225
+ vertical-align: middle;
1226
+ mask: url("../img/inspect-16.svg") no-repeat center / contain;
1227
+ -webkit-mask: url("../img/inspect-16.svg") no-repeat center / contain;
1228
+ }
1229
+
1230
+ .inspect-icon-back::before {
1231
+ content: "";
1232
+ width: 1em;
1233
+ height: 1em;
1234
+ display: inline-block;
1235
+ vertical-align: middle;
1236
+ mask: url("../img/inspect-back.svg") no-repeat center / contain;
1237
+ -webkit-mask: url("../img/inspect-back.svg") no-repeat center / contain;
1238
+ }
1239
+
1240
+ .inspect-icon-forward::before {
1241
+ content: "";
1242
+ width: 1em;
1243
+ height: 1em;
1244
+ display: inline-block;
1245
+ vertical-align: middle;
1246
+ mask: url("../img/inspect-forward.svg") no-repeat center / contain;
1247
+ -webkit-mask: url("../img/inspect-forward.svg") no-repeat center / contain;
1248
+ }
1249
+
1250
+ .inspect-icon-file::before {
1251
+ content: "";
1252
+ width: 1em;
1253
+ height: 1em;
1254
+ display: inline-block;
1255
+ vertical-align: middle;
1256
+ mask: url("../img/inspect-file.svg") no-repeat center / contain;
1257
+ -webkit-mask: url("../img/inspect-file.svg") no-repeat center / contain;
1258
+ }
1259
+
1260
+ .inspect-icon-home::before {
1261
+ content: "";
1262
+ width: 1em;
1263
+ height: 1em;
1264
+ display: inline-block;
1265
+ vertical-align: middle;
1266
+ mask: url("../img/inspect-home.svg") no-repeat center / contain;
1267
+ -webkit-mask: url("../img/inspect-home.svg") no-repeat center / contain;
1268
+ }
1269
+
1270
+ .inspect-icon-tasks::before {
1271
+ content: "";
1272
+ width: 1em;
1273
+ height: 1em;
1274
+ display: inline-block;
1275
+ vertical-align: middle;
1276
+ margin-top: -2px;
1277
+ mask: url("../img/tasks.svg") no-repeat center / contain;
1278
+ -webkit-mask: url("../img/tasks.svg") no-repeat center / contain;
1279
+ }
1280
+
1281
+ .inspect-flow::before {
1282
+ content: "";
1283
+ margin-top: -4px;
1284
+ width: 1.05em;
1285
+ height: 1.05em;
1286
+ display: inline-block;
1287
+ vertical-align: middle;
1288
+ mask: url("../img/inspect-flow.svg") no-repeat center / contain;
1289
+ -webkit-mask: url("../img/inspect-flow.svg") no-repeat center / contain;
1290
+ }
1291
+
1292
+ /* Use this very carefully, find relies upon checking the
1293
+ document selection to determine if it should skip a find match
1294
+ so disabling selection can break that functionality */
1295
+ .hideSelection {
1296
+ user-select: none;
1297
+ -webkit-user-select: none;
1298
+ -moz-user-select: none;
1299
+ -ms-user-select: none;
1300
+ }
data/conda_envs/evalclaw/lib/python3.11/site-packages/inspect_ai/_view/www/src/app/App.tsx ADDED
@@ -0,0 +1,209 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import "bootstrap-icons/font/bootstrap-icons.css";
2
+ import "bootstrap/dist/css/bootstrap.css";
3
+ import JSON5 from "json5";
4
+
5
+ import "prismjs";
6
+ import "prismjs/components/prism-bash";
7
+ import "prismjs/components/prism-clike";
8
+ import "prismjs/components/prism-javascript";
9
+ import "prismjs/components/prism-json";
10
+ import "prismjs/components/prism-python";
11
+ import "prismjs/components/prism-yaml";
12
+ import "prismjs/themes/prism.css";
13
+ import "./App.css";
14
+
15
+ import ClipboardJS from "clipboard";
16
+ import { FC, useCallback, useEffect } from "react";
17
+ import { RouterProvider } from "react-router-dom";
18
+ import { ClientAPI, HostMessage } from "../client/api/types.ts";
19
+ import { useStore } from "../state/store.ts";
20
+ import { basename, dirname } from "../utils/path.ts";
21
+ import { isUri } from "../utils/uri.ts";
22
+ import { AppRouter } from "./routing/AppRouter.tsx";
23
+
24
+ interface AppProps {
25
+ api: ClientAPI;
26
+ }
27
+
28
+ /**
29
+ * Renders the Main Application
30
+ */
31
+ export const App: FC<AppProps> = ({ api }) => {
32
+ // Whether the app was rehydrated
33
+ const rehydrated = useStore((state) => state.app.rehydrated);
34
+
35
+ const logDir = useStore((state) => state.logs.logDir);
36
+ const selectedLogFile = useStore((state) => state.logs.selectedLogFile);
37
+ const loadedLogFile = useStore((state) => state.log.loadedLog);
38
+ const selectedLogDetails = useStore((state) => state.log.selectedLogDetails);
39
+
40
+ const setInitialState = useStore((state) => state.appActions.setInitialState);
41
+ const setLoading = useStore((state) => state.appActions.setLoading);
42
+
43
+ const syncLogs = useStore((state) => state.logsActions.syncLogs);
44
+ const setLogDir = useStore((state) => state.logsActions.setLogDir);
45
+ const setLogFiles = useStore((state) => state.logsActions.setLogHandles);
46
+ const setSelectedLogFile = useStore(
47
+ (state) => state.logsActions.setSelectedLogFile,
48
+ );
49
+
50
+ const loadLog = useStore((state) => state.logActions.syncLog);
51
+ const pollLog = useStore((state) => state.logActions.pollLog);
52
+
53
+ const setSingleFileMode = useStore(
54
+ (state) => state.appActions.setSingleFileMode,
55
+ );
56
+
57
+ // Load a specific log
58
+ useEffect(() => {
59
+ const loadSpecificLog = async () => {
60
+ // Ignore if there is no log file.
61
+ if (!selectedLogFile) {
62
+ return;
63
+ }
64
+
65
+ if (selectedLogFile === loadedLogFile && selectedLogDetails) {
66
+ // The log is already loaded and we have the data
67
+ return;
68
+ }
69
+
70
+ try {
71
+ // Set loading first and wait for it to update
72
+ setLoading(true);
73
+
74
+ // Then load the log
75
+ await loadLog(selectedLogFile);
76
+
77
+ // Finally set loading to false
78
+ setLoading(false);
79
+ } catch (e) {
80
+ console.log(e);
81
+ setLoading(false, e as Error);
82
+ }
83
+ };
84
+
85
+ loadSpecificLog();
86
+ }, [selectedLogFile, loadedLogFile, selectedLogDetails, loadLog, setLoading]);
87
+
88
+ useEffect(() => {
89
+ // If the component re-mounts and there is a running load loaded
90
+ // start up polling
91
+ const doPoll = async () => {
92
+ await pollLog();
93
+ };
94
+ if (selectedLogDetails?.status === "started") {
95
+ doPoll();
96
+ }
97
+ }, [pollLog, selectedLogDetails?.status]);
98
+
99
+ const onMessage = useCallback(
100
+ async (e: HostMessage) => {
101
+ switch (e.data.type) {
102
+ case "updateState": {
103
+ if (e.data.url) {
104
+ const decodedUrl = decodeURIComponent(e.data.url);
105
+
106
+ let targetFile = decodedUrl;
107
+ if (isUri(targetFile)) {
108
+ // If it's a URI, just set the log file directly
109
+ const dir = dirname(targetFile);
110
+ targetFile = basename(targetFile);
111
+ setLogDir(dir);
112
+ }
113
+
114
+ if (!rehydrated) {
115
+ setInitialState(
116
+ targetFile,
117
+ e.data.sample_id,
118
+ e.data.sample_epoch,
119
+ );
120
+ }
121
+ }
122
+ break;
123
+ }
124
+ case "backgroundUpdate": {
125
+ const decodedUrl = decodeURIComponent(e.data.url);
126
+ const log_dir = e.data.log_dir;
127
+ const isFocused = document.hasFocus();
128
+ if (!isFocused) {
129
+ if (log_dir === logDir) {
130
+ setSelectedLogFile(decodedUrl);
131
+ } else {
132
+ api.open_log_file(e.data.url, e.data.log_dir);
133
+ }
134
+ } else {
135
+ syncLogs();
136
+ }
137
+ break;
138
+ }
139
+ }
140
+ },
141
+ [
142
+ setInitialState,
143
+ setLogDir,
144
+ logDir,
145
+ setSelectedLogFile,
146
+ api,
147
+ syncLogs,
148
+ rehydrated,
149
+ ],
150
+ );
151
+
152
+ // listen for updateState messages from vscode
153
+ useEffect(() => {
154
+ window.addEventListener("message", onMessage);
155
+ return () => {
156
+ window.removeEventListener("message", onMessage);
157
+ };
158
+ }, [onMessage]);
159
+
160
+ useEffect(() => {
161
+ const loadLogsAndState = async () => {
162
+ // First see if there is embedded state and if so, use that
163
+ const embeddedState = document.getElementById("logview-state");
164
+ if (embeddedState) {
165
+ const state = JSON5.parse(embeddedState.textContent || "");
166
+ onMessage({ data: state });
167
+ setSingleFileMode(true);
168
+ } else {
169
+ // For non-route URL params support (legacy)
170
+ const urlParams = new URLSearchParams(window.location.search);
171
+
172
+ // If the URL provides a task file, load that
173
+ const logPath = urlParams.get("task_file");
174
+
175
+ // Replace spaces with a '+' sign:
176
+ const resolvedLogPath = logPath ? logPath.replace(" ", "+") : logPath;
177
+
178
+ if (resolvedLogPath) {
179
+ // Clear any log dir
180
+ setLogDir(undefined);
181
+ // Load just the passed file
182
+ setLogFiles([{ name: resolvedLogPath }]);
183
+ setSingleFileMode(true);
184
+ } else {
185
+ // If a log file was passed, select it
186
+ const log_file = urlParams.get("log_file");
187
+ if (log_file) {
188
+ setSelectedLogFile(log_file);
189
+ setSingleFileMode(true);
190
+ }
191
+ // Else do nothing - RouteProvider will handle it
192
+ }
193
+ }
194
+
195
+ new ClipboardJS(".clipboard-button,.copy-button");
196
+ };
197
+
198
+ loadLogsAndState();
199
+ }, [
200
+ setLogDir,
201
+ setLogFiles,
202
+ setSelectedLogFile,
203
+ syncLogs,
204
+ onMessage,
205
+ setSingleFileMode,
206
+ ]);
207
+
208
+ return <RouterProvider router={AppRouter} />;
209
+ };
data/conda_envs/evalclaw/lib/python3.11/site-packages/inspect_ai/_view/www/src/app/AppErrorBoundary.tsx ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { Component, ErrorInfo, ReactNode } from "react";
2
+ import { ErrorPanel } from "../components/ErrorPanel";
3
+
4
+ interface Props {
5
+ children: ReactNode;
6
+ }
7
+
8
+ interface State {
9
+ hasError: boolean;
10
+ error?: Error;
11
+ }
12
+
13
+ export class AppErrorBoundary extends Component<Props, State> {
14
+ constructor(props: Props) {
15
+ super(props);
16
+ this.state = { hasError: false };
17
+ }
18
+
19
+ static getDerivedStateFromError(error: Error): State {
20
+ // Update state so the next render will show the fallback UI.
21
+ return { hasError: true, error: error };
22
+ }
23
+
24
+ componentDidCatch(error: Error, errorInfo: ErrorInfo): void {
25
+ // You can also log the error to an error reporting service
26
+ console.log({ error, errorInfo });
27
+ }
28
+
29
+ render(): ReactNode {
30
+ if (this.state.hasError) {
31
+ console.error({ e: this.state.error });
32
+ if (this.state.error) {
33
+ return (
34
+ <ErrorPanel
35
+ title="An unexpected error occurred."
36
+ error={this.state.error}
37
+ />
38
+ );
39
+ } else {
40
+ return (
41
+ <div>An unknown error with no additional information occured.</div>
42
+ );
43
+ }
44
+ }
45
+ return this.props.children;
46
+ }
47
+ }
data/conda_envs/evalclaw/lib/python3.11/site-packages/inspect_ai/_view/www/src/app/appearance/colors.ts ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ export const ApplicationColors = {
2
+ logging: {
3
+ debug: "var(--bs-secondary)",
4
+ info: "var(--bs-blue)",
5
+ warning: "var(--bs-warning)",
6
+ error: "var(--bs-danger)",
7
+ critical: "var(--bs-danger)",
8
+ },
9
+ };
data/conda_envs/evalclaw/lib/python3.11/site-packages/inspect_ai/_view/www/src/app/appearance/fonts.ts ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /**
2
+ * The base font size in rem units.
3
+ */
4
+ const kBaseFontSize: number = 0.9;
5
+
6
+ /**
7
+ * Scales the base font size by the provided scale factor.
8
+ */
9
+ const ScaleBaseFont = (scale: number): string => {
10
+ return `${kBaseFontSize + scale}rem`;
11
+ };
12
+
13
+ /**
14
+ * An object representing font sizes for different text elements.
15
+ */
16
+ export const FontSize = {
17
+ title: ScaleBaseFont(0.6),
18
+ "title-secondary": ScaleBaseFont(0.4),
19
+ larger: ScaleBaseFont(0.2),
20
+ large: ScaleBaseFont(0.1),
21
+ base: ScaleBaseFont(0),
22
+ small: ScaleBaseFont(-0.1),
23
+ smaller: ScaleBaseFont(-0.1),
24
+ };
25
+
26
+ /**
27
+ * An object representing text styles for different elements.
28
+ */
29
+ export const TextStyle = {
30
+ label: {
31
+ textTransform: "uppercase",
32
+ },
33
+ secondary: {
34
+ color: "var(--bs-secondary)",
35
+ },
36
+ tertiary: {
37
+ color: "var(--bs-tertiary-color)",
38
+ },
39
+ };
data/conda_envs/evalclaw/lib/python3.11/site-packages/inspect_ai/_view/www/src/app/types.ts ADDED
@@ -0,0 +1,219 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { GridState } from "ag-grid-community";
2
+ import { StateSnapshot } from "react-virtuoso";
3
+ import {
4
+ ApprovalEvent,
5
+ CompactionEvent,
6
+ ContentDocument,
7
+ ContentImage,
8
+ ContentText,
9
+ EvalSample,
10
+ EvalSet,
11
+ InfoEvent,
12
+ LoggerEvent,
13
+ ModelEvent,
14
+ SampleInitEvent,
15
+ SampleLimitEvent,
16
+ SandboxEvent,
17
+ ScoreEvent,
18
+ StateEvent,
19
+ StepEvent,
20
+ StoreEvent,
21
+ SubtaskEvent,
22
+ ToolEvent,
23
+ } from "../@types/log";
24
+ import {
25
+ AttachmentData,
26
+ EvalHeader,
27
+ EventData,
28
+ LogDetails,
29
+ LogHandle,
30
+ LogPreview,
31
+ PendingSamples,
32
+ SampleSummary,
33
+ } from "../client/api/types";
34
+
35
+ export interface AppState {
36
+ status: AppStatus;
37
+ nativeFind?: boolean;
38
+ showFind: boolean;
39
+ tabs: {
40
+ workspace: string;
41
+ sample: string;
42
+ };
43
+ dialogs: {
44
+ transcriptFilter: boolean;
45
+ options: boolean;
46
+ };
47
+ scrollPositions: Record<string, number>;
48
+ listPositions: Record<string, StateSnapshot>;
49
+ visibleRanges: Record<string, { startIndex: number; endIndex: number }>;
50
+ collapsed: Record<string, boolean>;
51
+ messages: Record<string, boolean>;
52
+ propertyBags: Record<string, Record<string, unknown>>;
53
+ urlHash?: string;
54
+ initialState?: {
55
+ log: string;
56
+ sample_id?: string;
57
+ sample_epoch?: string;
58
+ };
59
+ rehydrated?: boolean;
60
+ singleFileMode?: boolean;
61
+ displayMode?: "rendered" | "raw";
62
+ logsSampleView: boolean;
63
+ }
64
+
65
+ export interface DisplayedSample {
66
+ logFile: string;
67
+ sampleId: string | number;
68
+ epoch: number;
69
+ }
70
+
71
+ export interface LogsState {
72
+ logDir?: string;
73
+ logs: LogHandle[];
74
+ logPreviews: Record<string, LogPreview>;
75
+ logDetails: Record<string, LogDetails>;
76
+ evalSet?: EvalSet;
77
+ selectedLogFile?: string;
78
+ listing: LogsListing;
79
+ pendingRequests: Map<string, Promise<EvalHeader | null>>;
80
+ dbStats: {
81
+ logCount: number;
82
+ previewCount: number;
83
+ detailsCount: number;
84
+ };
85
+ samplesListState: {
86
+ gridState?: GridState;
87
+ displayedSamples?: Array<DisplayedSample>;
88
+ columnVisibility: Record<string, boolean>;
89
+ previousSamplesPath?: string;
90
+ };
91
+ flow?: string;
92
+ flowDir?: string;
93
+ showRetriedLogs: boolean;
94
+ }
95
+
96
+ export interface LogsListing {
97
+ filteredCount?: number;
98
+ watchedLogs?: LogHandle[];
99
+ selectedRowIndex?: number | null;
100
+ gridState?: GridState;
101
+ previousLogPath?: string;
102
+ columnVisibility: Record<string, boolean>;
103
+ }
104
+
105
+ export interface SampleHandle {
106
+ id: string | number;
107
+ epoch: number;
108
+ logFile: string;
109
+ }
110
+
111
+ export interface LogState {
112
+ loadedLog?: string;
113
+
114
+ selectedSampleHandle?: SampleHandle;
115
+ selectedLogDetails?: LogDetails;
116
+ pendingSampleSummaries?: PendingSamples;
117
+
118
+ filter: string;
119
+ filterError?: FilterError;
120
+
121
+ selectedScores?: ScoreLabel[];
122
+ scores?: ScoreLabel[];
123
+
124
+ filteredSampleCount?: number;
125
+ }
126
+
127
+ export type SampleStatus = "ok" | "loading" | "streaming" | "error";
128
+
129
+ export interface EventFilter {
130
+ filteredTypes: string[];
131
+ }
132
+
133
+ export interface SampleState {
134
+ sample_identifier: SampleHandle | undefined;
135
+ sampleInState: boolean;
136
+ selectedSampleObject?: EvalSample;
137
+ sampleStatus: SampleStatus;
138
+ sampleError: Error | undefined;
139
+ sampleNeedsReload: number;
140
+ eventsCleared: boolean;
141
+
142
+ visiblePopover?: string;
143
+
144
+ // Events and attachments
145
+ runningEvents: Event[];
146
+ collapsedEvents: Record<string, Record<string, boolean>> | null;
147
+ collapsedIdBuckets: Record<string, Record<string, boolean>>;
148
+ collapsedMode: "collapsed" | "expanded" | null;
149
+ eventFilter: EventFilter;
150
+
151
+ selectedOutlineId?: string;
152
+ }
153
+
154
+ export type Event =
155
+ | SampleInitEvent
156
+ | SampleLimitEvent
157
+ | CompactionEvent
158
+ | SandboxEvent
159
+ | StateEvent
160
+ | StoreEvent
161
+ | ModelEvent
162
+ | ToolEvent
163
+ | ApprovalEvent
164
+ | InputEvent
165
+ | ScoreEvent
166
+ | ErrorEvent
167
+ | LoggerEvent
168
+ | InfoEvent
169
+ | StepEvent
170
+ | SubtaskEvent;
171
+
172
+ export interface AppStatus {
173
+ // Waiting while loading data, show large form of progress
174
+ loading: number;
175
+
176
+ // Background syncing data, show small form of activity
177
+ syncing: boolean;
178
+ error?: Error;
179
+ }
180
+
181
+ export interface CurrentLog {
182
+ name: string;
183
+ contents: LogDetails;
184
+ }
185
+
186
+ export interface Logs {
187
+ log_dir: string;
188
+ files: string[];
189
+ }
190
+
191
+ export interface ScoreLabel {
192
+ name: string;
193
+ scorer: string;
194
+ }
195
+
196
+ export interface SampleFilter {
197
+ value?: string;
198
+ error?: FilterError;
199
+ }
200
+
201
+ export interface FilterError {
202
+ from: number;
203
+ to: number;
204
+ message: string;
205
+ severity: "warning" | "error";
206
+ }
207
+
208
+ export type SampleMode = "none" | "single" | "many";
209
+
210
+ export interface ContentTool {
211
+ type: "tool";
212
+ content: (ContentImage | ContentText | ContentDocument)[];
213
+ }
214
+
215
+ export interface RunningSampleData {
216
+ events: Map<string, EventData>;
217
+ attachments: Map<string, AttachmentData>;
218
+ summary?: SampleSummary;
219
+ }
data/conda_envs/evalclaw/lib/python3.11/site-packages/inspect_ai/_view/www/src/components/ActivityBar.module.css ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .wrapper {
2
+ display: flex;
3
+ align-items: center;
4
+ justify-content: center;
5
+ width: 100%;
6
+ height: 0;
7
+ overflow-y: visible;
8
+ overflow-x: visible;
9
+ text-align: center;
10
+ }
11
+
12
+ .container {
13
+ width: 100%;
14
+ height: 1px;
15
+ background-color: transparent;
16
+ position: sticky;
17
+ overflow: hidden;
18
+ z-index: 1200;
19
+ }
20
+
21
+ .animate {
22
+ width: 5%;
23
+ height: 1px;
24
+ animation: leftToRight 2s linear infinite;
25
+ background-color: #3b82f6;
26
+ position: absolute;
27
+ left: 0;
28
+ top: 0;
29
+ }
30
+
31
+ @keyframes leftToRight {
32
+ 0% {
33
+ transform: translateX(-100%);
34
+ }
35
+ 100% {
36
+ transform: translateX(2000%);
37
+ }
38
+ }
data/conda_envs/evalclaw/lib/python3.11/site-packages/inspect_ai/_view/www/src/components/ActivityBar.tsx ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import clsx from "clsx";
2
+ import { FC } from "react";
3
+ import styles from "./ActivityBar.module.css";
4
+
5
+ interface ActivityBarProps {
6
+ animating: boolean;
7
+ }
8
+
9
+ export const ActivityBar: FC<ActivityBarProps> = ({ animating }) => {
10
+ return (
11
+ <div className={clsx(styles.wrapper)}>
12
+ <div
13
+ className={clsx(styles.container)}
14
+ role="progressbar"
15
+ aria-label="Progress bar"
16
+ aria-valuenow={25}
17
+ aria-valuemin={0}
18
+ aria-valuemax={100}
19
+ >
20
+ {animating && <div className={styles.animate} />}
21
+ </div>
22
+ </div>
23
+ );
24
+ };
data/conda_envs/evalclaw/lib/python3.11/site-packages/inspect_ai/_view/www/src/components/AnsiDisplay.tsx ADDED
@@ -0,0 +1,278 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { ANSIColor, ANSIOutput, ANSIOutputRun, ANSIStyle } from "ansi-output";
2
+ import clsx from "clsx";
3
+ import { CSSProperties, FC, useState } from "react";
4
+ import { ToolButton } from "./ToolButton";
5
+
6
+ import styles from "./AnsiDisplay.module.css";
7
+
8
+ interface ANSIDisplayProps {
9
+ output: string;
10
+ style?: CSSProperties;
11
+ className?: string[] | string;
12
+ }
13
+
14
+ export const ANSIDisplay: FC<ANSIDisplayProps> = ({
15
+ output,
16
+ style,
17
+ className,
18
+ }) => {
19
+ const [showRaw, setShowRaw] = useState(false);
20
+ const ansiOutput = new ANSIOutput();
21
+ ansiOutput.processOutput(output);
22
+
23
+ // Check if more than 80% of lines share the same background color
24
+ const getUniformBackgroundColor = (): string | undefined => {
25
+ const backgroundColorCounts = new Map<string, number>();
26
+ let totalLinesWithBackground = 0;
27
+
28
+ // Count background colors across all lines
29
+ for (const line of ansiOutput.outputLines) {
30
+ let lineBackgroundColor: string | undefined = undefined;
31
+
32
+ // Get the background color for this line (from any run that has one)
33
+ for (const run of line.outputRuns) {
34
+ if (run.format?.backgroundColor) {
35
+ lineBackgroundColor = run.format.backgroundColor;
36
+ break;
37
+ }
38
+ }
39
+
40
+ if (lineBackgroundColor) {
41
+ totalLinesWithBackground++;
42
+ backgroundColorCounts.set(
43
+ lineBackgroundColor,
44
+ (backgroundColorCounts.get(lineBackgroundColor) || 0) + 1,
45
+ );
46
+ }
47
+ }
48
+
49
+ // Return undefined if no lines have backgrounds
50
+ if (totalLinesWithBackground === 0) {
51
+ return undefined;
52
+ }
53
+
54
+ // Compute percentages for each background color
55
+ const backgroundColorPercentages = new Map<string, number>();
56
+ for (const [color, count] of backgroundColorCounts.entries()) {
57
+ backgroundColorPercentages.set(color, count / totalLinesWithBackground);
58
+ }
59
+
60
+ // Find the color with the highest percentage
61
+ let dominantColor: string | undefined = undefined;
62
+ let maxPercentage = 0;
63
+
64
+ for (const [color, percentage] of backgroundColorPercentages.entries()) {
65
+ if (percentage > maxPercentage) {
66
+ maxPercentage = percentage;
67
+ dominantColor = color;
68
+ }
69
+ }
70
+
71
+ // Return the color if it appears in more than 80% of lines
72
+ return maxPercentage > 0.8 ? dominantColor : undefined;
73
+ };
74
+
75
+ const uniformBackgroundColor = getUniformBackgroundColor();
76
+ const backgroundStyle = uniformBackgroundColor
77
+ ? computeForegroundBackgroundColor(kBackground, uniformBackgroundColor)
78
+ : {};
79
+
80
+ let firstOutput = false;
81
+ return (
82
+ <div
83
+ className={clsx(styles.ansiDisplayContainer, className)}
84
+ style={{ ...style }}
85
+ >
86
+ <ToolButton
87
+ className={clsx(styles.ansiDisplayToggle, "text-size-smallest")}
88
+ icon="bi bi-code-slash"
89
+ label=""
90
+ latched={showRaw}
91
+ onClick={() => setShowRaw(!showRaw)}
92
+ title={showRaw ? "Show rendered output" : "Show raw output"}
93
+ />
94
+ {showRaw ? (
95
+ <pre className={clsx(styles.ansiDisplay, styles.ansiDisplayRaw)}>
96
+ {output}
97
+ </pre>
98
+ ) : (
99
+ <div className={clsx(styles.ansiDisplay)} style={backgroundStyle}>
100
+ {ansiOutput.outputLines.map((line, index) => {
101
+ firstOutput = firstOutput || !!line.outputRuns.length;
102
+ return (
103
+ <div key={index} className={clsx(styles.ansiDisplayLine)}>
104
+ {!line.outputRuns.length ? (
105
+ firstOutput ? (
106
+ <br />
107
+ ) : null
108
+ ) : (
109
+ line.outputRuns.map((outputRun) => (
110
+ <OutputRun key={outputRun.id} run={outputRun} />
111
+ ))
112
+ )}
113
+ </div>
114
+ );
115
+ })}
116
+ </div>
117
+ )}
118
+ </div>
119
+ );
120
+ };
121
+
122
+ const kForeground = 0;
123
+ const kBackground = 1;
124
+
125
+ interface OutputRunProps {
126
+ run: ANSIOutputRun;
127
+ }
128
+
129
+ const OutputRun: FC<OutputRunProps> = ({ run }) => {
130
+ // Render.
131
+ return <span style={computeCSSProperties(run)}>{run.text}</span>;
132
+ };
133
+
134
+ const computeCSSProperties = (outputRun: ANSIOutputRun) => {
135
+ return !outputRun.format
136
+ ? {}
137
+ : {
138
+ ...computeStyles(outputRun.format.styles || []),
139
+ ...computeForegroundBackgroundColor(
140
+ kForeground,
141
+ outputRun.format.foregroundColor,
142
+ ),
143
+ ...computeForegroundBackgroundColor(
144
+ kBackground,
145
+ outputRun.format.backgroundColor,
146
+ ),
147
+ };
148
+ };
149
+
150
+ const computeStyles = (styles: ANSIStyle[]) => {
151
+ let cssProperties = {};
152
+ if (styles) {
153
+ styles.forEach((style) => {
154
+ switch (style) {
155
+ // Bold.
156
+ case ANSIStyle.Bold:
157
+ cssProperties = { ...cssProperties, ...{ fontWeight: "bold" } };
158
+ break;
159
+
160
+ // Dim.
161
+ case ANSIStyle.Dim:
162
+ cssProperties = { ...cssProperties, ...{ fontWeight: "lighter" } };
163
+ break;
164
+
165
+ // Italic.
166
+ case ANSIStyle.Italic:
167
+ cssProperties = { ...cssProperties, ...{ fontStyle: "italic" } };
168
+ break;
169
+
170
+ // Underlined.
171
+ case ANSIStyle.Underlined:
172
+ cssProperties = {
173
+ ...cssProperties,
174
+ ...{
175
+ textDecorationLine: "underline",
176
+ textDecorationStyle: "solid",
177
+ },
178
+ };
179
+ break;
180
+
181
+ // Slow blink.
182
+ case ANSIStyle.SlowBlink:
183
+ cssProperties = {
184
+ ...cssProperties,
185
+ ...{ animation: "ansi-display-run-blink 1s linear infinite" },
186
+ };
187
+ break;
188
+
189
+ // Rapid blink.
190
+ case ANSIStyle.RapidBlink:
191
+ cssProperties = {
192
+ ...cssProperties,
193
+ ...{ animation: "ansi-display-run-blink 0.5s linear infinite" },
194
+ };
195
+ break;
196
+
197
+ // Hidden.
198
+ case ANSIStyle.Hidden:
199
+ cssProperties = { ...cssProperties, ...{ visibility: "hidden" } };
200
+ break;
201
+
202
+ // CrossedOut.
203
+ case ANSIStyle.CrossedOut:
204
+ cssProperties = {
205
+ ...cssProperties,
206
+ ...{
207
+ textDecorationLine: "line-through",
208
+ textDecorationStyle: "solid",
209
+ },
210
+ };
211
+ break;
212
+
213
+ // TODO Fraktur
214
+
215
+ // DoubleUnderlined.
216
+ case ANSIStyle.DoubleUnderlined:
217
+ cssProperties = {
218
+ ...cssProperties,
219
+ ...{
220
+ textDecorationLine: "underline",
221
+ textDecorationStyle: "double",
222
+ },
223
+ };
224
+ break;
225
+
226
+ // TODO Framed
227
+ // TODO Encircled
228
+ // TODO Overlined
229
+ // TODO Superscript
230
+ // TODO Subscript
231
+ }
232
+ });
233
+ }
234
+
235
+ return cssProperties;
236
+ };
237
+
238
+ const computeForegroundBackgroundColor = (
239
+ colorType: number,
240
+ color?: string,
241
+ ) => {
242
+ switch (color) {
243
+ // Undefined.
244
+ case undefined:
245
+ return {};
246
+
247
+ // One of the standard colors.
248
+ case ANSIColor.Black:
249
+ case ANSIColor.Red:
250
+ case ANSIColor.Green:
251
+ case ANSIColor.Yellow:
252
+ case ANSIColor.Blue:
253
+ case ANSIColor.Magenta:
254
+ case ANSIColor.Cyan:
255
+ case ANSIColor.White:
256
+ case ANSIColor.BrightBlack:
257
+ case ANSIColor.BrightRed:
258
+ case ANSIColor.BrightGreen:
259
+ case ANSIColor.BrightYellow:
260
+ case ANSIColor.BrightBlue:
261
+ case ANSIColor.BrightMagenta:
262
+ case ANSIColor.BrightCyan:
263
+ case ANSIColor.BrightWhite:
264
+ if (colorType === kForeground) {
265
+ return { color: `var(--${color})` };
266
+ } else {
267
+ return { background: `var(--${color})` };
268
+ }
269
+
270
+ // TODO@softwarenerd - This isn't hooked up.
271
+ default:
272
+ if (colorType === kForeground) {
273
+ return { color: color };
274
+ } else {
275
+ return { background: color };
276
+ }
277
+ }
278
+ };
data/conda_envs/evalclaw/lib/python3.11/site-packages/inspect_ai/_view/www/src/components/AsciinemaPlayer.tsx ADDED
@@ -0,0 +1,86 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import * as AsciicinemaPlayerJS from "asciinema-player";
2
+ import "asciinema-player/dist/bundle/asciinema-player.css";
3
+ import { CSSProperties, FC, useEffect, useRef } from "react";
4
+
5
+ interface AsciinemaPlayerProps {
6
+ id?: string;
7
+ inputUrl: string;
8
+ outputUrl: string;
9
+ timingUrl: string;
10
+ rows?: number;
11
+ cols?: number;
12
+ fit?: string;
13
+ style?: CSSProperties;
14
+ speed?: number;
15
+ autoPlay?: boolean;
16
+ loop?: boolean;
17
+ theme?: string;
18
+ idleTimeLimit?: number;
19
+ className?: string;
20
+ }
21
+
22
+ export const AsciinemaPlayer: FC<AsciinemaPlayerProps> = ({
23
+ id,
24
+ rows,
25
+ cols,
26
+ inputUrl,
27
+ outputUrl,
28
+ timingUrl,
29
+ fit,
30
+ speed,
31
+ autoPlay,
32
+ loop,
33
+ theme,
34
+ idleTimeLimit = 2,
35
+ style,
36
+ }) => {
37
+ const playerContainerRef = useRef<HTMLDivElement>(null);
38
+
39
+ useEffect(() => {
40
+ if (!playerContainerRef.current) return;
41
+
42
+ const player = AsciicinemaPlayerJS.create(
43
+ {
44
+ url: [timingUrl, outputUrl, inputUrl],
45
+ parser: "typescript",
46
+ },
47
+ playerContainerRef.current,
48
+ {
49
+ rows,
50
+ cols,
51
+ autoPlay,
52
+ loop,
53
+ theme,
54
+ speed,
55
+ idleTimeLimit,
56
+ fit,
57
+ },
58
+ );
59
+
60
+ player.play();
61
+
62
+ return () => {
63
+ player.dispose();
64
+ };
65
+ }, [
66
+ timingUrl,
67
+ outputUrl,
68
+ inputUrl,
69
+ rows,
70
+ cols,
71
+ autoPlay,
72
+ loop,
73
+ theme,
74
+ speed,
75
+ idleTimeLimit,
76
+ fit,
77
+ ]);
78
+
79
+ return (
80
+ <div
81
+ id={`asciinema-player-${id || "default"}`}
82
+ ref={playerContainerRef}
83
+ style={{ ...style }}
84
+ />
85
+ );
86
+ };
data/conda_envs/evalclaw/lib/python3.11/site-packages/inspect_ai/_view/www/src/components/Card.css ADDED
@@ -0,0 +1,62 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .card-header-container {
2
+ display: grid;
3
+ grid-template-columns: max-content auto;
4
+ column-gap: 0em;
5
+ padding: 0.5em 0.5em 0.5em 0.5em;
6
+ font-size: var(--inspect-font-size-small);
7
+ font-weight: 600;
8
+ border-bottom: solid 1px var(--bs-light-border-subtle);
9
+ }
10
+
11
+ .card-header-icon {
12
+ padding-right: 0.2rem;
13
+ }
14
+
15
+ .card-body {
16
+ background-color: var(--bs-body-bg);
17
+
18
+ padding: 0.5em;
19
+ }
20
+
21
+ .card {
22
+ background-color: var(--bs-light-bg-subtle);
23
+ border: solid 1px var(--bs-light-border-subtle);
24
+ border-radius: var(--bs-border-radius);
25
+ }
26
+
27
+ .card-collaping-header {
28
+ border-bottom: none;
29
+ }
30
+
31
+ .card-collapsing-header-container {
32
+ justify-content: space-between;
33
+ align-items: center;
34
+ }
35
+
36
+ .card-collapsing-header-icon {
37
+ flex: 0 0 content;
38
+ padding-right: 0.5rem;
39
+ }
40
+
41
+ .card-collapsing-header-contents {
42
+ color: var(--body-color);
43
+ opacity: 0.8;
44
+ flex: 1 1 auto;
45
+ font-size: var(--inspect-font-size-smaller);
46
+ padding-right: 0;
47
+ padding-left: 0;
48
+ transition: opacity 0.2s ease-out;
49
+ display: flex;
50
+ justify-content: space-between;
51
+ }
52
+
53
+ .card-collapsing-header-toggle {
54
+ flex: 0 1 1em;
55
+ text-align: right;
56
+ padding: 0 0.5em 0.1em 0.5em;
57
+ font-size: var(--inspect-font-size-smaller);
58
+ }
59
+
60
+ .card-body.card-no-padding {
61
+ padding: 0;
62
+ }
data/conda_envs/evalclaw/lib/python3.11/site-packages/inspect_ai/_view/www/src/components/Card.tsx ADDED
@@ -0,0 +1,125 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import clsx from "clsx";
2
+ import { FC, ReactNode } from "react";
3
+ import { ApplicationIcons } from "../app/appearance/icons";
4
+ import "./Card.css";
5
+
6
+ interface CardHeaderProps {
7
+ id?: string;
8
+ icon?: string;
9
+ label?: string;
10
+ className?: string;
11
+ children?: ReactNode;
12
+ }
13
+
14
+ interface CardBodyProps {
15
+ id?: string;
16
+ children?: ReactNode;
17
+ className?: string | string[];
18
+ padded?: boolean;
19
+ }
20
+
21
+ interface CardProps {
22
+ id?: string;
23
+ children?: ReactNode;
24
+ className?: string | string[];
25
+ }
26
+
27
+ interface CardCollapsingHeaderProps {
28
+ id: string;
29
+ icon: string;
30
+ label: string;
31
+ cardBodyId: string;
32
+ children?: ReactNode;
33
+ }
34
+
35
+ export const CardHeader: FC<CardHeaderProps> = ({
36
+ id,
37
+ icon,
38
+ label,
39
+ className,
40
+ children,
41
+ }) => {
42
+ return (
43
+ <div
44
+ className={clsx("card-header-container", "text-style-label", className)}
45
+ id={id || ""}
46
+ >
47
+ {icon ? (
48
+ <i className={clsx("card-header-icon", icon)}></i>
49
+ ) : (
50
+ <span className={"card-header-icon"}></span>
51
+ )}
52
+ {label ? label : ""} {children}
53
+ </div>
54
+ );
55
+ };
56
+
57
+ export const CardBody: FC<CardBodyProps> = ({
58
+ id,
59
+ children,
60
+ className,
61
+ padded = true,
62
+ }) => {
63
+ return (
64
+ <div
65
+ className={clsx(
66
+ "card-body",
67
+ className,
68
+ !padded ? "card-no-padding" : undefined,
69
+ )}
70
+ id={id || ""}
71
+ >
72
+ {children}
73
+ </div>
74
+ );
75
+ };
76
+
77
+ export const Card: FC<CardProps> = ({ id, children, className }) => {
78
+ return (
79
+ <div className={clsx("card", className)} id={id}>
80
+ {children}
81
+ </div>
82
+ );
83
+ };
84
+
85
+ export const CardCollapsingHeader: FC<CardCollapsingHeaderProps> = ({
86
+ id,
87
+ icon,
88
+ label,
89
+ cardBodyId,
90
+ children,
91
+ }) => {
92
+ return (
93
+ <CardHeader
94
+ id={id}
95
+ className={clsx(
96
+ "card-collaping-header",
97
+ "container-fluid",
98
+ "collapse",
99
+ "show",
100
+ "do-not-collapse-self",
101
+ )}
102
+ >
103
+ <div
104
+ className={clsx("card-collaping-header-container", "row", "row-cols-3")}
105
+ data-bs-toggle="collapse"
106
+ data-bs-target={`#${cardBodyId}`}
107
+ aria-expanded="false"
108
+ aria-controls={cardBodyId}
109
+ >
110
+ <div className={"card-collaping-header-icon"}>
111
+ <i className={icon}></i>{" "}
112
+ <span className="hide-when-collapsed">{label}</span>
113
+ </div>
114
+ <div className="hide-when-expanded card-collapsing-header-content">
115
+ {children}
116
+ </div>
117
+ <div className={"card-collapsing-header-toggle"}>
118
+ <i
119
+ className={clsx(ApplicationIcons["toggle-right"], "toggle-rotated")}
120
+ ></i>
121
+ </div>
122
+ </div>
123
+ </CardHeader>
124
+ );
125
+ };
data/conda_envs/evalclaw/lib/python3.11/site-packages/inspect_ai/_view/www/src/components/CodePanel.module.css ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .panel {
2
+ margin: 0rem;
3
+ overflow-y: scroll;
4
+ overflow-x: auto;
5
+ }
6
+
7
+ .code {
8
+ padding: 0;
9
+ }
10
+
11
+ .code code {
12
+ white-space: pre-wrap !important;
13
+ overflow-wrap: break-word !important;
14
+ word-break: break-all !important;
15
+ }
data/conda_envs/evalclaw/lib/python3.11/site-packages/inspect_ai/_view/www/src/components/CodePanel.tsx ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { FC, useRef } from "react";
2
+
3
+ import clsx from "clsx";
4
+
5
+ import styles from "./CodePanel.module.css";
6
+ import { usePrismHighlight } from "./prism";
7
+
8
+ interface CodePanelProps {
9
+ code: string;
10
+ language?: string;
11
+ }
12
+
13
+ export const CodePanel: FC<CodePanelProps> = ({ code, language = "json" }) => {
14
+ // Syntax highlighting
15
+ const codeContainerRef = useRef<HTMLDivElement>(null);
16
+ usePrismHighlight(codeContainerRef, code.length);
17
+ return (
18
+ <div ref={codeContainerRef} className={clsx(styles.panel)}>
19
+ <pre className={clsx(styles.code)}>
20
+ <code className={clsx(`language-${language}`)}>{code}</code>
21
+ </pre>
22
+ </div>
23
+ );
24
+ };
data/conda_envs/evalclaw/lib/python3.11/site-packages/inspect_ai/_view/www/src/components/CopyButton.module.css ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .copyButton {
2
+ border: none;
3
+ background-color: inherit;
4
+ opacity: 0.5;
5
+ padding-top: 0;
6
+ transition: opacity 0.2s;
7
+ }
8
+
9
+ .copyButton:hover {
10
+ opacity: 0.75;
11
+ }
data/conda_envs/evalclaw/lib/python3.11/site-packages/inspect_ai/_view/www/src/components/CopyButton.tsx ADDED
@@ -0,0 +1,56 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import clsx from "clsx";
2
+ import { JSX, useState } from "react";
3
+ import { ApplicationIcons } from "../app/appearance/icons";
4
+ import styles from "./CopyButton.module.css";
5
+
6
+ interface CopyButtonProps {
7
+ icon?: string;
8
+ value: string;
9
+ onCopySuccess?: () => void;
10
+ onCopyError?: (error: Error) => void;
11
+ className?: string;
12
+ ariaLabel?: string;
13
+ }
14
+
15
+ export const CopyButton = ({
16
+ icon = ApplicationIcons.copy,
17
+ value,
18
+ onCopySuccess,
19
+ onCopyError,
20
+ className = "",
21
+ ariaLabel = "Copy to clipboard",
22
+ }: CopyButtonProps): JSX.Element => {
23
+ const [isCopied, setIsCopied] = useState(false);
24
+
25
+ const handleClick = async (): Promise<void> => {
26
+ try {
27
+ await navigator.clipboard.writeText(value);
28
+ setIsCopied(true);
29
+ onCopySuccess?.();
30
+
31
+ // Reset copy state after delay
32
+ setTimeout(() => {
33
+ setIsCopied(false);
34
+ }, 1250);
35
+ } catch (error) {
36
+ onCopyError?.(
37
+ error instanceof Error ? error : new Error("Failed to copy"),
38
+ );
39
+ }
40
+ };
41
+
42
+ return (
43
+ <button
44
+ type="button"
45
+ className={clsx("copy-button", styles.copyButton, className)}
46
+ onClick={handleClick}
47
+ aria-label={ariaLabel}
48
+ disabled={isCopied}
49
+ >
50
+ <i
51
+ className={isCopied ? `${ApplicationIcons.confirm} primary` : icon}
52
+ aria-hidden="true"
53
+ />
54
+ </button>
55
+ );
56
+ };
data/conda_envs/evalclaw/lib/python3.11/site-packages/inspect_ai/_view/www/src/components/DownloadButton.css ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ .download-button {
2
+ margin-top: 3em;
3
+ font-size: var(--inspect-font-size-small);
4
+ }
data/conda_envs/evalclaw/lib/python3.11/site-packages/inspect_ai/_view/www/src/components/DownloadButton.tsx ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { FC } from "react";
2
+ import api from "../client/api/index";
3
+ import "./DownloadButton.css";
4
+
5
+ interface DownloadButtonProps {
6
+ label: string;
7
+ fileName: string;
8
+ fileContents: string | Blob | ArrayBuffer | ArrayBufferView<ArrayBuffer>;
9
+ }
10
+
11
+ export const DownloadButton: FC<DownloadButtonProps> = ({
12
+ label,
13
+ fileName,
14
+ fileContents,
15
+ }) => {
16
+ return (
17
+ <button
18
+ className={"btn btn-outline-primary download-button"}
19
+ onClick={async () => {
20
+ await api.download_file(fileName, fileContents);
21
+ }}
22
+ >
23
+ {label}
24
+ </button>
25
+ );
26
+ };
data/conda_envs/evalclaw/lib/python3.11/site-packages/inspect_ai/_view/www/src/components/DownloadLogButton.tsx ADDED
@@ -0,0 +1,80 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import clsx from "clsx";
2
+ import { JSX, useState } from "react";
3
+ import { ApplicationIcons } from "../app/appearance/icons";
4
+ import { useStore } from "../state/store";
5
+ import styles from "./DownloadLogButton.module.css";
6
+
7
+ type DownloadState = "idle" | "downloading" | "success" | "error";
8
+
9
+ interface DownloadLogButtonProps {
10
+ log_file: string;
11
+ className?: string;
12
+ ariaLabel?: string;
13
+ }
14
+
15
+ export const DownloadLogButton = ({
16
+ log_file,
17
+ className = "",
18
+ ariaLabel = "Download log as EVAL",
19
+ }: DownloadLogButtonProps): JSX.Element => {
20
+ const [downloadState, setDownloadState] = useState<DownloadState>("idle");
21
+ const api = useStore((state) => state.api);
22
+
23
+ const handleClick = async (): Promise<void> => {
24
+ if (!api?.download_log) return;
25
+
26
+ setDownloadState("downloading");
27
+
28
+ try {
29
+ await api.download_log(log_file);
30
+ setDownloadState("success");
31
+ } catch (error) {
32
+ console.error("Failed to download log:", error);
33
+ setDownloadState("error");
34
+ } finally {
35
+ setTimeout(() => {
36
+ setDownloadState("idle");
37
+ }, 1250);
38
+ }
39
+ };
40
+
41
+ const getIcon = (): string => {
42
+ switch (downloadState) {
43
+ case "downloading":
44
+ return ApplicationIcons.loading;
45
+ case "success":
46
+ return ApplicationIcons.confirm;
47
+ case "error":
48
+ return ApplicationIcons.error;
49
+ default:
50
+ return ApplicationIcons.downloadLog;
51
+ }
52
+ };
53
+
54
+ const getIconClass = (): string => {
55
+ const icon = getIcon();
56
+ if (downloadState === "success") {
57
+ return `${icon} primary`;
58
+ }
59
+ if (downloadState === "error") {
60
+ return `${icon} text-danger`;
61
+ }
62
+ return icon;
63
+ };
64
+
65
+ return (
66
+ <button
67
+ type="button"
68
+ className={clsx(
69
+ "download-log-button",
70
+ styles.downloadLogButton,
71
+ className,
72
+ )}
73
+ onClick={handleClick}
74
+ aria-label={ariaLabel}
75
+ disabled={downloadState !== "idle"}
76
+ >
77
+ <i className={getIconClass()} aria-hidden="true" />
78
+ </button>
79
+ );
80
+ };
data/conda_envs/evalclaw/lib/python3.11/site-packages/inspect_ai/_view/www/src/components/DownloadPanel.css ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ .download-panel {
2
+ display: grid;
3
+ grid-template-rows: content content;
4
+ padding-top: 3em;
5
+ justify-items: center;
6
+ }
7
+
8
+ .download-panel-message {
9
+ font-size: var(--inspect-font-size-small);
10
+ }
data/conda_envs/evalclaw/lib/python3.11/site-packages/inspect_ai/_view/www/src/components/DownloadPanel.tsx ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { FC } from "react";
2
+ import { DownloadButton } from "../components/DownloadButton";
3
+ import "./DownloadPanel.css";
4
+
5
+ interface DownloadPanelProps {
6
+ message: string;
7
+ buttonLabel: string;
8
+ fileName: string;
9
+ fileContents: string | Blob | ArrayBuffer | ArrayBufferView<ArrayBuffer>;
10
+ }
11
+
12
+ export const DownloadPanel: FC<DownloadPanelProps> = ({
13
+ message,
14
+ buttonLabel,
15
+ fileName,
16
+ fileContents,
17
+ }) => {
18
+ return (
19
+ <div>
20
+ <div className={"download-panel"}>
21
+ <div className={"download-panel-message"}>{message}</div>
22
+ <DownloadButton
23
+ label={buttonLabel}
24
+ fileName={fileName}
25
+ fileContents={fileContents}
26
+ />
27
+ </div>
28
+ </div>
29
+ );
30
+ };
data/conda_envs/evalclaw/lib/python3.11/site-packages/inspect_ai/_view/www/src/components/EmptyPanel.css ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .empty-panel {
2
+ width: 100%;
3
+ }
4
+
5
+ .empty-panel .container {
6
+ display: flex;
7
+ text-align: center;
8
+ flex: 0 0 content;
9
+ align-items: center;
10
+ justify-content: center;
11
+ height: 10rem;
12
+ }
data/conda_envs/evalclaw/lib/python3.11/site-packages/inspect_ai/_view/www/src/components/EmptyPanel.tsx ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { FC, ReactNode } from "react";
2
+
3
+ interface EmptyPanelProps {
4
+ children?: ReactNode;
5
+ }
6
+
7
+ export const EmptyPanel: FC<EmptyPanelProps> = ({ children }) => {
8
+ return (
9
+ <div className={"empty-panel"}>
10
+ <div className={"container"}>
11
+ <div>{children}</div>
12
+ </div>
13
+ </div>
14
+ );
15
+ };
data/conda_envs/evalclaw/lib/python3.11/site-packages/inspect_ai/_view/www/src/components/ErrorPanel.css ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .error-panel {
2
+ flex-direction: column;
3
+ min-height: 10rem;
4
+ margin-top: 4rem;
5
+ margin-bottom: 4em;
6
+ width: 100vw;
7
+ }
8
+ .error-panel-heading {
9
+ font-size: var(--inspect-font-size-larger);
10
+ }
11
+
12
+ .error-panel-body {
13
+ display: inline-block;
14
+ font-size: var(--inspect-font-size-smaller);
15
+ margin-top: 1rem;
16
+ border: solid 1px var(--bs-border-color);
17
+ border-radius: var(--bs-border-radius);
18
+ padding: 1em;
19
+ max-width: 80%;
20
+ }
21
+
22
+ .error-panel-stack {
23
+ font-size: var(--inspect-font-size-smaller);
24
+ white-space: prewrap;
25
+ }
26
+
27
+ .centered-flex {
28
+ display: flex;
29
+ flex: 0 0 content;
30
+ align-items: center;
31
+ justify-content: center;
32
+ }
33
+
34
+ .error-icon {
35
+ margin-right: 0.5rem;
36
+ color: var(--bs-red);
37
+ }
data/conda_envs/evalclaw/lib/python3.11/site-packages/inspect_ai/_view/www/src/components/ErrorPanel.tsx ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { FC } from "react";
2
+ import { ApplicationIcons } from "../app/appearance/icons";
3
+ import "./ErrorPanel.css";
4
+
5
+ export interface DisplayError {
6
+ message: string;
7
+ stack?: string;
8
+ displayStack?: boolean;
9
+ }
10
+
11
+ interface ErrorPanelProps {
12
+ title: string;
13
+ error: DisplayError;
14
+ }
15
+
16
+ export const ErrorPanel: FC<ErrorPanelProps> = ({ title, error }) => {
17
+ const message = error.message;
18
+ const stack = error.stack;
19
+
20
+ return (
21
+ <div className={"error-panel centered-flex"}>
22
+ <div className={"error-panel-heading centered-flex"}>
23
+ <div>
24
+ <i className={`${ApplicationIcons.error} error-icon`}></i>
25
+ </div>
26
+ <div>{title || ""}</div>
27
+ </div>
28
+ <div className={"error-panel-body"}>
29
+ <div>
30
+ Error: {message || ""}
31
+ {stack && error.displayStack !== false && (
32
+ <pre className={"error-panel-stack"}>
33
+ <code>at {stack}</code>
34
+ </pre>
35
+ )}
36
+ </div>
37
+ </div>
38
+ </div>
39
+ );
40
+ };
data/conda_envs/evalclaw/lib/python3.11/site-packages/inspect_ai/_view/www/src/components/ExpandablePanel.module.css ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .expandablePanel {
2
+ position: relative;
3
+ }
4
+
5
+ .expandableBordered {
6
+ border: solid var(--bs-light-border-subtle) 1px;
7
+ padding: 0.5em;
8
+ }
9
+
10
+ .expandableTogglable {
11
+ margin-bottom: 1em;
12
+ }
13
+
14
+ .expandableContents {
15
+ font-size: var(--inspect-font-size-base);
16
+ }
17
+
18
+ .expandableCollapsed {
19
+ overflow: hidden;
20
+ }
21
+
22
+ .moreToggle {
23
+ display: flex;
24
+ margin-top: 0;
25
+ height: 20px;
26
+ background-color: var(--bs-body-bg);
27
+ border-radius: 5px;
28
+ border: solid var(--bs-light-border-subtle) 1px;
29
+ color: var(--bs-link-color);
30
+ }
31
+
32
+ .moreToggle.bordered {
33
+ border-top: solid var(--bs-light-border-subtle) 1px;
34
+ }
35
+
36
+ .moreToggleButton {
37
+ font-size: var(--inspect-font-size-smaller);
38
+ border: none;
39
+ padding: 0rem 0.5rem;
40
+ }
41
+
42
+ .separator {
43
+ height: 1px;
44
+ background-color: var(--bs-light-border-subtle);
45
+ margin-top: -1px;
46
+ }
47
+
48
+ .moreToggle.inlineRight {
49
+ position: absolute;
50
+ bottom: 0.25em;
51
+ right: 0.25em;
52
+ }
53
+
54
+ .moreToggle.blockLeft {
55
+ width: fit-content;
56
+ margin-top: 0.2em;
57
+ margin-bottom: 0.5em;
58
+ }
data/conda_envs/evalclaw/lib/python3.11/site-packages/inspect_ai/_view/www/src/components/ExpandablePanel.tsx ADDED
@@ -0,0 +1,150 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import clsx from "clsx";
2
+ import {
3
+ CSSProperties,
4
+ FC,
5
+ memo,
6
+ ReactNode,
7
+ useCallback,
8
+ useRef,
9
+ useState,
10
+ } from "react";
11
+ import { useCollapsedState } from "../state/hooks";
12
+ import { useResizeObserver } from "../utils/dom";
13
+ import styles from "./ExpandablePanel.module.css";
14
+
15
+ interface ExpandablePanelProps {
16
+ id: string;
17
+ collapse: boolean;
18
+ border?: boolean;
19
+ lines?: number;
20
+ children?: ReactNode;
21
+ className?: string | string[];
22
+ togglePosition?: "inline-right" | "block-left";
23
+ }
24
+
25
+ export const ExpandablePanel: FC<ExpandablePanelProps> = memo(
26
+ ({
27
+ id,
28
+ collapse,
29
+ border,
30
+ lines = 15,
31
+ children,
32
+ className,
33
+ togglePosition: layout = "inline-right",
34
+ }) => {
35
+ const [collapsed, setCollapsed] = useCollapsedState(id, collapse);
36
+
37
+ const [showToggle, setShowToggle] = useState(false);
38
+ const baseFontSizeRef = useRef<number>(0);
39
+
40
+ const checkOverflow = useCallback(
41
+ (entry: ResizeObserverEntry) => {
42
+ const element = entry.target as HTMLDivElement;
43
+
44
+ // Calculate line height if we haven't yet
45
+ if (baseFontSizeRef.current === 0) {
46
+ const computedStyle = window.getComputedStyle(element);
47
+ const rootFontSize = parseFloat(computedStyle.fontSize);
48
+ baseFontSizeRef.current = rootFontSize;
49
+ }
50
+ const maxCollapsedHeight = baseFontSizeRef.current * lines;
51
+ const contentHeight = element.scrollHeight;
52
+
53
+ setShowToggle(contentHeight > maxCollapsedHeight);
54
+ },
55
+ [lines],
56
+ );
57
+ const contentRef = useResizeObserver(checkOverflow);
58
+
59
+ const baseStyles = {
60
+ overflow: "hidden",
61
+ ...(collapsed && {
62
+ maxHeight: `${lines}rem`,
63
+ }),
64
+ };
65
+
66
+ return (
67
+ <div className={clsx(className)}>
68
+ <div
69
+ style={baseStyles}
70
+ ref={contentRef}
71
+ data-expandable-panel="true"
72
+ className={clsx(
73
+ styles.expandablePanel,
74
+ collapsed ? styles.expandableCollapsed : undefined,
75
+ border ? styles.expandableBordered : undefined,
76
+ showToggle ? styles.padBottom : undefined,
77
+ className,
78
+ )}
79
+ >
80
+ {children}
81
+ {showToggle && layout == "inline-right" && (
82
+ <>
83
+ <MoreToggle
84
+ collapsed={collapsed}
85
+ setCollapsed={setCollapsed}
86
+ border={!border}
87
+ position="inline-right"
88
+ />
89
+ </>
90
+ )}
91
+ </div>
92
+ {showToggle && layout === "block-left" && (
93
+ <>
94
+ <MoreToggle
95
+ collapsed={collapsed}
96
+ setCollapsed={setCollapsed}
97
+ border={!border}
98
+ position="block-left"
99
+ />
100
+ </>
101
+ )}
102
+
103
+ {showToggle && layout == "inline-right" && (
104
+ <div className={clsx(styles.separator)}></div>
105
+ )}
106
+ </div>
107
+ );
108
+ },
109
+ );
110
+
111
+ interface MoreToggleProps {
112
+ collapsed: boolean;
113
+ border: boolean;
114
+ setCollapsed: (collapsed: boolean) => void;
115
+ style?: CSSProperties;
116
+ position: "inline-right" | "block-left";
117
+ }
118
+
119
+ const MoreToggle: FC<MoreToggleProps> = ({
120
+ collapsed,
121
+ border,
122
+ setCollapsed,
123
+ style,
124
+ position,
125
+ }) => {
126
+ const text = collapsed ? "more" : "less";
127
+ const handleClick = useCallback(() => {
128
+ setCollapsed(!collapsed);
129
+ }, [setCollapsed, collapsed]);
130
+
131
+ return (
132
+ <div
133
+ className={clsx(
134
+ styles.moreToggle,
135
+ border ? styles.bordered : undefined,
136
+ position === "inline-right" ? styles.inlineRight : styles.blockLeft,
137
+ )}
138
+ style={style}
139
+ >
140
+ <button
141
+ className={clsx("btn", styles.moreToggleButton, "text-size-smallest")}
142
+ onClick={handleClick}
143
+ >
144
+ {text}...
145
+ </button>
146
+ </div>
147
+ );
148
+ };
149
+
150
+ export default ExpandablePanel;
data/conda_envs/evalclaw/lib/python3.11/site-packages/inspect_ai/_view/www/src/components/ExtendedFindContext.tsx ADDED
@@ -0,0 +1,137 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import {
2
+ createContext,
3
+ ReactNode,
4
+ useCallback,
5
+ useContext,
6
+ useRef,
7
+ } from "react";
8
+
9
+ // The search context provides global search assistance. We generally use the
10
+ // browser to perform searches using 'find', but this allows for virtual lists
11
+ // and other virtualized components to register themselves to be notified when a
12
+ // search is requested and no matches are found. In this case, they can 'look ahead'
13
+ // and scroll an item into view if it is likely/certain to contain the search term.
14
+
15
+ // Find will call this when an extended find is requested
16
+ export type ExtendedFindFn = (
17
+ term: string,
18
+ direction: "forward" | "backward",
19
+ onContentReady: () => void,
20
+ ) => Promise<boolean>;
21
+
22
+ // Count total matches across all data items
23
+ export type ExtendedCountFn = (term: string) => number;
24
+
25
+ // The context provides an extended search function and a way for the active
26
+ // virtual lists to register themselves.
27
+ interface ExtendedFindContextType {
28
+ extendedFindTerm: (
29
+ term: string,
30
+ direction: "forward" | "backward",
31
+ ) => Promise<boolean>;
32
+ registerVirtualList: (id: string, searchFn: ExtendedFindFn) => () => void;
33
+ countAllMatches: (term: string) => number;
34
+ registerMatchCounter: (id: string, countFn: ExtendedCountFn) => () => void;
35
+ }
36
+
37
+ const ExtendedFindContext = createContext<ExtendedFindContextType | null>(null);
38
+
39
+ interface ExtendedFindProviderProps {
40
+ children: ReactNode;
41
+ }
42
+
43
+ export const ExtendedFindProvider = ({
44
+ children,
45
+ }: ExtendedFindProviderProps) => {
46
+ const virtualLists = useRef<Map<string, ExtendedFindFn>>(new Map());
47
+ const matchCounters = useRef<Map<string, ExtendedCountFn>>(new Map());
48
+
49
+ const extendedFindTerm = useCallback(
50
+ async (
51
+ term: string,
52
+ direction: "forward" | "backward",
53
+ ): Promise<boolean> => {
54
+ for (const [, searchFn] of virtualLists.current) {
55
+ const found = await new Promise<boolean>((resolve) => {
56
+ let callbackFired = false;
57
+
58
+ const onContentReady = () => {
59
+ if (!callbackFired) {
60
+ callbackFired = true;
61
+ resolve(true);
62
+ }
63
+ };
64
+
65
+ searchFn(term, direction, onContentReady)
66
+ .then((found) => {
67
+ if (!found && !callbackFired) {
68
+ callbackFired = true;
69
+ resolve(false);
70
+ }
71
+ })
72
+ .catch(() => {
73
+ if (!callbackFired) {
74
+ callbackFired = true;
75
+ resolve(false);
76
+ }
77
+ });
78
+ });
79
+
80
+ if (found) {
81
+ return true;
82
+ }
83
+ }
84
+ return false;
85
+ },
86
+ [],
87
+ );
88
+
89
+ const registerVirtualList = useCallback(
90
+ (id: string, searchFn: ExtendedFindFn): (() => void) => {
91
+ virtualLists.current.set(id, searchFn);
92
+ return () => {
93
+ virtualLists.current.delete(id);
94
+ };
95
+ },
96
+ [],
97
+ );
98
+
99
+ const countAllMatches = useCallback((term: string): number => {
100
+ let total = 0;
101
+ for (const [, countFn] of matchCounters.current) {
102
+ total += countFn(term);
103
+ }
104
+ return total;
105
+ }, []);
106
+
107
+ const registerMatchCounter = useCallback(
108
+ (id: string, countFn: ExtendedCountFn): (() => void) => {
109
+ matchCounters.current.set(id, countFn);
110
+ return () => {
111
+ matchCounters.current.delete(id);
112
+ };
113
+ },
114
+ [],
115
+ );
116
+
117
+ const contextValue: ExtendedFindContextType = {
118
+ extendedFindTerm,
119
+ registerVirtualList,
120
+ countAllMatches,
121
+ registerMatchCounter,
122
+ };
123
+
124
+ return (
125
+ <ExtendedFindContext.Provider value={contextValue}>
126
+ {children}
127
+ </ExtendedFindContext.Provider>
128
+ );
129
+ };
130
+
131
+ export const useExtendedFind = (): ExtendedFindContextType => {
132
+ const context = useContext(ExtendedFindContext);
133
+ if (!context) {
134
+ throw new Error("useSearch must be used within a SearchProvider");
135
+ }
136
+ return context;
137
+ };
data/conda_envs/evalclaw/lib/python3.11/site-packages/inspect_ai/_view/www/src/components/FindBand.css ADDED
@@ -0,0 +1,60 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .findBand {
2
+ position: absolute;
3
+ top: 0;
4
+ right: 0;
5
+ margin-right: 20%;
6
+ z-index: 1060;
7
+ color: var(--inspect-find-foreground);
8
+ background-color: var(--inspect-find-background);
9
+ font-size: 0.9rem;
10
+ display: grid;
11
+ grid-template-columns: auto auto auto auto auto;
12
+ column-gap: 0.2em;
13
+ padding: 0.2rem;
14
+ border-bottom: solid 1px var(--bs-light-border-subtle);
15
+ border-left: solid 1px var(--bs-light-border-subtle);
16
+ border-right: solid 1px var(--bs-light-border-subtle);
17
+ box-shadow: var(--bs-box-shadow);
18
+ }
19
+
20
+ .findBand input {
21
+ height: 2em;
22
+ font-size: 0.9em;
23
+ margin: 0.1rem;
24
+ outline: none;
25
+ border: solid 1px var(--inspect-input-border);
26
+ color: var(--inspect-input-foreground);
27
+ background: var(--inspect-input-background);
28
+ }
29
+
30
+ .findBand-match-count {
31
+ font-size: 0.85em;
32
+ margin-top: auto;
33
+ margin-bottom: auto;
34
+ margin-right: 0.5em;
35
+ white-space: nowrap;
36
+ color: var(--inspect-find-foreground);
37
+ opacity: 0.7;
38
+ }
39
+
40
+ .findBand-no-results {
41
+ opacity: 1;
42
+ color: var(--bs-danger, #dc3545);
43
+ }
44
+
45
+ .findBand .btn.next,
46
+ .findBand .btn.prev {
47
+ padding: 0;
48
+ border: none;
49
+ background: none;
50
+ font-size: var(--inspect-fond-size-larger);
51
+ }
52
+
53
+ .findBand .btn.close {
54
+ padding: 0;
55
+ border: none;
56
+ background: none;
57
+ font-size: var(--inspect-font-size-title-secondary);
58
+ margin-top: -0.1rem;
59
+ margin-bottom: -0.1rem;
60
+ }
data/conda_envs/evalclaw/lib/python3.11/site-packages/inspect_ai/_view/www/src/components/FindBand.tsx ADDED
@@ -0,0 +1,556 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import {
2
+ FC,
3
+ KeyboardEvent,
4
+ useCallback,
5
+ useEffect,
6
+ useMemo,
7
+ useRef,
8
+ useState,
9
+ } from "react";
10
+ import { useStore } from "../state/store";
11
+ import { findScrollableParent, scrollRangeToCenter } from "../utils/dom";
12
+ import { debounce } from "../utils/sync";
13
+ import { useExtendedFind } from "./ExtendedFindContext";
14
+ import { FindBandUI } from "./FindBandUI";
15
+
16
+ interface FindBandProps {}
17
+
18
+ const findConfig = {
19
+ caseSensitive: false,
20
+ wrapAround: false,
21
+ wholeWord: false,
22
+ searchInFrames: false,
23
+ showDialog: false,
24
+ };
25
+
26
+ export const FindBand: FC<FindBandProps> = () => {
27
+ const searchBoxRef = useRef<HTMLInputElement>(null);
28
+ const storeHideFind = useStore((state) => state.appActions.hideFind);
29
+ const { extendedFindTerm, countAllMatches } = useExtendedFind();
30
+ const lastFoundItem = useRef<{
31
+ text: string;
32
+ offset: number;
33
+ parentElement: Element;
34
+ } | null>(null);
35
+ const currentSearchTerm = useRef<string>("");
36
+ const needsCursorRestoreRef = useRef<boolean>(false);
37
+ const scrollTimeoutRef = useRef<number | null>(null);
38
+ const focusTimeoutRef = useRef<number | null>(null);
39
+ const searchIdRef = useRef(0);
40
+ const cachedCount = useRef<{ term: string; count: number }>({
41
+ term: "",
42
+ count: 0,
43
+ });
44
+ const mutatedPanelsRef = useRef<
45
+ Map<
46
+ HTMLElement,
47
+ {
48
+ display: string;
49
+ maxHeight: string;
50
+ webkitLineClamp: string;
51
+ webkitBoxOrient: string;
52
+ }
53
+ >
54
+ >(new Map());
55
+
56
+ const [matchCount, setMatchCount] = useState<number | null>(null);
57
+ const [currentMatchIndex, setCurrentMatchIndex] = useState(0);
58
+
59
+ const getParentExpandablePanel = useCallback(
60
+ (selection: Selection): HTMLElement | undefined => {
61
+ let node = selection.anchorNode;
62
+ while (node) {
63
+ if (
64
+ node instanceof HTMLElement &&
65
+ node.hasAttribute("data-expandable-panel")
66
+ ) {
67
+ return node;
68
+ }
69
+ node = node.parentElement;
70
+ }
71
+ return undefined;
72
+ },
73
+ [],
74
+ );
75
+
76
+ const handleSearch = useCallback(
77
+ async (back = false) => {
78
+ const thisSearchId = ++searchIdRef.current;
79
+
80
+ const searchTerm = searchBoxRef.current?.value ?? "";
81
+ if (!searchTerm) {
82
+ setMatchCount(null);
83
+ setCurrentMatchIndex(0);
84
+ return;
85
+ }
86
+
87
+ if (currentSearchTerm.current !== searchTerm) {
88
+ lastFoundItem.current = null;
89
+ currentSearchTerm.current = searchTerm;
90
+ setCurrentMatchIndex(0);
91
+ }
92
+
93
+ let total: number;
94
+ if (cachedCount.current.term === searchTerm) {
95
+ total = cachedCount.current.count;
96
+ } else {
97
+ total = countAllMatches(searchTerm);
98
+ cachedCount.current = { term: searchTerm, count: total };
99
+ }
100
+ setMatchCount(total);
101
+
102
+ if (total === 0) {
103
+ setCurrentMatchIndex(0);
104
+ return;
105
+ }
106
+
107
+ const focusedElement = document.activeElement as HTMLElement;
108
+
109
+ const selection = window.getSelection();
110
+ let savedRange: Range | null = null;
111
+ if (selection && selection.rangeCount > 0) {
112
+ savedRange = selection.getRangeAt(0).cloneRange();
113
+ }
114
+
115
+ const savedScrollParent = savedRange
116
+ ? findScrollableParent(savedRange.startContainer.parentElement)
117
+ : null;
118
+ const savedScrollTop = savedScrollParent?.scrollTop ?? 0;
119
+
120
+ const result = await findExtendedInDOM(
121
+ searchTerm,
122
+ back,
123
+ lastFoundItem.current,
124
+ extendedFindTerm,
125
+ );
126
+
127
+ if (searchIdRef.current !== thisSearchId) {
128
+ return;
129
+ }
130
+
131
+ if (!result && savedRange) {
132
+ const sel = window.getSelection();
133
+ if (sel) {
134
+ sel.removeAllRanges();
135
+ sel.addRange(savedRange);
136
+ }
137
+ if (savedScrollParent) {
138
+ savedScrollParent.scrollTop = savedScrollTop;
139
+ }
140
+ }
141
+
142
+ if (result) {
143
+ const selection = window.getSelection();
144
+ if (selection && selection.rangeCount > 0) {
145
+ const range = selection.getRangeAt(0);
146
+ const parentElement =
147
+ range.startContainer.parentElement ||
148
+ (range.commonAncestorContainer as Element);
149
+ const isNewMatch = !isLastFoundItem(range, lastFoundItem.current);
150
+ lastFoundItem.current = {
151
+ text: range.toString(),
152
+ offset: range.startOffset,
153
+ parentElement,
154
+ };
155
+
156
+ if (isNewMatch) {
157
+ setCurrentMatchIndex((prev) => {
158
+ if (back) {
159
+ return prev <= 1 ? total : prev - 1;
160
+ } else {
161
+ return prev >= total ? 1 : prev + 1;
162
+ }
163
+ });
164
+ }
165
+
166
+ const parentPanel = getParentExpandablePanel(selection);
167
+ if (parentPanel) {
168
+ if (!mutatedPanelsRef.current.has(parentPanel)) {
169
+ mutatedPanelsRef.current.set(parentPanel, {
170
+ display: parentPanel.style.display,
171
+ maxHeight: parentPanel.style.maxHeight,
172
+ webkitLineClamp: parentPanel.style.webkitLineClamp,
173
+ webkitBoxOrient: parentPanel.style.webkitBoxOrient,
174
+ });
175
+ }
176
+ parentPanel.style.display = "block";
177
+ parentPanel.style.maxHeight = "none";
178
+ parentPanel.style.webkitLineClamp = "";
179
+ parentPanel.style.webkitBoxOrient = "";
180
+ }
181
+
182
+ if (scrollTimeoutRef.current !== null) {
183
+ window.clearTimeout(scrollTimeoutRef.current);
184
+ }
185
+ scrollTimeoutRef.current = window.setTimeout(() => {
186
+ scrollRangeToCenter(range);
187
+ }, 100);
188
+ }
189
+ }
190
+
191
+ focusedElement?.focus();
192
+ },
193
+ [getParentExpandablePanel, extendedFindTerm, countAllMatches],
194
+ );
195
+
196
+ useEffect(() => {
197
+ focusTimeoutRef.current = window.setTimeout(() => {
198
+ searchBoxRef.current?.focus();
199
+ searchBoxRef.current?.select();
200
+ }, 10);
201
+
202
+ const mutatedPanels = mutatedPanelsRef.current;
203
+ const scrollTimeout = scrollTimeoutRef.current;
204
+ const focusTimeout = focusTimeoutRef.current;
205
+
206
+ return () => {
207
+ if (scrollTimeout !== null) {
208
+ window.clearTimeout(scrollTimeout);
209
+ }
210
+ if (focusTimeout !== null) {
211
+ window.clearTimeout(focusTimeout);
212
+ }
213
+ // Restore original styles on mutated expandable panels
214
+ mutatedPanels.forEach((originalStyles, panel) => {
215
+ panel.style.display = originalStyles.display;
216
+ panel.style.maxHeight = originalStyles.maxHeight;
217
+ panel.style.webkitLineClamp = originalStyles.webkitLineClamp;
218
+ panel.style.webkitBoxOrient = originalStyles.webkitBoxOrient;
219
+ });
220
+ mutatedPanels.clear();
221
+ };
222
+ }, []);
223
+
224
+ const handleKeyDown = useCallback(
225
+ (e: KeyboardEvent<HTMLInputElement>) => {
226
+ if (e.key === "Escape") {
227
+ storeHideFind();
228
+ } else if (e.key === "Enter") {
229
+ void handleSearch(e.shiftKey);
230
+ } else if ((e.ctrlKey || e.metaKey) && e.key.toLowerCase() === "g") {
231
+ e.preventDefault();
232
+ void handleSearch(e.shiftKey);
233
+ } else if ((e.ctrlKey || e.metaKey) && e.key.toLowerCase() === "f") {
234
+ searchBoxRef.current?.focus();
235
+ searchBoxRef.current?.select();
236
+ }
237
+ },
238
+ [storeHideFind, handleSearch],
239
+ );
240
+
241
+ const findPrevious = useCallback(() => {
242
+ void handleSearch(true);
243
+ }, [handleSearch]);
244
+
245
+ const findNext = useCallback(() => {
246
+ void handleSearch(false);
247
+ }, [handleSearch]);
248
+
249
+ const restoreCursor = useCallback(() => {
250
+ if (!needsCursorRestoreRef.current) return;
251
+ needsCursorRestoreRef.current = false;
252
+ const input = searchBoxRef.current;
253
+ if (input) {
254
+ const len = input.value.length;
255
+ input.setSelectionRange(len, len);
256
+ }
257
+ }, []);
258
+
259
+ const debouncedSearch = useMemo(
260
+ () =>
261
+ debounce(async () => {
262
+ if (!searchBoxRef.current) return;
263
+ await handleSearch(false);
264
+ // Mark for cursor restore on next keypress (keeps find highlight visible)
265
+ needsCursorRestoreRef.current = true;
266
+ }, 300),
267
+ [handleSearch],
268
+ );
269
+
270
+ const handleInputChange = useCallback(() => {
271
+ debouncedSearch();
272
+ }, [debouncedSearch]);
273
+
274
+ const handleBeforeInput = useCallback(() => {
275
+ const input = searchBoxRef.current;
276
+ if (input) {
277
+ const hasSelection = input.selectionStart !== input.selectionEnd;
278
+ if (!hasSelection) {
279
+ restoreCursor();
280
+ }
281
+ }
282
+ }, [restoreCursor]);
283
+
284
+ // Consolidated global keyboard handler
285
+ useEffect(() => {
286
+ const handleGlobalKeyDown = (e: globalThis.KeyboardEvent) => {
287
+ // F3: Find next/previous
288
+ if (e.key === "F3") {
289
+ e.preventDefault();
290
+ void handleSearch(e.shiftKey);
291
+ return;
292
+ }
293
+
294
+ // Ctrl/Cmd+F: Focus search box (block browser find)
295
+ if ((e.ctrlKey || e.metaKey) && e.key === "f") {
296
+ e.preventDefault();
297
+ e.stopPropagation();
298
+ searchBoxRef.current?.focus();
299
+ searchBoxRef.current?.select();
300
+ return;
301
+ }
302
+
303
+ // Ctrl/Cmd+G: Find next/previous
304
+ if ((e.ctrlKey || e.metaKey) && e.key === "g") {
305
+ e.preventDefault();
306
+ e.stopPropagation();
307
+ void handleSearch(e.shiftKey);
308
+ return;
309
+ }
310
+
311
+ if (e.ctrlKey || e.metaKey || e.altKey) return;
312
+
313
+ if (e.key.length !== 1 && e.key !== "Backspace" && e.key !== "Delete")
314
+ return;
315
+
316
+ const input = searchBoxRef.current;
317
+ if (!input) return;
318
+
319
+ const hasSelection = input.selectionStart !== input.selectionEnd;
320
+ if (!hasSelection) {
321
+ restoreCursor();
322
+ }
323
+
324
+ if (document.activeElement !== input) {
325
+ input.focus();
326
+ }
327
+ };
328
+
329
+ document.addEventListener("keydown", handleGlobalKeyDown, true);
330
+ return () => {
331
+ document.removeEventListener("keydown", handleGlobalKeyDown, true);
332
+ };
333
+ }, [handleSearch, restoreCursor]);
334
+
335
+ return (
336
+ <FindBandUI
337
+ inputRef={searchBoxRef}
338
+ onClose={storeHideFind}
339
+ onNext={findNext}
340
+ onPrevious={findPrevious}
341
+ onKeyDown={handleKeyDown}
342
+ onBeforeInput={handleBeforeInput}
343
+ onChange={handleInputChange}
344
+ noResults={matchCount !== null && matchCount === 0}
345
+ matchCount={matchCount ?? undefined}
346
+ matchIndex={
347
+ matchCount !== null && matchCount > 0
348
+ ? currentMatchIndex - 1
349
+ : undefined
350
+ }
351
+ />
352
+ );
353
+ };
354
+ function windowFind(searchTerm: string, back: boolean): boolean {
355
+ // @ts-expect-error: `Window.find` is non-standard
356
+ return window.find(
357
+ searchTerm,
358
+ findConfig.caseSensitive,
359
+ back,
360
+ findConfig.wrapAround,
361
+ findConfig.wholeWord,
362
+ findConfig.searchInFrames,
363
+ findConfig.showDialog,
364
+ ) as boolean;
365
+ }
366
+
367
+ function positionSelectionForWrap(back: boolean): void {
368
+ if (!back) return;
369
+ const sel = window.getSelection();
370
+ if (sel) {
371
+ const range = document.createRange();
372
+ range.selectNodeContents(document.body);
373
+ range.collapse(false);
374
+ sel.removeAllRanges();
375
+ sel.addRange(range);
376
+ }
377
+ }
378
+
379
+ async function findExtendedInDOM(
380
+ searchTerm: string,
381
+ back: boolean,
382
+ lastFoundItem: {
383
+ text: string;
384
+ offset: number;
385
+ parentElement: Element;
386
+ } | null,
387
+ extendedFindTerm: (
388
+ term: string,
389
+ direction: "forward" | "backward",
390
+ ) => Promise<boolean>,
391
+ ) {
392
+ let result = false;
393
+ let hasTriedExtendedSearch = false;
394
+ let extendedSearchSucceeded = false;
395
+ const maxAttempts = 25;
396
+
397
+ for (let attempts = 0; attempts < maxAttempts; attempts++) {
398
+ result = windowFind(searchTerm, back);
399
+
400
+ if (result) {
401
+ const selection = window.getSelection();
402
+ if (selection && selection.rangeCount > 0) {
403
+ const range = selection.getRangeAt(0);
404
+ const isUnsearchable = inUnsearchableElement(range);
405
+ const isSameAsLast = isLastFoundItem(range, lastFoundItem);
406
+
407
+ if (!isUnsearchable && !isSameAsLast) {
408
+ break;
409
+ }
410
+
411
+ if (isSameAsLast) {
412
+ if (!hasTriedExtendedSearch) {
413
+ hasTriedExtendedSearch = true;
414
+ window.getSelection()?.removeAllRanges();
415
+
416
+ const foundInVirtual = await extendedFindTerm(
417
+ searchTerm,
418
+ back ? "backward" : "forward",
419
+ );
420
+
421
+ if (foundInVirtual) {
422
+ extendedSearchSucceeded = true;
423
+ continue;
424
+ }
425
+ }
426
+
427
+ if (extendedSearchSucceeded) {
428
+ // Extended search scrolled to new content but old match is still in DOM.
429
+ // Collapse past it so windowFind advances to the new match.
430
+ const sel = window.getSelection();
431
+ if (sel?.rangeCount) {
432
+ sel.getRangeAt(0).collapse(!back);
433
+ }
434
+ } else {
435
+ window.getSelection()?.removeAllRanges();
436
+ positionSelectionForWrap(back);
437
+ }
438
+
439
+ result = windowFind(searchTerm, back);
440
+ if (result) {
441
+ const sel = window.getSelection();
442
+ if (sel && sel.rangeCount > 0) {
443
+ const r = sel.getRangeAt(0);
444
+ if (inUnsearchableElement(r)) {
445
+ continue;
446
+ }
447
+ }
448
+ }
449
+ break;
450
+ }
451
+ }
452
+ } else if (!hasTriedExtendedSearch) {
453
+ hasTriedExtendedSearch = true;
454
+ window.getSelection()?.removeAllRanges();
455
+
456
+ const foundInVirtual = await extendedFindTerm(
457
+ searchTerm,
458
+ back ? "backward" : "forward",
459
+ );
460
+
461
+ if (foundInVirtual) {
462
+ extendedSearchSucceeded = true;
463
+ continue;
464
+ }
465
+
466
+ positionSelectionForWrap(back);
467
+ result = windowFind(searchTerm, back);
468
+ if (result) {
469
+ const sel = window.getSelection();
470
+ if (sel && sel.rangeCount > 0) {
471
+ const r = sel.getRangeAt(0);
472
+ if (inUnsearchableElement(r)) {
473
+ continue;
474
+ }
475
+ }
476
+ }
477
+ break;
478
+ } else {
479
+ break;
480
+ }
481
+ }
482
+
483
+ if (result) {
484
+ const sel = window.getSelection();
485
+ if (sel?.rangeCount && inUnsearchableElement(sel.getRangeAt(0))) {
486
+ sel.removeAllRanges();
487
+ result = false;
488
+ }
489
+ }
490
+
491
+ return result;
492
+ }
493
+
494
+ function isLastFoundItem(
495
+ range: Range,
496
+ lastFoundItem: {
497
+ text: string;
498
+ offset: number;
499
+ parentElement: Element;
500
+ } | null,
501
+ ) {
502
+ if (!lastFoundItem) return false;
503
+
504
+ const currentText = range.toString();
505
+ const currentOffset = range.startOffset;
506
+ const currentParentElement =
507
+ range.startContainer.parentElement ||
508
+ (range.commonAncestorContainer as Element);
509
+
510
+ return (
511
+ currentText === lastFoundItem.text &&
512
+ currentOffset === lastFoundItem.offset &&
513
+ currentParentElement === lastFoundItem.parentElement
514
+ );
515
+ }
516
+
517
+ function inUnsearchableElement(range: Range) {
518
+ let element: Element | null = selectionParentElement(range);
519
+
520
+ // Check if this match is inside an unsearchable element
521
+ let isUnsearchable = false;
522
+ while (element) {
523
+ if (
524
+ element.hasAttribute("data-unsearchable") ||
525
+ getComputedStyle(element).userSelect === "none"
526
+ ) {
527
+ isUnsearchable = true;
528
+ break;
529
+ }
530
+ element = element.parentElement;
531
+ }
532
+ return isUnsearchable;
533
+ }
534
+
535
+ function selectionParentElement(range: Range) {
536
+ let element: Element | null = null;
537
+
538
+ if (range.startContainer.nodeType === Node.ELEMENT_NODE) {
539
+ // This is a direct element
540
+ element = range.startContainer as Element;
541
+ } else {
542
+ // This isn't an element, try its parent
543
+ element = range.startContainer.parentElement;
544
+ }
545
+
546
+ // Still not found, try the common ancestor container
547
+ if (
548
+ !element &&
549
+ range.commonAncestorContainer.nodeType === Node.ELEMENT_NODE
550
+ ) {
551
+ element = range.commonAncestorContainer as Element;
552
+ } else if (!element && range.commonAncestorContainer.parentElement) {
553
+ element = range.commonAncestorContainer.parentElement;
554
+ }
555
+ return element;
556
+ }
data/conda_envs/evalclaw/lib/python3.11/site-packages/inspect_ai/_view/www/src/components/HumanBaselineView.css ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .asciinema-player {
2
+ max-height: 100vh;
3
+ max-width: 100vw;
4
+ }
5
+
6
+ .asciinema-player-status {
7
+ margin-right: 0.5em;
8
+ }
9
+
10
+ .asciinema-wrapper {
11
+ display: flex;
12
+ justify-content: center;
13
+ }
14
+
15
+ .asciinema-container {
16
+ display: grid;
17
+ grid-template-columns: 1fr 1fr 1fr;
18
+ grid-template-rows: auto auto;
19
+ width: 100%;
20
+ }
21
+
22
+ .asciinema-header-left {
23
+ justify-self: start;
24
+ font-size: var(--inspect-font-size-small);
25
+ }
26
+
27
+ .asciinema-header-center {
28
+ justify-self: center;
29
+ font-size: var(--inspect-font-size-small);
30
+ }
31
+
32
+ .asciinema-header-right {
33
+ justify-self: start;
34
+ font-size: var(--inspect-font-size-small);
35
+ }
36
+
37
+ .asciinema-body {
38
+ border-top: 1px solid var(--bs-light-border-subtle);
39
+ grid-column: span 3;
40
+ width: 100%;
41
+ }
data/conda_envs/evalclaw/lib/python3.11/site-packages/inspect_ai/_view/www/src/components/HumanBaselineView.tsx ADDED
@@ -0,0 +1,149 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { FC } from "react";
2
+ import { formatDateTime, formatTime } from "../utils/format";
3
+ import { AsciinemaPlayer } from "./AsciinemaPlayer";
4
+ import { useRevokableUrls } from "./hooks";
5
+ import "./HumanBaselineView.css";
6
+ import { LightboxCarousel } from "./LightboxCarousel";
7
+
8
+ export interface SessionLog {
9
+ name: string;
10
+ user: string;
11
+ input: string;
12
+ output: string;
13
+ timing: string;
14
+ }
15
+
16
+ interface HumanBaselineViewProps {
17
+ started?: Date;
18
+ running: boolean;
19
+ completed?: boolean;
20
+ runtime?: number;
21
+ answer?: string;
22
+ sessionLogs: SessionLog[];
23
+ }
24
+
25
+ /**
26
+ * Renders the HumanBaselineView component.
27
+ */
28
+ export const HumanBaselineView: FC<HumanBaselineViewProps> = ({
29
+ started,
30
+ runtime,
31
+ answer,
32
+ completed,
33
+ running,
34
+ sessionLogs,
35
+ }) => {
36
+ const createRevokableUrl = useRevokableUrls();
37
+ const player_fns = [];
38
+
39
+ // Make a player for each session log
40
+ let count = 1;
41
+ let maxCols = 0;
42
+
43
+ for (const sessionLog of sessionLogs) {
44
+ const rows = extractSize(sessionLog.output, "LINES", 24);
45
+ const cols = extractSize(sessionLog.output, "COLUMNS", 80);
46
+ maxCols = Math.max(maxCols, cols);
47
+
48
+ const currentCount = count;
49
+ const title =
50
+ sessionLogs.length === 1
51
+ ? "Terminal Session"
52
+ : `Terminal Session ${currentCount}`;
53
+
54
+ player_fns.push({
55
+ label: title,
56
+ render: () => (
57
+ <AsciinemaPlayer
58
+ id={`player-${currentCount}`}
59
+ inputUrl={createRevokableUrl(sessionLog.input)}
60
+ outputUrl={createRevokableUrl(sessionLog.output)}
61
+ timingUrl={createRevokableUrl(sessionLog.timing)}
62
+ rows={rows}
63
+ cols={cols}
64
+ className={"asciinema-player"}
65
+ style={{
66
+ height: `${rows * 2}em`,
67
+ width: `${cols * 2}em`,
68
+ }}
69
+ fit="both"
70
+ />
71
+ ),
72
+ });
73
+ count += 1;
74
+ }
75
+
76
+ interface StatusMessageProps {
77
+ completed?: boolean;
78
+ running?: boolean;
79
+ answer?: string;
80
+ }
81
+
82
+ const StatusMessage: FC<StatusMessageProps> = ({
83
+ completed,
84
+ running,
85
+ answer,
86
+ }) => {
87
+ if (running) {
88
+ return <span className={"text-style-label"}>Running</span>;
89
+ } else if (completed) {
90
+ return (
91
+ <div>
92
+ <span
93
+ className={
94
+ "text-style-label text-style-secondary asciinema-player-status"
95
+ }
96
+ >
97
+ Answer
98
+ </span>
99
+ <span>{answer}</span>
100
+ </div>
101
+ );
102
+ } else {
103
+ return "Unknown status";
104
+ }
105
+ };
106
+
107
+ return (
108
+ <div className={"asciinema-wrapper"}>
109
+ <div className={"asciinema-container"}>
110
+ <div className={"asciinema-header-left text-style-label"}>
111
+ {started ? formatDateTime(started) : ""}
112
+ {runtime ? ` (${formatTime(Math.floor(runtime))})` : ""}
113
+ </div>
114
+ <div className={"asciinema-header-center text-style-label"}></div>
115
+ <div className={"asciinema-header-right"}>
116
+ <StatusMessage
117
+ completed={completed}
118
+ running={running}
119
+ answer={answer}
120
+ />
121
+ </div>
122
+ <div className={"asciinema-body"}>
123
+ <LightboxCarousel id="ascii-cinema" slides={player_fns} />
124
+ </div>
125
+ </div>
126
+ </div>
127
+ );
128
+ };
129
+
130
+ /**
131
+ * Extracts a numeric size value from a string based on a given label.
132
+ *
133
+ * Searches the input string for a pattern matching the format `LABEL="VALUE"`,
134
+ * where `LABEL` is the provided label and `VALUE` is a numeric value.
135
+ */
136
+ const extractSize = (
137
+ value: string,
138
+ label: string,
139
+ defaultValue: number,
140
+ ): number => {
141
+ const regex = new RegExp(`${label}="(\\d+)"`);
142
+ const match = value.match(regex);
143
+ const size = match ? match[1] : undefined;
144
+ if (size) {
145
+ return parseInt(size);
146
+ } else {
147
+ return defaultValue;
148
+ }
149
+ };
data/conda_envs/evalclaw/lib/python3.11/site-packages/inspect_ai/_view/www/src/components/JsonPanel.css ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .json-panel {
2
+ width: 100%;
3
+ padding: 0.5em;
4
+ }
5
+
6
+ .json-panel:not(.simple) {
7
+ background: var(--bs-light);
8
+ border-radius: var(--bs-border-radius);
9
+ }
10
+
11
+ .json-panel .source-code {
12
+ font-size: var(--inspect-font-size-small);
13
+ white-space: pre-wrap !important;
14
+ word-wrap: anywhere !important;
15
+ }
16
+
17
+ /* Prism.js theme customizations can go here if needed */
18
+ .language-javascript {
19
+ background: transparent !important;
20
+ }
data/conda_envs/evalclaw/lib/python3.11/site-packages/inspect_ai/_view/www/src/components/JsonPanel.tsx ADDED
@@ -0,0 +1,74 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import clsx from "clsx";
2
+ import { CSSProperties, FC, useMemo, useRef } from "react";
3
+ import "./JsonPanel.css";
4
+ import { usePrismHighlight } from "./prism";
5
+
6
+ interface JSONPanelProps {
7
+ id?: string;
8
+ data?: unknown;
9
+ json?: string;
10
+ simple?: boolean;
11
+ style?: CSSProperties;
12
+ className?: string | string[];
13
+ }
14
+
15
+ export const JSONPanel: FC<JSONPanelProps> = ({
16
+ id,
17
+ json,
18
+ data,
19
+ simple = false,
20
+ style,
21
+ className,
22
+ }) => {
23
+ const sourceCode = useMemo(() => {
24
+ return json || JSON.stringify(resolveBase64(data), undefined, 2);
25
+ }, [json, data]);
26
+
27
+ const sourceCodeRef = useRef<HTMLDivElement | null>(null);
28
+ usePrismHighlight(sourceCodeRef, sourceCode.length);
29
+
30
+ return (
31
+ <div ref={sourceCodeRef}>
32
+ <pre
33
+ className={clsx("json-panel", simple ? "simple" : "", className)}
34
+ style={style}
35
+ >
36
+ <code id={id} className={clsx("source-code", "language-javascript")}>
37
+ {sourceCode}
38
+ </code>
39
+ </pre>
40
+ </div>
41
+ );
42
+ };
43
+
44
+ export default JSONPanel;
45
+
46
+ export const resolveBase64 = (value: any): any => {
47
+ const prefix = "data:image";
48
+
49
+ // Handle arrays recursively
50
+ if (Array.isArray(value)) {
51
+ return value.map((v) => resolveBase64(v));
52
+ }
53
+
54
+ // Handle objects recursively
55
+ if (value && typeof value === "object") {
56
+ const resolvedObject: Record<string, unknown> = {};
57
+ for (const key of Object.keys(value)) {
58
+ resolvedObject[key] = resolveBase64(value[key]);
59
+ }
60
+ return resolvedObject;
61
+ }
62
+
63
+ // Handle string values with protocol references
64
+ if (typeof value === "string") {
65
+ let resolvedValue = value;
66
+ if (resolvedValue.startsWith(prefix)) {
67
+ resolvedValue = "[base64 image]";
68
+ }
69
+ return resolvedValue;
70
+ }
71
+
72
+ // Return unchanged for other types
73
+ return value;
74
+ };
data/conda_envs/evalclaw/lib/python3.11/site-packages/inspect_ai/_view/www/src/components/LabeledValue.css ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .labeled-value-label {
2
+ font-size: var(--inspect-font-size-smaller);
3
+ margin-bottom: -0.2rem;
4
+ }
5
+
6
+ .labeled-value-value {
7
+ font-size: var(--inspect-font-size-base);
8
+ }
9
+
10
+ .labeled-value {
11
+ display: "flex";
12
+ }
13
+
14
+ .labeled-value .row {
15
+ flex-direction: row;
16
+ }
17
+
18
+ .labeled-value .column {
19
+ flex-direction: column;
20
+ }
data/conda_envs/evalclaw/lib/python3.11/site-packages/inspect_ai/_view/www/src/components/LabeledValue.tsx ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import clsx from "clsx";
2
+ import { CSSProperties, FC, ReactNode } from "react";
3
+
4
+ interface LabeledValueProps {
5
+ label: string;
6
+ style?: CSSProperties;
7
+ valueStyle?: CSSProperties;
8
+ layout?: "column" | "row";
9
+ children: ReactNode;
10
+ className?: string | string[];
11
+ }
12
+
13
+ export const LabeledValue: FC<LabeledValueProps> = ({
14
+ layout = "column",
15
+ style,
16
+ label,
17
+ children,
18
+ valueStyle,
19
+ className,
20
+ }) => {
21
+ return (
22
+ <div
23
+ className={clsx(
24
+ "labeled-value",
25
+ layout === "column" ? "column" : "row",
26
+ className,
27
+ )}
28
+ style={{
29
+ ...style,
30
+ }}
31
+ >
32
+ <div
33
+ className={"labeled-value-label text-style-label text-style-secondary"}
34
+ >
35
+ {label}
36
+ </div>
37
+ <div className={"labeled-value-value"} style={{ ...valueStyle }}>
38
+ {children}
39
+ </div>
40
+ </div>
41
+ );
42
+ };
data/conda_envs/evalclaw/lib/python3.11/site-packages/inspect_ai/_view/www/src/components/LargeModal.tsx ADDED
@@ -0,0 +1,182 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import clsx from "clsx";
2
+ import { ActivityBar } from "./ActivityBar";
3
+
4
+ import { FC, ReactNode, RefObject, useEffect, useRef } from "react";
5
+ import styles from "./LargeModal.module.css";
6
+ import { StickyScrollProvider } from "./StickyScrollContext";
7
+
8
+ export interface ModalTool {
9
+ label: string;
10
+ icon: string;
11
+ onClick: () => void;
12
+ enabled: boolean;
13
+ }
14
+
15
+ export interface ModalTools {
16
+ left: ModalTool[];
17
+ right: ModalTool[];
18
+ }
19
+
20
+ interface LargeModalProps {
21
+ id?: string;
22
+ title?: string;
23
+ detail: string;
24
+ detailTools?: ModalTools;
25
+ showProgress: boolean;
26
+ footer?: ReactNode;
27
+ visible: boolean;
28
+ onkeyup: (e: any) => void;
29
+ onHide: () => void;
30
+ scrollRef: RefObject<HTMLDivElement | null>;
31
+ children: ReactNode;
32
+ classNames?: {
33
+ body?: string | string[];
34
+ };
35
+ }
36
+
37
+ export const LargeModal: FC<LargeModalProps> = ({
38
+ id,
39
+ title,
40
+ detail,
41
+ detailTools,
42
+ children,
43
+ footer,
44
+ onkeyup,
45
+ visible,
46
+ onHide,
47
+ showProgress,
48
+ scrollRef,
49
+ classNames,
50
+ }) => {
51
+ // The footer
52
+ const modalFooter = footer ? (
53
+ <div className={"modal-footer"}>{footer}</div>
54
+ ) : (
55
+ ""
56
+ );
57
+
58
+ // Support restoring the scroll position
59
+ // but only do this for the first time that the children are set
60
+ const modalRef = useRef(null);
61
+ scrollRef = scrollRef || modalRef;
62
+
63
+ // Focus the modal when it becomes visible
64
+ const dialogRef = useRef<HTMLDivElement>(null);
65
+
66
+ // Use effect to focus the modal when visible changes
67
+ useEffect(() => {
68
+ if (visible && dialogRef.current) {
69
+ dialogRef.current.focus();
70
+ }
71
+ }, [visible]);
72
+
73
+ return (
74
+ <div
75
+ id={id}
76
+ className={clsx(
77
+ "modal",
78
+ styles.modal,
79
+ !visible ? styles.hidden : undefined,
80
+ )}
81
+ role="dialog"
82
+ onKeyUp={onkeyup}
83
+ tabIndex={visible ? 0 : undefined}
84
+ ref={dialogRef}
85
+ >
86
+ <div
87
+ className={clsx(
88
+ "modal-dialog",
89
+ "modal-dialog-scrollable",
90
+ styles.modalBody,
91
+ )}
92
+ role="document"
93
+ >
94
+ <div className={clsx("modal-content", styles.content)}>
95
+ <div className={clsx("modal-header", styles.header)}>
96
+ <div
97
+ className={clsx("modal-title", "text-size-smaller", styles.title)}
98
+ >
99
+ {title || ""}
100
+ </div>
101
+
102
+ {detail ? (
103
+ <div className={styles.detail}>
104
+ {detailTools?.left
105
+ ? detailTools.left.map((tool, idx) => {
106
+ return <TitleTool key={`tool-left-${idx}`} {...tool} />;
107
+ })
108
+ : ""}
109
+ <div className={clsx("text-size-smaller", styles.detailText)}>
110
+ <div>{detail}</div>
111
+ </div>
112
+
113
+ {detailTools?.right
114
+ ? detailTools.right.map((tool, idx) => {
115
+ return <TitleTool key={`tool-right-${idx}`} {...tool} />;
116
+ })
117
+ : ""}
118
+ </div>
119
+ ) : undefined}
120
+ <button
121
+ type="button"
122
+ className={clsx(
123
+ "btn",
124
+ "btn-close-large-dialog",
125
+ "text-size-larger",
126
+ styles.close,
127
+ )}
128
+ onClick={onHide}
129
+ aria-label="Close"
130
+ >
131
+ <HtmlEntity html={"&times;"} />
132
+ </button>
133
+ </div>
134
+ <ActivityBar animating={showProgress} />
135
+ <div
136
+ className={clsx("modal-body", styles.scrollBody, classNames?.body)}
137
+ ref={scrollRef}
138
+ >
139
+ <StickyScrollProvider value={scrollRef}>
140
+ {children}
141
+ </StickyScrollProvider>
142
+ </div>
143
+ {modalFooter}
144
+ </div>
145
+ </div>
146
+ </div>
147
+ );
148
+ };
149
+
150
+ interface HtmlEntityProps {
151
+ html: string;
152
+ }
153
+
154
+ const HtmlEntity: FC<HtmlEntityProps> = ({ html }) => (
155
+ <span dangerouslySetInnerHTML={{ __html: html }} />
156
+ );
157
+
158
+ interface TitleToolProps {
159
+ label: string;
160
+ icon: string;
161
+ enabled: boolean;
162
+ onClick: () => void;
163
+ }
164
+
165
+ const TitleTool: FC<TitleToolProps> = ({ label, icon, enabled, onClick }) => {
166
+ return (
167
+ <button
168
+ type="button"
169
+ className={clsx(
170
+ "btn",
171
+ "btn-outline",
172
+ "text-size-small",
173
+ styles.titleTool,
174
+ )}
175
+ aria-label={label}
176
+ onClick={onClick}
177
+ disabled={!enabled}
178
+ >
179
+ <i className={icon} />
180
+ </button>
181
+ );
182
+ };
data/conda_envs/evalclaw/lib/python3.11/site-packages/inspect_ai/_view/www/src/components/LightboxCarousel.module.css ADDED
@@ -0,0 +1,99 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .carouselThumbs {
2
+ display: grid;
3
+ grid-template-columns: auto auto auto auto;
4
+ }
5
+
6
+ .carouselThumb {
7
+ background: black;
8
+ color: white;
9
+ padding: 4em 0;
10
+ border: 0;
11
+ margin: 5px;
12
+ cursor: pointer;
13
+ text-align: center;
14
+ }
15
+
16
+ .carouselPlayIcon {
17
+ font-size: 4em;
18
+ }
19
+
20
+ .lightboxOverlay {
21
+ position: fixed;
22
+ top: 0;
23
+ left: 0;
24
+ width: 100vw;
25
+ height: 100vh;
26
+ background: rgba(0, 0, 0, 0.8);
27
+ display: flex;
28
+ align-items: center;
29
+ justify-content: center;
30
+ z-index: 9998;
31
+ }
32
+
33
+ .lightboxContent.open,
34
+ .lightboxOverlay.open {
35
+ opacity: 1;
36
+ visibility: visible;
37
+ }
38
+
39
+ .lightboxContent.closed,
40
+ .lightboxOverlay.closed {
41
+ opacity: 0;
42
+ visibility: hidden;
43
+ }
44
+
45
+ .lightboxButtonCloseWrapper {
46
+ position: absolute;
47
+ top: 10px;
48
+ right: 10px;
49
+ }
50
+
51
+ .lightboxButtonClose {
52
+ border: none;
53
+ background: none;
54
+ color: #fff;
55
+ font-size: 3em;
56
+ font-weight: 500;
57
+ cursor: pointer;
58
+ padding-left: 1em;
59
+ padding-bottom: 1em;
60
+ z-index: 10000;
61
+ }
62
+
63
+ .lightboxPreviewButton {
64
+ position: absolute;
65
+ top: 50%;
66
+ transform: translateY(-50%);
67
+ background: none;
68
+ color: #fff;
69
+ border: none;
70
+ padding: 0.5em;
71
+ font-size: 3em;
72
+ cursor: pointer;
73
+ z-index: 9999;
74
+ }
75
+
76
+ .lightboxPreviewButton.next {
77
+ left: 10px;
78
+ }
79
+
80
+ .lightboxPreviewButton.prev {
81
+ right: 10px;
82
+ }
83
+
84
+ .lightboxContent {
85
+ max-width: 90vw !important;
86
+ max-height: 90vh !important;
87
+ display: flex;
88
+ position: relative;
89
+ transition:
90
+ opacity 0.3s ease,
91
+ visibility 0.3s ease;
92
+ z-index: 9999;
93
+ overflow: hidden;
94
+ }
95
+
96
+ .lightboxContent > * {
97
+ max-height: 90vh !important;
98
+ max-width: 90vw !important;
99
+ }
data/conda_envs/evalclaw/lib/python3.11/site-packages/inspect_ai/_view/www/src/components/LinkButton.module.css ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .button {
2
+ display: flex;
3
+ border: none;
4
+ flex-direction: row;
5
+ background-color: unset;
6
+ color: var(--bs-link-color);
7
+ }
8
+
9
+ .button:hover {
10
+ color: var(--bs-link-hover-color);
11
+ cursor: pointer;
12
+ }
13
+
14
+ .label {
15
+ margin-left: 0.4em;
16
+ }
data/conda_envs/evalclaw/lib/python3.11/site-packages/inspect_ai/_view/www/src/components/LinkButton.tsx ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import clsx from "clsx";
2
+ import { FC } from "react";
3
+ import styles from "./LinkButton.module.css";
4
+
5
+ interface LinkButtonProps {
6
+ id?: string;
7
+ text?: string;
8
+ icon?: string;
9
+ onClick: () => void;
10
+ className?: string | string[];
11
+ }
12
+
13
+ /**
14
+ * LightboxCarousel component provides a carousel with lightbox functionality.
15
+ */
16
+ export const LinkButton: FC<LinkButtonProps> = ({
17
+ id,
18
+ text,
19
+ icon,
20
+ className,
21
+ onClick,
22
+ }) => {
23
+ return (
24
+ <button
25
+ id={id}
26
+ onClick={onClick}
27
+ className={clsx(className, styles.button, "text-size-smaller")}
28
+ >
29
+ {icon ? <i className={clsx(icon)}></i> : undefined}
30
+ {text ? <div className={clsx(styles.label)}>{text}</div> : undefined}
31
+ </button>
32
+ );
33
+ };
data/conda_envs/evalclaw/lib/python3.11/site-packages/inspect_ai/_view/www/src/components/LiveVirtualList.module.css ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .progressContainer {
2
+ width: 100%;
3
+ display: flex;
4
+ align-content: flex-start;
5
+ justify-content: flex-start;
6
+ margin-left: 2.5em;
7
+ }
8
+
9
+ .progressText {
10
+ margin-left: 0.4em;
11
+ }
data/conda_envs/evalclaw/lib/python3.11/site-packages/inspect_ai/_view/www/src/components/LiveVirtualList.tsx ADDED
@@ -0,0 +1,419 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import clsx from "clsx";
2
+ import {
3
+ ReactNode,
4
+ RefObject,
5
+ useCallback,
6
+ useEffect,
7
+ useRef,
8
+ useState,
9
+ } from "react";
10
+ import { Components, Virtuoso, VirtuosoHandle } from "react-virtuoso";
11
+ import { usePrevious, useProperty } from "../state/hooks";
12
+ import { useRafThrottle, useVirtuosoState } from "../state/scrolling";
13
+ import {
14
+ ExtendedFindFn,
15
+ ExtendedCountFn,
16
+ useExtendedFind,
17
+ } from "./ExtendedFindContext";
18
+ import { PulsingDots } from "./PulsingDots";
19
+
20
+ import styles from "./LiveVirtualList.module.css";
21
+
22
+ interface LiveVirtualListProps<T> {
23
+ id: string;
24
+ listHandle: RefObject<VirtuosoHandle | null>;
25
+
26
+ className?: string | string[];
27
+
28
+ // The scroll ref to use for the virtual list
29
+ scrollRef?: RefObject<HTMLDivElement | null>;
30
+
31
+ // The data and rendering function for the data
32
+ data: T[];
33
+ renderRow: (index: number, item: T) => ReactNode;
34
+
35
+ // Whether the virtual list is live (controls its follow
36
+ // behavior)
37
+ live?: boolean;
38
+
39
+ // The progress message to show (if any)
40
+ // no message show if progress isn't provided
41
+ showProgress?: boolean;
42
+
43
+ // The initial index to scroll to when loading
44
+ initialTopMostItemIndex?: number;
45
+
46
+ // The offset to use when scrolling items
47
+ offsetTop?: number;
48
+
49
+ components?: Components<T>;
50
+
51
+ // Optional function to extract searchable text from data items
52
+ // If not provided, will use JSON.stringify as fallback
53
+ // Return a string or array of strings to search within
54
+ itemSearchText?: (item: T) => string | string[];
55
+ }
56
+
57
+ /**
58
+ * Renders the Transcript component.
59
+ */
60
+ export const LiveVirtualList = <T,>({
61
+ id,
62
+ listHandle,
63
+ className,
64
+ data,
65
+ renderRow,
66
+ scrollRef,
67
+ live,
68
+ showProgress,
69
+ initialTopMostItemIndex,
70
+ offsetTop,
71
+ components,
72
+ itemSearchText,
73
+ }: LiveVirtualListProps<T>) => {
74
+ // The list handle and list state management
75
+ const { getRestoreState, isScrolling, visibleRange, setVisibleRange } =
76
+ useVirtuosoState(listHandle, `live-virtual-list-${id}`);
77
+
78
+ const { registerVirtualList, registerMatchCounter } = useExtendedFind();
79
+ const pendingSearchCallback = useRef<(() => void) | null>(null);
80
+ const [isCurrentlyScrolling, setIsCurrentlyScrolling] = useState(false);
81
+
82
+ // Track whether we're following output
83
+ const [followOutput, setFollowOutput] = useProperty<boolean | null>(
84
+ id,
85
+ "follow",
86
+ {
87
+ defaultValue: null,
88
+ },
89
+ );
90
+ const isAutoScrollingRef = useRef(false);
91
+
92
+ // Only we first load set the default value for following
93
+ // based upon whether or not the transcript is 'live'
94
+ useEffect(() => {
95
+ if (followOutput === null) {
96
+ setFollowOutput(!!live);
97
+ }
98
+ }, [followOutput, live, setFollowOutput]);
99
+
100
+ // Track whether we were previously running so we can
101
+ // decide whether to pop up to the top
102
+ const prevLive = usePrevious(live);
103
+ useEffect(() => {
104
+ // When we finish running, if we are following output
105
+ // then scroll up to the top
106
+ if (!live && prevLive && followOutput && scrollRef?.current) {
107
+ setFollowOutput(false);
108
+ setTimeout(() => {
109
+ if (scrollRef.current) {
110
+ scrollRef.current.scrollTo({ top: 0, behavior: "instant" });
111
+ }
112
+ }, 100);
113
+ }
114
+ }, [live, followOutput, prevLive, scrollRef, setFollowOutput]);
115
+
116
+ const handleScroll = useRafThrottle(() => {
117
+ // Skip processing if auto-scrolling is in progress
118
+ if (isAutoScrollingRef.current) return;
119
+
120
+ // If we're not running, don't mess with auto scrolling
121
+ if (!live) return;
122
+
123
+ // Make the bottom start following
124
+ if (scrollRef?.current && listHandle.current) {
125
+ const parent = scrollRef.current;
126
+ const isAtBottom =
127
+ parent.scrollHeight - parent.scrollTop <= parent.clientHeight + 30;
128
+
129
+ if (isAtBottom && !followOutput) {
130
+ setFollowOutput(true);
131
+ } else if (!isAtBottom && followOutput) {
132
+ setFollowOutput(false);
133
+ }
134
+ }
135
+ }, [setFollowOutput, followOutput, live]);
136
+
137
+ const heightChanged = useCallback(
138
+ (height: number) => {
139
+ requestAnimationFrame(() => {
140
+ if (followOutput && live && scrollRef?.current) {
141
+ isAutoScrollingRef.current = true;
142
+ listHandle.current?.scrollTo({ top: height });
143
+ requestAnimationFrame(() => {
144
+ isAutoScrollingRef.current = false;
145
+ });
146
+ }
147
+ });
148
+ },
149
+ [followOutput, live, scrollRef, listHandle],
150
+ );
151
+
152
+ const forceUpdate = useCallback(() => forceRender({}), []);
153
+
154
+ useEffect(() => {
155
+ // Force a re-render after initial mount
156
+ // This is here only because in VScode, for some reason,
157
+ // when this transcript is restored, the height isn't computed
158
+ // properly on the first render. This basically gives it a second
159
+ // change to compute the height and lay itself out.
160
+ const timer = setTimeout(() => {
161
+ forceUpdate();
162
+ }, 0);
163
+ return () => clearTimeout(timer);
164
+ }, [forceUpdate]);
165
+
166
+ const [, forceRender] = useState({});
167
+
168
+ // Default function to extract searchable text using JSON.stringify
169
+ const defaultItemSearchText = useCallback((item: T): string => {
170
+ try {
171
+ return JSON.stringify(item);
172
+ } catch {
173
+ return "";
174
+ }
175
+ }, []);
176
+
177
+ // Search within a single text string
178
+ const searchInText = useCallback(
179
+ (text: string, searchTerm: string): boolean => {
180
+ const lowerText = text.toLowerCase();
181
+ const prepared = prepareSearchTerm(searchTerm);
182
+
183
+ // Simple search
184
+ if (lowerText.includes(prepared.simple)) {
185
+ return true;
186
+ }
187
+
188
+ // Check variations
189
+ if (prepared.unquoted && lowerText.includes(prepared.unquoted)) {
190
+ return true;
191
+ }
192
+
193
+ if (prepared.jsonEscaped && lowerText.includes(prepared.jsonEscaped)) {
194
+ return true;
195
+ }
196
+
197
+ return false;
198
+ },
199
+ [],
200
+ );
201
+
202
+ // Search within an item using itemSearchText
203
+ const searchInItem = useCallback(
204
+ (item: T, searchTerm: string): boolean => {
205
+ const getSearchText = itemSearchText ?? defaultItemSearchText;
206
+ const texts = getSearchText(item);
207
+ const textArray = Array.isArray(texts) ? texts : [texts];
208
+
209
+ return textArray.some((text) => searchInText(text, searchTerm));
210
+ },
211
+ [itemSearchText, defaultItemSearchText, searchInText],
212
+ );
213
+
214
+ const scrollToMatch = useCallback(
215
+ (index: number, onContentReady: () => void) => {
216
+ pendingSearchCallback.current = onContentReady;
217
+
218
+ listHandle.current?.scrollToIndex({
219
+ index,
220
+ behavior: "auto",
221
+ align: "center",
222
+ });
223
+
224
+ setTimeout(() => {
225
+ if (pendingSearchCallback.current === onContentReady) {
226
+ pendingSearchCallback.current = null;
227
+ onContentReady();
228
+ }
229
+ }, 200);
230
+ },
231
+ [listHandle],
232
+ );
233
+
234
+ const searchInData: ExtendedFindFn = useCallback(
235
+ async (
236
+ term: string,
237
+ direction: "forward" | "backward",
238
+ onContentReady: () => void,
239
+ ) => {
240
+ if (!data.length || !term) return false;
241
+
242
+ const isForward = direction === "forward";
243
+ const currentIndex = isForward
244
+ ? visibleRange.endIndex
245
+ : visibleRange.startIndex;
246
+
247
+ // Search from current position to end, then wrap from beginning to current position
248
+ const len = data.length;
249
+ for (let offset = 1; offset < len; offset++) {
250
+ const i = isForward
251
+ ? (currentIndex + offset) % len
252
+ : (currentIndex - offset + len) % len;
253
+
254
+ // Skip items already in the visible range (window.find already checked them)
255
+ if (i >= visibleRange.startIndex && i <= visibleRange.endIndex)
256
+ continue;
257
+
258
+ if (searchInItem(data[i], term)) {
259
+ scrollToMatch(i, onContentReady);
260
+ return true;
261
+ }
262
+ }
263
+
264
+ return false;
265
+ },
266
+ [
267
+ data,
268
+ searchInItem,
269
+ visibleRange.endIndex,
270
+ visibleRange.startIndex,
271
+ scrollToMatch,
272
+ ],
273
+ );
274
+
275
+ const countMatchesInData: ExtendedCountFn = useCallback(
276
+ (term: string): number => {
277
+ if (!term || !data.length) return 0;
278
+ const lower = term.toLowerCase();
279
+ let total = 0;
280
+ const getSearchText = itemSearchText ?? defaultItemSearchText;
281
+
282
+ for (const item of data) {
283
+ const texts = getSearchText(item);
284
+ const textArray = Array.isArray(texts) ? texts : [texts];
285
+ for (const text of textArray) {
286
+ const lowerText = text.toLowerCase();
287
+ let pos = 0;
288
+ while ((pos = lowerText.indexOf(lower, pos)) !== -1) {
289
+ total++;
290
+ pos += lower.length;
291
+ }
292
+ }
293
+ }
294
+ return total;
295
+ },
296
+ [data, itemSearchText, defaultItemSearchText],
297
+ );
298
+
299
+ useEffect(() => {
300
+ const unregisterSearch = registerVirtualList(id, searchInData);
301
+ const unregisterCount = registerMatchCounter(id, countMatchesInData);
302
+ return () => {
303
+ unregisterSearch();
304
+ unregisterCount();
305
+ };
306
+ }, [
307
+ id,
308
+ registerVirtualList,
309
+ registerMatchCounter,
310
+ searchInData,
311
+ countMatchesInData,
312
+ ]);
313
+
314
+ const Footer = () => {
315
+ return showProgress ? (
316
+ <div className={clsx(styles.progressContainer)}>
317
+ <PulsingDots subtle={false} size="medium" />
318
+ </div>
319
+ ) : undefined;
320
+ };
321
+
322
+ useEffect(() => {
323
+ // Listen to scroll events
324
+ const parent = scrollRef?.current;
325
+ if (parent) {
326
+ parent.addEventListener("scroll", handleScroll);
327
+ return () => parent.removeEventListener("scroll", handleScroll);
328
+ }
329
+ }, [scrollRef, handleScroll]);
330
+
331
+ // Scroll to index when component mounts or targetIndex changes
332
+ const hasScrolled = useRef(false);
333
+ useEffect(() => {
334
+ if (initialTopMostItemIndex !== undefined && listHandle.current) {
335
+ // If there is an initial index, scroll to it after a short delay
336
+ const timer = setTimeout(() => {
337
+ listHandle.current?.scrollToIndex({
338
+ index: initialTopMostItemIndex,
339
+ align: "start",
340
+ behavior: !hasScrolled.current ? "auto" : "smooth",
341
+ offset: offsetTop ? -offsetTop : undefined,
342
+ });
343
+ hasScrolled.current = true;
344
+ }, 50);
345
+ return () => clearTimeout(timer);
346
+ }
347
+ }, [initialTopMostItemIndex, listHandle, offsetTop]);
348
+
349
+ // Watch for scrolling to stop and trigger pending search callback
350
+ useEffect(() => {
351
+ if (!isCurrentlyScrolling && pendingSearchCallback.current) {
352
+ // Add a delay to ensure DOM is fully updated after scrolling stops
353
+ setTimeout(() => {
354
+ const callback = pendingSearchCallback.current;
355
+ pendingSearchCallback.current = null;
356
+ callback?.();
357
+ }, 100);
358
+ }
359
+ }, [isCurrentlyScrolling]);
360
+
361
+ // Custom scrolling state callback
362
+ const handleScrollingChange = useCallback(
363
+ (scrolling: boolean) => {
364
+ setIsCurrentlyScrolling(scrolling);
365
+ // Also call the original isScrolling callback from useVirtuosoState
366
+ isScrolling(scrolling);
367
+ },
368
+ [isScrolling],
369
+ );
370
+
371
+ return (
372
+ <Virtuoso
373
+ ref={listHandle}
374
+ customScrollParent={scrollRef?.current ? scrollRef.current : undefined}
375
+ style={{ height: "100%", width: "100%" }}
376
+ data={data}
377
+ defaultItemHeight={500}
378
+ itemContent={renderRow}
379
+ increaseViewportBy={{ top: 1000, bottom: 1000 }}
380
+ overscan={{ main: 5, reverse: 5 }}
381
+ className={clsx("transcript", className)}
382
+ isScrolling={handleScrollingChange}
383
+ rangeChanged={(range) => {
384
+ setVisibleRange(range);
385
+ }}
386
+ skipAnimationFrameInResizeObserver={true}
387
+ restoreStateFrom={getRestoreState()}
388
+ totalListHeightChanged={heightChanged}
389
+ components={{
390
+ Footer,
391
+ ...components,
392
+ }}
393
+ />
394
+ );
395
+ };
396
+
397
+ type PreparedSearchTerms = {
398
+ simple: string;
399
+ unquoted?: string;
400
+ jsonEscaped?: string;
401
+ };
402
+
403
+ const prepareSearchTerm = (term: string): PreparedSearchTerms => {
404
+ const lower = term.toLowerCase();
405
+
406
+ // No special characters that need JSON handling
407
+ if (!term.includes('"') && !term.includes(":")) {
408
+ return { simple: lower };
409
+ }
410
+
411
+ // Generate variations for JSON-like syntax
412
+ return {
413
+ simple: lower,
414
+ // Remove quotes
415
+ unquoted: lower.replace(/"/g, ""),
416
+ // Escape quotes for JSON
417
+ jsonEscaped: lower.replace(/"/g, '\\"'),
418
+ };
419
+ };
data/conda_envs/evalclaw/lib/python3.11/site-packages/inspect_ai/_view/www/src/components/MarkdownDiv.css ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ .markdown-ordered-list-item {
2
+ margin-bottom: 0.2em;
3
+ }
4
+
5
+ .markdown-content p:last-child {
6
+ margin-bottom: 0;
7
+ }
data/conda_envs/evalclaw/lib/python3.11/site-packages/inspect_ai/_view/www/src/components/MarkdownDiv.tsx ADDED
@@ -0,0 +1,440 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import clsx from "clsx";
2
+ import MarkdownIt from "markdown-it";
3
+ import markdownitMathjax3 from "markdown-it-mathjax3";
4
+ import {
5
+ CSSProperties,
6
+ forwardRef,
7
+ memo,
8
+ startTransition,
9
+ useEffect,
10
+ useState,
11
+ } from "react";
12
+ import "./MarkdownDiv.css";
13
+
14
+ interface MarkdownDivProps {
15
+ markdown: string;
16
+ omitMedia?: boolean;
17
+ omitMath?: boolean;
18
+ style?: CSSProperties;
19
+ className?: string | string[];
20
+ }
21
+
22
+ const MarkdownDivComponent = forwardRef<HTMLDivElement, MarkdownDivProps>(
23
+ ({ markdown, omitMedia, omitMath, style, className }, ref) => {
24
+ // Check cache for rendered content
25
+ const optionsKey = getOptionsKey(omitMedia, omitMath);
26
+ const cacheKey = `${markdown}:${optionsKey}`;
27
+ const cachedHtml = renderCache.get(cacheKey);
28
+
29
+ // Initialize with content (cached or unrendered markdown)
30
+ const [renderedHtml, setRenderedHtml] = useState<string>(() => {
31
+ if (cachedHtml) {
32
+ return cachedHtml;
33
+ }
34
+ return markdown.replace(/\n/g, "<br/>");
35
+ });
36
+
37
+ useEffect(() => {
38
+ // If already cached, no need to re-render
39
+ if (cachedHtml) {
40
+ // Only update state if it's different (avoid unnecessary re-render)
41
+ if (renderedHtml !== cachedHtml) {
42
+ startTransition(() => {
43
+ setRenderedHtml(cachedHtml);
44
+ });
45
+ }
46
+ return;
47
+ }
48
+
49
+ // Reset to raw markdown text when markdown changes (keep this synchronous for immediate feedback)
50
+ setRenderedHtml(markdown.replace(/\n/g, "<br/>"));
51
+
52
+ // Process markdown asynchronously using the queue
53
+ const { promise, cancel } = renderQueue.enqueue(async () => {
54
+ // Protect backslashes in LaTeX expressions
55
+ const protectedContent = protectBackslashesInLatex(markdown);
56
+
57
+ // Escape all tags
58
+ const escaped = escapeHtmlCharacters(protectedContent);
59
+
60
+ // Pre-render any text that isn't handled by markdown
61
+ const preRendered = preRenderText(escaped);
62
+
63
+ const protectedText = protectMarkdown(preRendered);
64
+
65
+ // Restore backslashes for LaTeX processing
66
+ const preparedForMarkdown = restoreBackslashesForLatex(protectedText);
67
+
68
+ let html = preparedForMarkdown;
69
+ try {
70
+ // Get appropriate markdown-it instance based on options
71
+ const md = getMarkdownInstance(omitMedia, omitMath);
72
+ html = md.render(preparedForMarkdown);
73
+ } catch (ex) {
74
+ console.log("Unable to markdown render content");
75
+ console.error(ex);
76
+ }
77
+
78
+ const unescaped = unprotectMarkdown(html);
79
+
80
+ // For `code` tags, reverse the escaping if we can
81
+ const withCode = unescapeCodeHtmlEntities(unescaped);
82
+
83
+ // For `sup` tags, reverse the escaping if we can
84
+ const withSup = unescapeSupHtmlEntities(withCode);
85
+
86
+ return withSup;
87
+ });
88
+
89
+ // Update state when rendering completes
90
+ promise
91
+ .then((result) => {
92
+ // Update cache (with simple size limit)
93
+ if (renderCache.size >= MAX_CACHE_SIZE) {
94
+ // Remove oldest entry (first key)
95
+ const firstKey = renderCache.keys().next().value;
96
+ if (firstKey) {
97
+ renderCache.delete(firstKey);
98
+ }
99
+ }
100
+ renderCache.set(cacheKey, result);
101
+
102
+ // Use startTransition to mark this as a non-urgent update
103
+ startTransition(() => {
104
+ setRenderedHtml(result);
105
+ });
106
+ })
107
+ .catch((error) => {
108
+ console.error("Markdown rendering error:", error);
109
+ });
110
+
111
+ return () => {
112
+ // Cancel rendering if component unmounts
113
+ cancel();
114
+ };
115
+ }, [markdown, omitMedia, omitMath, cachedHtml, renderedHtml, cacheKey]);
116
+
117
+ return (
118
+ <div
119
+ ref={ref}
120
+ dangerouslySetInnerHTML={{ __html: renderedHtml }}
121
+ style={style}
122
+ className={clsx(className, "markdown-content")}
123
+ />
124
+ );
125
+ },
126
+ );
127
+
128
+ // Memoize component to prevent re-renders when props haven't changed
129
+ export const MarkdownDiv = memo(MarkdownDivComponent);
130
+
131
+ // Cache for rendered markdown to avoid re-processing identical content
132
+ const renderCache = new Map<string, string>();
133
+ const MAX_CACHE_SIZE = 500;
134
+
135
+ // Module-level cache for lazy-initialized markdown-it instances
136
+ const mdInstanceCache: Record<string, MarkdownIt> = {};
137
+
138
+ const getOptionsKey = (omitMedia?: boolean, omitMath?: boolean): string =>
139
+ `${omitMedia ? "1" : "0"}:${omitMath ? "1" : "0"}`;
140
+
141
+ const getMarkdownInstance = (
142
+ omitMedia?: boolean,
143
+ omitMath?: boolean,
144
+ ): MarkdownIt => {
145
+ const key = getOptionsKey(omitMedia, omitMath);
146
+
147
+ if (!mdInstanceCache[key]) {
148
+ const md = new MarkdownIt({ breaks: true, html: true });
149
+ if (!omitMath) {
150
+ md.use(markdownitMathjax3);
151
+ }
152
+ if (omitMedia) {
153
+ md.disable(["image"]);
154
+ }
155
+ mdInstanceCache[key] = md;
156
+ }
157
+
158
+ return mdInstanceCache[key];
159
+ };
160
+
161
+ // Markdown rendering queue to make markdown rendering async while limiting concurrency
162
+ interface QueueTask {
163
+ task: () => Promise<void>;
164
+ cancelled: boolean;
165
+ }
166
+
167
+ class MarkdownRenderQueue {
168
+ private queue: QueueTask[] = [];
169
+ private activeCount = 0;
170
+ private readonly maxConcurrent: number;
171
+
172
+ constructor(maxConcurrent: number = 10) {
173
+ this.maxConcurrent = maxConcurrent;
174
+ }
175
+
176
+ enqueue<T>(task: () => Promise<T>): {
177
+ promise: Promise<T>;
178
+ cancel: () => void;
179
+ } {
180
+ let cancelled = false;
181
+
182
+ const promise = new Promise<T>((resolve, reject) => {
183
+ const wrappedTask = async () => {
184
+ // Skip if cancelled before execution
185
+ if (cancelled) {
186
+ return;
187
+ }
188
+
189
+ try {
190
+ const result = await task();
191
+ if (!cancelled) {
192
+ resolve(result);
193
+ }
194
+ } catch (error) {
195
+ if (!cancelled) {
196
+ reject(error);
197
+ }
198
+ }
199
+ };
200
+
201
+ const queueTask: QueueTask = {
202
+ task: wrappedTask,
203
+ cancelled: false,
204
+ };
205
+
206
+ this.queue.push(queueTask);
207
+ this.processQueue();
208
+ });
209
+
210
+ const cancel = () => {
211
+ cancelled = true;
212
+ // Mark task as cancelled in queue
213
+ const index = this.queue.findIndex((t) => !t.cancelled);
214
+ if (index !== -1) {
215
+ this.queue[index].cancelled = true;
216
+ }
217
+ };
218
+
219
+ return { promise, cancel };
220
+ }
221
+
222
+ private async processQueue(): Promise<void> {
223
+ if (this.activeCount >= this.maxConcurrent || this.queue.length === 0) {
224
+ return;
225
+ }
226
+
227
+ // Find next non-cancelled task
228
+ let queueTask: QueueTask | undefined;
229
+ while (this.queue.length > 0) {
230
+ const task = this.queue.shift();
231
+ if (task && !task.cancelled) {
232
+ queueTask = task;
233
+ break;
234
+ }
235
+ }
236
+
237
+ if (!queueTask) {
238
+ return;
239
+ }
240
+
241
+ this.activeCount++;
242
+
243
+ try {
244
+ await queueTask.task();
245
+ } finally {
246
+ this.activeCount--;
247
+ this.processQueue();
248
+ }
249
+ }
250
+ }
251
+
252
+ // Shared rendering queue
253
+ const renderQueue = new MarkdownRenderQueue(10);
254
+
255
+ const kLetterListPattern = /^([a-zA-Z][).]\s.*?)$/gm;
256
+ const kCommonmarkReferenceLinkPattern = /\[([^\]]*)\]: (?!http)(.*)/g;
257
+
258
+ const protectBackslashesInLatex = (content: string): string => {
259
+ if (!content) return content;
260
+
261
+ try {
262
+ // Match inline math: $...$
263
+ const inlineRegex = /\$(.*?)\$/g;
264
+
265
+ // Match block math: $$...$$
266
+ const blockRegex = /\$\$([\s\S]*?)\$\$/g;
267
+
268
+ // Replace backslashes and HTML characters in LaTeX blocks with placeholders
269
+ let result = content.replace(inlineRegex, (_match, latex) => {
270
+ const protectedTex = latex
271
+ .replace(/\\/g, "___LATEX_BACKSLASH___")
272
+ .replace(/</g, "___LATEX_LT___")
273
+ .replace(/>/g, "___LATEX_GT___")
274
+ .replace(/&/g, "___LATEX_AMP___")
275
+ .replace(/'/g, "___LATEX_APOS___")
276
+ .replace(/"/g, "___LATEX_QUOT___");
277
+ return `$${protectedTex}$`;
278
+ });
279
+
280
+ result = result.replace(blockRegex, (_match, latex) => {
281
+ const protectedTex = latex
282
+ .replace(/\\/g, "___LATEX_BACKSLASH___")
283
+ .replace(/</g, "___LATEX_LT___")
284
+ .replace(/>/g, "___LATEX_GT___")
285
+ .replace(/&/g, "___LATEX_AMP___")
286
+ .replace(/'/g, "___LATEX_APOS___")
287
+ .replace(/"/g, "___LATEX_QUOT___");
288
+ return `$$${protectedTex}$$`;
289
+ });
290
+
291
+ return result;
292
+ } catch (error) {
293
+ console.error("Error protecting LaTeX content:", error);
294
+ return content;
295
+ }
296
+ };
297
+
298
+ const restoreBackslashesForLatex = (content: string): string => {
299
+ if (!content) {
300
+ return content;
301
+ }
302
+
303
+ try {
304
+ // Restore all protected LaTeX content
305
+ let result = content
306
+ .replace(/___LATEX_BACKSLASH___/g, "\\")
307
+ .replace(/___LATEX_LT___/g, "<")
308
+ .replace(/___LATEX_GT___/g, ">")
309
+ .replace(/___LATEX_AMP___/g, "&")
310
+ .replace(/___LATEX_APOS___/g, "'")
311
+ .replace(/___LATEX_QUOT___/g, '"');
312
+
313
+ // Then fix dots notation for better MathJax compatibility
314
+ // This replaces \dots with \ldots which has better support
315
+ result = fixDotsNotation(result);
316
+
317
+ return result;
318
+ } catch (error) {
319
+ console.error("Error restoring LaTeX content:", error);
320
+ return content; // Return input content if something goes wrong
321
+ }
322
+ };
323
+
324
+ // Fixes dots notation in LaTeX by replacing \dots with \ldots for better compatibility
325
+ const fixDotsNotation = (content: string): string => {
326
+ if (!content) return content;
327
+
328
+ try {
329
+ // Handle both inline and block math
330
+ // First, fix inline math expressions ($...$)
331
+ let result = content.replace(/(\$[^$]*?)\\dots([^$]*?\$)/g, "$1\\ldots$2");
332
+
333
+ // Then, fix block math expressions ($...$)
334
+ result = result.replace(/(\$\$[^$]*?)\\dots([^$]*?\$\$)/g, "$1\\ldots$2");
335
+
336
+ return result;
337
+ } catch (error) {
338
+ console.error("Error fixing dots notation:", error);
339
+ return content;
340
+ }
341
+ };
342
+
343
+ const escapeHtmlCharacters = (content: string): string => {
344
+ if (!content) return content;
345
+
346
+ return content.replace(/[<>&'"]/g, (c: string): string => {
347
+ switch (c) {
348
+ case "<":
349
+ return "&lt;";
350
+ case ">":
351
+ return "&gt;";
352
+ case "&":
353
+ return "&amp;";
354
+ case "'":
355
+ return "&apos;";
356
+ case '"':
357
+ return "&quot;";
358
+ default:
359
+ throw new Error("Matched a value that isn't replaceable");
360
+ }
361
+ });
362
+ };
363
+
364
+ const preRenderText = (txt: string): string => {
365
+ if (!txt) return txt;
366
+
367
+ // eslint-disable-next-line no-misleading-character-class
368
+ txt = txt.replace(/^[\u200B\u200C\u200D\u200E\u200F\uFEFF]/, "");
369
+
370
+ // Special handling for ordered lists that look like
371
+ // multiple choice (e.g. a), b), c), d) etc..)
372
+ return txt.replaceAll(
373
+ kLetterListPattern,
374
+ "<p class='markdown-ordered-list-item'>$1</p>",
375
+ );
376
+ };
377
+
378
+ const protectMarkdown = (txt: string): string => {
379
+ if (!txt) return txt;
380
+
381
+ // Special handling for commonmark like reference links which might
382
+ // look like:
383
+ // [alias]: http://www.google.com
384
+ // but text like:
385
+ // [expert]: answer
386
+ // Also fools this
387
+ return txt.replaceAll(
388
+ kCommonmarkReferenceLinkPattern,
389
+ "(open:767A125E)$1(close:767A125E) $2 ",
390
+ );
391
+ };
392
+
393
+ const unprotectMarkdown = (txt: string): string => {
394
+ if (!txt) return txt;
395
+
396
+ txt = txt.replaceAll("(open:767A125E)", "[");
397
+ txt = txt.replaceAll("(close:767A125E)", "]");
398
+ return txt;
399
+ };
400
+
401
+ function unescapeSupHtmlEntities(str: string): string {
402
+ // replace &lt;sup&gt; with <sup>
403
+ if (!str) {
404
+ return str;
405
+ }
406
+ return str
407
+ .replace(/&lt;sup&gt;/g, "<sup>")
408
+ .replace(/&lt;\/sup&gt;/g, "</sup>");
409
+ }
410
+
411
+ function unescapeCodeHtmlEntities(str: string): string {
412
+ if (!str) return str;
413
+
414
+ const htmlEntities: Record<string, string> = {
415
+ "&lt;": "<",
416
+ "&gt;": ">",
417
+ "&amp;": "&",
418
+ "&#x5C;": "\\",
419
+ "&quot;": '"',
420
+ };
421
+
422
+ return str.replace(
423
+ /(<code[^>]*>)([\s\S]*?)(<\/code>)/gi,
424
+ (
425
+ _match: string,
426
+ starttag: string,
427
+ content: string,
428
+ endtag: string,
429
+ ): string => {
430
+ return (
431
+ starttag +
432
+ content.replace(
433
+ /&(?:amp|lt|gt|quot|#39|#x2F|#x5C|#96);/g,
434
+ (entity: string): string => htmlEntities[entity] || entity,
435
+ ) +
436
+ endtag
437
+ );
438
+ },
439
+ );
440
+ }
data/conda_envs/evalclaw/lib/python3.11/site-packages/inspect_ai/_view/www/src/components/MessageBand.css ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .message-band {
2
+ grid-template-columns: max-content auto max-content;
3
+ align-items: center;
4
+ column-gap: 0.5em;
5
+ font-size: var(--inspect-font-size-small);
6
+ border-bottom: solid 1px var(--bs-light-border-subtle);
7
+ padding: 0.3em 1em;
8
+ display: grid;
9
+ }
10
+
11
+ .message-band.hidden {
12
+ display: none;
13
+ }
14
+
15
+ .message-band.info {
16
+ background-color: var(--bs-light);
17
+ }
18
+
19
+ .message-band.warning {
20
+ background-color: var(--bs-warning-bg-subtle);
21
+ color: var(--bs-warning-text-emphasis);
22
+ }
23
+
24
+ .message-band.error {
25
+ background-color: var(--bs-error-bg-subtle);
26
+ color: var(--bs-error-text-emphasis);
27
+ }
28
+
29
+ .message-band-btn {
30
+ font-size: var(--inspect-font-size-title-secondary);
31
+ margin: 0;
32
+ padding: 0;
33
+ height: var(--inspect-font-size-title-secondary);
34
+ line-height: var(--inspect-font-size-title-secondary);
35
+ }
36
+
37
+ .message-band-btn.error {
38
+ color: var(--bs-error-text-emphasis);
39
+ }
40
+
41
+ .message-band-btn.warning {
42
+ color: var(--bs-warning-text-emphasis);
43
+ }