@jini-ai/ui 0.3.3 → 0.3.6
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/features/appearance/react/components/AppearanceTab.d.ts +4 -1
- package/dist/features/appearance/react/components/AppearanceTab.d.ts.map +1 -1
- package/dist/features/appearance/react/components/AppearanceTab.js +7 -4
- package/dist/features/appearance/react/components/AppearanceTab.js.map +1 -1
- package/dist/features/connectors/ConnectorsBrowser.d.ts +8 -1
- package/dist/features/connectors/ConnectorsBrowser.d.ts.map +1 -1
- package/dist/features/connectors/ConnectorsBrowser.js +4 -3
- package/dist/features/connectors/ConnectorsBrowser.js.map +1 -1
- package/dist/features/connectors/components/ConnectorCard.d.ts +4 -1
- package/dist/features/connectors/components/ConnectorCard.d.ts.map +1 -1
- package/dist/features/connectors/components/ConnectorCard.js +5 -4
- package/dist/features/connectors/components/ConnectorCard.js.map +1 -1
- package/dist/features/connectors/components/ConnectorDetailDrawer.d.ts +3 -1
- package/dist/features/connectors/components/ConnectorDetailDrawer.d.ts.map +1 -1
- package/dist/features/connectors/components/ConnectorDetailDrawer.js +3 -2
- package/dist/features/connectors/components/ConnectorDetailDrawer.js.map +1 -1
- package/dist/features/connectors/components/ConnectorGrid.d.ts +4 -1
- package/dist/features/connectors/components/ConnectorGrid.d.ts.map +1 -1
- package/dist/features/connectors/components/ConnectorGrid.js +4 -2
- package/dist/features/connectors/components/ConnectorGrid.js.map +1 -1
- package/dist/features/connectors/components/ConnectorSearchBar.d.ts +3 -1
- package/dist/features/connectors/components/ConnectorSearchBar.d.ts.map +1 -1
- package/dist/features/connectors/components/ConnectorSearchBar.js +4 -3
- package/dist/features/connectors/components/ConnectorSearchBar.js.map +1 -1
- package/dist/features/connectors/components/ProviderTabBar.d.ts +4 -1
- package/dist/features/connectors/components/ProviderTabBar.d.ts.map +1 -1
- package/dist/features/connectors/components/ProviderTabBar.js +5 -3
- package/dist/features/connectors/components/ProviderTabBar.js.map +1 -1
- package/dist/features/execution/constants.d.ts +30 -0
- package/dist/features/execution/constants.d.ts.map +1 -1
- package/dist/features/execution/constants.js +45 -0
- package/dist/features/execution/constants.js.map +1 -1
- package/dist/features/execution/index.d.ts +3 -3
- package/dist/features/execution/index.d.ts.map +1 -1
- package/dist/features/execution/index.js +2 -2
- package/dist/features/execution/index.js.map +1 -1
- package/dist/features/execution/react/components/AgentCliEnvFields.d.ts.map +1 -1
- package/dist/features/execution/react/components/AgentCliEnvFields.js +8 -1
- package/dist/features/execution/react/components/AgentCliEnvFields.js.map +1 -1
- package/dist/features/execution/react/components/ByokProviderForm.d.ts +30 -1
- package/dist/features/execution/react/components/ByokProviderForm.d.ts.map +1 -1
- package/dist/features/execution/react/components/ByokProviderForm.js +41 -21
- package/dist/features/execution/react/components/ByokProviderForm.js.map +1 -1
- package/dist/features/execution/react/components/ExecutionTab.d.ts +9 -1
- package/dist/features/execution/react/components/ExecutionTab.d.ts.map +1 -1
- package/dist/features/execution/react/components/ExecutionTab.js +9 -4
- package/dist/features/execution/react/components/ExecutionTab.js.map +1 -1
- package/dist/features/execution/react/components/LocalCliAgentCard.d.ts +4 -1
- package/dist/features/execution/react/components/LocalCliAgentCard.d.ts.map +1 -1
- package/dist/features/execution/react/components/LocalCliAgentCard.js +24 -28
- package/dist/features/execution/react/components/LocalCliAgentCard.js.map +1 -1
- package/dist/features/execution/react/components/LocalCliAgentList.d.ts +4 -1
- package/dist/features/execution/react/components/LocalCliAgentList.d.ts.map +1 -1
- package/dist/features/execution/react/components/LocalCliAgentList.js +4 -2
- package/dist/features/execution/react/components/LocalCliAgentList.js.map +1 -1
- package/dist/features/execution/react/components/ProviderChipGroup.d.ts +4 -1
- package/dist/features/execution/react/components/ProviderChipGroup.d.ts.map +1 -1
- package/dist/features/execution/react/components/ProviderChipGroup.js +7 -3
- package/dist/features/execution/react/components/ProviderChipGroup.js.map +1 -1
- package/dist/features/execution/react/components/SearchableModelSelect.d.ts +4 -1
- package/dist/features/execution/react/components/SearchableModelSelect.d.ts.map +1 -1
- package/dist/features/execution/react/components/SearchableModelSelect.js +3 -2
- package/dist/features/execution/react/components/SearchableModelSelect.js.map +1 -1
- package/dist/features/execution/react/hooks/useReasoningControl.d.ts +87 -0
- package/dist/features/execution/react/hooks/useReasoningControl.d.ts.map +1 -0
- package/dist/features/execution/react/hooks/useReasoningControl.js +149 -0
- package/dist/features/execution/react/hooks/useReasoningControl.js.map +1 -0
- package/dist/features/execution/rules.d.ts +87 -1
- package/dist/features/execution/rules.d.ts.map +1 -1
- package/dist/features/execution/rules.js +210 -1
- package/dist/features/execution/rules.js.map +1 -1
- package/dist/features/execution/types.d.ts +96 -0
- package/dist/features/execution/types.d.ts.map +1 -1
- package/dist/features/html-editor/react/components/InteractiveHtmlEditor.d.ts +1 -1
- package/dist/features/html-editor/react/hooks/useInteractiveHtmlEditor.js +1 -1
- package/dist/features/i18n/dictionaries/index.d.ts +1 -1
- package/dist/features/instructions/react/components/InstructionsTab.d.ts +3 -1
- package/dist/features/instructions/react/components/InstructionsTab.d.ts.map +1 -1
- package/dist/features/instructions/react/components/InstructionsTab.js +3 -2
- package/dist/features/instructions/react/components/InstructionsTab.js.map +1 -1
- package/dist/features/integrations/react/components/ClientPicker.d.ts +4 -1
- package/dist/features/integrations/react/components/ClientPicker.d.ts.map +1 -1
- package/dist/features/integrations/react/components/ClientPicker.js +7 -3
- package/dist/features/integrations/react/components/ClientPicker.js.map +1 -1
- package/dist/features/integrations/react/components/CodexInstallToggleButton.d.ts +3 -1
- package/dist/features/integrations/react/components/CodexInstallToggleButton.d.ts.map +1 -1
- package/dist/features/integrations/react/components/CodexInstallToggleButton.js +3 -2
- package/dist/features/integrations/react/components/CodexInstallToggleButton.js.map +1 -1
- package/dist/features/integrations/react/components/IntegrationsTab.d.ts +6 -1
- package/dist/features/integrations/react/components/IntegrationsTab.d.ts.map +1 -1
- package/dist/features/integrations/react/components/IntegrationsTab.js +4 -3
- package/dist/features/integrations/react/components/IntegrationsTab.js.map +1 -1
- package/dist/features/language/react/components/LanguageTab.d.ts +4 -1
- package/dist/features/language/react/components/LanguageTab.d.ts.map +1 -1
- package/dist/features/language/react/components/LanguageTab.js +5 -3
- package/dist/features/language/react/components/LanguageTab.js.map +1 -1
- package/dist/features/mcp-ui/sandbox-proxy.d.ts +42 -1
- package/dist/features/mcp-ui/sandbox-proxy.d.ts.map +1 -1
- package/dist/features/mcp-ui/sandbox-proxy.js +89 -1
- package/dist/features/mcp-ui/sandbox-proxy.js.map +1 -1
- package/dist/features/mcp-ui/surfaces/outcome.d.ts +1 -1
- package/dist/features/mcp-ui/surfaces/tokens.d.ts +6 -5
- package/dist/features/mcp-ui/surfaces/tokens.d.ts.map +1 -1
- package/dist/features/mcp-ui/surfaces/tokens.js +6 -5
- package/dist/features/mcp-ui/surfaces/tokens.js.map +1 -1
- package/dist/features/media-providers/react/components/MediaProvidersTab.d.ts +4 -1
- package/dist/features/media-providers/react/components/MediaProvidersTab.d.ts.map +1 -1
- package/dist/features/media-providers/react/components/MediaProvidersTab.js +14 -4
- package/dist/features/media-providers/react/components/MediaProvidersTab.js.map +1 -1
- package/dist/features/memory/react/components/MemoryEntryCard.d.ts +3 -1
- package/dist/features/memory/react/components/MemoryEntryCard.d.ts.map +1 -1
- package/dist/features/memory/react/components/MemoryEntryCard.js +3 -2
- package/dist/features/memory/react/components/MemoryEntryCard.js.map +1 -1
- package/dist/features/memory/react/components/MemoryExtractionCard.d.ts +3 -1
- package/dist/features/memory/react/components/MemoryExtractionCard.d.ts.map +1 -1
- package/dist/features/memory/react/components/MemoryExtractionCard.js +3 -2
- package/dist/features/memory/react/components/MemoryExtractionCard.js.map +1 -1
- package/dist/features/memory/react/components/MemoryHooksPanel.d.ts +3 -1
- package/dist/features/memory/react/components/MemoryHooksPanel.d.ts.map +1 -1
- package/dist/features/memory/react/components/MemoryHooksPanel.js +7 -2
- package/dist/features/memory/react/components/MemoryHooksPanel.js.map +1 -1
- package/dist/features/memory/react/components/MemoryHowPanel.d.ts +3 -1
- package/dist/features/memory/react/components/MemoryHowPanel.d.ts.map +1 -1
- package/dist/features/memory/react/components/MemoryHowPanel.js +2 -2
- package/dist/features/memory/react/components/MemoryHowPanel.js.map +1 -1
- package/dist/features/memory/react/components/MemoryList.d.ts +3 -1
- package/dist/features/memory/react/components/MemoryList.d.ts.map +1 -1
- package/dist/features/memory/react/components/MemoryList.js +12 -5
- package/dist/features/memory/react/components/MemoryList.js.map +1 -1
- package/dist/features/memory/react/components/MemorySettingsPanel.d.ts +7 -1
- package/dist/features/memory/react/components/MemorySettingsPanel.d.ts.map +1 -1
- package/dist/features/memory/react/components/MemorySettingsPanel.js +3 -2
- package/dist/features/memory/react/components/MemorySettingsPanel.js.map +1 -1
- package/dist/features/notifications/react/components/NotificationsTab.d.ts +3 -1
- package/dist/features/notifications/react/components/NotificationsTab.d.ts.map +1 -1
- package/dist/features/notifications/react/components/NotificationsTab.js +13 -6
- package/dist/features/notifications/react/components/NotificationsTab.js.map +1 -1
- package/dist/features/privacy/react/components/PrivacyTab.d.ts +9 -1
- package/dist/features/privacy/react/components/PrivacyTab.d.ts.map +1 -1
- package/dist/features/privacy/react/components/PrivacyTab.js +5 -4
- package/dist/features/privacy/react/components/PrivacyTab.js.map +1 -1
- package/dist/features/settings/dialog/react/components/SettingsDialogShell.d.ts +1 -1
- package/dist/features/settings/dialog/styles/settings-dialog.css +54 -0
- package/dist/features/skills/react/components/SkillDraftForm.d.ts +3 -1
- package/dist/features/skills/react/components/SkillDraftForm.d.ts.map +1 -1
- package/dist/features/skills/react/components/SkillDraftForm.js +3 -2
- package/dist/features/skills/react/components/SkillDraftForm.js.map +1 -1
- package/dist/features/skills/react/components/SkillRow.d.ts +3 -1
- package/dist/features/skills/react/components/SkillRow.d.ts.map +1 -1
- package/dist/features/skills/react/components/SkillRow.js +3 -2
- package/dist/features/skills/react/components/SkillRow.js.map +1 -1
- package/dist/features/skills/react/components/SkillsTab.d.ts +8 -1
- package/dist/features/skills/react/components/SkillsTab.d.ts.map +1 -1
- package/dist/features/skills/react/components/SkillsTab.js +7 -3
- package/dist/features/skills/react/components/SkillsTab.js.map +1 -1
- 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/tabbed-dialog/types.d.ts +2 -2
- package/dist/features/tabbed-dialog/types.js +2 -2
- package/dist/react/components/RemixIcon.d.ts +42 -1
- package/dist/react/components/RemixIcon.d.ts.map +1 -1
- package/dist/react/components/RemixIcon.js +152 -8
- package/dist/react/components/RemixIcon.js.map +1 -1
- package/dist/utils/file-transfer.d.ts.map +1 -1
- package/dist/utils/file-transfer.js +2 -0
- package/dist/utils/file-transfer.js.map +1 -1
- package/package.json +3 -3
|
@@ -47,10 +47,43 @@ export interface ProviderPreset {
|
|
|
47
47
|
requiresApiKey?: boolean;
|
|
48
48
|
/** Optional "Get key" deep link rendered beside the API-key field. */
|
|
49
49
|
apiKeyConsoleUrl?: string;
|
|
50
|
+
/**
|
|
51
|
+
* The literal prefix that positively identifies a pasted key as belonging to THIS provider —
|
|
52
|
+
* `'AIza'` for Google, `'sk-ant-'` for Anthropic. Omit it for a vendor whose keys carry no
|
|
53
|
+
* distinguishing prefix (Azure OpenAI's are bare hex) rather than inventing one.
|
|
54
|
+
*
|
|
55
|
+
* Read in exactly one direction: to recognise a key as SOMEONE ELSE'S. It is deliberately NOT an
|
|
56
|
+
* allowlist, and no code may ask "does the selected preset's key match this?" as a validity test.
|
|
57
|
+
* That is the shape this field replaced, and it shipped a false positive within hours of landing:
|
|
58
|
+
* a real Google Gemini key in a newer shape than `/^AIza/` was reported to its owner as not
|
|
59
|
+
* looking like a Google key. Vendors add key formats without telling anyone, so a catalog can
|
|
60
|
+
* prove a string belongs to vendor X, but never that it belongs to nobody. See
|
|
61
|
+
* `apiKeyFormatWarning`.
|
|
62
|
+
*
|
|
63
|
+
* Data rather than an `if (providerId === …)` chain in the rule, so adding a provider stays a row
|
|
64
|
+
* in the preset catalog — including for a host that supplies its own `presets` and never touches
|
|
65
|
+
* this package.
|
|
66
|
+
*/
|
|
67
|
+
apiKeyPrefix?: string;
|
|
50
68
|
/** The synthetic "Custom" preset. Exactly one may carry this flag; it is
|
|
51
69
|
* never treated as configured-by-preset and never hides the Base URL. */
|
|
52
70
|
custom?: boolean;
|
|
53
71
|
}
|
|
72
|
+
/**
|
|
73
|
+
* One advisory remark about the API key currently typed into the form, ready to translate.
|
|
74
|
+
*
|
|
75
|
+
* `message` is plain English AND its own i18n key (this package's convention — see
|
|
76
|
+
* `DEFAULT_AGENT_DESCRIPTIONS`), and `vars` fills its `{name}` placeholders. Kept split rather than
|
|
77
|
+
* pre-composed because the vendor names are runtime values from the catalog: a pre-composed
|
|
78
|
+
* sentence would be a key no dictionary can contain, and would also freeze English word order for
|
|
79
|
+
* every locale.
|
|
80
|
+
*
|
|
81
|
+
* Advisory by construction — a message, not a validity verdict. See {@link ProviderPreset.apiKeyPrefix}.
|
|
82
|
+
*/
|
|
83
|
+
export interface ApiKeyWarning {
|
|
84
|
+
message: string;
|
|
85
|
+
vars: Readonly<Record<string, string>>;
|
|
86
|
+
}
|
|
54
87
|
/** One provider's saved credential draft — everything `ByokConfig` carries at
|
|
55
88
|
* the top level, minus the selection fields (`protocol`/`providerId`), which
|
|
56
89
|
* only make sense for the *active* selection. */
|
|
@@ -105,6 +138,20 @@ export interface ExecutionConfig {
|
|
|
105
138
|
export interface AgentModelOption {
|
|
106
139
|
id: string;
|
|
107
140
|
label: string;
|
|
141
|
+
/**
|
|
142
|
+
* The reasoning-effort levels THIS model supports, when the runtime's own catalog reports them
|
|
143
|
+
* per model rather than uniformly across the agent. Mirrors `@jini-ai/agent-runtime`'s
|
|
144
|
+
* `RuntimeModelOption.reasoning` field-for-field, for the same reason every other field on this
|
|
145
|
+
* interface does (see this file's header doc) — Codex's `debug models` catalog reports it, and the
|
|
146
|
+
* levels genuinely differ between models on the same CLI.
|
|
147
|
+
*
|
|
148
|
+
* `undefined` means "nothing model-specific to say" and is read as agent-wide by
|
|
149
|
+
* `useReasoningControl`'s narrowing rule — it falls back to `DetectedAgent.reasoningOptions`'s
|
|
150
|
+
* union, the same list every model showed before this field existed. It is NOT a synonym for "zero
|
|
151
|
+
* levels". An explicit `[]` means the catalog said so outright, and is honored as-is even though it
|
|
152
|
+
* hides the effort control for that model.
|
|
153
|
+
*/
|
|
154
|
+
reasoning?: readonly AgentModelOption[] | undefined;
|
|
108
155
|
}
|
|
109
156
|
/** Where an agent's model list came from. `'live'` was pulled from the CLI
|
|
110
157
|
* itself (its config or a catalog call); `'fallback'` is the adapter's
|
|
@@ -154,6 +201,28 @@ export interface DetectedAgent {
|
|
|
154
201
|
* choice IS a model-catalog entry, just from a different picker. Absent or
|
|
155
202
|
* empty means the agent has no reasoning axis to configure. */
|
|
156
203
|
reasoningOptions?: readonly AgentModelOption[] | undefined;
|
|
204
|
+
/**
|
|
205
|
+
* Declares that this agent's CLI carries its reasoning-effort choice INSIDE
|
|
206
|
+
* the model id — as a trailing `-<level>` on the slug — instead of in a flag
|
|
207
|
+
* of its own, and names which trailing tokens count as levels.
|
|
208
|
+
*
|
|
209
|
+
* Mirrors `@jini-ai/agent-runtime`'s `RuntimeReasoningInModelId` field-for-
|
|
210
|
+
* field, the same way `reasoningOptions` above mirrors its
|
|
211
|
+
* `RuntimeReasoningOption[]`, and for the same reason (see this interface's
|
|
212
|
+
* own doc). Present INSTEAD of `reasoningOptions`, never alongside it: a card
|
|
213
|
+
* carrying both would render two effort controls that disagree about where
|
|
214
|
+
* the choice goes.
|
|
215
|
+
*
|
|
216
|
+
* Only the vocabulary is declared. Which of these levels a given base model
|
|
217
|
+
* actually has is DERIVED from `models` by `reasoningModelGroups`
|
|
218
|
+
* (`rules.ts`) — availability is genuinely not uniform (antigravity's
|
|
219
|
+
* `gemini-3.1-pro` has only high and low, `gpt-oss-120b` only medium,
|
|
220
|
+
* `claude-sonnet-4-6` none), so a fixed high/medium/low control would offer
|
|
221
|
+
* slugs the CLI rejects outright.
|
|
222
|
+
*/
|
|
223
|
+
reasoningInModelId?: {
|
|
224
|
+
levels: readonly AgentModelOption[];
|
|
225
|
+
} | undefined;
|
|
157
226
|
/** See `AgentSupportsCustomModel`. `undefined` allows custom input,
|
|
158
227
|
* matching every adapter's default before this field existed. */
|
|
159
228
|
supportsCustomModel?: AgentSupportsCustomModel | undefined;
|
|
@@ -376,6 +445,33 @@ export interface AgentExecutableRepair {
|
|
|
376
445
|
detectedPath: string;
|
|
377
446
|
canUseDetected: boolean;
|
|
378
447
|
}
|
|
448
|
+
/**
|
|
449
|
+
* One base model of a `DetectedAgent.reasoningInModelId` agent, together with the effort levels
|
|
450
|
+
* that model ACTUALLY has — derived from the agent's own model list by `reasoningModelGroups`
|
|
451
|
+
* (`rules.ts`), never declared.
|
|
452
|
+
*
|
|
453
|
+
* This is the shape the card renders its two controls from: the base picker lists one entry per
|
|
454
|
+
* group, and the effort picker lists exactly `levels` for whichever group is active. That is what
|
|
455
|
+
* keeps it from offering a slug the CLI would reject — `gemini-3.1-pro` genuinely has no `-medium`
|
|
456
|
+
* variant, so `levels` genuinely has no `medium` entry.
|
|
457
|
+
*/
|
|
458
|
+
export interface ReasoningModelGroup {
|
|
459
|
+
/** The model id with any recognized effort suffix removed (`gemini-3.1-pro`). */
|
|
460
|
+
baseId: string;
|
|
461
|
+
/** Display name for the base. The effort qualifier is stripped from the source label only when
|
|
462
|
+
* the id it came from carried a real suffix — so `Gemini 3.1 Pro (High)` becomes `Gemini 3.1
|
|
463
|
+
* Pro`, while `Claude Sonnet 4.6 (Thinking)` (a suffix-less id) keeps its parenthetical. */
|
|
464
|
+
label: string;
|
|
465
|
+
/** The effort levels this base really offers, in the declared vocabulary's order. Empty for a
|
|
466
|
+
* base the catalog lists without any suffixed variant. */
|
|
467
|
+
levels: readonly AgentModelOption[];
|
|
468
|
+
/** Full model id per level in `levels` — the recombination table, so composing a slug is a
|
|
469
|
+
* lookup of something the catalog actually contained rather than string concatenation. */
|
|
470
|
+
modelIdByLevel: Readonly<Record<string, string>>;
|
|
471
|
+
/** The suffix-less id, when the catalog lists the base on its own (`claude-sonnet-4-6`,
|
|
472
|
+
* `default`). Absent for a base that only ever appears with a suffix. */
|
|
473
|
+
bareModelId?: string | undefined;
|
|
474
|
+
}
|
|
379
475
|
/** Result of a local-CLI rescan, surfaced as an inline status line. */
|
|
380
476
|
export type AgentScanState = {
|
|
381
477
|
status: 'idle';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/features/execution/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH;;;mEAGmE;AACnE,MAAM,MAAM,aAAa,GAAG,WAAW,GAAG,MAAM,CAAC;AAEjD;kFACkF;AAClF,MAAM,MAAM,WAAW,GAAG,WAAW,GAAG,QAAQ,GAAG,OAAO,GAAG,QAAQ,CAAC;AAEtE;;6CAE6C;AAC7C,MAAM,MAAM,kBAAkB,GAAG,UAAU,GAAG,SAAS,CAAC;AAExD;;6EAE6E;AAC7E,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,WAAW,CAAC;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB;iFAC6E;IAC7E,eAAe,EAAE,SAAS,MAAM,EAAE,CAAC;IACnC,IAAI,CAAC,EAAE,kBAAkB,CAAC;IAC1B;0FACsF;IACtF,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;yEACqE;IACrE,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,sEAAsE;IACtE,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;8EAC0E;IAC1E,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED;;kDAEkD;AAClD,MAAM,WAAW,uBAAuB;IACtC,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IA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AAc,GACtB;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE,GAClB;IAAE,MAAM,EAAE,UAAU,CAAA;CAAE,GACtB;IAAE,MAAM,EAAE,IAAI,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GAC/B;IAAE,MAAM,EAAE,OAAO,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC;AAEzC;;;;;;;kCAOkC;AAClC,MAAM,MAAM,mBAAmB,GAC3B;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE,GAClB;IAAE,MAAM,EAAE,SAAS,CAAA;CAAE,GACrB;IAAE,MAAM,EAAE,IAAI,CAAC;IAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAA;CAAE,GAC3C;IAAE,MAAM,EAAE,OAAO,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC"}
|
|
@@ -33,7 +33,7 @@ import type { CanvasStyling } from '../../canvas-style.js';
|
|
|
33
33
|
* `describeEmbedPlaceholder` is the same idea for a second, independent concern: recognizing an
|
|
34
34
|
* unresolved embed marker and labeling it for `../../canvas-embed-placeholders.ts`'s explicit
|
|
35
35
|
* placeholder card. See `@jini-ai/admin/react`'s `InteractiveHtmlEditor` for a worked example of both:
|
|
36
|
-
* it composes this primitive with a predicate recognizing
|
|
36
|
+
* it composes this primitive with a predicate recognizing the host product's legacy `data-embed-type` convention
|
|
37
37
|
* for the first, and a describer recognizing the current `data-embed-config` convention for the
|
|
38
38
|
* second.
|
|
39
39
|
*
|
|
@@ -19,7 +19,7 @@ import { prettifyCss } from '../../css.js';
|
|
|
19
19
|
* cursor or require diffing GrapesJS's tree against a string to detect "did this change come from us",
|
|
20
20
|
* which is real complexity this component's text-editing-only scope does not need. A host that needs a
|
|
21
21
|
* fresh document only mounts this component while it's active and remounts with fresh `html` — see
|
|
22
|
-
* `@jini-ai/admin/react`'s `InteractiveHtmlEditor` adapter and its caller in
|
|
22
|
+
* `@jini-ai/admin/react`'s `InteractiveHtmlEditor` adapter and its caller in the host product's `PageEditor.tsx`.
|
|
23
23
|
*
|
|
24
24
|
* **This module has zero knowledge of what "protected" means.** It only knows how to register a
|
|
25
25
|
* locked GrapesJS component type for whatever `isProtectedElement` predicate its caller supplies —
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* translation.
|
|
5
5
|
*
|
|
6
6
|
* This is a SEPARATE i18n system from any Jini-consuming host's own
|
|
7
|
-
* dictionaries (e.g.
|
|
7
|
+
* dictionaries (e.g. a host product's `apps/admin/src/lib/i18n-common.ts` +
|
|
8
8
|
* `apps/admin/src/lib/dictionary-translator.ts` + one `*-i18n.ts` file per
|
|
9
9
|
* admin feature) -- deliberately so, since this package is meant to be
|
|
10
10
|
* reusable across hosts and a host's own product copy has no reason to ship
|
|
@@ -14,6 +14,8 @@ export interface InstructionsTabProps {
|
|
|
14
14
|
placeholder?: string;
|
|
15
15
|
rows?: number;
|
|
16
16
|
maxLength?: number;
|
|
17
|
+
/** This tab's own agent handle — see other tabs' `agentHandle` doc for the split. */
|
|
18
|
+
agentHandle?: string;
|
|
17
19
|
}
|
|
18
20
|
/**
|
|
19
21
|
* A plain textarea bound to a free-text "custom instructions" string.
|
|
@@ -21,5 +23,5 @@ export interface InstructionsTabProps {
|
|
|
21
23
|
* GENERIC, the simplest tab in the whole sweep (no state beyond the bound
|
|
22
24
|
* value, no branching, no side effects).
|
|
23
25
|
*/
|
|
24
|
-
export declare function InstructionsTab({ value, onChange, title, description, placeholder, rows, maxLength, }: InstructionsTabProps): import("react").JSX.Element;
|
|
26
|
+
export declare function InstructionsTab({ value, onChange, title, description, placeholder, rows, maxLength, agentHandle, }: InstructionsTabProps): import("react").JSX.Element;
|
|
25
27
|
//# sourceMappingURL=InstructionsTab.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InstructionsTab.d.ts","sourceRoot":"","sources":["../../../../../src/features/instructions/react/components/InstructionsTab.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"InstructionsTab.d.ts","sourceRoot":"","sources":["../../../../../src/features/instructions/react/components/InstructionsTab.tsx"],"names":[],"mappings":"AAGA,MAAM,WAAW,oBAAoB;IACnC,KAAK,EAAE,MAAM,CAAC;IACd;;;;;;;OAOG;IACH,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,KAAK,IAAI,CAAC;IAC9C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,qFAAqF;IACrF,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,EAC9B,KAAK,EACL,QAAQ,EACR,KAAK,EACL,WAAW,EACX,WAAW,EACX,IAAQ,EACR,SAAgB,EAChB,WAAW,GACZ,EAAE,oBAAoB,+BA6BtB"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { agentHandleProps } from '@jini-ai/agentic';
|
|
2
3
|
import { useT } from '../../../i18n/index.js';
|
|
3
4
|
/**
|
|
4
5
|
* A plain textarea bound to a free-text "custom instructions" string.
|
|
@@ -6,11 +7,11 @@ import { useT } from '../../../i18n/index.js';
|
|
|
6
7
|
* GENERIC, the simplest tab in the whole sweep (no state beyond the bound
|
|
7
8
|
* value, no branching, no side effects).
|
|
8
9
|
*/
|
|
9
|
-
export function InstructionsTab({ value, onChange, title, description, placeholder, rows = 5, maxLength = 5000, }) {
|
|
10
|
+
export function InstructionsTab({ value, onChange, title, description, placeholder, rows = 5, maxLength = 5000, agentHandle, }) {
|
|
10
11
|
const t = useT();
|
|
11
12
|
const resolvedTitle = title ?? t('Custom instructions');
|
|
12
13
|
const resolvedDescription = description ?? t('Extra instructions applied to every conversation, in addition to any per-project instructions.');
|
|
13
14
|
const resolvedPlaceholder = placeholder ?? t('e.g. Always respond concisely and avoid unnecessary caveats.');
|
|
14
|
-
return (_jsx("section", { className: "jini-settings-section jini-settings-section-card jini-instructions-section", children: _jsxs("div", { className: "jini-field-block jini-instructions-card", children: [_jsx("div", { className: "jini-block-head", children: _jsxs("div", { children: [_jsx("h4", { children: resolvedTitle }), _jsx("p", { className: "jini-hint", children: resolvedDescription })] }) }), _jsx("textarea", { className: "jini-custom-instructions-input jini-instructions-input", rows: rows, maxLength: maxLength, placeholder: resolvedPlaceholder, "aria-label": resolvedTitle, value: value, onChange: (event) => onChange(event.target.value || undefined) })] }) }));
|
|
15
|
+
return (_jsx("section", { className: "jini-settings-section jini-settings-section-card jini-instructions-section", children: _jsxs("div", { className: "jini-field-block jini-instructions-card", children: [_jsx("div", { className: "jini-block-head", children: _jsxs("div", { children: [_jsx("h4", { children: resolvedTitle }), _jsx("p", { className: "jini-hint", children: resolvedDescription })] }) }), _jsx("textarea", { className: "jini-custom-instructions-input jini-instructions-input", rows: rows, maxLength: maxLength, placeholder: resolvedPlaceholder, "aria-label": resolvedTitle, value: value, onChange: (event) => onChange(event.target.value || undefined), ...agentHandleProps(agentHandle, { role: 'field', label: resolvedTitle }) })] }) }));
|
|
15
16
|
}
|
|
16
17
|
//# sourceMappingURL=InstructionsTab.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InstructionsTab.js","sourceRoot":"","sources":["../../../../../src/features/instructions/react/components/InstructionsTab.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"InstructionsTab.js","sourceRoot":"","sources":["../../../../../src/features/instructions/react/components/InstructionsTab.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAsB9C;;;;;GAKG;AACH,MAAM,UAAU,eAAe,CAAC,EAC9B,KAAK,EACL,QAAQ,EACR,KAAK,EACL,WAAW,EACX,WAAW,EACX,IAAI,GAAG,CAAC,EACR,SAAS,GAAG,IAAI,EAChB,WAAW,GACU;IACrB,MAAM,CAAC,GAAG,IAAI,EAAE,CAAC;IACjB,MAAM,aAAa,GAAG,KAAK,IAAI,CAAC,CAAC,qBAAqB,CAAC,CAAC;IACxD,MAAM,mBAAmB,GACvB,WAAW,IAAI,CAAC,CAAC,gGAAgG,CAAC,CAAC;IACrH,MAAM,mBAAmB,GAAG,WAAW,IAAI,CAAC,CAAC,8DAA8D,CAAC,CAAC;IAE7G,OAAO,CACL,kBAAS,SAAS,EAAC,4EAA4E,YAC7F,eAAK,SAAS,EAAC,yCAAyC,aACtD,cAAK,SAAS,EAAC,iBAAiB,YAC9B,0BACE,uBAAK,aAAa,GAAM,EACxB,YAAG,SAAS,EAAC,WAAW,YAAE,mBAAmB,GAAK,IAC9C,GACF,EACN,mBACE,SAAS,EAAC,wDAAwD,EAClE,IAAI,EAAE,IAAI,EACV,SAAS,EAAE,SAAS,EACpB,WAAW,EAAE,mBAAmB,gBACpB,aAAa,EACzB,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,IAAI,SAAS,CAAC,KAC1D,gBAAgB,CAAC,WAAW,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,CAAC,GAC1E,IACE,GACE,CACX,CAAC;AACJ,CAAC"}
|
|
@@ -18,10 +18,13 @@ export interface ClientPickerProps {
|
|
|
18
18
|
* original's blank-until-loaded gate.
|
|
19
19
|
*/
|
|
20
20
|
methodLabels?: Readonly<Partial<Record<McpClientId, string>>> | undefined;
|
|
21
|
+
/** This picker's own agent handle. The trigger button and each dropdown option get their own
|
|
22
|
+
* derived sub-handle — see `IntegrationsTab`'s `agentHandle` doc. */
|
|
23
|
+
agentHandle?: string;
|
|
21
24
|
}
|
|
22
25
|
/**
|
|
23
26
|
* Dropdown client picker. Origin: the `ds-picker` markup inline in
|
|
24
27
|
* `IntegrationsSection` — closes on outside click or Escape.
|
|
25
28
|
*/
|
|
26
|
-
export declare function ClientPicker({ clients, selectedClientId, onSelect, methodLabel, methodLabels }: ClientPickerProps): import("react").JSX.Element;
|
|
29
|
+
export declare function ClientPicker({ clients, selectedClientId, onSelect, methodLabel, methodLabels, agentHandle }: ClientPickerProps): import("react").JSX.Element;
|
|
27
30
|
//# sourceMappingURL=ClientPicker.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ClientPicker.d.ts","sourceRoot":"","sources":["../../../../../src/features/integrations/react/components/ClientPicker.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ClientPicker.d.ts","sourceRoot":"","sources":["../../../../../src/features/integrations/react/components/ClientPicker.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,mBAAmB,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAEvE,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,SAAS,mBAAmB,EAAE,CAAC;IACxC,gBAAgB,EAAE,WAAW,CAAC;IAC9B,QAAQ,EAAE,CAAC,QAAQ,EAAE,WAAW,KAAK,IAAI,CAAC;IAC1C;;4CAEwC;IACxC,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACjC;;;;;;;;;OASG;IACH,YAAY,CAAC,EAAE,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC;IAC1E;0EACsE;IACtE,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,EAAE,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,WAAW,EAAE,YAAY,EAAE,WAAW,EAAE,EAAE,iBAAiB,+BAgE9H"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useRef, useState } from 'react';
|
|
3
|
+
import { agentHandleProps, agentSubHandle, buildAgentListHandles } from '@jini-ai/agentic';
|
|
3
4
|
import { useT } from '../../../i18n/index.js';
|
|
4
5
|
import { Icon } from '../../../../react/components/Icon.js';
|
|
5
6
|
import { useDismissOnOutsideOrEscape } from '../../../../browser/useDismissOnOutsideOrEscape.js';
|
|
@@ -7,11 +8,14 @@ import { useDismissOnOutsideOrEscape } from '../../../../browser/useDismissOnOut
|
|
|
7
8
|
* Dropdown client picker. Origin: the `ds-picker` markup inline in
|
|
8
9
|
* `IntegrationsSection` — closes on outside click or Escape.
|
|
9
10
|
*/
|
|
10
|
-
export function ClientPicker({ clients, selectedClientId, onSelect, methodLabel, methodLabels }) {
|
|
11
|
+
export function ClientPicker({ clients, selectedClientId, onSelect, methodLabel, methodLabels, agentHandle }) {
|
|
11
12
|
const t = useT();
|
|
12
13
|
const [open, setOpen] = useState(false);
|
|
13
14
|
const rootRef = useRef(null);
|
|
14
15
|
const selected = clients.find((c) => c.id === selectedClientId) ?? clients[0];
|
|
16
|
+
const optionHandles = agentHandle
|
|
17
|
+
? buildAgentListHandles(agentSubHandle(agentHandle, 'option'), clients.map((c) => c.id))
|
|
18
|
+
: undefined;
|
|
15
19
|
// Close on outside click or Escape — routed through the shared
|
|
16
20
|
// `useDismissOnOutsideOrEscape` toolbox hook (packages/ui/src/browser/)
|
|
17
21
|
// instead of a hand-rolled listener pair; the origin used `mousedown`,
|
|
@@ -20,12 +24,12 @@ export function ClientPicker({ clients, selectedClientId, onSelect, methodLabel,
|
|
|
20
24
|
// behaviorally-equivalent upgrade for this same dismiss-on-outside-click
|
|
21
25
|
// pattern.
|
|
22
26
|
useDismissOnOutsideOrEscape(() => setOpen(false), { enabled: open, containerRef: rootRef });
|
|
23
|
-
return (_jsxs("div", { className: "jini-picker", ref: rootRef, children: [_jsxs("button", { type: "button", className: `jini-picker-trigger${open ? ' open' : ''}`, onClick: () => setOpen((v) => !v), "aria-haspopup": "listbox", "aria-expanded": open, children: [_jsxs("span", { className: "jini-picker-meta", children: [_jsx("span", { className: "jini-picker-title", children: selected ? t(selected.label) : '' }), methodLabel ? _jsx("span", { className: "jini-picker-sub", children: methodLabel }) : null] }), _jsx(Icon, { name: "chevron-down", size: 14, className: "jini-picker-chevron", style: { transform: open ? 'rotate(180deg)' : undefined } })] }), open ? (_jsx("div", { className: "jini-picker-popover", role: "listbox", children: _jsx("div", { className: "jini-picker-list", children: clients.map((client) => {
|
|
27
|
+
return (_jsxs("div", { className: "jini-picker", ref: rootRef, children: [_jsxs("button", { type: "button", className: `jini-picker-trigger${open ? ' open' : ''}`, onClick: () => setOpen((v) => !v), "aria-haspopup": "listbox", "aria-expanded": open, ...agentHandleProps(agentHandle, { action: 'trigger', role: 'button', label: selected ? t(selected.label) : t('Client') }), children: [_jsxs("span", { className: "jini-picker-meta", children: [_jsx("span", { className: "jini-picker-title", children: selected ? t(selected.label) : '' }), methodLabel ? _jsx("span", { className: "jini-picker-sub", children: methodLabel }) : null] }), _jsx(Icon, { name: "chevron-down", size: 14, className: "jini-picker-chevron", style: { transform: open ? 'rotate(180deg)' : undefined } })] }), open ? (_jsx("div", { className: "jini-picker-popover", role: "listbox", children: _jsx("div", { className: "jini-picker-list", children: clients.map((client, index) => {
|
|
24
28
|
const active = client.id === selectedClientId;
|
|
25
29
|
return (_jsxs("button", { type: "button", role: "option", "aria-selected": active, className: `jini-picker-item${active ? ' active' : ''}`, onClick: () => {
|
|
26
30
|
onSelect(client.id);
|
|
27
31
|
setOpen(false);
|
|
28
|
-
}, children: [_jsx("span", { className: "jini-picker-item-title", children: t(client.label) }), methodLabels?.[client.id] ? (_jsx("span", { className: "jini-picker-item-sub", children: methodLabels[client.id] })) : null] }, client.id));
|
|
32
|
+
}, ...agentHandleProps(optionHandles?.[index], { role: 'button', label: t(client.label) }), children: [_jsx("span", { className: "jini-picker-item-title", children: t(client.label) }), methodLabels?.[client.id] ? (_jsx("span", { className: "jini-picker-item-sub", children: methodLabels[client.id] })) : null] }, client.id));
|
|
29
33
|
}) }) })) : null] }));
|
|
30
34
|
}
|
|
31
35
|
//# sourceMappingURL=ClientPicker.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ClientPicker.js","sourceRoot":"","sources":["../../../../../src/features/integrations/react/components/ClientPicker.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACzC,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAC9C,OAAO,EAAE,IAAI,EAAE,MAAM,sCAAsC,CAAC;AAC5D,OAAO,EAAE,2BAA2B,EAAE,MAAM,oDAAoD,CAAC;
|
|
1
|
+
{"version":3,"file":"ClientPicker.js","sourceRoot":"","sources":["../../../../../src/features/integrations/react/components/ClientPicker.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACzC,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AAC3F,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAC9C,OAAO,EAAE,IAAI,EAAE,MAAM,sCAAsC,CAAC;AAC5D,OAAO,EAAE,2BAA2B,EAAE,MAAM,oDAAoD,CAAC;AA2BjG;;;GAGG;AACH,MAAM,UAAU,YAAY,CAAC,EAAE,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,WAAW,EAAE,YAAY,EAAE,WAAW,EAAqB;IAC7H,MAAM,CAAC,GAAG,IAAI,EAAE,CAAC;IACjB,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IACxC,M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CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAC3B,eAAM,SAAS,EAAC,sBAAsB,YAAE,YAAY,CAAC,MAAM,CAAC,EAAE,CAAC,GAAQ,CACxE,CAAC,CAAC,CAAC,IAAI,KAdH,MAAM,CAAC,EAAE,CAeP,CACV,CAAC;oBACJ,CAAC,CAAC,GACE,GACF,CACP,CAAC,CAAC,CAAC,IAAI,IACJ,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import type { McpIntegrationsPort } from '../../ports.js';
|
|
2
2
|
export interface CodexInstallToggleButtonProps {
|
|
3
3
|
port: Pick<McpIntegrationsPort, 'fetchCodexInstallStatus' | 'installCodexMcp' | 'uninstallCodexMcp'>;
|
|
4
|
+
/** This button's own agent handle — see `IntegrationsTab`'s `agentHandle` doc. */
|
|
5
|
+
agentHandle?: string;
|
|
4
6
|
}
|
|
5
7
|
/**
|
|
6
8
|
* One-click Codex MCP install/uninstall button. Renders nothing until the
|
|
@@ -8,5 +10,5 @@ export interface CodexInstallToggleButtonProps {
|
|
|
8
10
|
* doesn't support Codex one-click install (falls back to snippet-copy-only,
|
|
9
11
|
* same as every other client).
|
|
10
12
|
*/
|
|
11
|
-
export declare function CodexInstallToggleButton({ port }: CodexInstallToggleButtonProps): import("react").JSX.Element | null;
|
|
13
|
+
export declare function CodexInstallToggleButton({ port, agentHandle }: CodexInstallToggleButtonProps): import("react").JSX.Element | null;
|
|
12
14
|
//# sourceMappingURL=CodexInstallToggleButton.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CodexInstallToggleButton.d.ts","sourceRoot":"","sources":["../../../../../src/features/integrations/react/components/CodexInstallToggleButton.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CodexInstallToggleButton.d.ts","sourceRoot":"","sources":["../../../../../src/features/integrations/react/components/CodexInstallToggleButton.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAG1D,MAAM,WAAW,6BAA6B;IAC5C,IAAI,EAAE,IAAI,CAAC,mBAAmB,EAAE,yBAAyB,GAAG,iBAAiB,GAAG,mBAAmB,CAAC,CAAC;IACrG,kFAAkF;IAClF,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;;;;GAKG;AACH,wBAAgB,wBAAwB,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,EAAE,6BAA6B,sCAmC5F"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { agentHandleProps } from '@jini-ai/agentic';
|
|
2
3
|
import { useT } from '../../../i18n/index.js';
|
|
3
4
|
import { useCodexInstallToggle } from '../hooks/useCodexInstallToggle.js';
|
|
4
5
|
/**
|
|
@@ -7,7 +8,7 @@ import { useCodexInstallToggle } from '../hooks/useCodexInstallToggle.js';
|
|
|
7
8
|
* doesn't support Codex one-click install (falls back to snippet-copy-only,
|
|
8
9
|
* same as every other client).
|
|
9
10
|
*/
|
|
10
|
-
export function CodexInstallToggleButton({ port }) {
|
|
11
|
+
export function CodexInstallToggleButton({ port, agentHandle }) {
|
|
11
12
|
const t = useT();
|
|
12
13
|
const { available, installed, busy, error, successKind, toggle } = useCodexInstallToggle(port);
|
|
13
14
|
if (available === null)
|
|
@@ -16,6 +17,6 @@ export function CodexInstallToggleButton({ port }) {
|
|
|
16
17
|
return (_jsxs("div", { className: "jini-codex-install-row", children: [_jsx("button", { type: "button", className: "jini-button", disabled: true, children: t('One-click install') }), _jsx("span", { className: "jini-hint", children: t('Not available for this daemon.') })] }));
|
|
17
18
|
}
|
|
18
19
|
const label = installed ? t('Uninstall') : t('One-click install');
|
|
19
|
-
return (_jsxs("div", { className: "jini-codex-install-row", children: [_jsx("button", { type: "button", className: installed ? 'jini-button' : 'jini-button jini-button-primary', disabled: busy, onClick: toggle, children: busy ? t('Working…') : label }), error ? _jsx("span", { className: "jini-hint jini-hint-error", children: t('Install failed: {error}', { error }) }) : null, !error && successKind === 'installed' ? _jsx("span", { className: "jini-hint", children: t('MCP server installed.') }) : null, !error && successKind === 'uninstalled' ? _jsx("span", { className: "jini-hint", children: t('MCP server uninstalled.') }) : null] }));
|
|
20
|
+
return (_jsxs("div", { className: "jini-codex-install-row", children: [_jsx("button", { type: "button", className: installed ? 'jini-button' : 'jini-button jini-button-primary', disabled: busy, onClick: toggle, ...agentHandleProps(agentHandle, { role: 'button', label }), children: busy ? t('Working…') : label }), error ? _jsx("span", { className: "jini-hint jini-hint-error", children: t('Install failed: {error}', { error }) }) : null, !error && successKind === 'installed' ? _jsx("span", { className: "jini-hint", children: t('MCP server installed.') }) : null, !error && successKind === 'uninstalled' ? _jsx("span", { className: "jini-hint", children: t('MCP server uninstalled.') }) : null] }));
|
|
20
21
|
}
|
|
21
22
|
//# sourceMappingURL=CodexInstallToggleButton.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CodexInstallToggleButton.js","sourceRoot":"","sources":["../../../../../src/features/integrations/react/components/CodexInstallToggleButton.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAE9C,OAAO,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAC;
|
|
1
|
+
{"version":3,"file":"CodexInstallToggleButton.js","sourceRoot":"","sources":["../../../../../src/features/integrations/react/components/CodexInstallToggleButton.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAE9C,OAAO,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAC;AAQ1E;;;;;GAKG;AACH,MAAM,UAAU,wBAAwB,CAAC,EAAE,IAAI,EAAE,WAAW,EAAiC;IAC3F,MAAM,CAAC,GAAG,IAAI,EAAE,CAAC;IACjB,MAAM,E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I,EAC9G,CAAC,KAAK,IAAI,WAAW,KAAK,aAAa,CAAC,CAAC,CAAC,eAAM,SAAS,EAAC,WAAW,YAAE,CAAC,CAAC,yBAAyB,CAAC,GAAQ,CAAC,CAAC,CAAC,IAAI,IAC/G,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -13,6 +13,11 @@ export interface IntegrationsTabProps {
|
|
|
13
13
|
port?: McpIntegrationsPort;
|
|
14
14
|
capabilitiesTitle?: string;
|
|
15
15
|
capabilities?: readonly string[];
|
|
16
|
+
/**
|
|
17
|
+
* This tab's own agent handle. The client picker, the one-click install link, and the Codex
|
|
18
|
+
* install/uninstall toggle all derive their own `data-agent-*` handle from this ONE base.
|
|
19
|
+
*/
|
|
20
|
+
agentHandle?: string;
|
|
16
21
|
}
|
|
17
22
|
/**
|
|
18
23
|
* Multi-client "install me as an MCP server" snippet generator. Origin:
|
|
@@ -23,5 +28,5 @@ export interface IntegrationsTabProps {
|
|
|
23
28
|
* (`/api/mcp/install-info`, `/api/mcp/install/codex*`) is routed through the
|
|
24
29
|
* injected `McpIntegrationsPort` instead of a hardcoded `fetch()` call.
|
|
25
30
|
*/
|
|
26
|
-
export declare function IntegrationsTab({ serverName, clients, initialClientId, port, capabilitiesTitle, capabilities, }: IntegrationsTabProps): import("react").JSX.Element;
|
|
31
|
+
export declare function IntegrationsTab({ serverName, clients, initialClientId, port, capabilitiesTitle, capabilities, agentHandle, }: IntegrationsTabProps): import("react").JSX.Element;
|
|
27
32
|
//# sourceMappingURL=IntegrationsTab.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IntegrationsTab.d.ts","sourceRoot":"","sources":["../../../../../src/features/integrations/react/components/IntegrationsTab.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"IntegrationsTab.d.ts","sourceRoot":"","sources":["../../../../../src/features/integrations/react/components/IntegrationsTab.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAM1D,OAAO,KAAK,EAAE,mBAAmB,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAMvE,MAAM,WAAW,oBAAoB;IACnC;;;6CAGyC;IACzC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,SAAS,mBAAmB,EAAE,CAAC;IACzC,eAAe,CAAC,EAAE,WAAW,CAAC;IAC9B;uDACmD;IACnD,IAAI,CAAC,EAAE,mBAAmB,CAAC;IAC3B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,YAAY,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IACjC;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;;;;;;;GAQG;AACH,wBAAgB,eAAe,CAAC,EAC9B,UAAoC,EACpC,OAAqB,EACrB,eAAuC,EACvC,IAAI,EACJ,iBAAiB,EACjB,YAAY,EACZ,WAAW,GACZ,EAAE,oBAAoB,+BA0GtB"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useMemo, useState } from 'react';
|
|
3
|
+
import { agentHandleProps, agentSubHandle } from '@jini-ai/agentic';
|
|
3
4
|
import { useT } from '../../../i18n/index.js';
|
|
4
5
|
import { DEFAULT_MCP_CLIENT_ID, DEFAULT_MCP_SERVER_NAME, MCP_CLIENTS } from '../../constants.js';
|
|
5
6
|
import { createFakeMcpIntegrationsPort } from '../../dependencies.js';
|
|
@@ -17,7 +18,7 @@ import { CodexInstallToggleButton } from './CodexInstallToggleButton.js';
|
|
|
17
18
|
* (`/api/mcp/install-info`, `/api/mcp/install/codex*`) is routed through the
|
|
18
19
|
* injected `McpIntegrationsPort` instead of a hardcoded `fetch()` call.
|
|
19
20
|
*/
|
|
20
|
-
export function IntegrationsTab({ serverName = DEFAULT_MCP_SERVER_NAME, clients = MCP_CLIENTS, initialClientId = DEFAULT_MCP_CLIENT_ID, port, capabilitiesTitle, capabilities, }) {
|
|
21
|
+
export function IntegrationsTab({ serverName = DEFAULT_MCP_SERVER_NAME, clients = MCP_CLIENTS, initialClientId = DEFAULT_MCP_CLIENT_ID, port, capabilitiesTitle, capabilities, agentHandle, }) {
|
|
21
22
|
const t = useT();
|
|
22
23
|
const resolvedPort = useMemo(() => port ?? createFakeMcpIntegrationsPort(), [port]);
|
|
23
24
|
const [clientId, setClientId] = useState(initialClientId);
|
|
@@ -45,7 +46,7 @@ export function IntegrationsTab({ serverName = DEFAULT_MCP_SERVER_NAME, clients
|
|
|
45
46
|
t('Pull context into the conversation'),
|
|
46
47
|
t('Use default, safe tool permissions'),
|
|
47
48
|
];
|
|
48
|
-
return (_jsxs("section", { className: "jini-settings-section jini-settings-integrations", children: [error ? _jsx("div", { className: "jini-empty-card jini-empty-card-error", children: t('Could not reach the daemon: {error}', { error }) }) : null, _jsxs("div", { className: "jini-mcp-capabilities-card", children: [_jsx("p", { className: "jini-mcp-capabilities-label", children: resolvedCapabilitiesTitle }), _jsx("ul", { className: "jini-mcp-capabilities-list", children: resolvedCapabilities.map((line) => (_jsx("li", { children: line }, line))) })] }), _jsxs("div", { className: "jini-mcp-setup-card", children: [_jsx(ClientPicker, { clients: clients, selectedClientId: clientId, onSelect: setClientId, methodLabel: methodLabel, methodLabels: methodLabels }), resolved ? _jsx("p", { className: "jini-mcp-instruction", children: t(resolved.instructionTemplate, resolved.instructionVars) }) : null, client?.id === 'codex' ? _jsx(CodexInstallToggleButton, { port: resolvedPort }) : null, resolved?.deeplink && info ? (_jsxs("div", { className: "jini-mcp-deeplink-row", children: [_jsx("a", { className: `jini-button jini-button-primary${isMcpInstallPrerequisiteMissing(info) ? ' jini-button-disabled' : ''}`,
|
|
49
|
+
return (_jsxs("section", { className: "jini-settings-section jini-settings-integrations", children: [error ? _jsx("div", { className: "jini-empty-card jini-empty-card-error", children: t('Could not reach the daemon: {error}', { error }) }) : null, _jsxs("div", { className: "jini-mcp-capabilities-card", children: [_jsx("p", { className: "jini-mcp-capabilities-label", children: resolvedCapabilitiesTitle }), _jsx("ul", { className: "jini-mcp-capabilities-list", children: resolvedCapabilities.map((line) => (_jsx("li", { children: line }, line))) })] }), _jsxs("div", { className: "jini-mcp-setup-card", children: [_jsx(ClientPicker, { clients: clients, selectedClientId: clientId, onSelect: setClientId, methodLabel: methodLabel, methodLabels: methodLabels, ...(agentHandle ? { agentHandle: agentSubHandle(agentHandle, 'client') } : {}) }), resolved ? _jsx("p", { className: "jini-mcp-instruction", children: t(resolved.instructionTemplate, resolved.instructionVars) }) : null, client?.id === 'codex' ? (_jsx(CodexInstallToggleButton, { port: resolvedPort, ...(agentHandle ? { agentHandle: agentSubHandle(agentHandle, 'codex-toggle') } : {}) })) : null, resolved?.deeplink && info ? (_jsxs("div", { className: "jini-mcp-deeplink-row", children: [_jsx("a", { className: `jini-button jini-button-primary${isMcpInstallPrerequisiteMissing(info) ? ' jini-button-disabled' : ''}`,
|
|
49
50
|
// Origin disables this button via `disabled={!info.cliExists ||
|
|
50
51
|
// !info.nodeExists}` — one-click install can't work until the
|
|
51
52
|
// daemon/CLI prerequisite is actually built. An `<a>` has no
|
|
@@ -56,6 +57,6 @@ export function IntegrationsTab({ serverName = DEFAULT_MCP_SERVER_NAME, clients
|
|
|
56
57
|
href: isMcpInstallPrerequisiteMissing(info) ? undefined : resolved.deeplink, "aria-disabled": isMcpInstallPrerequisiteMissing(info) || undefined, onClick: (event) => {
|
|
57
58
|
if (isMcpInstallPrerequisiteMissing(info))
|
|
58
59
|
event.preventDefault();
|
|
59
|
-
}, rel: "noopener noreferrer", children: t('One-click install') }), _jsx("span", { className: "jini-hint", children: t('Your editor will ask you to approve the install.') })] })) : null, _jsx(SnippetBlock, { snippet: resolved?.snippet ?? '', language: resolved?.language ?? 'json', placeholder: loading ? t('Loading install paths…') : error ? t('Could not resolve install paths.') : '' }), info && isMcpInstallPrerequisiteMissing(info) ? (_jsxs("div", { className: "jini-empty-card jini-empty-card-warning", children: [_jsx("strong", { children: !info.cliExists ? t('Build the server first.') : t('Node.js was not found.') }), ' ', info.buildHint ?? t('See your host application for build instructions.')] })) : null, _jsxs("div", { className: "jini-mcp-restart-note", children: [_jsx("strong", { children: t('Restart your client after installing.') }), ' ', _jsx("span", { children: t('Most MCP clients only pick up new servers on restart.') })] })] })] }));
|
|
60
|
+
}, rel: "noopener noreferrer", ...agentHandleProps(agentHandle, { action: 'one-click-install', role: 'link', label: t('One-click install') }), children: t('One-click install') }), _jsx("span", { className: "jini-hint", children: t('Your editor will ask you to approve the install.') })] })) : null, _jsx(SnippetBlock, { snippet: resolved?.snippet ?? '', language: resolved?.language ?? 'json', placeholder: loading ? t('Loading install paths…') : error ? t('Could not resolve install paths.') : '' }), info && isMcpInstallPrerequisiteMissing(info) ? (_jsxs("div", { className: "jini-empty-card jini-empty-card-warning", children: [_jsx("strong", { children: !info.cliExists ? t('Build the server first.') : t('Node.js was not found.') }), ' ', info.buildHint ?? t('See your host application for build instructions.')] })) : null, _jsxs("div", { className: "jini-mcp-restart-note", children: [_jsx("strong", { children: t('Restart your client after installing.') }), ' ', _jsx("span", { children: t('Most MCP clients only pick up new servers on restart.') })] })] })] }));
|
|
60
61
|
}
|
|
61
62
|
//# sourceMappingURL=IntegrationsTab.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IntegrationsTab.js","sourceRoot":"","sources":["../../../../../src/features/integrations/react/components/IntegrationsTab.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAC9C,OAAO,EAAE,qBAAqB,EAAE,uBAAuB,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjG,OAAO,EAAE,6BAA6B,EAAE,MAAM,uBAAuB,CAAC;AAEtE,OAAO,EACL,+BAA+B,EAC/B,oBAAoB,EACpB,gBAAgB,GACjB,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;
|
|
1
|
+
{"version":3,"file":"IntegrationsTab.js","sourceRoot":"","sources":["../../../../../src/features/integrations/react/components/IntegrationsTab.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACpE,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAC9C,OAAO,EAAE,qBAAqB,EAAE,uBAAuB,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjG,OAAO,EAAE,6BAA6B,EAAE,MAAM,uBAAuB,CAAC;AAEtE,OAAO,EACL,+BAA+B,EAC/B,oBAAoB,EACpB,gBAAgB,GACjB,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AAsBzE;;;;;;;;GAQG;AACH,MAAM,UAAU,eAAe,CAAC,EAC9B,UAAU,GAAG,uBAAuB,EACpC,OAAO,GAAG,WAAW,EACrB,eAAe,GAAG,qBAAqB,EACvC,IAAI,EACJ,iBAAiB,EACjB,YAAY,EACZ,WAAW,GACU;IACrB,MAAM,CAAC,GAAG,IAAI,EAAE,CAAC;IACjB,MAAM,YAAY,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,IAAI,IAAI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I,CAAC,CAAC,CAAC,CAAC,CAC/C,eAAK,SAAS,EAAC,yCAAyC,aACtD,2BAAS,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,yBAAyB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,wBAAwB,CAAC,GAAU,EAAC,GAAG,EAClG,IAAI,CAAC,SAAS,IAAI,CAAC,CAAC,mDAAmD,CAAC,IACrE,CACP,CAAC,CAAC,CAAC,IAAI,EAER,eAAK,SAAS,EAAC,uBAAuB,aACpC,2BAAS,CAAC,CAAC,uCAAuC,CAAC,GAAU,EAAC,GAAG,EACjE,yBAAO,CAAC,CAAC,uDAAuD,CAAC,GAAQ,IACrE,IACF,IACE,CACX,CAAC;AACJ,CAAC"}
|
|
@@ -4,6 +4,9 @@ export interface LanguageTabProps {
|
|
|
4
4
|
selectedLocale: string;
|
|
5
5
|
onSelectLocale: (code: string) => void;
|
|
6
6
|
ariaLabel?: string;
|
|
7
|
+
/** This tab's own agent handle. One distinct sub-handle per locale tile, derived from the
|
|
8
|
+
* locale's own code. */
|
|
9
|
+
agentHandle?: string;
|
|
7
10
|
}
|
|
8
11
|
/**
|
|
9
12
|
* Locale radio-tile grid. Origin: the inline `language` tab body in
|
|
@@ -11,5 +14,5 @@ export interface LanguageTabProps {
|
|
|
11
14
|
* dropped) analytics tracking call and OD's own fixed locale list (now a
|
|
12
15
|
* host-supplied `locales` prop).
|
|
13
16
|
*/
|
|
14
|
-
export declare function LanguageTab({ locales, selectedLocale, onSelectLocale, ariaLabel }: LanguageTabProps): import("react").JSX.Element;
|
|
17
|
+
export declare function LanguageTab({ locales, selectedLocale, onSelectLocale, ariaLabel, agentHandle }: LanguageTabProps): import("react").JSX.Element;
|
|
15
18
|
//# sourceMappingURL=LanguageTab.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LanguageTab.d.ts","sourceRoot":"","sources":["../../../../../src/features/language/react/components/LanguageTab.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"LanguageTab.d.ts","sourceRoot":"","sources":["../../../../../src/features/language/react/components/LanguageTab.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAEnD,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,SAAS,YAAY,EAAE,CAAC;IACjC,cAAc,EAAE,MAAM,CAAC;IACvB,cAAc,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;6BACyB;IACzB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,EAAE,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,SAAS,EAAE,WAAW,EAAE,EAAE,gBAAgB,+BA+BhH"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { agentHandleProps, buildAgentListHandles } from '@jini-ai/agentic';
|
|
2
3
|
import { useT } from '../../../i18n/index.js';
|
|
3
4
|
import { Icon } from '../../../../react/components/Icon.js';
|
|
4
5
|
/**
|
|
@@ -7,12 +8,13 @@ import { Icon } from '../../../../react/components/Icon.js';
|
|
|
7
8
|
* dropped) analytics tracking call and OD's own fixed locale list (now a
|
|
8
9
|
* host-supplied `locales` prop).
|
|
9
10
|
*/
|
|
10
|
-
export function LanguageTab({ locales, selectedLocale, onSelectLocale, ariaLabel }) {
|
|
11
|
+
export function LanguageTab({ locales, selectedLocale, onSelectLocale, ariaLabel, agentHandle }) {
|
|
11
12
|
const t = useT();
|
|
12
13
|
const resolvedAriaLabel = ariaLabel ?? t('Language');
|
|
13
|
-
|
|
14
|
+
const tileHandles = agentHandle ? buildAgentListHandles(agentHandle, locales.map((l) => l.code)) : undefined;
|
|
15
|
+
return (_jsx("section", { className: "jini-settings-section jini-settings-language", children: _jsx("div", { className: "jini-settings-language-grid", role: "radiogroup", "aria-label": resolvedAriaLabel, children: locales.map(({ code, label }, index) => {
|
|
14
16
|
const active = selectedLocale === code;
|
|
15
|
-
return (_jsxs("button", { type: "button", role: "radio", "aria-checked": active, className: `jini-settings-language-tile${active ? ' active' : ''}`, onClick: () => onSelectLocale(code), children: [_jsxs("span", { className: "jini-settings-language-tile-text", children: [_jsx("span", { className: "jini-settings-language-tile-title", children: label }), _jsx("span", { className: "jini-settings-language-tile-code", children: code })] }), active ? _jsx(Icon, { name: "check", size: 16 }) : null] }, code));
|
|
17
|
+
return (_jsxs("button", { type: "button", role: "radio", "aria-checked": active, className: `jini-settings-language-tile${active ? ' active' : ''}`, onClick: () => onSelectLocale(code), ...agentHandleProps(tileHandles?.[index], { role: 'button', label }), children: [_jsxs("span", { className: "jini-settings-language-tile-text", children: [_jsx("span", { className: "jini-settings-language-tile-title", children: label }), _jsx("span", { className: "jini-settings-language-tile-code", children: code })] }), active ? _jsx(Icon, { name: "check", size: 16 }) : null] }, code));
|
|
16
18
|
}) }) }));
|
|
17
19
|
}
|
|
18
20
|
//# sourceMappingURL=LanguageTab.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LanguageTab.js","sourceRoot":"","sources":["../../../../../src/features/language/react/components/LanguageTab.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAC9C,OAAO,EAAE,IAAI,EAAE,MAAM,sCAAsC,CAAC;
|
|
1
|
+
{"version":3,"file":"LanguageTab.js","sourceRoot":"","sources":["../../../../../src/features/language/react/components/LanguageTab.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AAC3E,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAC9C,OAAO,EAAE,IAAI,EAAE,MAAM,sCAAsC,CAAC;AAa5D;;;;;GAKG;AACH,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AC,CAAC,IAAI,KAZ3C,IAAI,CAaF,CACV,CAAC;YACJ,CAAC,CAAC,GACE,GACE,CACX,CAAC;AACJ,CAAC"}
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
*
|
|
17
17
|
* This module exports the proxy's source as a **string constant** rather than a static file this
|
|
18
18
|
* package's own build copies into `dist/`, for the same reason `surfaces/document.ts` builds HTML as
|
|
19
|
-
* template strings: the natural way for a HOST APPLICATION (
|
|
19
|
+
* template strings: the natural way for a HOST APPLICATION (a downstream product's admin server, `examples/reference-web`'s
|
|
20
20
|
* dev server, any future consumer) to serve this is to mount ONE route that responds with this exact
|
|
21
21
|
* body — `res.type('html').send(SANDBOX_PROXY_HTML)` — not to vendor a copy of a file from this
|
|
22
22
|
* package's `dist/` into their own static-asset pipeline. A string a host can `fetch`/import needs no
|
|
@@ -129,4 +129,45 @@
|
|
|
129
129
|
* `surfaces/document.ts` already carry their own `SURFACE_CSP` meta tag for exactly that job.
|
|
130
130
|
*/
|
|
131
131
|
export declare const SANDBOX_PROXY_HTML = "<!doctype html>\n<html>\n<head>\n<meta charset=\"utf-8\">\n<title>MCP-UI sandbox proxy</title>\n<style>html, body { margin: 0; padding: 0; width: 100%; height: 100%; }</style>\n</head>\n<body>\n<script>\n(function () {\n \"use strict\";\n var host = window.parent;\n var hostOrigin = window.location.origin;\n if (host === window) return;\n\n function isFromHost(event) {\n return event.source === host && event.origin === hostOrigin;\n }\n\n window.addEventListener(\"message\", function (event) {\n if (!isFromHost(event)) return;\n var data = event.data;\n if (!data || typeof data !== \"object\") return;\n if (data.method !== \"ui/notifications/sandbox-resource-ready\") return;\n var html = data.params && data.params.html;\n if (typeof html !== \"string\") return;\n document.open();\n document.write(html);\n document.close();\n });\n\n host.postMessage({ method: \"ui/notifications/sandbox-proxy-ready\", params: {} }, hostOrigin);\n}());\n</script>\n</body>\n</html>";
|
|
132
|
+
/**
|
|
133
|
+
* Same script as {@link SANDBOX_PROXY_HTML}, with one load-bearing difference: `hostOrigin` is the
|
|
134
|
+
* caller-supplied `hostOrigin` argument, baked in as a literal, instead of read from
|
|
135
|
+
* `window.location.origin`. Paired with {@link buildSandboxProxyDataUrl}, this is what actually
|
|
136
|
+
* closes the "admin-origin authority" gap this module's own doc flags above — not by dropping
|
|
137
|
+
* `allow-same-origin` (verified against the installed `@mcp-ui/client@7.1.1` bundle: `AppFrame`
|
|
138
|
+
* hardcodes `sandbox="allow-scripts allow-same-origin allow-forms"` on the iframe it creates, with no
|
|
139
|
+
* prop to override it — neither this package nor a host application can refuse that flag), but by
|
|
140
|
+
* changing what "same-origin" MEANS: a `data:` URL gets a fresh, unique, OPAQUE origin under the URL
|
|
141
|
+
* Standard's own origin algorithm, a rule that holds regardless of the iframe's `sandbox` attribute
|
|
142
|
+
* (verified live against a real Chromium build, 2026-09-03: an iframe with the exact hardcoded flags
|
|
143
|
+
* above, navigated to a `data:` URL, still reports `window.location.origin === "null"` inside). Once
|
|
144
|
+
* the proxy's own document has no real origin to share with its embedder, the guest HTML this script
|
|
145
|
+
* `document.write`s into it can never reach the embedder's cookies, storage, or same-origin fetches —
|
|
146
|
+
* there is no real origin left for "same-origin" to mean.
|
|
147
|
+
*
|
|
148
|
+
* That is also why this can no longer read `window.location.origin` for the ready/resource-ready
|
|
149
|
+
* handshake's own origin check: inside an opaque-origin document that call always returns the literal
|
|
150
|
+
* string `"null"`, which would never equal the embedder's real origin and would permanently break the
|
|
151
|
+
* handshake. `hostOrigin` has to come from somewhere else — the embedder's OWN trusted value, baked in
|
|
152
|
+
* at construction time. It must never be read back from this document's own URL (query string,
|
|
153
|
+
* fragment, or otherwise): whoever can choose this document's `src` can choose that value too, which
|
|
154
|
+
* would defeat the check exactly as this module's existing doc warns for the cross-origin-hosting
|
|
155
|
+
* case.
|
|
156
|
+
*
|
|
157
|
+
* @param hostOrigin - The embedder's own real origin, computed by the embedder itself (e.g. its own
|
|
158
|
+
* `window.location.origin`) — never a value parsed out of this proxy document's own URL.
|
|
159
|
+
*/
|
|
160
|
+
export declare function buildIsolatedSandboxProxyHtml(hostOrigin: string): string;
|
|
161
|
+
/**
|
|
162
|
+
* Wraps {@link buildIsolatedSandboxProxyHtml} as a `data:` URL — the form a host passes directly as
|
|
163
|
+
* `sandbox={{ url }}` to `@mcp-ui/client`'s `AppRenderer`/`AppFrame` (this package's
|
|
164
|
+
* `McpUiHost`/`useMcpUiHost` included) in place of a same-origin HTTP route. No server route, second
|
|
165
|
+
* host, or CORS/postMessage-origin change is needed to get the isolation official MCP-UI guidance
|
|
166
|
+
* recommends — see {@link buildIsolatedSandboxProxyHtml}'s own doc for why a `data:` URL earns that
|
|
167
|
+
* isolation on its own.
|
|
168
|
+
*
|
|
169
|
+
* @param hostOrigin - Forwarded verbatim to {@link buildIsolatedSandboxProxyHtml} — see that
|
|
170
|
+
* function's own doc for the contract.
|
|
171
|
+
*/
|
|
172
|
+
export declare function buildSandboxProxyDataUrl(hostOrigin: string): string;
|
|
132
173
|
//# sourceMappingURL=sandbox-proxy.d.ts.map
|