@terminal3/t3n-sdk 4.35.1 → 4.37.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/cli/index.js +1 -1
- package/dist/index.d.ts +100 -2
- package/dist/index.esm.js +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -3310,6 +3310,30 @@ interface RoleGetResponse {
|
|
|
3310
3310
|
}
|
|
3311
3311
|
/** Shallow runtime guard for {@link RoleGetResponse}. */
|
|
3312
3312
|
declare function isRoleGetResponse(value: unknown): value is RoleGetResponse;
|
|
3313
|
+
/**
|
|
3314
|
+
* One org-owned agent's outbound host allow-list for a single contract.
|
|
3315
|
+
*
|
|
3316
|
+
* Egress only — it carries no data scopes by construction, so it can never be
|
|
3317
|
+
* a second path to org data (that stays with `org-policy-set-grants`).
|
|
3318
|
+
*/
|
|
3319
|
+
interface AgentEgressEntry {
|
|
3320
|
+
contract_id: string;
|
|
3321
|
+
/** Bare lowercase hostnames, matched exactly by the node. */
|
|
3322
|
+
allowed_hosts: string[];
|
|
3323
|
+
/** WIT functions covered; `["*"]` means all of them. */
|
|
3324
|
+
functions: string[];
|
|
3325
|
+
/** Present only when the allow-list is pinned to a version range. */
|
|
3326
|
+
version_req?: string;
|
|
3327
|
+
}
|
|
3328
|
+
/**
|
|
3329
|
+
* Response for `org-agent-egress-get`; `egress` is `null` when the agent holds
|
|
3330
|
+
* no egress entry for the requested contract.
|
|
3331
|
+
*/
|
|
3332
|
+
interface AgentEgressGetResponse {
|
|
3333
|
+
egress: AgentEgressEntry | null;
|
|
3334
|
+
}
|
|
3335
|
+
/** Runtime guard for {@link AgentEgressGetResponse}. */
|
|
3336
|
+
declare function isAgentEgressGetResponse(value: unknown): value is AgentEgressGetResponse;
|
|
3313
3337
|
/** Response for `org-role-assignments-get`. */
|
|
3314
3338
|
interface RoleAssignmentsResponse {
|
|
3315
3339
|
/** Echoed back so callers don't need to track which request this answers. */
|
|
@@ -3582,6 +3606,38 @@ interface DeleteGrantsInput {
|
|
|
3582
3606
|
orgDid: string;
|
|
3583
3607
|
contractId: string;
|
|
3584
3608
|
}
|
|
3609
|
+
/**
|
|
3610
|
+
* Grant or replace the outbound host allow-list an org-owned agent may use
|
|
3611
|
+
* while executing one of the org's contracts (org-admin only).
|
|
3612
|
+
*
|
|
3613
|
+
* Egress ONLY — this confers no data authority. An agent needs BOTH this and a
|
|
3614
|
+
* {@link OrgDataClient.setGrants} entry naming its own DID to do useful work:
|
|
3615
|
+
* `setGrants` authorises the org data it may read, this authorises the hosts it
|
|
3616
|
+
* may dial. No human `agent_auth` row is involved in either.
|
|
3617
|
+
*
|
|
3618
|
+
* Hosts are matched EXACTLY (lowercased). A scheme, port, path, or `*` wildcard
|
|
3619
|
+
* is rejected rather than stored as an entry that could never match.
|
|
3620
|
+
*/
|
|
3621
|
+
interface SetAgentEgressInput {
|
|
3622
|
+
orgDid: string;
|
|
3623
|
+
/** The org-owned agent the allow-list applies to. */
|
|
3624
|
+
agentDid: string;
|
|
3625
|
+
contractId: string;
|
|
3626
|
+
/** Bare hostnames, e.g. `["api.airwallex.com"]`. Must be non-empty — use
|
|
3627
|
+
* {@link OrgDataClient.deleteAgentEgress} to revoke. */
|
|
3628
|
+
allowedHosts: string[];
|
|
3629
|
+
/** WIT functions the allow-list covers. Defaults to all functions. Narrowing
|
|
3630
|
+
* this means a call to an uncovered function gets deny-all egress. */
|
|
3631
|
+
functions?: string[];
|
|
3632
|
+
/** SemVer requirement on the target contract version; omit to cover all. */
|
|
3633
|
+
versionReq?: string;
|
|
3634
|
+
}
|
|
3635
|
+
/** Addresses one `(agent, contract)` egress entry. */
|
|
3636
|
+
interface AgentEgressRefInput {
|
|
3637
|
+
orgDid: string;
|
|
3638
|
+
agentDid: string;
|
|
3639
|
+
contractId: string;
|
|
3640
|
+
}
|
|
3585
3641
|
/**
|
|
3586
3642
|
* Create or replace a secret and its three ACLs (org-admin only). `value` is
|
|
3587
3643
|
* optional on a replace — omitting it preserves the stored bytes so an admin
|
|
@@ -3847,6 +3903,27 @@ declare class OrgDataClient {
|
|
|
3847
3903
|
* Delete the grant entry for a contract entirely.
|
|
3848
3904
|
*/
|
|
3849
3905
|
deleteGrants(input: DeleteGrantsInput): Promise<MutationResponse>;
|
|
3906
|
+
/**
|
|
3907
|
+
* Grant or replace the outbound host allow-list an org-owned agent may use
|
|
3908
|
+
* while executing one of the org's contracts (org-admin only).
|
|
3909
|
+
*
|
|
3910
|
+
* Full replacement for the `(agent, contract)` pair. Other contracts' egress
|
|
3911
|
+
* entries are untouched. See {@link SetAgentEgressInput} on why this is
|
|
3912
|
+
* needed alongside {@link setGrants}.
|
|
3913
|
+
*/
|
|
3914
|
+
setAgentEgress(input: SetAgentEgressInput): Promise<MutationResponse>;
|
|
3915
|
+
/**
|
|
3916
|
+
* The egress entry in force for one `(agent, contract)` pair (org-admin
|
|
3917
|
+
* only). `egress` is `null` when the agent holds none — which means
|
|
3918
|
+
* deny-all outbound HTTP for that contract.
|
|
3919
|
+
*/
|
|
3920
|
+
getAgentEgress(input: AgentEgressRefInput): Promise<AgentEgressGetResponse>;
|
|
3921
|
+
/**
|
|
3922
|
+
* Revoke an org-owned agent's egress for one contract (org-admin only).
|
|
3923
|
+
* Effective on the agent's next call. `deleted` is `false` when no entry was
|
|
3924
|
+
* in force.
|
|
3925
|
+
*/
|
|
3926
|
+
deleteAgentEgress(input: AgentEgressRefInput): Promise<MutationResponse>;
|
|
3850
3927
|
/** Upsert a role definition (org-admin only). */
|
|
3851
3928
|
setRole(input: SetRoleInput): Promise<MutationResponse>;
|
|
3852
3929
|
/** Delete a role definition (org-admin only). */
|
|
@@ -4047,6 +4124,27 @@ declare class SessionOrgDataClient {
|
|
|
4047
4124
|
setGrants(input: SetGrantsInput): Promise<MutationResponse>;
|
|
4048
4125
|
/** Mirrors {@link OrgDataClient.deleteGrants}. */
|
|
4049
4126
|
deleteGrants(input: DeleteGrantsInput): Promise<MutationResponse>;
|
|
4127
|
+
/**
|
|
4128
|
+
* Grant or replace the outbound host allow-list an org-owned agent may use
|
|
4129
|
+
* while executing one of the org's contracts (org-admin only).
|
|
4130
|
+
*
|
|
4131
|
+
* Full replacement for the `(agent, contract)` pair. Other contracts' egress
|
|
4132
|
+
* entries are untouched. See {@link SetAgentEgressInput} on why this is
|
|
4133
|
+
* needed alongside {@link setGrants}.
|
|
4134
|
+
*/
|
|
4135
|
+
setAgentEgress(input: SetAgentEgressInput): Promise<MutationResponse>;
|
|
4136
|
+
/**
|
|
4137
|
+
* The egress entry in force for one `(agent, contract)` pair (org-admin
|
|
4138
|
+
* only). `egress` is `null` when the agent holds none — which means
|
|
4139
|
+
* deny-all outbound HTTP for that contract.
|
|
4140
|
+
*/
|
|
4141
|
+
getAgentEgress(input: AgentEgressRefInput): Promise<AgentEgressGetResponse>;
|
|
4142
|
+
/**
|
|
4143
|
+
* Revoke an org-owned agent's egress for one contract (org-admin only).
|
|
4144
|
+
* Effective on the agent's next call. `deleted` is `false` when no entry was
|
|
4145
|
+
* in force.
|
|
4146
|
+
*/
|
|
4147
|
+
deleteAgentEgress(input: AgentEgressRefInput): Promise<MutationResponse>;
|
|
4050
4148
|
/** Upsert a role definition (org-admin only). */
|
|
4051
4149
|
setRole(input: SetRoleInput): Promise<MutationResponse>;
|
|
4052
4150
|
/** Delete a role definition (org-admin only). */
|
|
@@ -5130,5 +5228,5 @@ declare function tenantDidHex(tenantDid: string): string;
|
|
|
5130
5228
|
declare function validateTail(tail: string): string;
|
|
5131
5229
|
declare function canonicalTenantName(tenantDid: string, tail: string): string;
|
|
5132
5230
|
|
|
5133
|
-
export { AGENT_CARDS_SCOPE, AuthMethod, AuthenticationError, BASE_UNITS_PER_TOKEN, ContractResponseError, DEFAULT_ENVIRONMENT, DEFAULT_INDIVIDUAL_THRESHOLD_CENTS, DEFAULT_KYC_POLL_CADENCE, HandshakeError, HttpTransport, InvokeError, KycStatusTimeoutError, LogLevel, MockTransport, NODE_URLS, OrgDataClient, OtpRateLimitedError, RpcError, SessionExpiredError, SessionOrgDataClient, SessionStateError, SessionStatus, SessionUsageReportClient, T3nClient, T3nConfigError, T3nError, TERMINAL_KYC_STATUSES, TOKEN_DECIMALS, TenantClient, TenantContractsNamespace, TenantMapsNamespace, TenantNamespace, TenantSdkValidationError, TenantTokenNamespace, UnsupportedTenantSdkOperationError, UserUpsertError, WasmError, WireEncodingError, Z_PAYROLL_AUDIT_READ_FUNCTIONS, Z_PAYROLL_RUN_FUNCTIONS, _b64uEncode, assertShape, b64uDecodeStrict, b64uEncodeBytes, buildSecretWriteArgs, bytesToString, canonicalTenantName, clearKeyCache, clearManifestVersionFloor, compactDidFromBytes, createDefaultHandlers, createEmailOtpAuthInput, createEthAuthInput, createLogger, createMlKemPublicKeyHandler, createOidcAuthInput, createOrgDataClientFromSession, createRandomHandler, createUsageReportClientFromSession, createWorkloadAuthInput, decodeWasmErrorMessage, deriveAgentCardEntryId, eth_get_address, extractWasmError, fetchDkgAttestation, fetchMlKemPublicKey, fetchTrustedManifest, formatTokens, generateRandomString, generateUUID, getEnvironment, getEnvironmentName, getGlobalLogLevel, getLogger, getNodeUrl, getScriptVersion, invoke, isAgentCardResponse, isDataGetResponse, isDataListResponse, isListAgentsResponse, isListHumanMembersResponse, isMutationResponse, isObject, isOrgAdminStatus, isOrgContractGrants, isOrgPolicyMeta, isOrgPolicyView, isOrgUsageReport, isOrgWriters, isRoleAssignmentsResponse, isRoleGetResponse, isSecretListResponse, isSecretRecord, isSecretView, isUnsafeTrustServer, loadConfig, loadWasmComponent, manifestToTrustAnchor, maskKeyMaterial, mergeAgentAuthEntries, mergeDiscoverDids, metamask_get_address, metamask_sign, parseAgentAuthGet, parseAgentAuthPolicy, parseContractResponse, redactSecrets, redactSecretsFromJson, requestToWire, setEnvironment, setGlobalLogLevel, setNodeUrl, stringToBytes, tenantDidHex, toAgentAuthUpdateWire, toBaseUnits, validateConfig, validateTail, verifyDkgAttestation, verifyManifestSignature, verifyTdxQuote };
|
|
5134
|
-
export type { ActivityCallerType, ActivityEntry, ActivityOutcome, ActivityReport, AdmitForOrgOptions, AgentAuthEntry, AgentAuthMergeResult, AgentAuthPolicy, AgentAuthScriptGrant, AgentAuthUpdateInput, AgentCardRefInput, AgentCardResponse, AgentCardSetInput, AgentSummary, AssignRolesInput, AuthInput, BalanceRow, ChargeReason, ClientAuth, ClientHandshake, ConfigValidationResult, ContractDescriptorFacets, ContractExecuteInput, ContractKind, ContractLifecycleStatus, ContractListDetailedOptions, ContractListDetailedPage, ContractPublishInput, ContractRegisterResult, ContractResponseSchema, ContractSetDescriptorInput, CreatePolicyInput, DataGetInput, DataGetResponse, DataListInput, DataListResponse, DelegationGrantKind, DelegationGrantRef, DeleteDataInput, DeleteGrantsInput, DeleteScopeInput, DetailedContract, Did, Direction, DkgAttestation, DkgVerifyResult, EmailOtpAuthInput, EmailOtpCredentials, Environment, EthAuthInput, ExecuteBusinessContractOptions, ExecuteOrgDataActionOptions, FetchTrustedManifestOptions, GetActivityLogOptions, GetUsageOptions, GrantCheckParams, GrantCheckResult, GranteeInput, GrantsGetInput, GuestToHostHandler, GuestToHostHandlers, HandshakeResult, HumanMember, InvokeOptions, InvokeRequest, JsonRpcRequest, JsonRpcResponse, KycPollCadence, KycPollOptions, KycStatus, KycStatusKind, ListAgentsInput, ListAgentsResponse, ListContractsParams, ListContractsResult, ListContractsScope, ListHumanMembersInput, ListHumanMembersResponse, ListedContract, Logger, MapCreateInput, MapLifecycleStatus, MapResponse, MapUpdateInput, MapVisibility, MemberRole, MutationResponse, OidcAuthInput, OidcCredentials, OrgAdminStatus, OrgContractGrants, OrgDataActionWire, OrgDataClientOptions, OrgPolicyMeta, OrgPolicyView, OrgUsageReport, OrgUsageReportInput, OrgWriters, OtpChannel, OtpMergeSuggestion, OtpRequestInput, OtpRequestResult, OtpVerifyInput, OtpVerifyResult, PayrollRunRequest, PeerQuoteResult, PolicyGetInput, PurgeOrgInput, QuoteVerifyResult, ReaderSet, RemoveMemberGrantsInput, RoleAssignments, RoleAssignmentsResponse, RoleDefinition, RoleGetResponse, RoleGrant, RoleIdInput, SdkConfig, SecretKind, SecretListInput, SecretListResponse, SecretNameInput, SecretRecord, SecretSetValueInput, SecretView, SecretWriteInput, SessionCrypto, SessionId, SetGrantsInput, SetRoleInput, SetWritersInput, SignedTrustManifest, StringEncoding, SubmitUserInputArgs, SubmitUserInputResult, T3nClientConfig, TenantAdmitProjection, TenantAdmitStatus, TenantBaseClient, TenantClientConfig, TenantContractExecuteInput, TenantContractPublishInput, TenantContractSetDescriptorInput, TenantExecutionSession, TenantMapCreateInput, TenantMapUpdatePatch, TenantMeResponse, TenantSdkEnvironment, TenantSelfAdmitResult, TenantStatus, TenantTargetOptions, TokenTxKind, Transport, TrustAnchor, TrustAnchorOrUnsafe, TrustAnchorSource, TrustManifestPayload, UnassignRolesInput, UnsafeTrustServer, UpdateMetaInput, UsageEntry, UsagePage, UsageReportSignature, UserGrant, UserInputProfile, UserUpsertErrorKind, WasmComponent, WasmNextResult, WireBlock, WorkloadAuthInput, WriteDataInput, WriterSet, WritersGetInput };
|
|
5231
|
+
export { AGENT_CARDS_SCOPE, AuthMethod, AuthenticationError, BASE_UNITS_PER_TOKEN, ContractResponseError, DEFAULT_ENVIRONMENT, DEFAULT_INDIVIDUAL_THRESHOLD_CENTS, DEFAULT_KYC_POLL_CADENCE, HandshakeError, HttpTransport, InvokeError, KycStatusTimeoutError, LogLevel, MockTransport, NODE_URLS, OrgDataClient, OtpRateLimitedError, RpcError, SessionExpiredError, SessionOrgDataClient, SessionStateError, SessionStatus, SessionUsageReportClient, T3nClient, T3nConfigError, T3nError, TERMINAL_KYC_STATUSES, TOKEN_DECIMALS, TenantClient, TenantContractsNamespace, TenantMapsNamespace, TenantNamespace, TenantSdkValidationError, TenantTokenNamespace, UnsupportedTenantSdkOperationError, UserUpsertError, WasmError, WireEncodingError, Z_PAYROLL_AUDIT_READ_FUNCTIONS, Z_PAYROLL_RUN_FUNCTIONS, _b64uEncode, assertShape, b64uDecodeStrict, b64uEncodeBytes, buildSecretWriteArgs, bytesToString, canonicalTenantName, clearKeyCache, clearManifestVersionFloor, compactDidFromBytes, createDefaultHandlers, createEmailOtpAuthInput, createEthAuthInput, createLogger, createMlKemPublicKeyHandler, createOidcAuthInput, createOrgDataClientFromSession, createRandomHandler, createUsageReportClientFromSession, createWorkloadAuthInput, decodeWasmErrorMessage, deriveAgentCardEntryId, eth_get_address, extractWasmError, fetchDkgAttestation, fetchMlKemPublicKey, fetchTrustedManifest, formatTokens, generateRandomString, generateUUID, getEnvironment, getEnvironmentName, getGlobalLogLevel, getLogger, getNodeUrl, getScriptVersion, invoke, isAgentCardResponse, isAgentEgressGetResponse, isDataGetResponse, isDataListResponse, isListAgentsResponse, isListHumanMembersResponse, isMutationResponse, isObject, isOrgAdminStatus, isOrgContractGrants, isOrgPolicyMeta, isOrgPolicyView, isOrgUsageReport, isOrgWriters, isRoleAssignmentsResponse, isRoleGetResponse, isSecretListResponse, isSecretRecord, isSecretView, isUnsafeTrustServer, loadConfig, loadWasmComponent, manifestToTrustAnchor, maskKeyMaterial, mergeAgentAuthEntries, mergeDiscoverDids, metamask_get_address, metamask_sign, parseAgentAuthGet, parseAgentAuthPolicy, parseContractResponse, redactSecrets, redactSecretsFromJson, requestToWire, setEnvironment, setGlobalLogLevel, setNodeUrl, stringToBytes, tenantDidHex, toAgentAuthUpdateWire, toBaseUnits, validateConfig, validateTail, verifyDkgAttestation, verifyManifestSignature, verifyTdxQuote };
|
|
5232
|
+
export type { ActivityCallerType, ActivityEntry, ActivityOutcome, ActivityReport, AdmitForOrgOptions, AgentAuthEntry, AgentAuthMergeResult, AgentAuthPolicy, AgentAuthScriptGrant, AgentAuthUpdateInput, AgentCardRefInput, AgentCardResponse, AgentCardSetInput, AgentEgressEntry, AgentEgressGetResponse, AgentEgressRefInput, AgentSummary, AssignRolesInput, AuthInput, BalanceRow, ChargeReason, ClientAuth, ClientHandshake, ConfigValidationResult, ContractDescriptorFacets, ContractExecuteInput, ContractKind, ContractLifecycleStatus, ContractListDetailedOptions, ContractListDetailedPage, ContractPublishInput, ContractRegisterResult, ContractResponseSchema, ContractSetDescriptorInput, CreatePolicyInput, DataGetInput, DataGetResponse, DataListInput, DataListResponse, DelegationGrantKind, DelegationGrantRef, DeleteDataInput, DeleteGrantsInput, DeleteScopeInput, DetailedContract, Did, Direction, DkgAttestation, DkgVerifyResult, EmailOtpAuthInput, EmailOtpCredentials, Environment, EthAuthInput, ExecuteBusinessContractOptions, ExecuteOrgDataActionOptions, FetchTrustedManifestOptions, GetActivityLogOptions, GetUsageOptions, GrantCheckParams, GrantCheckResult, GranteeInput, GrantsGetInput, GuestToHostHandler, GuestToHostHandlers, HandshakeResult, HumanMember, InvokeOptions, InvokeRequest, JsonRpcRequest, JsonRpcResponse, KycPollCadence, KycPollOptions, KycStatus, KycStatusKind, ListAgentsInput, ListAgentsResponse, ListContractsParams, ListContractsResult, ListContractsScope, ListHumanMembersInput, ListHumanMembersResponse, ListedContract, Logger, MapCreateInput, MapLifecycleStatus, MapResponse, MapUpdateInput, MapVisibility, MemberRole, MutationResponse, OidcAuthInput, OidcCredentials, OrgAdminStatus, OrgContractGrants, OrgDataActionWire, OrgDataClientOptions, OrgPolicyMeta, OrgPolicyView, OrgUsageReport, OrgUsageReportInput, OrgWriters, OtpChannel, OtpMergeSuggestion, OtpRequestInput, OtpRequestResult, OtpVerifyInput, OtpVerifyResult, PayrollRunRequest, PeerQuoteResult, PolicyGetInput, PurgeOrgInput, QuoteVerifyResult, ReaderSet, RemoveMemberGrantsInput, RoleAssignments, RoleAssignmentsResponse, RoleDefinition, RoleGetResponse, RoleGrant, RoleIdInput, SdkConfig, SecretKind, SecretListInput, SecretListResponse, SecretNameInput, SecretRecord, SecretSetValueInput, SecretView, SecretWriteInput, SessionCrypto, SessionId, SetAgentEgressInput, SetGrantsInput, SetRoleInput, SetWritersInput, SignedTrustManifest, StringEncoding, SubmitUserInputArgs, SubmitUserInputResult, T3nClientConfig, TenantAdmitProjection, TenantAdmitStatus, TenantBaseClient, TenantClientConfig, TenantContractExecuteInput, TenantContractPublishInput, TenantContractSetDescriptorInput, TenantExecutionSession, TenantMapCreateInput, TenantMapUpdatePatch, TenantMeResponse, TenantSdkEnvironment, TenantSelfAdmitResult, TenantStatus, TenantTargetOptions, TokenTxKind, Transport, TrustAnchor, TrustAnchorOrUnsafe, TrustAnchorSource, TrustManifestPayload, UnassignRolesInput, UnsafeTrustServer, UpdateMetaInput, UsageEntry, UsagePage, UsageReportSignature, UserGrant, UserInputProfile, UserUpsertErrorKind, WasmComponent, WasmNextResult, WireBlock, WorkloadAuthInput, WriteDataInput, WriterSet, WritersGetInput };
|