@happyvertical/smrt-svelte 0.53.3 → 0.53.5
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/AGENTS.md +4 -1
- package/README.md +4 -1
- package/agents/i18n.md +3 -0
- package/agents/workspace.md +53 -0
- package/dist/components/app/AppShell.svelte +157 -0
- package/dist/components/app/AppShell.svelte.d.ts +58 -0
- package/dist/components/app/AppShell.svelte.d.ts.map +1 -0
- package/dist/components/app/DockSlot.svelte +20 -0
- package/dist/components/app/DockSlot.svelte.d.ts +10 -0
- package/dist/components/app/DockSlot.svelte.d.ts.map +1 -0
- package/dist/components/app/OwnerSetupForm.svelte +89 -0
- package/dist/components/app/OwnerSetupForm.svelte.d.ts +22 -0
- package/dist/components/app/OwnerSetupForm.svelte.d.ts.map +1 -0
- package/dist/components/app/RuntimeDiagnosticsWebMcp.svelte +18 -0
- package/dist/components/app/RuntimeDiagnosticsWebMcp.svelte.d.ts +10 -0
- package/dist/components/app/RuntimeDiagnosticsWebMcp.svelte.d.ts.map +1 -0
- package/dist/components/app/ShellSettingsPage.svelte +32 -0
- package/dist/components/app/ShellSettingsPage.svelte.d.ts +19 -0
- package/dist/components/app/ShellSettingsPage.svelte.d.ts.map +1 -0
- package/dist/components/app/index.d.ts +14 -0
- package/dist/components/app/index.d.ts.map +1 -0
- package/dist/components/app/index.js +12 -0
- package/dist/components/app/owner-setup-types.d.ts +14 -0
- package/dist/components/app/owner-setup-types.d.ts.map +1 -0
- package/dist/components/app/owner-setup-types.js +1 -0
- package/dist/components/app/runtime-diagnostics-webmcp.d.ts +33 -0
- package/dist/components/app/runtime-diagnostics-webmcp.d.ts.map +1 -0
- package/dist/components/app/runtime-diagnostics-webmcp.js +68 -0
- package/dist/components/workspace/README.md +3 -2
- package/dist/components/workspace/admin-shell/ActivityTicker.svelte +92 -0
- package/dist/components/workspace/admin-shell/ActivityTicker.svelte.d.ts +15 -0
- package/dist/components/workspace/admin-shell/ActivityTicker.svelte.d.ts.map +1 -0
- package/dist/components/workspace/admin-shell/AdminShell.svelte +5 -2
- package/dist/components/workspace/admin-shell/AdminShell.svelte.d.ts +4 -1
- package/dist/components/workspace/admin-shell/AdminShell.svelte.d.ts.map +1 -1
- package/dist/components/workspace/index.d.ts +1 -0
- package/dist/components/workspace/index.d.ts.map +1 -1
- package/dist/components/workspace/index.js +1 -0
- package/dist/i18n/server.d.ts +1 -0
- package/dist/i18n/server.d.ts.map +1 -1
- package/dist/i18n/server.js +1 -0
- package/dist/i18n/strings.workspace.d.ts +16 -0
- package/dist/i18n/strings.workspace.d.ts.map +1 -1
- package/dist/i18n/strings.workspace.js +17 -0
- package/dist/mcp-apps/McpAppsBridge.svelte +123 -0
- package/dist/mcp-apps/McpAppsBridge.svelte.d.ts +38 -0
- package/dist/mcp-apps/McpAppsBridge.svelte.d.ts.map +1 -0
- package/dist/mcp-apps/index.d.ts +1 -0
- package/dist/mcp-apps/index.d.ts.map +1 -1
- package/dist/mcp-apps/index.js +1 -0
- package/dist/mcp-apps/mcp-apps.svelte.d.ts.map +1 -1
- package/dist/mcp-apps/mcp-apps.svelte.js +10 -1
- package/dist/mcp-apps/strings.d.ts +7 -0
- package/dist/mcp-apps/strings.d.ts.map +1 -0
- package/dist/mcp-apps/strings.js +7 -0
- package/package.json +26 -15
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export declare const RUNTIME_DIAGNOSTICS_WEBMCP_TOOL_NAME = "smrt.runtime.diagnostics.read";
|
|
2
|
+
interface RuntimeDiagnosticsTool {
|
|
3
|
+
readonly name: string;
|
|
4
|
+
readonly description: string;
|
|
5
|
+
readonly inputSchema: Record<string, unknown>;
|
|
6
|
+
readonly annotations: {
|
|
7
|
+
readonly readOnlyHint: true;
|
|
8
|
+
readonly destructiveHint: false;
|
|
9
|
+
readonly idempotentHint: true;
|
|
10
|
+
readonly openWorldHint: false;
|
|
11
|
+
};
|
|
12
|
+
readonly execute: (args: Record<string, unknown>) => Promise<string>;
|
|
13
|
+
}
|
|
14
|
+
interface RuntimeDiagnosticsModelContext {
|
|
15
|
+
registerTool(tool: RuntimeDiagnosticsTool, options: {
|
|
16
|
+
signal: AbortSignal;
|
|
17
|
+
}): void | Promise<void>;
|
|
18
|
+
}
|
|
19
|
+
export interface RuntimeDiagnosticsWebMcpOwner {
|
|
20
|
+
readonly dispose: () => void;
|
|
21
|
+
}
|
|
22
|
+
export declare const RUNTIME_DIAGNOSTICS_ENDPOINT = "/api/_runtime/diagnostics";
|
|
23
|
+
export interface RegisterRuntimeDiagnosticsWebMcpOptions {
|
|
24
|
+
readonly fetchFn?: typeof fetch;
|
|
25
|
+
/** Same-origin diagnostics endpoint. Defaults to `/api/_runtime/diagnostics`. */
|
|
26
|
+
readonly endpoint?: string;
|
|
27
|
+
readonly modelContext?: RuntimeDiagnosticsModelContext;
|
|
28
|
+
}
|
|
29
|
+
/** Register exactly one page-user, read-only diagnostics tool for its owner. */
|
|
30
|
+
export declare function registerRuntimeDiagnosticsWebMcp(options?: RegisterRuntimeDiagnosticsWebMcpOptions): RuntimeDiagnosticsWebMcpOwner | null;
|
|
31
|
+
export declare function createRuntimeDiagnosticsWebMcpTool(fetchFn: typeof fetch, endpoint?: string): RuntimeDiagnosticsTool;
|
|
32
|
+
export {};
|
|
33
|
+
//# sourceMappingURL=runtime-diagnostics-webmcp.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runtime-diagnostics-webmcp.d.ts","sourceRoot":"","sources":["../../../src/components/app/runtime-diagnostics-webmcp.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,oCAAoC,kCAChB,CAAC;AAElC,UAAU,sBAAsB;IAC9B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC9C,QAAQ,CAAC,WAAW,EAAE;QACpB,QAAQ,CAAC,YAAY,EAAE,IAAI,CAAC;QAC5B,QAAQ,CAAC,eAAe,EAAE,KAAK,CAAC;QAChC,QAAQ,CAAC,cAAc,EAAE,IAAI,CAAC;QAC9B,QAAQ,CAAC,aAAa,EAAE,KAAK,CAAC;KAC/B,CAAC;IACF,QAAQ,CAAC,OAAO,EAAE,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;CACtE;AAED,UAAU,8BAA8B;IACtC,YAAY,CACV,IAAI,EAAE,sBAAsB,EAC5B,OAAO,EAAE;QAAE,MAAM,EAAE,WAAW,CAAA;KAAE,GAC/B,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACzB;AAED,MAAM,WAAW,6BAA6B;IAC5C,QAAQ,CAAC,OAAO,EAAE,MAAM,IAAI,CAAC;CAC9B;AAED,eAAO,MAAM,4BAA4B,8BAA8B,CAAC;AAExE,MAAM,WAAW,uCAAuC;IACtD,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,KAAK,CAAC;IAChC,iFAAiF;IACjF,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,YAAY,CAAC,EAAE,8BAA8B,CAAC;CACxD;AAED,gFAAgF;AAChF,wBAAgB,gCAAgC,CAC9C,OAAO,GAAE,uCAA4C,GACpD,6BAA6B,GAAG,IAAI,CA0BtC;AAED,wBAAgB,kCAAkC,CAChD,OAAO,EAAE,OAAO,KAAK,EACrB,QAAQ,GAAE,MAAqC,GAC9C,sBAAsB,CA2CxB"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
export const RUNTIME_DIAGNOSTICS_WEBMCP_TOOL_NAME = 'smrt.runtime.diagnostics.read';
|
|
2
|
+
export const RUNTIME_DIAGNOSTICS_ENDPOINT = '/api/_runtime/diagnostics';
|
|
3
|
+
/** Register exactly one page-user, read-only diagnostics tool for its owner. */
|
|
4
|
+
export function registerRuntimeDiagnosticsWebMcp(options = {}) {
|
|
5
|
+
const modelContext = options.modelContext ??
|
|
6
|
+
globalThis.document?.modelContext;
|
|
7
|
+
if (!modelContext || typeof modelContext.registerTool !== 'function') {
|
|
8
|
+
return null;
|
|
9
|
+
}
|
|
10
|
+
const controller = new AbortController();
|
|
11
|
+
const tool = createRuntimeDiagnosticsWebMcpTool(options.fetchFn ?? fetch, options.endpoint);
|
|
12
|
+
try {
|
|
13
|
+
const registration = modelContext.registerTool(tool, {
|
|
14
|
+
signal: controller.signal,
|
|
15
|
+
});
|
|
16
|
+
void Promise.resolve(registration).catch(() => controller.abort());
|
|
17
|
+
}
|
|
18
|
+
catch {
|
|
19
|
+
controller.abort();
|
|
20
|
+
}
|
|
21
|
+
return Object.freeze({ dispose: () => controller.abort() });
|
|
22
|
+
}
|
|
23
|
+
export function createRuntimeDiagnosticsWebMcpTool(fetchFn, endpoint = RUNTIME_DIAGNOSTICS_ENDPOINT) {
|
|
24
|
+
return Object.freeze({
|
|
25
|
+
name: RUNTIME_DIAGNOSTICS_WEBMCP_TOOL_NAME,
|
|
26
|
+
description: 'Read the authenticated, redacted application runtime diagnostics.',
|
|
27
|
+
inputSchema: Object.freeze({
|
|
28
|
+
type: 'object',
|
|
29
|
+
properties: Object.freeze({}),
|
|
30
|
+
additionalProperties: false,
|
|
31
|
+
}),
|
|
32
|
+
annotations: Object.freeze({
|
|
33
|
+
readOnlyHint: true,
|
|
34
|
+
destructiveHint: false,
|
|
35
|
+
idempotentHint: true,
|
|
36
|
+
openWorldHint: false,
|
|
37
|
+
}),
|
|
38
|
+
async execute() {
|
|
39
|
+
let response;
|
|
40
|
+
try {
|
|
41
|
+
response = await fetchFn(endpoint, {
|
|
42
|
+
method: 'GET',
|
|
43
|
+
credentials: 'same-origin',
|
|
44
|
+
headers: { accept: 'application/json' },
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
catch {
|
|
48
|
+
return stableToolError('diagnostics_unavailable');
|
|
49
|
+
}
|
|
50
|
+
if (!response.ok) {
|
|
51
|
+
return stableToolError(response.status === 401
|
|
52
|
+
? 'authentication_required'
|
|
53
|
+
: response.status === 403
|
|
54
|
+
? 'authorization_denied'
|
|
55
|
+
: 'diagnostics_unavailable');
|
|
56
|
+
}
|
|
57
|
+
try {
|
|
58
|
+
return JSON.stringify(await response.json());
|
|
59
|
+
}
|
|
60
|
+
catch {
|
|
61
|
+
return stableToolError('diagnostics_unavailable');
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
function stableToolError(code) {
|
|
67
|
+
return JSON.stringify({ ok: false, error: { code } });
|
|
68
|
+
}
|
|
@@ -66,7 +66,7 @@ below is intentionally application code, not a `workspace/` export:
|
|
|
66
66
|
import { AssistantDock } from '@happyvertical/smrt-chat/svelte';
|
|
67
67
|
</script>
|
|
68
68
|
|
|
69
|
-
<ShellDockTool id="assistant" label="Assistant"
|
|
69
|
+
<ShellDockTool id="assistant" label="Assistant">
|
|
70
70
|
{#snippet render()}
|
|
71
71
|
<AssistantDock {transport} {registry} />
|
|
72
72
|
{/snippet}
|
|
@@ -74,7 +74,8 @@ below is intentionally application code, not a `workspace/` export:
|
|
|
74
74
|
```
|
|
75
75
|
|
|
76
76
|
`registry` is the same `DataSurfaceRegistry` instance mounted routes register
|
|
77
|
-
their descriptors on
|
|
77
|
+
their descriptors on; inside `AppShell` it is the argument of the `dock`
|
|
78
|
+
snippet (`{#snippet dock(registry)}`). `icon` takes a Svelte component. See
|
|
78
79
|
[`docs/assistant-dock.md`](../../../../../docs/assistant-dock.md) for the full
|
|
79
80
|
design.
|
|
80
81
|
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { useI18n } from '@happyvertical/smrt-ui/i18n';
|
|
3
|
+
import { Button } from '@happyvertical/smrt-ui/ui';
|
|
4
|
+
import { M } from '../../../i18n/strings.workspace.js';
|
|
5
|
+
import type { ShellActivity } from './types.js';
|
|
6
|
+
|
|
7
|
+
interface Props {
|
|
8
|
+
/** Authenticated app-owned activities; this component never fetches process data. */
|
|
9
|
+
activities: ReadonlyArray<ShellActivity>;
|
|
10
|
+
/** Active statuses to display; defaults to running only. Terminal work is never active. */
|
|
11
|
+
statuses?: ReadonlyArray<'queued' | 'running'>;
|
|
12
|
+
/** Accessible region name. */
|
|
13
|
+
label?: string;
|
|
14
|
+
/** Message shown when no activities are running. */
|
|
15
|
+
emptyLabel?: string;
|
|
16
|
+
}
|
|
17
|
+
let { activities, statuses = ['running'], label, emptyLabel }: Props = $props();
|
|
18
|
+
const { t } = useI18n();
|
|
19
|
+
let paused = $state(false);
|
|
20
|
+
const running = $derived(
|
|
21
|
+
activities.filter(
|
|
22
|
+
(activity) =>
|
|
23
|
+
(activity.status === 'queued' || activity.status === 'running') &&
|
|
24
|
+
statuses.includes(activity.status),
|
|
25
|
+
),
|
|
26
|
+
);
|
|
27
|
+
const multiple = $derived(running.length > 1);
|
|
28
|
+
function progress(activity: ShellActivity): string {
|
|
29
|
+
return activity.status === 'running' &&
|
|
30
|
+
typeof activity.progress === 'number' &&
|
|
31
|
+
Number.isFinite(activity.progress) &&
|
|
32
|
+
activity.progress >= 0 &&
|
|
33
|
+
activity.progress <= 100
|
|
34
|
+
? ` · ${Math.round(activity.progress)}%`
|
|
35
|
+
: '';
|
|
36
|
+
}
|
|
37
|
+
function activityLabel(activity: ShellActivity): string {
|
|
38
|
+
return activity.status === 'queued'
|
|
39
|
+
? `${t(M['ui.activity_ticker.queued'])} · ${activity.label}`
|
|
40
|
+
: activity.label;
|
|
41
|
+
}
|
|
42
|
+
</script>
|
|
43
|
+
|
|
44
|
+
<div class="smrt-activity-ticker-shell">
|
|
45
|
+
<div class="smrt-activity-ticker" class:multiple class:paused role="region" aria-label={label ?? t(M['ui.activity_ticker.label'])} style:--activity-ticker-duration={`${Math.max(20, running.length * 10)}s`}>
|
|
46
|
+
{#if running.length === 0}
|
|
47
|
+
<span class="smrt-activity-ticker__empty">{emptyLabel ?? t(M['ui.activity_ticker.empty'])}</span>
|
|
48
|
+
{:else}
|
|
49
|
+
<ul class="smrt-activity-ticker__accessible">
|
|
50
|
+
{#each running as activity (activity.id)}<li>{activityLabel(activity)}{progress(activity)}</li>{/each}
|
|
51
|
+
</ul>
|
|
52
|
+
<div class="smrt-activity-ticker__track" aria-hidden="true">
|
|
53
|
+
<span class="smrt-activity-ticker__group">
|
|
54
|
+
{#each running as activity (activity.id)}<span>{activityLabel(activity)}{progress(activity)}</span>{/each}
|
|
55
|
+
</span>
|
|
56
|
+
{#if multiple}
|
|
57
|
+
<span class="smrt-activity-ticker__group smrt-activity-ticker__copy">
|
|
58
|
+
{#each running as activity (activity.id)}<span>{activityLabel(activity)}{progress(activity)}</span>{/each}
|
|
59
|
+
</span>
|
|
60
|
+
{/if}
|
|
61
|
+
</div>
|
|
62
|
+
{/if}
|
|
63
|
+
</div>
|
|
64
|
+
{#if multiple}
|
|
65
|
+
<span class="smrt-activity-ticker__control">
|
|
66
|
+
<Button variant="ghost" size="sm" aria-label={t(paused ? M['ui.activity_ticker.resume'] : M['ui.activity_ticker.pause'])} title={t(paused ? M['ui.activity_ticker.resume'] : M['ui.activity_ticker.pause'])} onclick={() => paused = !paused}>
|
|
67
|
+
<svg viewBox="0 0 16 16" width="14" height="14" fill="currentColor" aria-hidden="true">
|
|
68
|
+
{#if paused}<path d="M4 2v12l10-6z" />{:else}<path d="M3 2h4v12H3zM9 2h4v12H9z" />{/if}
|
|
69
|
+
</svg>
|
|
70
|
+
</Button>
|
|
71
|
+
</span>
|
|
72
|
+
{/if}
|
|
73
|
+
</div>
|
|
74
|
+
|
|
75
|
+
<style>
|
|
76
|
+
.smrt-activity-ticker-shell { display:flex; align-items:center; flex:1; min-width:0; gap:var(--smrt-spacing-2); }
|
|
77
|
+
.smrt-activity-ticker { flex:1; min-width:0; overflow:hidden; color:var(--smrt-color-on-surface-variant); font-size:var(--smrt-typography-body-small-size); white-space:nowrap; }
|
|
78
|
+
.smrt-activity-ticker__track { display:flex; width:max-content; }
|
|
79
|
+
.smrt-activity-ticker__group { display:flex; gap:var(--smrt-spacing-6); flex-shrink:0; }
|
|
80
|
+
.multiple .smrt-activity-ticker__group { padding-inline-end:var(--smrt-spacing-6); }
|
|
81
|
+
.multiple .smrt-activity-ticker__track { animation:smrt-activity-scroll var(--activity-ticker-duration) linear infinite; }
|
|
82
|
+
.smrt-activity-ticker.paused .smrt-activity-ticker__track,
|
|
83
|
+
.smrt-activity-ticker:hover .smrt-activity-ticker__track,
|
|
84
|
+
.smrt-activity-ticker-shell:focus-within .smrt-activity-ticker__track { animation-play-state:paused; }
|
|
85
|
+
.smrt-activity-ticker__accessible { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip-path:inset(50%); white-space:normal; }
|
|
86
|
+
@keyframes smrt-activity-scroll { to { transform:translateX(-50%); } }
|
|
87
|
+
@media (prefers-reduced-motion:reduce) {
|
|
88
|
+
.smrt-activity-ticker { overflow-x:auto; }
|
|
89
|
+
.multiple .smrt-activity-ticker__track { animation:none; }
|
|
90
|
+
.smrt-activity-ticker__copy, .smrt-activity-ticker__control { display:none; }
|
|
91
|
+
}
|
|
92
|
+
</style>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { ShellActivity } from './types.js';
|
|
2
|
+
interface Props {
|
|
3
|
+
/** Authenticated app-owned activities; this component never fetches process data. */
|
|
4
|
+
activities: ReadonlyArray<ShellActivity>;
|
|
5
|
+
/** Active statuses to display; defaults to running only. Terminal work is never active. */
|
|
6
|
+
statuses?: ReadonlyArray<'queued' | 'running'>;
|
|
7
|
+
/** Accessible region name. */
|
|
8
|
+
label?: string;
|
|
9
|
+
/** Message shown when no activities are running. */
|
|
10
|
+
emptyLabel?: string;
|
|
11
|
+
}
|
|
12
|
+
declare const ActivityTicker: import("svelte").Component<Props, {}, "">;
|
|
13
|
+
type ActivityTicker = ReturnType<typeof ActivityTicker>;
|
|
14
|
+
export default ActivityTicker;
|
|
15
|
+
//# sourceMappingURL=ActivityTicker.svelte.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ActivityTicker.svelte.d.ts","sourceRoot":"","sources":["../../../../src/components/workspace/admin-shell/ActivityTicker.svelte.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAGhD,UAAU,KAAK;IACb,qFAAqF;IACrF,UAAU,EAAE,aAAa,CAAC,aAAa,CAAC,CAAC;IACzC,2FAA2F;IAC3F,QAAQ,CAAC,EAAE,aAAa,CAAC,QAAQ,GAAG,SAAS,CAAC,CAAC;IAC/C,8BAA8B;IAC9B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,oDAAoD;IACpD,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAqED,QAAA,MAAM,cAAc,2CAAwC,CAAC;AAC7D,KAAK,cAAc,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AACxD,eAAe,cAAc,CAAC"}
|
|
@@ -89,7 +89,10 @@ function buildLayoutStyle(shell: ModuleShellState): string {
|
|
|
89
89
|
focusRail?: Snippet;
|
|
90
90
|
/** Content for the right focus panel, receives the active tool. */
|
|
91
91
|
focusPanel?: Snippet<[{ tool: ShellFocusTool | null }]>;
|
|
92
|
-
/**
|
|
92
|
+
/**
|
|
93
|
+
* Content for the system bar. When supplied without a `systemPanel` it owns
|
|
94
|
+
* the bottom band: there is nothing to open, so no bottom toggle is drawn.
|
|
95
|
+
*/
|
|
93
96
|
systemBar?: Snippet;
|
|
94
97
|
/** Content for the system panel. */
|
|
95
98
|
systemPanel?: Snippet;
|
|
@@ -1008,7 +1011,7 @@ function buildLayoutStyle(shell: ModuleShellState): string {
|
|
|
1008
1011
|
style:--band-column={2}
|
|
1009
1012
|
>
|
|
1010
1013
|
{#if systemBar}{@render systemBar()}{/if}
|
|
1011
|
-
{@render edgeToggle('bottom')}
|
|
1014
|
+
{#if systemPanel || !systemBar}{@render edgeToggle('bottom')}{/if}
|
|
1012
1015
|
</div>
|
|
1013
1016
|
{#if bottomRightCorner}
|
|
1014
1017
|
<div class="smrt-admin-shell__corner smrt-admin-shell__corner--bottom-right">
|
|
@@ -23,7 +23,10 @@ interface Props extends AdminShellProps {
|
|
|
23
23
|
focusPanel?: Snippet<[{
|
|
24
24
|
tool: ShellFocusTool | null;
|
|
25
25
|
}]>;
|
|
26
|
-
/**
|
|
26
|
+
/**
|
|
27
|
+
* Content for the system bar. When supplied without a `systemPanel` it owns
|
|
28
|
+
* the bottom band: there is nothing to open, so no bottom toggle is drawn.
|
|
29
|
+
*/
|
|
27
30
|
systemBar?: Snippet;
|
|
28
31
|
/** Content for the system panel. */
|
|
29
32
|
systemPanel?: Snippet;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AdminShell.svelte.d.ts","sourceRoot":"","sources":["../../../../src/components/workspace/admin-shell/AdminShell.svelte.ts"],"names":[],"mappings":"AA+CA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAQtC,OAAO,EAAE,KAAK,aAAa,EAAiB,MAAM,mBAAmB,CAAC;AAStE,OAAO,EAAoB,KAAK,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACtE,OAAO,KAAK,EACR,sBAAsB,EACtB,eAAe,EAEf,cAAc,EACd,aAAa,EACd,MAAM,YAAY,CAAC;AAGpB,UAAU,KAAM,SAAQ,eAAe;IACrC,sEAAsE;IACtE,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,mCAAmC;IACnC,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,qEAAqE;IACrE,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,sCAAsC;IACtC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,wCAAwC;IACxC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,yCAAyC;IACzC,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,2CAA2C;IAC3C,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,wCAAwC;IACxC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,mEAAmE;IACnE,UAAU,CAAC,EAAE,OAAO,CAAC,CAAC;QAAE,IAAI,EAAE,cAAc,GAAG,IAAI,CAAA;KAAE,CAAC,CAAC,CAAC;IACxD
|
|
1
|
+
{"version":3,"file":"AdminShell.svelte.d.ts","sourceRoot":"","sources":["../../../../src/components/workspace/admin-shell/AdminShell.svelte.ts"],"names":[],"mappings":"AA+CA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAQtC,OAAO,EAAE,KAAK,aAAa,EAAiB,MAAM,mBAAmB,CAAC;AAStE,OAAO,EAAoB,KAAK,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACtE,OAAO,KAAK,EACR,sBAAsB,EACtB,eAAe,EAEf,cAAc,EACd,aAAa,EACd,MAAM,YAAY,CAAC;AAGpB,UAAU,KAAM,SAAQ,eAAe;IACrC,sEAAsE;IACtE,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,mCAAmC;IACnC,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,qEAAqE;IACrE,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,sCAAsC;IACtC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,wCAAwC;IACxC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,yCAAyC;IACzC,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,2CAA2C;IAC3C,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,wCAAwC;IACxC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,mEAAmE;IACnE,UAAU,CAAC,EAAE,OAAO,CAAC,CAAC;QAAE,IAAI,EAAE,cAAc,GAAG,IAAI,CAAA;KAAE,CAAC,CAAC,CAAC;IACxD;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,oCAAoC;IACpC,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,uCAAuC;IACvC,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,wCAAwC;IACxC,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,0CAA0C;IAC1C,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,2CAA2C;IAC3C,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,kDAAkD;IAClD,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B;;;;OAIG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC,CAAC;QAAE,QAAQ,EAAE,aAAa,CAAA;KAAE,CAAC,CAAC,CAAC;IAChD;;;;OAIG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC,CAAC;QAAE,MAAM,EAAE,OAAO,CAAA;KAAE,CAAC,CAAC,CAAC;IAC7C;;;;OAIG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC,CAAC;QAAE,QAAQ,EAAE,aAAa,CAAC;QAAC,SAAS,EAAE,aAAa,CAAA;KAAE,CAAC,CAAC,CAAC;IAC5E,uEAAuE;IACvE,KAAK,CAAC,EAAE,sBAAsB,CAAC;IAC/B,qEAAqE;IACrE,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,OAAO,CAAC;CACnB;AA+zBH,QAAA,MAAM,UAAU,2CAAwC,CAAC;AACzD,KAAK,UAAU,GAAG,UAAU,CAAC,OAAO,UAAU,CAAC,CAAC;AAChD,eAAe,UAAU,CAAC"}
|
|
@@ -10,6 +10,7 @@ export { type SwipeDirection, type SwipeDismissOptions, swipeDismiss, swipeDismi
|
|
|
10
10
|
export { default as ActivityBadge } from './admin-shell/ActivityBadge.svelte';
|
|
11
11
|
export { default as ActivityItem } from './admin-shell/ActivityItem.svelte';
|
|
12
12
|
export { default as ActivityList } from './admin-shell/ActivityList.svelte';
|
|
13
|
+
export { default as ActivityTicker } from './admin-shell/ActivityTicker.svelte';
|
|
13
14
|
export { default as ActivityToasts } from './admin-shell/ActivityToasts.svelte';
|
|
14
15
|
export { default as AdminShell } from './admin-shell/AdminShell.svelte';
|
|
15
16
|
export { default as AppScopePanel } from './admin-shell/AppScopePanel.svelte';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/workspace/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,mBAAmB,EACxB,YAAY,EACZ,cAAc,GACf,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,oCAAoC,CAAC;AAC9E,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,mCAAmC,CAAC;AAC5E,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,mCAAmC,CAAC;AAC5E,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,qCAAqC,CAAC;AAChF,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,iCAAiC,CAAC;AACxE,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,oCAAoC,CAAC;AAC9E,OAAO,EACL,mBAAmB,EACnB,aAAa,EACb,gBAAgB,EAChB,aAAa,GACd,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,kCAAkC,CAAC;AAC1E,OAAO,EACL,mBAAmB,EACnB,kBAAkB,EAClB,gBAAgB,EAChB,gBAAgB,EAChB,KAAK,iBAAiB,EACtB,4BAA4B,EAC5B,uBAAuB,GACxB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,KAAK,aAAa,EAClB,aAAa,EACb,wBAAwB,EACxB,iBAAiB,EACjB,kBAAkB,EAClB,kBAAkB,EAClB,KAAK,kBAA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,uBAAuB,EACvB,gBAAgB,EAChB,mBAAmB,EACnB,UAAU,EACV,KAAK,iBAAiB,GACvB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,gCAAgC,CAAC;AACtE,YAAY,EACV,cAAc,EACd,sBAAsB,EACtB,eAAe,EACf,SAAS,EACT,iBAAiB,EACjB,UAAU,EACV,sBAAsB,EACtB,mBAAmB,EACnB,aAAa,EACb,kBAAkB,EAClB,kBAAkB,EAClB,mBAAmB,EACnB,cAAc,EACd,qBAAqB,EACrB,kBAAkB,EAClB,aAAa,EACb,YAAY,EACZ,gBAAgB,EAChB,kBAAkB,EAClB,iBAAiB,EACjB,gBAAgB,EAChB,UAAU,EACV,oBAAoB,EACpB,kBAAkB,EAClB,kBAAkB,EAClB,eAAe,EACf,eAAe,EACf,eAAe,EACf,gBAAgB,EAChB,aAAa,EACb,iBAAiB,EACjB,sBAAsB,GACvB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,sBAAsB,EACtB,WAAW,EACX,WAAW,EACX,WAAW,GACZ,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AAE5F,OAAO,EACL,KAAK,UAAU,EACf,KAAK,0BAA0B,EAC/B,mBAAmB,IAAI,qBAAqB,EAC5C,kBAAkB,EAClB,KAAK,qBAAqB,EAC1B,KAAK,gBAAgB,GACtB,MAAM,mBAAmB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/workspace/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,mBAAmB,EACxB,YAAY,EACZ,cAAc,GACf,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,oCAAoC,CAAC;AAC9E,OAAO,EAAE,OAAO,IAAI,YAAY,EAA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kB,EAClB,kBAAkB,EAClB,eAAe,EACf,eAAe,EACf,eAAe,EACf,gBAAgB,EAChB,aAAa,EACb,iBAAiB,EACjB,sBAAsB,GACvB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,sBAAsB,EACtB,WAAW,EACX,WAAW,EACX,WAAW,GACZ,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AAE5F,OAAO,EACL,KAAK,UAAU,EACf,KAAK,0BAA0B,EAC/B,mBAAmB,IAAI,qBAAqB,EAC5C,kBAAkB,EAClB,KAAK,qBAAqB,EAC1B,KAAK,gBAAgB,GACtB,MAAM,mBAAmB,CAAC"}
|
|
@@ -12,6 +12,7 @@ export { swipeDismiss, swipeDismisses, } from '@happyvertical/smrt-ui/feedback';
|
|
|
12
12
|
export { default as ActivityBadge } from './admin-shell/ActivityBadge.svelte';
|
|
13
13
|
export { default as ActivityItem } from './admin-shell/ActivityItem.svelte';
|
|
14
14
|
export { default as ActivityList } from './admin-shell/ActivityList.svelte';
|
|
15
|
+
export { default as ActivityTicker } from './admin-shell/ActivityTicker.svelte';
|
|
15
16
|
export { default as ActivityToasts } from './admin-shell/ActivityToasts.svelte';
|
|
16
17
|
export { default as AdminShell } from './admin-shell/AdminShell.svelte';
|
|
17
18
|
export { default as AppScopePanel } from './admin-shell/AppScopePanel.svelte';
|
package/dist/i18n/server.d.ts
CHANGED
|
@@ -21,6 +21,7 @@ import '@happyvertical/smrt-ui/i18n';
|
|
|
21
21
|
import './strings.forms.js';
|
|
22
22
|
import './strings.board.js';
|
|
23
23
|
import './strings.workspace.js';
|
|
24
|
+
import '../mcp-apps/strings.js';
|
|
24
25
|
export interface BuildI18nSnapshotOptions {
|
|
25
26
|
/** Target locale (BCP-47-ish, e.g. `fr-CA`). */
|
|
26
27
|
locale: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/i18n/server.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AACH,OAAO,EAGL,KAAK,4BAA4B,EAElC,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAEL,KAAK,YAAY,EAClB,MAAM,6BAA6B,CAAC;AAMrC,OAAO,6BAA6B,CAAC;AACrC,OAAO,oBAAoB,CAAC;AAC5B,OAAO,oBAAoB,CAAC;AAC5B,OAAO,wBAAwB,CAAC;AAEhC,MAAM,WAAW,wBAAwB;IACvC,gDAAgD;IAChD,MAAM,EAAE,MAAM,CAAC;IACf,+CAA+C;IAC/C,QAAQ,CAAC,EAAE,4BAA4B,CAAC,UAAU,CAAC,CAAC;IACpD;;;OAGG;IACH,EAAE,CAAC,EAAE,4BAA4B,CAAC,IAAI,CAAC,CAAC;IACxC;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;CACjB;AAED;;;;;;GAMG;AACH,wBAAsB,iBAAiB,CACrC,OAAO,EAAE,wBAAwB,GAChC,OAAO,CAAC,YAAY,CAAC,CA4BvB"}
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/i18n/server.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AACH,OAAO,EAGL,KAAK,4BAA4B,EAElC,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAEL,KAAK,YAAY,EAClB,MAAM,6BAA6B,CAAC;AAMrC,OAAO,6BAA6B,CAAC;AACrC,OAAO,oBAAoB,CAAC;AAC5B,OAAO,oBAAoB,CAAC;AAC5B,OAAO,wBAAwB,CAAC;AAChC,OAAO,wBAAwB,CAAC;AAEhC,MAAM,WAAW,wBAAwB;IACvC,gDAAgD;IAChD,MAAM,EAAE,MAAM,CAAC;IACf,+CAA+C;IAC/C,QAAQ,CAAC,EAAE,4BAA4B,CAAC,UAAU,CAAC,CAAC;IACpD;;;OAGG;IACH,EAAE,CAAC,EAAE,4BAA4B,CAAC,IAAI,CAAC,CAAC;IACxC;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;CACjB;AAED;;;;;;GAMG;AACH,wBAAsB,iBAAiB,CACrC,OAAO,EAAE,wBAAwB,GAChC,OAAO,CAAC,YAAY,CAAC,CA4BvB"}
|
package/dist/i18n/server.js
CHANGED
|
@@ -26,6 +26,7 @@ import '@happyvertical/smrt-ui/i18n';
|
|
|
26
26
|
import './strings.forms.js';
|
|
27
27
|
import './strings.board.js';
|
|
28
28
|
import './strings.workspace.js';
|
|
29
|
+
import '../mcp-apps/strings.js';
|
|
29
30
|
/**
|
|
30
31
|
* Resolve a per-locale dictionary of message **templates** for the keys an app
|
|
31
32
|
* uses. Seeds `LanguageRegistry` from the English defaults registered via
|
|
@@ -52,7 +52,23 @@ export declare const M: {
|
|
|
52
52
|
readonly 'ui.activity_item.view': "ui.activity_item.view";
|
|
53
53
|
readonly 'ui.activity_item.cancel': "ui.activity_item.cancel";
|
|
54
54
|
readonly 'ui.activity_list.empty': "ui.activity_list.empty";
|
|
55
|
+
readonly 'ui.activity_ticker.label': "ui.activity_ticker.label";
|
|
56
|
+
readonly 'ui.activity_ticker.empty': "ui.activity_ticker.empty";
|
|
57
|
+
readonly 'ui.activity_ticker.pause': "ui.activity_ticker.pause";
|
|
58
|
+
readonly 'ui.activity_ticker.resume': "ui.activity_ticker.resume";
|
|
59
|
+
readonly 'ui.activity_ticker.queued': "ui.activity_ticker.queued";
|
|
55
60
|
readonly 'ui.app_scope_panel.app_scope': "ui.app_scope_panel.app_scope";
|
|
61
|
+
readonly 'ui.app_shell.settings_link': "ui.app_shell.settings_link";
|
|
62
|
+
readonly 'ui.app_shell.navigation': "ui.app_shell.navigation";
|
|
63
|
+
readonly 'ui.owner_setup.heading': "ui.owner_setup.heading";
|
|
64
|
+
readonly 'ui.owner_setup.unavailable': "ui.owner_setup.unavailable";
|
|
65
|
+
readonly 'ui.owner_setup.intro': "ui.owner_setup.intro";
|
|
66
|
+
readonly 'ui.owner_setup.name': "ui.owner_setup.name";
|
|
67
|
+
readonly 'ui.owner_setup.email': "ui.owner_setup.email";
|
|
68
|
+
readonly 'ui.owner_setup.tenant_name': "ui.owner_setup.tenant_name";
|
|
69
|
+
readonly 'ui.owner_setup.submit': "ui.owner_setup.submit";
|
|
70
|
+
readonly 'ui.shell_settings_page.heading': "ui.shell_settings_page.heading";
|
|
71
|
+
readonly 'ui.shell_settings_page.description': "ui.shell_settings_page.description";
|
|
56
72
|
readonly 'ui.hotkey_input.capture_title': "ui.hotkey_input.capture_title";
|
|
57
73
|
readonly 'ui.hotkey_input.conflicts_with': "ui.hotkey_input.conflicts_with";
|
|
58
74
|
readonly 'ui.shell_settings_panel.shell_settings': "ui.shell_settings_panel.shell_settings";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"strings.workspace.d.ts","sourceRoot":"","sources":["../../src/i18n/strings.workspace.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAIH,eAAO,MAAM,CAAC
|
|
1
|
+
{"version":3,"file":"strings.workspace.d.ts","sourceRoot":"","sources":["../../src/i18n/strings.workspace.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAIH,eAAO,MAAM,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+HZ,CAAC"}
|
|
@@ -57,7 +57,24 @@ export const M = defineMessages({
|
|
|
57
57
|
'ui.activity_item.view': 'View',
|
|
58
58
|
'ui.activity_item.cancel': 'Cancel',
|
|
59
59
|
'ui.activity_list.empty': 'No activities',
|
|
60
|
+
'ui.activity_ticker.label': 'Running processes',
|
|
61
|
+
'ui.activity_ticker.empty': 'No active processes',
|
|
62
|
+
'ui.activity_ticker.pause': 'Pause scrolling activities',
|
|
63
|
+
'ui.activity_ticker.resume': 'Resume scrolling activities',
|
|
64
|
+
'ui.activity_ticker.queued': 'Queued',
|
|
60
65
|
'ui.app_scope_panel.app_scope': 'App scope',
|
|
66
|
+
// components/app/*.svelte
|
|
67
|
+
'ui.app_shell.settings_link': 'Shell settings',
|
|
68
|
+
'ui.app_shell.navigation': 'Application navigation',
|
|
69
|
+
'ui.owner_setup.heading': 'Set up your local application',
|
|
70
|
+
'ui.owner_setup.unavailable': 'Local owner setup is unavailable or has already been completed.',
|
|
71
|
+
'ui.owner_setup.intro': 'Create the real local owner account. This invitation works once and stays on this device.',
|
|
72
|
+
'ui.owner_setup.name': 'Name',
|
|
73
|
+
'ui.owner_setup.email': 'Email',
|
|
74
|
+
'ui.owner_setup.tenant_name': 'Workspace name (optional)',
|
|
75
|
+
'ui.owner_setup.submit': 'Create owner',
|
|
76
|
+
'ui.shell_settings_page.heading': 'Settings',
|
|
77
|
+
'ui.shell_settings_page.description': 'Adjust the workspace shell — panel layout and keyboard shortcuts.',
|
|
61
78
|
'ui.hotkey_input.capture_title': 'Press a key to capture it',
|
|
62
79
|
'ui.hotkey_input.conflicts_with': 'Conflicts with',
|
|
63
80
|
'ui.shell_settings_panel.shell_settings': 'Shell settings',
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
@component
|
|
3
|
+
Shipped portable MCP Apps view shell. Owns one mount-scoped host bridge
|
|
4
|
+
(`useMcpApp`), renders the app's own content, and offers a portable
|
|
5
|
+
display-mode request only when the bound host advertises that mode. Any
|
|
6
|
+
host failure or missing capability keeps the view inline with a status
|
|
7
|
+
message; the view never requires host controls. Browser-only: imports no
|
|
8
|
+
server code, credentials, or OpenAI-specific helpers.
|
|
9
|
+
-->
|
|
10
|
+
<script lang="ts">
|
|
11
|
+
import type { DisplayMode } from '@happyvertical/smrt-mcp-apps';
|
|
12
|
+
import { useI18n } from '@happyvertical/smrt-ui/i18n';
|
|
13
|
+
import { Button } from '@happyvertical/smrt-ui/ui';
|
|
14
|
+
import type { Snippet } from 'svelte';
|
|
15
|
+
import { type McpAppState, useMcpApp } from './mcp-apps.svelte.js';
|
|
16
|
+
import { M } from './strings.js';
|
|
17
|
+
|
|
18
|
+
interface McpAppsBridgeProps {
|
|
19
|
+
/** Exact, application-configured host origin. Never derive this from URL input. */
|
|
20
|
+
hostOrigin: string;
|
|
21
|
+
/** View identity sent in `ui/initialize`. */
|
|
22
|
+
appInfo: { name: string; version: string };
|
|
23
|
+
/** Visible view heading, already localized by the application. */
|
|
24
|
+
title: string;
|
|
25
|
+
/** Optional lead text, already localized by the application. */
|
|
26
|
+
description?: string;
|
|
27
|
+
/** Modes this view supports. Defaults to `['inline', 'fullscreen']`. */
|
|
28
|
+
availableDisplayModes?: DisplayMode[];
|
|
29
|
+
/** Mode offered by the expand control. Defaults to `'fullscreen'`. */
|
|
30
|
+
expandMode?: Exclude<DisplayMode, 'inline'>;
|
|
31
|
+
/** Host window override for tests. Defaults to the immediate parent. */
|
|
32
|
+
hostWindow?: () => Window;
|
|
33
|
+
/** Request timeout in milliseconds (1–120000). */
|
|
34
|
+
timeoutMs?: number;
|
|
35
|
+
/** App content; receives the bridge state for capability-gated calls. */
|
|
36
|
+
children?: Snippet<[McpAppState]>;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
let {
|
|
40
|
+
hostOrigin,
|
|
41
|
+
appInfo,
|
|
42
|
+
title,
|
|
43
|
+
description,
|
|
44
|
+
availableDisplayModes = ['inline', 'fullscreen'],
|
|
45
|
+
expandMode = 'fullscreen',
|
|
46
|
+
hostWindow,
|
|
47
|
+
timeoutMs,
|
|
48
|
+
children,
|
|
49
|
+
}: McpAppsBridgeProps = $props();
|
|
50
|
+
|
|
51
|
+
const { t } = useI18n();
|
|
52
|
+
const headingId = $props.id();
|
|
53
|
+
let requestFailed = $state(false);
|
|
54
|
+
let requesting = $state(false);
|
|
55
|
+
|
|
56
|
+
// Options are read once, at mount, in the browser; SSR constructs nothing.
|
|
57
|
+
const app = useMcpApp(() => ({
|
|
58
|
+
appInfo: { ...appInfo },
|
|
59
|
+
availableDisplayModes: [...availableDisplayModes],
|
|
60
|
+
hostOrigin,
|
|
61
|
+
hostWindow: hostWindow ? hostWindow() : window.parent,
|
|
62
|
+
...(timeoutMs === undefined ? {} : { timeoutMs }),
|
|
63
|
+
}));
|
|
64
|
+
|
|
65
|
+
const ready = $derived(app.snapshot?.state === 'ready');
|
|
66
|
+
const canExpand = $derived(
|
|
67
|
+
ready &&
|
|
68
|
+
!app.error &&
|
|
69
|
+
!requestFailed &&
|
|
70
|
+
availableDisplayModes.includes(expandMode) &&
|
|
71
|
+
(app.snapshot?.hostContext.availableDisplayModes ?? ['inline']).includes(
|
|
72
|
+
expandMode,
|
|
73
|
+
) &&
|
|
74
|
+
app.snapshot?.hostContext.displayMode !== expandMode,
|
|
75
|
+
);
|
|
76
|
+
const inlineOnly = $derived(
|
|
77
|
+
Boolean(app.error) ||
|
|
78
|
+
requestFailed ||
|
|
79
|
+
(ready &&
|
|
80
|
+
!(app.snapshot?.hostContext.availableDisplayModes ?? ['inline']).includes(
|
|
81
|
+
expandMode,
|
|
82
|
+
)),
|
|
83
|
+
);
|
|
84
|
+
|
|
85
|
+
async function expand() {
|
|
86
|
+
const bridge = app.bridge;
|
|
87
|
+
if (!bridge || requesting) return;
|
|
88
|
+
requesting = true;
|
|
89
|
+
try {
|
|
90
|
+
await bridge.requestDisplayMode(expandMode);
|
|
91
|
+
} catch {
|
|
92
|
+
requestFailed = true;
|
|
93
|
+
} finally {
|
|
94
|
+
requesting = false;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
</script>
|
|
98
|
+
|
|
99
|
+
<section aria-labelledby={headingId} class="smrt-mcp-apps-bridge">
|
|
100
|
+
<h1 id={headingId}>{title}</h1>
|
|
101
|
+
{#if description}<p>{description}</p>{/if}
|
|
102
|
+
{#if inlineOnly}
|
|
103
|
+
<p role="status">{t(M['ui.mcp_apps.inline_only'])}</p>
|
|
104
|
+
{:else if canExpand}
|
|
105
|
+
<Button type="button" onclick={expand} loading={requesting}>
|
|
106
|
+
{t(M['ui.mcp_apps.expand'])}
|
|
107
|
+
</Button>
|
|
108
|
+
{:else if !ready}
|
|
109
|
+
<p role="status" class="smrt-mcp-apps-bridge__pending">
|
|
110
|
+
{t(M['ui.mcp_apps.connecting'])}
|
|
111
|
+
</p>
|
|
112
|
+
{/if}
|
|
113
|
+
{@render children?.(app)}
|
|
114
|
+
</section>
|
|
115
|
+
|
|
116
|
+
<style>
|
|
117
|
+
.smrt-mcp-apps-bridge {
|
|
118
|
+
display: grid;
|
|
119
|
+
gap: var(--smrt-spacing-3, 0.75rem);
|
|
120
|
+
min-width: 0;
|
|
121
|
+
overflow-wrap: anywhere;
|
|
122
|
+
}
|
|
123
|
+
</style>
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { DisplayMode } from '@happyvertical/smrt-mcp-apps';
|
|
2
|
+
import type { Snippet } from 'svelte';
|
|
3
|
+
import { type McpAppState } from './mcp-apps.svelte.js';
|
|
4
|
+
interface McpAppsBridgeProps {
|
|
5
|
+
/** Exact, application-configured host origin. Never derive this from URL input. */
|
|
6
|
+
hostOrigin: string;
|
|
7
|
+
/** View identity sent in `ui/initialize`. */
|
|
8
|
+
appInfo: {
|
|
9
|
+
name: string;
|
|
10
|
+
version: string;
|
|
11
|
+
};
|
|
12
|
+
/** Visible view heading, already localized by the application. */
|
|
13
|
+
title: string;
|
|
14
|
+
/** Optional lead text, already localized by the application. */
|
|
15
|
+
description?: string;
|
|
16
|
+
/** Modes this view supports. Defaults to `['inline', 'fullscreen']`. */
|
|
17
|
+
availableDisplayModes?: DisplayMode[];
|
|
18
|
+
/** Mode offered by the expand control. Defaults to `'fullscreen'`. */
|
|
19
|
+
expandMode?: Exclude<DisplayMode, 'inline'>;
|
|
20
|
+
/** Host window override for tests. Defaults to the immediate parent. */
|
|
21
|
+
hostWindow?: () => Window;
|
|
22
|
+
/** Request timeout in milliseconds (1–120000). */
|
|
23
|
+
timeoutMs?: number;
|
|
24
|
+
/** App content; receives the bridge state for capability-gated calls. */
|
|
25
|
+
children?: Snippet<[McpAppState]>;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Shipped portable MCP Apps view shell. Owns one mount-scoped host bridge
|
|
29
|
+
* (`useMcpApp`), renders the app's own content, and offers a portable
|
|
30
|
+
* display-mode request only when the bound host advertises that mode. Any
|
|
31
|
+
* host failure or missing capability keeps the view inline with a status
|
|
32
|
+
* message; the view never requires host controls. Browser-only: imports no
|
|
33
|
+
* server code, credentials, or OpenAI-specific helpers.
|
|
34
|
+
*/
|
|
35
|
+
declare const McpAppsBridge: import("svelte").Component<McpAppsBridgeProps, {}, "">;
|
|
36
|
+
type McpAppsBridge = ReturnType<typeof McpAppsBridge>;
|
|
37
|
+
export default McpAppsBridge;
|
|
38
|
+
//# sourceMappingURL=McpAppsBridge.svelte.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"McpAppsBridge.svelte.d.ts","sourceRoot":"","sources":["../../src/mcp-apps/McpAppsBridge.svelte.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAGhE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AACtC,OAAO,EAAE,KAAK,WAAW,EAAa,MAAM,sBAAsB,CAAC;AAInE,UAAU,kBAAkB;IAC1B,mFAAmF;IACnF,UAAU,EAAE,MAAM,CAAC;IACnB,6CAA6C;IAC7C,OAAO,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC;IAC3C,kEAAkE;IAClE,KAAK,EAAE,MAAM,CAAC;IACd,gEAAgE;IAChE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,wEAAwE;IACxE,qBAAqB,CAAC,EAAE,WAAW,EAAE,CAAC;IACtC,sEAAsE;IACtE,UAAU,CAAC,EAAE,OAAO,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC;IAC5C,wEAAwE;IACxE,UAAU,CAAC,EAAE,MAAM,MAAM,CAAC;IAC1B,kDAAkD;IAClD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,yEAAyE;IACzE,QAAQ,CAAC,EAAE,OAAO,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC;CACnC;AA4FD;;;;;;;GAOG;AACH,QAAA,MAAM,aAAa,wDAAwC,CAAC;AAC5D,KAAK,aAAa,GAAG,UAAU,CAAC,OAAO,aAAa,CAAC,CAAC;AACtD,eAAe,aAAa,CAAC"}
|
package/dist/mcp-apps/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/mcp-apps/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/mcp-apps/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAClE,YAAY,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC"}
|
package/dist/mcp-apps/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mcp-apps.svelte.d.ts","sourceRoot":"","sources":["../../src/mcp-apps/mcp-apps.svelte.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,mBAAmB,EACnB,cAAc,EACf,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAC5D,OAAO,KAAK,EACV,UAAU,EACV,iBAAiB,EAClB,MAAM,iCAAiC,CAAC;AAIzC,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,MAAM,EAAE,YAAY,GAAG,SAAS,CAAC;IAC1C,QAAQ,CAAC,QAAQ,EAAE,cAAc,GAAG,SAAS,CAAC;IAC9C,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;CACpC;AACD,qFAAqF;AACrF,wBAAgB,SAAS,CAAC,OAAO,EAAE,MAAM,mBAAmB,GAAG,WAAW,
|
|
1
|
+
{"version":3,"file":"mcp-apps.svelte.d.ts","sourceRoot":"","sources":["../../src/mcp-apps/mcp-apps.svelte.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,mBAAmB,EACnB,cAAc,EACf,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAC5D,OAAO,KAAK,EACV,UAAU,EACV,iBAAiB,EAClB,MAAM,iCAAiC,CAAC;AAIzC,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,MAAM,EAAE,YAAY,GAAG,SAAS,CAAC;IAC1C,QAAQ,CAAC,QAAQ,EAAE,cAAc,GAAG,SAAS,CAAC;IAC9C,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;CACpC;AACD,qFAAqF;AACrF,wBAAgB,SAAS,CAAC,OAAO,EAAE,MAAM,mBAAmB,GAAG,WAAW,CAyCzE;AACD;;;;;GAKG;AACH,wBAAgB,eAAe,CAC7B,MAAM,EAAE,UAAU,EAClB,OAAO,EAAE,iBAAiB,GACzB,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,OAAO,CAAC,MAAM,CAAC,CAerD"}
|
|
@@ -8,7 +8,16 @@ export function useMcpApp(options) {
|
|
|
8
8
|
let error = $state();
|
|
9
9
|
onMount(() => {
|
|
10
10
|
let active = true;
|
|
11
|
-
|
|
11
|
+
let current;
|
|
12
|
+
try {
|
|
13
|
+
current = new McpAppBridge(options());
|
|
14
|
+
}
|
|
15
|
+
catch (failure) {
|
|
16
|
+
// E.g. opened top-level (no embedding host) or an invalid origin: keep
|
|
17
|
+
// the view's ordinary fallback instead of failing the component mount.
|
|
18
|
+
error = failure instanceof Error ? failure.message : 'Host unavailable';
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
12
21
|
bridge = current;
|
|
13
22
|
const unsubscribe = current.subscribe((next) => {
|
|
14
23
|
if (active)
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/** English defaults for the shipped MCP Apps bridge component. */
|
|
2
|
+
export declare const M: {
|
|
3
|
+
readonly 'ui.mcp_apps.expand': "ui.mcp_apps.expand";
|
|
4
|
+
readonly 'ui.mcp_apps.connecting': "ui.mcp_apps.connecting";
|
|
5
|
+
readonly 'ui.mcp_apps.inline_only': "ui.mcp_apps.inline_only";
|
|
6
|
+
};
|
|
7
|
+
//# sourceMappingURL=strings.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"strings.d.ts","sourceRoot":"","sources":["../../src/mcp-apps/strings.ts"],"names":[],"mappings":"AAEA,kEAAkE;AAClE,eAAO,MAAM,CAAC;;;;CAKZ,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { defineMessages } from '@happyvertical/smrt-ui/i18n';
|
|
2
|
+
/** English defaults for the shipped MCP Apps bridge component. */
|
|
3
|
+
export const M = defineMessages({
|
|
4
|
+
'ui.mcp_apps.expand': 'Expand view',
|
|
5
|
+
'ui.mcp_apps.connecting': 'Connecting to the host…',
|
|
6
|
+
'ui.mcp_apps.inline_only': 'Host controls are unavailable; this view remains inline.',
|
|
7
|
+
});
|