@ziggs-ai/contracts 0.24.3 → 0.25.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.
@@ -120,7 +120,7 @@ export type AgreementRead = {
120
120
  kind: string;
121
121
  id: string;
122
122
  };
123
- access?: "read" | "write";
123
+ access?: "list" | "read" | "write";
124
124
  temporal?: "from-now" | "from-start";
125
125
  resumeAgreementId?: string;
126
126
  durationHours?: number;
@@ -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: "chat" | "agreement" | "org" | "artifact" | "task" | "connection" | "wallet" | "consent" | "inbox";
6
+ kind: "chat" | "agreement" | "org" | "artifact" | "task" | "person" | "connection" | "wallet" | "consent" | "inbox";
7
7
  id: string;
8
8
  label?: string;
9
9
  };
@@ -28,7 +28,7 @@ export type GrantView = {
28
28
  createdAt: string;
29
29
  health: "active" | "expired" | "revoked";
30
30
  holderKind?: "user" | "org" | "agent";
31
- access?: "read" | "write" | "admit";
31
+ access?: "list" | "read" | "write" | "admit";
32
32
  basis?: GrantBasis;
33
33
  };
34
34
  export type UnreadableRail = {
package/dist/inbox.d.ts CHANGED
@@ -63,8 +63,12 @@ export interface DecisionRef {
63
63
  * than leaving the reader to assume it.
64
64
  */
65
65
  export interface AccessAsk {
66
- /** A reply grant includes reading and writing in this one conversation. */
67
- permission?: 'read' | 'reply';
66
+ /**
67
+ * A reply grant includes reading and writing in this one conversation.
68
+ * `list` (ZIG-2170) is asked of a person scope: which rooms they are in,
69
+ * never what is in them.
70
+ */
71
+ permission?: 'list' | 'read' | 'reply';
68
72
  /** The one thing. `name` is absent when nothing readable resolves. */
69
73
  scope: {
70
74
  kind: string;
@@ -12,11 +12,15 @@
12
12
  * `read`, `admit` implies both. A required kind is satisfied by any kind at
13
13
  * least that strong.
14
14
  *
15
+ * - `list` — know that the scope's rooms exist: their names, who is in
16
+ * them, last activity. Never their contents. Held only on a
17
+ * `person` scope (ZIG-2170), so no room grant ever means less
18
+ * than `read`.
15
19
  * - `read` — see the scope and its contents. Observing, not participating.
16
20
  * - `write` — take part: post entries, be a delivery participant.
17
21
  * - `admit` — bring others in: issue grants on this scope to new holders.
18
22
  */
19
- export declare const GRANT_ACCESS_KINDS: readonly ["read", "write", "admit"];
23
+ export declare const GRANT_ACCESS_KINDS: readonly ["list", "read", "write", "admit"];
20
24
  export type GrantAccessKind = (typeof GRANT_ACCESS_KINDS)[number];
21
25
  /**
22
26
  * The name a room can be reached by, when it has one.
@@ -130,12 +134,12 @@ export declare const AGREEMENT_TERMINAL_STATES: readonly AgreementStatusValue[];
130
134
  * Context-rail scopes, then the other rails a grant can name.
131
135
  * Order is the order the grants read and the OpenAPI enum publish.
132
136
  */
133
- export declare const CONTEXT_GRANT_SCOPE_KINDS: readonly ["chat", "agreement", "org", "artifact", "task"];
134
- export declare const GRANT_SCOPE_KINDS: readonly ["chat", "agreement", "org", "artifact", "task", "connection", "wallet", "consent", "inbox"];
137
+ export declare const CONTEXT_GRANT_SCOPE_KINDS: readonly ["chat", "agreement", "org", "artifact", "task", "person"];
138
+ export declare const GRANT_SCOPE_KINDS: readonly ["chat", "agreement", "org", "artifact", "task", "person", "connection", "wallet", "consent", "inbox"];
135
139
  export type GrantScopeKind = (typeof GRANT_SCOPE_KINDS)[number];
136
140
  export type ContextGrantScopeKind = (typeof CONTEXT_GRANT_SCOPE_KINDS)[number];
137
141
  /** What an access request may name. Always one resource. */
138
- export declare const ACCESS_REQUEST_SCOPE_KINDS: readonly ["artifact", "chat", "agreement", "task"];
142
+ export declare const ACCESS_REQUEST_SCOPE_KINDS: readonly ["artifact", "chat", "agreement", "task", "person"];
139
143
  export type AccessRequestScopeKind = (typeof ACCESS_REQUEST_SCOPE_KINDS)[number];
140
144
  /**
141
145
  * Who an artifact access request may ask a grant FOR. Each reader is named
@@ -20,11 +20,15 @@ exports.isTerminalTaskState = isTerminalTaskState;
20
20
  * `read`, `admit` implies both. A required kind is satisfied by any kind at
21
21
  * least that strong.
22
22
  *
23
+ * - `list` — know that the scope's rooms exist: their names, who is in
24
+ * them, last activity. Never their contents. Held only on a
25
+ * `person` scope (ZIG-2170), so no room grant ever means less
26
+ * than `read`.
23
27
  * - `read` — see the scope and its contents. Observing, not participating.
24
28
  * - `write` — take part: post entries, be a delivery participant.
25
29
  * - `admit` — bring others in: issue grants on this scope to new holders.
26
30
  */
27
- exports.GRANT_ACCESS_KINDS = ['read', 'write', 'admit'];
31
+ exports.GRANT_ACCESS_KINDS = ['list', 'read', 'write', 'admit'];
28
32
  /**
29
33
  * The name a room can be reached by, when it has one.
30
34
  *
@@ -147,6 +151,9 @@ exports.CONTEXT_GRANT_SCOPE_KINDS = [
147
151
  'org',
148
152
  'artifact',
149
153
  'task',
154
+ // ZIG-2170 — every room one person is in, now and later, and never more
155
+ // than that person sees. Held only at `list`.
156
+ 'person',
150
157
  ];
151
158
  exports.GRANT_SCOPE_KINDS = [
152
159
  ...exports.CONTEXT_GRANT_SCOPE_KINDS,
@@ -161,6 +168,7 @@ exports.ACCESS_REQUEST_SCOPE_KINDS = [
161
168
  'chat',
162
169
  'agreement',
163
170
  'task',
171
+ 'person',
164
172
  ];
165
173
  /**
166
174
  * 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.24.3",
3
+ "version": "0.25.1",
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",
@@ -24,6 +24,10 @@
24
24
  "types"
25
25
  ],
26
26
  "license": "MIT",
27
+ "homepage": "https://ziggsai.com/docs",
28
+ "bugs": {
29
+ "url": "https://ziggsai.com/support"
30
+ },
27
31
  "publishConfig": {
28
32
  "access": "public",
29
33
  "registry": "https://registry.npmjs.org/"