@ziggs-ai/api-client 0.37.28 → 0.38.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/CHANGELOG.md +6 -0
- package/dist/capabilities/artifacts.js +9 -9
- package/dist/capabilities/connections.js +3 -8
- package/dist/capabilities/context.js +15 -4
- package/dist/capabilities/grants.js +1 -4
- package/dist/capabilities/mcpBriefs.js +1 -1
- package/dist/capabilities/payments.js +2 -7
- package/dist/http/AgreementClient.d.ts +10 -2
- package/dist/http/AgreementClient.js +6 -4
- package/dist/http/ArtifactsClient.d.ts +2 -9
- package/dist/http/ArtifactsClient.js +3 -11
- package/dist/http/AssistantConnectionClient.d.ts +1 -1
- package/dist/http/AssistantConnectionClient.js +2 -2
- package/dist/http/ConnectionsClient.d.ts +2 -12
- package/dist/http/ConnectionsClient.js +4 -15
- package/dist/http/ContextGrantsClient.d.ts +1 -0
- package/dist/http/ContextGrantsClient.js +1 -1
- package/dist/http/ContextOpenClient.d.ts +2 -3
- package/dist/http/ContextOpenClient.js +2 -4
- package/dist/http/ContextReadClient.d.ts +5 -13
- package/dist/http/ContextReadClient.js +4 -19
- package/dist/http/ExecutionContextClient.d.ts +3 -0
- package/dist/http/ExecutionContextClient.js +17 -0
- package/dist/http/GrantsClient.d.ts +2 -10
- package/dist/http/GrantsClient.js +3 -12
- package/dist/http/InboxClient.d.ts +2 -2
- package/dist/http/InboxClient.js +1 -3
- package/dist/http/PaymentsClient.d.ts +2 -15
- package/dist/http/PaymentsClient.js +4 -18
- package/dist/http/TelemetryClient.js +3 -3
- package/dist/http/ToolPickClient.js +2 -2
- package/dist/http/index.d.ts +1 -1
- package/dist/http/index.js +1 -1
- package/dist/http/operatorHeaders.d.ts +14 -36
- package/dist/http/operatorHeaders.js +26 -50
- package/dist/inboxAck.d.ts +14 -46
- package/dist/inboxAck.js +12 -102
- package/dist/index.d.ts +3 -0
- package/dist/index.js +3 -0
- package/dist/types.d.ts +15 -16
- package/package.json +2 -2
package/dist/types.d.ts
CHANGED
|
@@ -19,23 +19,10 @@ export declare class RateLimitedError extends ApiError {
|
|
|
19
19
|
constructor(message: string, retryAfterMs: number | null, body?: string, code?: string | null);
|
|
20
20
|
}
|
|
21
21
|
export interface Creds {
|
|
22
|
+
executionContextId?: string;
|
|
22
23
|
operatorKey: string;
|
|
23
24
|
agentId: string;
|
|
24
|
-
/**
|
|
25
|
-
* the lane (chat id, or `agrn-<agreementId>`) this call is being
|
|
26
|
-
* made from. Sent as `X-Ziggs-Lane` so the backend can fence the wake to the
|
|
27
|
-
* engagement the agent is actually acting inside.
|
|
28
|
-
*
|
|
29
|
-
* The operator key says WHO is calling; this says ON WHOSE BEHALF, RIGHT NOW.
|
|
30
|
-
* Without it an agent serving several customers carries its full authority
|
|
31
|
-
* into every call, so a read spans every engagement it holds rather than
|
|
32
|
-
* staying inside the one being worked.
|
|
33
|
-
*
|
|
34
|
-
* Optional, and omitting it can only narrow what comes back (the backend
|
|
35
|
-
* falls back to the agent's own org) — never widen it. Nothing here is
|
|
36
|
-
* trusted: the server re-derives the party orgs itself and refuses a lane the
|
|
37
|
-
* agent is not in.
|
|
38
|
-
*/
|
|
25
|
+
/** Presentation routing only; authority comes from the execution context. */
|
|
39
26
|
laneId?: string;
|
|
40
27
|
/**
|
|
41
28
|
* This host's stable identity, sent as `X-Ziggs-Instance` on inbox reads and
|
|
@@ -380,6 +367,8 @@ export interface InboxChatNews {
|
|
|
380
367
|
latestAt: string;
|
|
381
368
|
}
|
|
382
369
|
export interface InboxProposalRef {
|
|
370
|
+
executionContext?: import('@ziggs-ai/contracts').WorkExecutionContext;
|
|
371
|
+
executionBlocked?: import('@ziggs-ai/contracts').ExecutionBlock;
|
|
383
372
|
agreementId: string;
|
|
384
373
|
title: string;
|
|
385
374
|
proposedAt: string | null;
|
|
@@ -441,6 +430,8 @@ export interface InboxHumanAttention {
|
|
|
441
430
|
* agreement (or self-assigned) reached nobody.
|
|
442
431
|
*/
|
|
443
432
|
export interface InboxTaskRef {
|
|
433
|
+
executionContext?: import('@ziggs-ai/contracts').WorkExecutionContext;
|
|
434
|
+
executionBlocked?: import('@ziggs-ai/contracts').ExecutionBlock;
|
|
444
435
|
taskId: string;
|
|
445
436
|
agreementId: string | null;
|
|
446
437
|
title: string;
|
|
@@ -488,7 +479,7 @@ export interface InboxEnvelope extends InboxRequestChannel {
|
|
|
488
479
|
/** This agent's ASSIGNED chat mail, folded by chat. */
|
|
489
480
|
chats: InboxChatNews[];
|
|
490
481
|
/**
|
|
491
|
-
* Opaque watermark bundle. Pass to `ack(upTo, {
|
|
482
|
+
* Opaque watermark bundle. Pass to `ack(upTo, { handledDeliveryIds })`
|
|
492
483
|
* VERBATIM after acting — never construct or parse one; the per-mailbox
|
|
493
484
|
* positions live inside the value. Null when there is nothing to ack. Ack
|
|
494
485
|
* after acting, not after reading: a crash in between redelivers. Listing
|
|
@@ -510,6 +501,14 @@ export interface InboxEnvelope extends InboxRequestChannel {
|
|
|
510
501
|
export interface InboxAckResult {
|
|
511
502
|
/** Where the watermark now sits. Monotonic — a rewind is a no-op, not an error. */
|
|
512
503
|
ackedUpTo: string | null;
|
|
504
|
+
/**
|
|
505
|
+
* Handled ids the server left pending: assigned to you, but the work became
|
|
506
|
+
* unreadable or blocked before the ack. Every other id in the ack settled.
|
|
507
|
+
*/
|
|
508
|
+
refusedDeliveryIds?: Array<{
|
|
509
|
+
id: string;
|
|
510
|
+
reason: string;
|
|
511
|
+
}>;
|
|
513
512
|
}
|
|
514
513
|
/**
|
|
515
514
|
* Long-poll option shared by the inbox reads. The server holds the request up
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ziggs-ai/api-client",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.38.0",
|
|
4
4
|
"description": "HTTP and WebSocket client for the Ziggs backend API",
|
|
5
5
|
"homepage": "https://ziggsai.com/docs",
|
|
6
6
|
"bugs": {
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"test:watch": "node --import tsx/esm --test --watch test/*.test.ts"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@ziggs-ai/contracts": "^0.
|
|
34
|
+
"@ziggs-ai/contracts": "^0.32.0",
|
|
35
35
|
"socket.io-client": "^4.7.0"
|
|
36
36
|
},
|
|
37
37
|
"keywords": [
|