@streamoid/agent 0.6.28 → 0.6.30

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
@@ -23,6 +23,12 @@ import "@streamoid/agent/style.css";
23
23
  - **API base:** use a relative base and proxy `/stream-agent/api/v1` to the agent
24
24
  backend from the host (same-origin → cookies flow, no CORS).
25
25
 
26
- > This is the **built** package, committed for publish provenance. It is generated
27
- > from the stream-agent frontend via `npm run build:lib` — do not hand-edit.
28
- > Rebuild and `npm publish` from this directory.
26
+ > This directory is the package TEMPLATE, not the package. `npm run build:lib` in
27
+ > the stream-agent frontend copies it over the bundle it builds — do not hand-edit
28
+ > the published output.
29
+ >
30
+ > **Publishing is not manual.** `.github/workflows/publish-agent.yml` publishes on
31
+ > every push to `develop` whose `version` here is not yet on npm, then opens a pin
32
+ > bump PR in every consumer. So the one thing a change to the chat needs is a new
33
+ > version in this directory's `package.json`; merging it ships everything else.
34
+ > The `agent-version` check on each PR fails if that has been forgotten.
package/dist/index.d.ts CHANGED
@@ -67,7 +67,24 @@ export interface AgentChatShellAdapters {
67
67
  theme: { mode: 'light' | 'dark' };
68
68
  config: {
69
69
  apiBase: string;
70
- hide?: { sidepane?: boolean; newBrief?: boolean; notifications?: boolean };
70
+ hide?: {
71
+ sidepane?: boolean;
72
+ newBrief?: boolean;
73
+ notifications?: boolean;
74
+ /**
75
+ * Drop the panel's own header strip — the title, "New task", "History"
76
+ * and the close.
77
+ *
78
+ * Default `false`: without the strip the panel offers no way to start a
79
+ * second task or reach a previous one, and most hosts have no list of
80
+ * their own. Pass `true` only where the host really does own those
81
+ * controls (CXO's left rail lists conversations already).
82
+ *
83
+ * NOT the same as `newBrief`, which is about the standalone app's chrome
84
+ * and which every host sets from the same copied snippet.
85
+ */
86
+ header?: boolean;
87
+ };
71
88
  /**
72
89
  * `inline_ask` declares this mount an inline assistant sitting on top of a
73
90
  * host application page. It unlocks the tools that only make sense there —
@@ -75,6 +92,12 @@ export interface AgentChatShellAdapters {
75
92
  * instructions to the prompt. Defaults to `normal`.
76
93
  */
77
94
  widgetMode?: 'normal' | 'inline_ask';
95
+ /**
96
+ * What the panel's header strip calls the assistant. Defaults to `Ask CXO`
97
+ * — a value baked in when the package was built, so a host that brands the
98
+ * assistant differently has no other way to change it.
99
+ */
100
+ title?: string;
78
101
  };
79
102
  navigation: {
80
103
  chatId: string | null;
@@ -83,6 +106,16 @@ export interface AgentChatShellAdapters {
83
106
  /** Backend recovered after an outage — host decides what to do (must NOT
84
107
  * reload the host window). */
85
108
  onBackendRecovered?: () => void;
109
+ /**
110
+ * Close the panel. Supply it and the close is drawn in the panel's own header
111
+ * strip, beside "New task" and "History".
112
+ *
113
+ * A host that draws its own close over the panel's top-right corner (Artifax
114
+ * does, absolutely positioned, with a reserved band above the transcript) can
115
+ * hand it over here and drop both the button and the band. Omit it and
116
+ * nothing changes — no close is drawn and the host's own still works.
117
+ */
118
+ onClose?: () => void;
86
119
  /**
87
120
  * The page the panel is sitting on. Sent with every message, so update it as
88
121
  * the user navigates: the agent then knows where they are without spending a