@invergent/agent-chat-react 1.5.9 → 1.5.10
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 +13 -0
- package/dist/index.cjs +430 -29
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +60 -1
- package/dist/index.d.ts +60 -1
- package/dist/index.js +430 -31
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -72,6 +72,7 @@ interface AgentChatSession {
|
|
|
72
72
|
model?: string | null;
|
|
73
73
|
config?: Record<string, unknown>;
|
|
74
74
|
parentId?: string | null;
|
|
75
|
+
runKind?: string | null;
|
|
75
76
|
messageCount?: number;
|
|
76
77
|
toolCallCount?: number;
|
|
77
78
|
inputTokens?: number;
|
|
@@ -91,6 +92,7 @@ interface AgentChatSessionTreeNode {
|
|
|
91
92
|
depth?: number;
|
|
92
93
|
agentId?: string | null;
|
|
93
94
|
agentType?: string | null;
|
|
95
|
+
runKind?: string | null;
|
|
94
96
|
channel?: string | null;
|
|
95
97
|
status: "active" | "paused" | "completed" | "failed" | string;
|
|
96
98
|
title?: string | null;
|
|
@@ -104,6 +106,32 @@ interface AgentChatSessionTree {
|
|
|
104
106
|
nodes: AgentChatSessionTreeNode[];
|
|
105
107
|
total: number;
|
|
106
108
|
}
|
|
109
|
+
type AgentChatScheduledWorkKind = "cron" | "dynamic_loop" | "one_shot" | "scheduled" | (string & {});
|
|
110
|
+
interface AgentChatScheduledWorkItem {
|
|
111
|
+
id: string;
|
|
112
|
+
agentId?: string | null;
|
|
113
|
+
name?: string | null;
|
|
114
|
+
prompt: string;
|
|
115
|
+
status: "active" | "paused" | "completed" | "failed" | string;
|
|
116
|
+
kind?: AgentChatScheduledWorkKind | null;
|
|
117
|
+
source?: string | null;
|
|
118
|
+
scheduleDisplay: string;
|
|
119
|
+
timezone?: string | null;
|
|
120
|
+
runCount: number;
|
|
121
|
+
repeatLimit?: number | null;
|
|
122
|
+
nextRunAt?: string | null;
|
|
123
|
+
lastRunAt?: string | null;
|
|
124
|
+
lastSessionId?: string | null;
|
|
125
|
+
lastError?: string | null;
|
|
126
|
+
expiresAt?: string | null;
|
|
127
|
+
createdFromSessionId?: string | null;
|
|
128
|
+
createdAt: string;
|
|
129
|
+
updatedAt: string;
|
|
130
|
+
}
|
|
131
|
+
interface AgentChatScheduledWorkList {
|
|
132
|
+
items: AgentChatScheduledWorkItem[];
|
|
133
|
+
total: number;
|
|
134
|
+
}
|
|
107
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";
|
|
108
136
|
interface AgentChatRuntimeEvent {
|
|
109
137
|
type: AgentChatEventType;
|
|
@@ -265,6 +293,20 @@ interface AgentChatAdapter {
|
|
|
265
293
|
stopSession?(input: {
|
|
266
294
|
sessionId: string;
|
|
267
295
|
}): Promise<void>;
|
|
296
|
+
listScheduledWork?(input: {
|
|
297
|
+
agentId?: string;
|
|
298
|
+
status?: string;
|
|
299
|
+
limit?: number;
|
|
300
|
+
offset?: number;
|
|
301
|
+
}): Promise<AgentChatScheduledWorkList>;
|
|
302
|
+
runScheduledWorkNow?(input: {
|
|
303
|
+
scheduleId: string;
|
|
304
|
+
}): Promise<{
|
|
305
|
+
sessionId?: string;
|
|
306
|
+
} | void>;
|
|
307
|
+
cancelScheduledWork?(input: {
|
|
308
|
+
scheduleId: string;
|
|
309
|
+
}): Promise<void>;
|
|
268
310
|
getArtifact(input: {
|
|
269
311
|
sessionId: string;
|
|
270
312
|
artifactId: string;
|
|
@@ -319,6 +361,7 @@ interface AgentChatAdapter {
|
|
|
319
361
|
}): AgentChatEventStream;
|
|
320
362
|
}
|
|
321
363
|
interface AgentChatRuntimeApi {
|
|
364
|
+
session: AgentChatSession | null;
|
|
322
365
|
messages: AgentChatMessage[];
|
|
323
366
|
isRunning: boolean;
|
|
324
367
|
isLoadingHistory: boolean;
|
|
@@ -334,6 +377,8 @@ interface AgentChatRuntimeApi {
|
|
|
334
377
|
type ChatMessage = AgentChatMessage;
|
|
335
378
|
type SessionTreeNode = AgentChatSessionTreeNode;
|
|
336
379
|
type SessionTree = AgentChatSessionTree;
|
|
380
|
+
type ScheduledWorkItem = AgentChatScheduledWorkItem;
|
|
381
|
+
type ScheduledWorkList = AgentChatScheduledWorkList;
|
|
337
382
|
type ToolCallInfo = AgentChatToolCallInfo;
|
|
338
383
|
type TokenUsage = AgentChatTokenUsage;
|
|
339
384
|
type RetryIndicator = AgentChatRetryIndicator;
|
|
@@ -384,6 +429,20 @@ declare function useAgentChatRuntime({ adapter, agentId, sessionId, onSessionCha
|
|
|
384
429
|
type MessageResponseProps = ComponentProps<typeof Streamdown>;
|
|
385
430
|
declare const MessageResponse: React.MemoExoticComponent<({ className, ...props }: MessageResponseProps) => react_jsx_runtime.JSX.Element>;
|
|
386
431
|
|
|
432
|
+
interface ScheduledWorkPanelProps {
|
|
433
|
+
adapter: AgentChatAdapter;
|
|
434
|
+
agentId?: string;
|
|
435
|
+
title?: string;
|
|
436
|
+
limit?: number;
|
|
437
|
+
status?: string;
|
|
438
|
+
hideHeader?: boolean;
|
|
439
|
+
pollIntervalMs?: number;
|
|
440
|
+
onSessionSelect?: (sessionId: string) => void;
|
|
441
|
+
onScheduleCancel?: (scheduleId: string) => void;
|
|
442
|
+
onScheduleRunNow?: (scheduleId: string, sessionId?: string) => void;
|
|
443
|
+
}
|
|
444
|
+
declare function ScheduledWorkPanel({ adapter, agentId, title, limit, status, hideHeader, pollIntervalMs, onSessionSelect, onScheduleCancel, onScheduleRunNow, }: ScheduledWorkPanelProps): react_jsx_runtime.JSX.Element | null;
|
|
445
|
+
|
|
387
446
|
interface SessionTreePanelProps {
|
|
388
447
|
adapter: AgentChatAdapter;
|
|
389
448
|
sessionId?: string | null;
|
|
@@ -406,4 +465,4 @@ interface SessionTreePanelProps {
|
|
|
406
465
|
}
|
|
407
466
|
declare function SessionTreePanel({ adapter, sessionId, activeSessionId, agentId, title, sessionListLimit, hideRoot, hideHeader, loadList, onSessionSelect, onSessionDelete, }: SessionTreePanelProps): react_jsx_runtime.JSX.Element | null;
|
|
408
467
|
|
|
409
|
-
export { AgentChat, type AgentChatAdapter, type AgentChatAdapterContextValue, AgentChatAdapterProvider, type AgentChatArtifactKind, type AgentChatArtifactMeta, type AgentChatArtifactPayload, type AgentChatChartArtifactSpec, type AgentChatClarifyAnswer, type AgentChatClarifyArgs, type AgentChatClarifyChoice, type AgentChatClarifyQuestion, type AgentChatErrorCategory, type AgentChatErrorInfo, type AgentChatEventStream, type AgentChatEventType, type AgentChatExpertFeedbackRating, type AgentChatHtmlArtifactSpec, type AgentChatImageAttachment, type AgentChatMarkdownArtifactSpec, type AgentChatMessage, type AgentChatMessageStatus, type AgentChatProps, type AgentChatRole, type AgentChatRuntimeApi, type AgentChatRuntimeEvent, type AgentChatSession, type AgentChatSessionList, type AgentChatSessionTree, type AgentChatSessionTreeNode, type AgentChatSlashCommand, type AgentChatSseMessageEvent, type AgentChatState, type AgentChatSvgArtifactSpec, type AgentChatSystemKind, type AgentChatTableArtifactSpec, type AgentChatTokenUsage, type AgentChatToolCallInfo, type AgentChatWorkspaceEntry, type AgentChatWorkspaceFile, type AgentChatWorkspaceTree, type AgentChatWorkspaceUpload, type ArtifactKind, type ArtifactPayload, type ChartArtifactSpec, type ChatMessage, type ClarifyAnswer, type ClarifyArgs, type ClarifyChoice, type ClarifyQuestion, type ErrorInfo, type HtmlArtifactSpec, type MarkdownArtifactSpec, MessageResponse, type MessageResponseProps, type RetryIndicator, type SessionTree, type SessionTreeNode, SessionTreePanel, type SessionTreePanelProps, type SvgArtifactSpec, type TableArtifactSpec, type TokenUsage, type ToolCallInfo, type WorkspaceEntry, type WorkspaceFile, type WorkspaceTree, type WorkspaceUpload, useAgentChatAdapterContext, useAgentChatRuntime };
|
|
468
|
+
export { AgentChat, type AgentChatAdapter, type AgentChatAdapterContextValue, AgentChatAdapterProvider, type AgentChatArtifactKind, type AgentChatArtifactMeta, type AgentChatArtifactPayload, type AgentChatChartArtifactSpec, type AgentChatClarifyAnswer, type AgentChatClarifyArgs, type AgentChatClarifyChoice, type AgentChatClarifyQuestion, type AgentChatErrorCategory, type AgentChatErrorInfo, type AgentChatEventStream, type AgentChatEventType, type AgentChatExpertFeedbackRating, type AgentChatHtmlArtifactSpec, type AgentChatImageAttachment, type AgentChatMarkdownArtifactSpec, type AgentChatMessage, type AgentChatMessageStatus, type AgentChatProps, type AgentChatRole, type AgentChatRuntimeApi, type AgentChatRuntimeEvent, type AgentChatScheduledWorkItem, type AgentChatScheduledWorkKind, type AgentChatScheduledWorkList, type AgentChatSession, type AgentChatSessionList, type AgentChatSessionTree, type AgentChatSessionTreeNode, type AgentChatSlashCommand, type AgentChatSseMessageEvent, type AgentChatState, type AgentChatSvgArtifactSpec, type AgentChatSystemKind, type AgentChatTableArtifactSpec, type AgentChatTokenUsage, type AgentChatToolCallInfo, type AgentChatWorkspaceEntry, type AgentChatWorkspaceFile, type AgentChatWorkspaceTree, type AgentChatWorkspaceUpload, type ArtifactKind, type ArtifactPayload, type ChartArtifactSpec, type ChatMessage, type ClarifyAnswer, type ClarifyArgs, type ClarifyChoice, type ClarifyQuestion, type ErrorInfo, type HtmlArtifactSpec, type MarkdownArtifactSpec, MessageResponse, type MessageResponseProps, type RetryIndicator, type ScheduledWorkItem, type ScheduledWorkList, ScheduledWorkPanel, type ScheduledWorkPanelProps, type SessionTree, type SessionTreeNode, SessionTreePanel, type SessionTreePanelProps, type SvgArtifactSpec, type TableArtifactSpec, type TokenUsage, type ToolCallInfo, type WorkspaceEntry, type WorkspaceFile, type WorkspaceTree, type WorkspaceUpload, useAgentChatAdapterContext, useAgentChatRuntime };
|
package/dist/index.d.ts
CHANGED
|
@@ -72,6 +72,7 @@ interface AgentChatSession {
|
|
|
72
72
|
model?: string | null;
|
|
73
73
|
config?: Record<string, unknown>;
|
|
74
74
|
parentId?: string | null;
|
|
75
|
+
runKind?: string | null;
|
|
75
76
|
messageCount?: number;
|
|
76
77
|
toolCallCount?: number;
|
|
77
78
|
inputTokens?: number;
|
|
@@ -91,6 +92,7 @@ interface AgentChatSessionTreeNode {
|
|
|
91
92
|
depth?: number;
|
|
92
93
|
agentId?: string | null;
|
|
93
94
|
agentType?: string | null;
|
|
95
|
+
runKind?: string | null;
|
|
94
96
|
channel?: string | null;
|
|
95
97
|
status: "active" | "paused" | "completed" | "failed" | string;
|
|
96
98
|
title?: string | null;
|
|
@@ -104,6 +106,32 @@ interface AgentChatSessionTree {
|
|
|
104
106
|
nodes: AgentChatSessionTreeNode[];
|
|
105
107
|
total: number;
|
|
106
108
|
}
|
|
109
|
+
type AgentChatScheduledWorkKind = "cron" | "dynamic_loop" | "one_shot" | "scheduled" | (string & {});
|
|
110
|
+
interface AgentChatScheduledWorkItem {
|
|
111
|
+
id: string;
|
|
112
|
+
agentId?: string | null;
|
|
113
|
+
name?: string | null;
|
|
114
|
+
prompt: string;
|
|
115
|
+
status: "active" | "paused" | "completed" | "failed" | string;
|
|
116
|
+
kind?: AgentChatScheduledWorkKind | null;
|
|
117
|
+
source?: string | null;
|
|
118
|
+
scheduleDisplay: string;
|
|
119
|
+
timezone?: string | null;
|
|
120
|
+
runCount: number;
|
|
121
|
+
repeatLimit?: number | null;
|
|
122
|
+
nextRunAt?: string | null;
|
|
123
|
+
lastRunAt?: string | null;
|
|
124
|
+
lastSessionId?: string | null;
|
|
125
|
+
lastError?: string | null;
|
|
126
|
+
expiresAt?: string | null;
|
|
127
|
+
createdFromSessionId?: string | null;
|
|
128
|
+
createdAt: string;
|
|
129
|
+
updatedAt: string;
|
|
130
|
+
}
|
|
131
|
+
interface AgentChatScheduledWorkList {
|
|
132
|
+
items: AgentChatScheduledWorkItem[];
|
|
133
|
+
total: number;
|
|
134
|
+
}
|
|
107
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";
|
|
108
136
|
interface AgentChatRuntimeEvent {
|
|
109
137
|
type: AgentChatEventType;
|
|
@@ -265,6 +293,20 @@ interface AgentChatAdapter {
|
|
|
265
293
|
stopSession?(input: {
|
|
266
294
|
sessionId: string;
|
|
267
295
|
}): Promise<void>;
|
|
296
|
+
listScheduledWork?(input: {
|
|
297
|
+
agentId?: string;
|
|
298
|
+
status?: string;
|
|
299
|
+
limit?: number;
|
|
300
|
+
offset?: number;
|
|
301
|
+
}): Promise<AgentChatScheduledWorkList>;
|
|
302
|
+
runScheduledWorkNow?(input: {
|
|
303
|
+
scheduleId: string;
|
|
304
|
+
}): Promise<{
|
|
305
|
+
sessionId?: string;
|
|
306
|
+
} | void>;
|
|
307
|
+
cancelScheduledWork?(input: {
|
|
308
|
+
scheduleId: string;
|
|
309
|
+
}): Promise<void>;
|
|
268
310
|
getArtifact(input: {
|
|
269
311
|
sessionId: string;
|
|
270
312
|
artifactId: string;
|
|
@@ -319,6 +361,7 @@ interface AgentChatAdapter {
|
|
|
319
361
|
}): AgentChatEventStream;
|
|
320
362
|
}
|
|
321
363
|
interface AgentChatRuntimeApi {
|
|
364
|
+
session: AgentChatSession | null;
|
|
322
365
|
messages: AgentChatMessage[];
|
|
323
366
|
isRunning: boolean;
|
|
324
367
|
isLoadingHistory: boolean;
|
|
@@ -334,6 +377,8 @@ interface AgentChatRuntimeApi {
|
|
|
334
377
|
type ChatMessage = AgentChatMessage;
|
|
335
378
|
type SessionTreeNode = AgentChatSessionTreeNode;
|
|
336
379
|
type SessionTree = AgentChatSessionTree;
|
|
380
|
+
type ScheduledWorkItem = AgentChatScheduledWorkItem;
|
|
381
|
+
type ScheduledWorkList = AgentChatScheduledWorkList;
|
|
337
382
|
type ToolCallInfo = AgentChatToolCallInfo;
|
|
338
383
|
type TokenUsage = AgentChatTokenUsage;
|
|
339
384
|
type RetryIndicator = AgentChatRetryIndicator;
|
|
@@ -384,6 +429,20 @@ declare function useAgentChatRuntime({ adapter, agentId, sessionId, onSessionCha
|
|
|
384
429
|
type MessageResponseProps = ComponentProps<typeof Streamdown>;
|
|
385
430
|
declare const MessageResponse: React.MemoExoticComponent<({ className, ...props }: MessageResponseProps) => react_jsx_runtime.JSX.Element>;
|
|
386
431
|
|
|
432
|
+
interface ScheduledWorkPanelProps {
|
|
433
|
+
adapter: AgentChatAdapter;
|
|
434
|
+
agentId?: string;
|
|
435
|
+
title?: string;
|
|
436
|
+
limit?: number;
|
|
437
|
+
status?: string;
|
|
438
|
+
hideHeader?: boolean;
|
|
439
|
+
pollIntervalMs?: number;
|
|
440
|
+
onSessionSelect?: (sessionId: string) => void;
|
|
441
|
+
onScheduleCancel?: (scheduleId: string) => void;
|
|
442
|
+
onScheduleRunNow?: (scheduleId: string, sessionId?: string) => void;
|
|
443
|
+
}
|
|
444
|
+
declare function ScheduledWorkPanel({ adapter, agentId, title, limit, status, hideHeader, pollIntervalMs, onSessionSelect, onScheduleCancel, onScheduleRunNow, }: ScheduledWorkPanelProps): react_jsx_runtime.JSX.Element | null;
|
|
445
|
+
|
|
387
446
|
interface SessionTreePanelProps {
|
|
388
447
|
adapter: AgentChatAdapter;
|
|
389
448
|
sessionId?: string | null;
|
|
@@ -406,4 +465,4 @@ interface SessionTreePanelProps {
|
|
|
406
465
|
}
|
|
407
466
|
declare function SessionTreePanel({ adapter, sessionId, activeSessionId, agentId, title, sessionListLimit, hideRoot, hideHeader, loadList, onSessionSelect, onSessionDelete, }: SessionTreePanelProps): react_jsx_runtime.JSX.Element | null;
|
|
408
467
|
|
|
409
|
-
export { AgentChat, type AgentChatAdapter, type AgentChatAdapterContextValue, AgentChatAdapterProvider, type AgentChatArtifactKind, type AgentChatArtifactMeta, type AgentChatArtifactPayload, type AgentChatChartArtifactSpec, type AgentChatClarifyAnswer, type AgentChatClarifyArgs, type AgentChatClarifyChoice, type AgentChatClarifyQuestion, type AgentChatErrorCategory, type AgentChatErrorInfo, type AgentChatEventStream, type AgentChatEventType, type AgentChatExpertFeedbackRating, type AgentChatHtmlArtifactSpec, type AgentChatImageAttachment, type AgentChatMarkdownArtifactSpec, type AgentChatMessage, type AgentChatMessageStatus, type AgentChatProps, type AgentChatRole, type AgentChatRuntimeApi, type AgentChatRuntimeEvent, type AgentChatSession, type AgentChatSessionList, type AgentChatSessionTree, type AgentChatSessionTreeNode, type AgentChatSlashCommand, type AgentChatSseMessageEvent, type AgentChatState, type AgentChatSvgArtifactSpec, type AgentChatSystemKind, type AgentChatTableArtifactSpec, type AgentChatTokenUsage, type AgentChatToolCallInfo, type AgentChatWorkspaceEntry, type AgentChatWorkspaceFile, type AgentChatWorkspaceTree, type AgentChatWorkspaceUpload, type ArtifactKind, type ArtifactPayload, type ChartArtifactSpec, type ChatMessage, type ClarifyAnswer, type ClarifyArgs, type ClarifyChoice, type ClarifyQuestion, type ErrorInfo, type HtmlArtifactSpec, type MarkdownArtifactSpec, MessageResponse, type MessageResponseProps, type RetryIndicator, type SessionTree, type SessionTreeNode, SessionTreePanel, type SessionTreePanelProps, type SvgArtifactSpec, type TableArtifactSpec, type TokenUsage, type ToolCallInfo, type WorkspaceEntry, type WorkspaceFile, type WorkspaceTree, type WorkspaceUpload, useAgentChatAdapterContext, useAgentChatRuntime };
|
|
468
|
+
export { AgentChat, type AgentChatAdapter, type AgentChatAdapterContextValue, AgentChatAdapterProvider, type AgentChatArtifactKind, type AgentChatArtifactMeta, type AgentChatArtifactPayload, type AgentChatChartArtifactSpec, type AgentChatClarifyAnswer, type AgentChatClarifyArgs, type AgentChatClarifyChoice, type AgentChatClarifyQuestion, type AgentChatErrorCategory, type AgentChatErrorInfo, type AgentChatEventStream, type AgentChatEventType, type AgentChatExpertFeedbackRating, type AgentChatHtmlArtifactSpec, type AgentChatImageAttachment, type AgentChatMarkdownArtifactSpec, type AgentChatMessage, type AgentChatMessageStatus, type AgentChatProps, type AgentChatRole, type AgentChatRuntimeApi, type AgentChatRuntimeEvent, type AgentChatScheduledWorkItem, type AgentChatScheduledWorkKind, type AgentChatScheduledWorkList, type AgentChatSession, type AgentChatSessionList, type AgentChatSessionTree, type AgentChatSessionTreeNode, type AgentChatSlashCommand, type AgentChatSseMessageEvent, type AgentChatState, type AgentChatSvgArtifactSpec, type AgentChatSystemKind, type AgentChatTableArtifactSpec, type AgentChatTokenUsage, type AgentChatToolCallInfo, type AgentChatWorkspaceEntry, type AgentChatWorkspaceFile, type AgentChatWorkspaceTree, type AgentChatWorkspaceUpload, type ArtifactKind, type ArtifactPayload, type ChartArtifactSpec, type ChatMessage, type ClarifyAnswer, type ClarifyArgs, type ClarifyChoice, type ClarifyQuestion, type ErrorInfo, type HtmlArtifactSpec, type MarkdownArtifactSpec, MessageResponse, type MessageResponseProps, type RetryIndicator, type ScheduledWorkItem, type ScheduledWorkList, ScheduledWorkPanel, type ScheduledWorkPanelProps, type SessionTree, type SessionTreeNode, SessionTreePanel, type SessionTreePanelProps, type SvgArtifactSpec, type TableArtifactSpec, type TokenUsage, type ToolCallInfo, type WorkspaceEntry, type WorkspaceFile, type WorkspaceTree, type WorkspaceUpload, useAgentChatAdapterContext, useAgentChatRuntime };
|