@inflexa-ai/harness 0.42.2 → 0.43.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/agents/sandbox/shared.d.ts +1 -6
- package/dist/agents/sandbox/shared.js +0 -15
- package/dist/app/chat-turn.js +13 -1
- package/dist/config/environment-stores.d.ts +4 -2
- package/dist/contracts/chat-events.d.ts +9 -1
- package/dist/contracts/chat-frame.d.ts +3 -3
- package/dist/contracts/chat-frame.js +8 -3
- package/dist/contracts/chat-parts.d.ts +4 -1
- package/dist/contracts/data-profile.d.ts +4 -6
- package/dist/contracts/index.d.ts +1 -1
- package/dist/contracts/report-blocks.d.ts +1364 -75
- package/dist/contracts/report-blocks.js +221 -29
- package/dist/contracts/report-reference.js +1 -1
- package/dist/contracts/schemas/chat-events.d.ts +13 -0
- package/dist/contracts/schemas/chat-events.js +5 -0
- package/dist/contracts/schemas/chat-parts.d.ts +2 -2
- package/dist/contracts/schemas/index.d.ts +1 -1
- package/dist/contracts/schemas/index.js +1 -1
- package/dist/execution/input-signature.d.ts +7 -13
- package/dist/execution/input-signature.js +0 -0
- package/dist/execution/run-canceler.d.ts +3 -2
- package/dist/execution/run-canceler.js +3 -2
- package/dist/execution/run-event-stream.d.ts +16 -2
- package/dist/execution/run-event-stream.js +54 -3
- package/dist/index.d.ts +1 -8
- package/dist/index.js +5 -16
- package/dist/input-scan/enrich.d.ts +0 -2
- package/dist/input-scan/enrich.js +0 -1
- package/dist/lib/metrics.js +6 -7
- package/dist/lib/otel-spans.d.ts +4 -9
- package/dist/lib/otel-spans.js +3 -8
- package/dist/loop/run-agent.d.ts +4 -2
- package/dist/loop/run-agent.js +38 -23
- package/dist/memory/thread-history.d.ts +1 -1
- package/dist/prompts/report-session.d.ts +1 -1
- package/dist/prompts/report-session.js +17 -0
- package/dist/provenance/exec-frame.d.ts +1 -1
- package/dist/report-model/authoring-grammar.d.ts +416 -17
- package/dist/report-model/authoring-grammar.js +25 -4
- package/dist/report-model/block-walk.d.ts +20 -4
- package/dist/report-model/block-walk.js +64 -7
- package/dist/report-model/draft-finish.d.ts +6 -2
- package/dist/report-model/draft-finish.js +6 -1
- package/dist/report-model/production-resolver.d.ts +8 -0
- package/dist/report-model/production-resolver.js +1 -1
- package/dist/report-model/validate.d.ts +20 -10
- package/dist/report-model/validate.js +29 -13
- package/dist/report-render/chart-export.d.ts +52 -0
- package/dist/report-render/chart-export.js +192 -0
- package/dist/report-render/chart-presets.d.ts +46 -47
- package/dist/report-render/chart-presets.js +31 -101
- package/dist/report-render/chart-renderers.d.ts +163 -0
- package/dist/report-render/chart-renderers.js +1055 -0
- package/dist/report-render/chart-toolbox.d.ts +124 -0
- package/dist/report-render/chart-toolbox.js +595 -0
- package/dist/report-render/chart.d.ts +60 -27
- package/dist/report-render/chart.js +2323 -524
- package/dist/report-render/design.d.ts +476 -16
- package/dist/report-render/design.js +390 -56
- package/dist/report-render/figures/common.d.ts +321 -0
- package/dist/report-render/figures/common.js +759 -0
- package/dist/report-render/figures/dendrogram.d.ts +36 -0
- package/dist/report-render/figures/dendrogram.js +130 -0
- package/dist/report-render/figures/dense.d.ts +111 -0
- package/dist/report-render/figures/dense.js +204 -0
- package/dist/report-render/figures/dotplot.d.ts +28 -0
- package/dist/report-render/figures/dotplot.js +234 -0
- package/dist/report-render/figures/embedding.d.ts +43 -0
- package/dist/report-render/figures/embedding.js +360 -0
- package/dist/report-render/figures/equal-units.d.ts +101 -0
- package/dist/report-render/figures/equal-units.js +215 -0
- package/dist/report-render/figures/forest.d.ts +20 -0
- package/dist/report-render/figures/forest.js +398 -0
- package/dist/report-render/figures/gsea.d.ts +30 -0
- package/dist/report-render/figures/gsea.js +391 -0
- package/dist/report-render/figures/heatmap.d.ts +40 -0
- package/dist/report-render/figures/heatmap.js +395 -0
- package/dist/report-render/figures/index.d.ts +135 -0
- package/dist/report-render/figures/index.js +100 -0
- package/dist/report-render/figures/km.d.ts +16 -0
- package/dist/report-render/figures/km.js +406 -0
- package/dist/report-render/figures/label-room.d.ts +130 -0
- package/dist/report-render/figures/label-room.js +341 -0
- package/dist/report-render/figures/locuszoom.d.ts +50 -0
- package/dist/report-render/figures/locuszoom.js +675 -0
- package/dist/report-render/figures/lollipop.d.ts +16 -0
- package/dist/report-render/figures/lollipop.js +247 -0
- package/dist/report-render/figures/ma.d.ts +20 -0
- package/dist/report-render/figures/ma.js +114 -0
- package/dist/report-render/figures/manhattan.d.ts +60 -0
- package/dist/report-render/figures/manhattan.js +343 -0
- package/dist/report-render/figures/oncoprint.d.ts +41 -0
- package/dist/report-render/figures/oncoprint.js +420 -0
- package/dist/report-render/figures/pca.d.ts +37 -0
- package/dist/report-render/figures/pca.js +241 -0
- package/dist/report-render/figures/qq.d.ts +30 -0
- package/dist/report-render/figures/qq.js +182 -0
- package/dist/report-render/figures/roc.d.ts +17 -0
- package/dist/report-render/figures/roc.js +116 -0
- package/dist/report-render/figures/sankey.d.ts +48 -0
- package/dist/report-render/figures/sankey.js +353 -0
- package/dist/report-render/figures/upset.d.ts +60 -0
- package/dist/report-render/figures/upset.js +316 -0
- package/dist/report-render/figures/volcano.d.ts +25 -0
- package/dist/report-render/figures/volcano.js +166 -0
- package/dist/report-render/hybrid-svg.d.ts +75 -0
- package/dist/report-render/hybrid-svg.js +504 -0
- package/dist/report-render/number-format.d.ts +19 -0
- package/dist/report-render/number-format.js +25 -1
- package/dist/report-render/page.d.ts +41 -4
- package/dist/report-render/page.js +247 -12
- package/dist/report-render/render.d.ts +13 -4
- package/dist/report-render/render.js +37 -6
- package/dist/report-render/types.d.ts +23 -2
- package/dist/report-render/value-bridge.d.ts +38 -3
- package/dist/report-render/value-bridge.js +137 -6
- package/dist/report-render/views/chart-view.d.ts +42 -6
- package/dist/report-render/views/chart-view.js +70 -9
- package/dist/report-render/views/page-view.js +9 -10
- package/dist/runtime/assemble.js +2 -2
- package/dist/sandbox/client.d.ts +23 -32
- package/dist/sandbox/client.js +3 -11
- package/dist/sandbox/create-sandbox.d.ts +9 -24
- package/dist/sandbox/create-sandbox.js +15 -30
- package/dist/sandbox/docker-client.d.ts +12 -22
- package/dist/sandbox/docker-client.js +29 -43
- package/dist/sandbox/exec.d.ts +58 -0
- package/dist/sandbox/exec.js +197 -0
- package/dist/sandbox/identity.d.ts +5 -5
- package/dist/sandbox/identity.js +7 -10
- package/dist/sandbox/k8s-client.d.ts +4 -10
- package/dist/sandbox/k8s-client.js +5 -12
- package/dist/sandbox/liveness.d.ts +5 -12
- package/dist/sandbox/liveness.js +5 -12
- package/dist/sandbox/notification-sweep.d.ts +4 -7
- package/dist/sandbox/notification-sweep.js +4 -7
- package/dist/sandbox/reaper.d.ts +3 -3
- package/dist/sandbox/reaper.js +3 -3
- package/dist/sandbox/sandbox-error.d.ts +10 -11
- package/dist/sandbox/sandbox-error.js +10 -11
- package/dist/sandbox/sandbox-step-translate.d.ts +1 -1
- package/dist/sandbox/sandbox-step-translate.js +1 -1
- package/dist/sandbox/types.d.ts +31 -99
- package/dist/sandbox/types.js +17 -84
- package/dist/state/active-sandboxes.d.ts +7 -32
- package/dist/state/active-sandboxes.js +11 -46
- package/dist/state/index.d.ts +1 -2
- package/dist/state/index.js +1 -1
- package/dist/state/migrations/20261005120000_drop_the_active_exec_tracking.d.ts +7 -0
- package/dist/state/migrations/20261005120000_drop_the_active_exec_tracking.js +12 -0
- package/dist/state/migrations/index.js +2 -0
- package/dist/state/schema.d.ts +1 -5
- package/dist/state/schema.js +1 -6
- package/dist/state/step-executions.js +1 -2
- package/dist/tasks/data-profile.js +7 -20
- package/dist/tasks/derive-table-exec.d.ts +4 -14
- package/dist/tasks/derive-table-exec.js +9 -24
- package/dist/tasks/extract-values.d.ts +2 -2
- package/dist/tasks/extract-values.js +4 -7
- package/dist/tools/define-tool.d.ts +56 -13
- package/dist/tools/define-tool.js +28 -1
- package/dist/tools/execute-analysis.js +3 -3
- package/dist/tools/report-session/derive-table.d.ts +8 -9
- package/dist/tools/report-session/derive-table.js +3 -4
- package/dist/tools/report-session/preview-report.js +4 -49
- package/dist/tools/sandbox/list-available-packages.d.ts +1 -1
- package/dist/tools/sandbox/list-available-packages.js +5 -4
- package/dist/tools/workspace/edit-file.d.ts +5 -4
- package/dist/tools/workspace/edit-file.js +10 -13
- package/dist/tools/workspace/execute-command.d.ts +27 -42
- package/dist/tools/workspace/execute-command.js +42 -38
- package/dist/tools/workspace/index.d.ts +5 -6
- package/dist/tools/workspace/index.js +5 -6
- package/dist/tools/workspace/mutator.d.ts +43 -8
- package/dist/tools/workspace/mutator.js +45 -34
- package/dist/tools/workspace/run-exec.d.ts +3 -12
- package/dist/tools/workspace/run-exec.js +7 -24
- package/dist/tools/workspace/scan-inputs.d.ts +0 -3
- package/dist/tools/workspace/scan-inputs.js +0 -1
- package/dist/tools/workspace/write-file.d.ts +12 -3
- package/dist/tools/workspace/write-file.js +17 -13
- package/dist/workflows/sandbox-step.d.ts +7 -11
- package/dist/workflows/sandbox-step.js +24 -27
- package/package.json +5 -3
- package/dist/sandbox/await-exec.d.ts +0 -143
- package/dist/sandbox/await-exec.js +0 -417
- package/dist/sandbox/deliver-exec-event.d.ts +0 -25
- package/dist/sandbox/deliver-exec-event.js +0 -29
- package/dist/sandbox/digest.d.ts +0 -14
- package/dist/sandbox/digest.js +0 -17
- package/dist/sandbox/exec-id.d.ts +0 -12
- package/dist/sandbox/exec-id.js +0 -20
- package/dist/sandbox/hmac.d.ts +0 -62
- package/dist/sandbox/hmac.js +0 -72
- package/dist/sandbox/submit-exec.d.ts +0 -38
- package/dist/sandbox/submit-exec.js +0 -80
- package/dist/sandbox/watchdog.d.ts +0 -71
- package/dist/sandbox/watchdog.js +0 -161
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The toolbox of a page chart: the download menu, the data view, and the zoom of a dense cartesian chart.
|
|
3
|
+
*
|
|
4
|
+
* The derivation gives a figure with no toolbox. The chart card adds the toolbox to the option of the page, and
|
|
5
|
+
* each export removes it again, thus a file never shows it. The option rides to the page as inline JSON, thus
|
|
6
|
+
* it holds no function. Each handler of the toolbox is the name of a page function, and the bootstrap binds the
|
|
7
|
+
* function under that name after the parse, as it registers a named renderer.
|
|
8
|
+
*
|
|
9
|
+
* The toolbox holds no `magicType`, because a reader must not change the form that the author chose.
|
|
10
|
+
*/
|
|
11
|
+
import type { ChartType } from "../contracts/report-blocks.js";
|
|
12
|
+
import type { EchartOption } from "./chart.js";
|
|
13
|
+
/**
|
|
14
|
+
* The chart types that get the zoom and the restore controls: the dense cartesian forms. A reader zooms into a
|
|
15
|
+
* cloud of many thousands of points to read one region.
|
|
16
|
+
*/
|
|
17
|
+
export declare const DENSE_CARTESIAN_CHARTS: readonly ChartType[];
|
|
18
|
+
/** The page function that opens the download menu of a chart, and the page function that gives the data view. */
|
|
19
|
+
export declare const EXPORT_MENU_FUNCTION = "reportOpenExportMenu";
|
|
20
|
+
export declare const DATA_VIEW_FUNCTION = "reportDataViewContent";
|
|
21
|
+
/**
|
|
22
|
+
* The members of a toolbox feature that name a page function. The bootstrap replaces each name with its
|
|
23
|
+
* function, and it removes a name that the page does not hold, because the runtime calls the member.
|
|
24
|
+
*/
|
|
25
|
+
export declare const TOOLBOX_FUNCTION_MEMBERS: readonly ["onclick", "optionToContent"];
|
|
26
|
+
/** The names of the page functions that a toolbox can name. Each one is a function of `CHART_TOOLBOX_SOURCE`. */
|
|
27
|
+
export declare const TOOLBOX_PAGE_FUNCTIONS: readonly ["reportOpenExportMenu", "reportDataViewContent"];
|
|
28
|
+
/** The download icon: an arrow into a tray, as the path of a 24-pixel box. The runtime strokes it in the icon color. */
|
|
29
|
+
export declare const DOWNLOAD_ICON = "path://M12 3L12 15M7 10L12 15L17 10M4 17L4 21L20 21L20 17";
|
|
30
|
+
/**
|
|
31
|
+
* The canvas layer of the toolbox. The print hides this layer, because a new option draws each series again and
|
|
32
|
+
* a dense series then draws in chunks over some frames. The runtime gives a dense series a layer of its own and
|
|
33
|
+
* lifts each later component one layer, thus the toolbox stands far above each layer that the runtime gives.
|
|
34
|
+
*/
|
|
35
|
+
export declare const TOOLBOX_ZLEVEL = 1000;
|
|
36
|
+
/**
|
|
37
|
+
* The height of the band that the toolbox takes at the top of the chart body, in pixels: the top gap, the
|
|
38
|
+
* padding over and under the icons, and the box of one outline icon. The derivation gives no toolbox, and no
|
|
39
|
+
* layer reserves this band, thus a figure that places its own grid keeps its plot and its text under the band.
|
|
40
|
+
*/
|
|
41
|
+
export declare const TOOLBOX_BAND_PX: number;
|
|
42
|
+
/** The attribute of the download control of a card. It holds the id of the container whose menu the control opens. */
|
|
43
|
+
export declare const MENU_CONTROL_ATTRIBUTE = "data-chart-menu";
|
|
44
|
+
/** The class of an open download menu. The design sheet shows a menu with this class, and it hides each other menu. */
|
|
45
|
+
export declare const MENU_OPEN_CLASS = "report-chart-menu-open";
|
|
46
|
+
/** The class of the hidden note that a menu shows when the page cannot build the file of an entry. */
|
|
47
|
+
export declare const MENU_FAULT_CLASS = "report-chart-menu-fault";
|
|
48
|
+
/** The class of a fault note that the page shows. The design sheet hides each other fault note. */
|
|
49
|
+
export declare const MENU_FAULT_SHOWN_CLASS = "report-chart-menu-fault-shown";
|
|
50
|
+
/**
|
|
51
|
+
* The most rows that the data view shows. A dense chart plots many thousands of points, and a table of each one
|
|
52
|
+
* costs the page a DOM node for each cell. The note of the view then states the count that it holds back.
|
|
53
|
+
*/
|
|
54
|
+
export declare const DATA_VIEW_ROW_LIMIT = 1000;
|
|
55
|
+
/** The id of the download menu of the chart in one container. */
|
|
56
|
+
export declare function chartMenuId(containerId: string): string;
|
|
57
|
+
/** The id of the download control in the card of the chart in one container. */
|
|
58
|
+
export declare function chartMenuControlId(containerId: string): string;
|
|
59
|
+
/**
|
|
60
|
+
* The toolbox of one page chart.
|
|
61
|
+
*
|
|
62
|
+
* Each chart gets the data view and the download control. A dense cartesian chart also gets the zoom and the
|
|
63
|
+
* restore controls. A composition names no chart type, thus it gets no zoom. The download control is the last
|
|
64
|
+
* feature, thus it sits at the right edge and its menu opens under it.
|
|
65
|
+
*/
|
|
66
|
+
export declare function chartToolbox(chartType: ChartType | undefined): EchartOption;
|
|
67
|
+
/** The option of the page: the derived option with the toolbox of its chart type. The derived option stays as it is. */
|
|
68
|
+
export declare function pageChartOption(option: EchartOption, chartType: ChartType | undefined): EchartOption;
|
|
69
|
+
/**
|
|
70
|
+
* The page function that makes the label formatter of a genome axis, and the member of the axis that it reads.
|
|
71
|
+
*
|
|
72
|
+
* A genome axis plots the cumulative position over the chromosomes. At the full range a series names the
|
|
73
|
+
* chromosomes, and the axis hides its labels. While a zoom of the toolbox narrows the axis, the axis shows each
|
|
74
|
+
* position as the chromosome and the position on it, and that series hides.
|
|
75
|
+
*/
|
|
76
|
+
export declare const GENOME_POSITION_FUNCTION = "reportGenomePosition";
|
|
77
|
+
export declare const GENOME_MEMBER = "genome";
|
|
78
|
+
/** The genome member of an axis: the series that names the chromosomes, and the start and the label of each chromosome in position order. */
|
|
79
|
+
export interface GenomeAxis {
|
|
80
|
+
readonly names: string;
|
|
81
|
+
readonly starts: ReadonlyArray<readonly [number, string]>;
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* The page functions of the toolbox, as browser source text.
|
|
85
|
+
*
|
|
86
|
+
* `reportOpenExportMenu` is the click handler of the download icon of the toolbox. The runtime calls it with the
|
|
87
|
+
* model, the API of the chart, the name of the icon, and the event. The runtime draws the icon on the canvas and
|
|
88
|
+
* binds a mouse click alone, thus the card also carries a download control in its title line. `reportMenuClick`
|
|
89
|
+
* takes a click on that control, and a button fires a click for the Enter key and the Space key. The two paths
|
|
90
|
+
* open the menu of the chart under the icon, at the right edge of the chart body, and a second click closes it.
|
|
91
|
+
* The control states the open menu in `aria-expanded`.
|
|
92
|
+
*
|
|
93
|
+
* The menu takes the keyboard: the first entry takes the focus, the arrow keys, `Home`, and `End` move the focus,
|
|
94
|
+
* and `Escape` closes the menu and gives the focus back to the control of the card. `Tab` closes the menu and puts
|
|
95
|
+
* the focus on the control, thus the next Tab stop comes after the control. A click outside the menu closes it,
|
|
96
|
+
* and so does a click on an entry. After an entry fires, the focus goes back to the control.
|
|
97
|
+
*
|
|
98
|
+
* The runtime sends the click of the icon on to the document, and that click is outside the menu. Thus the menu
|
|
99
|
+
* keeps the event that opened it, and the outside test skips that one event. On a touch screen the runtime fires
|
|
100
|
+
* the click of the icon from the touch end, and the browser then sends its own click to the chart. Thus a menu that
|
|
101
|
+
* a tap opened also skips the next click inside its chart.
|
|
102
|
+
*
|
|
103
|
+
* `reportMenuFault` shows the fault note of the open menu and gives it the focus, when the page cannot build the
|
|
104
|
+
* file of an entry. The menu then stays open, and the close hides the note again.
|
|
105
|
+
*
|
|
106
|
+
* `reportDataViewContent` gives the data view: the plotted rows of each series as one plain table, up to the row
|
|
107
|
+
* limit. A series that the reader cannot hover, for example the anchors of the point names, holds no data of the
|
|
108
|
+
* figure, thus the table skips it. A number of a category axis reads as its category. The view builds each cell
|
|
109
|
+
* as text, thus a hostile name reaches the view as text and never as markup.
|
|
110
|
+
*
|
|
111
|
+
* `reportBindToolbox` replaces each function name of the toolbox with its page function. It also replaces the name
|
|
112
|
+
* of the formatter of each genome axis with the formatter that `reportGenomePosition` makes from the genome member
|
|
113
|
+
* of the axis. The formatter gives the label of the chromosome that holds the position, and the distance from the
|
|
114
|
+
* start of that chromosome in megabases.
|
|
115
|
+
*
|
|
116
|
+
* `reportWatchZoom` attaches the zoom handler to a chart after its init. The handler reads the window of each
|
|
117
|
+
* axis after each zoom. The toolbox zoom fixes the ends of a zoomed axis to the ends of the selected box, and the
|
|
118
|
+
* runtime prints each end of a value axis as a label beside the round labels. Thus a zoomed value axis hides
|
|
119
|
+
* its two end labels, and a genome axis shows its labels and hides the series that names the chromosomes. That
|
|
120
|
+
* series draws one point under the middle of each chromosome, and a zoom clips each point outside the window.
|
|
121
|
+
* At the full range each value goes back to the value of the option. The restore of the toolbox sets the option
|
|
122
|
+
* of the chart again, thus the handler then starts from the option.
|
|
123
|
+
*/
|
|
124
|
+
export declare const CHART_TOOLBOX_SOURCE: string;
|