@taico/events 0.6.0 → 0.8.0
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 +1 -1
- package/dist/types/thread-events.d.ts +30 -1
- package/dist/types/thread-events.js +2 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
# @taico/events
|
|
2
2
|
|
|
3
|
-
[](https://badge.socket.dev/npm/package/@taico/events/0.8.0)
|
|
@@ -19,6 +19,8 @@ export declare const ThreadWireEvents: {
|
|
|
19
19
|
readonly THREAD_DELETED: "thread.deleted";
|
|
20
20
|
readonly THREAD_TITLE_UPDATED: "thread.title.updated";
|
|
21
21
|
readonly MESSAGE_CREATED: "thread.message.created";
|
|
22
|
+
readonly THREAD_ACTIVITY: "thread.activity";
|
|
23
|
+
readonly THREAD_READ: "thread.read";
|
|
22
24
|
readonly AGENT_ACTIVITY: "thread.agent.activity";
|
|
23
25
|
readonly AGENT_RESPONSE_DELTA: "thread.agent.response.delta";
|
|
24
26
|
};
|
|
@@ -135,6 +137,33 @@ export interface MessageCreatedWireEvent {
|
|
|
135
137
|
payload: ThreadMessageWirePayload;
|
|
136
138
|
actor: MinimalEventActor;
|
|
137
139
|
}
|
|
140
|
+
/**
|
|
141
|
+
* Thread activity event
|
|
142
|
+
* Emitted to the thread list when a message people can see is posted in any
|
|
143
|
+
* thread, so lists can move the thread up and show it as unread without
|
|
144
|
+
* receiving the message itself.
|
|
145
|
+
*/
|
|
146
|
+
export interface ThreadActivityWireEvent {
|
|
147
|
+
payload: {
|
|
148
|
+
threadId: string;
|
|
149
|
+
messageId: string;
|
|
150
|
+
createdByActorId: string | null;
|
|
151
|
+
/** When the message was posted: the thread's new `lastActivityAt`. ISO 8601. */
|
|
152
|
+
createdAt: string;
|
|
153
|
+
};
|
|
154
|
+
actor: MinimalEventActor;
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* Thread read event
|
|
158
|
+
* Emitted only to the actor who read the thread, on all their connections, so
|
|
159
|
+
* every tab and device clears its unread indicator.
|
|
160
|
+
*/
|
|
161
|
+
export interface ThreadReadWireEvent {
|
|
162
|
+
payload: {
|
|
163
|
+
threadId: string;
|
|
164
|
+
};
|
|
165
|
+
actor: MinimalEventActor;
|
|
166
|
+
}
|
|
138
167
|
export type ThreadAgentActivityKind = 'thinking' | 'tool_calling';
|
|
139
168
|
/**
|
|
140
169
|
* Agent activity event
|
|
@@ -162,4 +191,4 @@ export interface AgentResponseDeltaWireEvent {
|
|
|
162
191
|
/**
|
|
163
192
|
* Union type of all thread wire events
|
|
164
193
|
*/
|
|
165
|
-
export type ThreadWireEvent = ThreadCreatedWireEvent | ThreadUpdatedWireEvent | ThreadDeletedWireEvent | ThreadTitleUpdatedWireEvent | MessageCreatedWireEvent | AgentActivityWireEvent | AgentResponseDeltaWireEvent;
|
|
194
|
+
export type ThreadWireEvent = ThreadCreatedWireEvent | ThreadUpdatedWireEvent | ThreadDeletedWireEvent | ThreadTitleUpdatedWireEvent | MessageCreatedWireEvent | ThreadActivityWireEvent | ThreadReadWireEvent | AgentActivityWireEvent | AgentResponseDeltaWireEvent;
|
|
@@ -18,6 +18,8 @@ export const ThreadWireEvents = {
|
|
|
18
18
|
THREAD_DELETED: 'thread.deleted',
|
|
19
19
|
THREAD_TITLE_UPDATED: 'thread.title.updated',
|
|
20
20
|
MESSAGE_CREATED: 'thread.message.created',
|
|
21
|
+
THREAD_ACTIVITY: 'thread.activity',
|
|
22
|
+
THREAD_READ: 'thread.read',
|
|
21
23
|
AGENT_ACTIVITY: 'thread.agent.activity',
|
|
22
24
|
AGENT_RESPONSE_DELTA: 'thread.agent.response.delta',
|
|
23
25
|
};
|