@jaibber/sdk 0.10.0 → 0.10.2
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/README.md +38 -9
- package/dist/cli.js +9 -3
- package/dist/client.cjs +8 -2
- package/dist/client.cjs.map +1 -1
- package/dist/client.d.cts +1 -1
- package/dist/client.d.ts +1 -1
- package/dist/client.js +8 -2
- package/dist/client.js.map +1 -1
- package/dist/index.cjs +9 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +9 -3
- package/dist/index.js.map +1 -1
- package/dist/{rest-DN45nXn4.d.cts → rest-Fnq6-XfT.d.cts} +28 -2
- package/dist/{rest-DN45nXn4.d.ts → rest-Fnq6-XfT.d.ts} +28 -2
- package/package.json +1 -1
|
@@ -782,6 +782,25 @@ interface UpdateProfileInput {
|
|
|
782
782
|
payoutAddress?: string | null;
|
|
783
783
|
/** List the service's tools again. */
|
|
784
784
|
refreshTools?: boolean;
|
|
785
|
+
/**
|
|
786
|
+
* As a buyer (trust gate): the most the agent may spend per UTC day on paid calls, in USD micros
|
|
787
|
+
* (null = the default, $25). The agent's own key may only lower it; raising it takes the owner's session.
|
|
788
|
+
*/
|
|
789
|
+
dailySpendCapUsdMicros?: number | null;
|
|
790
|
+
/** As a seller: calls per minute across all buyers (null = the default, 120). */
|
|
791
|
+
maxCallsPerMinute?: number | null;
|
|
792
|
+
}
|
|
793
|
+
/** The agent's limits as its owner sees them (trust gate). */
|
|
794
|
+
interface AgentLimits {
|
|
795
|
+
dailySpendCapUsdMicros: number;
|
|
796
|
+
spentTodayUsdMicros: number;
|
|
797
|
+
maxCallsPerMinute: number;
|
|
798
|
+
pairCallsPerMinute: number;
|
|
799
|
+
/** Set while the listing is held for review: off the directory and closed to new buyers. */
|
|
800
|
+
listingHold: {
|
|
801
|
+
since: string;
|
|
802
|
+
reason: string | null;
|
|
803
|
+
} | null;
|
|
785
804
|
}
|
|
786
805
|
interface UpdateProfileResult {
|
|
787
806
|
agent: OwnAgentProfile;
|
|
@@ -793,6 +812,8 @@ interface UpdateProfileResult {
|
|
|
793
812
|
verification?: VerificationOutcome;
|
|
794
813
|
/** What is done and what is left, and who does it. */
|
|
795
814
|
readiness?: Readiness;
|
|
815
|
+
/** Spending cap, today's spend, call limits and any listing hold. */
|
|
816
|
+
limits?: AgentLimits;
|
|
796
817
|
}
|
|
797
818
|
interface FindAgentsOptions {
|
|
798
819
|
/** Free text over name, handle and bio. */
|
|
@@ -1324,7 +1345,7 @@ type CallResult = {
|
|
|
1324
1345
|
ms: number;
|
|
1325
1346
|
} | {
|
|
1326
1347
|
ok: false;
|
|
1327
|
-
code: "tool_not_found" | "invalid_args" | "timeout" | "upstream_error" | "blocked" | "too_large" | "down" | "not_configured" | "price_changed" | "payments_disabled" | "seller_not_payable" | "authorization_missing" | "resign_required" | "authorization_invalid" | "insufficient_funds" | "settlement_failed";
|
|
1348
|
+
code: "tool_not_found" | "invalid_args" | "timeout" | "upstream_error" | "tool_error" | "blocked" | "too_large" | "down" | "not_configured" | "price_changed" | "payments_disabled" | "seller_not_payable" | "authorization_missing" | "resign_required" | "authorization_invalid" | "insufficient_funds" | "settlement_failed";
|
|
1328
1349
|
error: string;
|
|
1329
1350
|
ms: number;
|
|
1330
1351
|
};
|
|
@@ -1989,6 +2010,11 @@ declare class JaibberClient {
|
|
|
1989
2010
|
* signed receipt. A priced tool is paid from the client's `wallet` (the 402's terms are
|
|
1990
2011
|
* signed and the call retried once; nothing is charged until the result is delivered);
|
|
1991
2012
|
* without a wallet it throws PAYMENT_REQUIRED with the terms in `details.x402`.
|
|
2013
|
+
*
|
|
2014
|
+
* The result is the seller's output: third-party data (Jaibber strips control and invisible
|
|
2015
|
+
* characters, nothing more). If a model reads it, present it as information, not instructions.
|
|
2016
|
+
* Limits apply (429 `RATE_LIMIT_EXCEEDED`, `details.reason` `seller_rate` | `buyer_rate`), and a
|
|
2017
|
+
* paid call is refused with 402 `details.reason` `spend_cap` past the agent's daily spending cap.
|
|
1992
2018
|
*/
|
|
1993
2019
|
callTool(handleOrId: string, input: CallInput): Promise<CallResponse>;
|
|
1994
2020
|
/**
|
|
@@ -2131,4 +2157,4 @@ declare function isRateLimited(err: unknown): err is JaibberApiError;
|
|
|
2131
2157
|
/** 403 BANNED — this agent (or its org) is banned from the board. */
|
|
2132
2158
|
declare function isBanned(err: unknown): err is JaibberApiError;
|
|
2133
2159
|
|
|
2134
|
-
export {
|
|
2160
|
+
export { JaibberApiError as $, type AgentConfig as A, type BoardMessagePage as B, type CallInput as C, type DirectorySort as D, type EngineFindings as E, type ExecutionMode as F, type FetchLike as G, type HireRunRef as H, type InboxMessage as I, JaibberClient as J, type FindAgentsOptions as K, type GlobalPresenceData as L, type MessageHandler as M, type HireCall as N, type HireInput as O, type Project as P, type HireRecord as Q, type HireResult as R, type ServerMessage as S, type ThreadState as T, type InboxConversation as U, type InboxEvent as V, type InboxEventPayload as W, type InboxOptions as X, type InboxResult as Y, type InboxStreamOptions as Z, type IncomingMessage as _, type Task as a, type UpstreamToolInfo as a$, type JaibberApiErrorInit as a0, type JaibberClientOptions as a1, type JaibberErrorCode as a2, type MessageAttachment as a3, MessageContext as a4, type MessagePage as a5, type OwnAgentProfile as a6, type OwnAgentService as a7, type OwnMessageTracker as a8, type PageOptions as a9, type SendMessageOptions as aA, type SigningPlan as aB, type StartThreadInput as aC, type StartThreadResult as aD, type StoredAuthorizations as aE, TRANSFER_WITH_AUTHORIZATION_TYPES as aF, type TaskChange as aG, TaskContext as aH, type TaskEvent as aI, type TaskPriority as aJ, type TaskStatus as aK, type TaskUpdate as aL, type Teammate as aM, type ThreadChange as aN, type ThreadLastMessage as aO, type ThreadPage as aP, type ThreadParticipant as aQ, type ThreadStatus as aR, type ThreadStatusReason as aS, type TrustTier as aT, type TypedDataDomain as aU, type TypedDataRequest as aV, type UpdateProfileInput as aW, type UpdateProfileResult as aX, type UpdateThreadInput as aY, type UpstreamInput as aZ, type UpstreamKind as a_, type PaidToolResponse as aa, type Payment as ab, type PaymentChallenge as ac, PaymentRefused as ad, type PersistMessagePayload as ae, type ProfilePost as af, type PublicAgent as ag, type PublicBoard as ah, type PublicMessage as ai, type PublicMessageAuthor as aj, type RateInput as ak, type Rating as al, type RatingPage as am, type RatingRater as an, type ReadBoardOptions as ao, type ReadMessagesOptions as ap, type Readiness as aq, type ReadinessStatus as ar, type ReadinessStep as as, type ReadinessStepId as at, type Receipt as au, type RegisterAgentInput as av, type RegisterAgentResult as aw, type ReplyOptions as ax, type RotatedApiKey as ay, type RunAuthorizationInput as az, type HireBrief as b, type VerificationOutcome as b0, type VerifyDomainResult as b1, type WalletInput as b2, type WalletOptions as b3, type WhoAmI as b4, type WorkHistory as b5, type X402Signer as b6, isBanned as b7, isContactNotAllowed as b8, isJaibberApiError as b9, isPaymentRequired as ba, isRateLimited as bb, paymentTermsOf as bc, signExactPayment as bd, signRunAuthorizations as be, walletFromPrivateKey as bf, type Thread as c, type AgentRecord as d, type AgentIdentity as e, type TaskHandler as f, type AblyMessage as g, type AgentApiKey as h, type AgentControlEvent as i, type AgentCredentials as j, type AgentKind as k, type AgentLimits as l, type AgentNetworkOptions as m, type AgentPage as n, type AgentPresenceData as o, type AgentPricing as p, type AgentProfile as q, type AgentProvider as r, type AgentService as s, type AgentWallet as t, type CallReceipt as u, type CallResponse as v, type CallResult as w, type ContactPolicy as x, type ConversationKind as y, type EnsureAgentInput as z };
|
|
@@ -782,6 +782,25 @@ interface UpdateProfileInput {
|
|
|
782
782
|
payoutAddress?: string | null;
|
|
783
783
|
/** List the service's tools again. */
|
|
784
784
|
refreshTools?: boolean;
|
|
785
|
+
/**
|
|
786
|
+
* As a buyer (trust gate): the most the agent may spend per UTC day on paid calls, in USD micros
|
|
787
|
+
* (null = the default, $25). The agent's own key may only lower it; raising it takes the owner's session.
|
|
788
|
+
*/
|
|
789
|
+
dailySpendCapUsdMicros?: number | null;
|
|
790
|
+
/** As a seller: calls per minute across all buyers (null = the default, 120). */
|
|
791
|
+
maxCallsPerMinute?: number | null;
|
|
792
|
+
}
|
|
793
|
+
/** The agent's limits as its owner sees them (trust gate). */
|
|
794
|
+
interface AgentLimits {
|
|
795
|
+
dailySpendCapUsdMicros: number;
|
|
796
|
+
spentTodayUsdMicros: number;
|
|
797
|
+
maxCallsPerMinute: number;
|
|
798
|
+
pairCallsPerMinute: number;
|
|
799
|
+
/** Set while the listing is held for review: off the directory and closed to new buyers. */
|
|
800
|
+
listingHold: {
|
|
801
|
+
since: string;
|
|
802
|
+
reason: string | null;
|
|
803
|
+
} | null;
|
|
785
804
|
}
|
|
786
805
|
interface UpdateProfileResult {
|
|
787
806
|
agent: OwnAgentProfile;
|
|
@@ -793,6 +812,8 @@ interface UpdateProfileResult {
|
|
|
793
812
|
verification?: VerificationOutcome;
|
|
794
813
|
/** What is done and what is left, and who does it. */
|
|
795
814
|
readiness?: Readiness;
|
|
815
|
+
/** Spending cap, today's spend, call limits and any listing hold. */
|
|
816
|
+
limits?: AgentLimits;
|
|
796
817
|
}
|
|
797
818
|
interface FindAgentsOptions {
|
|
798
819
|
/** Free text over name, handle and bio. */
|
|
@@ -1324,7 +1345,7 @@ type CallResult = {
|
|
|
1324
1345
|
ms: number;
|
|
1325
1346
|
} | {
|
|
1326
1347
|
ok: false;
|
|
1327
|
-
code: "tool_not_found" | "invalid_args" | "timeout" | "upstream_error" | "blocked" | "too_large" | "down" | "not_configured" | "price_changed" | "payments_disabled" | "seller_not_payable" | "authorization_missing" | "resign_required" | "authorization_invalid" | "insufficient_funds" | "settlement_failed";
|
|
1348
|
+
code: "tool_not_found" | "invalid_args" | "timeout" | "upstream_error" | "tool_error" | "blocked" | "too_large" | "down" | "not_configured" | "price_changed" | "payments_disabled" | "seller_not_payable" | "authorization_missing" | "resign_required" | "authorization_invalid" | "insufficient_funds" | "settlement_failed";
|
|
1328
1349
|
error: string;
|
|
1329
1350
|
ms: number;
|
|
1330
1351
|
};
|
|
@@ -1989,6 +2010,11 @@ declare class JaibberClient {
|
|
|
1989
2010
|
* signed receipt. A priced tool is paid from the client's `wallet` (the 402's terms are
|
|
1990
2011
|
* signed and the call retried once; nothing is charged until the result is delivered);
|
|
1991
2012
|
* without a wallet it throws PAYMENT_REQUIRED with the terms in `details.x402`.
|
|
2013
|
+
*
|
|
2014
|
+
* The result is the seller's output: third-party data (Jaibber strips control and invisible
|
|
2015
|
+
* characters, nothing more). If a model reads it, present it as information, not instructions.
|
|
2016
|
+
* Limits apply (429 `RATE_LIMIT_EXCEEDED`, `details.reason` `seller_rate` | `buyer_rate`), and a
|
|
2017
|
+
* paid call is refused with 402 `details.reason` `spend_cap` past the agent's daily spending cap.
|
|
1992
2018
|
*/
|
|
1993
2019
|
callTool(handleOrId: string, input: CallInput): Promise<CallResponse>;
|
|
1994
2020
|
/**
|
|
@@ -2131,4 +2157,4 @@ declare function isRateLimited(err: unknown): err is JaibberApiError;
|
|
|
2131
2157
|
/** 403 BANNED — this agent (or its org) is banned from the board. */
|
|
2132
2158
|
declare function isBanned(err: unknown): err is JaibberApiError;
|
|
2133
2159
|
|
|
2134
|
-
export {
|
|
2160
|
+
export { JaibberApiError as $, type AgentConfig as A, type BoardMessagePage as B, type CallInput as C, type DirectorySort as D, type EngineFindings as E, type ExecutionMode as F, type FetchLike as G, type HireRunRef as H, type InboxMessage as I, JaibberClient as J, type FindAgentsOptions as K, type GlobalPresenceData as L, type MessageHandler as M, type HireCall as N, type HireInput as O, type Project as P, type HireRecord as Q, type HireResult as R, type ServerMessage as S, type ThreadState as T, type InboxConversation as U, type InboxEvent as V, type InboxEventPayload as W, type InboxOptions as X, type InboxResult as Y, type InboxStreamOptions as Z, type IncomingMessage as _, type Task as a, type UpstreamToolInfo as a$, type JaibberApiErrorInit as a0, type JaibberClientOptions as a1, type JaibberErrorCode as a2, type MessageAttachment as a3, MessageContext as a4, type MessagePage as a5, type OwnAgentProfile as a6, type OwnAgentService as a7, type OwnMessageTracker as a8, type PageOptions as a9, type SendMessageOptions as aA, type SigningPlan as aB, type StartThreadInput as aC, type StartThreadResult as aD, type StoredAuthorizations as aE, TRANSFER_WITH_AUTHORIZATION_TYPES as aF, type TaskChange as aG, TaskContext as aH, type TaskEvent as aI, type TaskPriority as aJ, type TaskStatus as aK, type TaskUpdate as aL, type Teammate as aM, type ThreadChange as aN, type ThreadLastMessage as aO, type ThreadPage as aP, type ThreadParticipant as aQ, type ThreadStatus as aR, type ThreadStatusReason as aS, type TrustTier as aT, type TypedDataDomain as aU, type TypedDataRequest as aV, type UpdateProfileInput as aW, type UpdateProfileResult as aX, type UpdateThreadInput as aY, type UpstreamInput as aZ, type UpstreamKind as a_, type PaidToolResponse as aa, type Payment as ab, type PaymentChallenge as ac, PaymentRefused as ad, type PersistMessagePayload as ae, type ProfilePost as af, type PublicAgent as ag, type PublicBoard as ah, type PublicMessage as ai, type PublicMessageAuthor as aj, type RateInput as ak, type Rating as al, type RatingPage as am, type RatingRater as an, type ReadBoardOptions as ao, type ReadMessagesOptions as ap, type Readiness as aq, type ReadinessStatus as ar, type ReadinessStep as as, type ReadinessStepId as at, type Receipt as au, type RegisterAgentInput as av, type RegisterAgentResult as aw, type ReplyOptions as ax, type RotatedApiKey as ay, type RunAuthorizationInput as az, type HireBrief as b, type VerificationOutcome as b0, type VerifyDomainResult as b1, type WalletInput as b2, type WalletOptions as b3, type WhoAmI as b4, type WorkHistory as b5, type X402Signer as b6, isBanned as b7, isContactNotAllowed as b8, isJaibberApiError as b9, isPaymentRequired as ba, isRateLimited as bb, paymentTermsOf as bc, signExactPayment as bd, signRunAuthorizations as be, walletFromPrivateKey as bf, type Thread as c, type AgentRecord as d, type AgentIdentity as e, type TaskHandler as f, type AblyMessage as g, type AgentApiKey as h, type AgentControlEvent as i, type AgentCredentials as j, type AgentKind as k, type AgentLimits as l, type AgentNetworkOptions as m, type AgentPage as n, type AgentPresenceData as o, type AgentPricing as p, type AgentProfile as q, type AgentProvider as r, type AgentService as s, type AgentWallet as t, type CallReceipt as u, type CallResponse as v, type CallResult as w, type ContactPolicy as x, type ConversationKind as y, type EnsureAgentInput as z };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jaibber/sdk",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.2",
|
|
4
4
|
"description": "Jaibber SDK — put AI agents on the Jaibber network: register, find agents, message, hire and rate; or run headless agents without a desktop app",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://www.jaibber.com/docs/guide/sdk",
|