@jini-ai/ui 0.7.3-next.2 → 0.7.3-next.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/dist/browser/index.d.ts +2 -0
- package/dist/browser/index.js +2 -0
- package/dist/browser/mount-renderer.d.ts +33 -0
- package/dist/browser/mount-renderer.js +14 -0
- package/dist/browser/useDismissibleDropdown.d.ts +50 -0
- package/dist/browser/useDismissibleDropdown.js +49 -0
- package/dist/core.d.ts +4 -4
- package/dist/core.js +4 -1
- package/dist/features/admin-widgets/components/InfoTip.js +5 -5
- package/dist/features/admin-widgets/components/InfoTip.rules.d.ts +1 -1
- package/dist/features/admin-widgets/components/InfoTip.rules.js +1 -1
- package/dist/features/admin-widgets/components/SeeMore/SeeMore.js +3 -3
- package/dist/features/admin-widgets/components/Select/Select.js +7 -7
- package/dist/features/app-shell/SiteToast.d.ts +24 -0
- package/dist/features/app-shell/SiteToast.js +9 -0
- package/dist/features/app-shell/copyable-details.d.ts +12 -0
- package/dist/features/app-shell/copyable-details.js +17 -0
- package/dist/features/app-shell/expanded-mode.d.ts +76 -0
- package/dist/features/app-shell/expanded-mode.js +70 -0
- package/dist/features/app-shell/index.d.ts +8 -0
- package/dist/features/app-shell/index.js +8 -0
- package/dist/features/app-shell/use-delete-confirmation.hooks.d.ts +48 -0
- package/dist/features/app-shell/use-delete-confirmation.hooks.js +57 -0
- package/dist/features/app-shell/use-expanded-mode.hooks.d.ts +19 -0
- package/dist/features/app-shell/use-expanded-mode.hooks.js +39 -0
- package/dist/features/app-shell/use-site-toast.hooks.d.ts +56 -0
- package/dist/features/app-shell/use-site-toast.hooks.js +44 -0
- package/dist/features/app-shell/use-theme-preference.hooks.d.ts +30 -0
- package/dist/features/app-shell/use-theme-preference.hooks.js +42 -0
- package/dist/features/app-version/use-app-version.d.ts +53 -0
- package/dist/features/app-version/use-app-version.js +42 -0
- package/dist/features/asset-grid/react/components/AssetGrid.d.ts +1 -1
- package/dist/features/asset-grid/react/components/AssetGrid.js +1 -1
- package/dist/features/asset-grid/react/components/DeleteConfirmDialog.d.ts +1 -1
- package/dist/features/asset-grid/react/components/DeleteConfirmDialog.js +1 -1
- package/dist/features/asset-tree-browser/react/components/AssetTreeBrowser.d.ts +2 -2
- package/dist/features/asset-tree-browser/react/components/AssetTreeBrowser.js +1 -1
- package/dist/features/asset-tree-browser/react/components/FilePreviewPane.d.ts +1 -1
- package/dist/features/browser-chrome/react/components/BrowserViewportControls.d.ts +1 -1
- package/dist/features/browser-chrome/react/components/BrowserViewportControls.js +1 -1
- package/dist/features/charts/table.js +4 -4
- package/dist/features/command-palette/index.d.ts +1 -0
- package/dist/features/command-palette/index.js +1 -0
- package/dist/features/command-palette/react/components/CommandPalette.d.ts +9 -9
- package/dist/features/command-palette/react/components/CommandPalette.hooks.js +28 -1
- package/dist/features/command-palette/react/components/CommandPalette.js +3 -5
- package/dist/features/connectors/ConnectorsBrowser.d.ts +1 -1
- package/dist/features/connectors/ConnectorsBrowser.js +2 -2
- package/dist/features/connectors/components/ConnectorCard.hooks.js +2 -2
- package/dist/features/connectors/components/ConnectorCard.js +4 -4
- package/dist/features/connectors/components/ConnectorDetailDrawer.d.ts +1 -1
- package/dist/features/connectors/components/ConnectorDetailDrawer.js +7 -7
- package/dist/features/connectors/components/ConnectorGrid.js +1 -1
- package/dist/features/connectors/components/ConnectorLogo.js +1 -1
- package/dist/features/connectors/components/ConnectorSearchBar.js +1 -1
- package/dist/features/connectors/components/ProviderTabBar.js +1 -1
- package/dist/features/execution/claude/env-fields.d.ts +1 -1
- package/dist/features/execution/codex/env-fields.d.ts +1 -1
- package/dist/features/execution/constants.d.ts +2 -2
- package/dist/features/execution/constants.js +1 -1
- package/dist/features/execution/dependencies.d.ts +2 -3
- package/dist/features/execution/http-adapter.d.ts +2 -3
- package/dist/features/execution/index.d.ts +0 -2
- package/dist/features/execution/react/components/AgentCliEnvFields.d.ts +1 -1
- package/dist/features/execution/react/components/AgentDiagnosticRow.d.ts +1 -1
- package/dist/features/execution/react/components/AgentDiagnosticRow.js +3 -1
- package/dist/features/execution/react/components/ByokProviderForm.d.ts +10 -2
- package/dist/features/execution/react/components/ByokProviderForm.hooks.d.ts +2 -2
- package/dist/features/execution/react/components/ByokProviderForm.js +15 -4
- package/dist/features/execution/react/components/ExecutionTab.d.ts +2 -3
- package/dist/features/execution/react/components/ExecutionTab.hooks.d.ts +14 -4
- package/dist/features/execution/react/components/ExecutionTab.hooks.js +66 -9
- package/dist/features/execution/react/components/ExecutionTab.js +27 -10
- package/dist/features/execution/react/components/LocalCliAgentCard.d.ts +4 -4
- package/dist/features/execution/react/components/LocalCliAgentList.d.ts +4 -4
- package/dist/features/execution/react/components/LocalCliAgentList.hooks.d.ts +3 -3
- package/dist/features/execution/react/components/LocalCliAgentSettings.d.ts +2 -2
- package/dist/features/execution/react/components/ProviderChipGroup.d.ts +1 -1
- package/dist/features/execution/react/components/SearchableModelSelect.d.ts +1 -1
- package/dist/features/execution/react/hooks/use-byok-field-validation.hooks.d.ts +2 -2
- package/dist/features/execution/react/hooks/use-execution-credential.hooks.d.ts +1 -1
- package/dist/features/execution/react/hooks/useExecutionTab.d.ts +2 -3
- package/dist/features/execution/react/hooks/useLocalCliAgentCard.d.ts +4 -4
- package/dist/features/execution/react/hooks/useLocalCliAgentList.d.ts +4 -4
- package/dist/features/execution/react/hooks/useReasoningControl.d.ts +3 -3
- package/dist/features/execution/rules.d.ts +6 -6
- package/dist/features/execution/rules.js +1 -1
- package/dist/features/external-mcp/react/components/ExternalMcpTab.js +4 -4
- package/dist/features/file-dropzone/react/components/FileDropzone.d.ts +1 -1
- package/dist/features/file-dropzone/react/components/FileDropzone.js +1 -1
- package/dist/features/find/find-bar-state.d.ts +58 -0
- package/dist/features/find/find-bar-state.js +45 -0
- package/dist/features/find/find-focus-clock.d.ts +19 -0
- package/dist/features/find/find-focus-clock.js +9 -0
- package/dist/features/find/find-input-focus.d.ts +88 -0
- package/dist/features/find/find-input-focus.js +88 -0
- package/dist/features/find/find-target.d.ts +141 -0
- package/dist/features/find/find-target.js +160 -0
- package/dist/features/find/index.d.ts +10 -0
- package/dist/features/find/index.js +10 -0
- package/dist/features/find/use-find-bar-effects.hooks.d.ts +14 -0
- package/dist/features/find/use-find-bar-effects.hooks.js +92 -0
- package/dist/features/find/use-find-bar-state.hooks.d.ts +43 -0
- package/dist/features/find/use-find-bar-state.hooks.js +49 -0
- package/dist/features/find/use-find-focus-reclaim.hooks.d.ts +21 -0
- package/dist/features/find/use-find-focus-reclaim.hooks.js +64 -0
- package/dist/features/find/use-find-input-binding.hooks.d.ts +18 -0
- package/dist/features/find/use-find-input-binding.hooks.js +76 -0
- package/dist/features/find-bar/FindBar.d.ts +41 -0
- package/dist/features/find-bar/FindBar.js +31 -0
- package/dist/features/find-bar/index.d.ts +2 -0
- package/dist/features/find-bar/index.js +2 -0
- package/dist/features/folder-path-drop/index.d.ts +3 -1
- package/dist/features/folder-path-drop/index.js +1 -0
- package/dist/features/folder-path-drop/react/hooks/useClassifiedPathDrop.d.ts +50 -0
- package/dist/features/folder-path-drop/react/hooks/useClassifiedPathDrop.js +50 -0
- package/dist/features/folder-path-drop/types.d.ts +14 -0
- package/dist/features/i18n/context.d.ts +1 -1
- package/dist/features/i18n/context.js +1 -1
- package/dist/features/iframe-pool/react/dom-sync.d.ts +13 -3
- package/dist/features/iframe-pool/react/dom-sync.js +7 -7
- package/dist/features/import-handoff/use-import-handoff.d.ts +38 -0
- package/dist/features/import-handoff/use-import-handoff.js +40 -0
- package/dist/features/integrations/rules.js +39 -41
- package/dist/features/interactive-ui/interactive-ui.css +1 -1
- package/dist/features/interactive-ui/providers/native/data-table.js +1 -1
- package/dist/features/interactive-ui/providers/shadcn/checkbox-field.js +1 -1
- package/dist/features/interactive-ui/providers/shadcn/data-table.js +3 -3
- package/dist/features/interactive-ui/providers/shadcn/radio-group-field.js +1 -1
- package/dist/features/live-views/index.d.ts +6 -0
- package/dist/features/live-views/index.js +6 -0
- package/dist/features/live-views/use-live-views.d.ts +31 -0
- package/dist/features/live-views/use-live-views.js +88 -0
- package/dist/features/live-views/use-site-view-preference.d.ts +33 -0
- package/dist/features/live-views/use-site-view-preference.js +32 -0
- package/dist/features/live-views/use-webview-load-failure.d.ts +90 -0
- package/dist/features/live-views/use-webview-load-failure.js +122 -0
- package/dist/features/mcp-ui/credential-card.d.ts +1 -0
- package/dist/features/mcp-ui/credential-card.js +1 -1
- package/dist/features/mcp-ui/surfaces/tool-approval.d.ts +10 -0
- package/dist/features/mcp-ui/surfaces/tool-approval.js +15 -0
- package/dist/features/media-providers/dependencies.d.ts +7 -1
- package/dist/features/media-providers/dependencies.js +43 -0
- package/dist/features/media-providers/index.d.ts +2 -2
- package/dist/features/media-providers/index.js +1 -1
- package/dist/features/media-providers/ports.d.ts +39 -5
- package/dist/features/media-providers/react/components/MediaProvidersTab.d.ts +4 -3
- package/dist/features/media-providers/react/components/MediaProvidersTab.js +1 -1
- package/dist/features/media-providers/react/hooks/useMediaProvidersTab.d.ts +3 -2
- package/dist/features/media-providers/react/hooks/useMediaProvidersTab.js +41 -3
- package/dist/features/memory/react/components/MemoryConnectedPanel.js +2 -2
- package/dist/features/memory/react/components/MemoryEntryCard.js +1 -1
- package/dist/features/memory/react/components/MemoryHooksPanel.js +2 -2
- package/dist/features/memory/react/components/MemoryList.js +2 -2
- package/dist/features/memory/react/components/MemorySettingsPanel.js +2 -2
- package/dist/features/memory/react/components/MemorySuggestionPanel.js +1 -1
- package/dist/features/memory/react/hooks/useMemoryConnectors.hooks.js +3 -3
- package/dist/features/memory/react/hooks/useMemoryConnectors.rules.d.ts +4 -1
- package/dist/features/memory/react/hooks/useMemoryConnectors.rules.js +1 -1
- package/dist/features/memory/react/render-markdown.js +1 -1
- package/dist/features/nav-availability/nav-availability.d.ts +18 -0
- package/dist/features/nav-availability/nav-availability.js +12 -0
- package/dist/features/number-stepper/NumberStepper.d.ts +39 -0
- package/dist/features/number-stepper/NumberStepper.js +16 -0
- package/dist/features/number-stepper/index.d.ts +5 -0
- package/dist/features/number-stepper/index.js +5 -0
- package/dist/features/number-stepper/number-stepper.d.ts +34 -0
- package/dist/features/number-stepper/number-stepper.js +32 -0
- package/dist/features/number-stepper/use-number-stepper.hooks.d.ts +20 -0
- package/dist/features/number-stepper/use-number-stepper.hooks.js +29 -0
- package/dist/features/number-stepper/use-optimistic-number-setting.hooks.d.ts +36 -0
- package/dist/features/number-stepper/use-optimistic-number-setting.hooks.js +25 -0
- package/dist/features/panel-kit/ErrorNotice.js +8 -1
- package/dist/features/panel-kit/helpers/standing-draft-local-backup.d.ts +1 -1
- package/dist/features/panel-kit/helpers/standing-draft-recovery-message.d.ts +1 -1
- package/dist/features/panel-kit/hooks/use-standing-draft-autosave.hooks.d.ts +1 -37
- package/dist/features/panel-kit/hooks/use-standing-draft-recovery.hooks.d.ts +2 -1
- package/dist/features/panel-kit/hooks/use-standing-draft-state.hooks.d.ts +2 -1
- package/dist/features/panel-kit/hooks/use-standing-draft-writes.hooks.d.ts +2 -1
- package/dist/features/panel-kit/index.d.ts +2 -1
- package/dist/features/privacy/react/components/PrivacyTab.d.ts +1 -1
- package/dist/features/privacy/react/components/PrivacyTab.js +1 -1
- package/dist/features/progress-card/components/ProgressCard.d.ts +1 -1
- package/dist/features/progress-card/components/ProgressCard.js +1 -1
- package/dist/features/resource-dashboard/react/components/ResourceBoard.d.ts +1 -1
- package/dist/features/resource-dashboard/react/components/ResourceBoardToolbar.d.ts +1 -1
- package/dist/features/resource-dashboard/react/components/ResourceBoardToolbar.js +1 -1
- package/dist/features/resource-dashboard/react/components/ResourceCardParts.d.ts +1 -1
- package/dist/features/resource-dashboard/react/components/ResourceCardParts.js +7 -2
- package/dist/features/resource-dashboard/react/components/ResourceRowListView.d.ts +1 -1
- package/dist/features/resource-dashboard/react/components/ResourceRowListView.js +1 -1
- package/dist/features/resource-dashboard/react/components/ResourceRunHistoryList.d.ts +1 -1
- package/dist/features/resource-dashboard/react/components/ResourceRunHistoryList.js +1 -1
- package/dist/features/resource-dashboard/react/components/StatusPill.d.ts +1 -1
- package/dist/features/resource-dashboard/react/components/StatusPill.js +1 -1
- package/dist/features/resource-dashboard/react/hooks/useResourceBoard.js +6 -1
- package/dist/features/resource-monitor/ResourceTable.d.ts +67 -0
- package/dist/features/resource-monitor/ResourceTable.js +25 -0
- package/dist/features/resource-monitor/index.d.ts +4 -0
- package/dist/features/resource-monitor/index.js +4 -0
- package/dist/features/resource-monitor/resource-stop.d.ts +16 -0
- package/dist/features/resource-monitor/resource-stop.js +11 -0
- package/dist/features/resource-monitor/use-resource-readings.hooks.d.ts +44 -0
- package/dist/features/resource-monitor/use-resource-readings.hooks.js +91 -0
- package/dist/features/settings/dialog/styles/settings-dialog.css +251 -251
- package/dist/features/site-card/index.d.ts +4 -1
- package/dist/features/site-card/index.js +3 -0
- package/dist/features/site-card/use-created-site-return.hooks.d.ts +36 -0
- package/dist/features/site-card/use-created-site-return.hooks.js +43 -0
- package/dist/features/site-card/use-site-card-preview.hooks.d.ts +39 -0
- package/dist/features/site-card/use-site-card-preview.hooks.js +31 -0
- package/dist/features/site-card/use-site-list-prefs.hooks.d.ts +29 -8
- package/dist/features/site-card/use-site-list-prefs.hooks.js +56 -9
- package/dist/features/site-card/use-site-preview.hooks.d.ts +67 -0
- package/dist/features/site-card/use-site-preview.hooks.js +94 -0
- package/dist/features/sketch-editor/react/components/SketchEditor.d.ts +2 -2
- package/dist/features/sketch-editor/react/components/SketchEditor.js +1 -1
- package/dist/features/skills/react/components/SkillRow.js +1 -1
- package/dist/features/source-config-list/react/components/SourceConfigAddForm.js +2 -2
- package/dist/features/source-config-list/react/components/SourceConfigField.js +1 -1
- package/dist/features/source-config-list/react/components/SourceConfigItemCard.js +5 -5
- package/dist/features/source-config-list/react/components/SourceConfigList.d.ts +1 -1
- package/dist/features/source-config-list/react/components/SourceConfigList.js +1 -1
- package/dist/features/source-config-list/react/components/SourceConfigListView.js +3 -3
- package/dist/features/source-config-list/react/components/SourceConfigTestControl.d.ts +1 -1
- package/dist/features/source-config-list/react/components/SourceConfigTestControl.js +1 -1
- package/dist/features/tab-launcher-menu/react/components/TabLauncherMenu.d.ts +1 -1
- package/dist/features/tab-launcher-menu/react/components/TabLauncherMenu.js +1 -1
- package/dist/features/tab-strip/react/components/TabBar.js +2 -2
- package/dist/features/tab-strip/react/components/TabStrip.d.ts +1 -1
- package/dist/features/tab-strip/react/components/TabStrip.js +1 -1
- package/dist/features/tab-strip/scrollable.js +0 -2
- package/dist/features/tabbed-dialog/react/components/TabbedDialog.d.ts +1 -1
- package/dist/features/tabbed-dialog/react/components/TabbedDialog.js +1 -1
- package/dist/features/version-manager/react/components/VersionManagerModal.d.ts +1 -1
- package/dist/features/version-manager/react/components/VersionManagerModal.js +1 -1
- package/dist/features/viewer-shell/react/components/CommentSidePanel.d.ts +2 -2
- package/dist/features/viewer-shell/react/components/CommentSidePanel.js +1 -1
- package/dist/features/viewer-shell/react/components/MarkdownSplitPane.d.ts +1 -1
- package/dist/features/viewer-shell/react/components/MarkdownSplitPane.js +1 -1
- package/dist/features/viewer-shell/react/components/SegmentedToggle.d.ts +1 -1
- package/dist/features/viewer-shell/react/components/SegmentedToggle.js +1 -1
- package/dist/features/viewer-shell/react/components/ViewportSwitcher.d.ts +1 -1
- package/dist/features/viewer-shell/react/components/ViewportSwitcher.js +1 -1
- package/dist/features/viewer-shell/react/components/ViewportToggleGroup.d.ts +1 -1
- package/dist/features/viewer-shell/react/components/ViewportToggleGroup.js +1 -1
- package/dist/features/zoom/use-zoom.d.ts +141 -0
- package/dist/features/zoom/use-zoom.js +204 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/react/components/ComponentKitPreview.d.ts +1 -1
- package/dist/react/components/ComponentKitPreview.js +1 -1
- package/dist/react/components/CustomSelect.js +1 -1
- package/dist/react/components/ExportDiagnosticsButton.d.ts +6 -2
- package/dist/react/components/ExportDiagnosticsButton.js +3 -3
- package/dist/react/components/FileImportPanel.js +1 -1
- package/dist/react/components/IconFrame.d.ts +15 -0
- package/dist/react/components/IconFrame.js +11 -0
- package/dist/react/components/ImportChoice.js +1 -1
- package/dist/react/components/Notice.js +1 -1
- package/dist/react/components/OnboardingDropdown.js +1 -1
- package/dist/react/components/PaletteTweaks.js +1 -1
- package/dist/react/components/TooltipLayer.d.ts +13 -3
- package/dist/react/components/TooltipLayer.js +12 -12
- package/dist/react/mcp-ui/host-message-source.d.ts +3 -1
- package/dist/react/mcp-ui/host-message-source.js +1 -1
- package/dist/react/testing.js +3 -1
- package/dist/renderers/annotation-canvas/rules.js +30 -27
- package/dist/renderers/react/components/ArtifactView.js +1 -1
- package/dist/renderers/renderers/markdown.d.ts +3 -1
- package/dist/renderers/renderers/markdown.js +2 -2
- package/dist/styles/admin.css +54 -54
- package/dist/utils/zip.js +43 -36
- package/package.json +66 -9
- package/dist/features/execution/ports.d.ts +0 -71
- package/dist/features/execution/ports.js +0 -2
- package/dist/features/execution/types.d.ts +0 -472
- package/dist/features/execution/types.js +0 -2
- package/dist/react/components/CustomSelectMarkup.d.ts +0 -27
- package/dist/react/components/CustomSelectMarkup.js +0 -35
|
@@ -1,472 +0,0 @@
|
|
|
1
|
-
import type { ProviderPreset as SharedProviderPreset } from '@jini-ai/core';
|
|
2
|
-
/**
|
|
3
|
-
* Origin: the inline `execution` tab body in `SettingsDialog.tsx`
|
|
4
|
-
* (lines 4080-5336), classified MIXED by
|
|
5
|
-
* `ADS-memory/reports/jini-port/recon/r6-god-component-internals.md` §1.3 — a generic
|
|
6
|
-
* "Local CLI vs. bring-your-own-key" execution switch wrapped in
|
|
7
|
-
* origin-specific managed-runtime/wallet chrome.
|
|
8
|
-
*
|
|
9
|
-
* What is ported: the mode switch, the provider/gateway chip groups, and the
|
|
10
|
-
* BYOK credential form (the origin had already factored these fields into
|
|
11
|
-
* `components/byok/*`, which is why this slice is assembly rather than
|
|
12
|
-
* surgery).
|
|
13
|
-
*
|
|
14
|
-
* What is deliberately left behind: the origin's managed-runtime wallet
|
|
15
|
-
* (balance polling, top-up, sign-in coachmarks, the `SettingsHighlight`
|
|
16
|
-
* one-shot focus hint) and its analytics tracking calls — all product-bound,
|
|
17
|
-
* none of it generic.
|
|
18
|
-
*/
|
|
19
|
-
/** `'local-cli'` runs a detected code-agent CLI on this machine; `'byok'`
|
|
20
|
-
* talks to a model endpoint with the operator's own credentials. The origin
|
|
21
|
-
* spelled these `'daemon'` and `'api'` — renamed here to say what they mean
|
|
22
|
-
* rather than how the origin's transport happened to be wired. */
|
|
23
|
-
export type ExecutionMode = 'local-cli' | 'byok';
|
|
24
|
-
/** Wire protocol a BYOK endpoint speaks. Vendor-shaped, not product-shaped:
|
|
25
|
-
* these name public API dialects, the same way `features/i18n` names locales. */
|
|
26
|
-
export type ApiProtocol = 'anthropic' | 'openai' | 'azure' | 'google';
|
|
27
|
-
/** Where a preset renders in the chip strip. The origin drew one row of
|
|
28
|
-
* protocol presets and one of gateway presets; hosts that don't care can
|
|
29
|
-
* leave this unset and get a single row. */
|
|
30
|
-
export type { ProviderPresetKind } from '@jini-ai/core';
|
|
31
|
-
/** One selectable endpoint preset supplied by the host. */
|
|
32
|
-
export interface ProviderPreset extends SharedProviderPreset<ApiProtocol> {
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* One advisory remark about the API key currently typed into the form, ready to translate.
|
|
36
|
-
*
|
|
37
|
-
* `message` is plain English AND its own i18n key (this package's convention — see
|
|
38
|
-
* `DEFAULT_AGENT_DESCRIPTIONS`), and `vars` fills its `{name}` placeholders. Kept split rather than
|
|
39
|
-
* pre-composed because the vendor names are runtime values from the catalog: a pre-composed
|
|
40
|
-
* sentence would be a key no dictionary can contain, and would also freeze English word order for
|
|
41
|
-
* every locale.
|
|
42
|
-
*
|
|
43
|
-
* Advisory by construction — a message, not a validity verdict. See {@link ProviderPreset.apiKeyPrefix}.
|
|
44
|
-
*/
|
|
45
|
-
export interface ApiKeyWarning {
|
|
46
|
-
message: string;
|
|
47
|
-
vars: Readonly<Record<string, string>>;
|
|
48
|
-
}
|
|
49
|
-
/** One provider's saved credential draft — everything `ByokConfig` carries at
|
|
50
|
-
* the top level, minus the selection fields (`protocol`/`providerId`), which
|
|
51
|
-
* only make sense for the *active* selection. */
|
|
52
|
-
export interface ByokProviderCredentials {
|
|
53
|
-
apiKey: string;
|
|
54
|
-
baseUrl: string;
|
|
55
|
-
model: string;
|
|
56
|
-
maxTokens?: number | undefined;
|
|
57
|
-
}
|
|
58
|
-
/**
|
|
59
|
-
* The operator's BYOK credentials and endpoint selection.
|
|
60
|
-
*
|
|
61
|
-
* `apiKey`/`baseUrl`/`model`/`maxTokens` at the top level are the *active*
|
|
62
|
-
* selection's live values — what the form renders and what a connection test
|
|
63
|
-
* or real dispatch uses right now. They are NOT shared across providers:
|
|
64
|
-
* every other preset's last-saved credentials live in `savedByProviderId`,
|
|
65
|
-
* keyed by preset id, and `nextConfigForPresetSelect` (`rules.ts`) snapshots
|
|
66
|
-
* the outgoing provider into that map before loading the incoming one.
|
|
67
|
-
*
|
|
68
|
-
* Origin: `state/config.ts`'s `apiProtocolConfigs` (keyed per protocol) plus
|
|
69
|
-
* `byokProviderConfigDrafts` (keyed per protocol+baseUrl, for presets that
|
|
70
|
-
* share a protocol but not an endpoint). This package collapses both into one
|
|
71
|
-
* map keyed by preset id, which is already unique per endpoint in this tab's
|
|
72
|
-
* catalog. Without this split, every preset chip's "configured" status
|
|
73
|
-
* (`isProviderConfigured`) reads the SAME shared fields — so selecting
|
|
74
|
-
* Anthropic and typing a key made the unrelated Ollama chip (which requires
|
|
75
|
-
* no key) render "configured" too, because it was being checked against
|
|
76
|
-
* Anthropic's live base URL rather than its own.
|
|
77
|
-
*/
|
|
78
|
-
export interface ByokConfig {
|
|
79
|
-
protocol: ApiProtocol;
|
|
80
|
-
/** `null` selects the custom/manual endpoint rather than a preset. */
|
|
81
|
-
providerId: string | null;
|
|
82
|
-
apiKey: string;
|
|
83
|
-
baseUrl: string;
|
|
84
|
-
model: string;
|
|
85
|
-
/** Omitted/undefined means "use the model's own default", which is why this
|
|
86
|
-
* is not `number | 0` — 0 would be a real cap of zero tokens. */
|
|
87
|
-
maxTokens?: number | undefined;
|
|
88
|
-
/** Saved credentials for every preset OTHER than the active selection,
|
|
89
|
-
* keyed by `ProviderPreset.id`. See this interface's header. */
|
|
90
|
-
savedByProviderId?: Readonly<Record<string, ByokProviderCredentials>>;
|
|
91
|
-
}
|
|
92
|
-
export interface ExecutionConfig {
|
|
93
|
-
mode: ExecutionMode;
|
|
94
|
-
byok: ByokConfig;
|
|
95
|
-
localCli: LocalCliConfig;
|
|
96
|
-
}
|
|
97
|
-
/** One model a detected agent can be asked to run. Mirrors
|
|
98
|
-
* `@jini-ai/agent-runtime`'s `RuntimeModelOption` field-for-field so a host
|
|
99
|
-
* backed by that package passes its detection payload through unmapped. */
|
|
100
|
-
export interface AgentModelOption {
|
|
101
|
-
id: string;
|
|
102
|
-
label: string;
|
|
103
|
-
identityKind?: 'concrete' | 'alias' | 'routing-mode';
|
|
104
|
-
resolvedId?: string;
|
|
105
|
-
/**
|
|
106
|
-
* The reasoning-effort levels THIS model supports, when the runtime's own catalog reports them
|
|
107
|
-
* per model rather than uniformly across the agent. Mirrors `@jini-ai/agent-runtime`'s
|
|
108
|
-
* `RuntimeModelOption.reasoning` field-for-field, for the same reason every other field on this
|
|
109
|
-
* interface does (see this file's header doc) — Codex's `debug models` catalog reports it, and the
|
|
110
|
-
* levels genuinely differ between models on the same CLI.
|
|
111
|
-
*
|
|
112
|
-
* `undefined` means "nothing model-specific to say" and is read as agent-wide by
|
|
113
|
-
* `useReasoningControl`'s narrowing rule — it falls back to `DetectedAgent.reasoningOptions`'s
|
|
114
|
-
* union, the same list every model showed before this field existed. It is NOT a synonym for "zero
|
|
115
|
-
* levels". An explicit `[]` means the catalog said so outright, and is honored as-is even though it
|
|
116
|
-
* hides the effort control for that model.
|
|
117
|
-
*/
|
|
118
|
-
reasoning?: readonly AgentModelOption[] | undefined;
|
|
119
|
-
}
|
|
120
|
-
/** Where an agent's model list came from. `'live'` was pulled from the CLI
|
|
121
|
-
* itself (its config or a catalog call); `'fallback'` is the adapter's
|
|
122
|
-
* built-in list. The distinction is rendered, not cosmetic: an operator
|
|
123
|
-
* looking at a stale built-in list needs to know a rescan can improve it. */
|
|
124
|
-
export type AgentModelSource = 'live' | 'fallback';
|
|
125
|
-
/** Whether the CLI appears to be signed in. `'unknown'` is a real third state,
|
|
126
|
-
* not a synonym for `'missing'` — an adapter with no auth probe, or a probe
|
|
127
|
-
* that could not be classified, genuinely does not know, and saying
|
|
128
|
-
* "authentication required" there would be a false claim. */
|
|
129
|
-
export type AgentAuthStatus = 'ok' | 'missing' | 'unknown';
|
|
130
|
-
/** Whether an agent's CLI accepts an operator-typed model id outside its
|
|
131
|
-
* known `models` list. `undefined` means "allow" (most CLIs do) — a host
|
|
132
|
-
* opts OUT with an explicit `false` for a CLI that routes model selection
|
|
133
|
-
* through a closed catalog (no free-text `--model` flag, or a protocol that
|
|
134
|
-
* validates the id against a live catalog and rejects unknown ones).
|
|
135
|
-
* Origin: `RuntimeAgentDef.supportsCustomModel`. */
|
|
136
|
-
export type AgentSupportsCustomModel = boolean;
|
|
137
|
-
/**
|
|
138
|
-
* A code-agent CLI found on the machine that ran detection, as reported by
|
|
139
|
-
* `ExecutionPort`.
|
|
140
|
-
*
|
|
141
|
-
* Everything below `path` is optional because a host may know less than
|
|
142
|
-
* `@jini-ai/agent-runtime` does — but a host backed by that package should
|
|
143
|
-
* pass all of it through. Its `DetectedAgent` (`types.ts`, the `models` /
|
|
144
|
-
* `modelsSource` / `authStatus` / `authMessage` / `path` / `version`
|
|
145
|
-
* intersection) already carries every field here, so narrowing the payload at
|
|
146
|
-
* the route boundary throws away data the card is built to render.
|
|
147
|
-
*/
|
|
148
|
-
export interface DetectedAgent {
|
|
149
|
-
/** Cached inventory is usable now; retry a normal read until background discovery settles. */
|
|
150
|
-
discoveryPending?: boolean;
|
|
151
|
-
id: string;
|
|
152
|
-
label: string;
|
|
153
|
-
installed: boolean;
|
|
154
|
-
version?: string | undefined;
|
|
155
|
-
/** Absolute path to the resolved binary, when the host can determine it. */
|
|
156
|
-
path?: string | undefined;
|
|
157
|
-
/** One-line vendor description ("Anthropic official CLI"). Describes the
|
|
158
|
-
* CLI, not the product embedding it — see `DEFAULT_AGENT_DESCRIPTIONS`,
|
|
159
|
-
* which a host may extend or replace. */
|
|
160
|
-
description?: string | undefined;
|
|
161
|
-
models?: readonly AgentModelOption[] | undefined;
|
|
162
|
-
modelsSource?: AgentModelSource | undefined;
|
|
163
|
-
/** Reasoning-effort/mode presets this agent's model exposes (e.g.
|
|
164
|
-
* "low"/"medium"/"high"), reusing `AgentModelOption`'s `{id, label}` shape
|
|
165
|
-
* — the same shape `@jini-ai/agent-runtime`'s `RuntimeReasoningOption`
|
|
166
|
-
* aliases from its model-option type, for the same reason: a reasoning
|
|
167
|
-
* choice IS a model-catalog entry, just from a different picker. Absent or
|
|
168
|
-
* empty means the agent has no reasoning axis to configure. */
|
|
169
|
-
reasoningOptions?: readonly AgentModelOption[] | undefined;
|
|
170
|
-
/**
|
|
171
|
-
* Declares that this agent's CLI carries its reasoning-effort choice INSIDE
|
|
172
|
-
* the model id — as a trailing `-<level>` on the slug — instead of in a flag
|
|
173
|
-
* of its own, and names which trailing tokens count as levels.
|
|
174
|
-
*
|
|
175
|
-
* Mirrors `@jini-ai/agent-runtime`'s `RuntimeReasoningInModelId` field-for-
|
|
176
|
-
* field, the same way `reasoningOptions` above mirrors its
|
|
177
|
-
* `RuntimeReasoningOption[]`, and for the same reason (see this interface's
|
|
178
|
-
* own doc). Present INSTEAD of `reasoningOptions`, never alongside it: a card
|
|
179
|
-
* carrying both would render two effort controls that disagree about where
|
|
180
|
-
* the choice goes.
|
|
181
|
-
*
|
|
182
|
-
* Only the vocabulary is declared. Which of these levels a given base model
|
|
183
|
-
* actually has is DERIVED from `models` by `reasoningModelGroups`
|
|
184
|
-
* (`rules.ts`) — availability is genuinely not uniform (antigravity's
|
|
185
|
-
* `gemini-3.1-pro` has only high and low, `gpt-oss-120b` only medium,
|
|
186
|
-
* `claude-sonnet-4-6` none), so a fixed high/medium/low control would offer
|
|
187
|
-
* slugs the CLI rejects outright.
|
|
188
|
-
*/
|
|
189
|
-
reasoningInModelId?: {
|
|
190
|
-
levels: readonly AgentModelOption[];
|
|
191
|
-
} | undefined;
|
|
192
|
-
/** See `AgentSupportsCustomModel`. `undefined` allows custom input,
|
|
193
|
-
* matching every adapter's default before this field existed. */
|
|
194
|
-
supportsCustomModel?: AgentSupportsCustomModel | undefined;
|
|
195
|
-
authStatus?: AgentAuthStatus | undefined;
|
|
196
|
-
/** Operator-actionable detail behind a `'missing'`/`'unknown'` status —
|
|
197
|
-
* rendered as the meta line's tooltip so the card stays compact without
|
|
198
|
-
* discarding the reason. */
|
|
199
|
-
authMessage?: string | undefined;
|
|
200
|
-
/** Short marketing-ish tags ("Official", "Lower cost"). The mechanism is
|
|
201
|
-
* generic; the vocabulary is the host's — this package ships none. */
|
|
202
|
-
badges?: readonly string[] | undefined;
|
|
203
|
-
/** Why this agent is unavailable or only partially usable, as one or more
|
|
204
|
-
* renderable "reason + fix button(s)" rows — see `AgentDiagnostic`. Absent
|
|
205
|
-
* or empty means detection has nothing actionable to report (the common
|
|
206
|
-
* case for a healthy, authenticated CLI). */
|
|
207
|
-
diagnostics?: readonly AgentDiagnostic[] | undefined;
|
|
208
|
-
/** Destination for an `{kind: 'openInstall'}` fix action — the CLI's
|
|
209
|
-
* install/download page. Absent hides that action even if a diagnostic
|
|
210
|
-
* requests it, per `AgentDiagnosticRow`'s "only render what the host can
|
|
211
|
-
* actually do" contract. */
|
|
212
|
-
installUrl?: string | undefined;
|
|
213
|
-
/** Destination for an `{kind: 'openDocs'}` fix action — the CLI's
|
|
214
|
-
* configuration/auth docs. Same absent-hides-the-action rule as
|
|
215
|
-
* `installUrl`. */
|
|
216
|
-
docsUrl?: string | undefined;
|
|
217
|
-
}
|
|
218
|
-
/**
|
|
219
|
-
* Why a CLI agent is unavailable or only partially usable, in a shape a UI
|
|
220
|
-
* can render as "one-line reason + fix button(s)" instead of a silent grey
|
|
221
|
-
* card.
|
|
222
|
-
*
|
|
223
|
-
* Origin: OD's `packages/contracts/src/api/registry.ts#AgentDiagnostic` /
|
|
224
|
-
* `AgentFixIntent`, vendored into `@jini-ai/protocol`'s `agent-catalog.ts`
|
|
225
|
-
* (2026-07-29) unmodified. Mirrored here field-for-field rather than
|
|
226
|
-
* imported — this file has zero imports of its own (framework-free, part of
|
|
227
|
-
* this package's `./core` subpath), the same reasoning `DetectedAgent`'s own
|
|
228
|
-
* doc comment gives for mirroring `@jini-ai/agent-runtime`'s shape instead of
|
|
229
|
-
* depending on that Node-only package. A host on `@jini-ai/agent-runtime` /
|
|
230
|
-
* `@jini-ai/protocol` passes its `AgentDiagnostic[]` straight through
|
|
231
|
-
* unmapped, since the fields are identical.
|
|
232
|
-
*/
|
|
233
|
-
export interface AgentDiagnostic {
|
|
234
|
-
reason: AgentDiagnosticReason;
|
|
235
|
-
severity: AgentDiagnosticSeverity;
|
|
236
|
-
/** Short, human-readable, single-sentence explanation. */
|
|
237
|
-
message: string;
|
|
238
|
-
/** Optional longer context (e.g. the probe's stderr tail). */
|
|
239
|
-
detail?: string | undefined;
|
|
240
|
-
/** Directories PATH detection searched, surfaced verbatim for the
|
|
241
|
-
* `'not-on-path'` case so the operator can see where detection looked
|
|
242
|
-
* before being asked to set an explicit binary path. */
|
|
243
|
-
searchedDirs?: readonly string[] | undefined;
|
|
244
|
-
/** Ordered fix affordances the UI should offer for this diagnostic. */
|
|
245
|
-
fixActions?: readonly AgentFixIntent[] | undefined;
|
|
246
|
-
}
|
|
247
|
-
export type AgentDiagnosticReason =
|
|
248
|
-
/** The binary (and any fallback names) was not found on PATH. */
|
|
249
|
-
'not-on-path'
|
|
250
|
-
/** A file matched but is not executable (missing +x / wrong PATHEXT). */
|
|
251
|
-
| 'not-executable'
|
|
252
|
-
/** A wrapper/shim was found but its target is gone (exit 126/127). */
|
|
253
|
-
| 'shim-broken'
|
|
254
|
-
/** A user-set binary-path override points at a missing/invalid file. */
|
|
255
|
-
| 'configured-bin-invalid'
|
|
256
|
-
/** Installed and invocable, but the CLI is not authenticated. */
|
|
257
|
-
| 'auth-missing'
|
|
258
|
-
/** Installed, but auth status could not be verified. */
|
|
259
|
-
| 'auth-unknown';
|
|
260
|
-
export type AgentDiagnosticSeverity = 'error' | 'warning' | 'info';
|
|
261
|
-
/**
|
|
262
|
-
* A typed "what should the UI do to fix this" intent attached to an
|
|
263
|
-
* `AgentDiagnostic`. The UI renders one button per intent and owns the
|
|
264
|
-
* concrete handler (open a URL, re-run detection, write an env override);
|
|
265
|
-
* keeping the intent typed — rather than a pre-baked button label + URL —
|
|
266
|
-
* lets more than one surface render the same fix affordances from one
|
|
267
|
-
* source of truth.
|
|
268
|
-
*/
|
|
269
|
-
export type AgentFixIntent =
|
|
270
|
-
/** Open the agent's configuration/auth docs. */
|
|
271
|
-
{
|
|
272
|
-
kind: 'openDocs';
|
|
273
|
-
}
|
|
274
|
-
/** Open the agent's install/download page. */
|
|
275
|
-
| {
|
|
276
|
-
kind: 'openInstall';
|
|
277
|
-
}
|
|
278
|
-
/** Re-run agent detection (this tab's rescan affordance). */
|
|
279
|
-
| {
|
|
280
|
-
kind: 'rescan';
|
|
281
|
-
}
|
|
282
|
-
/** Prompt the operator to point the host at an explicit binary by writing
|
|
283
|
-
* `envKey` into `LocalCliConfig.envByAgentId` — used when the CLI is
|
|
284
|
-
* installed somewhere PATH detection can't reach. */
|
|
285
|
-
| {
|
|
286
|
-
kind: 'setEnv';
|
|
287
|
-
envKey: string;
|
|
288
|
-
}
|
|
289
|
-
/** Clear a previously-set binary override so detection falls back to PATH. */
|
|
290
|
-
| {
|
|
291
|
-
kind: 'clearEnv';
|
|
292
|
-
envKey: string;
|
|
293
|
-
}
|
|
294
|
-
/** Launch the agent's interactive sign-in in a system terminal (used by
|
|
295
|
-
* adapters whose OAuth flow cannot complete headlessly). */
|
|
296
|
-
| {
|
|
297
|
-
kind: 'launchOAuth';
|
|
298
|
-
agentId: string;
|
|
299
|
-
};
|
|
300
|
-
/**
|
|
301
|
-
* Catalog entry describing one operator-configurable CLI environment
|
|
302
|
-
* variable for one agent (a proxy base URL, a custom config directory, a
|
|
303
|
-
* binary-path override, …). Origin: `AGENT_CLI_ENV_FIELDS`. A host supplies
|
|
304
|
-
* its own catalog the same way it supplies `ProviderPreset`s — this package
|
|
305
|
-
* ships `DEFAULT_AGENT_CLI_ENV_FIELDS` as a starting point for the CLIs it
|
|
306
|
-
* already knows about (see `DEFAULT_AGENT_DESCRIPTIONS`), not as a fixed list.
|
|
307
|
-
*/
|
|
308
|
-
export interface AgentCliEnvFieldSpec {
|
|
309
|
-
agentId: string;
|
|
310
|
-
envKey: string;
|
|
311
|
-
/** Field label. This package's convention: the English string IS the i18n
|
|
312
|
-
* key (see `PROTOCOL_OPTIONS`) — a host translates it, it does not supply
|
|
313
|
-
* a separate key. */
|
|
314
|
-
label: string;
|
|
315
|
-
placeholder?: string | undefined;
|
|
316
|
-
/** Renders the input as `type="password"` and omits the value from any
|
|
317
|
-
* plain-text display. */
|
|
318
|
-
secret?: boolean | undefined;
|
|
319
|
-
/** Marks this field as the agent's executable-path override — the field a
|
|
320
|
-
* "use detected path" / "clear custom path" repair affordance (see
|
|
321
|
-
* `agentExecutableRepairState`) should set or clear. At most one field per
|
|
322
|
-
* `agentId` should carry this; the mechanism is generic, but this
|
|
323
|
-
* package's own `DEFAULT_AGENT_CLI_ENV_FIELDS` only tags Codex's
|
|
324
|
-
* `CODEX_BIN`, mirroring the origin's actual (Codex-only) behavior. */
|
|
325
|
-
kind?: 'binPath' | undefined;
|
|
326
|
-
}
|
|
327
|
-
/**
|
|
328
|
-
* Which detected CLI runs the operator's prompts, and with which model.
|
|
329
|
-
*
|
|
330
|
-
* `modelByAgentId` is keyed rather than flat because the picker is per-agent:
|
|
331
|
-
* switching from Claude to Codex and back must not silently hand Codex's model
|
|
332
|
-
* id to Claude. The origin kept the same shape (`cfg.agentModels`, keyed by
|
|
333
|
-
* agent id) for the same reason.
|
|
334
|
-
*/
|
|
335
|
-
export interface LocalCliConfig {
|
|
336
|
-
/** `null` until the operator picks one — deliberately not defaulted to the
|
|
337
|
-
* first detected agent, so "nothing selected" stays distinguishable from
|
|
338
|
-
* "the first one was chosen for you". */
|
|
339
|
-
agentId: string | null;
|
|
340
|
-
modelByAgentId?: Readonly<Record<string, string>>;
|
|
341
|
-
/** Per-agent reasoning-effort pick, keyed the same way as `modelByAgentId`
|
|
342
|
-
* and for the same reason: switching agents and back must not hand one
|
|
343
|
-
* agent's reasoning choice to another. */
|
|
344
|
-
reasoningByAgentId?: Readonly<Record<string, string>>;
|
|
345
|
-
/** Per-agent CLI environment overrides — proxy URLs, custom config dirs, a
|
|
346
|
-
* binary-path override — keyed by agent id then env var name. Origin:
|
|
347
|
-
* `AppConfig.agentCliEnv`. Mirrors that two-level shape directly rather
|
|
348
|
-
* than flattening it, since a field's env-var name is only unique WITHIN
|
|
349
|
-
* an agent (`CODEX_BIN` means nothing for `claude`). */
|
|
350
|
-
envByAgentId?: Readonly<Record<string, Readonly<Record<string, string>>>>;
|
|
351
|
-
}
|
|
352
|
-
/** Which required BYOK field is still blank/invalid. Drives the inline
|
|
353
|
-
* "required" markers without the tab hard-coding field labels. */
|
|
354
|
-
export type ByokRequiredField = 'apiKey' | 'baseUrl' | 'model';
|
|
355
|
-
export type ConnectionTestState = {
|
|
356
|
-
status: 'idle';
|
|
357
|
-
} | {
|
|
358
|
-
status: 'testing';
|
|
359
|
-
} | {
|
|
360
|
-
status: 'ok';
|
|
361
|
-
message?: string | undefined;
|
|
362
|
-
} | {
|
|
363
|
-
status: 'error';
|
|
364
|
-
message: string;
|
|
365
|
-
};
|
|
366
|
-
/**
|
|
367
|
-
* Which executable a Local-CLI test actually invoked. `'primary'` is the
|
|
368
|
-
* normal case (the resolved/on-PATH binary ran). The two `fallback-*`
|
|
369
|
-
* variants report that a configured binary-path override
|
|
370
|
-
* (`AgentCliEnvFieldSpec` with `kind: 'binPath'`) could not be used and
|
|
371
|
-
* detection fell back to a different binary anyway — `'fallback-invalid'`
|
|
372
|
-
* when the override path never resolved to an executable, `'fallback-failed'`
|
|
373
|
-
* when it resolved but failed to run. Both are the trigger for
|
|
374
|
-
* `agentExecutableRepairState`'s repair affordance. Origin: OD's
|
|
375
|
-
* `ConnectionTestResponse.usedExecutableSource` (`'fallback_invalid'` /
|
|
376
|
-
* `'fallback_failed'`, renamed to this package's kebab-case convention).
|
|
377
|
-
*/
|
|
378
|
-
export type AgentExecutableSource = 'primary' | 'fallback-invalid' | 'fallback-failed';
|
|
379
|
-
/** Result of the per-agent Test button, surfaced under the selected card.
|
|
380
|
-
* Same idiom as `ConnectionTestState` — the two report the same kind of
|
|
381
|
-
* outcome for the two execution modes, so they deliberately share a shape.
|
|
382
|
-
* `usedExecutableSource`/`detectedExecutablePath` are optional passthrough
|
|
383
|
-
* from `ExecutionPort.testAgent`'s result, present only when the host's
|
|
384
|
-
* probe can report which binary it actually ran — see
|
|
385
|
-
* `agentExecutableRepairState`. */
|
|
386
|
-
export type AgentTestState = {
|
|
387
|
-
status: 'idle';
|
|
388
|
-
} | {
|
|
389
|
-
status: 'testing';
|
|
390
|
-
agentId: string;
|
|
391
|
-
} | {
|
|
392
|
-
status: 'ok';
|
|
393
|
-
agentId: string;
|
|
394
|
-
message?: string | undefined;
|
|
395
|
-
usedExecutableSource?: AgentExecutableSource | undefined;
|
|
396
|
-
detectedExecutablePath?: string | undefined;
|
|
397
|
-
} | {
|
|
398
|
-
status: 'error';
|
|
399
|
-
agentId: string;
|
|
400
|
-
message: string;
|
|
401
|
-
};
|
|
402
|
-
/** The repair affordance a successful-but-fallback agent test unlocks: an
|
|
403
|
-
* operator-set binary-path override didn't work, detection silently fell
|
|
404
|
-
* back to a different binary, and the test still passed — so the operator
|
|
405
|
-
* should be offered "use the binary that actually worked" or "clear the
|
|
406
|
-
* override and stop overriding". `canUseDetected` is carried explicitly
|
|
407
|
-
* (rather than always being implied `true`) so a future detection outcome
|
|
408
|
-
* that finds a fallback path but cannot vouch for it has somewhere to say
|
|
409
|
-
* so without a breaking shape change. */
|
|
410
|
-
export interface AgentExecutableRepair {
|
|
411
|
-
detectedPath: string;
|
|
412
|
-
canUseDetected: boolean;
|
|
413
|
-
}
|
|
414
|
-
/**
|
|
415
|
-
* One base model of a `DetectedAgent.reasoningInModelId` agent, together with the effort levels
|
|
416
|
-
* that model ACTUALLY has — derived from the agent's own model list by `reasoningModelGroups`
|
|
417
|
-
* (`rules.ts`), never declared.
|
|
418
|
-
*
|
|
419
|
-
* This is the shape the card renders its two controls from: the base picker lists one entry per
|
|
420
|
-
* group, and the effort picker lists exactly `levels` for whichever group is active. That is what
|
|
421
|
-
* keeps it from offering a slug the CLI would reject — `gemini-3.1-pro` genuinely has no `-medium`
|
|
422
|
-
* variant, so `levels` genuinely has no `medium` entry.
|
|
423
|
-
*/
|
|
424
|
-
export interface ReasoningModelGroup {
|
|
425
|
-
/** The model id with any recognized effort suffix removed (`gemini-3.1-pro`). */
|
|
426
|
-
baseId: string;
|
|
427
|
-
/** Display name for the base. The effort qualifier is stripped from the source label only when
|
|
428
|
-
* the id it came from carried a real suffix — so `Gemini 3.1 Pro (High)` becomes `Gemini 3.1
|
|
429
|
-
* Pro`, while `Claude Sonnet 4.6 (Thinking)` (a suffix-less id) keeps its parenthetical. */
|
|
430
|
-
label: string;
|
|
431
|
-
/** The effort levels this base really offers, in the declared vocabulary's order. Empty for a
|
|
432
|
-
* base the catalog lists without any suffixed variant. */
|
|
433
|
-
levels: readonly AgentModelOption[];
|
|
434
|
-
/** Full model id per level in `levels` — the recombination table, so composing a slug is a
|
|
435
|
-
* lookup of something the catalog actually contained rather than string concatenation. */
|
|
436
|
-
modelIdByLevel: Readonly<Record<string, string>>;
|
|
437
|
-
/** The suffix-less id, when the catalog lists the base on its own (`claude-sonnet-4-6`,
|
|
438
|
-
* `default`). Absent for a base that only ever appears with a suffix. */
|
|
439
|
-
bareModelId?: string | undefined;
|
|
440
|
-
}
|
|
441
|
-
/** Result of a local-CLI rescan, surfaced as an inline status line. */
|
|
442
|
-
export type AgentScanState = {
|
|
443
|
-
status: 'idle';
|
|
444
|
-
} | {
|
|
445
|
-
status: 'scanning';
|
|
446
|
-
} | {
|
|
447
|
-
status: 'ok';
|
|
448
|
-
count: number;
|
|
449
|
-
} | {
|
|
450
|
-
status: 'error';
|
|
451
|
-
message: string;
|
|
452
|
-
};
|
|
453
|
-
/** Result of `ExecutionPort.listModels`, surfaced as an inline hint near the
|
|
454
|
-
* Model field. Mirrors `ConnectionTestState`/`AgentScanState`'s shape
|
|
455
|
-
* deliberately — one idiom for "async edge result" across this tab, per
|
|
456
|
-
* this package's error-reporting contract (§3.2: reuse an existing union
|
|
457
|
-
* over introducing a parallel shape). A failure here must NOT collapse
|
|
458
|
-
* into the same "no models" the field already tolerates when a host
|
|
459
|
-
* supplies no `listModels` at all — `'error'` is a distinct, renderable
|
|
460
|
-
* state, not an empty `'ok'`. */
|
|
461
|
-
export type ModelDiscoveryState = {
|
|
462
|
-
status: 'idle';
|
|
463
|
-
} | {
|
|
464
|
-
status: 'loading';
|
|
465
|
-
} | {
|
|
466
|
-
status: 'ok';
|
|
467
|
-
models: readonly string[];
|
|
468
|
-
} | {
|
|
469
|
-
status: 'error';
|
|
470
|
-
message: string;
|
|
471
|
-
};
|
|
472
|
-
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import type { ReactNode } from 'react';
|
|
2
|
-
import type { CustomSelectProps, UseCustomSelectResult } from './CustomSelect.types.js';
|
|
3
|
-
import type { CustomSelectOriginTheme } from './CustomSelect.js';
|
|
4
|
-
import type { AgentControlProps } from '../hooks/useAgentHandle.js';
|
|
5
|
-
export declare function CustomSelectMenu({ state, portal, menuClassName, ariaLabel, menuHeader, originTheme, originPage, agentProps, children }: {
|
|
6
|
-
state: UseCustomSelectResult;
|
|
7
|
-
portal: boolean;
|
|
8
|
-
menuClassName: string | undefined;
|
|
9
|
-
ariaLabel: string;
|
|
10
|
-
menuHeader: ReactNode;
|
|
11
|
-
originTheme: CustomSelectOriginTheme;
|
|
12
|
-
originPage: string | undefined;
|
|
13
|
-
agentProps: AgentControlProps;
|
|
14
|
-
children: ReactNode;
|
|
15
|
-
}): import("react").JSX.Element;
|
|
16
|
-
export declare function CustomSelectMarkup({ state, base, agentProps, value, ariaLabel, labelledBy, className, triggerClassName, disabled, title, onFocus, portal, portalContainer, overlayContainer, menu, }: {
|
|
17
|
-
[K in 'value' | 'ariaLabel' | 'labelledBy' | 'className' | 'triggerClassName' | 'title' | 'onFocus' | 'portalContainer']: CustomSelectProps[K];
|
|
18
|
-
} & {
|
|
19
|
-
state: UseCustomSelectResult;
|
|
20
|
-
base: string | undefined;
|
|
21
|
-
agentProps: AgentControlProps;
|
|
22
|
-
disabled: boolean;
|
|
23
|
-
portal: boolean;
|
|
24
|
-
overlayContainer: HTMLElement | null;
|
|
25
|
-
menu: ReactNode;
|
|
26
|
-
}): import("react").JSX.Element;
|
|
27
|
-
//# sourceMappingURL=CustomSelectMarkup.d.ts.map
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { createPortal } from 'react-dom';
|
|
3
|
-
import { agentHandleProps } from '@jini-ai/core/agent-handles';
|
|
4
|
-
import { Icon } from './Icon.js';
|
|
5
|
-
import { resolveSelectPortalContainer } from './select-popover.js';
|
|
6
|
-
/** Inline geometry for a portalled menu once it has been measured; an inline menu is laid out by CSS. */
|
|
7
|
-
function customSelectMenuStyle({ portal, position }) {
|
|
8
|
-
return portal && position
|
|
9
|
-
? {
|
|
10
|
-
top: position.top,
|
|
11
|
-
left: position.left,
|
|
12
|
-
width: position.width,
|
|
13
|
-
maxHeight: position.maxHeight,
|
|
14
|
-
}
|
|
15
|
-
: undefined;
|
|
16
|
-
}
|
|
17
|
-
/** Where an open menu renders: inline, or portalled only after its first measurement. */
|
|
18
|
-
function mountCustomSelectMenu({ menu, portal, position, trigger }, { container, fallbackContainer } = {}) {
|
|
19
|
-
if (!portal)
|
|
20
|
-
return menu;
|
|
21
|
-
return position ? createPortal(menu, resolveSelectPortalContainer({ trigger }, { container, fallbackContainer })) : null;
|
|
22
|
-
}
|
|
23
|
-
export function CustomSelectMenu({ state, portal, menuClassName, ariaLabel, menuHeader, originTheme, originPage, agentProps, children }) {
|
|
24
|
-
const { menuRef, idBase, onMenuKeyDown, position } = state;
|
|
25
|
-
return (_jsxs("div", { ref: menuRef, id: `${idBase}-menu`, onKeyDown: onMenuKeyDown, ...originTheme, "data-agent-page": originPage, "data-agent-private": agentProps['data-agent-private'], className: [
|
|
26
|
-
'jini-select-menu',
|
|
27
|
-
portal ? 'portal' : 'inline',
|
|
28
|
-
menuClassName,
|
|
29
|
-
].filter(Boolean).join(' '), role: "listbox", "aria-label": ariaLabel, style: customSelectMenuStyle({ portal, position }), children: [menuHeader, children] }));
|
|
30
|
-
}
|
|
31
|
-
export function CustomSelectMarkup({ state, base, agentProps, value, ariaLabel, labelledBy, className, triggerClassName, disabled, title, onFocus, portal, portalContainer, overlayContainer, menu, }) {
|
|
32
|
-
const { buttonRef, open, idBase, activeOptionId, selectedLabel, toggleOpen, onButtonKeyDown, position } = state;
|
|
33
|
-
return (_jsxs("div", { className: ['jini-select', className].filter(Boolean).join(' '), children: [_jsxs("button", { ref: buttonRef, ...agentHandleProps({}, { base, role: 'field', label: ariaLabel }), "data-agent-private": agentProps['data-agent-private'], "data-agent-page": agentProps['data-agent-page'], type: "button", className: ['jini-select-trigger', triggerClassName].filter(Boolean).join(' '), role: "combobox", value: value, "aria-haspopup": "listbox", "aria-expanded": open, "aria-controls": `${idBase}-menu`, "aria-activedescendant": activeOptionId, "aria-describedby": labelledBy, "aria-label": `${ariaLabel}: ${selectedLabel}`, disabled: disabled, title: title, onClick: toggleOpen, onKeyDown: onButtonKeyDown, onFocus: onFocus, children: [_jsx("span", { id: `${idBase}-value`, className: "jini-select-value", children: selectedLabel }), _jsx(Icon, { name: "chevron-down", size: 14 })] }), open ? mountCustomSelectMenu({ menu, portal, position, trigger: buttonRef.current }, { container: portalContainer, fallbackContainer: overlayContainer }) : null] }));
|
|
34
|
-
}
|
|
35
|
-
//# sourceMappingURL=CustomSelectMarkup.js.map
|