@invergent/agent-chat-react 1.5.10 → 1.6.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/dist/index.cjs +595 -238
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +21 -2
- package/dist/index.d.ts +21 -2
- package/dist/index.js +568 -212
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -5,7 +5,7 @@ import { Streamdown } from 'streamdown';
|
|
|
5
5
|
|
|
6
6
|
type AgentChatRole = "user" | "assistant" | "system";
|
|
7
7
|
type AgentChatMessageStatus = "complete" | "streaming" | "error";
|
|
8
|
-
type AgentChatSystemKind = "skill_invoked" | "artifact" | "error";
|
|
8
|
+
type AgentChatSystemKind = "skill_invoked" | "artifact" | "error" | "browser_marker" | "browser_marker_warning";
|
|
9
9
|
interface AgentChatImageAttachment {
|
|
10
10
|
/** data: URL (data:image/png;base64,...) or raw base64 string */
|
|
11
11
|
data: string;
|
|
@@ -132,12 +132,25 @@ interface AgentChatScheduledWorkList {
|
|
|
132
132
|
items: AgentChatScheduledWorkItem[];
|
|
133
133
|
total: number;
|
|
134
134
|
}
|
|
135
|
-
type AgentChatEventType = "user.message" | "llm.request" | "llm.response" | "llm.thinking" | "llm.delta" | "tool.call" | "tool.result" | "session.start" | "session.pause" | "session.resume" | "session.complete" | "session.fail" | "session.done" | "harness.wake" | "harness.crash" | "context.compact" | "skill.invoked" | "policy.denied" | "stream.timeout" | "expert.result" | "expert.endorse" | "expert.override" | "artifact.created" | "artifact.updated" | "clarify.response";
|
|
135
|
+
type AgentChatEventType = "user.message" | "llm.request" | "llm.response" | "llm.thinking" | "llm.delta" | "tool.call" | "tool.result" | "session.start" | "session.pause" | "session.resume" | "session.complete" | "session.fail" | "session.done" | "harness.wake" | "harness.crash" | "context.compact" | "skill.invoked" | "policy.denied" | "stream.timeout" | "expert.result" | "expert.endorse" | "expert.override" | "artifact.created" | "artifact.updated" | "browser.provisioned" | "browser.destroyed" | "browser.control_granted" | "browser.control_returned" | "clarify.response";
|
|
136
136
|
interface AgentChatRuntimeEvent {
|
|
137
137
|
type: AgentChatEventType;
|
|
138
138
|
eventId: number;
|
|
139
139
|
data: Record<string, unknown>;
|
|
140
140
|
}
|
|
141
|
+
interface AgentChatBrowserState {
|
|
142
|
+
status: "provisioning" | "live" | "user-control" | "closed";
|
|
143
|
+
controlOwner: string | null;
|
|
144
|
+
}
|
|
145
|
+
interface AgentChatBrowserStateResponse {
|
|
146
|
+
status: "live" | "user-control";
|
|
147
|
+
controlOwner: string | null;
|
|
148
|
+
liveViewPath: string;
|
|
149
|
+
}
|
|
150
|
+
interface AgentChatBrowserControlResponse {
|
|
151
|
+
outcome: "granted" | "refreshed" | "conflict";
|
|
152
|
+
ownerUserId: string;
|
|
153
|
+
}
|
|
141
154
|
interface AgentChatState {
|
|
142
155
|
messages: AgentChatMessage[];
|
|
143
156
|
isRunning: boolean;
|
|
@@ -149,6 +162,7 @@ interface AgentChatState {
|
|
|
149
162
|
hadDeltas: boolean;
|
|
150
163
|
terminal: boolean;
|
|
151
164
|
workspaceRefreshKey: number;
|
|
165
|
+
browser: AgentChatBrowserState | null;
|
|
152
166
|
}
|
|
153
167
|
type AgentChatArtifactKind = "markdown" | "table" | "chart" | "html" | "svg";
|
|
154
168
|
interface AgentChatArtifactMeta {
|
|
@@ -359,8 +373,13 @@ interface AgentChatAdapter {
|
|
|
359
373
|
sessionId: string;
|
|
360
374
|
after: number;
|
|
361
375
|
}): AgentChatEventStream;
|
|
376
|
+
getBrowserState(sessionId: string): Promise<AgentChatBrowserStateResponse | null>;
|
|
377
|
+
acquireBrowserControl(sessionId: string): Promise<AgentChatBrowserControlResponse>;
|
|
378
|
+
releaseBrowserControl(sessionId: string): Promise<void>;
|
|
379
|
+
browserLiveViewUrl(sessionId: string): string;
|
|
362
380
|
}
|
|
363
381
|
interface AgentChatRuntimeApi {
|
|
382
|
+
state: AgentChatState;
|
|
364
383
|
session: AgentChatSession | null;
|
|
365
384
|
messages: AgentChatMessage[];
|
|
366
385
|
isRunning: boolean;
|
package/dist/index.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ import { Streamdown } from 'streamdown';
|
|
|
5
5
|
|
|
6
6
|
type AgentChatRole = "user" | "assistant" | "system";
|
|
7
7
|
type AgentChatMessageStatus = "complete" | "streaming" | "error";
|
|
8
|
-
type AgentChatSystemKind = "skill_invoked" | "artifact" | "error";
|
|
8
|
+
type AgentChatSystemKind = "skill_invoked" | "artifact" | "error" | "browser_marker" | "browser_marker_warning";
|
|
9
9
|
interface AgentChatImageAttachment {
|
|
10
10
|
/** data: URL (data:image/png;base64,...) or raw base64 string */
|
|
11
11
|
data: string;
|
|
@@ -132,12 +132,25 @@ interface AgentChatScheduledWorkList {
|
|
|
132
132
|
items: AgentChatScheduledWorkItem[];
|
|
133
133
|
total: number;
|
|
134
134
|
}
|
|
135
|
-
type AgentChatEventType = "user.message" | "llm.request" | "llm.response" | "llm.thinking" | "llm.delta" | "tool.call" | "tool.result" | "session.start" | "session.pause" | "session.resume" | "session.complete" | "session.fail" | "session.done" | "harness.wake" | "harness.crash" | "context.compact" | "skill.invoked" | "policy.denied" | "stream.timeout" | "expert.result" | "expert.endorse" | "expert.override" | "artifact.created" | "artifact.updated" | "clarify.response";
|
|
135
|
+
type AgentChatEventType = "user.message" | "llm.request" | "llm.response" | "llm.thinking" | "llm.delta" | "tool.call" | "tool.result" | "session.start" | "session.pause" | "session.resume" | "session.complete" | "session.fail" | "session.done" | "harness.wake" | "harness.crash" | "context.compact" | "skill.invoked" | "policy.denied" | "stream.timeout" | "expert.result" | "expert.endorse" | "expert.override" | "artifact.created" | "artifact.updated" | "browser.provisioned" | "browser.destroyed" | "browser.control_granted" | "browser.control_returned" | "clarify.response";
|
|
136
136
|
interface AgentChatRuntimeEvent {
|
|
137
137
|
type: AgentChatEventType;
|
|
138
138
|
eventId: number;
|
|
139
139
|
data: Record<string, unknown>;
|
|
140
140
|
}
|
|
141
|
+
interface AgentChatBrowserState {
|
|
142
|
+
status: "provisioning" | "live" | "user-control" | "closed";
|
|
143
|
+
controlOwner: string | null;
|
|
144
|
+
}
|
|
145
|
+
interface AgentChatBrowserStateResponse {
|
|
146
|
+
status: "live" | "user-control";
|
|
147
|
+
controlOwner: string | null;
|
|
148
|
+
liveViewPath: string;
|
|
149
|
+
}
|
|
150
|
+
interface AgentChatBrowserControlResponse {
|
|
151
|
+
outcome: "granted" | "refreshed" | "conflict";
|
|
152
|
+
ownerUserId: string;
|
|
153
|
+
}
|
|
141
154
|
interface AgentChatState {
|
|
142
155
|
messages: AgentChatMessage[];
|
|
143
156
|
isRunning: boolean;
|
|
@@ -149,6 +162,7 @@ interface AgentChatState {
|
|
|
149
162
|
hadDeltas: boolean;
|
|
150
163
|
terminal: boolean;
|
|
151
164
|
workspaceRefreshKey: number;
|
|
165
|
+
browser: AgentChatBrowserState | null;
|
|
152
166
|
}
|
|
153
167
|
type AgentChatArtifactKind = "markdown" | "table" | "chart" | "html" | "svg";
|
|
154
168
|
interface AgentChatArtifactMeta {
|
|
@@ -359,8 +373,13 @@ interface AgentChatAdapter {
|
|
|
359
373
|
sessionId: string;
|
|
360
374
|
after: number;
|
|
361
375
|
}): AgentChatEventStream;
|
|
376
|
+
getBrowserState(sessionId: string): Promise<AgentChatBrowserStateResponse | null>;
|
|
377
|
+
acquireBrowserControl(sessionId: string): Promise<AgentChatBrowserControlResponse>;
|
|
378
|
+
releaseBrowserControl(sessionId: string): Promise<void>;
|
|
379
|
+
browserLiveViewUrl(sessionId: string): string;
|
|
362
380
|
}
|
|
363
381
|
interface AgentChatRuntimeApi {
|
|
382
|
+
state: AgentChatState;
|
|
364
383
|
session: AgentChatSession | null;
|
|
365
384
|
messages: AgentChatMessage[];
|
|
366
385
|
isRunning: boolean;
|