@flashbacktech/tsclient 0.4.67 → 0.4.69

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/index.d.cts CHANGED
@@ -806,12 +806,41 @@ interface CreateGatewayTokenResponse {
806
806
  token: GatewayToken;
807
807
  secret: string;
808
808
  }
809
+ interface AgentToken {
810
+ id: string;
811
+ sandboxId: string;
812
+ label: string;
813
+ tokenPrefix: string;
814
+ lastUsedAt?: string;
815
+ createdAt: string;
816
+ }
817
+ interface CreateAgentTokenRequest {
818
+ label: string;
819
+ }
820
+ interface CreateAgentTokenResponse {
821
+ token: AgentToken;
822
+ secret: string;
823
+ }
809
824
  interface SimpleKeysResponse {
810
825
  success: boolean;
811
826
  message?: string;
812
827
  data?: unknown;
813
828
  }
814
829
 
830
+ declare class AgentTokensClient {
831
+ private readonly http;
832
+ constructor(http: BaseClient);
833
+ list(sandboxId: string): Promise<AgentToken[]>;
834
+ /**
835
+ * create returns both the persisted token row and the plaintext bearer
836
+ * (`secret`). The bearer is shown only here; surface it to the user
837
+ * immediately. If they navigate away without copying, they must delete the
838
+ * token and create a new one.
839
+ */
840
+ create(sandboxId: string, body: CreateAgentTokenRequest): Promise<CreateAgentTokenResponse>;
841
+ delete(sandboxId: string, tokenId: string): Promise<SimpleKeysResponse>;
842
+ }
843
+
815
844
  declare class GatewayTokensClient {
816
845
  private readonly http;
817
846
  constructor(http: BaseClient);
@@ -889,6 +918,8 @@ declare class CredentialsClient {
889
918
  private readonly http;
890
919
  readonly sandbox: SandboxCredentialScope;
891
920
  readonly gatewayTokens: GatewayTokensClient;
921
+ /** Sandbox agent access tokens — bearers external agents use against /mcp. */
922
+ readonly agentTokens: AgentTokensClient;
892
923
  constructor(http: BaseClient);
893
924
  list(query: ListCredentialsQuery): Promise<Credential[]>;
894
925
  create(body: CreateCredentialRequest): Promise<Credential>;
@@ -940,7 +971,7 @@ interface ChatScope {
940
971
  /** @deprecated Use `projectId`. Carried only to ease the cutover. */
941
972
  workspaceId?: string;
942
973
  }
943
- type ChatSessionSource = 'adhoc' | 'template';
974
+ type ChatSessionSource = 'adhoc' | 'template' | 'mcp';
944
975
  type ChatMessageRole = 'user' | 'assistant' | 'system';
945
976
  /**
946
977
  * Status of a single chat turn (agent_chat_turns.status). The first four are
@@ -2837,4 +2868,4 @@ declare class NotImplementedError extends Error {
2837
2868
  constructor(method: string);
2838
2869
  }
2839
2870
 
2840
- export { type AcceptInviteRequest, AccessType, type AcquireScanLeaseRequest, type AcquireScanLeaseResponse, type ActionCategory, type ActivateRequest, type AddMemberRequest, type AddUserToOrgRequest, type AddUserToOrgResult, type AdjustOrgCreditsRequest, type AdjustOrgCreditsResult, type AdminOrgSummaryQuery, type AdminOrgSummaryResponse, type AdminOrgSummaryRow, type AdminOrgSummarySort, type AnswerChatQuestionRequest, type AnswerChatQuestionResponse, type AppendProgramConfigRequest, type AssociatedOrg, type AuthUser, type AvailableModels, BaseClient, type BaseClientOptions, type BillingProgramConfig, type BudgetScope, BudgetsClient, type BuyCreditPackRequest, type BuyCreditPackResponse, type BuyCustomCreditRequest, type BuyCustomCreditResponse, type BuySubscriptionRequest, type BuySubscriptionResponse, CAP_AI, CAP_COMPUTE, CAP_GENERAL, CAP_NOTIFY, CAP_STORAGE, CAP_VCS, type CancelChatTurnResponse, type CancelSubscriptionResponse, type ChatAssistantMessagePayload, type ChatBillingRefuseCode, type ChatBillingRefuseError, type ChatBudget, type ChatCheckpointedPayload, type ChatCompactionFiredPayload, type ChatDonePayload, type ChatEvent, type ChatEventType, type ChatFeedback, type ChatFeedbackEnvelope, type ChatMessage, type ChatMessageKind, type ChatMessageRole, type ChatNarrationPayload, type ChatPhase, type ChatPhasePayload, type ChatPlanDraftPayload, type ChatQuestionPayload, type ChatSchedule, type ChatScheduleEnvelope, type ChatScheduleNotifyOn, type ChatScheduleRunStatus, type ChatScope, type ChatSession, type ChatSessionSource, type ChatSessionTitlePayload, type ChatStepEventPayload, type ChatStepProgressPayload, type ChatStreamHandle, type ChatToolCallConfirmationRequiredPayload, type ChatToolCallFinishedPayload, type ChatToolCallStartedPayload, type ChatTurnStatus, type ClarificationOption, CloudAgentClient, type CloudAgentClientOptions, type CloudResource, type CloudResourceContainerRef, type CloudResourceEdge, type CloudScanHistory, type CloudScanLease, type ConfirmChatToolCallRequest, type ConfirmChatToolCallResponse, type CreateAgentTemplateRequest, type CreateChatScheduleRequest, type CreateChatSessionRequest, type CreateChatSessionResponse, type CreateCredentialRequest, type CreateGatewayTokenRequest, type CreateGatewayTokenResponse, type CreateOrganizationRequest, type CreateOrganizationUserRequest, type CreateProjectRequest, type CreateSandboxRequest, type CreateScheduledTaskRequest, type Credential, type CreditBalance, type CreditPack, type CreditTransaction, type CreditTransactionKind, type CreditTransactionType, type CustomCreditPurchaseConfig, type DebugPayload, type DebugReceipt, type EffectiveChatBudget, type ExchangeCodeRequest, type FieldSpec, type FieldType, type FineTuneParams, type GatewayToken, type GeneratePayoutsRequest, type GetChatSessionResponse, type GetUsageSummaryQuery, type GetUsageSummaryResponse, HttpError, type ImpersonationProvider, type InviteOrgRequest, type InviteOrgResult, type ListAgentTemplatesQuery, type ListAgentTemplatesResponse, type ListChatFeedbackResponse, type ListChatScheduleRunsResponse, type ListChatSchedulesResponse, type ListChatSessionsQuery, type ListChatSessionsResponse, type ListCredentialsQuery, type ListCreditsTransactionsQuery, type ListCreditsTransactionsResponse, type ListPaymentsResponse, type ListSandboxesQuery, type ListScanHistoryQuery, type ListScanHistoryResponse, type ListScheduledTasksQuery, type ListScheduledTasksResponse, type LoginRequest, type MFASetupResponse, type MFASimpleResponse, type MFAStatus, MFAType, type MFAVerifyLoginRequest, type MFAVerifyLoginResponse, type MFAVerifySetupRequest, type MagicLinkActivateRequest, type MagicLinkSendResponse, type MintReferralCodeRequest, type ModeType, type ModelPricingRow, type ModelSelection, type MonthlyCreditStats, NotImplementedError, type NotifyChannelOption, type NotifyEventType, type NotifySubscription, type OpenChatStreamOptions, type OrgBudget, type OrgCreditBalance, type OrgInvite, type OrgNotifySubscriptions, type OrgRef, OrgRoles, type OrgSearchResult, type OrgSubscription, type Organization, type OrganizationUser, PROVIDER_CATALOG, type PatchModelSelectionRequest, type Payment, type PeekScanLeaseResponse, PlatformAdminClient, type PlatformSettings, type PostChatMessageRequest, type PostChatMessageResponse, type PreviewChangeRequest, type PreviewChangeResponse, type Project, type ProjectMember, type ProviderID, type ProviderSpec, ProviderType, type PublicConfig, type Query, type ReconcileScope, type ReconcileTuple, type RedeemReferralCodeRequest, type ReferralAdminOverview, type ReferralAdminStats, type ReferralCode, type ReferralRedemption, type ReferralRedemptionAdmin, type ReferralStats, ReferralsClient, type RefreshRequest, type RegisterRequest, type RequestOptions, ResellerClient, type ResellerCommission, type ResellerPayout, type ResellerPerformance, type ResetPasswordRequest, type ResourceTreeCategory, type ResourceTreeCredential, type ResourceTreeGrouping, type ResourceTreeResource, type ResourceTreeResponse, ResourcesClient, type Sandbox, type SandboxCredential, type ScanInProgressError, type ScheduledChange, type ScheduledTask, type ScopedBudget, type SessionResponse, type SessionTokens, type SetOrgNotifySubscriptionsRequest, type SetResellerRequest, type SimpleAgentResponse, type SimpleKeysResponse, type SimpleOrgResponse, type SimpleResponse$2 as SimpleResponse, type StorageType, type SubgraphDirection, type SubgraphRequest, type SubgraphResponse, type SubmitChatFeedbackRequest, type Subscription, type SubscriptionCapability, type SubscriptionPeriod, type SystemEvent, type SystemEventQuery, type SystemEventQueryResponse, type SystemEventReadResponse, type Template, type TokenProvider, type UnauthorizedHandler, type UpdateChatBudgetRequest, type UpdateChatScheduleRequest, type UpdateCostLimitRequest, type UpdateCredentialRequest, type UpdateMemberRoleRequest, type UpdateOrgBudgetRequest, type UpdateOrgUserRequest, type UpdateOrganizationRequest, type UpdatePayoutRequest, type UpdatePlatformSettingsRequest, type UpdateProjectRequest, type UpdateSandboxRequest, type UpdateScopedBudgetRequest, type UpdateUserRequest, type UpdateUserResponse, type UsageBucket, type UsageByModelQuery, type UsageByModelResponse, type UsageByModelRow, type UsageCostSplit, type UsageReportQuery, type UsageReportResponse, type UsageSummary, type UsageSummaryQuery, type UsageSummaryResponse, type UsageTotals, type UsageWindow, type UserProfile, type UserSummary, computeDisplayHint, getProvider, getValueAt, isMetadataPath, isSecretPath, listProviders, metadataKey, setValueAt, usdMicros, validate };
2871
+ export { type AcceptInviteRequest, AccessType, type AcquireScanLeaseRequest, type AcquireScanLeaseResponse, type ActionCategory, type ActivateRequest, type AddMemberRequest, type AddUserToOrgRequest, type AddUserToOrgResult, type AdjustOrgCreditsRequest, type AdjustOrgCreditsResult, type AdminOrgSummaryQuery, type AdminOrgSummaryResponse, type AdminOrgSummaryRow, type AdminOrgSummarySort, type AgentToken, type AnswerChatQuestionRequest, type AnswerChatQuestionResponse, type AppendProgramConfigRequest, type AssociatedOrg, type AuthUser, type AvailableModels, BaseClient, type BaseClientOptions, type BillingProgramConfig, type BudgetScope, BudgetsClient, type BuyCreditPackRequest, type BuyCreditPackResponse, type BuyCustomCreditRequest, type BuyCustomCreditResponse, type BuySubscriptionRequest, type BuySubscriptionResponse, CAP_AI, CAP_COMPUTE, CAP_GENERAL, CAP_NOTIFY, CAP_STORAGE, CAP_VCS, type CancelChatTurnResponse, type CancelSubscriptionResponse, type ChatAssistantMessagePayload, type ChatBillingRefuseCode, type ChatBillingRefuseError, type ChatBudget, type ChatCheckpointedPayload, type ChatCompactionFiredPayload, type ChatDonePayload, type ChatEvent, type ChatEventType, type ChatFeedback, type ChatFeedbackEnvelope, type ChatMessage, type ChatMessageKind, type ChatMessageRole, type ChatNarrationPayload, type ChatPhase, type ChatPhasePayload, type ChatPlanDraftPayload, type ChatQuestionPayload, type ChatSchedule, type ChatScheduleEnvelope, type ChatScheduleNotifyOn, type ChatScheduleRunStatus, type ChatScope, type ChatSession, type ChatSessionSource, type ChatSessionTitlePayload, type ChatStepEventPayload, type ChatStepProgressPayload, type ChatStreamHandle, type ChatToolCallConfirmationRequiredPayload, type ChatToolCallFinishedPayload, type ChatToolCallStartedPayload, type ChatTurnStatus, type ClarificationOption, CloudAgentClient, type CloudAgentClientOptions, type CloudResource, type CloudResourceContainerRef, type CloudResourceEdge, type CloudScanHistory, type CloudScanLease, type ConfirmChatToolCallRequest, type ConfirmChatToolCallResponse, type CreateAgentTemplateRequest, type CreateAgentTokenRequest, type CreateAgentTokenResponse, type CreateChatScheduleRequest, type CreateChatSessionRequest, type CreateChatSessionResponse, type CreateCredentialRequest, type CreateGatewayTokenRequest, type CreateGatewayTokenResponse, type CreateOrganizationRequest, type CreateOrganizationUserRequest, type CreateProjectRequest, type CreateSandboxRequest, type CreateScheduledTaskRequest, type Credential, type CreditBalance, type CreditPack, type CreditTransaction, type CreditTransactionKind, type CreditTransactionType, type CustomCreditPurchaseConfig, type DebugPayload, type DebugReceipt, type EffectiveChatBudget, type ExchangeCodeRequest, type FieldSpec, type FieldType, type FineTuneParams, type GatewayToken, type GeneratePayoutsRequest, type GetChatSessionResponse, type GetUsageSummaryQuery, type GetUsageSummaryResponse, HttpError, type ImpersonationProvider, type InviteOrgRequest, type InviteOrgResult, type ListAgentTemplatesQuery, type ListAgentTemplatesResponse, type ListChatFeedbackResponse, type ListChatScheduleRunsResponse, type ListChatSchedulesResponse, type ListChatSessionsQuery, type ListChatSessionsResponse, type ListCredentialsQuery, type ListCreditsTransactionsQuery, type ListCreditsTransactionsResponse, type ListPaymentsResponse, type ListSandboxesQuery, type ListScanHistoryQuery, type ListScanHistoryResponse, type ListScheduledTasksQuery, type ListScheduledTasksResponse, type LoginRequest, type MFASetupResponse, type MFASimpleResponse, type MFAStatus, MFAType, type MFAVerifyLoginRequest, type MFAVerifyLoginResponse, type MFAVerifySetupRequest, type MagicLinkActivateRequest, type MagicLinkSendResponse, type MintReferralCodeRequest, type ModeType, type ModelPricingRow, type ModelSelection, type MonthlyCreditStats, NotImplementedError, type NotifyChannelOption, type NotifyEventType, type NotifySubscription, type OpenChatStreamOptions, type OrgBudget, type OrgCreditBalance, type OrgInvite, type OrgNotifySubscriptions, type OrgRef, OrgRoles, type OrgSearchResult, type OrgSubscription, type Organization, type OrganizationUser, PROVIDER_CATALOG, type PatchModelSelectionRequest, type Payment, type PeekScanLeaseResponse, PlatformAdminClient, type PlatformSettings, type PostChatMessageRequest, type PostChatMessageResponse, type PreviewChangeRequest, type PreviewChangeResponse, type Project, type ProjectMember, type ProviderID, type ProviderSpec, ProviderType, type PublicConfig, type Query, type ReconcileScope, type ReconcileTuple, type RedeemReferralCodeRequest, type ReferralAdminOverview, type ReferralAdminStats, type ReferralCode, type ReferralRedemption, type ReferralRedemptionAdmin, type ReferralStats, ReferralsClient, type RefreshRequest, type RegisterRequest, type RequestOptions, ResellerClient, type ResellerCommission, type ResellerPayout, type ResellerPerformance, type ResetPasswordRequest, type ResourceTreeCategory, type ResourceTreeCredential, type ResourceTreeGrouping, type ResourceTreeResource, type ResourceTreeResponse, ResourcesClient, type Sandbox, type SandboxCredential, type ScanInProgressError, type ScheduledChange, type ScheduledTask, type ScopedBudget, type SessionResponse, type SessionTokens, type SetOrgNotifySubscriptionsRequest, type SetResellerRequest, type SimpleAgentResponse, type SimpleKeysResponse, type SimpleOrgResponse, type SimpleResponse$2 as SimpleResponse, type StorageType, type SubgraphDirection, type SubgraphRequest, type SubgraphResponse, type SubmitChatFeedbackRequest, type Subscription, type SubscriptionCapability, type SubscriptionPeriod, type SystemEvent, type SystemEventQuery, type SystemEventQueryResponse, type SystemEventReadResponse, type Template, type TokenProvider, type UnauthorizedHandler, type UpdateChatBudgetRequest, type UpdateChatScheduleRequest, type UpdateCostLimitRequest, type UpdateCredentialRequest, type UpdateMemberRoleRequest, type UpdateOrgBudgetRequest, type UpdateOrgUserRequest, type UpdateOrganizationRequest, type UpdatePayoutRequest, type UpdatePlatformSettingsRequest, type UpdateProjectRequest, type UpdateSandboxRequest, type UpdateScopedBudgetRequest, type UpdateUserRequest, type UpdateUserResponse, type UsageBucket, type UsageByModelQuery, type UsageByModelResponse, type UsageByModelRow, type UsageCostSplit, type UsageReportQuery, type UsageReportResponse, type UsageSummary, type UsageSummaryQuery, type UsageSummaryResponse, type UsageTotals, type UsageWindow, type UserProfile, type UserSummary, computeDisplayHint, getProvider, getValueAt, isMetadataPath, isSecretPath, listProviders, metadataKey, setValueAt, usdMicros, validate };
package/dist/index.d.ts CHANGED
@@ -806,12 +806,41 @@ interface CreateGatewayTokenResponse {
806
806
  token: GatewayToken;
807
807
  secret: string;
808
808
  }
809
+ interface AgentToken {
810
+ id: string;
811
+ sandboxId: string;
812
+ label: string;
813
+ tokenPrefix: string;
814
+ lastUsedAt?: string;
815
+ createdAt: string;
816
+ }
817
+ interface CreateAgentTokenRequest {
818
+ label: string;
819
+ }
820
+ interface CreateAgentTokenResponse {
821
+ token: AgentToken;
822
+ secret: string;
823
+ }
809
824
  interface SimpleKeysResponse {
810
825
  success: boolean;
811
826
  message?: string;
812
827
  data?: unknown;
813
828
  }
814
829
 
830
+ declare class AgentTokensClient {
831
+ private readonly http;
832
+ constructor(http: BaseClient);
833
+ list(sandboxId: string): Promise<AgentToken[]>;
834
+ /**
835
+ * create returns both the persisted token row and the plaintext bearer
836
+ * (`secret`). The bearer is shown only here; surface it to the user
837
+ * immediately. If they navigate away without copying, they must delete the
838
+ * token and create a new one.
839
+ */
840
+ create(sandboxId: string, body: CreateAgentTokenRequest): Promise<CreateAgentTokenResponse>;
841
+ delete(sandboxId: string, tokenId: string): Promise<SimpleKeysResponse>;
842
+ }
843
+
815
844
  declare class GatewayTokensClient {
816
845
  private readonly http;
817
846
  constructor(http: BaseClient);
@@ -889,6 +918,8 @@ declare class CredentialsClient {
889
918
  private readonly http;
890
919
  readonly sandbox: SandboxCredentialScope;
891
920
  readonly gatewayTokens: GatewayTokensClient;
921
+ /** Sandbox agent access tokens — bearers external agents use against /mcp. */
922
+ readonly agentTokens: AgentTokensClient;
892
923
  constructor(http: BaseClient);
893
924
  list(query: ListCredentialsQuery): Promise<Credential[]>;
894
925
  create(body: CreateCredentialRequest): Promise<Credential>;
@@ -940,7 +971,7 @@ interface ChatScope {
940
971
  /** @deprecated Use `projectId`. Carried only to ease the cutover. */
941
972
  workspaceId?: string;
942
973
  }
943
- type ChatSessionSource = 'adhoc' | 'template';
974
+ type ChatSessionSource = 'adhoc' | 'template' | 'mcp';
944
975
  type ChatMessageRole = 'user' | 'assistant' | 'system';
945
976
  /**
946
977
  * Status of a single chat turn (agent_chat_turns.status). The first four are
@@ -2837,4 +2868,4 @@ declare class NotImplementedError extends Error {
2837
2868
  constructor(method: string);
2838
2869
  }
2839
2870
 
2840
- export { type AcceptInviteRequest, AccessType, type AcquireScanLeaseRequest, type AcquireScanLeaseResponse, type ActionCategory, type ActivateRequest, type AddMemberRequest, type AddUserToOrgRequest, type AddUserToOrgResult, type AdjustOrgCreditsRequest, type AdjustOrgCreditsResult, type AdminOrgSummaryQuery, type AdminOrgSummaryResponse, type AdminOrgSummaryRow, type AdminOrgSummarySort, type AnswerChatQuestionRequest, type AnswerChatQuestionResponse, type AppendProgramConfigRequest, type AssociatedOrg, type AuthUser, type AvailableModels, BaseClient, type BaseClientOptions, type BillingProgramConfig, type BudgetScope, BudgetsClient, type BuyCreditPackRequest, type BuyCreditPackResponse, type BuyCustomCreditRequest, type BuyCustomCreditResponse, type BuySubscriptionRequest, type BuySubscriptionResponse, CAP_AI, CAP_COMPUTE, CAP_GENERAL, CAP_NOTIFY, CAP_STORAGE, CAP_VCS, type CancelChatTurnResponse, type CancelSubscriptionResponse, type ChatAssistantMessagePayload, type ChatBillingRefuseCode, type ChatBillingRefuseError, type ChatBudget, type ChatCheckpointedPayload, type ChatCompactionFiredPayload, type ChatDonePayload, type ChatEvent, type ChatEventType, type ChatFeedback, type ChatFeedbackEnvelope, type ChatMessage, type ChatMessageKind, type ChatMessageRole, type ChatNarrationPayload, type ChatPhase, type ChatPhasePayload, type ChatPlanDraftPayload, type ChatQuestionPayload, type ChatSchedule, type ChatScheduleEnvelope, type ChatScheduleNotifyOn, type ChatScheduleRunStatus, type ChatScope, type ChatSession, type ChatSessionSource, type ChatSessionTitlePayload, type ChatStepEventPayload, type ChatStepProgressPayload, type ChatStreamHandle, type ChatToolCallConfirmationRequiredPayload, type ChatToolCallFinishedPayload, type ChatToolCallStartedPayload, type ChatTurnStatus, type ClarificationOption, CloudAgentClient, type CloudAgentClientOptions, type CloudResource, type CloudResourceContainerRef, type CloudResourceEdge, type CloudScanHistory, type CloudScanLease, type ConfirmChatToolCallRequest, type ConfirmChatToolCallResponse, type CreateAgentTemplateRequest, type CreateChatScheduleRequest, type CreateChatSessionRequest, type CreateChatSessionResponse, type CreateCredentialRequest, type CreateGatewayTokenRequest, type CreateGatewayTokenResponse, type CreateOrganizationRequest, type CreateOrganizationUserRequest, type CreateProjectRequest, type CreateSandboxRequest, type CreateScheduledTaskRequest, type Credential, type CreditBalance, type CreditPack, type CreditTransaction, type CreditTransactionKind, type CreditTransactionType, type CustomCreditPurchaseConfig, type DebugPayload, type DebugReceipt, type EffectiveChatBudget, type ExchangeCodeRequest, type FieldSpec, type FieldType, type FineTuneParams, type GatewayToken, type GeneratePayoutsRequest, type GetChatSessionResponse, type GetUsageSummaryQuery, type GetUsageSummaryResponse, HttpError, type ImpersonationProvider, type InviteOrgRequest, type InviteOrgResult, type ListAgentTemplatesQuery, type ListAgentTemplatesResponse, type ListChatFeedbackResponse, type ListChatScheduleRunsResponse, type ListChatSchedulesResponse, type ListChatSessionsQuery, type ListChatSessionsResponse, type ListCredentialsQuery, type ListCreditsTransactionsQuery, type ListCreditsTransactionsResponse, type ListPaymentsResponse, type ListSandboxesQuery, type ListScanHistoryQuery, type ListScanHistoryResponse, type ListScheduledTasksQuery, type ListScheduledTasksResponse, type LoginRequest, type MFASetupResponse, type MFASimpleResponse, type MFAStatus, MFAType, type MFAVerifyLoginRequest, type MFAVerifyLoginResponse, type MFAVerifySetupRequest, type MagicLinkActivateRequest, type MagicLinkSendResponse, type MintReferralCodeRequest, type ModeType, type ModelPricingRow, type ModelSelection, type MonthlyCreditStats, NotImplementedError, type NotifyChannelOption, type NotifyEventType, type NotifySubscription, type OpenChatStreamOptions, type OrgBudget, type OrgCreditBalance, type OrgInvite, type OrgNotifySubscriptions, type OrgRef, OrgRoles, type OrgSearchResult, type OrgSubscription, type Organization, type OrganizationUser, PROVIDER_CATALOG, type PatchModelSelectionRequest, type Payment, type PeekScanLeaseResponse, PlatformAdminClient, type PlatformSettings, type PostChatMessageRequest, type PostChatMessageResponse, type PreviewChangeRequest, type PreviewChangeResponse, type Project, type ProjectMember, type ProviderID, type ProviderSpec, ProviderType, type PublicConfig, type Query, type ReconcileScope, type ReconcileTuple, type RedeemReferralCodeRequest, type ReferralAdminOverview, type ReferralAdminStats, type ReferralCode, type ReferralRedemption, type ReferralRedemptionAdmin, type ReferralStats, ReferralsClient, type RefreshRequest, type RegisterRequest, type RequestOptions, ResellerClient, type ResellerCommission, type ResellerPayout, type ResellerPerformance, type ResetPasswordRequest, type ResourceTreeCategory, type ResourceTreeCredential, type ResourceTreeGrouping, type ResourceTreeResource, type ResourceTreeResponse, ResourcesClient, type Sandbox, type SandboxCredential, type ScanInProgressError, type ScheduledChange, type ScheduledTask, type ScopedBudget, type SessionResponse, type SessionTokens, type SetOrgNotifySubscriptionsRequest, type SetResellerRequest, type SimpleAgentResponse, type SimpleKeysResponse, type SimpleOrgResponse, type SimpleResponse$2 as SimpleResponse, type StorageType, type SubgraphDirection, type SubgraphRequest, type SubgraphResponse, type SubmitChatFeedbackRequest, type Subscription, type SubscriptionCapability, type SubscriptionPeriod, type SystemEvent, type SystemEventQuery, type SystemEventQueryResponse, type SystemEventReadResponse, type Template, type TokenProvider, type UnauthorizedHandler, type UpdateChatBudgetRequest, type UpdateChatScheduleRequest, type UpdateCostLimitRequest, type UpdateCredentialRequest, type UpdateMemberRoleRequest, type UpdateOrgBudgetRequest, type UpdateOrgUserRequest, type UpdateOrganizationRequest, type UpdatePayoutRequest, type UpdatePlatformSettingsRequest, type UpdateProjectRequest, type UpdateSandboxRequest, type UpdateScopedBudgetRequest, type UpdateUserRequest, type UpdateUserResponse, type UsageBucket, type UsageByModelQuery, type UsageByModelResponse, type UsageByModelRow, type UsageCostSplit, type UsageReportQuery, type UsageReportResponse, type UsageSummary, type UsageSummaryQuery, type UsageSummaryResponse, type UsageTotals, type UsageWindow, type UserProfile, type UserSummary, computeDisplayHint, getProvider, getValueAt, isMetadataPath, isSecretPath, listProviders, metadataKey, setValueAt, usdMicros, validate };
2871
+ export { type AcceptInviteRequest, AccessType, type AcquireScanLeaseRequest, type AcquireScanLeaseResponse, type ActionCategory, type ActivateRequest, type AddMemberRequest, type AddUserToOrgRequest, type AddUserToOrgResult, type AdjustOrgCreditsRequest, type AdjustOrgCreditsResult, type AdminOrgSummaryQuery, type AdminOrgSummaryResponse, type AdminOrgSummaryRow, type AdminOrgSummarySort, type AgentToken, type AnswerChatQuestionRequest, type AnswerChatQuestionResponse, type AppendProgramConfigRequest, type AssociatedOrg, type AuthUser, type AvailableModels, BaseClient, type BaseClientOptions, type BillingProgramConfig, type BudgetScope, BudgetsClient, type BuyCreditPackRequest, type BuyCreditPackResponse, type BuyCustomCreditRequest, type BuyCustomCreditResponse, type BuySubscriptionRequest, type BuySubscriptionResponse, CAP_AI, CAP_COMPUTE, CAP_GENERAL, CAP_NOTIFY, CAP_STORAGE, CAP_VCS, type CancelChatTurnResponse, type CancelSubscriptionResponse, type ChatAssistantMessagePayload, type ChatBillingRefuseCode, type ChatBillingRefuseError, type ChatBudget, type ChatCheckpointedPayload, type ChatCompactionFiredPayload, type ChatDonePayload, type ChatEvent, type ChatEventType, type ChatFeedback, type ChatFeedbackEnvelope, type ChatMessage, type ChatMessageKind, type ChatMessageRole, type ChatNarrationPayload, type ChatPhase, type ChatPhasePayload, type ChatPlanDraftPayload, type ChatQuestionPayload, type ChatSchedule, type ChatScheduleEnvelope, type ChatScheduleNotifyOn, type ChatScheduleRunStatus, type ChatScope, type ChatSession, type ChatSessionSource, type ChatSessionTitlePayload, type ChatStepEventPayload, type ChatStepProgressPayload, type ChatStreamHandle, type ChatToolCallConfirmationRequiredPayload, type ChatToolCallFinishedPayload, type ChatToolCallStartedPayload, type ChatTurnStatus, type ClarificationOption, CloudAgentClient, type CloudAgentClientOptions, type CloudResource, type CloudResourceContainerRef, type CloudResourceEdge, type CloudScanHistory, type CloudScanLease, type ConfirmChatToolCallRequest, type ConfirmChatToolCallResponse, type CreateAgentTemplateRequest, type CreateAgentTokenRequest, type CreateAgentTokenResponse, type CreateChatScheduleRequest, type CreateChatSessionRequest, type CreateChatSessionResponse, type CreateCredentialRequest, type CreateGatewayTokenRequest, type CreateGatewayTokenResponse, type CreateOrganizationRequest, type CreateOrganizationUserRequest, type CreateProjectRequest, type CreateSandboxRequest, type CreateScheduledTaskRequest, type Credential, type CreditBalance, type CreditPack, type CreditTransaction, type CreditTransactionKind, type CreditTransactionType, type CustomCreditPurchaseConfig, type DebugPayload, type DebugReceipt, type EffectiveChatBudget, type ExchangeCodeRequest, type FieldSpec, type FieldType, type FineTuneParams, type GatewayToken, type GeneratePayoutsRequest, type GetChatSessionResponse, type GetUsageSummaryQuery, type GetUsageSummaryResponse, HttpError, type ImpersonationProvider, type InviteOrgRequest, type InviteOrgResult, type ListAgentTemplatesQuery, type ListAgentTemplatesResponse, type ListChatFeedbackResponse, type ListChatScheduleRunsResponse, type ListChatSchedulesResponse, type ListChatSessionsQuery, type ListChatSessionsResponse, type ListCredentialsQuery, type ListCreditsTransactionsQuery, type ListCreditsTransactionsResponse, type ListPaymentsResponse, type ListSandboxesQuery, type ListScanHistoryQuery, type ListScanHistoryResponse, type ListScheduledTasksQuery, type ListScheduledTasksResponse, type LoginRequest, type MFASetupResponse, type MFASimpleResponse, type MFAStatus, MFAType, type MFAVerifyLoginRequest, type MFAVerifyLoginResponse, type MFAVerifySetupRequest, type MagicLinkActivateRequest, type MagicLinkSendResponse, type MintReferralCodeRequest, type ModeType, type ModelPricingRow, type ModelSelection, type MonthlyCreditStats, NotImplementedError, type NotifyChannelOption, type NotifyEventType, type NotifySubscription, type OpenChatStreamOptions, type OrgBudget, type OrgCreditBalance, type OrgInvite, type OrgNotifySubscriptions, type OrgRef, OrgRoles, type OrgSearchResult, type OrgSubscription, type Organization, type OrganizationUser, PROVIDER_CATALOG, type PatchModelSelectionRequest, type Payment, type PeekScanLeaseResponse, PlatformAdminClient, type PlatformSettings, type PostChatMessageRequest, type PostChatMessageResponse, type PreviewChangeRequest, type PreviewChangeResponse, type Project, type ProjectMember, type ProviderID, type ProviderSpec, ProviderType, type PublicConfig, type Query, type ReconcileScope, type ReconcileTuple, type RedeemReferralCodeRequest, type ReferralAdminOverview, type ReferralAdminStats, type ReferralCode, type ReferralRedemption, type ReferralRedemptionAdmin, type ReferralStats, ReferralsClient, type RefreshRequest, type RegisterRequest, type RequestOptions, ResellerClient, type ResellerCommission, type ResellerPayout, type ResellerPerformance, type ResetPasswordRequest, type ResourceTreeCategory, type ResourceTreeCredential, type ResourceTreeGrouping, type ResourceTreeResource, type ResourceTreeResponse, ResourcesClient, type Sandbox, type SandboxCredential, type ScanInProgressError, type ScheduledChange, type ScheduledTask, type ScopedBudget, type SessionResponse, type SessionTokens, type SetOrgNotifySubscriptionsRequest, type SetResellerRequest, type SimpleAgentResponse, type SimpleKeysResponse, type SimpleOrgResponse, type SimpleResponse$2 as SimpleResponse, type StorageType, type SubgraphDirection, type SubgraphRequest, type SubgraphResponse, type SubmitChatFeedbackRequest, type Subscription, type SubscriptionCapability, type SubscriptionPeriod, type SystemEvent, type SystemEventQuery, type SystemEventQueryResponse, type SystemEventReadResponse, type Template, type TokenProvider, type UnauthorizedHandler, type UpdateChatBudgetRequest, type UpdateChatScheduleRequest, type UpdateCostLimitRequest, type UpdateCredentialRequest, type UpdateMemberRoleRequest, type UpdateOrgBudgetRequest, type UpdateOrgUserRequest, type UpdateOrganizationRequest, type UpdatePayoutRequest, type UpdatePlatformSettingsRequest, type UpdateProjectRequest, type UpdateSandboxRequest, type UpdateScopedBudgetRequest, type UpdateUserRequest, type UpdateUserResponse, type UsageBucket, type UsageByModelQuery, type UsageByModelResponse, type UsageByModelRow, type UsageCostSplit, type UsageReportQuery, type UsageReportResponse, type UsageSummary, type UsageSummaryQuery, type UsageSummaryResponse, type UsageTotals, type UsageWindow, type UserProfile, type UserSummary, computeDisplayHint, getProvider, getValueAt, isMetadataPath, isSecretPath, listProviders, metadataKey, setValueAt, usdMicros, validate };
package/dist/index.js CHANGED
@@ -562,6 +562,49 @@ function normalizeGatewayToken(wire) {
562
562
  createdAt: wire.createdAt
563
563
  };
564
564
  }
565
+ function normalizeAgentToken(wire) {
566
+ return {
567
+ id: wire.id,
568
+ sandboxId: wire.sandboxId ?? wire.repoId ?? "",
569
+ label: wire.label,
570
+ tokenPrefix: wire.tokenPrefix,
571
+ lastUsedAt: wire.lastUsedAt ?? void 0,
572
+ createdAt: wire.createdAt
573
+ };
574
+ }
575
+
576
+ // src/modules/credentials/AgentTokensClient.ts
577
+ var AgentTokensClient = class {
578
+ constructor(http) {
579
+ this.http = http;
580
+ }
581
+ async list(sandboxId) {
582
+ const res = await this.http.get(
583
+ `/sandbox/${sandboxId}/agent-token`
584
+ );
585
+ const list = res.tokens ?? res.data ?? [];
586
+ return list.map(normalizeAgentToken);
587
+ }
588
+ /**
589
+ * create returns both the persisted token row and the plaintext bearer
590
+ * (`secret`). The bearer is shown only here; surface it to the user
591
+ * immediately. If they navigate away without copying, they must delete the
592
+ * token and create a new one.
593
+ */
594
+ async create(sandboxId, body) {
595
+ const res = await this.http.post(`/sandbox/${sandboxId}/agent-token`, { body });
596
+ if (!res.token || !res.secret) {
597
+ throw new Error("createAgentToken response missing token or secret.");
598
+ }
599
+ return {
600
+ token: normalizeAgentToken(res.token),
601
+ secret: res.secret
602
+ };
603
+ }
604
+ delete(sandboxId, tokenId) {
605
+ return this.http.delete(`/sandbox/${sandboxId}/agent-token/${tokenId}`);
606
+ }
607
+ };
565
608
 
566
609
  // src/modules/credentials/GatewayTokensClient.ts
567
610
  var GatewayTokensClient = class {
@@ -622,6 +665,7 @@ var CredentialsClient = class {
622
665
  this.http = http;
623
666
  this.sandbox = new SandboxCredentialScope(http);
624
667
  this.gatewayTokens = new GatewayTokensClient(http);
668
+ this.agentTokens = new AgentTokensClient(http);
625
669
  }
626
670
  async list(query) {
627
671
  const res = await this.http.get(