@ziggs-ai/contracts 0.44.0 → 0.45.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.
@@ -3,7 +3,7 @@
3
3
  * Family: grants. Regenerate: backend 'pnpm docs:generate' then this script.
4
4
  */
5
5
  export type GrantScopeView = {
6
- kind: "message" | "address" | "agreement" | "org" | "artifact" | "task" | "person" | "connection" | "wallet" | "consent" | "inbox";
6
+ kind: "message" | "address" | "agreement" | "org" | "artifact" | "task" | "person" | "contact" | "connection" | "wallet" | "consent" | "inbox";
7
7
  id: string;
8
8
  label?: string;
9
9
  };
@@ -12,7 +12,7 @@ export type GrantCaveatView = {
12
12
  value: unknown;
13
13
  };
14
14
  export type GrantBasis = {
15
- kind: "creation" | "publication" | "membership" | "acceptance" | "agreement" | "vouch" | "owner";
15
+ kind: "creation" | "publication" | "membership" | "acceptance" | "agreement" | "vouch" | "owner" | "contact";
16
16
  id: string | null;
17
17
  };
18
18
  export type GrantView = {
package/dist/inbox.d.ts CHANGED
@@ -76,7 +76,8 @@ export interface AccessAsk {
76
76
  * `list` (ZIG-2170) is asked of a person scope: which rooms they are in,
77
77
  * never what is in them.
78
78
  */
79
- permission?: 'list' | 'read' | 'reply';
79
+ /** `send` (ZIG-2321): one-way permission to message the scope's destination; no read. */
80
+ permission?: 'list' | 'read' | 'reply' | 'send';
80
81
  /** The one thing. `name` is absent when nothing readable resolves. */
81
82
  scope: {
82
83
  kind: string;
@@ -135,12 +135,12 @@ export declare const AGREEMENT_TERMINAL_STATES: readonly AgreementStatusValue[];
135
135
  * Context-rail scopes, then the other rails a grant can name.
136
136
  * Order is the order the grants read and the OpenAPI enum publish.
137
137
  */
138
- export declare const CONTEXT_GRANT_SCOPE_KINDS: readonly ["message", "address", "agreement", "org", "artifact", "task", "person"];
139
- export declare const GRANT_SCOPE_KINDS: readonly ["message", "address", "agreement", "org", "artifact", "task", "person", "connection", "wallet", "consent", "inbox"];
138
+ export declare const CONTEXT_GRANT_SCOPE_KINDS: readonly ["message", "address", "agreement", "org", "artifact", "task", "person", "contact"];
139
+ export declare const GRANT_SCOPE_KINDS: readonly ["message", "address", "agreement", "org", "artifact", "task", "person", "contact", "connection", "wallet", "consent", "inbox"];
140
140
  export type GrantScopeKind = (typeof GRANT_SCOPE_KINDS)[number];
141
141
  export type ContextGrantScopeKind = (typeof CONTEXT_GRANT_SCOPE_KINDS)[number];
142
142
  /** What an access request may name. Always one resource. */
143
- export declare const ACCESS_REQUEST_SCOPE_KINDS: readonly ["message", "artifact", "agreement", "task"];
143
+ export declare const ACCESS_REQUEST_SCOPE_KINDS: readonly ["message", "artifact", "agreement", "task", "contact"];
144
144
  export type AccessRequestScopeKind = (typeof ACCESS_REQUEST_SCOPE_KINDS)[number];
145
145
  /**
146
146
  * Who an artifact access request may ask a grant FOR. Each reader is named
@@ -160,6 +160,10 @@ exports.CONTEXT_GRANT_SCOPE_KINDS = [
160
160
  'task',
161
161
  // Historical person-wide room discovery. New grants cannot use this scope.
162
162
  'person',
163
+ // A one-way send grant: the holder may send messages to this destination
164
+ // principal (scope id). Held at write only, never delegated, and minted only
165
+ // by an approved access request.
166
+ 'contact',
163
167
  ];
164
168
  exports.GRANT_SCOPE_KINDS = [
165
169
  ...exports.CONTEXT_GRANT_SCOPE_KINDS,
@@ -174,6 +178,9 @@ exports.ACCESS_REQUEST_SCOPE_KINDS = [
174
178
  'artifact',
175
179
  'agreement',
176
180
  'task',
181
+ // Permission to send messages to one destination (a person, an agent, or a
182
+ // workspace inbox). Its approver is the destination's owner.
183
+ 'contact',
177
184
  ];
178
185
  /**
179
186
  * Who an artifact access request may ask a grant FOR. Each reader is named
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ziggs-ai/contracts",
3
- "version": "0.44.0",
3
+ "version": "0.45.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",