@ziggs-ai/contracts 0.32.0 → 0.33.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/execution.d.ts +9 -0
- package/dist/generated/agreements.d.ts +5 -0
- package/dist/inbox.d.ts +1 -0
- package/dist/socket.d.ts +16 -0
- package/dist/socket.js +1 -0
- package/package.json +1 -1
package/dist/execution.d.ts
CHANGED
|
@@ -4,6 +4,8 @@ export interface WorkExecutionContext {
|
|
|
4
4
|
actorId: string;
|
|
5
5
|
principalId: string;
|
|
6
6
|
agreementId: string | null;
|
|
7
|
+
/** Task assignment isolates retained execution state, including recursive delegation. */
|
|
8
|
+
taskId?: string | null;
|
|
7
9
|
position: 'payer' | 'provider' | 'participant';
|
|
8
10
|
/** Delivery destination. Its readers constrain execution; it grants no authority. */
|
|
9
11
|
chatId: string | null;
|
|
@@ -25,7 +27,14 @@ export interface ContributionTarget {
|
|
|
25
27
|
kind: 'chat' | 'agreement';
|
|
26
28
|
id: string;
|
|
27
29
|
}
|
|
30
|
+
/** Authority over an input whose information may be released in one exact output. */
|
|
31
|
+
export interface ContributionSource {
|
|
32
|
+
kind: 'artifact' | 'agreement' | 'chat' | 'task' | 'connection-grant';
|
|
33
|
+
id: string;
|
|
34
|
+
}
|
|
28
35
|
export interface ContextContribution {
|
|
36
|
+
/** Absent for the output owner's consent. Does not grant access to this source. */
|
|
37
|
+
releaseSource?: ContributionSource;
|
|
29
38
|
target: ContributionTarget;
|
|
30
39
|
/** Frozen, expanded audience approved by the owner; joining does not expand it. */
|
|
31
40
|
audienceIds: string[];
|
|
@@ -113,6 +113,11 @@ export type AgreementRead = {
|
|
|
113
113
|
grantRequest?: {
|
|
114
114
|
primitive?: "context";
|
|
115
115
|
kind?: "access-request" | "author-share";
|
|
116
|
+
contributionTo?: {
|
|
117
|
+
kind: "chat" | "agreement";
|
|
118
|
+
id: string;
|
|
119
|
+
};
|
|
120
|
+
releaseSourceKind?: "artifact" | "agreement" | "chat" | "task" | "connection-grant";
|
|
116
121
|
holderId?: string;
|
|
117
122
|
holders?: Array<{
|
|
118
123
|
kind: "agent" | "user" | "org";
|
package/dist/inbox.d.ts
CHANGED
|
@@ -65,6 +65,7 @@ export interface DecisionRef {
|
|
|
65
65
|
export interface AccessAsk {
|
|
66
66
|
/** Explicit use consent, in addition to the readers' access. */
|
|
67
67
|
contributionTo?: import('./execution').ContributionTarget;
|
|
68
|
+
releaseSourceKind?: import('./execution').ContributionSource['kind'];
|
|
68
69
|
/**
|
|
69
70
|
* A reply grant includes reading and writing in this one conversation.
|
|
70
71
|
* `list` (ZIG-2170) is asked of a person scope: which rooms they are in,
|
package/dist/socket.d.ts
CHANGED
|
@@ -86,9 +86,24 @@ export interface ChatMessageReadFrame {
|
|
|
86
86
|
messageIds: string[];
|
|
87
87
|
kind?: 'agent_handover';
|
|
88
88
|
}
|
|
89
|
+
/**
|
|
90
|
+
* ZIG-857 — non-persisted "the agent is working" cue for the room.
|
|
91
|
+
*
|
|
92
|
+
* Agents never open a socket (inbox is HTTP). The server emits this when an
|
|
93
|
+
* agent picks up chat mail (`working`) so the room is not dead air until the
|
|
94
|
+
* first `chat:message:new`. Cleared by `done`, by that agent's next message,
|
|
95
|
+
* or by the client after a short idle.
|
|
96
|
+
*/
|
|
97
|
+
export interface ChatMessageActivityFrame {
|
|
98
|
+
chatId: string;
|
|
99
|
+
/** Agent (or person) the indicator is about. */
|
|
100
|
+
senderId: string;
|
|
101
|
+
kind: 'working' | 'done';
|
|
102
|
+
}
|
|
89
103
|
export interface ServerToClientEvents {
|
|
90
104
|
'chat:message:new': ChatMessageNewFrame;
|
|
91
105
|
'chat:message:read': ChatMessageReadFrame;
|
|
106
|
+
'chat:message:activity': ChatMessageActivityFrame;
|
|
92
107
|
'chat:read': ChatReadFrame;
|
|
93
108
|
'chat:participants_changed': ChatParticipantsChangedFrame;
|
|
94
109
|
'agent:liveness': AgentLivenessFrame;
|
|
@@ -102,6 +117,7 @@ export interface ClientToServerEvents {
|
|
|
102
117
|
export declare const SERVER_EVENTS: {
|
|
103
118
|
readonly chatMessageNew: "chat:message:new";
|
|
104
119
|
readonly chatMessageRead: "chat:message:read";
|
|
120
|
+
readonly chatMessageActivity: "chat:message:activity";
|
|
105
121
|
readonly chatRead: "chat:read";
|
|
106
122
|
readonly chatParticipantsChanged: "chat:participants_changed";
|
|
107
123
|
readonly agentLiveness: "agent:liveness";
|
package/dist/socket.js
CHANGED
|
@@ -5,6 +5,7 @@ exports.CLIENT_EVENTS = exports.SERVER_EVENTS = void 0;
|
|
|
5
5
|
exports.SERVER_EVENTS = {
|
|
6
6
|
chatMessageNew: 'chat:message:new',
|
|
7
7
|
chatMessageRead: 'chat:message:read',
|
|
8
|
+
chatMessageActivity: 'chat:message:activity',
|
|
8
9
|
chatRead: 'chat:read',
|
|
9
10
|
chatParticipantsChanged: 'chat:participants_changed',
|
|
10
11
|
agentLiveness: 'agent:liveness',
|
package/package.json
CHANGED