@ziggs-ai/contracts 0.23.3 → 0.24.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.
@@ -112,6 +112,10 @@ export type AgreementRead = {
112
112
  primitive?: "context";
113
113
  kind?: "access-request" | "author-share";
114
114
  holderId?: string;
115
+ holders?: Array<{
116
+ kind: "agent" | "user" | "org";
117
+ id: string;
118
+ }>;
115
119
  scope?: {
116
120
  kind: string;
117
121
  id: string;
package/dist/inbox.d.ts CHANGED
@@ -79,6 +79,15 @@ export interface AccessAsk {
79
79
  * repeating it here would be a second answer to one question.
80
80
  */
81
81
  holderDisplayName: string | null;
82
+ /**
83
+ * The readers a yes would let read it, when the agent asked for others
84
+ * rather than (or as well as) itself. One grant per reader. Labels only,
85
+ * never ids. Absent on an ask for the asking agent alone.
86
+ */
87
+ readers?: Array<{
88
+ kind: 'agent' | 'user' | 'org';
89
+ displayName: string | null;
90
+ }>;
82
91
  /** Why, in the requester's own words. */
83
92
  reason: string | null;
84
93
  /**
@@ -137,6 +137,14 @@ export type ContextGrantScopeKind = (typeof CONTEXT_GRANT_SCOPE_KINDS)[number];
137
137
  /** What an access request may name. Always one resource. */
138
138
  export declare const ACCESS_REQUEST_SCOPE_KINDS: readonly ["artifact", "chat", "agreement", "task"];
139
139
  export type AccessRequestScopeKind = (typeof ACCESS_REQUEST_SCOPE_KINDS)[number];
140
+ /**
141
+ * Who an artifact access request may ask a grant FOR. Each reader is named
142
+ * with its kind; the kind is never inferred from an id or a display name.
143
+ */
144
+ export declare const ACCESS_REQUEST_HOLDER_KINDS: readonly ["agent", "user", "org"];
145
+ export type AccessRequestHolderKind = (typeof ACCESS_REQUEST_HOLDER_KINDS)[number];
146
+ /** How many readers one access request may name. */
147
+ export declare const MAX_ACCESS_REQUEST_HOLDERS = 20;
140
148
  /** What a chat entry's contentType may be. */
141
149
  export declare const MESSAGE_CONTENT_TYPE: {
142
150
  readonly TEXT: "text";
@@ -7,7 +7,7 @@
7
7
  * enum, a switch a consumer needs to make exhaustive.
8
8
  */
9
9
  Object.defineProperty(exports, "__esModule", { value: true });
10
- exports.MESSAGE_CONTENT_TYPES = exports.MESSAGE_CONTENT_TYPE = exports.ACCESS_REQUEST_SCOPE_KINDS = exports.GRANT_SCOPE_KINDS = exports.CONTEXT_GRANT_SCOPE_KINDS = exports.AGREEMENT_TERMINAL_STATES = exports.AGREEMENT_STATUSES = exports.AGREEMENT_STATUS = exports.TERMINAL_TASK_STATES = exports.TASK_STATES = exports.TASK_STATE = exports.AGREEMENT_ENGAGEMENT_KIND = exports.BROADCAST_TARGETS = exports.ORG_AGREEMENT_TARGET = exports.OPEN_AGREEMENT_TARGET = exports.AGREEMENT_PARTY_SIDES = exports.ARTIFACT_FILE_FORMATS = exports.ARTIFACT_FILE_FORMAT = exports.RESOURCE_KINDS = exports.CHAT_ADDRESS_KINDS = exports.GRANT_ACCESS_KINDS = void 0;
10
+ exports.MESSAGE_CONTENT_TYPES = exports.MESSAGE_CONTENT_TYPE = exports.MAX_ACCESS_REQUEST_HOLDERS = exports.ACCESS_REQUEST_HOLDER_KINDS = exports.ACCESS_REQUEST_SCOPE_KINDS = exports.GRANT_SCOPE_KINDS = exports.CONTEXT_GRANT_SCOPE_KINDS = exports.AGREEMENT_TERMINAL_STATES = exports.AGREEMENT_STATUSES = exports.AGREEMENT_STATUS = exports.TERMINAL_TASK_STATES = exports.TASK_STATES = exports.TASK_STATE = exports.AGREEMENT_ENGAGEMENT_KIND = exports.BROADCAST_TARGETS = exports.ORG_AGREEMENT_TARGET = exports.OPEN_AGREEMENT_TARGET = exports.AGREEMENT_PARTY_SIDES = exports.ARTIFACT_FILE_FORMATS = exports.ARTIFACT_FILE_FORMAT = exports.RESOURCE_KINDS = exports.CHAT_ADDRESS_KINDS = exports.GRANT_ACCESS_KINDS = void 0;
11
11
  exports.isBroadcastTarget = isBroadcastTarget;
12
12
  exports.partySideIds = partySideIds;
13
13
  exports.partyActorIds = partyActorIds;
@@ -162,6 +162,13 @@ exports.ACCESS_REQUEST_SCOPE_KINDS = [
162
162
  'agreement',
163
163
  'task',
164
164
  ];
165
+ /**
166
+ * Who an artifact access request may ask a grant FOR. Each reader is named
167
+ * with its kind; the kind is never inferred from an id or a display name.
168
+ */
169
+ exports.ACCESS_REQUEST_HOLDER_KINDS = ['agent', 'user', 'org'];
170
+ /** How many readers one access request may name. */
171
+ exports.MAX_ACCESS_REQUEST_HOLDERS = 20;
165
172
  /** What a chat entry's contentType may be. */
166
173
  exports.MESSAGE_CONTENT_TYPE = {
167
174
  TEXT: 'text',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ziggs-ai/contracts",
3
- "version": "0.23.3",
3
+ "version": "0.24.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",