@streamoid/agent 0.6.51 → 0.6.52

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.d.ts CHANGED
@@ -50,6 +50,10 @@ export interface AgentHostContext {
50
50
  ids?: Record<string, string | number>;
51
51
  /** A short list of what is on screen — board names, selected items. */
52
52
  visible?: string[];
53
+ /* The pane merges two keys of its own into what is sent, never replacing
54
+ * the host's: `entry: "help_and_support"` on a conversation started from
55
+ * the Get help home (`showAgentSupport`), and `app_version` from
56
+ * `adapters.support.appVersion`. */
53
57
  [key: string]: unknown;
54
58
  }
55
59
 
@@ -63,6 +67,19 @@ export interface AgentSurfaceState {
63
67
  activePanel?: { id: string; kind: string; title: string } | null;
64
68
  }
65
69
 
70
+ /** `adapters.support` — what the "Get help" home ({@link showAgentSupport})
71
+ * and its messages say about the host. All optional; the home works without. */
72
+ export interface AgentSupportAdapter {
73
+ /**
74
+ * The host app's own build version, e.g. `0.0.61`. Sent as
75
+ * `hostContext.app_version` with EVERY message — support or not — so a
76
+ * problem report names the build it came from. Also shown as a chip on the
77
+ * Get help home's "We'll include" line. A `hostContext.app_version` the host
78
+ * passes itself wins over this.
79
+ */
80
+ appVersion?: string;
81
+ }
82
+
66
83
  export interface AgentChatShellAdapters {
67
84
  auth: AgentChatShellAuth;
68
85
  workspace: { current: AgentChatShellWorkspace };
@@ -171,6 +188,12 @@ export interface AgentChatShellAdapters {
171
188
  * offered the widening by the run that needs it.
172
189
  */
173
190
  scope?: AgentScopeAdapter | null;
191
+ /**
192
+ * Details for the "Get help" home ({@link showAgentSupport}) and for message
193
+ * routing. Purely additive. There are deliberately no billing or credit
194
+ * callbacks: the billing flow runs in the chat, driven by the support agent.
195
+ */
196
+ support?: AgentSupportAdapter | null;
174
197
  }
175
198
 
176
199
  export interface AgentScopeOutcome {
@@ -448,3 +471,28 @@ export declare function enqueueChatPrompt(
448
471
  * mounts, so reveal-then-call and call-then-reveal both work.
449
472
  */
450
473
  export declare function focusAgentComposer(): void;
474
+
475
+ /**
476
+ * Open the pane's "Get help" home. Call it from the app switcher's "Help and
477
+ * Support" row, in the same handler that reveals the pane.
478
+ *
479
+ * This REPLACES `enqueueChatPrompt({ prompt: "I need help and support",
480
+ * forceNewConversation: true })`, which auto-sent a message. This sends
481
+ * nothing: the pane shows a fresh, empty conversation as the Get help home —
482
+ * a title, an incident banner when a product is degraded, the ordinary
483
+ * composer, a "We'll include" line and four cards (Ask a question, Report a
484
+ * problem, Talk to the Streamoid team, Billing and credits). A card sends its
485
+ * prompt through the chat's own send path; typing works as usual.
486
+ *
487
+ * Every message of the conversation that starts on the home carries
488
+ * `hostContext.entry = "help_and_support"`, merged into the host's own
489
+ * context, for as long as that conversation stays open — so follow-ups keep
490
+ * routing to the support agent. Starting a new task, or opening another
491
+ * conversation from history, leaves the mode.
492
+ *
493
+ * Queued like {@link enqueueChatPrompt}: the call may come before or after the
494
+ * pane mounts. Calling it while another conversation is open starts a new,
495
+ * empty one. Do not also set the panel's `chatId` to a new id — `null` (or
496
+ * leaving it alone) is right; the pane navigates itself.
497
+ */
498
+ export declare function showAgentSupport(): void;