@taico/events 0.5.1 → 0.7.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 +32 -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.7.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
|
};
|
|
@@ -56,6 +58,8 @@ export interface Actor {
|
|
|
56
58
|
displayName: string;
|
|
57
59
|
avatarUrl: string | null;
|
|
58
60
|
introduction: string | null;
|
|
61
|
+
/** Set once the actor has been deleted; absent or null while active. */
|
|
62
|
+
deletedAt?: string | null;
|
|
59
63
|
}
|
|
60
64
|
/**
|
|
61
65
|
* Thread structure as sent over the wire
|
|
@@ -133,6 +137,33 @@ export interface MessageCreatedWireEvent {
|
|
|
133
137
|
payload: ThreadMessageWirePayload;
|
|
134
138
|
actor: MinimalEventActor;
|
|
135
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
|
+
}
|
|
136
167
|
export type ThreadAgentActivityKind = 'thinking' | 'tool_calling';
|
|
137
168
|
/**
|
|
138
169
|
* Agent activity event
|
|
@@ -160,4 +191,4 @@ export interface AgentResponseDeltaWireEvent {
|
|
|
160
191
|
/**
|
|
161
192
|
* Union type of all thread wire events
|
|
162
193
|
*/
|
|
163
|
-
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
|
};
|