feat: add streaming ui configuration

This commit is contained in:
a.tolmachev
2026-04-06 12:04:49 +03:00
parent fdd0a45124
commit b40daf4f54
20 changed files with 2254 additions and 20 deletions
+2
View File
@@ -235,6 +235,8 @@
</div><!-- /wizard-shell -->
<script src="../../js/streaming-form.js"></script>
<script src="../../js/stream-test-run.js"></script>
<script src="../../js/wizard.js"></script>
<script src="../../js/nav.js"></script>
+158
View File
@@ -87,6 +87,164 @@ tls:
</div>
</div>
<div id="wizard-streaming-config-card" class="config-card" style="margin-bottom: 20px;">
<div class="config-card-header">
<div class="config-card-header-icon">
<svg width="13" height="13" viewBox="0 0 16 16" fill="none" stroke="var(--text-secondary)" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round">
<path d="M3 4h10M3 8h10M3 12h6"/>
<circle cx="12" cy="12" r="1.5"/>
</svg>
</div>
<div>
<div class="config-card-title" data-i18n="wizard.streaming.title">Streaming execution</div>
<div class="config-card-subtitle" data-i18n="wizard.streaming.subtitle">Bounded stream, session and async job settings for MCP tool families.</div>
</div>
</div>
<div class="config-card-body" style="gap: 16px;">
<div class="form-row">
<div class="form-group">
<label class="form-label" data-i18n="wizard.streaming.execution_mode">Execution mode</label>
<select id="streaming-mode" class="form-select">
<option value="unary">Unary</option>
</select>
</div>
<div class="form-group">
<label class="form-label" data-i18n="wizard.streaming.transport_behavior">Transport behavior</label>
<select id="streaming-transport-behavior" class="form-select">
<option value="request_response">Request / response</option>
</select>
</div>
<div class="form-group">
<label class="form-label" data-i18n="wizard.streaming.aggregation_mode">Aggregation mode</label>
<select id="streaming-aggregation-mode" class="form-select">
<option value="raw_items" data-i18n="wizard.streaming.aggregation.raw_items">Raw items</option>
<option value="summary_only" data-i18n="wizard.streaming.aggregation.summary_only">Summary only</option>
<option value="summary_plus_samples" data-i18n="wizard.streaming.aggregation.summary_plus_samples">Summary + samples</option>
<option value="stats" data-i18n="wizard.streaming.aggregation.stats">Stats</option>
<option value="latest_state" data-i18n="wizard.streaming.aggregation.latest_state">Latest state</option>
</select>
</div>
</div>
<div id="streaming-mode-help" class="form-hint" data-i18n="wizard.streaming.help.unary">Unary keeps the existing request-response model. Other modes create bounded stream-aware MCP tools.</div>
<div id="streaming-limits-grid" class="form-row">
<div class="form-group">
<label class="form-label" data-i18n="wizard.streaming.window_duration">Window duration (ms)</label>
<input id="streaming-window-duration-ms" class="form-input" type="number" min="1" step="1" placeholder="5000">
</div>
<div class="form-group">
<label class="form-label" data-i18n="wizard.streaming.poll_interval">Poll interval (ms)</label>
<input id="streaming-poll-interval-ms" class="form-input" type="number" min="1" step="1" placeholder="2000">
</div>
<div class="form-group">
<label class="form-label" data-i18n="wizard.streaming.upstream_timeout">Upstream timeout (ms)</label>
<input id="streaming-upstream-timeout-ms" class="form-input" type="number" min="1" step="1" placeholder="10000">
</div>
</div>
<div class="form-row">
<div class="form-group">
<label class="form-label" data-i18n="wizard.streaming.idle_timeout">Idle timeout (ms)</label>
<input id="streaming-idle-timeout-ms" class="form-input" type="number" min="1" step="1" placeholder="30000">
</div>
<div class="form-group">
<label class="form-label" data-i18n="wizard.streaming.session_lifetime">Session lifetime (ms)</label>
<input id="streaming-session-lifetime-ms" class="form-input" type="number" min="1" step="1" placeholder="300000">
</div>
<div class="form-group">
<label class="form-label" data-i18n="wizard.streaming.max_items">Max items</label>
<input id="streaming-max-items" class="form-input" type="number" min="1" step="1" placeholder="100">
</div>
</div>
<div class="form-row">
<div class="form-group">
<label class="form-label" data-i18n="wizard.streaming.max_bytes">Max bytes</label>
<input id="streaming-max-bytes" class="form-input" type="number" min="1" step="1" placeholder="65536">
</div>
<div class="form-group">
<label class="form-label" data-i18n="wizard.streaming.max_field_length">Max field length</label>
<input id="streaming-max-field-length" class="form-input" type="number" min="1" step="1" placeholder="512">
</div>
<div class="form-group">
<label class="form-label" data-i18n="wizard.streaming.sampling_rate">Sampling rate</label>
<input id="streaming-sampling-rate" class="form-input" type="number" min="0" max="1" step="0.1" placeholder="1.0">
</div>
</div>
<div class="form-row">
<div class="form-group">
<label class="form-label" data-i18n="wizard.streaming.items_path">Items path</label>
<input id="streaming-items-path" class="form-input input-mono" type="text" placeholder="$.items">
</div>
<div class="form-group">
<label class="form-label" data-i18n="wizard.streaming.summary_path">Summary path</label>
<input id="streaming-summary-path" class="form-input input-mono" type="text" placeholder="$.summary">
</div>
<div class="form-group">
<label class="form-label" data-i18n="wizard.streaming.done_path">Done path</label>
<input id="streaming-done-path" class="form-input input-mono" type="text" placeholder="$.done">
</div>
</div>
<div class="form-row">
<div class="form-group">
<label class="form-label" data-i18n="wizard.streaming.cursor_path">Cursor path</label>
<input id="streaming-cursor-path" class="form-input input-mono" type="text" placeholder="$.cursor">
</div>
<div class="form-group">
<label class="form-label" data-i18n="wizard.streaming.status_path">Status path</label>
<input id="streaming-status-path" class="form-input input-mono" type="text" placeholder="$.status">
</div>
<div class="form-group">
<label class="form-label" data-i18n="wizard.streaming.redacted_paths">Redacted paths</label>
<textarea id="streaming-redacted-paths" class="form-textarea code-textarea" rows="4" spellcheck="false" placeholder="$.items[*].token&#10;$.summary.secret"></textarea>
</div>
</div>
<div class="form-row">
<label class="checkbox-pill"><input id="streaming-truncate-item-fields" type="checkbox"> <span data-i18n="wizard.streaming.truncate_item_fields">Truncate item fields</span></label>
<label class="checkbox-pill"><input id="streaming-drop-duplicates" type="checkbox"> <span data-i18n="wizard.streaming.drop_duplicates">Drop duplicates</span></label>
</div>
<div id="streaming-tool-family-block" style="display:none;">
<div class="section-divider" style="margin: 8px 0 16px;">
<span class="section-divider-label" data-i18n="wizard.streaming.tool_family">Tool family</span>
<div class="section-divider-line"></div>
</div>
<div class="form-row">
<div class="form-group">
<label class="form-label" data-i18n="wizard.streaming.start_tool_name">Start tool name</label>
<input id="streaming-start-tool-name" class="form-input input-mono" type="text" placeholder="logs_follow_start">
</div>
<div class="form-group">
<label class="form-label" data-i18n="wizard.streaming.poll_tool_name">Poll tool name</label>
<input id="streaming-poll-tool-name" class="form-input input-mono" type="text" placeholder="logs_follow_poll">
</div>
<div class="form-group">
<label class="form-label" data-i18n="wizard.streaming.stop_tool_name">Stop tool name</label>
<input id="streaming-stop-tool-name" class="form-input input-mono" type="text" placeholder="logs_follow_stop">
</div>
</div>
<div class="form-row" id="streaming-async-tool-family-row" style="display:none;">
<div class="form-group">
<label class="form-label" data-i18n="wizard.streaming.status_tool_name">Status tool name</label>
<input id="streaming-status-tool-name" class="form-input input-mono" type="text" placeholder="deploy_status">
</div>
<div class="form-group">
<label class="form-label" data-i18n="wizard.streaming.result_tool_name">Result tool name</label>
<input id="streaming-result-tool-name" class="form-input input-mono" type="text" placeholder="deploy_result">
</div>
<div class="form-group">
<label class="form-label" data-i18n="wizard.streaming.cancel_tool_name">Cancel tool name</label>
<input id="streaming-cancel-tool-name" class="form-input input-mono" type="text" placeholder="deploy_cancel">
</div>
</div>
</div>
</div>
</div>
<div class="section-divider" style="margin-bottom: 16px;">
<span class="section-divider-label" data-i18n="wizard.step5.live_title">Live validation and publishing</span>
<div class="section-divider-line"></div>