@saga-a2ui/react-mcp-stack 0.9.0-rc.1 → 0.11.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 CHANGED
@@ -1 +1 @@
1
- {"name":"@saga-a2ui/react-mcp-stack","private":false,"description":"The React and MCP Apps stack for SAGA A2UI: starts a view for an application's own catalog, and a FaithfulCard application from one validated definition, so an application installs one stack plus React and writes only its own decisions","license":"Apache-2.0","type":"module","sideEffects":["**/*.css"],"exports":{".":"./src/index.ts","./faithful-card":"./src/faithful-card/index.ts","./content-policy":"./src/content-policy/index.ts","./server":"./src/server/index.ts","./faithful-card.css":"./src/faithful-card/faithful-card.css","./server/node":"./src/server/node/index.ts"},"files":["src","!src/**/*.test.ts","!src/**/*.test-support.ts"],"scripts":{"typecheck":"tsc --noEmit"},"dependencies":{"@modelcontextprotocol/ext-apps":"2.0.3","@saga-a2ui/components":"0.9.0-rc.1","@saga-a2ui/core":"0.9.0-rc.1","@saga-a2ui/mcp":"0.9.0-rc.1","@saga-a2ui/react":"0.9.0-rc.1","zod":"4.6.7"},"peerDependencies":{"react":"19.3.1","react-dom":"19.3.1"},"devDependencies":{"@modelcontextprotocol/client":"2.3.1","@types/node":"22.20.5","@types/react":"19.3.0","@types/react-dom":"19.3.0","jsdom":"28.1.0","react":"19.3.1","react-dom":"19.3.1","typescript":"^5.9.0","vitest":"^5.0.4"},"version":"0.9.0-rc.1","engines":{"node":">=22.12.0"},"repository":{"type":"git","url":"https://github.com/MachineWisdomAI/saga-a2ui.git","directory":"packages/react-mcp-stack"},"publishConfig":{"access":"public","tag":"next"}}
1
+ {"name":"@saga-a2ui/react-mcp-stack","private":false,"description":"The React and MCP Apps stack for SAGA A2UI: starts a view for an application's own catalog, and a FaithfulCard application from one validated definition, so an application installs one stack plus React and writes only its own decisions","license":"Apache-2.0","type":"module","sideEffects":["**/*.css"],"exports":{".":"./src/index.ts","./faithful-card":"./src/faithful-card/index.ts","./content-policy":"./src/content-policy/index.ts","./server":"./src/server/index.ts","./attribution.css":"./src/attribution.css","./faithful-card.css":"./src/faithful-card/faithful-card.css","./server/http":"./src/server/http/index.ts","./server/node":"./src/server/node/index.ts"},"files":["src","!src/**/*.test.ts","!src/**/*.test-support.ts"],"scripts":{"typecheck":"tsc --noEmit"},"dependencies":{"@modelcontextprotocol/ext-apps":"2.0.3","@saga-a2ui/components":"0.11.0-rc.1","@saga-a2ui/core":"0.11.0-rc.1","@saga-a2ui/mcp":"0.11.0-rc.1","@saga-a2ui/react":"0.11.0-rc.1","zod":"4.6.7"},"peerDependencies":{"react":"19.3.1","react-dom":"19.3.1"},"devDependencies":{"@modelcontextprotocol/client":"2.3.1","@types/node":"22.20.5","@types/react":"19.3.0","@types/react-dom":"19.3.0","jsdom":"28.1.0","react":"19.3.1","react-dom":"19.3.1","typescript":"^5.9.0","vitest":"^5.0.4"},"version":"0.11.0-rc.1","engines":{"node":">=22.12.0"},"repository":{"type":"git","url":"https://github.com/MachineWisdomAI/saga-a2ui.git","directory":"packages/react-mcp-stack"},"publishConfig":{"access":"public","tag":"next"}}
@@ -0,0 +1,2 @@
1
+ /* The credit stylesheet, re-exported so an application imports it from its stack. */
2
+ @import '@saga-a2ui/react/attribution.css';
package/src/index.ts CHANGED
@@ -55,5 +55,12 @@ export {
55
55
  type ReactActions,
56
56
  type ReactActionsOptions,
57
57
  } from '@saga-a2ui/react/actions';
58
+ // The removable credit, and the host-link seam it uses (`host.links`): no card or Markdown parser.
59
+ // Import its stylesheet from `@saga-a2ui/react-mcp-stack/attribution.css`.
60
+ export {
61
+ SagaAttribution,
62
+ type SagaAttributionProps,
63
+ } from '@saga-a2ui/react/attribution';
64
+ export type { HostLinks, LinkOpenOutcome } from '@saga-a2ui/core/host-links';
58
65
  export { Action, type ActionBinding } from '@saga-a2ui/core/actions';
59
66
  export type { BoundSurface } from '@saga-a2ui/react/a2ui';
@@ -0,0 +1,7 @@
1
+ export {
2
+ McpFetchConfigurationError,
3
+ createMcpFetchApp,
4
+ type McpFetchApp,
5
+ type McpFetchAppOptions,
6
+ type McpFetchFailureKind,
7
+ } from '@saga-a2ui/mcp/server/http';
@@ -8,9 +8,11 @@ import {
8
8
  import { ActionsScope, type ReactActions } from '@saga-a2ui/react/actions';
9
9
  import type { ServerTransport } from '@saga-a2ui/core/actions';
10
10
  import type { Conversation } from '@saga-a2ui/core/conversation';
11
+ import type { HostLinks } from '@saga-a2ui/core/host-links';
11
12
  import type { SurfaceLayout } from '@saga-a2ui/core/protocols/a2ui/v0_9';
12
13
  import {
13
14
  conversationFromApp,
15
+ hostLinksFromApp,
14
16
  type HostContext,
15
17
  type ToolInput,
16
18
  type ToolResult,
@@ -41,6 +43,8 @@ import type { ErrorPhase } from './start-failure.js';
41
43
  export interface ViewHost {
42
44
  /** The way an action reaches the application’s server, through the host. */
43
45
  readonly server: ServerTransport<ServerReply>;
46
+ /** The one way to ask the host to open a link, for example the destination of a `SagaAttribution`. Ends with the view. */
47
+ readonly links: HostLinks;
44
48
  /** The one way to add a message to the conversation, optionally with context for the assistant. Ends with the view. */
45
49
  readonly conversation: Conversation;
46
50
  }
@@ -151,6 +155,7 @@ export function startA2uiViewOn<TData>(
151
155
  callServerTool: (request, requestOptions) =>
152
156
  app.callServerTool(request, requestOptions),
153
157
  },
158
+ links: hostLinksFromApp(app, lifetime.signal),
154
159
  conversation: conversationFromApp(app, lifetime.signal),
155
160
  }),
156
161
  )