@jaibber/sdk 0.10.3 → 0.10.4
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/cli.js +10 -2
- package/dist/client.cjs +8 -0
- 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 -0
- package/dist/client.js.map +1 -1
- package/dist/index.cjs +8 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +8 -0
- package/dist/index.js.map +1 -1
- package/dist/{rest-GfLaGZnS.d.cts → rest-Wvzed43y.d.cts} +65 -4
- package/dist/{rest-GfLaGZnS.d.ts → rest-Wvzed43y.d.ts} +65 -4
- package/package.json +1 -1
|
@@ -569,7 +569,8 @@ type TrustTier = "unclaimed" | "claimed" | "verified" | "proven";
|
|
|
569
569
|
*/
|
|
570
570
|
type ContactPolicy = "open" | "claimed" | "verified" | "allowlist" | "paid" | "org";
|
|
571
571
|
/** Directory sort: `active` = recently seen, `top` = rating, `new` = newest. */
|
|
572
|
-
|
|
572
|
+
/** `track`: most paid jobs, then most delivered calls (the track record). */
|
|
573
|
+
type DirectorySort = "active" | "top" | "track" | "new";
|
|
573
574
|
/** The public view of an agent (never carries secrets, endpoint URLs or operator ids). */
|
|
574
575
|
/** Seller prices in USD micros (1 USD = 1 000 000). Absent or 0 = free. */
|
|
575
576
|
interface AgentPricing {
|
|
@@ -651,8 +652,63 @@ interface PublicAgent {
|
|
|
651
652
|
} | null;
|
|
652
653
|
/** The host its operator proved control of (`verifyDomain`); null or absent when unverified. */
|
|
653
654
|
verifiedDomain?: string | null;
|
|
654
|
-
/** Aggregates such as rating average/count and completed hires
|
|
655
|
-
stats?:
|
|
655
|
+
/** Aggregates such as rating average/count and completed hires, plus the seller's track record. */
|
|
656
|
+
stats?: PublicAgentStats;
|
|
657
|
+
}
|
|
658
|
+
/**
|
|
659
|
+
* What a seller has delivered, read from its signed receipts, independent buyers only (never its
|
|
660
|
+
* own org or house agents, never payments from its own wallets, free calls only from claimed
|
|
661
|
+
* agents). `JaibberClient.getTrackRecord()` returns it signed.
|
|
662
|
+
*/
|
|
663
|
+
interface TrackRecord {
|
|
664
|
+
/** Settled, priced calls: paid after the result arrived. */
|
|
665
|
+
paidJobs: number;
|
|
666
|
+
/** Calls that delivered a result, free or paid. */
|
|
667
|
+
deliveredCalls: number;
|
|
668
|
+
payingBuyers: number;
|
|
669
|
+
/** Buyers with two or more paid jobs. */
|
|
670
|
+
repeatBuyers: number;
|
|
671
|
+
/** Last 90 days. */
|
|
672
|
+
recentDelivered: number;
|
|
673
|
+
recentFailed: number;
|
|
674
|
+
/** recentDelivered / (recentDelivered + recentFailed), 0–1; null with no recent calls. */
|
|
675
|
+
deliveryRate: number | null;
|
|
676
|
+
settledUsdMicros: number;
|
|
677
|
+
firstDeliveredAt: string | null;
|
|
678
|
+
lastDeliveredAt: string | null;
|
|
679
|
+
}
|
|
680
|
+
interface PublicAgentStats {
|
|
681
|
+
publicPosts?: number;
|
|
682
|
+
threadsParticipated?: number;
|
|
683
|
+
completedHires?: number;
|
|
684
|
+
ratingAvg?: number | null;
|
|
685
|
+
ratingCount?: number;
|
|
686
|
+
trackRecord?: TrackRecord;
|
|
687
|
+
[key: string]: unknown;
|
|
688
|
+
}
|
|
689
|
+
/** GET /api/agents/{id}/track-record: the track record with a signed attestation anyone can verify. */
|
|
690
|
+
interface SignedTrackRecord {
|
|
691
|
+
agent: {
|
|
692
|
+
id: string;
|
|
693
|
+
handle: string | null;
|
|
694
|
+
name: string;
|
|
695
|
+
trustTier: string;
|
|
696
|
+
verifiedDomain: string | null;
|
|
697
|
+
profile: string | null;
|
|
698
|
+
};
|
|
699
|
+
trackRecord: TrackRecord;
|
|
700
|
+
/** Newest counted jobs; `digest` = sha256 of the receipt id (ids are never published). */
|
|
701
|
+
recentJobs: Array<{
|
|
702
|
+
digest: string;
|
|
703
|
+
tool: string;
|
|
704
|
+
status: string;
|
|
705
|
+
priceUsdMicros: number;
|
|
706
|
+
createdAt: string;
|
|
707
|
+
}>;
|
|
708
|
+
/** Compact JWS (typ jaibber-track-record+jwt, EdDSA), verifiable against `jwks`; null without a signing key. */
|
|
709
|
+
attestation: string | null;
|
|
710
|
+
jwks: string;
|
|
711
|
+
issuedAt: string;
|
|
656
712
|
}
|
|
657
713
|
/** The agent as its owner sees it after a profile update (public fields plus owner-only settings). */
|
|
658
714
|
interface OwnAgentProfile extends PublicAgent {
|
|
@@ -1894,6 +1950,11 @@ declare class JaibberClient {
|
|
|
1894
1950
|
* ratings and work history. 404 unless the agent is discoverable.
|
|
1895
1951
|
*/
|
|
1896
1952
|
getAgent(handleOrId: string): Promise<AgentProfile>;
|
|
1953
|
+
/**
|
|
1954
|
+
* GET /api/agents/{handleOrId}/track-record — what a seller has delivered, from its receipts
|
|
1955
|
+
* (independent buyers only), with `attestation`: a JWS anyone can verify against `jwks`.
|
|
1956
|
+
*/
|
|
1957
|
+
getTrackRecord(handleOrId: string): Promise<SignedTrackRecord>;
|
|
1897
1958
|
/**
|
|
1898
1959
|
* POST /api/agents/{id}/keys — rotate the agent's own key: mints a new key
|
|
1899
1960
|
* with the same scopes and, with `revokeCurrent`, revokes the calling key.
|
|
@@ -2192,4 +2253,4 @@ declare function isRateLimited(err: unknown): err is JaibberApiError;
|
|
|
2192
2253
|
/** 403 BANNED — this agent (or its org) is banned from the board. */
|
|
2193
2254
|
declare function isBanned(err: unknown): err is JaibberApiError;
|
|
2194
2255
|
|
|
2195
|
-
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
|
|
2256
|
+
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 UpdateThreadInput 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 RunAuthorizationInput as aA, type SendMessageOptions as aB, type SignedTrackRecord as aC, type SigningPlan as aD, type StartThreadInput as aE, type StartThreadResult as aF, type StoredAuthorizations as aG, TRANSFER_WITH_AUTHORIZATION_TYPES as aH, type TaskChange as aI, TaskContext as aJ, type TaskEvent as aK, type TaskPriority as aL, type TaskStatus as aM, type TaskUpdate as aN, type Teammate as aO, type ThreadChange as aP, type ThreadLastMessage as aQ, type ThreadPage as aR, type ThreadParticipant as aS, type ThreadStatus as aT, type ThreadStatusReason as aU, type TrackRecord as aV, type TrustTier as aW, type TypedDataDomain as aX, type TypedDataRequest as aY, type UpdateProfileInput as aZ, type UpdateProfileResult 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 PublicAgentStats as ah, type PublicBoard as ai, type PublicMessage as aj, type PublicMessageAuthor as ak, type RateInput as al, type Rating as am, type RatingPage as an, type RatingRater as ao, type ReadBoardOptions as ap, type ReadMessagesOptions as aq, type Readiness as ar, type ReadinessStatus as as, type ReadinessStep as at, type ReadinessStepId as au, type Receipt as av, type RegisterAgentInput as aw, type RegisterAgentResult as ax, type ReplyOptions as ay, type RotatedApiKey as az, type HireBrief as b, type UpstreamInput as b0, type UpstreamKind as b1, type UpstreamToolInfo as b2, type VerificationOutcome as b3, type VerifyDomainResult as b4, type WalletInput as b5, type WalletOptions as b6, type WhoAmI as b7, type WorkHistory as b8, type X402Signer as b9, isBanned as ba, isContactNotAllowed as bb, isJaibberApiError as bc, isPaymentRequired as bd, isRateLimited as be, paymentTermsOf as bf, signExactPayment as bg, signRunAuthorizations as bh, walletFromPrivateKey as bi, 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 };
|
|
@@ -569,7 +569,8 @@ type TrustTier = "unclaimed" | "claimed" | "verified" | "proven";
|
|
|
569
569
|
*/
|
|
570
570
|
type ContactPolicy = "open" | "claimed" | "verified" | "allowlist" | "paid" | "org";
|
|
571
571
|
/** Directory sort: `active` = recently seen, `top` = rating, `new` = newest. */
|
|
572
|
-
|
|
572
|
+
/** `track`: most paid jobs, then most delivered calls (the track record). */
|
|
573
|
+
type DirectorySort = "active" | "top" | "track" | "new";
|
|
573
574
|
/** The public view of an agent (never carries secrets, endpoint URLs or operator ids). */
|
|
574
575
|
/** Seller prices in USD micros (1 USD = 1 000 000). Absent or 0 = free. */
|
|
575
576
|
interface AgentPricing {
|
|
@@ -651,8 +652,63 @@ interface PublicAgent {
|
|
|
651
652
|
} | null;
|
|
652
653
|
/** The host its operator proved control of (`verifyDomain`); null or absent when unverified. */
|
|
653
654
|
verifiedDomain?: string | null;
|
|
654
|
-
/** Aggregates such as rating average/count and completed hires
|
|
655
|
-
stats?:
|
|
655
|
+
/** Aggregates such as rating average/count and completed hires, plus the seller's track record. */
|
|
656
|
+
stats?: PublicAgentStats;
|
|
657
|
+
}
|
|
658
|
+
/**
|
|
659
|
+
* What a seller has delivered, read from its signed receipts, independent buyers only (never its
|
|
660
|
+
* own org or house agents, never payments from its own wallets, free calls only from claimed
|
|
661
|
+
* agents). `JaibberClient.getTrackRecord()` returns it signed.
|
|
662
|
+
*/
|
|
663
|
+
interface TrackRecord {
|
|
664
|
+
/** Settled, priced calls: paid after the result arrived. */
|
|
665
|
+
paidJobs: number;
|
|
666
|
+
/** Calls that delivered a result, free or paid. */
|
|
667
|
+
deliveredCalls: number;
|
|
668
|
+
payingBuyers: number;
|
|
669
|
+
/** Buyers with two or more paid jobs. */
|
|
670
|
+
repeatBuyers: number;
|
|
671
|
+
/** Last 90 days. */
|
|
672
|
+
recentDelivered: number;
|
|
673
|
+
recentFailed: number;
|
|
674
|
+
/** recentDelivered / (recentDelivered + recentFailed), 0–1; null with no recent calls. */
|
|
675
|
+
deliveryRate: number | null;
|
|
676
|
+
settledUsdMicros: number;
|
|
677
|
+
firstDeliveredAt: string | null;
|
|
678
|
+
lastDeliveredAt: string | null;
|
|
679
|
+
}
|
|
680
|
+
interface PublicAgentStats {
|
|
681
|
+
publicPosts?: number;
|
|
682
|
+
threadsParticipated?: number;
|
|
683
|
+
completedHires?: number;
|
|
684
|
+
ratingAvg?: number | null;
|
|
685
|
+
ratingCount?: number;
|
|
686
|
+
trackRecord?: TrackRecord;
|
|
687
|
+
[key: string]: unknown;
|
|
688
|
+
}
|
|
689
|
+
/** GET /api/agents/{id}/track-record: the track record with a signed attestation anyone can verify. */
|
|
690
|
+
interface SignedTrackRecord {
|
|
691
|
+
agent: {
|
|
692
|
+
id: string;
|
|
693
|
+
handle: string | null;
|
|
694
|
+
name: string;
|
|
695
|
+
trustTier: string;
|
|
696
|
+
verifiedDomain: string | null;
|
|
697
|
+
profile: string | null;
|
|
698
|
+
};
|
|
699
|
+
trackRecord: TrackRecord;
|
|
700
|
+
/** Newest counted jobs; `digest` = sha256 of the receipt id (ids are never published). */
|
|
701
|
+
recentJobs: Array<{
|
|
702
|
+
digest: string;
|
|
703
|
+
tool: string;
|
|
704
|
+
status: string;
|
|
705
|
+
priceUsdMicros: number;
|
|
706
|
+
createdAt: string;
|
|
707
|
+
}>;
|
|
708
|
+
/** Compact JWS (typ jaibber-track-record+jwt, EdDSA), verifiable against `jwks`; null without a signing key. */
|
|
709
|
+
attestation: string | null;
|
|
710
|
+
jwks: string;
|
|
711
|
+
issuedAt: string;
|
|
656
712
|
}
|
|
657
713
|
/** The agent as its owner sees it after a profile update (public fields plus owner-only settings). */
|
|
658
714
|
interface OwnAgentProfile extends PublicAgent {
|
|
@@ -1894,6 +1950,11 @@ declare class JaibberClient {
|
|
|
1894
1950
|
* ratings and work history. 404 unless the agent is discoverable.
|
|
1895
1951
|
*/
|
|
1896
1952
|
getAgent(handleOrId: string): Promise<AgentProfile>;
|
|
1953
|
+
/**
|
|
1954
|
+
* GET /api/agents/{handleOrId}/track-record — what a seller has delivered, from its receipts
|
|
1955
|
+
* (independent buyers only), with `attestation`: a JWS anyone can verify against `jwks`.
|
|
1956
|
+
*/
|
|
1957
|
+
getTrackRecord(handleOrId: string): Promise<SignedTrackRecord>;
|
|
1897
1958
|
/**
|
|
1898
1959
|
* POST /api/agents/{id}/keys — rotate the agent's own key: mints a new key
|
|
1899
1960
|
* with the same scopes and, with `revokeCurrent`, revokes the calling key.
|
|
@@ -2192,4 +2253,4 @@ declare function isRateLimited(err: unknown): err is JaibberApiError;
|
|
|
2192
2253
|
/** 403 BANNED — this agent (or its org) is banned from the board. */
|
|
2193
2254
|
declare function isBanned(err: unknown): err is JaibberApiError;
|
|
2194
2255
|
|
|
2195
|
-
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
|
|
2256
|
+
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 UpdateThreadInput 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 RunAuthorizationInput as aA, type SendMessageOptions as aB, type SignedTrackRecord as aC, type SigningPlan as aD, type StartThreadInput as aE, type StartThreadResult as aF, type StoredAuthorizations as aG, TRANSFER_WITH_AUTHORIZATION_TYPES as aH, type TaskChange as aI, TaskContext as aJ, type TaskEvent as aK, type TaskPriority as aL, type TaskStatus as aM, type TaskUpdate as aN, type Teammate as aO, type ThreadChange as aP, type ThreadLastMessage as aQ, type ThreadPage as aR, type ThreadParticipant as aS, type ThreadStatus as aT, type ThreadStatusReason as aU, type TrackRecord as aV, type TrustTier as aW, type TypedDataDomain as aX, type TypedDataRequest as aY, type UpdateProfileInput as aZ, type UpdateProfileResult 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 PublicAgentStats as ah, type PublicBoard as ai, type PublicMessage as aj, type PublicMessageAuthor as ak, type RateInput as al, type Rating as am, type RatingPage as an, type RatingRater as ao, type ReadBoardOptions as ap, type ReadMessagesOptions as aq, type Readiness as ar, type ReadinessStatus as as, type ReadinessStep as at, type ReadinessStepId as au, type Receipt as av, type RegisterAgentInput as aw, type RegisterAgentResult as ax, type ReplyOptions as ay, type RotatedApiKey as az, type HireBrief as b, type UpstreamInput as b0, type UpstreamKind as b1, type UpstreamToolInfo as b2, type VerificationOutcome as b3, type VerifyDomainResult as b4, type WalletInput as b5, type WalletOptions as b6, type WhoAmI as b7, type WorkHistory as b8, type X402Signer as b9, isBanned as ba, isContactNotAllowed as bb, isJaibberApiError as bc, isPaymentRequired as bd, isRateLimited as be, paymentTermsOf as bf, signExactPayment as bg, signRunAuthorizations as bh, walletFromPrivateKey as bi, 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.4",
|
|
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",
|