@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
|
@@ -5,27 +5,33 @@
|
|
|
5
5
|
* `deriveChartOption` turns that grammar and the resolved rows into one ECharts option object. The chart
|
|
6
6
|
* container markup lives beside this file, and it wraps the option that this derivation gives.
|
|
7
7
|
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
8
|
+
* A preset draws through its figure module (`figures/`), and each base chart type keeps its own fixed rule.
|
|
9
|
+
* A dense figure builds its points through the composition machinery of this file, thus a figure and a
|
|
10
|
+
* composition read one series path.
|
|
11
11
|
*
|
|
12
|
-
* The renderer computes no aggregate
|
|
13
|
-
*
|
|
14
|
-
* cell
|
|
12
|
+
* The renderer computes no aggregate outside the named summaries: the histogram bins, the box quantiles, the
|
|
13
|
+
* violin density, and the shares of a normalized bar. Every other plotted number stays traceable to one
|
|
14
|
+
* cell of the evidence artifact, or to a per-row transform of one cell. A pie, a heatmap, a stacked bar, and
|
|
15
|
+
* a radar arrive one row per category or per pair, thus a repeated category or a repeated pair is a refusal
|
|
16
|
+
* and not a silent sum.
|
|
15
17
|
*
|
|
16
18
|
* The derivation is deterministic. Every object builds in one fixed key order, and the code reads no
|
|
17
19
|
* clock, no random value, and no locale. A string comparison uses the code-unit order (`<`) and never
|
|
18
20
|
* `localeCompare`, thus the same rows give the same bytes on every host.
|
|
19
21
|
*
|
|
20
22
|
* The option rides to the page as inline JSON. Thus no axis label and no tooltip can carry a function
|
|
21
|
-
* formatter, and every formatter here is a static template of the chart runtime. As a
|
|
22
|
-
* derivation bounds the tick precision of the one axis whose unit it declares itself, and every
|
|
23
|
-
* value axis keeps the tick values that ECharts computes.
|
|
23
|
+
* formatter, and every formatter here is a static template of the chart runtime or a static text. As a
|
|
24
|
+
* result the derivation bounds the tick precision of the one axis whose unit it declares itself, and every
|
|
25
|
+
* other value axis keeps the tick values that ECharts computes. A custom series names its renderer as a
|
|
26
|
+
* string, and each consumer of the option binds the name (`chart-renderers.ts`).
|
|
24
27
|
*/
|
|
25
28
|
import { type Result } from "neverthrow";
|
|
26
29
|
import { type ChartBlock, type ChartTransform } from "../contracts/report-blocks.js";
|
|
27
30
|
import { type PresetRule } from "./chart-presets.js";
|
|
28
|
-
import
|
|
31
|
+
import { transformColumn } from "./figures/common.js";
|
|
32
|
+
import { type FigureRegistry } from "./figures/index.js";
|
|
33
|
+
import type { RenderProblem, RenderStatistic, RenderTrack, RenderTrees } from "./types.js";
|
|
34
|
+
export { transformColumn };
|
|
29
35
|
/** One cell of a resolved row. A cell is one string or one number. */
|
|
30
36
|
export type Cell = string | number;
|
|
31
37
|
/** One resolved row of the bound table, keyed by column name. */
|
|
@@ -35,14 +41,30 @@ export type EchartOption = Record<string, unknown>;
|
|
|
35
41
|
/**
|
|
36
42
|
* Derive the ECharts option for a chart block, then pass it through `normalizeEchartSpec`.
|
|
37
43
|
*
|
|
38
|
-
* The normalizer owns the bottom legend
|
|
39
|
-
*
|
|
40
|
-
* their order, and
|
|
44
|
+
* The normalizer owns the bottom legend and the axis-label discipline. Thus the derivation sets no `title`,
|
|
45
|
+
* and it sets a `legend` only where an auxiliary series would show an orphan entry. The theme palette assigns
|
|
46
|
+
* the series colors by their order, and a null category or a focus is the one case that names a color.
|
|
41
47
|
*
|
|
42
48
|
* The axis of a channel names the label that the binding declares for its column. The semantic title of a
|
|
43
49
|
* preset answers next, and the raw column name answers last.
|
|
44
50
|
*/
|
|
45
|
-
export declare function deriveChartOption(block: ChartBlock, rows: readonly ChartRow[], columns?: readonly string[]): Result<EchartOption, RenderProblem>;
|
|
51
|
+
export declare function deriveChartOption(block: ChartBlock, rows: readonly ChartRow[], columns?: readonly string[], inputs?: ChartInputs, opts?: ChartOpts): Result<EchartOption, RenderProblem>;
|
|
52
|
+
/**
|
|
53
|
+
* The resolved parts of a chart beside the rows of its binding: the value of each statistic, in block order,
|
|
54
|
+
* the rows of the track, and the rows of the tree of each axis. A block that declares none of them takes no
|
|
55
|
+
* input.
|
|
56
|
+
*/
|
|
57
|
+
export interface ChartInputs {
|
|
58
|
+
readonly statistics?: readonly RenderStatistic[];
|
|
59
|
+
readonly track?: RenderTrack;
|
|
60
|
+
readonly trees?: RenderTrees;
|
|
61
|
+
}
|
|
62
|
+
/** The options of the chart derivation: the figure modules that the dispatch asks first. */
|
|
63
|
+
export interface ChartOpts {
|
|
64
|
+
readonly figures: FigureRegistry;
|
|
65
|
+
}
|
|
66
|
+
/** The options of every render: the registered figure modules. */
|
|
67
|
+
export declare const DEFAULT_CHART_OPTS: ChartOpts;
|
|
46
68
|
/**
|
|
47
69
|
* Derive the option of one chart, and read the shared payload of its artifact where the inline form grows
|
|
48
70
|
* too large.
|
|
@@ -60,7 +82,7 @@ export declare function deriveChartOption(block: ChartBlock, rows: readonly Char
|
|
|
60
82
|
* five-number summary, an addressed pair, and the upper half of a band are each such a value, thus no
|
|
61
83
|
* descriptor can state one.
|
|
62
84
|
*/
|
|
63
|
-
export declare function deriveChartRender(block: ChartBlock, rows: readonly ChartRow[], columns: readonly string[] | undefined, target: ChartPayloadTarget): Result<ChartRender, RenderProblem>;
|
|
85
|
+
export declare function deriveChartRender(block: ChartBlock, rows: readonly ChartRow[], columns: readonly string[] | undefined, target: ChartPayloadTarget, inputs?: ChartInputs, opts?: ChartOpts): Result<ChartRender, RenderProblem>;
|
|
64
86
|
/**
|
|
65
87
|
* The label of one named point. `{b}` is the name of the item, thus the label needs no function.
|
|
66
88
|
*
|
|
@@ -69,12 +91,13 @@ export declare function deriveChartRender(block: ChartBlock, rows: readonly Char
|
|
|
69
91
|
*/
|
|
70
92
|
export declare const POINT_LABEL: EchartOption;
|
|
71
93
|
/**
|
|
72
|
-
* One column that a page-side series build reads: the place of the column in the payload,
|
|
73
|
-
* transform of the channel.
|
|
94
|
+
* One column that a page-side series build reads: the place of the column in the payload, the per-row
|
|
95
|
+
* transform of the channel, and whether the page reads each cell as its number.
|
|
74
96
|
*/
|
|
75
97
|
export interface ChartColumnSource {
|
|
76
98
|
readonly column: number;
|
|
77
99
|
readonly transform?: ChartTransform;
|
|
100
|
+
readonly numeric?: true;
|
|
78
101
|
}
|
|
79
102
|
/**
|
|
80
103
|
* One runtime series, as the page builds it from the columnar payload.
|
|
@@ -86,17 +109,24 @@ export interface ChartColumnSource {
|
|
|
86
109
|
* flags are row places of the payload, thus a split carries the flags of its own rows alone.
|
|
87
110
|
*
|
|
88
111
|
* `sort` states that the form draws along the x axis, and `swap` states that the pair leads with the value
|
|
89
|
-
* of a horizontal bar.
|
|
112
|
+
* of a horizontal bar. `rise` states that the points draw in the ascending order of their color, thus the high
|
|
113
|
+
* values draw on top.
|
|
114
|
+
*
|
|
115
|
+
* `color` and `size` name the columns of a continuous color and of a symbol size. Each one adds one member
|
|
116
|
+
* to the item after the pair, in that order, and a row whose cell is not numeric draws no point.
|
|
90
117
|
*/
|
|
91
118
|
export interface ChartSeriesSource {
|
|
92
119
|
readonly x: ChartColumnSource;
|
|
93
120
|
readonly y: ChartColumnSource;
|
|
121
|
+
readonly color?: ChartColumnSource;
|
|
122
|
+
readonly size?: ChartColumnSource;
|
|
94
123
|
readonly group?: ChartColumnSource;
|
|
95
124
|
readonly value?: Cell;
|
|
96
125
|
readonly category?: number;
|
|
97
126
|
readonly label?: number;
|
|
98
127
|
readonly flags?: readonly number[];
|
|
99
128
|
readonly sort?: boolean;
|
|
129
|
+
readonly rise?: boolean;
|
|
100
130
|
readonly swap?: boolean;
|
|
101
131
|
}
|
|
102
132
|
/**
|
|
@@ -120,16 +150,19 @@ export interface ChartPayloadTarget {
|
|
|
120
150
|
readonly key: string;
|
|
121
151
|
readonly columns: readonly string[];
|
|
122
152
|
}
|
|
123
|
-
/**
|
|
153
|
+
/**
|
|
154
|
+
* The option of one chart, whether it reads the registered payload of its artifact, the same chart with
|
|
155
|
+
* every row inline, and the box of its page chart body.
|
|
156
|
+
*
|
|
157
|
+
* A dense page option holds no row, thus the export renders the inline option. `bodyPx` is the height of the
|
|
158
|
+
* chart body: a facet grows it one row of height for each row of panels, and a figure of many rows states its
|
|
159
|
+
* own. `widthPx` is the width of a figure that draws a block of a fixed size, for example the square of a PCA.
|
|
160
|
+
* The card narrows the body to that width and centers it, and a chart with no such width fills the card.
|
|
161
|
+
*/
|
|
124
162
|
export interface ChartRender {
|
|
125
163
|
readonly option: EchartOption;
|
|
126
164
|
readonly readsPayload: boolean;
|
|
165
|
+
readonly inline: EchartOption;
|
|
166
|
+
readonly bodyPx: number;
|
|
167
|
+
readonly widthPx?: number;
|
|
127
168
|
}
|
|
128
|
-
/**
|
|
129
|
-
* The transformed value of one column, one entry for each row. A row with no usable cell gives `null`.
|
|
130
|
-
*
|
|
131
|
-
* The page-side series build holds the twin of this function, because a chart that reads the payload
|
|
132
|
-
* transforms its columns in the browser. A shared test vector runs the two over one set of cells, thus the
|
|
133
|
-
* two cannot give different numbers in silence.
|
|
134
|
-
*/
|
|
135
|
-
export declare function transformColumn(rows: readonly ChartRow[], column: string, transform: ChartTransform): (number | null)[];
|