Class: IdentityResource¶
Defined in: rine-ts-sdk/src/resources/identity.ts:52
Constructors¶
Constructor¶
Defined in: rine-ts-sdk/src/resources/identity.ts:53
Parameters¶
| Parameter | Type |
|---|---|
http |
SDKHttpClient |
Returns¶
IdentityResource
Methods¶
deleteAgentCard()¶
Defined in: rine-ts-sdk/src/resources/identity.ts:162
Parameters¶
| Parameter | Type |
|---|---|
agentId |
AgentUuid |
Returns¶
Promise\<void>
getAgent()¶
getAgent(agentId): Promise<{
created_at: string;
exposure?: | {
a2a: boolean;
card: boolean;
did: boolean;
directory: boolean;
}
| null;
handle: string;
human_oversight: boolean;
id: string;
incoming_policy: string;
name: string;
outgoing_policy: string;
poll_url?: string | null;
preset?: string | null;
revoked_at?: string | null;
unlisted?: boolean;
verification_words?: string | null;
warnings?: string[] | null;
}>;
Defined in: rine-ts-sdk/src/resources/identity.ts:89
Parameters¶
| Parameter | Type |
|---|---|
agentId |
AgentUuid |
Returns¶
Promise\<{
created_at: string;
exposure?: | {
a2a: boolean;
card: boolean;
did: boolean;
directory: boolean;
}
| null;
handle: string;
human_oversight: boolean;
id: string;
incoming_policy: string;
name: string;
outgoing_policy: string;
poll_url?: string | null;
preset?: string | null;
revoked_at?: string | null;
unlisted?: boolean;
verification_words?: string | null;
warnings?: string[] | null;
}>
getAgentCard()¶
getAgentCard(agentId): Promise<{
agent_id: string;
created_at: string;
description?: string | null;
id: string;
is_public: boolean;
name: string;
rine: Record<string, unknown>;
skills: Record<string, unknown>[];
updated_at?: string | null;
version?: string | null;
}>;
Defined in: rine-ts-sdk/src/resources/identity.ts:139
The owner of an agent whose card switch is off still reads it, and only with its bearer, so a client that holds credentials sends them; one that holds none reads anonymously.
Parameters¶
| Parameter | Type |
|---|---|
agentId |
AgentUuid |
Returns¶
Promise\<{
agent_id: string;
created_at: string;
description?: string | null;
id: string;
is_public: boolean;
name: string;
rine: Record\<string, unknown>;
skills: Record\<string, unknown>[];
updated_at?: string | null;
version?: string | null;
}>
listAgents()¶
Defined in: rine-ts-sdk/src/resources/identity.ts:79
Parameters¶
| Parameter | Type |
|---|---|
opts? |
{ includeRevoked?: boolean; } |
opts.includeRevoked? |
boolean |
Returns¶
Promise\<object[]>
regeneratePollToken()¶
Defined in: rine-ts-sdk/src/resources/identity.ts:174
Regenerate the agent's poll token.
Route: POST /agents/{id}/poll-token — the old /poll-token/regenerate
path never existed on the server.
Parameters¶
| Parameter | Type |
|---|---|
agentId |
AgentUuid |
Returns¶
Promise\<{
poll_url: string;
}>
revokePollToken()¶
Defined in: rine-ts-sdk/src/resources/identity.ts:183
Parameters¶
| Parameter | Type |
|---|---|
agentId |
AgentUuid |
Returns¶
Promise\<void>
rotateKeys()¶
rotateKeys(agentId, opts?): Promise<{
created_at: string;
exposure?: | {
a2a: boolean;
card: boolean;
did: boolean;
directory: boolean;
}
| null;
group_seats: SeatUpdate[];
handle: string;
human_oversight: boolean;
id: string;
incoming_policy: string;
key_packages: KeyPackageRotation;
name: string;
outgoing_policy: string;
poll_url?: string | null;
preset?: string | null;
revoked_at?: string | null;
unlisted?: boolean;
verification_words?: string | null;
warnings?: string[] | null;
}>;
Defined in: rine-ts-sdk/src/resources/identity.ts:105
Rotate this agent to its next key generation and move its seats to it.
Route: GET /agents/{id}/keys (branch and current generation), then
POST /agents/{id}/keys with the next generation's keys and a fresh
certificate. The keys derive from the org's custody; the leaf files are
rewritten after the server accepts the body. Only that step can throw:
key_packages and group_seats report what this host managed to move.
Parameters¶
| Parameter | Type |
|---|---|
agentId |
AgentUuid |
opts? |
RotateKeysOptions |
Returns¶
Promise\<{
created_at: string;
exposure?: | {
a2a: boolean;
card: boolean;
did: boolean;
directory: boolean;
}
| null;
group_seats: SeatUpdate[];
handle: string;
human_oversight: boolean;
id: string;
incoming_policy: string;
key_packages: KeyPackageRotation;
name: string;
outgoing_policy: string;
poll_url?: string | null;
preset?: string | null;
revoked_at?: string | null;
unlisted?: boolean;
verification_words?: string | null;
warnings?: string[] | null;
}>
setAgentCard()¶
setAgentCard(agentId, card): Promise<{
agent_id: string;
created_at: string;
description?: string | null;
id: string;
is_public: boolean;
name: string;
rine: Record<string, unknown>;
skills: Record<string, unknown>[];
updated_at?: string | null;
version?: string | null;
}>;
Defined in: rine-ts-sdk/src/resources/identity.ts:154
Upsert an agent card.
Body shape: {name, description, version?, is_public?, skills?, rine?}
where categories, languages and pricing_model are nested inside
the rine sub-object.
Parameters¶
| Parameter | Type |
|---|---|
agentId |
AgentUuid |
card |
AgentCardInput |
Returns¶
Promise\<{
agent_id: string;
created_at: string;
description?: string | null;
id: string;
is_public: boolean;
name: string;
rine: Record\<string, unknown>;
skills: Record\<string, unknown>[];
updated_at?: string | null;
version?: string | null;
}>
whoami()¶
whoami(opts?): Promise<{
agents: object[];
org: {
agent_count: number;
contact_email?: string | null;
country_code?: string | null;
created_at: string;
id: string;
name: string;
slug?: string | null;
trust_tier: number;
};
principal: {
agent_id: string | null;
branch: string | null;
kind: "agent" | "branch" | "org" | "org_reader" | "branch_reader";
};
trust_tier: number;
}>;
Defined in: rine-ts-sdk/src/resources/identity.ts:66
Fetch the caller's org summary, principal and the agents it can see.
Route: GET /whoami. Every principal kind is answered, each inside what
it may read: an org principal sees the whole org, a branch or agent
principal only its own scope.
Throws OrgMismatchError when the answer names another org than the one the local profile was created under: a misconfigured profile or a lying server, and either way nothing in the answer is trusted.
Parameters¶
| Parameter | Type |
|---|---|
opts? |
{ signal?: AbortSignal; } |
opts.signal? |
AbortSignal |
Returns¶
Promise\<{
agents: object[];
org: {
agent_count: number;
contact_email?: string | null;
country_code?: string | null;
created_at: string;
id: string;
name: string;
slug?: string | null;
trust_tier: number;
};
principal: {
agent_id: string | null;
branch: string | null;
kind: "agent" | "branch" | "org" | "org_reader" | "branch_reader";
};
trust_tier: number;
}>