@ziggs-ai/contracts 0.42.0 → 0.44.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/dist/message-command.js +5 -5
- package/dist/messaging.d.ts +17 -3
- package/package.json +1 -1
package/dist/message-command.js
CHANGED
|
@@ -154,11 +154,11 @@ function parseMessageCommand(value) {
|
|
|
154
154
|
}
|
|
155
155
|
case 'answer':
|
|
156
156
|
object(effect, ['kind', 'action', 'artifacts'], 'effect');
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
};
|
|
157
|
+
// Published 0.43 clients require this field. Normalize the empty wire
|
|
158
|
+
// value away; actual files use relationships.artifacts on every message.
|
|
159
|
+
if (effect.artifacts !== undefined)
|
|
160
|
+
list(effect.artifacts, exactArtifact, 'answer artifacts', 0);
|
|
161
|
+
effectValue = { kind: 'answer', action: messageAction(effect.action) };
|
|
162
162
|
break;
|
|
163
163
|
case 'provide-input': {
|
|
164
164
|
object(effect, ['kind', 'action'], 'effect');
|
package/dist/messaging.d.ts
CHANGED
|
@@ -5,6 +5,11 @@ export interface MessageEndpoint {
|
|
|
5
5
|
name: string;
|
|
6
6
|
kind: string;
|
|
7
7
|
isSelf: boolean;
|
|
8
|
+
/** Who this is, the same in every message: an agent's own id, a person's
|
|
9
|
+
* or workspace's persona id (never a user id, which carries an email).
|
|
10
|
+
* Draws their face and, for an agent, their presence; it addresses nothing. */
|
|
11
|
+
faceId: string;
|
|
12
|
+
image: string | null;
|
|
8
13
|
}
|
|
9
14
|
/** Discovery only. Sending rechecks recipient, authority, consent and allowance. */
|
|
10
15
|
export interface MessagingControls {
|
|
@@ -60,12 +65,15 @@ export type MessageActionEffect = {
|
|
|
60
65
|
} | {
|
|
61
66
|
kind: 'provide-input';
|
|
62
67
|
action: import('./actions').ActionSlotRef;
|
|
63
|
-
}
|
|
68
|
+
}
|
|
69
|
+
/** Files on an answer go in relationships.artifacts, like any message. */
|
|
70
|
+
| {
|
|
64
71
|
kind: 'answer';
|
|
65
72
|
action: Extract<import('./actions').ActionSlotRef, {
|
|
66
73
|
kind: 'message';
|
|
67
74
|
}>;
|
|
68
|
-
|
|
75
|
+
/** @deprecated Accepted empty for published 0.43 clients; files belong in relationships. */
|
|
76
|
+
artifacts?: [];
|
|
69
77
|
};
|
|
70
78
|
export interface MessageCommand {
|
|
71
79
|
/** Authenticated accountable principal scopes this identity. Changed input conflicts. */
|
|
@@ -78,7 +86,7 @@ export interface MessageCommand {
|
|
|
78
86
|
/** Resolve once and persist the snapshot atomically with the message. */
|
|
79
87
|
deliveries: MessageDeliveries;
|
|
80
88
|
effect: MessageActionEffect;
|
|
81
|
-
/** Private provenance
|
|
89
|
+
/** Private provenance: only the sender sees it back, as `sentFrom`. */
|
|
82
90
|
sources?: MessageSourceRef[];
|
|
83
91
|
/** Required when the selected work/spending relies on an agreement. No fallback. */
|
|
84
92
|
mandate?: {
|
|
@@ -117,6 +125,12 @@ export interface MessageRecord {
|
|
|
117
125
|
importedFrom: {
|
|
118
126
|
channel: 'slack' | 'email' | 'github';
|
|
119
127
|
} | null;
|
|
128
|
+
/** Null for every viewer but the sender. For the sender: the pages they sent
|
|
129
|
+
* it from that they can still read. Other readers never learn the source. */
|
|
130
|
+
sentFrom: Array<{
|
|
131
|
+
artifactId: string;
|
|
132
|
+
name: string;
|
|
133
|
+
}> | null;
|
|
120
134
|
}
|
|
121
135
|
export interface MessageCommandResult {
|
|
122
136
|
outcome: 'created' | 'existing';
|
package/package.json
CHANGED