@runtypelabs/persona-proxy 3.26.0 → 3.32.0
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/index.cjs +143 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +59 -1
- package/dist/index.d.ts +59 -1
- package/dist/index.js +140 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/flows/index.ts +3 -0
- package/src/flows/webmcp-calendar.ts +60 -0
- package/src/flows/webmcp-docked.ts +53 -0
- package/src/flows/webmcp-slides.ts +78 -0
- package/src/flows/webmcp-storefront.ts +1 -0
package/dist/index.d.cts
CHANGED
|
@@ -86,6 +86,64 @@ declare const STOREFRONT_ASSISTANT_FLOW: RuntypeFlowConfig;
|
|
|
86
86
|
*/
|
|
87
87
|
declare const WEBMCP_STOREFRONT_FLOW: RuntypeFlowConfig;
|
|
88
88
|
|
|
89
|
+
/**
|
|
90
|
+
* WebMCP calendar flow for the calendar copilot demo
|
|
91
|
+
* (`examples/embedded-app/webmcp-calendar.html`).
|
|
92
|
+
*
|
|
93
|
+
* Like WEBMCP_STOREFRONT_FLOW, this agent owns **no** tools of its own. The
|
|
94
|
+
* demo page registers ten calendar tools on `document.modelContext` via WebMCP
|
|
95
|
+
* (`get_calendar_state`, `get_events`, `get_users`, `get_event_colors`,
|
|
96
|
+
* `find_availability`, `select_date`, `create_event`, `update_event`,
|
|
97
|
+
* `delete_event`, `get_page_title`); the widget snapshots them every turn and
|
|
98
|
+
* the proxy forwards them on the dispatch payload as `clientTools[]`. The
|
|
99
|
+
* model calls them by name and the widget executes them **on the page**,
|
|
100
|
+
* posting results back via `/resume` — so the calendar UI updates live.
|
|
101
|
+
*
|
|
102
|
+
* The page's tool contract is timezone-safe by design: all date-times are
|
|
103
|
+
* LOCAL wall-clock strings (`YYYY-MM-DDTHH:mm`, no "Z"/UTC offset), and
|
|
104
|
+
* `get_calendar_state` reports the current local date-time and timezone. The
|
|
105
|
+
* system prompt reinforces that contract so "8am" always lands at 8am on the
|
|
106
|
+
* visible calendar.
|
|
107
|
+
*/
|
|
108
|
+
declare const WEBMCP_CALENDAR_FLOW: RuntypeFlowConfig;
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* WebMCP slide-editor flow for the Deck Copilot demo
|
|
112
|
+
* (`examples/embedded-app/webmcp-slides.html`).
|
|
113
|
+
*
|
|
114
|
+
* Like the other WebMCP flows, this agent owns **no** tools of its own — the
|
|
115
|
+
* demo page registers them on `document.modelContext` and the widget snapshots
|
|
116
|
+
* them every turn into `clientTools[]`. What makes this flow different is that
|
|
117
|
+
* the page's tool set is *dynamic*: selection-scoped tools
|
|
118
|
+
* (`style_selection`, `align_selection`) only exist while the user has 2+
|
|
119
|
+
* elements selected, and entering presenter mode replaces the entire editing
|
|
120
|
+
* set with show controls (`next_slide`, `prev_slide`, `jump_to_slide`,
|
|
121
|
+
* `exit_presenter_mode`). The system prompt teaches the model to treat the
|
|
122
|
+
* current tool list as authoritative rather than assuming a fixed catalog.
|
|
123
|
+
*
|
|
124
|
+
* The page also ships live editor state as `{{slides_context}}` via the
|
|
125
|
+
* widget's `contextProviders` + `requestMiddleware` (moved from
|
|
126
|
+
* `payload.context` into `inputs`): current slide, mode, and the user's
|
|
127
|
+
* selection with ids and bounding boxes — so "align these" resolves without a
|
|
128
|
+
* round-trip.
|
|
129
|
+
*/
|
|
130
|
+
declare const WEBMCP_SLIDES_FLOW: RuntypeFlowConfig;
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* WebMCP docked-dashboard flow for the docked panel demo
|
|
134
|
+
* (`examples/embedded-app/docked-panel-demo.html`).
|
|
135
|
+
*
|
|
136
|
+
* Like the other WebMCP flows, this agent owns **no** tools of its own. The
|
|
137
|
+
* demo page registers four workspace tools on `document.modelContext` via
|
|
138
|
+
* WebMCP (`get_workspace_overview`, `switch_section`, `set_dock_layout`,
|
|
139
|
+
* `log_activity`); the widget snapshots them every turn and the proxy
|
|
140
|
+
* forwards them on the dispatch payload as `clientTools[]`. The model calls
|
|
141
|
+
* them by name and the widget executes them **on the page**, posting results
|
|
142
|
+
* back via `/resume` — so the dashboard (and even the assistant's own dock
|
|
143
|
+
* placement) updates live.
|
|
144
|
+
*/
|
|
145
|
+
declare const WEBMCP_DOCKED_FLOW: RuntypeFlowConfig;
|
|
146
|
+
|
|
89
147
|
/**
|
|
90
148
|
* Page-aware shopping assistant that can both *describe* and *act on* the page.
|
|
91
149
|
*
|
|
@@ -207,4 +265,4 @@ type ChatProxyOptions = {
|
|
|
207
265
|
declare const createChatProxyApp: (options?: ChatProxyOptions) => Hono<hono_types.BlankEnv, hono_types.BlankSchema, "/">;
|
|
208
266
|
declare const createVercelHandler: (options?: ChatProxyOptions) => (req: Request) => Response | Promise<Response>;
|
|
209
267
|
|
|
210
|
-
export { BAKERY_ASSISTANT_FLOW, COMPONENT_FLOW, CONVERSATIONAL_FLOW, type ChatProxyOptions, type CheckoutItem, type CheckoutSessionResponse, type CreateCheckoutSessionOptions, FORM_DIRECTIVE_FLOW, type FeedbackHandler, type FeedbackPayload, PAGE_CONTEXT_FLOW, type RuntypeFlowConfig, type RuntypeFlowStep, SHOPPING_ASSISTANT_FLOW, SHOPPING_ASSISTANT_METADATA_FLOW, STOREFRONT_ASSISTANT_FLOW, WEBMCP_STOREFRONT_FLOW, createChatProxyApp, createCheckoutSession, createVercelHandler, createChatProxyApp as default };
|
|
268
|
+
export { BAKERY_ASSISTANT_FLOW, COMPONENT_FLOW, CONVERSATIONAL_FLOW, type ChatProxyOptions, type CheckoutItem, type CheckoutSessionResponse, type CreateCheckoutSessionOptions, FORM_DIRECTIVE_FLOW, type FeedbackHandler, type FeedbackPayload, PAGE_CONTEXT_FLOW, type RuntypeFlowConfig, type RuntypeFlowStep, SHOPPING_ASSISTANT_FLOW, SHOPPING_ASSISTANT_METADATA_FLOW, STOREFRONT_ASSISTANT_FLOW, WEBMCP_CALENDAR_FLOW, WEBMCP_DOCKED_FLOW, WEBMCP_SLIDES_FLOW, WEBMCP_STOREFRONT_FLOW, createChatProxyApp, createCheckoutSession, createVercelHandler, createChatProxyApp as default };
|
package/dist/index.d.ts
CHANGED
|
@@ -86,6 +86,64 @@ declare const STOREFRONT_ASSISTANT_FLOW: RuntypeFlowConfig;
|
|
|
86
86
|
*/
|
|
87
87
|
declare const WEBMCP_STOREFRONT_FLOW: RuntypeFlowConfig;
|
|
88
88
|
|
|
89
|
+
/**
|
|
90
|
+
* WebMCP calendar flow for the calendar copilot demo
|
|
91
|
+
* (`examples/embedded-app/webmcp-calendar.html`).
|
|
92
|
+
*
|
|
93
|
+
* Like WEBMCP_STOREFRONT_FLOW, this agent owns **no** tools of its own. The
|
|
94
|
+
* demo page registers ten calendar tools on `document.modelContext` via WebMCP
|
|
95
|
+
* (`get_calendar_state`, `get_events`, `get_users`, `get_event_colors`,
|
|
96
|
+
* `find_availability`, `select_date`, `create_event`, `update_event`,
|
|
97
|
+
* `delete_event`, `get_page_title`); the widget snapshots them every turn and
|
|
98
|
+
* the proxy forwards them on the dispatch payload as `clientTools[]`. The
|
|
99
|
+
* model calls them by name and the widget executes them **on the page**,
|
|
100
|
+
* posting results back via `/resume` — so the calendar UI updates live.
|
|
101
|
+
*
|
|
102
|
+
* The page's tool contract is timezone-safe by design: all date-times are
|
|
103
|
+
* LOCAL wall-clock strings (`YYYY-MM-DDTHH:mm`, no "Z"/UTC offset), and
|
|
104
|
+
* `get_calendar_state` reports the current local date-time and timezone. The
|
|
105
|
+
* system prompt reinforces that contract so "8am" always lands at 8am on the
|
|
106
|
+
* visible calendar.
|
|
107
|
+
*/
|
|
108
|
+
declare const WEBMCP_CALENDAR_FLOW: RuntypeFlowConfig;
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* WebMCP slide-editor flow for the Deck Copilot demo
|
|
112
|
+
* (`examples/embedded-app/webmcp-slides.html`).
|
|
113
|
+
*
|
|
114
|
+
* Like the other WebMCP flows, this agent owns **no** tools of its own — the
|
|
115
|
+
* demo page registers them on `document.modelContext` and the widget snapshots
|
|
116
|
+
* them every turn into `clientTools[]`. What makes this flow different is that
|
|
117
|
+
* the page's tool set is *dynamic*: selection-scoped tools
|
|
118
|
+
* (`style_selection`, `align_selection`) only exist while the user has 2+
|
|
119
|
+
* elements selected, and entering presenter mode replaces the entire editing
|
|
120
|
+
* set with show controls (`next_slide`, `prev_slide`, `jump_to_slide`,
|
|
121
|
+
* `exit_presenter_mode`). The system prompt teaches the model to treat the
|
|
122
|
+
* current tool list as authoritative rather than assuming a fixed catalog.
|
|
123
|
+
*
|
|
124
|
+
* The page also ships live editor state as `{{slides_context}}` via the
|
|
125
|
+
* widget's `contextProviders` + `requestMiddleware` (moved from
|
|
126
|
+
* `payload.context` into `inputs`): current slide, mode, and the user's
|
|
127
|
+
* selection with ids and bounding boxes — so "align these" resolves without a
|
|
128
|
+
* round-trip.
|
|
129
|
+
*/
|
|
130
|
+
declare const WEBMCP_SLIDES_FLOW: RuntypeFlowConfig;
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* WebMCP docked-dashboard flow for the docked panel demo
|
|
134
|
+
* (`examples/embedded-app/docked-panel-demo.html`).
|
|
135
|
+
*
|
|
136
|
+
* Like the other WebMCP flows, this agent owns **no** tools of its own. The
|
|
137
|
+
* demo page registers four workspace tools on `document.modelContext` via
|
|
138
|
+
* WebMCP (`get_workspace_overview`, `switch_section`, `set_dock_layout`,
|
|
139
|
+
* `log_activity`); the widget snapshots them every turn and the proxy
|
|
140
|
+
* forwards them on the dispatch payload as `clientTools[]`. The model calls
|
|
141
|
+
* them by name and the widget executes them **on the page**, posting results
|
|
142
|
+
* back via `/resume` — so the dashboard (and even the assistant's own dock
|
|
143
|
+
* placement) updates live.
|
|
144
|
+
*/
|
|
145
|
+
declare const WEBMCP_DOCKED_FLOW: RuntypeFlowConfig;
|
|
146
|
+
|
|
89
147
|
/**
|
|
90
148
|
* Page-aware shopping assistant that can both *describe* and *act on* the page.
|
|
91
149
|
*
|
|
@@ -207,4 +265,4 @@ type ChatProxyOptions = {
|
|
|
207
265
|
declare const createChatProxyApp: (options?: ChatProxyOptions) => Hono<hono_types.BlankEnv, hono_types.BlankSchema, "/">;
|
|
208
266
|
declare const createVercelHandler: (options?: ChatProxyOptions) => (req: Request) => Response | Promise<Response>;
|
|
209
267
|
|
|
210
|
-
export { BAKERY_ASSISTANT_FLOW, COMPONENT_FLOW, CONVERSATIONAL_FLOW, type ChatProxyOptions, type CheckoutItem, type CheckoutSessionResponse, type CreateCheckoutSessionOptions, FORM_DIRECTIVE_FLOW, type FeedbackHandler, type FeedbackPayload, PAGE_CONTEXT_FLOW, type RuntypeFlowConfig, type RuntypeFlowStep, SHOPPING_ASSISTANT_FLOW, SHOPPING_ASSISTANT_METADATA_FLOW, STOREFRONT_ASSISTANT_FLOW, WEBMCP_STOREFRONT_FLOW, createChatProxyApp, createCheckoutSession, createVercelHandler, createChatProxyApp as default };
|
|
268
|
+
export { BAKERY_ASSISTANT_FLOW, COMPONENT_FLOW, CONVERSATIONAL_FLOW, type ChatProxyOptions, type CheckoutItem, type CheckoutSessionResponse, type CreateCheckoutSessionOptions, FORM_DIRECTIVE_FLOW, type FeedbackHandler, type FeedbackPayload, PAGE_CONTEXT_FLOW, type RuntypeFlowConfig, type RuntypeFlowStep, SHOPPING_ASSISTANT_FLOW, SHOPPING_ASSISTANT_METADATA_FLOW, STOREFRONT_ASSISTANT_FLOW, WEBMCP_CALENDAR_FLOW, WEBMCP_DOCKED_FLOW, WEBMCP_SLIDES_FLOW, WEBMCP_STOREFRONT_FLOW, createChatProxyApp, createCheckoutSession, createVercelHandler, createChatProxyApp as default };
|
package/dist/index.js
CHANGED
|
@@ -570,6 +570,7 @@ Rules:
|
|
|
570
570
|
- If the shopper asks to add two (or more) specific items "at the same time" / "both", emit the add_to_cart calls together in one turn so they batch.
|
|
571
571
|
- Only apply a promo code the shopper actually gives you; if it's rejected, say so and suggest they double-check the code.
|
|
572
572
|
- If a tool reports an item wasn't found or isn't in the cart, relay that plainly and offer to search.
|
|
573
|
+
- Tool results include product \`imageUrl\` and \`imageAlt\`. When you recommend, compare, or describe specific products, include Markdown product images when it helps the shopper decide: \`\`. Use the exact imageUrl/imageAlt from the tool result, include at most three product images in one reply, and skip images for pure cart-total/status replies unless a single changed item is the focus.
|
|
573
574
|
|
|
574
575
|
After your tool calls resolve, summarize the outcome in plain language (what you found, what's in the cart, the total). Do not describe tools, JSON, SKUs, or the WebMCP mechanism to the shopper.`,
|
|
575
576
|
previousMessages: "{{messages}}"
|
|
@@ -578,6 +579,142 @@ After your tool calls resolve, summarize the outcome in plain language (what you
|
|
|
578
579
|
]
|
|
579
580
|
};
|
|
580
581
|
|
|
582
|
+
// src/flows/webmcp-calendar.ts
|
|
583
|
+
var WEBMCP_CALENDAR_FLOW = {
|
|
584
|
+
name: "WebMCP Calendar Flow",
|
|
585
|
+
description: "Calendar copilot \u2014 drives page-provided WebMCP calendar tools (clientTools[])",
|
|
586
|
+
steps: [
|
|
587
|
+
{
|
|
588
|
+
id: "webmcp_calendar_prompt",
|
|
589
|
+
name: "WebMCP Calendar Prompt",
|
|
590
|
+
type: "prompt",
|
|
591
|
+
enabled: true,
|
|
592
|
+
config: {
|
|
593
|
+
model: "nemotron-3-ultra-550b-a55b",
|
|
594
|
+
reasoning: false,
|
|
595
|
+
responseFormat: "markdown",
|
|
596
|
+
outputVariable: "prompt_result",
|
|
597
|
+
userPrompt: "{{user_message}}",
|
|
598
|
+
systemPrompt: `You are the Calendar Copilot for a team scheduling dashboard. You help the user inspect availability, create, move, and delete events \u2014 the calendar on the page updates live as your tools run.
|
|
599
|
+
|
|
600
|
+
Voice: helpful, concise, plain language. Keep replies short \u2014 a sentence or two around the actions you take.
|
|
601
|
+
|
|
602
|
+
## Your tools come from the page
|
|
603
|
+
|
|
604
|
+
The dashboard exposes its own calendar tools to you. Always **use the tools** to read or change the calendar \u2014 never invent events, IDs, owners, or availability from memory.
|
|
605
|
+
|
|
606
|
+
Rules:
|
|
607
|
+
- Start by calling **get_calendar_state** to learn today's date, the current local time, the timezone, and the visible week before resolving relative dates like "tomorrow" or "Thursday".
|
|
608
|
+
- All date-times are LOCAL wall-clock strings in the calendar's timezone, formatted \`YYYY-MM-DDTHH:mm\`. Never append "Z" or a UTC offset \u2014 write the clock time the user said.
|
|
609
|
+
- Use a real userId from **get_users** and a color from **get_event_colors** when creating events. Do not guess IDs.
|
|
610
|
+
- Before proposing a meeting time, check **find_availability** for that date; the workday is 9am\u20135pm local.
|
|
611
|
+
- To change or remove an event, find its eventId via **get_events** or **get_calendar_state** first.
|
|
612
|
+
- After a mutation, confirm briefly what changed (title, day, time) \u2014 the page renders the calendar, so don't repeat the full schedule unless asked.
|
|
613
|
+
- If a tool reports an error (invalid time, missing event), relay it plainly and suggest a fix.
|
|
614
|
+
|
|
615
|
+
After your tool calls resolve, summarize the outcome in plain language. Do not describe tools, JSON, IDs, or the WebMCP mechanism to the user unless they ask.`,
|
|
616
|
+
previousMessages: "{{messages}}"
|
|
617
|
+
}
|
|
618
|
+
}
|
|
619
|
+
]
|
|
620
|
+
};
|
|
621
|
+
|
|
622
|
+
// src/flows/webmcp-slides.ts
|
|
623
|
+
var WEBMCP_SLIDES_FLOW = {
|
|
624
|
+
name: "WebMCP Slides Flow",
|
|
625
|
+
description: "Deck Copilot \u2014 drives a slide editor's page-provided WebMCP tools (clientTools[])",
|
|
626
|
+
steps: [
|
|
627
|
+
{
|
|
628
|
+
id: "webmcp_slides_prompt",
|
|
629
|
+
name: "WebMCP Slides Prompt",
|
|
630
|
+
type: "prompt",
|
|
631
|
+
enabled: true,
|
|
632
|
+
config: {
|
|
633
|
+
model: "nemotron-3-ultra-550b-a55b",
|
|
634
|
+
reasoning: false,
|
|
635
|
+
responseFormat: "markdown",
|
|
636
|
+
outputVariable: "prompt_result",
|
|
637
|
+
userPrompt: "{{user_message}}",
|
|
638
|
+
systemPrompt: `You are the Deck Copilot inside a live slide-deck editor. You build, restyle, align, and present slides \u2014 the canvas on the page updates instantly as your tools run, and the user is watching.
|
|
639
|
+
|
|
640
|
+
Voice: concise and design-literate. A sentence or two around the actions you take; never narrate every tool call.
|
|
641
|
+
|
|
642
|
+
## Your tools come from the page \u2014 and they change
|
|
643
|
+
|
|
644
|
+
The editor exposes its own tools to you, and the set is dynamic:
|
|
645
|
+
- While the user has 2 or more elements selected, extra selection tools appear (style_selection, align_selection) that act on the live selection without needing ids.
|
|
646
|
+
- When the show starts (enter_presenter_mode), your editing tools are REPLACED by presentation controls (next_slide, prev_slide, jump_to_slide, exit_presenter_mode) until the show ends.
|
|
647
|
+
|
|
648
|
+
Treat the tool list you currently see as authoritative. Never invent slide ids, element ids, or theme ids \u2014 read them from tool results.
|
|
649
|
+
|
|
650
|
+
## Read before you write
|
|
651
|
+
|
|
652
|
+
- Call get_deck_overview to orient yourself when you need the deck's shape; call get_slide before editing a slide's elements.
|
|
653
|
+
- Mutations return the ids they created or touched \u2014 chain on those instead of re-reading the deck.
|
|
654
|
+
- A {{slides_context}} block rides along with every message: the current slide, the editor mode, and the user's live selection (ids + bounding boxes). When the user says "this", "these", or "the selected boxes", use that context (or get_selection) \u2014 do not guess.
|
|
655
|
+
|
|
656
|
+
## Geometry and style conventions
|
|
657
|
+
|
|
658
|
+
- The canvas is 960 wide x 540 tall, origin at the top-left. Keep ~40px margins; slide titles sit around y 40-60 at fontSize 36-48.
|
|
659
|
+
- Prefer theme tokens over literal colors and fonts: 'theme.text', 'theme.accent', 'theme.background', 'theme.surface', 'theme.accentText' for colors, 'theme.heading' / 'theme.body' for fonts. Token-styled elements restyle automatically when apply_theme runs \u2014 hex values do not.
|
|
660
|
+
- Build slides with add_slide layouts first, then refine with update_element patches (one patch can move, resize, and restyle at once). Use align_elements / distribute_elements for clean composition instead of eyeballing coordinates.
|
|
661
|
+
|
|
662
|
+
## Etiquette
|
|
663
|
+
|
|
664
|
+
- Destructive or deck-wide tools (delete_slide, delete_elements, apply_theme) ask the user for confirmation \u2014 if the user declines, accept it and move on.
|
|
665
|
+
- Every change you make lands on the editor's undo stack; the user can reverse you with Cmd+Z. Don't be precious about edits.
|
|
666
|
+
- After mutations, confirm briefly what changed \u2014 the user can see the canvas, so don't re-describe slides in detail.
|
|
667
|
+
- If a tool reports an error (unknown id, too few elements selected), relay it plainly and suggest the fix.
|
|
668
|
+
- Never mention JSON, ids, tool schemas, or the WebMCP mechanism unless the user asks.
|
|
669
|
+
|
|
670
|
+
## Live editor state
|
|
671
|
+
|
|
672
|
+
{{slides_context}}`,
|
|
673
|
+
previousMessages: "{{messages}}"
|
|
674
|
+
}
|
|
675
|
+
}
|
|
676
|
+
]
|
|
677
|
+
};
|
|
678
|
+
|
|
679
|
+
// src/flows/webmcp-docked.ts
|
|
680
|
+
var WEBMCP_DOCKED_FLOW = {
|
|
681
|
+
name: "WebMCP Docked Dashboard Flow",
|
|
682
|
+
description: "Dashboard copilot \u2014 drives page-provided WebMCP workspace tools (clientTools[])",
|
|
683
|
+
steps: [
|
|
684
|
+
{
|
|
685
|
+
id: "webmcp_docked_prompt",
|
|
686
|
+
name: "WebMCP Docked Prompt",
|
|
687
|
+
type: "prompt",
|
|
688
|
+
enabled: true,
|
|
689
|
+
config: {
|
|
690
|
+
model: "nemotron-3-ultra-550b-a55b",
|
|
691
|
+
reasoning: false,
|
|
692
|
+
responseFormat: "markdown",
|
|
693
|
+
outputVariable: "prompt_result",
|
|
694
|
+
userPrompt: "{{user_message}}",
|
|
695
|
+
systemPrompt: `You are Copilot, a dashboard assistant docked beside an operations workspace. You help the user read what's on the dashboard, move around it, jot activity notes, and even reposition your own panel \u2014 the page updates live as your tools run.
|
|
696
|
+
|
|
697
|
+
Voice: helpful, concise, plain language. Keep replies short \u2014 a sentence or two around the actions you take.
|
|
698
|
+
|
|
699
|
+
## Your tools come from the page
|
|
700
|
+
|
|
701
|
+
The dashboard exposes its own tools to you. Always **use the tools** to read or change the workspace \u2014 never invent metrics, cards, sections, or activity from memory.
|
|
702
|
+
|
|
703
|
+
Rules:
|
|
704
|
+
- Call **get_workspace_overview** before answering questions about the dashboard \u2014 it returns the sections, the active section, the highlight cards, and the recent-activity feed.
|
|
705
|
+
- **switch_section** changes which workspace section is highlighted in the side nav. Use the exact section names from the overview.
|
|
706
|
+
- **set_dock_layout** moves and resizes YOUR own panel (side left/right, width, reveal style, animation). When the user says "move yourself" or "dock on the left", this is the tool. Confirm what changed afterward.
|
|
707
|
+
- **log_activity** appends an entry to the Recent activity feed. Use it when the user asks you to note, record, or log something. Keep titles short; put detail in the body.
|
|
708
|
+
- After a mutation, confirm briefly what changed \u2014 the page renders the result, so don't repeat the full dashboard unless asked.
|
|
709
|
+
- If a tool reports an error (unknown section, invalid width), relay it plainly and suggest a fix.
|
|
710
|
+
|
|
711
|
+
After your tool calls resolve, summarize the outcome in plain language. Do not describe tools, JSON, or the WebMCP mechanism to the user unless they ask.`,
|
|
712
|
+
previousMessages: "{{messages}}"
|
|
713
|
+
}
|
|
714
|
+
}
|
|
715
|
+
]
|
|
716
|
+
};
|
|
717
|
+
|
|
581
718
|
// src/flows/page-context.ts
|
|
582
719
|
var PAGE_CONTEXT_FLOW = {
|
|
583
720
|
name: "Page Context Assistant Flow",
|
|
@@ -1034,6 +1171,9 @@ export {
|
|
|
1034
1171
|
SHOPPING_ASSISTANT_FLOW,
|
|
1035
1172
|
SHOPPING_ASSISTANT_METADATA_FLOW,
|
|
1036
1173
|
STOREFRONT_ASSISTANT_FLOW,
|
|
1174
|
+
WEBMCP_CALENDAR_FLOW,
|
|
1175
|
+
WEBMCP_DOCKED_FLOW,
|
|
1176
|
+
WEBMCP_SLIDES_FLOW,
|
|
1037
1177
|
WEBMCP_STOREFRONT_FLOW,
|
|
1038
1178
|
createChatProxyApp,
|
|
1039
1179
|
createCheckoutSession,
|