@ziggs-ai/api-client 0.10.4 → 0.11.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/capabilities/agreementVerbs.d.ts +2 -2
- package/dist/capabilities/agreementVerbs.js +19 -19
- package/dist/capabilities/agreements.d.ts +1 -1
- package/dist/capabilities/agreements.js +5 -5
- package/dist/capabilities/artifacts.d.ts +4 -2
- package/dist/capabilities/artifacts.js +168 -33
- package/dist/capabilities/chat.d.ts +2 -3
- package/dist/capabilities/chat.js +5 -6
- package/dist/capabilities/connections.js +1 -1
- package/dist/capabilities/context.js +3 -0
- package/dist/capabilities/grants.d.ts +7 -6
- package/dist/capabilities/grants.js +9 -8
- package/dist/capabilities/index.d.ts +2 -2
- package/dist/capabilities/index.js +2 -2
- package/dist/capabilities/links.d.ts +1 -1
- package/dist/capabilities/links.js +5 -7
- package/dist/capabilities/marketplace.js +20 -14
- package/dist/capabilities/payments.d.ts +24 -8
- package/dist/capabilities/payments.js +28 -392
- package/dist/capabilities/proposeProviderId.d.ts +1 -1
- package/dist/capabilities/proposeProviderId.js +1 -1
- package/dist/http/AgreementClient.d.ts +24 -19
- package/dist/http/AgreementClient.js +22 -14
- package/dist/http/ChatClient.d.ts +1 -0
- package/dist/http/ChatClient.js +4 -1
- package/dist/http/ConnectionsClient.js +12 -1
- package/dist/http/ContextGrantsClient.d.ts +15 -1
- package/dist/http/ContextGrantsClient.js +2 -0
- package/dist/http/ContextReadClient.d.ts +14 -5
- package/dist/http/GrantsClient.d.ts +14 -0
- package/dist/http/GrantsClient.js +18 -2
- package/dist/http/MarketplaceClient.d.ts +6 -6
- package/dist/http/MarketplaceClient.js +11 -11
- package/dist/http/TaskClient.d.ts +5 -0
- package/dist/http/TaskClient.js +2 -0
- package/dist/http/agreementFlows.d.ts +4 -4
- package/dist/http/agreementFlows.js +9 -10
- package/dist/http/grants.d.ts +28 -0
- package/dist/http/index.d.ts +2 -2
- package/dist/index.d.ts +1 -1
- package/dist/types.d.ts +44 -15
- package/package.json +1 -1
package/dist/types.d.ts
CHANGED
|
@@ -287,14 +287,34 @@ export type MessageHandler = (text: string, metadata: MessageMetadata) => Promis
|
|
|
287
287
|
* on this side validates a delivery kind at runtime (the server does that on the
|
|
288
288
|
* way in), and exhaustiveness checking is purely type-level.
|
|
289
289
|
*/
|
|
290
|
-
export type InboxDeliveryKind = 'message' | 'artifact' | 'task-state' | 'agreement' | '
|
|
290
|
+
export type InboxDeliveryKind = 'message' | 'artifact' | 'task-state' | 'agreement' | 'request';
|
|
291
|
+
/** The two mailbox owners. Agents own no mailbox — they read through grants. */
|
|
292
|
+
export type InboxPartyKind = 'human' | 'org';
|
|
293
|
+
/** One mailbox this reader's merged view includes. */
|
|
294
|
+
export interface InboxSourceRef {
|
|
295
|
+
partyId: string;
|
|
296
|
+
partyKind: InboxPartyKind;
|
|
297
|
+
}
|
|
291
298
|
/**
|
|
292
|
-
* One
|
|
293
|
-
* (a chat read, a task read) is where this agent's grants are enforced.
|
|
299
|
+
* One row in this reader's merged view. A reference, never content — following
|
|
300
|
+
* it (a chat read, a task read) is where this agent's grants are enforced.
|
|
301
|
+
*
|
|
302
|
+
* "Mine to act on" is `assigneeId === my agent id`, nothing else. A row
|
|
303
|
+
* without my stamp is context I may read, never a wake and never mine to ack
|
|
304
|
+
* as handled.
|
|
294
305
|
*/
|
|
295
306
|
export interface InboxDeliveryRef {
|
|
296
307
|
kind: InboxDeliveryKind;
|
|
297
308
|
resourceId: string;
|
|
309
|
+
/** One emit, one id — copies of the same event collapse on this. */
|
|
310
|
+
eventId: string;
|
|
311
|
+
/** The mailbox this copy lives in. */
|
|
312
|
+
partyId: string;
|
|
313
|
+
partyKind: InboxPartyKind;
|
|
314
|
+
/** The ONE agent stamped to act; null when nothing has to. */
|
|
315
|
+
assigneeId: string | null;
|
|
316
|
+
/** The owner's human should see this. */
|
|
317
|
+
needsHuman: boolean;
|
|
298
318
|
chatId: string | null;
|
|
299
319
|
agreementId: string | null;
|
|
300
320
|
taskId: string | null;
|
|
@@ -377,10 +397,10 @@ export interface InboxTaskRef {
|
|
|
377
397
|
updatedAt: string | null;
|
|
378
398
|
}
|
|
379
399
|
/**
|
|
380
|
-
* A marketplace
|
|
400
|
+
* A marketplace request doorbell. Own channel so the host can
|
|
381
401
|
* exact-match triage with zero LLM tokens before any wake.
|
|
382
402
|
*/
|
|
383
|
-
export interface
|
|
403
|
+
export interface InboxRequestRef {
|
|
384
404
|
agreementId: string;
|
|
385
405
|
/** Exact-match string from the publisher — compare to the agent's tags. */
|
|
386
406
|
match: string;
|
|
@@ -390,27 +410,36 @@ export interface InboxQuestRef {
|
|
|
390
410
|
export interface InboxEnvelope {
|
|
391
411
|
asOf: string;
|
|
392
412
|
/**
|
|
393
|
-
*
|
|
394
|
-
* inbox
|
|
413
|
+
* The mailboxes this reader's view merges — its owner's, plus whatever
|
|
414
|
+
* inbox grants add. Absent on older servers.
|
|
415
|
+
*/
|
|
416
|
+
sources?: InboxSourceRef[];
|
|
417
|
+
/**
|
|
418
|
+
* Unacked rows across every source, newest first, copies of one event
|
|
419
|
+
* collapsed. This IS the inbox — read straight out of the party delivery
|
|
420
|
+
* logs, not derived from grants. Rows with `assigneeId === me` are mine to
|
|
421
|
+
* act on; the rest are readable context.
|
|
395
422
|
*/
|
|
396
423
|
deliveries: InboxDeliveryRef[];
|
|
397
424
|
/** True when there was more than one envelope's worth; the rest stay unacked. */
|
|
398
425
|
deliveriesCapped: boolean;
|
|
399
|
-
/**
|
|
426
|
+
/** This agent's ASSIGNED chat mail, folded by chat. */
|
|
400
427
|
chats: InboxChatNews[];
|
|
401
428
|
/**
|
|
402
|
-
* Pass to `ack(upTo, { handledResourceIds })`
|
|
403
|
-
*
|
|
404
|
-
*
|
|
405
|
-
*
|
|
429
|
+
* Opaque watermark bundle. Pass to `ack(upTo, { handledResourceIds })`
|
|
430
|
+
* VERBATIM after acting — never construct or parse one; the per-mailbox
|
|
431
|
+
* positions live inside the value. Null when there is nothing to ack. Ack
|
|
432
|
+
* after acting, not after reading: a crash in between redelivers. Listing
|
|
433
|
+
* every ASSIGNED resourceId is what stops a partial triage from burying
|
|
434
|
+
* work.
|
|
406
435
|
*/
|
|
407
436
|
ackTo: string | null;
|
|
408
437
|
/** Open tasks assigned to this agent — the work channel. */
|
|
409
438
|
tasksAwaitingMe: InboxTaskRef[];
|
|
410
439
|
truncatedTasks: number;
|
|
411
|
-
/** Unacked
|
|
412
|
-
|
|
413
|
-
|
|
440
|
+
/** Unacked request deliveries — triaged before any LLM wake. */
|
|
441
|
+
requestsAwaitingMe?: InboxRequestRef[];
|
|
442
|
+
truncatedRequests?: number;
|
|
414
443
|
proposalsAwaitingMe: InboxProposalRef[];
|
|
415
444
|
truncatedProposals: number;
|
|
416
445
|
connectionRequestsAwaitingMe: InboxConnectionRequestRef[];
|