@streamoid/agent 0.6.52 → 0.6.53

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/README.md CHANGED
@@ -53,10 +53,13 @@ tank`); `title` keeps its original identity. Preserve proper names, acronyms and
53
53
 
54
54
  Embedded and standalone chat use `ScComposerSurface` and `ScSuggestionRow` from
55
55
  `@streamoid/ui` 0.6.86+. An empty composer starts with three 20px text lines and
56
- grows to 170px before scrolling. Suggestions are native buttons in flat rows
57
- with hairline separators, and fill the composer without navigating or sending.
56
+ grows to 170px before scrolling. Suggestions are native buttons in a stack of
57
+ cards (the DS row spaces and borders itself), and fill the composer without
58
+ navigating or sending. A panel scoped to an app shows exactly three when three
59
+ are available (see `AgentScopeAdapter.sections` in `index.d.ts`).
58
60
 
59
- The secondary line shows `meta.outcome_summary` (falling back to
60
- `meta.expected_output`), optionally followed by authored `meta.ceiling_minutes`
61
+ The secondary line shows `meta.summary` — one outcome-first sentence — falling
62
+ back to `meta.outcome_summary`, then `meta.expected_output` (which stays the
63
+ agent's spec), optionally followed by authored `meta.ceiling_minutes`
61
64
  and `meta.estimated_credits`. Unknown estimates are omitted. Scoped suggestions
62
65
  use `deliverable` and `ceilingMinutes` from the host's outcome catalogue.
package/dist/index.d.ts CHANGED
@@ -50,10 +50,20 @@ 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
+ /* The pane merges keys of its own into what is sent, never replacing the
54
+ * host's: `app_version` from `adapters.support.appVersion` on every message;
55
+ * and on a conversation started from the Get help home (`showAgentSupport`)
56
+ * `entry: "help_and_support"`, `current_page` (from `showAgentSupport({
57
+ * currentPage })`), `browser` ("Chrome") and `details_shared: true`. If the
58
+ * user removes the home's "We'll include" chip, that conversation's
59
+ * messages carry only `entry`, `details_shared: false` and the routing keys
60
+ * `scope` and `app` (plus `selection` / `ids.selection` while the composer's
61
+ * selection chip is attached) — none of the host's other keys, nor the
62
+ * pane's. The backend latches the opt-out on the conversation and strips
63
+ * the details from every later turn itself, even after a remount. */
64
+ /** Pane-set on the Get help conversation: whether the user shared the
65
+ * "We'll include" details. Hosts do not set it. */
66
+ details_shared?: boolean;
57
67
  [key: string]: unknown;
58
68
  }
59
69
 
@@ -73,9 +83,9 @@ export interface AgentSupportAdapter {
73
83
  /**
74
84
  * The host app's own build version, e.g. `0.0.61`. Sent as
75
85
  * `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.
86
+ * problem report names the build it came from. Also shown in the Get help
87
+ * home's "We'll include" chip. A `hostContext.app_version` the host passes
88
+ * itself wins over this.
79
89
  */
80
90
  appVersion?: string;
81
91
  }
@@ -179,6 +189,16 @@ export interface AgentChatShellAdapters {
179
189
  * - `sections`: the app's outcome table. One suggestion per section, from
180
190
  * its first sample's primary outcome. Change the samples and the
181
191
  * suggestions follow. Omit it for the catalog briefs this app can run alone.
192
+ * The panel shows EXACTLY THREE suggested tasks when three exist: the
193
+ * sections' suggestions in table order (a fourth and later are left to
194
+ * "View all tasks"), topped up with the catalog briefs this app can run
195
+ * alone — those flagged for the empty chat first, by their authored rank,
196
+ * then the rest — never repeating one. Fewer only when fewer exist.
197
+ * - `headline`, `subline`, `placeholder`: the panel's app-specific question,
198
+ * helper line and composer hint. Pass all three: a scoped host that leaves
199
+ * any out gets one `console.warn` in a development build. Honoured at CXO
200
+ * home too (`hostContext.app` absent or `"cxo"`), where the defaults are
201
+ * the hub's own when they are absent.
182
202
  * - `selection`: what was selected when the pane opened — a removable chip
183
203
  * in the composer, and the subject suggestions name.
184
204
  * - `onSuggestion`: DEPRECATED AND NOT CALLED. Picking a suggestion always
@@ -254,13 +274,15 @@ export interface AgentScopeAdapter {
254
274
  sections?: AgentScopeSection[] | null;
255
275
  selection?: AgentScopeSelection | null;
256
276
  /** The line above the composer before the first turn, in the host's own
257
- * words. Absent or blank = "Describe what you want to create". */
277
+ * words — the app-specific question. Absent or blank = "Describe what you
278
+ * want to create" in an app, "Run your retail operations from here" at CXO
279
+ * home. */
258
280
  headline?: string | null;
259
- /** The quieter line under it. Absent or blank = "CXO will plan the steps
260
- * and pause for your approval." */
281
+ /** The quieter helper line under it. Absent or blank = "CXO will plan the
282
+ * steps and pause for your approval." in an app, none at CXO home. */
261
283
  subline?: string | null;
262
284
  /** The empty composer's hint before the first turn. Absent or blank =
263
- * "What needs to get done". */
285
+ * "What needs to get done". Honoured in an app and at CXO home alike. */
264
286
  placeholder?: string | null;
265
287
  /**
266
288
  * @deprecated NOT CALLED. A suggestion always fills the composer. Kept so
@@ -487,7 +509,16 @@ export declare function focusAgentComposer(): void;
487
509
  * Every message of the conversation that starts on the home carries
488
510
  * `hostContext.entry = "help_and_support"`, merged into the host's own
489
511
  * 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
512
+ * routing to the support agent.
513
+ *
514
+ * The home's "We'll include" line is ONE removable chip naming what the
515
+ * support conversation is sent: workspace, `options.currentPage`, version
516
+ * and browser, after the app (plain text, always shared — it routes the
517
+ * request). Removing it (✕) sends none of them — only `entry`,
518
+ * `details_shared: false` and the routing keys `scope` and `app` — until the
519
+ * user restores it or the home is opened again. The opt-out is persisted on
520
+ * the conversation server-side, which also leaves the workspace off the
521
+ * support email and the issue. Starting a new task, or opening another
491
522
  * conversation from history, leaves the mode.
492
523
  *
493
524
  * Queued like {@link enqueueChatPrompt}: the call may come before or after the
@@ -495,4 +526,22 @@ export declare function focusAgentComposer(): void;
495
526
  * empty one. Do not also set the panel's `chatId` to a new id — `null` (or
496
527
  * leaving it alone) is right; the pane navigates itself.
497
528
  */
498
- export declare function showAgentSupport(): void;
529
+ export declare function showAgentSupport(options?: ShowAgentSupportOptions | null): void;
530
+
531
+ /** Options for {@link showAgentSupport}. All optional; omit them entirely and
532
+ * the home behaves exactly as with no argument. */
533
+ export interface ShowAgentSupportOptions {
534
+ /**
535
+ * A short, human label for where the user was BEFORE opening help — the
536
+ * task or page they were on, e.g. `"SS26 range plan"` or `"Explore"`. Not a
537
+ * URL or a route (`hostContext.url`/`route` already carry those).
538
+ *
539
+ * Shown in the home's "We'll include" chip
540
+ * (`CXO · demo workspace · SS26 range plan · v0.0.61 · Chrome`) and sent as
541
+ * `hostContext.current_page` on every message of the support conversation,
542
+ * unless the user removes the chip. Cleared when the user leaves the home or
543
+ * its conversation (New task, another conversation); each call replaces it,
544
+ * and a call without it shows none.
545
+ */
546
+ currentPage?: string | null;
547
+ }