@flanksource/clicky-ui 0.3.78 → 0.3.80
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/dist/ai.cjs +2 -2
- package/dist/ai.js +2 -2
- package/dist/comments/CommentThreadList.cjs +13 -14
- package/dist/comments/CommentThreadList.cjs.map +1 -1
- package/dist/comments/CommentThreadList.d.ts.map +1 -1
- package/dist/comments/CommentThreadList.js +13 -14
- package/dist/comments/CommentThreadList.js.map +1 -1
- package/dist/components/Combobox.cjs +9 -3
- package/dist/components/Combobox.cjs.map +1 -1
- package/dist/components/Combobox.d.ts.map +1 -1
- package/dist/components/Combobox.js +9 -3
- package/dist/components/Combobox.js.map +1 -1
- package/dist/components/ComboboxMenu.cjs +1 -1
- package/dist/components/ComboboxMenu.cjs.map +1 -1
- package/dist/components/ComboboxMenu.js +1 -1
- package/dist/components/ComboboxMenu.js.map +1 -1
- package/dist/components/EndpointSelector.cjs +7 -1
- package/dist/components/EndpointSelector.cjs.map +1 -1
- package/dist/components/EndpointSelector.d.ts.map +1 -1
- package/dist/components/EndpointSelector.js +7 -1
- package/dist/components/EndpointSelector.js.map +1 -1
- package/dist/components/FilterBar.cjs +36 -12
- package/dist/components/FilterBar.cjs.map +1 -1
- package/dist/components/FilterBar.d.ts +14 -2
- package/dist/components/FilterBar.d.ts.map +1 -1
- package/dist/components/FilterBar.js +36 -12
- package/dist/components/FilterBar.js.map +1 -1
- package/dist/components/FormLookupProvider.cjs +12 -4
- package/dist/components/FormLookupProvider.cjs.map +1 -1
- package/dist/components/FormLookupProvider.d.ts.map +1 -1
- package/dist/components/FormLookupProvider.js +13 -5
- package/dist/components/FormLookupProvider.js.map +1 -1
- package/dist/components/JSONPathPlayground.cjs +124 -233
- package/dist/components/JSONPathPlayground.cjs.map +1 -1
- package/dist/components/JSONPathPlayground.d.ts +15 -13
- package/dist/components/JSONPathPlayground.d.ts.map +1 -1
- package/dist/components/JSONPathPlayground.js +125 -234
- package/dist/components/JSONPathPlayground.js.map +1 -1
- package/dist/components/JsonSchemaForm.cjs +6 -0
- package/dist/components/JsonSchemaForm.cjs.map +1 -1
- package/dist/components/JsonSchemaForm.js +6 -0
- package/dist/components/JsonSchemaForm.js.map +1 -1
- package/dist/components/SegmentedControl.cjs +1 -1
- package/dist/components/SegmentedControl.cjs.map +1 -1
- package/dist/components/SegmentedControl.d.ts.map +1 -1
- package/dist/components/SegmentedControl.js +1 -1
- package/dist/components/SegmentedControl.js.map +1 -1
- package/dist/components/TimeRange.cjs +133 -60
- package/dist/components/TimeRange.cjs.map +1 -1
- package/dist/components/TimeRange.d.ts +8 -1
- package/dist/components/TimeRange.d.ts.map +1 -1
- package/dist/components/TimeRange.js +133 -60
- package/dist/components/TimeRange.js.map +1 -1
- package/dist/components/json-schema-form-accordion-array.cjs +8 -6
- package/dist/components/json-schema-form-accordion-array.cjs.map +1 -1
- package/dist/components/json-schema-form-accordion-array.d.ts.map +1 -1
- package/dist/components/json-schema-form-accordion-array.js +9 -7
- package/dist/components/json-schema-form-accordion-array.js.map +1 -1
- package/dist/components/json-schema-form-array-rows.cjs +45 -0
- package/dist/components/json-schema-form-array-rows.cjs.map +1 -0
- package/dist/components/json-schema-form-array-rows.d.ts +10 -0
- package/dist/components/json-schema-form-array-rows.d.ts.map +1 -0
- package/dist/components/json-schema-form-array-rows.js +45 -0
- package/dist/components/json-schema-form-array-rows.js.map +1 -0
- package/dist/components/json-schema-form-item-summary.cjs +3 -5
- package/dist/components/json-schema-form-item-summary.cjs.map +1 -1
- package/dist/components/json-schema-form-item-summary.d.ts +1 -1
- package/dist/components/json-schema-form-item-summary.d.ts.map +1 -1
- package/dist/components/json-schema-form-item-summary.js +3 -5
- package/dist/components/json-schema-form-item-summary.js.map +1 -1
- package/dist/components/json-schema-form-render.cjs +11 -2
- package/dist/components/json-schema-form-render.cjs.map +1 -1
- package/dist/components/json-schema-form-render.d.ts.map +1 -1
- package/dist/components/json-schema-form-render.js +12 -3
- package/dist/components/json-schema-form-render.js.map +1 -1
- package/dist/components/json-schema-form-resolve.cjs +10 -0
- package/dist/components/json-schema-form-resolve.cjs.map +1 -1
- package/dist/components/json-schema-form-resolve.d.ts +1 -0
- package/dist/components/json-schema-form-resolve.d.ts.map +1 -1
- package/dist/components/json-schema-form-resolve.js +10 -1
- package/dist/components/json-schema-form-resolve.js.map +1 -1
- package/dist/components/json-schema-form-runtime-types.d.ts +4 -0
- package/dist/components/json-schema-form-runtime-types.d.ts.map +1 -1
- package/dist/components/json-schema-form-table-array.cjs +25 -16
- package/dist/components/json-schema-form-table-array.cjs.map +1 -1
- package/dist/components/json-schema-form-table-array.d.ts +1 -1
- package/dist/components/json-schema-form-table-array.d.ts.map +1 -1
- package/dist/components/json-schema-form-table-array.js +26 -17
- package/dist/components/json-schema-form-table-array.js.map +1 -1
- package/dist/components/json-schema-form-types.d.ts +0 -2
- package/dist/components/json-schema-form-types.d.ts.map +1 -1
- package/dist/components/jsonPathPlaygroundEvaluator.cjs +53 -0
- package/dist/components/jsonPathPlaygroundEvaluator.cjs.map +1 -0
- package/dist/components/jsonPathPlaygroundEvaluator.d.ts +23 -0
- package/dist/components/jsonPathPlaygroundEvaluator.d.ts.map +1 -0
- package/dist/components/jsonPathPlaygroundEvaluator.js +53 -0
- package/dist/components/jsonPathPlaygroundEvaluator.js.map +1 -0
- package/dist/components/jsonPathTree.cjs +1 -0
- package/dist/components/jsonPathTree.cjs.map +1 -1
- package/dist/components/jsonPathTree.d.ts +6 -0
- package/dist/components/jsonPathTree.d.ts.map +1 -1
- package/dist/components/jsonPathTree.js +1 -0
- package/dist/components/jsonPathTree.js.map +1 -1
- package/dist/data/Clicky.cjs +37 -18
- package/dist/data/Clicky.cjs.map +1 -1
- package/dist/data/Clicky.d.ts +5 -0
- package/dist/data/Clicky.d.ts.map +1 -1
- package/dist/data/Clicky.js +37 -18
- package/dist/data/Clicky.js.map +1 -1
- package/dist/data/DataTable.cjs +49 -12
- package/dist/data/DataTable.cjs.map +1 -1
- package/dist/data/DataTable.d.ts +17 -2
- package/dist/data/DataTable.d.ts.map +1 -1
- package/dist/data/DataTable.js +49 -12
- package/dist/data/DataTable.js.map +1 -1
- package/dist/data/TaskPoolUsage.cjs +2 -1
- package/dist/data/TaskPoolUsage.cjs.map +1 -1
- package/dist/data/TaskPoolUsage.d.ts.map +1 -1
- package/dist/data/TaskPoolUsage.js +2 -1
- package/dist/data/TaskPoolUsage.js.map +1 -1
- package/dist/data/TimeseriesPanel.axes.cjs +18 -3
- package/dist/data/TimeseriesPanel.axes.cjs.map +1 -1
- package/dist/data/TimeseriesPanel.axes.d.ts +10 -1
- package/dist/data/TimeseriesPanel.axes.d.ts.map +1 -1
- package/dist/data/TimeseriesPanel.axes.js +17 -4
- package/dist/data/TimeseriesPanel.axes.js.map +1 -1
- package/dist/data/TimeseriesPanel.cjs +57 -23
- package/dist/data/TimeseriesPanel.cjs.map +1 -1
- package/dist/data/TimeseriesPanel.d.ts.map +1 -1
- package/dist/data/TimeseriesPanel.js +59 -25
- package/dist/data/TimeseriesPanel.js.map +1 -1
- package/dist/data/TimeseriesPanel.model.cjs +10 -7
- package/dist/data/TimeseriesPanel.model.cjs.map +1 -1
- package/dist/data/TimeseriesPanel.model.d.ts +7 -4
- package/dist/data/TimeseriesPanel.model.d.ts.map +1 -1
- package/dist/data/TimeseriesPanel.model.js +11 -8
- package/dist/data/TimeseriesPanel.model.js.map +1 -1
- package/dist/data/TimeseriesPanel.readout.cjs +11 -0
- package/dist/data/TimeseriesPanel.readout.cjs.map +1 -0
- package/dist/data/TimeseriesPanel.readout.d.ts +4 -0
- package/dist/data/TimeseriesPanel.readout.d.ts.map +1 -0
- package/dist/data/TimeseriesPanel.readout.js +10 -0
- package/dist/data/TimeseriesPanel.readout.js.map +1 -0
- package/dist/data/TimeseriesPanel.segments.cjs +67 -0
- package/dist/data/TimeseriesPanel.segments.cjs.map +1 -0
- package/dist/data/TimeseriesPanel.segments.d.ts +27 -0
- package/dist/data/TimeseriesPanel.segments.d.ts.map +1 -0
- package/dist/data/TimeseriesPanel.segments.js +67 -0
- package/dist/data/TimeseriesPanel.segments.js.map +1 -0
- package/dist/data/TreeDataTable.cjs +12 -3
- package/dist/data/TreeDataTable.cjs.map +1 -1
- package/dist/data/TreeDataTable.d.ts +15 -3
- package/dist/data/TreeDataTable.d.ts.map +1 -1
- package/dist/data/TreeDataTable.js +12 -3
- package/dist/data/TreeDataTable.js.map +1 -1
- package/dist/data/TreeNode.cjs +18 -3
- package/dist/data/TreeNode.cjs.map +1 -1
- package/dist/data/TreeNode.d.ts +7 -1
- package/dist/data/TreeNode.d.ts.map +1 -1
- package/dist/data/TreeNode.js +18 -3
- package/dist/data/TreeNode.js.map +1 -1
- package/dist/data/ai/SessionChatComposer.cjs +2 -0
- package/dist/data/ai/SessionChatComposer.cjs.map +1 -1
- package/dist/data/ai/SessionChatComposer.d.ts.map +1 -1
- package/dist/data/ai/SessionChatComposer.js +2 -0
- package/dist/data/ai/SessionChatComposer.js.map +1 -1
- package/dist/data/ai/SessionInspector.panels.cjs +47 -1
- package/dist/data/ai/SessionInspector.panels.cjs.map +1 -1
- package/dist/data/ai/SessionInspector.panels.d.ts.map +1 -1
- package/dist/data/ai/SessionInspector.panels.js +48 -2
- package/dist/data/ai/SessionInspector.panels.js.map +1 -1
- package/dist/data/ai/SessionViewer.unified.d.ts +48 -0
- package/dist/data/ai/SessionViewer.unified.d.ts.map +1 -1
- package/dist/data/ai/index.d.ts +2 -2
- package/dist/data/ai/index.d.ts.map +1 -1
- package/dist/data/ai/runtime-profiles/PresetWorkspace.cjs +97 -100
- package/dist/data/ai/runtime-profiles/PresetWorkspace.cjs.map +1 -1
- package/dist/data/ai/runtime-profiles/PresetWorkspace.d.ts.map +1 -1
- package/dist/data/ai/runtime-profiles/PresetWorkspace.js +97 -100
- package/dist/data/ai/runtime-profiles/PresetWorkspace.js.map +1 -1
- package/dist/data/ai/runtime-profiles/ProfileWorkspace.cjs +40 -38
- package/dist/data/ai/runtime-profiles/ProfileWorkspace.cjs.map +1 -1
- package/dist/data/ai/runtime-profiles/ProfileWorkspace.d.ts.map +1 -1
- package/dist/data/ai/runtime-profiles/ProfileWorkspace.js +41 -39
- package/dist/data/ai/runtime-profiles/ProfileWorkspace.js.map +1 -1
- package/dist/data/ai/runtime-profiles/ResolutionPreview.cjs +53 -0
- package/dist/data/ai/runtime-profiles/ResolutionPreview.cjs.map +1 -0
- package/dist/data/ai/runtime-profiles/ResolutionPreview.d.ts +7 -0
- package/dist/data/ai/runtime-profiles/ResolutionPreview.d.ts.map +1 -0
- package/dist/data/ai/runtime-profiles/ResolutionPreview.js +53 -0
- package/dist/data/ai/runtime-profiles/ResolutionPreview.js.map +1 -0
- package/dist/data/ai/runtime-profiles/index.d.ts +1 -1
- package/dist/data/ai/runtime-profiles/index.d.ts.map +1 -1
- package/dist/data/ai/sessionSubmitVariant.cjs +30 -0
- package/dist/data/ai/sessionSubmitVariant.cjs.map +1 -0
- package/dist/data/ai/sessionSubmitVariant.d.ts +7 -0
- package/dist/data/ai/sessionSubmitVariant.d.ts.map +1 -0
- package/dist/data/ai/sessionSubmitVariant.js +30 -0
- package/dist/data/ai/sessionSubmitVariant.js.map +1 -0
- package/dist/data/cells/Timestamp.cjs +15 -4
- package/dist/data/cells/Timestamp.cjs.map +1 -1
- package/dist/data/cells/Timestamp.d.ts.map +1 -1
- package/dist/data/cells/Timestamp.js +15 -4
- package/dist/data/cells/Timestamp.js.map +1 -1
- package/dist/data/cells/timestamp-format.cjs +28 -8
- package/dist/data/cells/timestamp-format.cjs.map +1 -1
- package/dist/data/cells/timestamp-format.d.ts +3 -1
- package/dist/data/cells/timestamp-format.d.ts.map +1 -1
- package/dist/data/cells/timestamp-format.js +28 -8
- package/dist/data/cells/timestamp-format.js.map +1 -1
- package/dist/data/charts/TrendChart.cjs +65 -31
- package/dist/data/charts/TrendChart.cjs.map +1 -1
- package/dist/data/charts/TrendChart.d.ts +12 -3
- package/dist/data/charts/TrendChart.d.ts.map +1 -1
- package/dist/data/charts/TrendChart.js +67 -33
- package/dist/data/charts/TrendChart.js.map +1 -1
- package/dist/data/charts/index.d.ts +1 -1
- package/dist/data/charts/index.d.ts.map +1 -1
- package/dist/data/chat/PromptInput.cjs +11 -2
- package/dist/data/chat/PromptInput.cjs.map +1 -1
- package/dist/data/chat/PromptInput.d.ts +15 -1
- package/dist/data/chat/PromptInput.d.ts.map +1 -1
- package/dist/data/chat/PromptInput.js +11 -2
- package/dist/data/chat/PromptInput.js.map +1 -1
- package/dist/data/chat/index.d.ts +1 -1
- package/dist/data/chat/index.d.ts.map +1 -1
- package/dist/data/data-table-filter-values.cjs.map +1 -1
- package/dist/data/data-table-filter-values.d.ts +1 -1
- package/dist/data/data-table-filter-values.d.ts.map +1 -1
- package/dist/data/data-table-filter-values.js.map +1 -1
- package/dist/data/data-table-server-filters.cjs +2 -6
- package/dist/data/data-table-server-filters.cjs.map +1 -1
- package/dist/data/data-table-server-filters.d.ts +1 -1
- package/dist/data/data-table-server-filters.d.ts.map +1 -1
- package/dist/data/data-table-server-filters.js +1 -5
- package/dist/data/data-table-server-filters.js.map +1 -1
- package/dist/data/diagnostics/ErrorDetails.cjs +2 -1
- package/dist/data/diagnostics/ErrorDetails.cjs.map +1 -1
- package/dist/data/diagnostics/ErrorDetails.d.ts +2 -1
- package/dist/data/diagnostics/ErrorDetails.d.ts.map +1 -1
- package/dist/data/diagnostics/ErrorDetails.js +2 -1
- package/dist/data/diagnostics/ErrorDetails.js.map +1 -1
- package/dist/data/gauge-stats.cjs +7 -3
- package/dist/data/gauge-stats.cjs.map +1 -1
- package/dist/data/gauge-stats.d.ts.map +1 -1
- package/dist/data/gauge-stats.js +7 -3
- package/dist/data/gauge-stats.js.map +1 -1
- package/dist/data/query-browser/QueryBrowser.cjs +41 -17
- package/dist/data/query-browser/QueryBrowser.cjs.map +1 -1
- package/dist/data/query-browser/QueryBrowser.d.ts +1 -1
- package/dist/data/query-browser/QueryBrowser.d.ts.map +1 -1
- package/dist/data/query-browser/QueryBrowser.fieldNames.cjs +23 -0
- package/dist/data/query-browser/QueryBrowser.fieldNames.cjs.map +1 -0
- package/dist/data/query-browser/QueryBrowser.fieldNames.d.ts +11 -0
- package/dist/data/query-browser/QueryBrowser.fieldNames.d.ts.map +1 -0
- package/dist/data/query-browser/QueryBrowser.fieldNames.js +23 -0
- package/dist/data/query-browser/QueryBrowser.fieldNames.js.map +1 -0
- package/dist/data/query-browser/QueryBrowser.js +41 -17
- package/dist/data/query-browser/QueryBrowser.js.map +1 -1
- package/dist/data/query-browser/QueryBrowser.types.cjs.map +1 -1
- package/dist/data/query-browser/QueryBrowser.types.d.ts +18 -0
- package/dist/data/query-browser/QueryBrowser.types.d.ts.map +1 -1
- package/dist/data/query-browser/QueryBrowser.types.js.map +1 -1
- package/dist/data/runtime/RuntimeBarLayout.cjs +3 -2
- package/dist/data/runtime/RuntimeBarLayout.cjs.map +1 -1
- package/dist/data/runtime/RuntimeBarLayout.d.ts.map +1 -1
- package/dist/data/runtime/RuntimeBarLayout.js +3 -2
- package/dist/data/runtime/RuntimeBarLayout.js.map +1 -1
- package/dist/data/test-runner/TestRunner.cjs +3 -1
- package/dist/data/test-runner/TestRunner.cjs.map +1 -1
- package/dist/data/test-runner/TestRunner.d.ts +8 -1
- package/dist/data/test-runner/TestRunner.d.ts.map +1 -1
- package/dist/data/test-runner/TestRunner.js +3 -1
- package/dist/data/test-runner/TestRunner.js.map +1 -1
- package/dist/data/test-runner/TestTree.cjs +1 -0
- package/dist/data/test-runner/TestTree.cjs.map +1 -1
- package/dist/data/test-runner/TestTree.d.ts.map +1 -1
- package/dist/data/test-runner/TestTree.js +1 -0
- package/dist/data/test-runner/TestTree.js.map +1 -1
- package/dist/data/test-runner/context.cjs.map +1 -1
- package/dist/data/test-runner/context.d.ts +2 -0
- package/dist/data/test-runner/context.d.ts.map +1 -1
- package/dist/data/test-runner/context.js.map +1 -1
- package/dist/data/timeseries-query.cjs +2 -2
- package/dist/data/timeseries-query.cjs.map +1 -1
- package/dist/data/timeseries-query.d.ts +1 -1
- package/dist/data/timeseries-query.d.ts.map +1 -1
- package/dist/data/timeseries-query.js +2 -2
- package/dist/data/timeseries-query.js.map +1 -1
- package/dist/data/traces/otel/OtelTraceBrowser.cjs +18 -9
- package/dist/data/traces/otel/OtelTraceBrowser.cjs.map +1 -1
- package/dist/data/traces/otel/OtelTraceBrowser.d.ts.map +1 -1
- package/dist/data/traces/otel/OtelTraceBrowser.js +19 -10
- package/dist/data/traces/otel/OtelTraceBrowser.js.map +1 -1
- package/dist/data/traces/otel/OtelTraceTable.cjs +10 -8
- package/dist/data/traces/otel/OtelTraceTable.cjs.map +1 -1
- package/dist/data/traces/otel/OtelTraceTable.d.ts.map +1 -1
- package/dist/data/traces/otel/OtelTraceTable.js +10 -8
- package/dist/data/traces/otel/OtelTraceTable.js.map +1 -1
- package/dist/data/traces/otel/QueryBar.cjs +6 -5
- package/dist/data/traces/otel/QueryBar.cjs.map +1 -1
- package/dist/data/traces/otel/QueryBar.d.ts.map +1 -1
- package/dist/data/traces/otel/QueryBar.js +6 -5
- package/dist/data/traces/otel/QueryBar.js.map +1 -1
- package/dist/data/traces/otel/browser-state.cjs +17 -4
- package/dist/data/traces/otel/browser-state.cjs.map +1 -1
- package/dist/data/traces/otel/browser-state.d.ts +2 -1
- package/dist/data/traces/otel/browser-state.d.ts.map +1 -1
- package/dist/data/traces/otel/browser-state.js +17 -4
- package/dist/data/traces/otel/browser-state.js.map +1 -1
- package/dist/data/version-info.cjs +3 -3
- package/dist/data/version-info.js +3 -3
- package/dist/data.cjs +1 -0
- package/dist/data.d.ts +1 -1
- package/dist/data.d.ts.map +1 -1
- package/dist/data.js +2 -2
- package/dist/expressions/playground/EmbeddedPlayground.cjs +40 -0
- package/dist/expressions/playground/EmbeddedPlayground.cjs.map +1 -0
- package/dist/expressions/playground/EmbeddedPlayground.d.ts +30 -0
- package/dist/expressions/playground/EmbeddedPlayground.d.ts.map +1 -0
- package/dist/expressions/playground/EmbeddedPlayground.js +40 -0
- package/dist/expressions/playground/EmbeddedPlayground.js.map +1 -0
- package/dist/expressions/playground/ExpressionPlayground.cjs +6 -6
- package/dist/expressions/playground/ExpressionPlayground.cjs.map +1 -1
- package/dist/expressions/playground/ExpressionPlayground.d.ts +10 -3
- package/dist/expressions/playground/ExpressionPlayground.d.ts.map +1 -1
- package/dist/expressions/playground/ExpressionPlayground.js +6 -6
- package/dist/expressions/playground/ExpressionPlayground.js.map +1 -1
- package/dist/expressions/playground/LazyEmbeddedPlayground.cjs +22 -0
- package/dist/expressions/playground/LazyEmbeddedPlayground.cjs.map +1 -0
- package/dist/expressions/playground/LazyEmbeddedPlayground.d.ts +4 -0
- package/dist/expressions/playground/LazyEmbeddedPlayground.d.ts.map +1 -0
- package/dist/expressions/playground/LazyEmbeddedPlayground.js +22 -0
- package/dist/expressions/playground/LazyEmbeddedPlayground.js.map +1 -0
- package/dist/expressions/playground/api.cjs.map +1 -1
- package/dist/expressions/playground/api.d.ts +10 -0
- package/dist/expressions/playground/api.d.ts.map +1 -1
- package/dist/expressions/playground/api.js.map +1 -1
- package/dist/expressions/playground/hostEvaluation.cjs +67 -0
- package/dist/expressions/playground/hostEvaluation.cjs.map +1 -0
- package/dist/expressions/playground/hostEvaluation.d.ts +39 -0
- package/dist/expressions/playground/hostEvaluation.d.ts.map +1 -0
- package/dist/expressions/playground/hostEvaluation.js +63 -0
- package/dist/expressions/playground/hostEvaluation.js.map +1 -0
- package/dist/expressions/playground/panels/GraphPanel.cjs +8 -3
- package/dist/expressions/playground/panels/GraphPanel.cjs.map +1 -1
- package/dist/expressions/playground/panels/GraphPanel.d.ts +2 -1
- package/dist/expressions/playground/panels/GraphPanel.d.ts.map +1 -1
- package/dist/expressions/playground/panels/GraphPanel.js +8 -3
- package/dist/expressions/playground/panels/GraphPanel.js.map +1 -1
- package/dist/expressions/playground/panels/graphNodes.cjs +6 -2
- package/dist/expressions/playground/panels/graphNodes.cjs.map +1 -1
- package/dist/expressions/playground/panels/graphNodes.d.ts +6 -2
- package/dist/expressions/playground/panels/graphNodes.d.ts.map +1 -1
- package/dist/expressions/playground/panels/graphNodes.js +6 -2
- package/dist/expressions/playground/panels/graphNodes.js.map +1 -1
- package/dist/expressions/playground.d.ts +1 -1
- package/dist/expressions/playground.d.ts.map +1 -1
- package/dist/hooks/use-element-height.cjs +26 -0
- package/dist/hooks/use-element-height.cjs.map +1 -0
- package/dist/hooks/use-element-height.d.ts +10 -0
- package/dist/hooks/use-element-height.d.ts.map +1 -0
- package/dist/hooks/use-element-height.js +26 -0
- package/dist/hooks/use-element-height.js.map +1 -0
- package/dist/index.cjs +6 -5
- package/dist/index.js +7 -7
- package/dist/jvm/classes/PatchedClassList.cjs +11 -2
- package/dist/jvm/classes/PatchedClassList.cjs.map +1 -1
- package/dist/jvm/classes/PatchedClassList.d.ts.map +1 -1
- package/dist/jvm/classes/PatchedClassList.js +11 -2
- package/dist/jvm/classes/PatchedClassList.js.map +1 -1
- package/dist/jvm/fixtures/fake-client.d.ts.map +1 -1
- package/dist/jvm/model/patches.cjs +4 -2
- package/dist/jvm/model/patches.cjs.map +1 -1
- package/dist/jvm/model/patches.d.ts +3 -1
- package/dist/jvm/model/patches.d.ts.map +1 -1
- package/dist/jvm/model/patches.js +4 -2
- package/dist/jvm/model/patches.js.map +1 -1
- package/dist/jvm/protocol/client.d.ts +7 -2
- package/dist/jvm/protocol/client.d.ts.map +1 -1
- package/dist/jvm/protocol/operation-client.cjs +30 -11
- package/dist/jvm/protocol/operation-client.cjs.map +1 -1
- package/dist/jvm/protocol/operation-client.d.ts.map +1 -1
- package/dist/jvm/protocol/operation-client.js +30 -11
- package/dist/jvm/protocol/operation-client.js.map +1 -1
- package/dist/jvm/protocol/query-keys.cjs +1 -1
- package/dist/jvm/protocol/query-keys.cjs.map +1 -1
- package/dist/jvm/protocol/query-keys.d.ts +1 -1
- package/dist/jvm/protocol/query-keys.d.ts.map +1 -1
- package/dist/jvm/protocol/query-keys.js +1 -1
- package/dist/jvm/protocol/query-keys.js.map +1 -1
- package/dist/jvm/protocol/status.cjs +38 -0
- package/dist/jvm/protocol/status.cjs.map +1 -0
- package/dist/jvm/protocol/status.d.ts +13 -0
- package/dist/jvm/protocol/status.d.ts.map +1 -0
- package/dist/jvm/protocol/status.js +38 -0
- package/dist/jvm/protocol/status.js.map +1 -0
- package/dist/jvm/protocol/types.d.ts +16 -4
- package/dist/jvm/protocol/types.d.ts.map +1 -1
- package/dist/jvm/runtime/GcSummary.cjs +7 -1
- package/dist/jvm/runtime/GcSummary.cjs.map +1 -1
- package/dist/jvm/runtime/GcSummary.d.ts.map +1 -1
- package/dist/jvm/runtime/GcSummary.js +7 -1
- package/dist/jvm/runtime/GcSummary.js.map +1 -1
- package/dist/jvm/surfaces/ClassesSurface.cjs +11 -10
- package/dist/jvm/surfaces/ClassesSurface.cjs.map +1 -1
- package/dist/jvm/surfaces/ClassesSurface.d.ts.map +1 -1
- package/dist/jvm/surfaces/ClassesSurface.js +12 -11
- package/dist/jvm/surfaces/ClassesSurface.js.map +1 -1
- package/dist/jvm/surfaces/JvmDiagnosticsWorkspace.cjs +11 -3
- package/dist/jvm/surfaces/JvmDiagnosticsWorkspace.cjs.map +1 -1
- package/dist/jvm/surfaces/JvmDiagnosticsWorkspace.d.ts +2 -0
- package/dist/jvm/surfaces/JvmDiagnosticsWorkspace.d.ts.map +1 -1
- package/dist/jvm/surfaces/JvmDiagnosticsWorkspace.js +11 -3
- package/dist/jvm/surfaces/JvmDiagnosticsWorkspace.js.map +1 -1
- package/dist/jvm/surfaces/PatchesSurface.cjs +3 -8
- package/dist/jvm/surfaces/PatchesSurface.cjs.map +1 -1
- package/dist/jvm/surfaces/PatchesSurface.d.ts +2 -1
- package/dist/jvm/surfaces/PatchesSurface.d.ts.map +1 -1
- package/dist/jvm/surfaces/PatchesSurface.js +4 -9
- package/dist/jvm/surfaces/PatchesSurface.js.map +1 -1
- package/dist/jvm/surfaces/ThreadsSurface.cjs +7 -4
- package/dist/jvm/surfaces/ThreadsSurface.cjs.map +1 -1
- package/dist/jvm/surfaces/ThreadsSurface.d.ts +4 -1
- package/dist/jvm/surfaces/ThreadsSurface.d.ts.map +1 -1
- package/dist/jvm/surfaces/ThreadsSurface.js +7 -4
- package/dist/jvm/surfaces/ThreadsSurface.js.map +1 -1
- package/dist/jvm/surfaces/jvm-context.cjs +23 -4
- package/dist/jvm/surfaces/jvm-context.cjs.map +1 -1
- package/dist/jvm/surfaces/jvm-context.d.ts +7 -0
- package/dist/jvm/surfaces/jvm-context.d.ts.map +1 -1
- package/dist/jvm/surfaces/jvm-context.js +23 -5
- package/dist/jvm/surfaces/jvm-context.js.map +1 -1
- package/dist/jvm/surfaces/use-patch-actions.cjs +2 -2
- package/dist/jvm/surfaces/use-patch-actions.cjs.map +1 -1
- package/dist/jvm/surfaces/use-patch-actions.js +2 -2
- package/dist/jvm/surfaces/use-patch-actions.js.map +1 -1
- package/dist/jvm/threads/FoldedStackTrace.cjs +3 -2
- package/dist/jvm/threads/FoldedStackTrace.cjs.map +1 -1
- package/dist/jvm/threads/FoldedStackTrace.d.ts +4 -1
- package/dist/jvm/threads/FoldedStackTrace.d.ts.map +1 -1
- package/dist/jvm/threads/FoldedStackTrace.js +3 -2
- package/dist/jvm/threads/FoldedStackTrace.js.map +1 -1
- package/dist/jvm/threads/ThreadDetail.cjs +6 -2
- package/dist/jvm/threads/ThreadDetail.cjs.map +1 -1
- package/dist/jvm/threads/ThreadDetail.d.ts +4 -1
- package/dist/jvm/threads/ThreadDetail.d.ts.map +1 -1
- package/dist/jvm/threads/ThreadDetail.js +6 -2
- package/dist/jvm/threads/ThreadDetail.js.map +1 -1
- package/dist/jvm.cjs +3 -0
- package/dist/jvm.d.ts +2 -1
- package/dist/jvm.d.ts.map +1 -1
- package/dist/jvm.js +3 -2
- package/dist/layout/AppShell.cjs.map +1 -1
- package/dist/layout/AppShell.d.ts +16 -0
- package/dist/layout/AppShell.d.ts.map +1 -1
- package/dist/layout/AppShell.js.map +1 -1
- package/dist/layout/AppShell.nav.cjs +21 -2
- package/dist/layout/AppShell.nav.cjs.map +1 -1
- package/dist/layout/AppShell.nav.js +21 -2
- package/dist/layout/AppShell.nav.js.map +1 -1
- package/dist/layout/Workspace.cjs +66 -21
- package/dist/layout/Workspace.cjs.map +1 -1
- package/dist/layout/Workspace.d.ts +6 -1
- package/dist/layout/Workspace.d.ts.map +1 -1
- package/dist/layout/Workspace.js +66 -21
- package/dist/layout/Workspace.js.map +1 -1
- package/dist/layout/Workspace.model.cjs +20 -0
- package/dist/layout/Workspace.model.cjs.map +1 -1
- package/dist/layout/Workspace.model.d.ts +17 -0
- package/dist/layout/Workspace.model.d.ts.map +1 -1
- package/dist/layout/Workspace.model.js +20 -1
- package/dist/layout/Workspace.model.js.map +1 -1
- package/dist/layout/Workspace.regions.cjs +10 -6
- package/dist/layout/Workspace.regions.cjs.map +1 -1
- package/dist/layout/Workspace.regions.d.ts +4 -1
- package/dist/layout/Workspace.regions.d.ts.map +1 -1
- package/dist/layout/Workspace.regions.js +10 -6
- package/dist/layout/Workspace.regions.js.map +1 -1
- package/dist/lib/duration.cjs +20 -0
- package/dist/lib/duration.cjs.map +1 -1
- package/dist/lib/duration.d.ts +8 -0
- package/dist/lib/duration.d.ts.map +1 -1
- package/dist/lib/duration.js +19 -1
- package/dist/lib/duration.js.map +1 -1
- package/dist/monaco/MonacoEditor.cjs +34 -30
- package/dist/monaco/MonacoEditor.cjs.map +1 -1
- package/dist/monaco/MonacoEditor.d.ts.map +1 -1
- package/dist/monaco/MonacoEditor.js +34 -30
- package/dist/monaco/MonacoEditor.js.map +1 -1
- package/dist/overlay/ConfirmDialog.cjs +5 -2
- package/dist/overlay/ConfirmDialog.cjs.map +1 -1
- package/dist/overlay/ConfirmDialog.d.ts +14 -2
- package/dist/overlay/ConfirmDialog.d.ts.map +1 -1
- package/dist/overlay/ConfirmDialog.js +5 -2
- package/dist/overlay/ConfirmDialog.js.map +1 -1
- package/dist/profiles/cel/celEditor.cjs +94 -285
- package/dist/profiles/cel/celEditor.cjs.map +1 -1
- package/dist/profiles/cel/celEditor.d.ts +10 -15
- package/dist/profiles/cel/celEditor.d.ts.map +1 -1
- package/dist/profiles/cel/celEditor.js +97 -287
- package/dist/profiles/cel/celEditor.js.map +1 -1
- package/dist/profiles/cel/celExpression.cjs +1 -61
- package/dist/profiles/cel/celExpression.cjs.map +1 -1
- package/dist/profiles/cel/celExpression.d.ts +2 -38
- package/dist/profiles/cel/celExpression.d.ts.map +1 -1
- package/dist/profiles/cel/celExpression.js +2 -58
- package/dist/profiles/cel/celExpression.js.map +1 -1
- package/dist/profiles/cel/celPlayground.cjs +122 -0
- package/dist/profiles/cel/celPlayground.cjs.map +1 -0
- package/dist/profiles/cel/celPlayground.d.ts +43 -0
- package/dist/profiles/cel/celPlayground.d.ts.map +1 -0
- package/dist/profiles/cel/celPlayground.js +118 -0
- package/dist/profiles/cel/celPlayground.js.map +1 -0
- package/dist/profiles/connections/connectionBrowserModel.cjs +2 -2
- package/dist/profiles/connections/connectionBrowserModel.cjs.map +1 -1
- package/dist/profiles/connections/connectionBrowserModel.d.ts +5 -1
- package/dist/profiles/connections/connectionBrowserModel.d.ts.map +1 -1
- package/dist/profiles/connections/connectionBrowserModel.js +2 -2
- package/dist/profiles/connections/connectionBrowserModel.js.map +1 -1
- package/dist/profiles/connections/connectionQueryWorkspace.cjs +2 -1
- package/dist/profiles/connections/connectionQueryWorkspace.cjs.map +1 -1
- package/dist/profiles/connections/connectionQueryWorkspace.d.ts +3 -1
- package/dist/profiles/connections/connectionQueryWorkspace.d.ts.map +1 -1
- package/dist/profiles/connections/connectionQueryWorkspace.js +2 -1
- package/dist/profiles/connections/connectionQueryWorkspace.js.map +1 -1
- package/dist/profiles/editor/UnwrapPreviewList.cjs +90 -0
- package/dist/profiles/editor/UnwrapPreviewList.cjs.map +1 -0
- package/dist/profiles/editor/UnwrapPreviewList.d.ts +7 -0
- package/dist/profiles/editor/UnwrapPreviewList.d.ts.map +1 -0
- package/dist/profiles/editor/UnwrapPreviewList.js +90 -0
- package/dist/profiles/editor/UnwrapPreviewList.js.map +1 -0
- package/dist/profiles/editor/profileCanonicalQuery.cjs +6 -58
- package/dist/profiles/editor/profileCanonicalQuery.cjs.map +1 -1
- package/dist/profiles/editor/profileCanonicalQuery.d.ts +1 -1
- package/dist/profiles/editor/profileCanonicalQuery.d.ts.map +1 -1
- package/dist/profiles/editor/profileCanonicalQuery.js +4 -56
- package/dist/profiles/editor/profileCanonicalQuery.js.map +1 -1
- package/dist/profiles/editor/profileCanonicalTranslate.cjs +48 -0
- package/dist/profiles/editor/profileCanonicalTranslate.cjs.map +1 -0
- package/dist/profiles/editor/profileCanonicalTranslate.d.ts +24 -0
- package/dist/profiles/editor/profileCanonicalTranslate.d.ts.map +1 -0
- package/dist/profiles/editor/profileCanonicalTranslate.js +47 -0
- package/dist/profiles/editor/profileCanonicalTranslate.js.map +1 -0
- package/dist/profiles/editor/profileEditor.cjs +106 -37
- package/dist/profiles/editor/profileEditor.cjs.map +1 -1
- package/dist/profiles/editor/profileEditor.d.ts.map +1 -1
- package/dist/profiles/editor/profileEditor.js +107 -38
- package/dist/profiles/editor/profileEditor.js.map +1 -1
- package/dist/profiles/editor/profileEditorModel.cjs +65 -19
- package/dist/profiles/editor/profileEditorModel.cjs.map +1 -1
- package/dist/profiles/editor/profileEditorModel.d.ts +24 -8
- package/dist/profiles/editor/profileEditorModel.d.ts.map +1 -1
- package/dist/profiles/editor/profileEditorModel.js +64 -18
- package/dist/profiles/editor/profileEditorModel.js.map +1 -1
- package/dist/profiles/editor/profileEditorPreview.cjs +129 -29
- package/dist/profiles/editor/profileEditorPreview.cjs.map +1 -1
- package/dist/profiles/editor/profileEditorPreview.d.ts +18 -5
- package/dist/profiles/editor/profileEditorPreview.d.ts.map +1 -1
- package/dist/profiles/editor/profileEditorPreview.js +129 -29
- package/dist/profiles/editor/profileEditorPreview.js.map +1 -1
- package/dist/profiles/editor/profileEditorSections.cjs +137 -88
- package/dist/profiles/editor/profileEditorSections.cjs.map +1 -1
- package/dist/profiles/editor/profileEditorSections.d.ts +18 -2
- package/dist/profiles/editor/profileEditorSections.d.ts.map +1 -1
- package/dist/profiles/editor/profileEditorSections.js +138 -90
- package/dist/profiles/editor/profileEditorSections.js.map +1 -1
- package/dist/profiles/editor/profileMappingPreview.cjs +22 -6
- package/dist/profiles/editor/profileMappingPreview.cjs.map +1 -1
- package/dist/profiles/editor/profileMappingPreview.d.ts +17 -1
- package/dist/profiles/editor/profileMappingPreview.d.ts.map +1 -1
- package/dist/profiles/editor/profileMappingPreview.js +23 -7
- package/dist/profiles/editor/profileMappingPreview.js.map +1 -1
- package/dist/profiles/editor/profileSaveAsDialog.cjs +21 -13
- package/dist/profiles/editor/profileSaveAsDialog.cjs.map +1 -1
- package/dist/profiles/editor/profileSaveAsDialog.d.ts.map +1 -1
- package/dist/profiles/editor/profileSaveAsDialog.js +21 -13
- package/dist/profiles/editor/profileSaveAsDialog.js.map +1 -1
- package/dist/profiles/editor/profileSourceExtensions.cjs +71 -0
- package/dist/profiles/editor/profileSourceExtensions.cjs.map +1 -0
- package/dist/profiles/editor/profileSourceExtensions.d.ts +26 -0
- package/dist/profiles/editor/profileSourceExtensions.d.ts.map +1 -0
- package/dist/profiles/editor/profileSourceExtensions.js +70 -0
- package/dist/profiles/editor/profileSourceExtensions.js.map +1 -0
- package/dist/profiles/editor/samplePaths.cjs +54 -0
- package/dist/profiles/editor/samplePaths.cjs.map +1 -0
- package/dist/profiles/editor/samplePaths.d.ts +27 -0
- package/dist/profiles/editor/samplePaths.d.ts.map +1 -0
- package/dist/profiles/editor/samplePaths.js +53 -0
- package/dist/profiles/editor/samplePaths.js.map +1 -0
- package/dist/profiles/editor/testSchema.d.ts.map +1 -1
- package/dist/profiles/editor/useUnwrapPreviews.cjs +60 -0
- package/dist/profiles/editor/useUnwrapPreviews.cjs.map +1 -0
- package/dist/profiles/editor/useUnwrapPreviews.d.ts +38 -0
- package/dist/profiles/editor/useUnwrapPreviews.d.ts.map +1 -0
- package/dist/profiles/editor/useUnwrapPreviews.js +60 -0
- package/dist/profiles/editor/useUnwrapPreviews.js.map +1 -0
- package/dist/profiles/elasticsearch/esQueryBuilder.cjs +10 -1
- package/dist/profiles/elasticsearch/esQueryBuilder.cjs.map +1 -1
- package/dist/profiles/elasticsearch/esQueryBuilder.d.ts.map +1 -1
- package/dist/profiles/elasticsearch/esQueryBuilder.js +11 -2
- package/dist/profiles/elasticsearch/esQueryBuilder.js.map +1 -1
- package/dist/profiles/elasticsearch/esQueryBuilderForm.cjs +38 -0
- package/dist/profiles/elasticsearch/esQueryBuilderForm.cjs.map +1 -1
- package/dist/profiles/elasticsearch/esQueryBuilderForm.d.ts +17 -0
- package/dist/profiles/elasticsearch/esQueryBuilderForm.d.ts.map +1 -1
- package/dist/profiles/elasticsearch/esQueryBuilderForm.js +37 -1
- package/dist/profiles/elasticsearch/esQueryBuilderForm.js.map +1 -1
- package/dist/profiles/elasticsearch/esQueryConditionRow.cjs +4 -3
- package/dist/profiles/elasticsearch/esQueryConditionRow.cjs.map +1 -1
- package/dist/profiles/elasticsearch/esQueryConditionRow.d.ts.map +1 -1
- package/dist/profiles/elasticsearch/esQueryConditionRow.js +4 -3
- package/dist/profiles/elasticsearch/esQueryConditionRow.js.map +1 -1
- package/dist/profiles/elasticsearch/esQueryOperators.cjs.map +1 -1
- package/dist/profiles/elasticsearch/esQueryOperators.d.ts +8 -0
- package/dist/profiles/elasticsearch/esQueryOperators.d.ts.map +1 -1
- package/dist/profiles/elasticsearch/esQueryOperators.js.map +1 -1
- package/dist/profiles/fields/profileFieldControls.cjs +3 -2
- package/dist/profiles/fields/profileFieldControls.cjs.map +1 -1
- package/dist/profiles/fields/profileFieldControls.d.ts +3 -1
- package/dist/profiles/fields/profileFieldControls.d.ts.map +1 -1
- package/dist/profiles/fields/profileFieldControls.js +3 -2
- package/dist/profiles/fields/profileFieldControls.js.map +1 -1
- package/dist/profiles/fields/profileFieldEditor.cjs +98 -185
- package/dist/profiles/fields/profileFieldEditor.cjs.map +1 -1
- package/dist/profiles/fields/profileFieldEditor.d.ts +11 -3
- package/dist/profiles/fields/profileFieldEditor.d.ts.map +1 -1
- package/dist/profiles/fields/profileFieldEditor.js +99 -186
- package/dist/profiles/fields/profileFieldEditor.js.map +1 -1
- package/dist/profiles/fields/profileFieldFilterEditor.cjs +115 -81
- package/dist/profiles/fields/profileFieldFilterEditor.cjs.map +1 -1
- package/dist/profiles/fields/profileFieldFilterEditor.d.ts.map +1 -1
- package/dist/profiles/fields/profileFieldFilterEditor.js +116 -82
- package/dist/profiles/fields/profileFieldFilterEditor.js.map +1 -1
- package/dist/profiles/fields/profileFieldIcons.cjs +2 -0
- package/dist/profiles/fields/profileFieldIcons.cjs.map +1 -1
- package/dist/profiles/fields/profileFieldIcons.d.ts.map +1 -1
- package/dist/profiles/fields/profileFieldIcons.js +2 -0
- package/dist/profiles/fields/profileFieldIcons.js.map +1 -1
- package/dist/profiles/fields/profileFieldList.cjs +23 -1
- package/dist/profiles/fields/profileFieldList.cjs.map +1 -1
- package/dist/profiles/fields/profileFieldList.d.ts.map +1 -1
- package/dist/profiles/fields/profileFieldList.js +23 -1
- package/dist/profiles/fields/profileFieldList.js.map +1 -1
- package/dist/profiles/fields/profileFieldPreview.cjs +111 -0
- package/dist/profiles/fields/profileFieldPreview.cjs.map +1 -0
- package/dist/profiles/fields/profileFieldPreview.d.ts +25 -0
- package/dist/profiles/fields/profileFieldPreview.d.ts.map +1 -0
- package/dist/profiles/fields/profileFieldPreview.js +110 -0
- package/dist/profiles/fields/profileFieldPreview.js.map +1 -0
- package/dist/profiles/fields/profileFieldSample.cjs +182 -0
- package/dist/profiles/fields/profileFieldSample.cjs.map +1 -0
- package/dist/profiles/fields/profileFieldSample.d.ts +35 -0
- package/dist/profiles/fields/profileFieldSample.d.ts.map +1 -0
- package/dist/profiles/fields/profileFieldSample.js +180 -0
- package/dist/profiles/fields/profileFieldSample.js.map +1 -0
- package/dist/profiles/fields/profileFieldTypeField.cjs +104 -0
- package/dist/profiles/fields/profileFieldTypeField.cjs.map +1 -0
- package/dist/profiles/fields/profileFieldTypeField.d.ts +17 -0
- package/dist/profiles/fields/profileFieldTypeField.d.ts.map +1 -0
- package/dist/profiles/fields/profileFieldTypeField.js +104 -0
- package/dist/profiles/fields/profileFieldTypeField.js.map +1 -0
- package/dist/profiles/fields/profileFieldTypes.cjs +1 -0
- package/dist/profiles/fields/profileFieldTypes.cjs.map +1 -1
- package/dist/profiles/fields/profileFieldTypes.d.ts +1 -1
- package/dist/profiles/fields/profileFieldTypes.d.ts.map +1 -1
- package/dist/profiles/fields/profileFieldTypes.js +1 -0
- package/dist/profiles/fields/profileFieldTypes.js.map +1 -1
- package/dist/profiles/fields/profileFieldValueEditor.cjs +298 -0
- package/dist/profiles/fields/profileFieldValueEditor.cjs.map +1 -0
- package/dist/profiles/fields/profileFieldValueEditor.d.ts +18 -0
- package/dist/profiles/fields/profileFieldValueEditor.d.ts.map +1 -0
- package/dist/profiles/fields/profileFieldValueEditor.js +298 -0
- package/dist/profiles/fields/profileFieldValueEditor.js.map +1 -0
- package/dist/profiles/fields/profileFieldValueMode.cjs +61 -0
- package/dist/profiles/fields/profileFieldValueMode.cjs.map +1 -0
- package/dist/profiles/fields/profileFieldValueMode.d.ts +34 -0
- package/dist/profiles/fields/profileFieldValueMode.d.ts.map +1 -0
- package/dist/profiles/fields/profileFieldValueMode.js +59 -0
- package/dist/profiles/fields/profileFieldValueMode.js.map +1 -0
- package/dist/profiles/processor/processorConfig.cjs +79 -79
- package/dist/profiles/processor/processorConfig.cjs.map +1 -1
- package/dist/profiles/processor/processorConfig.d.ts +30 -3
- package/dist/profiles/processor/processorConfig.d.ts.map +1 -1
- package/dist/profiles/processor/processorConfig.js +78 -78
- package/dist/profiles/processor/processorConfig.js.map +1 -1
- package/dist/profiles/processor/processorPipeline.cjs +8 -6
- package/dist/profiles/processor/processorPipeline.cjs.map +1 -1
- package/dist/profiles/processor/processorPipeline.d.ts +3 -3
- package/dist/profiles/processor/processorPipeline.d.ts.map +1 -1
- package/dist/profiles/processor/processorPipeline.js +9 -7
- package/dist/profiles/processor/processorPipeline.js.map +1 -1
- package/dist/profiles/processor/processorPipelineEditor.cjs +38 -94
- package/dist/profiles/processor/processorPipelineEditor.cjs.map +1 -1
- package/dist/profiles/processor/processorPipelineEditor.d.ts +3 -3
- package/dist/profiles/processor/processorPipelineEditor.d.ts.map +1 -1
- package/dist/profiles/processor/processorPipelineEditor.js +39 -95
- package/dist/profiles/processor/processorPipelineEditor.js.map +1 -1
- package/dist/profiles/processor/processorPipelineExtension.cjs +3 -2
- package/dist/profiles/processor/processorPipelineExtension.cjs.map +1 -1
- package/dist/profiles/processor/processorPipelineExtension.d.ts.map +1 -1
- package/dist/profiles/processor/processorPipelineExtension.js +3 -2
- package/dist/profiles/processor/processorPipelineExtension.js.map +1 -1
- package/dist/profiles/query/profileSampleFilterLookup.cjs.map +1 -1
- package/dist/profiles/query/profileSampleFilterLookup.d.ts +6 -3
- package/dist/profiles/query/profileSampleFilterLookup.d.ts.map +1 -1
- package/dist/profiles/query/profileSampleFilterLookup.js.map +1 -1
- package/dist/profiles/wizard/profileWizardModel.cjs +10 -1
- package/dist/profiles/wizard/profileWizardModel.cjs.map +1 -1
- package/dist/profiles/wizard/profileWizardModel.d.ts +6 -0
- package/dist/profiles/wizard/profileWizardModel.d.ts.map +1 -1
- package/dist/profiles/wizard/profileWizardModel.js +10 -1
- package/dist/profiles/wizard/profileWizardModel.js.map +1 -1
- package/dist/profiles/wizard/profileWizardQueryStep.cjs +10 -22
- package/dist/profiles/wizard/profileWizardQueryStep.cjs.map +1 -1
- package/dist/profiles/wizard/profileWizardQueryStep.d.ts +8 -1
- package/dist/profiles/wizard/profileWizardQueryStep.d.ts.map +1 -1
- package/dist/profiles/wizard/profileWizardQueryStep.js +11 -23
- package/dist/profiles/wizard/profileWizardQueryStep.js.map +1 -1
- package/dist/profiles/wizard/useProfileInspection.cjs +39 -0
- package/dist/profiles/wizard/useProfileInspection.cjs.map +1 -0
- package/dist/profiles/wizard/useProfileInspection.d.ts +21 -0
- package/dist/profiles/wizard/useProfileInspection.d.ts.map +1 -0
- package/dist/profiles/wizard/useProfileInspection.js +39 -0
- package/dist/profiles/wizard/useProfileInspection.js.map +1 -0
- package/dist/profiles.cjs +9 -11
- package/dist/profiles.js +8 -8
- package/dist/rpc/EntityExplorerApp.cjs +7 -3
- package/dist/rpc/EntityExplorerApp.cjs.map +1 -1
- package/dist/rpc/EntityExplorerApp.d.ts +16 -1
- package/dist/rpc/EntityExplorerApp.d.ts.map +1 -1
- package/dist/rpc/EntityExplorerApp.js +7 -3
- package/dist/rpc/EntityExplorerApp.js.map +1 -1
- package/dist/rpc/InlineError.cjs +30 -10
- package/dist/rpc/InlineError.cjs.map +1 -1
- package/dist/rpc/InlineError.d.ts +10 -1
- package/dist/rpc/InlineError.d.ts.map +1 -1
- package/dist/rpc/InlineError.js +30 -10
- package/dist/rpc/InlineError.js.map +1 -1
- package/dist/rpc/SchemaActionForm.cjs +9 -6
- package/dist/rpc/SchemaActionForm.cjs.map +1 -1
- package/dist/rpc/SchemaActionForm.d.ts.map +1 -1
- package/dist/rpc/SchemaActionForm.js +9 -6
- package/dist/rpc/SchemaActionForm.js.map +1 -1
- package/dist/rpc/SessionHeader.cjs +3 -3
- package/dist/rpc/SessionHeader.cjs.map +1 -1
- package/dist/rpc/SessionHeader.d.ts.map +1 -1
- package/dist/rpc/SessionHeader.js +3 -3
- package/dist/rpc/SessionHeader.js.map +1 -1
- package/dist/rpc/formMetadata.cjs +2 -6
- package/dist/rpc/formMetadata.cjs.map +1 -1
- package/dist/rpc/formMetadata.d.ts.map +1 -1
- package/dist/rpc/formMetadata.js +1 -5
- package/dist/rpc/formMetadata.js.map +1 -1
- package/dist/rpc/surfaceNav.cjs +5 -0
- package/dist/rpc/surfaceNav.cjs.map +1 -1
- package/dist/rpc/surfaceNav.d.ts.map +1 -1
- package/dist/rpc/surfaceNav.js +5 -0
- package/dist/rpc/surfaceNav.js.map +1 -1
- package/dist/runtime/barrels.json +4982 -4979
- package/dist/runtime/importmap.json +2168 -2146
- package/dist/styles.css +1 -1
- package/package.json +1 -1
- package/dist/data/ai/runtime-profiles/ResolutionInspector.cjs +0 -91
- package/dist/data/ai/runtime-profiles/ResolutionInspector.cjs.map +0 -1
- package/dist/data/ai/runtime-profiles/ResolutionInspector.d.ts +0 -7
- package/dist/data/ai/runtime-profiles/ResolutionInspector.d.ts.map +0 -1
- package/dist/data/ai/runtime-profiles/ResolutionInspector.js +0 -91
- package/dist/data/ai/runtime-profiles/ResolutionInspector.js.map +0 -1
- package/dist/profiles/cel/celEditorResults.cjs +0 -158
- package/dist/profiles/cel/celEditorResults.cjs.map +0 -1
- package/dist/profiles/cel/celEditorResults.d.ts +0 -37
- package/dist/profiles/cel/celEditorResults.d.ts.map +0 -1
- package/dist/profiles/cel/celEditorResults.js +0 -156
- package/dist/profiles/cel/celEditorResults.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fake-client.d.ts","sourceRoot":"","sources":["../../../src/jvm/fixtures/fake-client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC/D,OAAO,KAAK,EAAuB,SAAS,EAAuB,MAAM,mBAAmB,CAAC;AAK7F,MAAM,MAAM,WAAW,GAAG;IAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;IAAC,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC;AAEpF,MAAM,MAAM,aAAa,GAAG,oBAAoB,GAAG;IACjD,sEAAsE;IACtE,SAAS,EAAE,WAAW,EAAE,CAAC;IACzB,MAAM,EAAE,KAAK,CAAC;QAAE,UAAU,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,OAAO,CAAA;KAAE,CAAC,CAAC;IACzE,WAAW,EAA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EAAE,MAAM,EAAE,CAAC;IACjB,4EAA4E;IAC5E,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAMF;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,EAAE,MAAgC,EAAE,KAAmB,EAAE,OAAc,EAAE,GAAE,cAAmB,GAAG,aAAa,CAmG3I"}
|
|
@@ -20,10 +20,12 @@ function canRestorePatch(patch) {
|
|
|
20
20
|
/**
|
|
21
21
|
* Milliseconds until the agent restores the original bytecode, or null when no
|
|
22
22
|
* lease is scheduled. Null means the JVM keeps the patch until someone restores
|
|
23
|
-
* it, so callers must render it as its own state rather than as 0.
|
|
23
|
+
* it, so callers must render it as its own state rather than as 0. The agent
|
|
24
|
+
* writes "no lease" as `leaseExpiresAt: 0`, so 0, null and absent are all null;
|
|
25
|
+
* only a real expiry in the past reads as 0 ("restoring now").
|
|
24
26
|
*/
|
|
25
27
|
function leaseRemainingMs(patch, now) {
|
|
26
|
-
if (patch.leaseExpiresAt
|
|
28
|
+
if (!patch.leaseExpiresAt) return null;
|
|
27
29
|
return Math.max(0, patch.leaseExpiresAt - now);
|
|
28
30
|
}
|
|
29
31
|
function formatLeaseRemaining(ms) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"patches.cjs","names":[],"sources":["../../../src/jvm/model/patches.ts"],"sourcesContent":["import type { JvmPatch } from \"../protocol/types\";\n\nexport type PatchRowState = \"patched\" | \"stale\" | \"original\";\n\n/** `stale` is a register entry whose class could not be inspected, e.g. its loader went away. */\nexport function patchRowState(patch: JvmPatch): PatchRowState {\n if (patch.error) return \"stale\";\n return patch.patched ? \"patched\" : \"original\";\n}\n\n/**\n * `~`-prefixed loader ids group several real loaders for browsing. Patching\n * \"in\" one is meaningless — the class lives in exactly one real loader — so\n * the agent rejects writes against them.\n */\nexport function isVirtualLoader(loader: string): boolean {\n return loader.trim().startsWith(\"~\");\n}\n\nexport const VIRTUAL_LOADER_REASON =\n \"This loader groups several real class loaders, so it cannot be restored here. Pick the class in the loader that defines it.\";\n\n/** Whether restore and renew may be offered for the row. */\nexport function canRestorePatch(patch: JvmPatch): boolean {\n return patchRowState(patch) === \"patched\" && !isVirtualLoader(patch.loader);\n}\n\n/**\n * Milliseconds until the agent restores the original bytecode, or null when no\n * lease is scheduled. Null means the JVM keeps the patch until someone restores\n * it, so callers must render it as its own state rather than as 0.\n */\nexport function leaseRemainingMs(patch: JvmPatch, now: number): number | null {\n if (patch.leaseExpiresAt
|
|
1
|
+
{"version":3,"file":"patches.cjs","names":[],"sources":["../../../src/jvm/model/patches.ts"],"sourcesContent":["import type { JvmPatch } from \"../protocol/types\";\n\nexport type PatchRowState = \"patched\" | \"stale\" | \"original\";\n\n/** `stale` is a register entry whose class could not be inspected, e.g. its loader went away. */\nexport function patchRowState(patch: JvmPatch): PatchRowState {\n if (patch.error) return \"stale\";\n return patch.patched ? \"patched\" : \"original\";\n}\n\n/**\n * `~`-prefixed loader ids group several real loaders for browsing. Patching\n * \"in\" one is meaningless — the class lives in exactly one real loader — so\n * the agent rejects writes against them.\n */\nexport function isVirtualLoader(loader: string): boolean {\n return loader.trim().startsWith(\"~\");\n}\n\nexport const VIRTUAL_LOADER_REASON =\n \"This loader groups several real class loaders, so it cannot be restored here. Pick the class in the loader that defines it.\";\n\n/** Whether restore and renew may be offered for the row. */\nexport function canRestorePatch(patch: JvmPatch): boolean {\n return patchRowState(patch) === \"patched\" && !isVirtualLoader(patch.loader);\n}\n\n/**\n * Milliseconds until the agent restores the original bytecode, or null when no\n * lease is scheduled. Null means the JVM keeps the patch until someone restores\n * it, so callers must render it as its own state rather than as 0. The agent\n * writes \"no lease\" as `leaseExpiresAt: 0`, so 0, null and absent are all null;\n * only a real expiry in the past reads as 0 (\"restoring now\").\n */\nexport function leaseRemainingMs(patch: JvmPatch, now: number): number | null {\n if (!patch.leaseExpiresAt) return null;\n return Math.max(0, patch.leaseExpiresAt - now);\n}\n\nexport function formatLeaseRemaining(ms: number): string {\n const seconds = Math.ceil(ms / 1000);\n if (seconds < 60) return `${seconds}s`;\n return `${Math.floor(seconds / 60)}m ${seconds % 60}s`;\n}\n\nexport type PatchSummary = {\n patched: number;\n stale: number;\n /** Patched with no lease: nothing will restore these automatically. */\n unleased: number;\n};\n\nexport function summarisePatches(patches: readonly JvmPatch[]): PatchSummary {\n const summary: PatchSummary = { patched: 0, stale: 0, unleased: 0 };\n for (const patch of patches) {\n const state = patchRowState(patch);\n if (state === \"stale\") summary.stale++;\n if (state !== \"patched\") continue;\n summary.patched++;\n if (leaseRemainingMs(patch, 0) === null) summary.unleased++;\n }\n return summary;\n}\n\n/** A restore or renewal the agent rejected. */\nexport type PatchFailure = { key: string; className: string; message: string };\n\n/** Identity of a register row: the same class name can be patched in several loaders. */\nexport function patchKey(patch: Pick<JvmPatch, \"class\" | \"loader\">): string {\n return `${patch.loader}:${patch.class}`;\n}\n"],"mappings":";;AAKA,SAAgB,cAAc,OAAgC;CAC5D,IAAI,MAAM,OAAO,OAAO;CACxB,OAAO,MAAM,UAAU,YAAY;AACrC;;;;;;AAOA,SAAgB,gBAAgB,QAAyB;CACvD,OAAO,OAAO,KAAK,CAAC,CAAC,WAAW,GAAG;AACrC;AAEA,IAAa,wBACX;;AAGF,SAAgB,gBAAgB,OAA0B;CACxD,OAAO,cAAc,KAAK,MAAM,aAAa,CAAC,gBAAgB,MAAM,MAAM;AAC5E;;;;;;;;AASA,SAAgB,iBAAiB,OAAiB,KAA4B;CAC5E,IAAI,CAAC,MAAM,gBAAgB,OAAO;CAClC,OAAO,KAAK,IAAI,GAAG,MAAM,iBAAiB,GAAG;AAC/C;AAEA,SAAgB,qBAAqB,IAAoB;CACvD,MAAM,UAAU,KAAK,KAAK,KAAK,GAAI;CACnC,IAAI,UAAU,IAAI,OAAO,GAAG,QAAQ;CACpC,OAAO,GAAG,KAAK,MAAM,UAAU,EAAE,EAAE,IAAI,UAAU,GAAG;AACtD;AASA,SAAgB,iBAAiB,SAA4C;CAC3E,MAAM,UAAwB;EAAE,SAAS;EAAG,OAAO;EAAG,UAAU;CAAE;CAClE,KAAK,MAAM,SAAS,SAAS;EAC3B,MAAM,QAAQ,cAAc,KAAK;EACjC,IAAI,UAAU,SAAS,QAAQ;EAC/B,IAAI,UAAU,WAAW;EACzB,QAAQ;EACR,IAAI,iBAAiB,OAAO,CAAC,MAAM,MAAM,QAAQ;CACnD;CACA,OAAO;AACT;;AAMA,SAAgB,SAAS,OAAmD;CAC1E,OAAO,GAAG,MAAM,OAAO,GAAG,MAAM;AAClC"}
|
|
@@ -14,7 +14,9 @@ export declare function canRestorePatch(patch: JvmPatch): boolean;
|
|
|
14
14
|
/**
|
|
15
15
|
* Milliseconds until the agent restores the original bytecode, or null when no
|
|
16
16
|
* lease is scheduled. Null means the JVM keeps the patch until someone restores
|
|
17
|
-
* it, so callers must render it as its own state rather than as 0.
|
|
17
|
+
* it, so callers must render it as its own state rather than as 0. The agent
|
|
18
|
+
* writes "no lease" as `leaseExpiresAt: 0`, so 0, null and absent are all null;
|
|
19
|
+
* only a real expiry in the past reads as 0 ("restoring now").
|
|
18
20
|
*/
|
|
19
21
|
export declare function leaseRemainingMs(patch: JvmPatch, now: number): number | null;
|
|
20
22
|
export declare function formatLeaseRemaining(ms: number): string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"patches.d.ts","sourceRoot":"","sources":["../../../src/jvm/model/patches.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAElD,MAAM,MAAM,aAAa,GAAG,SAAS,GAAG,OAAO,GAAG,UAAU,CAAC;AAE7D,iGAAiG;AACjG,wBAAgB,aAAa,CAAC,KAAK,EAAE,QAAQ,GAAG,aAAa,CAG5D;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAEvD;AAED,eAAO,MAAM,qBAAqB,gIAC6F,CAAC;AAEhI,4DAA4D;AAC5D,wBAAgB,eAAe,C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20,12 @@ function canRestorePatch(patch) {
|
|
|
20
20
|
/**
|
|
21
21
|
* Milliseconds until the agent restores the original bytecode, or null when no
|
|
22
22
|
* lease is scheduled. Null means the JVM keeps the patch until someone restores
|
|
23
|
-
* it, so callers must render it as its own state rather than as 0.
|
|
23
|
+
* it, so callers must render it as its own state rather than as 0. The agent
|
|
24
|
+
* writes "no lease" as `leaseExpiresAt: 0`, so 0, null and absent are all null;
|
|
25
|
+
* only a real expiry in the past reads as 0 ("restoring now").
|
|
24
26
|
*/
|
|
25
27
|
function leaseRemainingMs(patch, now) {
|
|
26
|
-
if (patch.leaseExpiresAt
|
|
28
|
+
if (!patch.leaseExpiresAt) return null;
|
|
27
29
|
return Math.max(0, patch.leaseExpiresAt - now);
|
|
28
30
|
}
|
|
29
31
|
function formatLeaseRemaining(ms) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"patches.js","names":[],"sources":["../../../src/jvm/model/patches.ts"],"sourcesContent":["import type { JvmPatch } from \"../protocol/types\";\n\nexport type PatchRowState = \"patched\" | \"stale\" | \"original\";\n\n/** `stale` is a register entry whose class could not be inspected, e.g. its loader went away. */\nexport function patchRowState(patch: JvmPatch): PatchRowState {\n if (patch.error) return \"stale\";\n return patch.patched ? \"patched\" : \"original\";\n}\n\n/**\n * `~`-prefixed loader ids group several real loaders for browsing. Patching\n * \"in\" one is meaningless — the class lives in exactly one real loader — so\n * the agent rejects writes against them.\n */\nexport function isVirtualLoader(loader: string): boolean {\n return loader.trim().startsWith(\"~\");\n}\n\nexport const VIRTUAL_LOADER_REASON =\n \"This loader groups several real class loaders, so it cannot be restored here. Pick the class in the loader that defines it.\";\n\n/** Whether restore and renew may be offered for the row. */\nexport function canRestorePatch(patch: JvmPatch): boolean {\n return patchRowState(patch) === \"patched\" && !isVirtualLoader(patch.loader);\n}\n\n/**\n * Milliseconds until the agent restores the original bytecode, or null when no\n * lease is scheduled. Null means the JVM keeps the patch until someone restores\n * it, so callers must render it as its own state rather than as 0.\n */\nexport function leaseRemainingMs(patch: JvmPatch, now: number): number | null {\n if (patch.leaseExpiresAt
|
|
1
|
+
{"version":3,"file":"patches.js","names":[],"sources":["../../../src/jvm/model/patches.ts"],"sourcesContent":["import type { JvmPatch } from \"../protocol/types\";\n\nexport type PatchRowState = \"patched\" | \"stale\" | \"original\";\n\n/** `stale` is a register entry whose class could not be inspected, e.g. its loader went away. */\nexport function patchRowState(patch: JvmPatch): PatchRowState {\n if (patch.error) return \"stale\";\n return patch.patched ? \"patched\" : \"original\";\n}\n\n/**\n * `~`-prefixed loader ids group several real loaders for browsing. Patching\n * \"in\" one is meaningless — the class lives in exactly one real loader — so\n * the agent rejects writes against them.\n */\nexport function isVirtualLoader(loader: string): boolean {\n return loader.trim().startsWith(\"~\");\n}\n\nexport const VIRTUAL_LOADER_REASON =\n \"This loader groups several real class loaders, so it cannot be restored here. Pick the class in the loader that defines it.\";\n\n/** Whether restore and renew may be offered for the row. */\nexport function canRestorePatch(patch: JvmPatch): boolean {\n return patchRowState(patch) === \"patched\" && !isVirtualLoader(patch.loader);\n}\n\n/**\n * Milliseconds until the agent restores the original bytecode, or null when no\n * lease is scheduled. Null means the JVM keeps the patch until someone restores\n * it, so callers must render it as its own state rather than as 0. The agent\n * writes \"no lease\" as `leaseExpiresAt: 0`, so 0, null and absent are all null;\n * only a real expiry in the past reads as 0 (\"restoring now\").\n */\nexport function leaseRemainingMs(patch: JvmPatch, now: number): number | null {\n if (!patch.leaseExpiresAt) return null;\n return Math.max(0, patch.leaseExpiresAt - now);\n}\n\nexport function formatLeaseRemaining(ms: number): string {\n const seconds = Math.ceil(ms / 1000);\n if (seconds < 60) return `${seconds}s`;\n return `${Math.floor(seconds / 60)}m ${seconds % 60}s`;\n}\n\nexport type PatchSummary = {\n patched: number;\n stale: number;\n /** Patched with no lease: nothing will restore these automatically. */\n unleased: number;\n};\n\nexport function summarisePatches(patches: readonly JvmPatch[]): PatchSummary {\n const summary: PatchSummary = { patched: 0, stale: 0, unleased: 0 };\n for (const patch of patches) {\n const state = patchRowState(patch);\n if (state === \"stale\") summary.stale++;\n if (state !== \"patched\") continue;\n summary.patched++;\n if (leaseRemainingMs(patch, 0) === null) summary.unleased++;\n }\n return summary;\n}\n\n/** A restore or renewal the agent rejected. */\nexport type PatchFailure = { key: string; className: string; message: string };\n\n/** Identity of a register row: the same class name can be patched in several loaders. */\nexport function patchKey(patch: Pick<JvmPatch, \"class\" | \"loader\">): string {\n return `${patch.loader}:${patch.class}`;\n}\n"],"mappings":";;AAKA,SAAgB,cAAc,OAAgC;CAC5D,IAAI,MAAM,OAAO,OAAO;CACxB,OAAO,MAAM,UAAU,YAAY;AACrC;;;;;;AAOA,SAAgB,gBAAgB,QAAyB;CACvD,OAAO,OAAO,KAAK,CAAC,CAAC,WAAW,GAAG;AACrC;AAEA,IAAa,wBACX;;AAGF,SAAgB,gBAAgB,OAA0B;CACxD,OAAO,cAAc,KAAK,MAAM,aAAa,CAAC,gBAAgB,MAAM,MAAM;AAC5E;;;;;;;;AASA,SAAgB,iBAAiB,OAAiB,KAA4B;CAC5E,IAAI,CAAC,MAAM,gBAAgB,OAAO;CAClC,OAAO,KAAK,IAAI,GAAG,MAAM,iBAAiB,GAAG;AAC/C;AAEA,SAAgB,qBAAqB,IAAoB;CACvD,MAAM,UAAU,KAAK,KAAK,KAAK,GAAI;CACnC,IAAI,UAAU,IAAI,OAAO,GAAG,QAAQ;CACpC,OAAO,GAAG,KAAK,MAAM,UAAU,EAAE,EAAE,IAAI,UAAU,GAAG;AACtD;AASA,SAAgB,iBAAiB,SAA4C;CAC3E,MAAM,UAAwB;EAAE,SAAS;EAAG,OAAO;EAAG,UAAU;CAAE;CAClE,KAAK,MAAM,SAAS,SAAS;EAC3B,MAAM,QAAQ,cAAc,KAAK;EACjC,IAAI,UAAU,SAAS,QAAQ;EAC/B,IAAI,UAAU,WAAW;EACzB,QAAQ;EACR,IAAI,iBAAiB,OAAO,CAAC,MAAM,MAAM,QAAQ;CACnD;CACA,OAAO;AACT;;AAMA,SAAgB,SAAS,OAAmD;CAC1E,OAAO,GAAG,MAAM,OAAO,GAAG,MAAM;AAClC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { JvmClassLoader, JvmClassPage, JvmClassQuery, JvmClassSource, JvmClassTarget, JvmCompilation, JvmCompileRequest, JvmEvaluation, JvmGroovyRequest, JvmLogger, JvmMetrics, JvmOgnlRequest,
|
|
1
|
+
import { JvmClassLoader, JvmClassPage, JvmClassQuery, JvmClassSource, JvmClassTarget, JvmCompilation, JvmCompileRequest, JvmEvaluation, JvmGroovyRequest, JvmLogger, JvmMetrics, JvmOgnlRequest, JvmPatchRequest, JvmStatus, JvmThreadStack, JvmThreadsSnapshot, MBeanAttributeValue, MBeanInfo, MBeanInvokeRequest, MBeanWriteRequest } from './types.js';
|
|
2
2
|
export type JvmRequestOptions = {
|
|
3
3
|
signal?: AbortSignal | undefined;
|
|
4
4
|
};
|
|
@@ -11,6 +11,12 @@ export type JvmRequestOptions = {
|
|
|
11
11
|
* `MutationGate`, so an implementation can send them with mutation allowed.
|
|
12
12
|
*/
|
|
13
13
|
export interface JvmDiagnosticsClient {
|
|
14
|
+
/**
|
|
15
|
+
* The agent's capabilities, which also carry the patch register: `status().patches` is the only
|
|
16
|
+
* way the patches are read (`patchesFromStatus`, `useJvmPatches`), so an implementation reports
|
|
17
|
+
* them here, while instrumented, rather than through a separate call. Reading them must not
|
|
18
|
+
* change the JVM: the Java agent's own register operation attaches the instrumentation.
|
|
19
|
+
*/
|
|
14
20
|
status(options?: JvmRequestOptions): Promise<JvmStatus>;
|
|
15
21
|
/** Canonical ObjectNames matching a JMX pattern; `""` matches every MBean. */
|
|
16
22
|
searchMBeans(pattern: string, options?: JvmRequestOptions): Promise<string[]>;
|
|
@@ -40,7 +46,6 @@ export interface JvmDiagnosticsClient {
|
|
|
40
46
|
renewClassLease(target: JvmClassTarget & {
|
|
41
47
|
seconds: number;
|
|
42
48
|
}): Promise<void>;
|
|
43
|
-
patches(options?: JvmRequestOptions): Promise<JvmPatch[]>;
|
|
44
49
|
metrics(options?: JvmRequestOptions): Promise<JvmMetrics>;
|
|
45
50
|
loggers(options?: JvmRequestOptions): Promise<JvmLogger[]>;
|
|
46
51
|
/** `level: null` inherits the parent's level. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../src/jvm/protocol/client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,cAAc,EACd,YAAY,EACZ,aAAa,EACb,cAAc,EACd,cAAc,EACd,cAAc,EACd,iBAAiB,EACjB,aAAa,EACb,gBAAgB,EAChB,SAAS,EACT,UAAU,EACV,cAAc,EACd,
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../src/jvm/protocol/client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,cAAc,EACd,YAAY,EACZ,aAAa,EACb,cAAc,EACd,cAAc,EACd,cAAc,EACd,iBAAiB,EACjB,aAAa,EACb,gBAAgB,EAChB,SAAS,EACT,UAAU,EACV,cAAc,EACd,eAAe,EACf,SAAS,EACT,cAAc,EACd,kBAAkB,EAClB,mBAAmB,EACnB,SAAS,EACT,kBAAkB,EAClB,iBAAiB,EAClB,MAAM,SAAS,CAAC;AAEjB,MAAM,MAAM,iBAAiB,GAAG;IAAE,MAAM,CAAC,EAAE,WAAW,GAAG,SAAS,CAAA;CAAE,CAAC;AAErE;;;;;;;GAOG;AACH,MAAM,WAAW,oBAAoB;IACnC;;;;;OAKG;IACH,MAAM,CAAC,OAAO,CAAC,EAAE,iBAAiB,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC;IAExD,8EAA8E;IAC9E,YAAY,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,iBAAiB,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;IAC9E,SAAS,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,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U,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,cAAc,CAAC,CAAC;IAC9D,YAAY,CAAC,MAAM,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACpD,eAAe,CAAC,MAAM,EAAE,cAAc,GAAG;QAAE,OAAO,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAE7E,OAAO,CAAC,OAAO,CAAC,EAAE,iBAAiB,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;IAE1D,OAAO,CAAC,OAAO,CAAC,EAAE,iBAAiB,GAAG,OAAO,CAAC,SAAS,EAAE,CAAC,CAAC;IAC3D,iDAAiD;IACjD,cAAc,CAAC,OAAO,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;KAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAE/E,kEAAkE;IAClE,YAAY,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,aAAa,CAAC,CAAC;IAC9D,cAAc,CAAC,OAAO,EAAE,gBAAgB,GAAG,OAAO,CAAC,aAAa,CAAC,CAAC;CACnE"}
|
|
@@ -7,6 +7,26 @@ function array(operation, field, value) {
|
|
|
7
7
|
if (!Array.isArray(value)) throw new Error(`${operation}: expected ${field} to be an array`);
|
|
8
8
|
return value;
|
|
9
9
|
}
|
|
10
|
+
/**
|
|
11
|
+
* A GarbageCollectorMXBean count or time. The JVM's -1 ("undefined for this collector"), an explicit
|
|
12
|
+
* null and a field the agent did not send all mean the collector does not report it: null. Any other
|
|
13
|
+
* negative or non-numeric value is not a reading and fails, naming the field.
|
|
14
|
+
*/
|
|
15
|
+
function collectorReading(operation, index, field, value) {
|
|
16
|
+
if (value === void 0 || value === null || value === -1) return null;
|
|
17
|
+
if (typeof value !== "number" || !Number.isFinite(value) || value < 0) throw new Error(`${operation}: expected garbageCollectors[${index}].${field} to be a non-negative number, -1 or null, received ${JSON.stringify(value)}`);
|
|
18
|
+
return value;
|
|
19
|
+
}
|
|
20
|
+
function garbageCollectors(value) {
|
|
21
|
+
return array("jvm.metrics", "garbageCollectors", value ?? []).map((row, index) => {
|
|
22
|
+
const collector = record(`jvm.metrics: garbageCollectors[${index}]`, row);
|
|
23
|
+
return {
|
|
24
|
+
...collector,
|
|
25
|
+
collectionCount: collectorReading("jvm.metrics", index, "collectionCount", collector.collectionCount),
|
|
26
|
+
collectionTime: collectorReading("jvm.metrics", index, "collectionTime", collector.collectionTime)
|
|
27
|
+
};
|
|
28
|
+
});
|
|
29
|
+
}
|
|
10
30
|
/** Copies only the keys that are set, so optional params are omitted rather than sent as undefined. */
|
|
11
31
|
function defined(params) {
|
|
12
32
|
return Object.fromEntries(Object.entries(params).filter(([, value]) => value !== void 0));
|
|
@@ -20,14 +40,16 @@ function jvmOperationClient(call) {
|
|
|
20
40
|
const mutate = (operation, params) => call(operation, defined(params), { allowMutation: true });
|
|
21
41
|
const object = async (operation, params, signal) => record(operation, await read(operation, params, signal));
|
|
22
42
|
const list = async (operation, params, signal) => array(operation, "result", await read(operation, params, signal));
|
|
43
|
+
const readStatus = async (signal) => {
|
|
44
|
+
const value = await object("jvm.status", {}, signal);
|
|
45
|
+
if (typeof value.allowMutation !== "boolean") throw new Error("jvm.status: expected allowMutation to be a boolean");
|
|
46
|
+
const status = { allowMutation: value.allowMutation };
|
|
47
|
+
if (typeof value.instrumentation === "boolean") status.instrumentation = value.instrumentation;
|
|
48
|
+
if (value.patches !== void 0 && value.patches !== null) status.patches = value.patches;
|
|
49
|
+
return status;
|
|
50
|
+
};
|
|
23
51
|
return {
|
|
24
|
-
|
|
25
|
-
const value = await object("jvm.status", {}, options?.signal);
|
|
26
|
-
if (typeof value.allowMutation !== "boolean") throw new Error("jvm.status: expected allowMutation to be a boolean");
|
|
27
|
-
const status = { allowMutation: value.allowMutation };
|
|
28
|
-
if (typeof value.instrumentation === "boolean") status.instrumentation = value.instrumentation;
|
|
29
|
-
return status;
|
|
30
|
-
},
|
|
52
|
+
status: (options) => readStatus(options?.signal),
|
|
31
53
|
async searchMBeans(pattern, options) {
|
|
32
54
|
const names = await list("jvm.jmx.search", { pattern }, options?.signal);
|
|
33
55
|
if (names.some((name) => typeof name !== "string")) throw new Error("jvm.jmx.search: expected ObjectName strings");
|
|
@@ -122,16 +144,13 @@ function jvmOperationClient(call) {
|
|
|
122
144
|
async renewClassLease(target) {
|
|
123
145
|
await mutate("jvm.classes.lease", { ...target });
|
|
124
146
|
},
|
|
125
|
-
async patches(options) {
|
|
126
|
-
return await list("jvm.classes.patches", {}, options?.signal);
|
|
127
|
-
},
|
|
128
147
|
async metrics(options) {
|
|
129
148
|
const value = await object("jvm.metrics", {}, options?.signal);
|
|
130
149
|
record("jvm.metrics", value.runtime);
|
|
131
150
|
record("jvm.metrics", value.memory);
|
|
132
151
|
return {
|
|
133
152
|
...value,
|
|
134
|
-
garbageCollectors: value.garbageCollectors
|
|
153
|
+
garbageCollectors: garbageCollectors(value.garbageCollectors),
|
|
135
154
|
connectors: value.connectors ?? [],
|
|
136
155
|
dataSources: value.dataSources ?? []
|
|
137
156
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"operation-client.cjs","names":[],"sources":["../../../src/jvm/protocol/operation-client.ts"],"sourcesContent":["import type { JvmDiagnosticsClient } from \"./client\";\nimport type {\n JvmClassLoader,\n JvmClassPage,\n JvmClassSource,\n JvmCompilation,\n JvmEvaluation,\n JvmLogger,\n JvmMetrics,\n JvmPatch,\n JvmStatus,\n JvmThreadStack,\n JvmThreadsSnapshot,\n MBeanAttributeValue,\n MBeanInfo,\n} from \"./types\";\n\nexport type JvmOperationCallOptions = {\n /** The call changes the JVM; the agent refuses it unless this is set. */\n allowMutation: boolean;\n signal?: AbortSignal | undefined;\n};\n\n/** Sends one `jvm.*` operation to an agent and resolves to its JSON result. */\nexport type JvmOperationCall = (\n operation: string,\n params: Record<string, unknown>,\n options: JvmOperationCallOptions,\n) => Promise<unknown>;\n\nfunction record(operation: string, value: unknown): Record<string, unknown> {\n if (value === null || typeof value !== \"object\" || Array.isArray(value)) {\n throw new Error(`${operation}: expected an object, received ${JSON.stringify(value)}`);\n }\n return value as Record<string, unknown>;\n}\n\nfunction array(operation: string, field: string, value: unknown): unknown[] {\n if (!Array.isArray(value)) throw new Error(`${operation}: expected ${field} to be an array`);\n return value;\n}\n\n/** Copies only the keys that are set, so optional params are omitted rather than sent as undefined. */\nfunction defined(params: Record<string, unknown>): Record<string, unknown> {\n return Object.fromEntries(Object.entries(params).filter(([, value]) => value !== undefined));\n}\n\n/** A `JvmDiagnosticsClient` over the agent's `jvm.*` operation catalog. */\nexport function jvmOperationClient(call: JvmOperationCall): JvmDiagnosticsClient {\n const read = (operation: string, params: Record<string, unknown>, signal?: AbortSignal) =>\n call(operation, defined(params), { allowMutation: false, signal });\n const mutate = (operation: string, params: Record<string, unknown>) =>\n call(operation, defined(params), { allowMutation: true });\n const object = async (operation: string, params: Record<string, unknown>, signal?: AbortSignal) =>\n record(operation, await read(operation, params, signal));\n const list = async (operation: string, params: Record<string, unknown>, signal?: AbortSignal) =>\n array(operation, \"result\", await read(operation, params, signal));\n\n return {\n async status(options) {\n const value = await object(\"jvm.status\", {}, options?.signal);\n if (typeof value.allowMutation !== \"boolean\") throw new Error(\"jvm.status: expected allowMutation to be a boolean\");\n const status: JvmStatus = { allowMutation: value.allowMutation };\n if (typeof value.instrumentation === \"boolean\") status.instrumentation = value.instrumentation;\n return status;\n },\n\n async searchMBeans(pattern, options) {\n const names = await list(\"jvm.jmx.search\", { pattern }, options?.signal);\n if (names.some((name) => typeof name !== \"string\")) throw new Error(\"jvm.jmx.search: expected ObjectName strings\");\n return names as string[];\n },\n async mbeanInfo(objectName, options) {\n const value = await object(\"jvm.jmx.info\", { objectName }, options?.signal);\n array(\"jvm.jmx.info\", \"attributes\", value.attributes);\n array(\"jvm.jmx.info\", \"operations\", value.operations);\n return { ...value, notifications: value.notifications ?? [] } as MBeanInfo;\n },\n async readMBeanAttributes(objectName, options) {\n const value = await object(\"jvm.jmx.read\", { objectName }, options?.signal);\n return array(\"jvm.jmx.read\", \"attributes\", value.attributes) as MBeanAttributeValue[];\n },\n async writeMBeanAttribute({ objectName, attribute, value }) {\n await mutate(\"jvm.jmx.write\", { objectName, attribute, value });\n },\n invokeMBean({ objectName, operation, signature, args }) {\n return mutate(\"jvm.jmx.invoke\", { objectName, operation, signature, args });\n },\n\n async threads({ sampleMs }, options) {\n const value = await object(\"jvm.threads\", { sampleMs }, options?.signal);\n array(\"jvm.threads\", \"threads\", value.threads);\n array(\"jvm.threads\", \"deadlocked\", value.deadlocked ?? []);\n return { ...value, deadlocked: value.deadlocked ?? [] } as JvmThreadsSnapshot;\n },\n async threadStack(id, options) {\n const value = await object(\"jvm.threads.stack\", { id }, options?.signal);\n if (typeof value.text !== \"string\") throw new Error(\"jvm.threads.stack: expected text to be a string\");\n array(\"jvm.threads.stack\", \"frames\", value.frames);\n return value as unknown as JvmThreadStack;\n },\n async threadDump(options) {\n const value = await read(\"jvm.threads.dump\", {}, options?.signal);\n if (typeof value !== \"string\") throw new Error(\"jvm.threads.dump: expected a string\");\n return value;\n },\n\n async classLoaders(options) {\n return (await list(\"jvm.loaders\", {}, options?.signal)) as JvmClassLoader[];\n },\n async classes(query, options) {\n const value = await object(\"jvm.classes\", { ...query }, options?.signal);\n array(\"jvm.classes\", \"classes\", value.classes);\n return value as unknown as JvmClassPage;\n },\n async classSource(target, options) {\n const value = await object(\"jvm.classes.source\", { ...target }, options?.signal);\n if (typeof value.source !== \"string\") throw new Error(\"jvm.classes.source: expected source to be a string\");\n array(\"jvm.classes.source\", \"methods\", value.methods);\n return { ...value, sourceLineNumbers: value.sourceLineNumbers ?? [] } as JvmClassSource;\n },\n async classBytecode(target, options) {\n const value = await object(\"jvm.classes.bytecode\", { ...target }, options?.signal);\n if (typeof value.bytecode !== \"string\") throw new Error(\"jvm.classes.bytecode: expected base64 bytecode\");\n return value.bytecode;\n },\n async compileClass(request) {\n const value = await object(\"jvm.classes.compile\", { ...request });\n if (typeof value.success !== \"boolean\") throw new Error(\"jvm.classes.compile: expected success to be a boolean\");\n array(\"jvm.classes.compile\", \"diagnostics\", value.diagnostics);\n return value as unknown as JvmCompilation;\n },\n async patchClass(request) {\n const value = record(\"jvm.classes.patch\", await mutate(\"jvm.classes.patch\", { ...request }));\n if (typeof value.success !== \"boolean\") throw new Error(\"jvm.classes.patch: expected success to be a boolean\");\n return { ...value, diagnostics: value.diagnostics ?? [] } as JvmCompilation;\n },\n async restoreClass(target) {\n await mutate(\"jvm.classes.restore\", { ...target });\n },\n async renewClassLease(target) {\n await mutate(\"jvm.classes.lease\", { ...target });\n },\n async patches(options) {\n return (await list(\"jvm.classes.patches\", {}, options?.signal)) as JvmPatch[];\n },\n\n async metrics(options) {\n const value = await object(\"jvm.metrics\", {}, options?.signal);\n record(\"jvm.metrics\", value.runtime);\n record(\"jvm.metrics\", value.memory);\n return {\n ...value,\n garbageCollectors: value.garbageCollectors ?? [],\n connectors: value.connectors ?? [],\n dataSources: value.dataSources ?? [],\n } as JvmMetrics;\n },\n\n async loggers(options) {\n return (await list(\"jvm.logging.list\", {}, options?.signal)) as JvmLogger[];\n },\n async setLoggerLevel({ name, level }) {\n await mutate(\"jvm.logging.set\", { name, level });\n },\n\n async evaluateOgnl(request) {\n return record(\"jvm.ognl.eval\", await mutate(\"jvm.ognl.eval\", { ...request })) as JvmEvaluation;\n },\n async evaluateGroovy(request) {\n return record(\"jvm.groovy.eval\", await mutate(\"jvm.groovy.eval\", { ...request })) as JvmEvaluation;\n },\n };\n}\n"],"mappings":";AA8BA,SAAS,OAAO,WAAmB,OAAyC;CAC1E,IAAI,UAAU,QAAQ,OAAO,UAAU,YAAY,MAAM,QAAQ,KAAK,GACpE,MAAM,IAAI,MAAM,GAAG,UAAU,iCAAiC,KAAK,UAAU,KAAK,GAAG;CAEvF,OAAO;AACT;AAEA,SAAS,MAAM,WAAm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AAqB,EAAE,GAAG,OAAO,CAAC;EACjD;EACA,MAAM,QAAQ,SAAS;GACrB,OAAQ,MAAM,KAAK,uBAAuB,CAAC,GAAG,SAAS,MAAM;EAC/D;EAEA,MAAM,QAAQ,SAAS;GACrB,MAAM,QAAQ,MAAM,OAAO,eAAe,CAAC,GAAG,SAAS,MAAM;GAC7D,OAAO,eAAe,MAAM,OAAO;GACnC,OAAO,eAAe,MAAM,MAAM;GAClC,OAAO;IACL,GAAG;IACH,mBAAmB,MAAM,qBAAqB,CAAC;IAC/C,YAAY,MAAM,cAAc,CAAC;IACjC,aAAa,MAAM,eAAe,CAAC;GACrC;EACF;EAEA,MAAM,QAAQ,SAAS;GACrB,OAAQ,MAAM,KAAK,oBAAoB,CAAC,GAAG,SAAS,MAAM;EAC5D;EACA,MAAM,eAAe,EAAE,MAAM,SAAS;GACpC,MAAM,OAAO,mBAAmB;IAAE;IAAM;GAAM,CAAC;EACjD;EAEA,MAAM,aAAa,SAAS;GAC1B,OAAO,OAAO,iBAAiB,MAAM,OAAO,iBAAiB,EAAE,GAAG,QAAQ,CAAC,CAAC;EAC9E;EACA,MAAM,eAAe,SAAS;GAC5B,OAAO,OAAO,mBAAmB,MAAM,OAAO,mBAAmB,EAAE,GAAG,QAAQ,CAAC,CAAC;EAClF;CACF;AACF"}
|
|
1
|
+
{"version":3,"file":"operation-client.cjs","names":[],"sources":["../../../src/jvm/protocol/operation-client.ts"],"sourcesContent":["import type { JvmDiagnosticsClient } from \"./client\";\nimport type {\n JvmClassLoader,\n JvmClassPage,\n JvmClassSource,\n JvmCompilation,\n JvmEvaluation,\n JvmGarbageCollector,\n JvmLogger,\n JvmMetrics,\n JvmPatch,\n JvmStatus,\n JvmThreadStack,\n JvmThreadsSnapshot,\n MBeanAttributeValue,\n MBeanInfo,\n} from \"./types\";\n\nexport type JvmOperationCallOptions = {\n /** The call changes the JVM; the agent refuses it unless this is set. */\n allowMutation: boolean;\n signal?: AbortSignal | undefined;\n};\n\n/** Sends one `jvm.*` operation to an agent and resolves to its JSON result. */\nexport type JvmOperationCall = (\n operation: string,\n params: Record<string, unknown>,\n options: JvmOperationCallOptions,\n) => Promise<unknown>;\n\nfunction record(operation: string, value: unknown): Record<string, unknown> {\n if (value === null || typeof value !== \"object\" || Array.isArray(value)) {\n throw new Error(`${operation}: expected an object, received ${JSON.stringify(value)}`);\n }\n return value as Record<string, unknown>;\n}\n\nfunction array(operation: string, field: string, value: unknown): unknown[] {\n if (!Array.isArray(value)) throw new Error(`${operation}: expected ${field} to be an array`);\n return value;\n}\n\n/**\n * A GarbageCollectorMXBean count or time. The JVM's -1 (\"undefined for this collector\"), an explicit\n * null and a field the agent did not send all mean the collector does not report it: null. Any other\n * negative or non-numeric value is not a reading and fails, naming the field.\n */\nfunction collectorReading(operation: string, index: number, field: string, value: unknown): number | null {\n if (value === undefined || value === null || value === -1) return null;\n if (typeof value !== \"number\" || !Number.isFinite(value) || value < 0) {\n throw new Error(`${operation}: expected garbageCollectors[${index}].${field} to be a non-negative number, -1 or null, received ${JSON.stringify(value)}`);\n }\n return value;\n}\n\nfunction garbageCollectors(value: unknown): JvmGarbageCollector[] {\n return array(\"jvm.metrics\", \"garbageCollectors\", value ?? []).map((row, index) => {\n const collector = record(`jvm.metrics: garbageCollectors[${index}]`, row);\n return {\n ...collector,\n collectionCount: collectorReading(\"jvm.metrics\", index, \"collectionCount\", collector.collectionCount),\n collectionTime: collectorReading(\"jvm.metrics\", index, \"collectionTime\", collector.collectionTime),\n } as unknown as JvmGarbageCollector;\n });\n}\n\n/** Copies only the keys that are set, so optional params are omitted rather than sent as undefined. */\nfunction defined(params: Record<string, unknown>): Record<string, unknown> {\n return Object.fromEntries(Object.entries(params).filter(([, value]) => value !== undefined));\n}\n\n/** A `JvmDiagnosticsClient` over the agent's `jvm.*` operation catalog. */\nexport function jvmOperationClient(call: JvmOperationCall): JvmDiagnosticsClient {\n const read = (operation: string, params: Record<string, unknown>, signal?: AbortSignal) =>\n call(operation, defined(params), { allowMutation: false, signal });\n const mutate = (operation: string, params: Record<string, unknown>) =>\n call(operation, defined(params), { allowMutation: true });\n const object = async (operation: string, params: Record<string, unknown>, signal?: AbortSignal) =>\n record(operation, await read(operation, params, signal));\n const list = async (operation: string, params: Record<string, unknown>, signal?: AbortSignal) =>\n array(operation, \"result\", await read(operation, params, signal));\n\n const readStatus = async (signal?: AbortSignal): Promise<JvmStatus> => {\n const value = await object(\"jvm.status\", {}, signal);\n if (typeof value.allowMutation !== \"boolean\") throw new Error(\"jvm.status: expected allowMutation to be a boolean\");\n const status: JvmStatus = { allowMutation: value.allowMutation };\n if (typeof value.instrumentation === \"boolean\") status.instrumentation = value.instrumentation;\n // The agent leaves patches out (or null) while not instrumented: it cannot know them then. The rows\n // are passed through as reported and checked by `patchesFromStatus`, so a bad row fails only the register.\n if (value.patches !== undefined && value.patches !== null) status.patches = value.patches as JvmPatch[];\n return status;\n };\n\n return {\n status: (options) => readStatus(options?.signal),\n\n async searchMBeans(pattern, options) {\n const names = await list(\"jvm.jmx.search\", { pattern }, options?.signal);\n if (names.some((name) => typeof name !== \"string\")) throw new Error(\"jvm.jmx.search: expected ObjectName strings\");\n return names as string[];\n },\n async mbeanInfo(objectName, options) {\n const value = await object(\"jvm.jmx.info\", { objectName }, options?.signal);\n array(\"jvm.jmx.info\", \"attributes\", value.attributes);\n array(\"jvm.jmx.info\", \"operations\", value.operations);\n return { ...value, notifications: value.notifications ?? [] } as MBeanInfo;\n },\n async readMBeanAttributes(objectName, options) {\n const value = await object(\"jvm.jmx.read\", { objectName }, options?.signal);\n return array(\"jvm.jmx.read\", \"attributes\", value.attributes) as MBeanAttributeValue[];\n },\n async writeMBeanAttribute({ objectName, attribute, value }) {\n await mutate(\"jvm.jmx.write\", { objectName, attribute, value });\n },\n invokeMBean({ objectName, operation, signature, args }) {\n return mutate(\"jvm.jmx.invoke\", { objectName, operation, signature, args });\n },\n\n async threads({ sampleMs }, options) {\n const value = await object(\"jvm.threads\", { sampleMs }, options?.signal);\n array(\"jvm.threads\", \"threads\", value.threads);\n array(\"jvm.threads\", \"deadlocked\", value.deadlocked ?? []);\n return { ...value, deadlocked: value.deadlocked ?? [] } as JvmThreadsSnapshot;\n },\n async threadStack(id, options) {\n const value = await object(\"jvm.threads.stack\", { id }, options?.signal);\n if (typeof value.text !== \"string\") throw new Error(\"jvm.threads.stack: expected text to be a string\");\n array(\"jvm.threads.stack\", \"frames\", value.frames);\n return value as unknown as JvmThreadStack;\n },\n async threadDump(options) {\n const value = await read(\"jvm.threads.dump\", {}, options?.signal);\n if (typeof value !== \"string\") throw new Error(\"jvm.threads.dump: expected a string\");\n return value;\n },\n\n async classLoaders(options) {\n return (await list(\"jvm.loaders\", {}, options?.signal)) as JvmClassLoader[];\n },\n async classes(query, options) {\n const value = await object(\"jvm.classes\", { ...query }, options?.signal);\n array(\"jvm.classes\", \"classes\", value.classes);\n return value as unknown as JvmClassPage;\n },\n async classSource(target, options) {\n const value = await object(\"jvm.classes.source\", { ...target }, options?.signal);\n if (typeof value.source !== \"string\") throw new Error(\"jvm.classes.source: expected source to be a string\");\n array(\"jvm.classes.source\", \"methods\", value.methods);\n return { ...value, sourceLineNumbers: value.sourceLineNumbers ?? [] } as JvmClassSource;\n },\n async classBytecode(target, options) {\n const value = await object(\"jvm.classes.bytecode\", { ...target }, options?.signal);\n if (typeof value.bytecode !== \"string\") throw new Error(\"jvm.classes.bytecode: expected base64 bytecode\");\n return value.bytecode;\n },\n async compileClass(request) {\n const value = await object(\"jvm.classes.compile\", { ...request });\n if (typeof value.success !== \"boolean\") throw new Error(\"jvm.classes.compile: expected success to be a boolean\");\n array(\"jvm.classes.compile\", \"diagnostics\", value.diagnostics);\n return value as unknown as JvmCompilation;\n },\n async patchClass(request) {\n const value = record(\"jvm.classes.patch\", await mutate(\"jvm.classes.patch\", { ...request }));\n if (typeof value.success !== \"boolean\") throw new Error(\"jvm.classes.patch: expected success to be a boolean\");\n return { ...value, diagnostics: value.diagnostics ?? [] } as JvmCompilation;\n },\n async restoreClass(target) {\n await mutate(\"jvm.classes.restore\", { ...target });\n },\n async renewClassLease(target) {\n await mutate(\"jvm.classes.lease\", { ...target });\n },\n async metrics(options) {\n const value = await object(\"jvm.metrics\", {}, options?.signal);\n record(\"jvm.metrics\", value.runtime);\n record(\"jvm.metrics\", value.memory);\n return {\n ...value,\n garbageCollectors: garbageCollectors(value.garbageCollectors),\n connectors: value.connectors ?? [],\n dataSources: value.dataSources ?? [],\n } as JvmMetrics;\n },\n\n async loggers(options) {\n return (await list(\"jvm.logging.list\", {}, options?.signal)) as JvmLogger[];\n },\n async setLoggerLevel({ name, level }) {\n await mutate(\"jvm.logging.set\", { name, level });\n },\n\n async evaluateOgnl(request) {\n return record(\"jvm.ognl.eval\", await mutate(\"jvm.ognl.eval\", { ...request })) as JvmEvaluation;\n },\n async evaluateGroovy(request) {\n return record(\"jvm.groovy.eval\", await mutate(\"jvm.groovy.eval\", { ...request })) as JvmEvaluation;\n },\n };\n}\n"],"mappings":";AA+BA,SAAS,OAAO,WAAmB,OAAyC;CAC1E,IAAI,UAAU,QAAQ,OAAO,UAAU,YAAY,MAAM,QAAQ,KAAK,GACpE,MAAM,IAAI,MAAM,GAAG,UAAU,iCAAiC,KAAK,UAAU,KAAK,GAAG;CAEvF,OAAO;AACT;AAEA,SAAS,MAAM,WAAmB,OAAe,OAA2B;CAC1E,IAAI,CAAC,MAAM,QAAQ,KAAK,GAAG,MAAM,IAAI,MAAM,GAAG,UAAU,aAAa,MAAM,gBAAgB;CAC3F,OAAO;AACT;;;;;;AAOA,SAAS,iBAAiB,WAAmB,OAAe,OAAe,OAA+B;CACxG,IAAI,UAAU,KAAA,KAAa,UAAU,QAAQ,UAAU,IAAI,OAAO;CAClE,IAAI,OAAO,UAAU,YAAY,CAAC,OAAO,SAAS,KAAK,KAAK,QAAQ,GAClE,MAAM,IAAI,MAAM,GAAG,UAAU,+BAA+B,MAAM,IAAI,MAAM,qDAAqD,KAAK,UAAU,KAAK,GAAG;CAE1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OAAO,qBAAqB,EAAE,GAAG,QAAQ,CAAC,CAAC;GAC3F,IAAI,OAAO,MAAM,YAAY,WAAW,MAAM,IAAI,MAAM,qDAAqD;GAC7G,OAAO;IAAE,GAAG;IAAO,aAAa,MAAM,eAAe,CAAC;GAAE;EAC1D;EACA,MAAM,aAAa,QAAQ;GACzB,MAAM,OAAO,uBAAuB,EAAE,GAAG,OAAO,CAAC;EACnD;EACA,MAAM,gBAAgB,QAAQ;GAC5B,MAAM,OAAO,qBAAqB,EAAE,GAAG,OAAO,CAAC;EACjD;EACA,MAAM,QAAQ,SAAS;GACrB,MAAM,QAAQ,MAAM,OAAO,eAAe,CAAC,GAAG,SAAS,MAAM;GAC7D,OAAO,eAAe,MAAM,OAAO;GACnC,OAAO,eAAe,MAAM,MAAM;GAClC,OAAO;IACL,GAAG;IACH,mBAAmB,kBAAkB,MAAM,iBAAiB;IAC5D,YAAY,MAAM,cAAc,CAAC;IACjC,aAAa,MAAM,eAAe,CAAC;GACrC;EACF;EAEA,MAAM,QAAQ,SAAS;GACrB,OAAQ,MAAM,KAAK,oBAAoB,CAAC,GAAG,SAAS,MAAM;EAC5D;EACA,MAAM,eAAe,EAAE,MAAM,SAAS;GACpC,MAAM,OAAO,mBAAmB;IAAE;IAAM;GAAM,CAAC;EACjD;EAEA,MAAM,aAAa,SAAS;GAC1B,OAAO,OAAO,iBAAiB,MAAM,OAAO,iBAAiB,EAAE,GAAG,QAAQ,CAAC,CAAC;EAC9E;EACA,MAAM,eAAe,SAAS;GAC5B,OAAO,OAAO,mBAAmB,MAAM,OAAO,mBAAmB,EAAE,GAAG,QAAQ,CAAC,CAAC;EAClF;CACF;AACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"operation-client.d.ts","sourceRoot":"","sources":["../../../src/jvm/protocol/operation-client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"operation-client.d.ts","sourceRoot":"","sources":["../../../src/jvm/protocol/operation-client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAkBrD,MAAM,MAAM,uBAAuB,GAAG;IACpC,yEAAyE;IACzE,aAAa,EAAE,OAAO,CAAC;IACvB,MAAM,CAAC,EAAE,WAAW,GAAG,SAAS,CAAC;CAClC,CAAC;AAEF,+EAA+E;AAC/E,MAAM,MAAM,gBAAgB,GAAG,CAC7B,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC/B,OAAO,EAAE,uBAAuB,KAC7B,OAAO,CAAC,OAAO,CAAC,CAAC;AA2CtB,2EAA2E;AAC3E,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,gBAAgB,GAAG,oBAAoB,CA8H/E"}
|
|
@@ -7,6 +7,26 @@ function array(operation, field, value) {
|
|
|
7
7
|
if (!Array.isArray(value)) throw new Error(`${operation}: expected ${field} to be an array`);
|
|
8
8
|
return value;
|
|
9
9
|
}
|
|
10
|
+
/**
|
|
11
|
+
* A GarbageCollectorMXBean count or time. The JVM's -1 ("undefined for this collector"), an explicit
|
|
12
|
+
* null and a field the agent did not send all mean the collector does not report it: null. Any other
|
|
13
|
+
* negative or non-numeric value is not a reading and fails, naming the field.
|
|
14
|
+
*/
|
|
15
|
+
function collectorReading(operation, index, field, value) {
|
|
16
|
+
if (value === void 0 || value === null || value === -1) return null;
|
|
17
|
+
if (typeof value !== "number" || !Number.isFinite(value) || value < 0) throw new Error(`${operation}: expected garbageCollectors[${index}].${field} to be a non-negative number, -1 or null, received ${JSON.stringify(value)}`);
|
|
18
|
+
return value;
|
|
19
|
+
}
|
|
20
|
+
function garbageCollectors(value) {
|
|
21
|
+
return array("jvm.metrics", "garbageCollectors", value ?? []).map((row, index) => {
|
|
22
|
+
const collector = record(`jvm.metrics: garbageCollectors[${index}]`, row);
|
|
23
|
+
return {
|
|
24
|
+
...collector,
|
|
25
|
+
collectionCount: collectorReading("jvm.metrics", index, "collectionCount", collector.collectionCount),
|
|
26
|
+
collectionTime: collectorReading("jvm.metrics", index, "collectionTime", collector.collectionTime)
|
|
27
|
+
};
|
|
28
|
+
});
|
|
29
|
+
}
|
|
10
30
|
/** Copies only the keys that are set, so optional params are omitted rather than sent as undefined. */
|
|
11
31
|
function defined(params) {
|
|
12
32
|
return Object.fromEntries(Object.entries(params).filter(([, value]) => value !== void 0));
|
|
@@ -20,14 +40,16 @@ function jvmOperationClient(call) {
|
|
|
20
40
|
const mutate = (operation, params) => call(operation, defined(params), { allowMutation: true });
|
|
21
41
|
const object = async (operation, params, signal) => record(operation, await read(operation, params, signal));
|
|
22
42
|
const list = async (operation, params, signal) => array(operation, "result", await read(operation, params, signal));
|
|
43
|
+
const readStatus = async (signal) => {
|
|
44
|
+
const value = await object("jvm.status", {}, signal);
|
|
45
|
+
if (typeof value.allowMutation !== "boolean") throw new Error("jvm.status: expected allowMutation to be a boolean");
|
|
46
|
+
const status = { allowMutation: value.allowMutation };
|
|
47
|
+
if (typeof value.instrumentation === "boolean") status.instrumentation = value.instrumentation;
|
|
48
|
+
if (value.patches !== void 0 && value.patches !== null) status.patches = value.patches;
|
|
49
|
+
return status;
|
|
50
|
+
};
|
|
23
51
|
return {
|
|
24
|
-
|
|
25
|
-
const value = await object("jvm.status", {}, options?.signal);
|
|
26
|
-
if (typeof value.allowMutation !== "boolean") throw new Error("jvm.status: expected allowMutation to be a boolean");
|
|
27
|
-
const status = { allowMutation: value.allowMutation };
|
|
28
|
-
if (typeof value.instrumentation === "boolean") status.instrumentation = value.instrumentation;
|
|
29
|
-
return status;
|
|
30
|
-
},
|
|
52
|
+
status: (options) => readStatus(options?.signal),
|
|
31
53
|
async searchMBeans(pattern, options) {
|
|
32
54
|
const names = await list("jvm.jmx.search", { pattern }, options?.signal);
|
|
33
55
|
if (names.some((name) => typeof name !== "string")) throw new Error("jvm.jmx.search: expected ObjectName strings");
|
|
@@ -122,16 +144,13 @@ function jvmOperationClient(call) {
|
|
|
122
144
|
async renewClassLease(target) {
|
|
123
145
|
await mutate("jvm.classes.lease", { ...target });
|
|
124
146
|
},
|
|
125
|
-
async patches(options) {
|
|
126
|
-
return await list("jvm.classes.patches", {}, options?.signal);
|
|
127
|
-
},
|
|
128
147
|
async metrics(options) {
|
|
129
148
|
const value = await object("jvm.metrics", {}, options?.signal);
|
|
130
149
|
record("jvm.metrics", value.runtime);
|
|
131
150
|
record("jvm.metrics", value.memory);
|
|
132
151
|
return {
|
|
133
152
|
...value,
|
|
134
|
-
garbageCollectors: value.garbageCollectors
|
|
153
|
+
garbageCollectors: garbageCollectors(value.garbageCollectors),
|
|
135
154
|
connectors: value.connectors ?? [],
|
|
136
155
|
dataSources: value.dataSources ?? []
|
|
137
156
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"operation-client.js","names":[],"sources":["../../../src/jvm/protocol/operation-client.ts"],"sourcesContent":["import type { JvmDiagnosticsClient } from \"./client\";\nimport type {\n JvmClassLoader,\n JvmClassPage,\n JvmClassSource,\n JvmCompilation,\n JvmEvaluation,\n JvmLogger,\n JvmMetrics,\n JvmPatch,\n JvmStatus,\n JvmThreadStack,\n JvmThreadsSnapshot,\n MBeanAttributeValue,\n MBeanInfo,\n} from \"./types\";\n\nexport type JvmOperationCallOptions = {\n /** The call changes the JVM; the agent refuses it unless this is set. */\n allowMutation: boolean;\n signal?: AbortSignal | undefined;\n};\n\n/** Sends one `jvm.*` operation to an agent and resolves to its JSON result. */\nexport type JvmOperationCall = (\n operation: string,\n params: Record<string, unknown>,\n options: JvmOperationCallOptions,\n) => Promise<unknown>;\n\nfunction record(operation: string, value: unknown): Record<string, unknown> {\n if (value === null || typeof value !== \"object\" || Array.isArray(value)) {\n throw new Error(`${operation}: expected an object, received ${JSON.stringify(value)}`);\n }\n return value as Record<string, unknown>;\n}\n\nfunction array(operation: string, field: string, value: unknown): unknown[] {\n if (!Array.isArray(value)) throw new Error(`${operation}: expected ${field} to be an array`);\n return value;\n}\n\n/** Copies only the keys that are set, so optional params are omitted rather than sent as undefined. */\nfunction defined(params: Record<string, unknown>): Record<string, unknown> {\n return Object.fromEntries(Object.entries(params).filter(([, value]) => value !== undefined));\n}\n\n/** A `JvmDiagnosticsClient` over the agent's `jvm.*` operation catalog. */\nexport function jvmOperationClient(call: JvmOperationCall): JvmDiagnosticsClient {\n const read = (operation: string, params: Record<string, unknown>, signal?: AbortSignal) =>\n call(operation, defined(params), { allowMutation: false, signal });\n const mutate = (operation: string, params: Record<string, unknown>) =>\n call(operation, defined(params), { allowMutation: true });\n const object = async (operation: string, params: Record<string, unknown>, signal?: AbortSignal) =>\n record(operation, await read(operation, params, signal));\n const list = async (operation: string, params: Record<string, unknown>, signal?: AbortSignal) =>\n array(operation, \"result\", await read(operation, params, signal));\n\n return {\n async status(options) {\n const value = await object(\"jvm.status\", {}, options?.signal);\n if (typeof value.allowMutation !== \"boolean\") throw new Error(\"jvm.status: expected allowMutation to be a boolean\");\n const status: JvmStatus = { allowMutation: value.allowMutation };\n if (typeof value.instrumentation === \"boolean\") status.instrumentation = value.instrumentation;\n return status;\n },\n\n async searchMBeans(pattern, options) {\n const names = await list(\"jvm.jmx.search\", { pattern }, options?.signal);\n if (names.some((name) => typeof name !== \"string\")) throw new Error(\"jvm.jmx.search: expected ObjectName strings\");\n return names as string[];\n },\n async mbeanInfo(objectName, options) {\n const value = await object(\"jvm.jmx.info\", { objectName }, options?.signal);\n array(\"jvm.jmx.info\", \"attributes\", value.attributes);\n array(\"jvm.jmx.info\", \"operations\", value.operations);\n return { ...value, notifications: value.notifications ?? [] } as MBeanInfo;\n },\n async readMBeanAttributes(objectName, options) {\n const value = await object(\"jvm.jmx.read\", { objectName }, options?.signal);\n return array(\"jvm.jmx.read\", \"attributes\", value.attributes) as MBeanAttributeValue[];\n },\n async writeMBeanAttribute({ objectName, attribute, value }) {\n await mutate(\"jvm.jmx.write\", { objectName, attribute, value });\n },\n invokeMBean({ objectName, operation, signature, args }) {\n return mutate(\"jvm.jmx.invoke\", { objectName, operation, signature, args });\n },\n\n async threads({ sampleMs }, options) {\n const value = await object(\"jvm.threads\", { sampleMs }, options?.signal);\n array(\"jvm.threads\", \"threads\", value.threads);\n array(\"jvm.threads\", \"deadlocked\", value.deadlocked ?? []);\n return { ...value, deadlocked: value.deadlocked ?? [] } as JvmThreadsSnapshot;\n },\n async threadStack(id, options) {\n const value = await object(\"jvm.threads.stack\", { id }, options?.signal);\n if (typeof value.text !== \"string\") throw new Error(\"jvm.threads.stack: expected text to be a string\");\n array(\"jvm.threads.stack\", \"frames\", value.frames);\n return value as unknown as JvmThreadStack;\n },\n async threadDump(options) {\n const value = await read(\"jvm.threads.dump\", {}, options?.signal);\n if (typeof value !== \"string\") throw new Error(\"jvm.threads.dump: expected a string\");\n return value;\n },\n\n async classLoaders(options) {\n return (await list(\"jvm.loaders\", {}, options?.signal)) as JvmClassLoader[];\n },\n async classes(query, options) {\n const value = await object(\"jvm.classes\", { ...query }, options?.signal);\n array(\"jvm.classes\", \"classes\", value.classes);\n return value as unknown as JvmClassPage;\n },\n async classSource(target, options) {\n const value = await object(\"jvm.classes.source\", { ...target }, options?.signal);\n if (typeof value.source !== \"string\") throw new Error(\"jvm.classes.source: expected source to be a string\");\n array(\"jvm.classes.source\", \"methods\", value.methods);\n return { ...value, sourceLineNumbers: value.sourceLineNumbers ?? [] } as JvmClassSource;\n },\n async classBytecode(target, options) {\n const value = await object(\"jvm.classes.bytecode\", { ...target }, options?.signal);\n if (typeof value.bytecode !== \"string\") throw new Error(\"jvm.classes.bytecode: expected base64 bytecode\");\n return value.bytecode;\n },\n async compileClass(request) {\n const value = await object(\"jvm.classes.compile\", { ...request });\n if (typeof value.success !== \"boolean\") throw new Error(\"jvm.classes.compile: expected success to be a boolean\");\n array(\"jvm.classes.compile\", \"diagnostics\", value.diagnostics);\n return value as unknown as JvmCompilation;\n },\n async patchClass(request) {\n const value = record(\"jvm.classes.patch\", await mutate(\"jvm.classes.patch\", { ...request }));\n if (typeof value.success !== \"boolean\") throw new Error(\"jvm.classes.patch: expected success to be a boolean\");\n return { ...value, diagnostics: value.diagnostics ?? [] } as JvmCompilation;\n },\n async restoreClass(target) {\n await mutate(\"jvm.classes.restore\", { ...target });\n },\n async renewClassLease(target) {\n await mutate(\"jvm.classes.lease\", { ...target });\n },\n async patches(options) {\n return (await list(\"jvm.classes.patches\", {}, options?.signal)) as JvmPatch[];\n },\n\n async metrics(options) {\n const value = await object(\"jvm.metrics\", {}, options?.signal);\n record(\"jvm.metrics\", value.runtime);\n record(\"jvm.metrics\", value.memory);\n return {\n ...value,\n garbageCollectors: value.garbageCollectors ?? [],\n connectors: value.connectors ?? [],\n dataSources: value.dataSources ?? [],\n } as JvmMetrics;\n },\n\n async loggers(options) {\n return (await list(\"jvm.logging.list\", {}, options?.signal)) as JvmLogger[];\n },\n async setLoggerLevel({ name, level }) {\n await mutate(\"jvm.logging.set\", { name, level });\n },\n\n async evaluateOgnl(request) {\n return record(\"jvm.ognl.eval\", await mutate(\"jvm.ognl.eval\", { ...request })) as JvmEvaluation;\n },\n async evaluateGroovy(request) {\n return record(\"jvm.groovy.eval\", await mutate(\"jvm.groovy.eval\", { ...request })) as JvmEvaluation;\n },\n };\n}\n"],"mappings":";AA8BA,SAAS,OAAO,WAAmB,OAAyC;CAC1E,IAAI,UAAU,QAAQ,OAAO,UAAU,YAAY,MAAM,QAAQ,KAAK,GACpE,MAAM,IAAI,MAAM,GAAG,UAAU,iCAAiC,KAAK,UAAU,KAAK,GAAG;CAEvF,OAAO;AACT;AAEA,SAAS,MAAM,WAAmB,OAAe,OAA2B;CAC1E,IAAI,CAAC,MAAM,QAAQ,KAAK,GAAG,MAAM,IAAI,MAAM,GAAG,UAAU,aAAa,MAAM,gBAAgB;CAC3F,OAAO;AACT;;AAGA,SAAS,QAAQ,QAA0D;CACzE,OAAO,OAAO,YAAY,OAAO,QAAQ,MAAM,CAAC,CAA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M;GAC7D,OAAO,eAAe,MAAM,OAAO;GACnC,OAAO,eAAe,MAAM,MAAM;GAClC,OAAO;IACL,GAAG;IACH,mBAAmB,MAAM,qBAAqB,CAAC;IAC/C,YAAY,MAAM,cAAc,CAAC;IACjC,aAAa,MAAM,eAAe,CAAC;GACrC;EACF;EAEA,MAAM,QAAQ,SAAS;GACrB,OAAQ,MAAM,KAAK,oBAAoB,CAAC,GAAG,SAAS,MAAM;EAC5D;EACA,MAAM,eAAe,EAAE,MAAM,SAAS;GACpC,MAAM,OAAO,mBAAmB;IAAE;IAAM;GAAM,CAAC;EACjD;EAEA,MAAM,aAAa,SAAS;GAC1B,OAAO,OAAO,iBAAiB,MAAM,OAAO,iBAAiB,EAAE,GAAG,QAAQ,CAAC,CAAC;EAC9E;EACA,MAAM,eAAe,SAAS;GAC5B,OAAO,OAAO,mBAAmB,MAAM,OAAO,mBAAmB,EAAE,GAAG,QAAQ,CAAC,CAAC;EAClF;CACF;AACF"}
|
|
1
|
+
{"version":3,"file":"operation-client.js","names":[],"sources":["../../../src/jvm/protocol/operation-client.ts"],"sourcesContent":["import type { JvmDiagnosticsClient } from \"./client\";\nimport type {\n JvmClassLoader,\n JvmClassPage,\n JvmClassSource,\n JvmCompilation,\n JvmEvaluation,\n JvmGarbageCollector,\n JvmLogger,\n JvmMetrics,\n JvmPatch,\n JvmStatus,\n JvmThreadStack,\n JvmThreadsSnapshot,\n MBeanAttributeValue,\n MBeanInfo,\n} from \"./types\";\n\nexport type JvmOperationCallOptions = {\n /** The call changes the JVM; the agent refuses it unless this is set. */\n allowMutation: boolean;\n signal?: AbortSignal | undefined;\n};\n\n/** Sends one `jvm.*` operation to an agent and resolves to its JSON result. */\nexport type JvmOperationCall = (\n operation: string,\n params: Record<string, unknown>,\n options: JvmOperationCallOptions,\n) => Promise<unknown>;\n\nfunction record(operation: string, value: unknown): Record<string, unknown> {\n if (value === null || typeof value !== \"object\" || Array.isArray(value)) {\n throw new Error(`${operation}: expected an object, received ${JSON.stringify(value)}`);\n }\n return value as Record<string, unknown>;\n}\n\nfunction array(operation: string, field: string, value: unknown): unknown[] {\n if (!Array.isArray(value)) throw new Error(`${operation}: expected ${field} to be an array`);\n return value;\n}\n\n/**\n * A GarbageCollectorMXBean count or time. The JVM's -1 (\"undefined for this collector\"), an explicit\n * null and a field the agent did not send all mean the collector does not report it: null. Any other\n * negative or non-numeric value is not a reading and fails, naming the field.\n */\nfunction collectorReading(operation: string, index: number, field: string, value: unknown): number | null {\n if (value === undefined || value === null || value === -1) return null;\n if (typeof value !== \"number\" || !Number.isFinite(value) || value < 0) {\n throw new Error(`${operation}: expected garbageCollectors[${index}].${field} to be a non-negative number, -1 or null, received ${JSON.stringify(value)}`);\n }\n return value;\n}\n\nfunction garbageCollectors(value: unknown): JvmGarbageCollector[] {\n return array(\"jvm.metrics\", \"garbageCollectors\", value ?? []).map((row, index) => {\n const collector = record(`jvm.metrics: garbageCollectors[${index}]`, row);\n return {\n ...collector,\n collectionCount: collectorReading(\"jvm.metrics\", index, \"collectionCount\", collector.collectionCount),\n collectionTime: collectorReading(\"jvm.metrics\", index, \"collectionTime\", collector.collectionTime),\n } as unknown as JvmGarbageCollector;\n });\n}\n\n/** Copies only the keys that are set, so optional params are omitted rather than sent as undefined. */\nfunction defined(params: Record<string, unknown>): Record<string, unknown> {\n return Object.fromEntries(Object.entries(params).filter(([, value]) => value !== undefined));\n}\n\n/** A `JvmDiagnosticsClient` over the agent's `jvm.*` operation catalog. */\nexport function jvmOperationClient(call: JvmOperationCall): JvmDiagnosticsClient {\n const read = (operation: string, params: Record<string, unknown>, signal?: AbortSignal) =>\n call(operation, defined(params), { allowMutation: false, signal });\n const mutate = (operation: string, params: Record<string, unknown>) =>\n call(operation, defined(params), { allowMutation: true });\n const object = async (operation: string, params: Record<string, unknown>, signal?: AbortSignal) =>\n record(operation, await read(operation, params, signal));\n const list = async (operation: string, params: Record<string, unknown>, signal?: AbortSignal) =>\n array(operation, \"result\", await read(operation, params, signal));\n\n const readStatus = async (signal?: AbortSignal): Promise<JvmStatus> => {\n const value = await object(\"jvm.status\", {}, signal);\n if (typeof value.allowMutation !== \"boolean\") throw new Error(\"jvm.status: expected allowMutation to be a boolean\");\n const status: JvmStatus = { allowMutation: value.allowMutation };\n if (typeof value.instrumentation === \"boolean\") status.instrumentation = value.instrumentation;\n // The agent leaves patches out (or null) while not instrumented: it cannot know them then. The rows\n // are passed through as reported and checked by `patchesFromStatus`, so a bad row fails only the register.\n if (value.patches !== undefined && value.patches !== null) status.patches = value.patches as JvmPatch[];\n return status;\n };\n\n return {\n status: (options) => readStatus(options?.signal),\n\n async searchMBeans(pattern, options) {\n const names = await list(\"jvm.jmx.search\", { pattern }, options?.signal);\n if (names.some((name) => typeof name !== \"string\")) throw new Error(\"jvm.jmx.search: expected ObjectName strings\");\n return names as string[];\n },\n async mbeanInfo(objectName, options) {\n const value = await object(\"jvm.jmx.info\", { objectName }, options?.signal);\n array(\"jvm.jmx.info\", \"attributes\", value.attributes);\n array(\"jvm.jmx.info\", \"operations\", value.operations);\n return { ...value, notifications: value.notifications ?? [] } as MBeanInfo;\n },\n async readMBeanAttributes(objectName, options) {\n const value = await object(\"jvm.jmx.read\", { objectName }, options?.signal);\n return array(\"jvm.jmx.read\", \"attributes\", value.attributes) as MBeanAttributeValue[];\n },\n async writeMBeanAttribute({ objectName, attribute, value }) {\n await mutate(\"jvm.jmx.write\", { objectName, attribute, value });\n },\n invokeMBean({ objectName, operation, signature, args }) {\n return mutate(\"jvm.jmx.invoke\", { objectName, operation, signature, args });\n },\n\n async threads({ sampleMs }, options) {\n const value = await object(\"jvm.threads\", { sampleMs }, options?.signal);\n array(\"jvm.threads\", \"threads\", value.threads);\n array(\"jvm.threads\", \"deadlocked\", value.deadlocked ?? []);\n return { ...value, deadlocked: value.deadlocked ?? [] } as JvmThreadsSnapshot;\n },\n async threadStack(id, options) {\n const value = await object(\"jvm.threads.stack\", { id }, options?.signal);\n if (typeof value.text !== \"string\") throw new Error(\"jvm.threads.stack: expected text to be a string\");\n array(\"jvm.threads.stack\", \"frames\", value.frames);\n return value as unknown as JvmThreadStack;\n },\n async threadDump(options) {\n const value = await read(\"jvm.threads.dump\", {}, options?.signal);\n if (typeof value !== \"string\") throw new Error(\"jvm.threads.dump: expected a string\");\n return value;\n },\n\n async classLoaders(options) {\n return (await list(\"jvm.loaders\", {}, options?.signal)) as JvmClassLoader[];\n },\n async classes(query, options) {\n const value = await object(\"jvm.classes\", { ...query }, options?.signal);\n array(\"jvm.classes\", \"classes\", value.classes);\n return value as unknown as JvmClassPage;\n },\n async classSource(target, options) {\n const value = await object(\"jvm.classes.source\", { ...target }, options?.signal);\n if (typeof value.source !== \"string\") throw new Error(\"jvm.classes.source: expected source to be a string\");\n array(\"jvm.classes.source\", \"methods\", value.methods);\n return { ...value, sourceLineNumbers: value.sourceLineNumbers ?? [] } as JvmClassSource;\n },\n async classBytecode(target, options) {\n const value = await object(\"jvm.classes.bytecode\", { ...target }, options?.signal);\n if (typeof value.bytecode !== \"string\") throw new Error(\"jvm.classes.bytecode: expected base64 bytecode\");\n return value.bytecode;\n },\n async compileClass(request) {\n const value = await object(\"jvm.classes.compile\", { ...request });\n if (typeof value.success !== \"boolean\") throw new Error(\"jvm.classes.compile: expected success to be a boolean\");\n array(\"jvm.classes.compile\", \"diagnostics\", value.diagnostics);\n return value as unknown as JvmCompilation;\n },\n async patchClass(request) {\n const value = record(\"jvm.classes.patch\", await mutate(\"jvm.classes.patch\", { ...request }));\n if (typeof value.success !== \"boolean\") throw new Error(\"jvm.classes.patch: expected success to be a boolean\");\n return { ...value, diagnostics: value.diagnostics ?? [] } as JvmCompilation;\n },\n async restoreClass(target) {\n await mutate(\"jvm.classes.restore\", { ...target });\n },\n async renewClassLease(target) {\n await mutate(\"jvm.classes.lease\", { ...target });\n },\n async metrics(options) {\n const value = await object(\"jvm.metrics\", {}, options?.signal);\n record(\"jvm.metrics\", value.runtime);\n record(\"jvm.metrics\", value.memory);\n return {\n ...value,\n garbageCollectors: garbageCollectors(value.garbageCollectors),\n connectors: value.connectors ?? [],\n dataSources: value.dataSources ?? [],\n } as JvmMetrics;\n },\n\n async loggers(options) {\n return (await list(\"jvm.logging.list\", {}, options?.signal)) as JvmLogger[];\n },\n async setLoggerLevel({ name, level }) {\n await mutate(\"jvm.logging.set\", { name, level });\n },\n\n async evaluateOgnl(request) {\n return record(\"jvm.ognl.eval\", await mutate(\"jvm.ognl.eval\", { ...request })) as JvmEvaluation;\n },\n async evaluateGroovy(request) {\n return record(\"jvm.groovy.eval\", await mutate(\"jvm.groovy.eval\", { ...request })) as JvmEvaluation;\n },\n };\n}\n"],"mappings":";AA+BA,SAAS,OAAO,WAAmB,OAAyC;CAC1E,IAAI,UAAU,QAAQ,OAAO,UAAU,YAAY,MAAM,QAAQ,KAAK,GACpE,MAAM,IAAI,MAAM,GAAG,UAAU,iCAAiC,KAAK,UAAU,KAAK,GAAG;CAEvF,OAAO;AACT;AAEA,SAAS,MAAM,WAAmB,OAAe,OAA2B;CAC1E,IAAI,CAAC,MAAM,QAAQ,KAAK,GAAG,MAAM,IAAI,MAAM,GAAG,UAAU,aAAa,MAAM,gBAAgB;CAC3F,OAAO;AACT;;;;;;AAOA,SAAS,iBAAiB,WAAmB,OAAe,OAAe,OAA+B;CACxG,IAAI,UAAU,KAAA,KAAa,UAAU,QAAQ,UAAU,IAAI,OAAO;CAClE,IAAI,OAAO,UAAU,YAAY,CAAC,OAAO,SAAS,KAAK,KAAK,QAAQ,GAClE,MAAM,IAAI,MAAM,GAAG,UAAU,+BAA+B,MAAM,IAAI,MAAM,qDAAqD,KAAK,UAAU,KAAK,GAAG;CAE1J,OAAO;AACT;AAEA,SAAS,kBAAkB,OAAuC;CAChE,OAAO,MAAM,eAAe,qBAAqB,SAAS,CAAC,CAAC,CAAC,CAAC,KAAK,KAAK,UAAU;EAChF,MAAM,YAAY,OAAO,kCAAkC,MAAM,IAAI,GAAG;EACxE,OAAO;GACL,GAAG;GACH,iBAAiB,iBA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M,OAAO,uBAAuB,EAAE,GAAG,OAAO,CAAC;EACnD;EACA,MAAM,gBAAgB,QAAQ;GAC5B,MAAM,OAAO,qBAAqB,EAAE,GAAG,OAAO,CAAC;EACjD;EACA,MAAM,QAAQ,SAAS;GACrB,MAAM,QAAQ,MAAM,OAAO,eAAe,CAAC,GAAG,SAAS,MAAM;GAC7D,OAAO,eAAe,MAAM,OAAO;GACnC,OAAO,eAAe,MAAM,MAAM;GAClC,OAAO;IACL,GAAG;IACH,mBAAmB,kBAAkB,MAAM,iBAAiB;IAC5D,YAAY,MAAM,cAAc,CAAC;IACjC,aAAa,MAAM,eAAe,CAAC;GACrC;EACF;EAEA,MAAM,QAAQ,SAAS;GACrB,OAAQ,MAAM,KAAK,oBAAoB,CAAC,GAAG,SAAS,MAAM;EAC5D;EACA,MAAM,eAAe,EAAE,MAAM,SAAS;GACpC,MAAM,OAAO,mBAAmB;IAAE;IAAM;GAAM,CAAC;EACjD;EAEA,MAAM,aAAa,SAAS;GAC1B,OAAO,OAAO,iBAAiB,MAAM,OAAO,iBAAiB,EAAE,GAAG,QAAQ,CAAC,CAAC;EAC9E;EACA,MAAM,eAAe,SAAS;GAC5B,OAAO,OAAO,mBAAmB,MAAM,OAAO,mBAAmB,EAAE,GAAG,QAAQ,CAAC,CAAC;EAClF;CACF;AACF"}
|
|
@@ -7,6 +7,7 @@ function jvmKeys(scope) {
|
|
|
7
7
|
const root = ["jvm", scope];
|
|
8
8
|
return {
|
|
9
9
|
all: root,
|
|
10
|
+
/** The status read, which carries the patch register too: invalidate it after a patch or restore. */
|
|
10
11
|
status: [...root, "status"],
|
|
11
12
|
mbeans: (pattern) => [
|
|
12
13
|
...root,
|
|
@@ -45,7 +46,6 @@ function jvmKeys(scope) {
|
|
|
45
46
|
className,
|
|
46
47
|
loader ?? ""
|
|
47
48
|
],
|
|
48
|
-
patches: [...root, "patches"],
|
|
49
49
|
metrics: [...root, "metrics"],
|
|
50
50
|
loggers: [...root, "loggers"]
|
|
51
51
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"query-keys.cjs","names":[],"sources":["../../../src/jvm/protocol/query-keys.ts"],"sourcesContent":["import type { JvmClassQuery } from \"./types\";\n\n/**\n * React Query keys for one JVM, identified by the host's opaque `scope`. Hosts\n * use the same keys to invalidate what a surface shows after their own writes.\n */\nexport function jvmKeys(scope: string) {\n const root = [\"jvm\", scope] as const;\n return {\n all: root,\n status: [...root, \"status\"] as const,\n mbeans: (pattern: string) => [...root, \"mbeans\", pattern] as const,\n mbean: (objectName: string) => [...root, \"mbean\", objectName] as const,\n mbeanValues: (objectName: string) => [...root, \"mbean\", objectName, \"values\"] as const,\n threads: [...root, \"threads\"] as const,\n threadStack: (id: number) => [...root, \"threads\", \"stack\", id] as const,\n classLoaders: [...root, \"class-loaders\"] as const,\n classes: (query: JvmClassQuery) => [...root, \"classes\", query] as const,\n /** Prefix of every decompiled source; invalidate it after a patch or restore. */\n classSources: [...root, \"class-source\"] as const,\n classSource: (className: string, loader: string | undefined) => [...root, \"class-source\", className, loader ?? \"\"] as const,\n
|
|
1
|
+
{"version":3,"file":"query-keys.cjs","names":[],"sources":["../../../src/jvm/protocol/query-keys.ts"],"sourcesContent":["import type { JvmClassQuery } from \"./types\";\n\n/**\n * React Query keys for one JVM, identified by the host's opaque `scope`. Hosts\n * use the same keys to invalidate what a surface shows after their own writes.\n */\nexport function jvmKeys(scope: string) {\n const root = [\"jvm\", scope] as const;\n return {\n all: root,\n /** The status read, which carries the patch register too: invalidate it after a patch or restore. */\n status: [...root, \"status\"] as const,\n mbeans: (pattern: string) => [...root, \"mbeans\", pattern] as const,\n mbean: (objectName: string) => [...root, \"mbean\", objectName] as const,\n mbeanValues: (objectName: string) => [...root, \"mbean\", objectName, \"values\"] as const,\n threads: [...root, \"threads\"] as const,\n threadStack: (id: number) => [...root, \"threads\", \"stack\", id] as const,\n classLoaders: [...root, \"class-loaders\"] as const,\n classes: (query: JvmClassQuery) => [...root, \"classes\", query] as const,\n /** Prefix of every decompiled source; invalidate it after a patch or restore. */\n classSources: [...root, \"class-source\"] as const,\n classSource: (className: string, loader: string | undefined) => [...root, \"class-source\", className, loader ?? \"\"] as const,\n metrics: [...root, \"metrics\"] as const,\n loggers: [...root, \"loggers\"] as const,\n };\n}\n"],"mappings":";;;;;AAMA,SAAgB,QAAQ,OAAe;CACrC,MAAM,OAAO,CAAC,OAAO,KAAK;CAC1B,OAAO;EACL,KAAK;;EAEL,QAAQ,CAAC,GAAG,MAAM,QAAQ;EAC1B,SAAS,YAAoB;GAAC,GAAG;GAAM;GAAU;EAAO;EACxD,QAAQ,eAAuB;GAAC,GAAG;GAAM;GAAS;EAAU;EAC5D,cAAc,eAAuB;GAAC,GAAG;GAAM;GAAS;GAAY;EAAQ;EAC5E,SAAS,CAAC,GAAG,MAAM,SAAS;EAC5B,cAAc,OAAe;GAAC,GAAG;GAAM;GAAW;GAAS;EAAE;EAC7D,cAAc,CAAC,GAAG,MAAM,eAAe;EACvC,UAAU,UAAyB;GAAC,GAAG;GAAM;GAAW;EAAK;;EAE7D,cAAc,CAAC,GAAG,MAAM,cAAc;EACtC,cAAc,WAAmB,WAA+B;GAAC,GAAG;GAAM;GAAgB;GAAW,UAAU;EAAE;EACjH,SAAS,CAAC,GAAG,MAAM,SAAS;EAC5B,SAAS,CAAC,GAAG,MAAM,SAAS;CAC9B;AACF"}
|
|
@@ -5,6 +5,7 @@ import { JvmClassQuery } from './types.js';
|
|
|
5
5
|
*/
|
|
6
6
|
export declare function jvmKeys(scope: string): {
|
|
7
7
|
all: readonly ["jvm", string];
|
|
8
|
+
/** The status read, which carries the patch register too: invalidate it after a patch or restore. */
|
|
8
9
|
status: readonly ["jvm", string, "status"];
|
|
9
10
|
mbeans: (pattern: string) => readonly ["jvm", string, "mbeans", string];
|
|
10
11
|
mbean: (objectName: string) => readonly ["jvm", string, "mbean", string];
|
|
@@ -16,7 +17,6 @@ export declare function jvmKeys(scope: string): {
|
|
|
16
17
|
/** Prefix of every decompiled source; invalidate it after a patch or restore. */
|
|
17
18
|
classSources: readonly ["jvm", string, "class-source"];
|
|
18
19
|
classSource: (className: string, loader: string | undefined) => readonly ["jvm", string, "class-source", string, string];
|
|
19
|
-
patches: readonly ["jvm", string, "patches"];
|
|
20
20
|
metrics: readonly ["jvm", string, "metrics"];
|
|
21
21
|
loggers: readonly ["jvm", string, "loggers"];
|
|
22
22
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"query-keys.d.ts","sourceRoot":"","sources":["../../../src/jvm/protocol/query-keys.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAE7C;;;GAGG;AACH,wBAAgB,OAAO,CAAC,KAAK,EAAE,MAAM
|
|
1
|
+
{"version":3,"file":"query-keys.d.ts","sourceRoot":"","sources":["../../../src/jvm/protocol/query-keys.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAE7C;;;GAGG;AACH,wBAAgB,OAAO,CAAC,KAAK,EAAE,MAAM;;IAIjC,qGAAqG;;sBAEnF,MAAM;wBACJ,MAAM;8BACA,MAAM;;sBAEd,MAAM;;qBAEP,aAAa;IAC9B,iFAAiF;;6BAExD,MAAM,UAAU,MAAM,GAAG,SAAS;;;EAI9D"}
|
|
@@ -7,6 +7,7 @@ function jvmKeys(scope) {
|
|
|
7
7
|
const root = ["jvm", scope];
|
|
8
8
|
return {
|
|
9
9
|
all: root,
|
|
10
|
+
/** The status read, which carries the patch register too: invalidate it after a patch or restore. */
|
|
10
11
|
status: [...root, "status"],
|
|
11
12
|
mbeans: (pattern) => [
|
|
12
13
|
...root,
|
|
@@ -45,7 +46,6 @@ function jvmKeys(scope) {
|
|
|
45
46
|
className,
|
|
46
47
|
loader ?? ""
|
|
47
48
|
],
|
|
48
|
-
patches: [...root, "patches"],
|
|
49
49
|
metrics: [...root, "metrics"],
|
|
50
50
|
loggers: [...root, "loggers"]
|
|
51
51
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"query-keys.js","names":[],"sources":["../../../src/jvm/protocol/query-keys.ts"],"sourcesContent":["import type { JvmClassQuery } from \"./types\";\n\n/**\n * React Query keys for one JVM, identified by the host's opaque `scope`. Hosts\n * use the same keys to invalidate what a surface shows after their own writes.\n */\nexport function jvmKeys(scope: string) {\n const root = [\"jvm\", scope] as const;\n return {\n all: root,\n status: [...root, \"status\"] as const,\n mbeans: (pattern: string) => [...root, \"mbeans\", pattern] as const,\n mbean: (objectName: string) => [...root, \"mbean\", objectName] as const,\n mbeanValues: (objectName: string) => [...root, \"mbean\", objectName, \"values\"] as const,\n threads: [...root, \"threads\"] as const,\n threadStack: (id: number) => [...root, \"threads\", \"stack\", id] as const,\n classLoaders: [...root, \"class-loaders\"] as const,\n classes: (query: JvmClassQuery) => [...root, \"classes\", query] as const,\n /** Prefix of every decompiled source; invalidate it after a patch or restore. */\n classSources: [...root, \"class-source\"] as const,\n classSource: (className: string, loader: string | undefined) => [...root, \"class-source\", className, loader ?? \"\"] as const,\n
|
|
1
|
+
{"version":3,"file":"query-keys.js","names":[],"sources":["../../../src/jvm/protocol/query-keys.ts"],"sourcesContent":["import type { JvmClassQuery } from \"./types\";\n\n/**\n * React Query keys for one JVM, identified by the host's opaque `scope`. Hosts\n * use the same keys to invalidate what a surface shows after their own writes.\n */\nexport function jvmKeys(scope: string) {\n const root = [\"jvm\", scope] as const;\n return {\n all: root,\n /** The status read, which carries the patch register too: invalidate it after a patch or restore. */\n status: [...root, \"status\"] as const,\n mbeans: (pattern: string) => [...root, \"mbeans\", pattern] as const,\n mbean: (objectName: string) => [...root, \"mbean\", objectName] as const,\n mbeanValues: (objectName: string) => [...root, \"mbean\", objectName, \"values\"] as const,\n threads: [...root, \"threads\"] as const,\n threadStack: (id: number) => [...root, \"threads\", \"stack\", id] as const,\n classLoaders: [...root, \"class-loaders\"] as const,\n classes: (query: JvmClassQuery) => [...root, \"classes\", query] as const,\n /** Prefix of every decompiled source; invalidate it after a patch or restore. */\n classSources: [...root, \"class-source\"] as const,\n classSource: (className: string, loader: string | undefined) => [...root, \"class-source\", className, loader ?? \"\"] as const,\n metrics: [...root, \"metrics\"] as const,\n loggers: [...root, \"loggers\"] as const,\n };\n}\n"],"mappings":";;;;;AAMA,SAAgB,QAAQ,OAAe;CACrC,MAAM,OAAO,CAAC,OAAO,KAAK;CAC1B,OAAO;EACL,KAAK;;EAEL,QAAQ,CAAC,GAAG,MAAM,QAAQ;EAC1B,SAAS,YAAoB;GAAC,GAAG;GAAM;GAAU;EAAO;EACxD,QAAQ,eAAuB;GAAC,GAAG;GAAM;GAAS;EAAU;EAC5D,cAAc,eAAuB;GAAC,GAAG;GAAM;GAAS;GAAY;EAAQ;EAC5E,SAAS,CAAC,GAAG,MAAM,SAAS;EAC5B,cAAc,OAAe;GAAC,GAAG;GAAM;GAAW;GAAS;EAAE;EAC7D,cAAc,CAAC,GAAG,MAAM,eAAe;EACvC,UAAU,UAAyB;GAAC,GAAG;GAAM;GAAW;EAAK;;EAE7D,cAAc,CAAC,GAAG,MAAM,cAAc;EACtC,cAAc,WAAmB,WAA+B;GAAC,GAAG;GAAM;GAAgB;GAAW,UAAU;EAAE;EACjH,SAAS,CAAC,GAAG,MAAM,SAAS;EAC5B,SAAS,CAAC,GAAG,MAAM,SAAS;CAC9B;AACF"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
// src/jvm/protocol/status.ts
|
|
2
|
+
function record(context, value) {
|
|
3
|
+
if (value === null || typeof value !== "object" || Array.isArray(value)) throw new Error(`${context}: expected an object, received ${JSON.stringify(value)}`);
|
|
4
|
+
return value;
|
|
5
|
+
}
|
|
6
|
+
/** One register row: checked for what the surfaces rely on, the agent's lease 0 dropped as "no lease". */
|
|
7
|
+
function patchRow(row, index) {
|
|
8
|
+
const patch = record(`jvm.status: patches[${index}]`, row);
|
|
9
|
+
if (typeof patch.class !== "string" || typeof patch.loader !== "string" || typeof patch.patched !== "boolean") throw new Error(`jvm.status: expected patches[${index}] to have a class, a loader and a patched flag`);
|
|
10
|
+
if (patch.leaseExpiresAt !== void 0 && patch.leaseExpiresAt !== null && typeof patch.leaseExpiresAt !== "number") throw new Error(`jvm.status: expected patches[${index}].leaseExpiresAt to be a number`);
|
|
11
|
+
const { leaseExpiresAt, ...rest } = patch;
|
|
12
|
+
return leaseExpiresAt ? {
|
|
13
|
+
...rest,
|
|
14
|
+
leaseExpiresAt
|
|
15
|
+
} : rest;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* The patch register a status read carries, validated here and not in `status()`: a malformed row
|
|
19
|
+
* fails the register, not the whole status that every mutation gate also reads.
|
|
20
|
+
*
|
|
21
|
+
* A status without `patches` from an agent that reports it is not instrumented has none to report,
|
|
22
|
+
* so the register is empty and the JVM is not asked again (the agent's own register read would
|
|
23
|
+
* attach the instrumentation as a side effect). An instrumented agent must carry them, and a status
|
|
24
|
+
* that says nothing about instrumentation cannot tell an empty register from a missing one: both
|
|
25
|
+
* are refused rather than shown as an empty register.
|
|
26
|
+
*/
|
|
27
|
+
function patchesFromStatus(status) {
|
|
28
|
+
if (status.patches !== void 0) {
|
|
29
|
+
if (!Array.isArray(status.patches)) throw new Error("jvm.status: expected patches to be an array");
|
|
30
|
+
return status.patches.map(patchRow);
|
|
31
|
+
}
|
|
32
|
+
if (status.instrumentation === true) throw new Error("jvm.status reported instrumentation without its patches");
|
|
33
|
+
if (status.instrumentation === false) return [];
|
|
34
|
+
throw new Error("jvm.status does not report instrumentation, so the patch register cannot be read");
|
|
35
|
+
}
|
|
36
|
+
exports.patchesFromStatus = patchesFromStatus;
|
|
37
|
+
|
|
38
|
+
//# sourceMappingURL=status.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"status.cjs","names":[],"sources":["../../../src/jvm/protocol/status.ts"],"sourcesContent":["import type { JvmPatch, JvmStatus } from \"./types\";\n\nfunction record(context: string, value: unknown): Record<string, unknown> {\n if (value === null || typeof value !== \"object\" || Array.isArray(value)) {\n throw new Error(`${context}: expected an object, received ${JSON.stringify(value)}`);\n }\n return value as Record<string, unknown>;\n}\n\n/** One register row: checked for what the surfaces rely on, the agent's lease 0 dropped as \"no lease\". */\nfunction patchRow(row: unknown, index: number): JvmPatch {\n const patch = record(`jvm.status: patches[${index}]`, row);\n if (typeof patch.class !== \"string\" || typeof patch.loader !== \"string\" || typeof patch.patched !== \"boolean\") {\n throw new Error(`jvm.status: expected patches[${index}] to have a class, a loader and a patched flag`);\n }\n if (patch.leaseExpiresAt !== undefined && patch.leaseExpiresAt !== null && typeof patch.leaseExpiresAt !== \"number\") {\n throw new Error(`jvm.status: expected patches[${index}].leaseExpiresAt to be a number`);\n }\n const { leaseExpiresAt, ...rest } = patch;\n return (leaseExpiresAt ? { ...rest, leaseExpiresAt } : rest) as unknown as JvmPatch;\n}\n\n/**\n * The patch register a status read carries, validated here and not in `status()`: a malformed row\n * fails the register, not the whole status that every mutation gate also reads.\n *\n * A status without `patches` from an agent that reports it is not instrumented has none to report,\n * so the register is empty and the JVM is not asked again (the agent's own register read would\n * attach the instrumentation as a side effect). An instrumented agent must carry them, and a status\n * that says nothing about instrumentation cannot tell an empty register from a missing one: both\n * are refused rather than shown as an empty register.\n */\nexport function patchesFromStatus(status: JvmStatus): JvmPatch[] {\n if (status.patches !== undefined) {\n if (!Array.isArray(status.patches)) throw new Error(\"jvm.status: expected patches to be an array\");\n return status.patches.map(patchRow);\n }\n if (status.instrumentation === true) throw new Error(\"jvm.status reported instrumentation without its patches\");\n if (status.instrumentation === false) return [];\n throw new Error(\"jvm.status does not report instrumentation, so the patch register cannot be read\");\n}\n"],"mappings":";AAEA,SAAS,OAAO,SAAiB,OAAyC;CACxE,IAAI,UAAU,QAAQ,OAAO,UAAU,YAAY,MAAM,QAAQ,KAAK,GACpE,MAAM,IAAI,MAAM,GAAG,QAAQ,iCAAiC,KAAK,UAAU,KAAK,GAAG;CAErF,OAAO;AACT;;AAGA,SAAS,SAAS,KAAc,OAAyB;CACvD,MAAM,QAAQ,OAAO,uBAAuB,MAAM,IAAI,GAAG;CACzD,IAAI,OAAO,MAAM,UAAU,YAAY,OAAO,MAAM,WAAW,YAAY,OAAO,MAAM,YAAY,WAClG,MAAM,IAAI,MAAM,gCAAgC,MAAM,+CAA+C;CAEvG,IAAI,MAAM,mBAAmB,KAAA,KAAa,MAAM,mBAAmB,QAAQ,OAAO,MAAM,mBAAmB,UACzG,MAAM,IAAI,MAAM,gCAAgC,MAAM,gCAAgC;CAExF,MAAM,EAAE,gBAAgB,GAAG,SAAS;CACpC,OAAQ,iBAAiB;EAAE,GAAG;EAAM;CAAe,IAAI;AACzD;;;;;;;;;;;AAYA,SAAgB,kBAAkB,QAA+B;CAC/D,IAAI,OAAO,YAAY,KAAA,GAAW;EAChC,IAAI,CAAC,MAAM,QAAQ,OAAO,OAAO,GAAG,MAAM,IAAI,MAAM,6CAA6C;EACjG,OAAO,OAAO,QAAQ,IAAI,QAAQ;CACpC;CACA,IAAI,OAAO,oBAAoB,MAAM,MAAM,IAAI,MAAM,yDAAyD;CAC9G,IAAI,OAAO,oBAAoB,OAAO,OAAO,CAAC;CAC9C,MAAM,IAAI,MAAM,kFAAkF;AACpG"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { JvmPatch, JvmStatus } from './types.js';
|
|
2
|
+
/**
|
|
3
|
+
* The patch register a status read carries, validated here and not in `status()`: a malformed row
|
|
4
|
+
* fails the register, not the whole status that every mutation gate also reads.
|
|
5
|
+
*
|
|
6
|
+
* A status without `patches` from an agent that reports it is not instrumented has none to report,
|
|
7
|
+
* so the register is empty and the JVM is not asked again (the agent's own register read would
|
|
8
|
+
* attach the instrumentation as a side effect). An instrumented agent must carry them, and a status
|
|
9
|
+
* that says nothing about instrumentation cannot tell an empty register from a missing one: both
|
|
10
|
+
* are refused rather than shown as an empty register.
|
|
11
|
+
*/
|
|
12
|
+
export declare function patchesFromStatus(status: JvmStatus): JvmPatch[];
|
|
13
|
+
//# sourceMappingURL=status.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"status.d.ts","sourceRoot":"","sources":["../../../src/jvm/protocol/status.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAsBnD;;;;;;;;;GASG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,SAAS,GAAG,QAAQ,EAAE,CAQ/D"}
|