@ziggs-ai/contracts 0.13.0 → 0.15.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/chat.d.ts CHANGED
@@ -175,6 +175,8 @@ export interface MessageSenderWire {
175
175
  * results, agreement-lifecycle stamps). Stored content, passed through as-is.
176
176
  */
177
177
  export interface MessageServicePayload {
178
+ /** Governing service agreement resolved by server admission. */
179
+ conversationAgreementId?: string;
178
180
  task?: unknown;
179
181
  id?: string;
180
182
  name?: string;
@@ -19,8 +19,10 @@ export type AgreementTerms = {
19
19
  description: string;
20
20
  billing?: "total" | "per_task";
21
21
  requiredConnections: Array<unknown>;
22
- wakeCeiling?: number;
23
- conversationAllowance?: number;
22
+ wakeCeiling?: number | null;
23
+ conversationAllowance?: number | null;
24
+ conversationAllowanceScope?: "direct" | "subtree";
25
+ interactionMode?: "messages" | "tasks" | "both";
24
26
  };
25
27
  export type AgreementHeld = {
26
28
  amount: number;
@@ -106,6 +108,8 @@ export type AgreementRead = {
106
108
  kind: string;
107
109
  id: string;
108
110
  };
111
+ access?: "read" | "write";
112
+ temporal?: "from-now" | "from-start";
109
113
  durationHours?: number;
110
114
  reason?: string;
111
115
  expiresAt?: string | null;
@@ -2,14 +2,10 @@
2
2
  * GENERATED from the backend OpenAPI spec — do not edit.
3
3
  * Family: chatSend. Regenerate: backend 'pnpm docs:generate' then this script.
4
4
  */
5
- export type DailyUsageView = {
6
- messagesToday: number;
7
- dailyLimit: number;
8
- };
9
5
  export type ConversationCoverage = {
10
6
  agreementId: string;
11
7
  messagesUsed: number;
12
- messageLimit: number;
8
+ messageLimit: number | null;
13
9
  message: string;
14
10
  };
15
11
  export type MessageDestination = {
@@ -27,6 +23,5 @@ export type SendChatMessageResult = {
27
23
  messageId: string;
28
24
  chatId: string;
29
25
  delivery: MessageDelivery;
30
- usage?: DailyUsageView;
31
26
  coverage?: ConversationCoverage;
32
27
  };
package/dist/inbox.d.ts CHANGED
@@ -66,6 +66,8 @@ export interface DecisionRef {
66
66
  * than leaving the reader to assume it.
67
67
  */
68
68
  export interface AccessAsk {
69
+ /** A reply grant includes reading and writing in this one conversation. */
70
+ permission?: 'read' | 'reply';
69
71
  /** The one thing. `name` is absent when nothing readable resolves. */
70
72
  scope: {
71
73
  kind: string;
@@ -158,12 +160,12 @@ export interface InboxDeliveryRef {
158
160
  * a grant. The two can disagree — a grant expires, a room is left, admission
159
161
  * never minted one — and before this the protocol stamped the row as the
160
162
  * reader's work and pre-filled a read that refused. A row carrying this is
161
- * reported with `assigneeId: null` and `needsHuman: true`: it is not the
163
+ * reported with its own assignment cleared and `needsHuman: true`: it is not the
162
164
  * agent's to handle, it does not block their ack, and it is not planned as a
163
165
  * read. `remedy` says in one line what would put it in reach.
164
166
  */
165
167
  outOfReach?: {
166
- scopeKind: 'chat' | 'agreement' | 'task';
168
+ scopeKind: 'chat' | 'agreement' | 'task' | 'artifact';
167
169
  scopeId: string;
168
170
  remedy: string;
169
171
  } | null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ziggs-ai/contracts",
3
- "version": "0.13.0",
3
+ "version": "0.15.0",
4
4
  "description": "Wire contracts for the Ziggs API — response shapes, error body, and socket events, shared by every client.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",