@saga-a2ui/lit-mcp-stack 0.7.7-rc.1 → 0.8.0-rc.1
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/package.json +1 -1
- package/src/index.ts +6 -0
- package/src/server/index.ts +1 -0
- package/src/start-a2ui-view.ts +5 -0
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@saga-a2ui/lit-mcp-stack","private":false,"description":"The Lit and MCP Apps stack for SAGA A2UI: starts a view for an application's own catalog, and a FaithfulCard application from one validated definition","license":"Apache-2.0","type":"module","sideEffects":false,"exports":{".":"./src/index.ts","./faithful-card":"./src/faithful-card/index.ts","./content-policy":"./src/content-policy/index.ts","./server":"./src/server/index.ts"},"files":["src","!src/**/*.test.ts","!src/**/*.test-support.ts"],"scripts":{"typecheck":"tsc --noEmit"},"dependencies":{"@a2ui/lit":"0.13.0","@a2ui/web_core":"0.13.0","@modelcontextprotocol/ext-apps":"2.0.3","@saga-a2ui/components":"0.
|
|
1
|
+
{"name":"@saga-a2ui/lit-mcp-stack","private":false,"description":"The Lit and MCP Apps stack for SAGA A2UI: starts a view for an application's own catalog, and a FaithfulCard application from one validated definition","license":"Apache-2.0","type":"module","sideEffects":false,"exports":{".":"./src/index.ts","./faithful-card":"./src/faithful-card/index.ts","./content-policy":"./src/content-policy/index.ts","./server":"./src/server/index.ts"},"files":["src","!src/**/*.test.ts","!src/**/*.test-support.ts"],"scripts":{"typecheck":"tsc --noEmit"},"dependencies":{"@a2ui/lit":"0.13.0","@a2ui/web_core":"0.13.0","@modelcontextprotocol/ext-apps":"2.0.3","@saga-a2ui/components":"0.8.0-rc.1","@saga-a2ui/core":"0.8.0-rc.1","@saga-a2ui/lit":"0.8.0-rc.1","@saga-a2ui/mcp":"0.8.0-rc.1","zod":"4.6.7"},"peerDependencies":{"lit":"^3.3.3"},"devDependencies":{"@modelcontextprotocol/client":"2.3.1","jsdom":"28.1.0","lit":"^3.3.3","typescript":"^5.9.0","vitest":"^5.0.4"},"version":"0.8.0-rc.1","engines":{"node":">=22.12.0"},"repository":{"type":"git","url":"https://github.com/MachineWisdomAI/saga-a2ui.git","directory":"packages/lit-mcp-stack"},"publishConfig":{"access":"public","tag":"next"}}
|
package/src/index.ts
CHANGED
|
@@ -28,6 +28,12 @@ export type { ToolInput, ToolResult } from '@saga-a2ui/mcp/view';
|
|
|
28
28
|
export { readingProfile, type ReadingProfile } from '@saga-a2ui/mcp/view';
|
|
29
29
|
// The link opener a running view hands its actions, for an optional card the catalog includes.
|
|
30
30
|
export type { HostLinks } from '@saga-a2ui/core/host-links';
|
|
31
|
+
// The conversation a running view hands its actions, and the results of adding a message to it.
|
|
32
|
+
export type {
|
|
33
|
+
AppendResult,
|
|
34
|
+
Conversation,
|
|
35
|
+
RequestOutcome,
|
|
36
|
+
} from '@saga-a2ui/core/conversation';
|
|
31
37
|
// The authoring surface of an own-catalog application: the layout and its schemas.
|
|
32
38
|
export { defineSurface } from '@saga-a2ui/core/protocols/a2ui/v0_9';
|
|
33
39
|
export type { SurfaceLayout } from '@saga-a2ui/core/protocols/a2ui/v0_9';
|
package/src/server/index.ts
CHANGED
package/src/start-a2ui-view.ts
CHANGED
|
@@ -8,8 +8,10 @@ import {
|
|
|
8
8
|
type A2uiActions,
|
|
9
9
|
type A2uiUpdateResult,
|
|
10
10
|
} from '@saga-a2ui/lit';
|
|
11
|
+
import type { Conversation } from '@saga-a2ui/core/conversation';
|
|
11
12
|
import type { HostLinks } from '@saga-a2ui/core/host-links';
|
|
12
13
|
import {
|
|
14
|
+
conversationFromApp,
|
|
13
15
|
hostLinksFromApp,
|
|
14
16
|
type HostContext,
|
|
15
17
|
type ToolInput,
|
|
@@ -40,6 +42,8 @@ export interface ViewHost {
|
|
|
40
42
|
readonly server: ServerTransport<ServerReply>;
|
|
41
43
|
/** The one way to ask the host to open a link, for an optional card the application's catalog includes. Ends with the view. */
|
|
42
44
|
readonly links: HostLinks;
|
|
45
|
+
/** The one way to add a message to the conversation, optionally with context for the assistant. Ends with the view. */
|
|
46
|
+
readonly conversation: Conversation;
|
|
43
47
|
}
|
|
44
48
|
|
|
45
49
|
/** The typed way to change what a running view shows. */
|
|
@@ -157,6 +161,7 @@ export function startA2uiViewOn<TData>(
|
|
|
157
161
|
app.callServerTool(request, requestOptions),
|
|
158
162
|
},
|
|
159
163
|
links: hostLinksFromApp(app, lifetime.signal),
|
|
164
|
+
conversation: conversationFromApp(app, lifetime.signal),
|
|
160
165
|
}),
|
|
161
166
|
)
|
|
162
167
|
: makeActions;
|