@xemahq/agent-session-api-client 0.1.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/LICENSE +201 -0
- package/dist/custom-fetch.d.ts +52 -0
- package/dist/custom-fetch.js +152 -0
- package/dist/endpoints/health/health.d.ts +15 -0
- package/dist/endpoints/health/health.js +53 -0
- package/dist/endpoints/internal/internal.d.ts +82 -0
- package/dist/endpoints/internal/internal.js +226 -0
- package/dist/endpoints/internal-session-dispatch/internal-session-dispatch.d.ts +20 -0
- package/dist/endpoints/internal-session-dispatch/internal-session-dispatch.js +38 -0
- package/dist/endpoints/output-surface-inspect/output-surface-inspect.d.ts +18 -0
- package/dist/endpoints/output-surface-inspect/output-surface-inspect.js +36 -0
- package/dist/endpoints/output-surfaces/output-surfaces.d.ts +43 -0
- package/dist/endpoints/output-surfaces/output-surfaces.js +142 -0
- package/dist/endpoints/sandbox-sessions/sandbox-sessions.d.ts +43 -0
- package/dist/endpoints/sandbox-sessions/sandbox-sessions.js +127 -0
- package/dist/endpoints/session-attachments/session-attachments.d.ts +23 -0
- package/dist/endpoints/session-attachments/session-attachments.js +48 -0
- package/dist/endpoints/session-blob-attachments/session-blob-attachments.d.ts +13 -0
- package/dist/endpoints/session-blob-attachments/session-blob-attachments.js +18 -0
- package/dist/endpoints/session-participants/session-participants.d.ts +28 -0
- package/dist/endpoints/session-participants/session-participants.js +64 -0
- package/dist/endpoints/sessions/sessions.d.ts +243 -0
- package/dist/endpoints/sessions/sessions.js +812 -0
- package/dist/endpoints/threads/threads.d.ts +48 -0
- package/dist/endpoints/threads/threads.js +158 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.js +35 -0
- package/dist/models/addAttachmentDto.d.ts +20 -0
- package/dist/models/addAttachmentDto.js +2 -0
- package/dist/models/attachSkillDto.d.ts +10 -0
- package/dist/models/attachSkillDto.js +9 -0
- package/dist/models/attachmentClass.d.ts +16 -0
- package/dist/models/attachmentClass.js +18 -0
- package/dist/models/attachmentResponseDto.d.ts +27 -0
- package/dist/models/attachmentResponseDto.js +2 -0
- package/dist/models/attachmentResponseDtoDataArrayEnvelope.d.ts +11 -0
- package/dist/models/attachmentResponseDtoDataArrayEnvelope.js +2 -0
- package/dist/models/attachmentResponseDtoDataEnvelope.d.ts +11 -0
- package/dist/models/attachmentResponseDtoDataEnvelope.js +2 -0
- package/dist/models/attachmentUploadInitResponseDto.d.ts +20 -0
- package/dist/models/attachmentUploadInitResponseDto.js +2 -0
- package/dist/models/attachmentUploadInitResponseDtoDataEnvelope.d.ts +11 -0
- package/dist/models/attachmentUploadInitResponseDtoDataEnvelope.js +2 -0
- package/dist/models/attachmentUploadInitResponseDtoRequiredHeaders.d.ts +13 -0
- package/dist/models/attachmentUploadInitResponseDtoRequiredHeaders.js +9 -0
- package/dist/models/branchStrategy.d.ts +13 -0
- package/dist/models/branchStrategy.js +15 -0
- package/dist/models/buildImageResultDto.d.ts +15 -0
- package/dist/models/buildImageResultDto.js +9 -0
- package/dist/models/buildImageStartedResponseDto.d.ts +17 -0
- package/dist/models/buildImageStartedResponseDto.js +9 -0
- package/dist/models/buildImageStartedResponseDtoDataEnvelope.d.ts +11 -0
- package/dist/models/buildImageStartedResponseDtoDataEnvelope.js +2 -0
- package/dist/models/buildImageStatusResponseDto.d.ts +22 -0
- package/dist/models/buildImageStatusResponseDto.js +2 -0
- package/dist/models/buildImageStatusResponseDtoDataEnvelope.d.ts +11 -0
- package/dist/models/buildImageStatusResponseDtoDataEnvelope.js +2 -0
- package/dist/models/buildImageStatusResponseDtoFailureMessage.d.ts +14 -0
- package/dist/models/buildImageStatusResponseDtoFailureMessage.js +9 -0
- package/dist/models/buildImageStatusResponseDtoStatus.d.ts +20 -0
- package/dist/models/buildImageStatusResponseDtoStatus.js +22 -0
- package/dist/models/changeSessionModelDto.d.ts +15 -0
- package/dist/models/changeSessionModelDto.js +2 -0
- package/dist/models/changeSessionModelDtoSelection.d.ts +14 -0
- package/dist/models/changeSessionModelDtoSelection.js +9 -0
- package/dist/models/changeSessionToolsDto.d.ts +13 -0
- package/dist/models/changeSessionToolsDto.js +2 -0
- package/dist/models/createAndRunDispatchDto.d.ts +24 -0
- package/dist/models/createAndRunDispatchDto.js +2 -0
- package/dist/models/createAndRunDispatchDtoMode.d.ts +14 -0
- package/dist/models/createAndRunDispatchDtoMode.js +13 -0
- package/dist/models/createSandboxSessionDto.d.ts +26 -0
- package/dist/models/createSandboxSessionDto.js +2 -0
- package/dist/models/createThreadDto.d.ts +16 -0
- package/dist/models/createThreadDto.js +9 -0
- package/dist/models/dispatchEnvelopeDto.d.ts +21 -0
- package/dist/models/dispatchEnvelopeDto.js +2 -0
- package/dist/models/dispatchPromptContextDto.d.ts +15 -0
- package/dist/models/dispatchPromptContextDto.js +9 -0
- package/dist/models/environmentDriftDetectedPayloadDto.d.ts +16 -0
- package/dist/models/environmentDriftDetectedPayloadDto.js +2 -0
- package/dist/models/environmentDriftEntryDto.d.ts +21 -0
- package/dist/models/environmentDriftEntryDto.js +2 -0
- package/dist/models/environmentDriftEntryDtoAfter.d.ts +13 -0
- package/dist/models/environmentDriftEntryDtoAfter.js +9 -0
- package/dist/models/environmentDriftEntryDtoBefore.d.ts +13 -0
- package/dist/models/environmentDriftEntryDtoBefore.js +9 -0
- package/dist/models/errorDetailsDto.d.ts +12 -0
- package/dist/models/errorDetailsDto.js +2 -0
- package/dist/models/errorDetailsDtoDetails.d.ts +13 -0
- package/dist/models/errorDetailsDtoDetails.js +9 -0
- package/dist/models/errorPayloadDto.d.ts +13 -0
- package/dist/models/errorPayloadDto.js +2 -0
- package/dist/models/errorResponseDto.d.ts +11 -0
- package/dist/models/errorResponseDto.js +2 -0
- package/dist/models/externalInviteDeliveryMode.d.ts +15 -0
- package/dist/models/externalInviteDeliveryMode.js +14 -0
- package/dist/models/gitCommitEntryDto.d.ts +14 -0
- package/dist/models/gitCommitEntryDto.js +9 -0
- package/dist/models/gitCommitEntryDtoDataArrayEnvelope.d.ts +11 -0
- package/dist/models/gitCommitEntryDtoDataArrayEnvelope.js +2 -0
- package/dist/models/gitCommitResponseDto.d.ts +11 -0
- package/dist/models/gitCommitResponseDto.js +9 -0
- package/dist/models/gitCommitResponseDtoDataEnvelope.d.ts +11 -0
- package/dist/models/gitCommitResponseDtoDataEnvelope.js +2 -0
- package/dist/models/gitStatusResponseDto.d.ts +17 -0
- package/dist/models/gitStatusResponseDto.js +2 -0
- package/dist/models/gitStatusResponseDtoDataEnvelope.d.ts +11 -0
- package/dist/models/gitStatusResponseDtoDataEnvelope.js +2 -0
- package/dist/models/index.d.ts +194 -0
- package/dist/models/index.js +211 -0
- package/dist/models/initAttachmentUploadDto.d.ts +18 -0
- package/dist/models/initAttachmentUploadDto.js +9 -0
- package/dist/models/inputsAppendEnvelopeDto.d.ts +19 -0
- package/dist/models/inputsAppendEnvelopeDto.js +9 -0
- package/dist/models/inspectStepResultDto.d.ts +16 -0
- package/dist/models/inspectStepResultDto.js +2 -0
- package/dist/models/inspectStepResultDtoData.d.ts +10 -0
- package/dist/models/inspectStepResultDtoData.js +9 -0
- package/dist/models/inspectStepResultDtoKind.d.ts +25 -0
- package/dist/models/inspectStepResultDtoKind.js +27 -0
- package/dist/models/inspectStepResultDtoStatus.d.ts +17 -0
- package/dist/models/inspectStepResultDtoStatus.js +19 -0
- package/dist/models/invitableParticipantRole.d.ts +15 -0
- package/dist/models/invitableParticipantRole.js +14 -0
- package/dist/models/inviteExternalDto.d.ts +18 -0
- package/dist/models/inviteExternalDto.js +2 -0
- package/dist/models/inviteParticipantDto.d.ts +16 -0
- package/dist/models/inviteParticipantDto.js +2 -0
- package/dist/models/invitedExternalParticipantResponseDto.d.ts +17 -0
- package/dist/models/invitedExternalParticipantResponseDto.js +9 -0
- package/dist/models/invitedExternalParticipantResponseDtoDataEnvelope.d.ts +11 -0
- package/dist/models/invitedExternalParticipantResponseDtoDataEnvelope.js +2 -0
- package/dist/models/kBPushResponseDto.d.ts +13 -0
- package/dist/models/kBPushResponseDto.js +9 -0
- package/dist/models/kBPushResponseDtoDataEnvelope.d.ts +11 -0
- package/dist/models/kBPushResponseDtoDataEnvelope.js +2 -0
- package/dist/models/kbMountsResponseDto.d.ts +14 -0
- package/dist/models/kbMountsResponseDto.js +2 -0
- package/dist/models/kbMountsResponseDtoDataEnvelope.d.ts +11 -0
- package/dist/models/kbMountsResponseDtoDataEnvelope.js +2 -0
- package/dist/models/kbPageMountDto.d.ts +13 -0
- package/dist/models/kbPageMountDto.js +9 -0
- package/dist/models/launchFailRequestDto.d.ts +19 -0
- package/dist/models/launchFailRequestDto.js +9 -0
- package/dist/models/launchStepRequestDto.d.ts +15 -0
- package/dist/models/launchStepRequestDto.js +9 -0
- package/dist/models/listSessionParticipantsResponseDto.d.ts +11 -0
- package/dist/models/listSessionParticipantsResponseDto.js +2 -0
- package/dist/models/listSessionParticipantsResponseDtoDataEnvelope.d.ts +11 -0
- package/dist/models/listSessionParticipantsResponseDtoDataEnvelope.js +2 -0
- package/dist/models/mergeCheckResponseDto.d.ts +13 -0
- package/dist/models/mergeCheckResponseDto.js +9 -0
- package/dist/models/mergeCheckResponseDtoDataEnvelope.d.ts +11 -0
- package/dist/models/mergeCheckResponseDtoDataEnvelope.js +2 -0
- package/dist/models/messageResponseDto.d.ts +24 -0
- package/dist/models/messageResponseDto.js +2 -0
- package/dist/models/messageResponseDtoMetadata.d.ts +14 -0
- package/dist/models/messageResponseDtoMetadata.js +9 -0
- package/dist/models/messageResponseDtoPaginatedEnvelope.d.ts +13 -0
- package/dist/models/messageResponseDtoPaginatedEnvelope.js +2 -0
- package/dist/models/outputSurfaceAppResponseDto.d.ts +48 -0
- package/dist/models/outputSurfaceAppResponseDto.js +2 -0
- package/dist/models/outputSurfaceAppResponseDtoDataArrayEnvelope.d.ts +11 -0
- package/dist/models/outputSurfaceAppResponseDtoDataArrayEnvelope.js +2 -0
- package/dist/models/outputSurfaceAppResponseDtoDataEnvelope.d.ts +11 -0
- package/dist/models/outputSurfaceAppResponseDtoDataEnvelope.js +2 -0
- package/dist/models/outputSurfaceAppStatus.d.ts +18 -0
- package/dist/models/outputSurfaceAppStatus.js +20 -0
- package/dist/models/outputSurfaceControllerRestartParams.d.ts +11 -0
- package/dist/models/outputSurfaceControllerRestartParams.js +2 -0
- package/dist/models/outputSurfaceControllerScanParams.d.ts +11 -0
- package/dist/models/outputSurfaceControllerScanParams.js +2 -0
- package/dist/models/outputSurfaceRemediationKindInput.d.ts +17 -0
- package/dist/models/outputSurfaceRemediationKindInput.js +16 -0
- package/dist/models/outputSurfaceRestartMode.d.ts +13 -0
- package/dist/models/outputSurfaceRestartMode.js +15 -0
- package/dist/models/paginationMeta.d.ts +18 -0
- package/dist/models/paginationMeta.js +9 -0
- package/dist/models/participantRole.d.ts +16 -0
- package/dist/models/participantRole.js +15 -0
- package/dist/models/participantSubjectKind.d.ts +15 -0
- package/dist/models/participantSubjectKind.js +14 -0
- package/dist/models/projectKind.d.ts +24 -0
- package/dist/models/projectKind.js +26 -0
- package/dist/models/providerEntryDto.d.ts +14 -0
- package/dist/models/providerEntryDto.js +2 -0
- package/dist/models/providerEntryDtoKind.d.ts +11 -0
- package/dist/models/providerEntryDtoKind.js +13 -0
- package/dist/models/pullRequestResponseDto.d.ts +12 -0
- package/dist/models/pullRequestResponseDto.js +2 -0
- package/dist/models/pullRequestResponseDtoDataEnvelope.d.ts +11 -0
- package/dist/models/pullRequestResponseDtoDataEnvelope.js +2 -0
- package/dist/models/pullRequestResponseDtoPrUrl.d.ts +10 -0
- package/dist/models/pullRequestResponseDtoPrUrl.js +9 -0
- package/dist/models/pushDocumentEditDto.d.ts +11 -0
- package/dist/models/pushDocumentEditDto.js +9 -0
- package/dist/models/reasoningDeltaPayloadDto.d.ts +11 -0
- package/dist/models/reasoningDeltaPayloadDto.js +9 -0
- package/dist/models/referenceAttachmentClass.d.ts +18 -0
- package/dist/models/referenceAttachmentClass.js +17 -0
- package/dist/models/remediateOutputSurfaceDto.d.ts +14 -0
- package/dist/models/remediateOutputSurfaceDto.js +2 -0
- package/dist/models/remediateOutputSurfaceResponseDto.d.ts +13 -0
- package/dist/models/remediateOutputSurfaceResponseDto.js +9 -0
- package/dist/models/remediateOutputSurfaceResponseDtoDataEnvelope.d.ts +11 -0
- package/dist/models/remediateOutputSurfaceResponseDtoDataEnvelope.js +2 -0
- package/dist/models/repoGitStatusDto.d.ts +25 -0
- package/dist/models/repoGitStatusDto.js +2 -0
- package/dist/models/repoRole.d.ts +15 -0
- package/dist/models/repoRole.js +14 -0
- package/dist/models/reportInspectPresenceDto.d.ts +21 -0
- package/dist/models/reportInspectPresenceDto.js +2 -0
- package/dist/models/reportInspectPresenceDtoKind.d.ts +15 -0
- package/dist/models/reportInspectPresenceDtoKind.js +17 -0
- package/dist/models/reportInspectPresenceDtoReason.d.ts +15 -0
- package/dist/models/reportInspectPresenceDtoReason.js +14 -0
- package/dist/models/reportInspectResultDto.d.ts +13 -0
- package/dist/models/reportInspectResultDto.js +2 -0
- package/dist/models/resumeAndRunDispatchDto.d.ts +19 -0
- package/dist/models/resumeAndRunDispatchDto.js +2 -0
- package/dist/models/resumeAndRunDispatchDtoMode.d.ts +14 -0
- package/dist/models/resumeAndRunDispatchDtoMode.js +13 -0
- package/dist/models/resumeSessionDto.d.ts +14 -0
- package/dist/models/resumeSessionDto.js +9 -0
- package/dist/models/revisionInputDto.d.ts +13 -0
- package/dist/models/revisionInputDto.js +9 -0
- package/dist/models/rotateTokenResponseDto.d.ts +12 -0
- package/dist/models/rotateTokenResponseDto.js +9 -0
- package/dist/models/rotateTokenResponseDtoDataEnvelope.d.ts +11 -0
- package/dist/models/rotateTokenResponseDtoDataEnvelope.js +2 -0
- package/dist/models/runBackfillBatchRequestDto.d.ts +22 -0
- package/dist/models/runBackfillBatchRequestDto.js +9 -0
- package/dist/models/runBackfillBatchResponseDto.d.ts +15 -0
- package/dist/models/runBackfillBatchResponseDto.js +9 -0
- package/dist/models/runSandboxEvalTurnDto.d.ts +11 -0
- package/dist/models/runSandboxEvalTurnDto.js +9 -0
- package/dist/models/sandboxEvalTurnResultDto.d.ts +19 -0
- package/dist/models/sandboxEvalTurnResultDto.js +9 -0
- package/dist/models/sandboxEvalTurnResultDtoDataEnvelope.d.ts +11 -0
- package/dist/models/sandboxEvalTurnResultDtoDataEnvelope.js +2 -0
- package/dist/models/sandboxSessionsControllerDeleteToolMocksParams.d.ts +13 -0
- package/dist/models/sandboxSessionsControllerDeleteToolMocksParams.js +9 -0
- package/dist/models/sandboxToolMockDto.d.ts +15 -0
- package/dist/models/sandboxToolMockDto.js +9 -0
- package/dist/models/sandboxToolMocksResponseDto.d.ts +13 -0
- package/dist/models/sandboxToolMocksResponseDto.js +9 -0
- package/dist/models/sandboxToolMocksResponseDtoDataEnvelope.d.ts +11 -0
- package/dist/models/sandboxToolMocksResponseDtoDataEnvelope.js +2 -0
- package/dist/models/sessionAttachmentStatus.d.ts +16 -0
- package/dist/models/sessionAttachmentStatus.js +15 -0
- package/dist/models/sessionBlobAttachmentDto.d.ts +18 -0
- package/dist/models/sessionBlobAttachmentDto.js +2 -0
- package/dist/models/sessionBlobAttachmentDtoDataArrayEnvelope.d.ts +11 -0
- package/dist/models/sessionBlobAttachmentDtoDataArrayEnvelope.js +2 -0
- package/dist/models/sessionBlobAttachmentDtoRequiredHeaders.d.ts +13 -0
- package/dist/models/sessionBlobAttachmentDtoRequiredHeaders.js +9 -0
- package/dist/models/sessionContextWindowSnapshotDto.d.ts +31 -0
- package/dist/models/sessionContextWindowSnapshotDto.js +9 -0
- package/dist/models/sessionDebugCompositionNodeDto.d.ts +20 -0
- package/dist/models/sessionDebugCompositionNodeDto.js +9 -0
- package/dist/models/sessionDebugInfoDto.d.ts +38 -0
- package/dist/models/sessionDebugInfoDto.js +2 -0
- package/dist/models/sessionDebugInfoDtoDataEnvelope.d.ts +11 -0
- package/dist/models/sessionDebugInfoDtoDataEnvelope.js +2 -0
- package/dist/models/sessionDebugInfoDtoMountPlan.d.ts +14 -0
- package/dist/models/sessionDebugInfoDtoMountPlan.js +9 -0
- package/dist/models/sessionDebugModelDecisionDto.d.ts +27 -0
- package/dist/models/sessionDebugModelDecisionDto.js +9 -0
- package/dist/models/sessionDebugSkillDto.d.ts +23 -0
- package/dist/models/sessionDebugSkillDto.js +2 -0
- package/dist/models/sessionDebugSkillDtoSnapshot.d.ts +14 -0
- package/dist/models/sessionDebugSkillDtoSnapshot.js +9 -0
- package/dist/models/sessionKind.d.ts +15 -0
- package/dist/models/sessionKind.js +14 -0
- package/dist/models/sessionLockfileDto.d.ts +29 -0
- package/dist/models/sessionLockfileDto.js +2 -0
- package/dist/models/sessionLockfileDtoAgents.d.ts +13 -0
- package/dist/models/sessionLockfileDtoAgents.js +9 -0
- package/dist/models/sessionLockfileDtoBiomes.d.ts +13 -0
- package/dist/models/sessionLockfileDtoBiomes.js +9 -0
- package/dist/models/sessionLockfileDtoCapabilities.d.ts +13 -0
- package/dist/models/sessionLockfileDtoCapabilities.js +9 -0
- package/dist/models/sessionLockfileDtoDataEnvelope.d.ts +11 -0
- package/dist/models/sessionLockfileDtoDataEnvelope.js +2 -0
- package/dist/models/sessionLockfileDtoDeliverableSpecs.d.ts +13 -0
- package/dist/models/sessionLockfileDtoDeliverableSpecs.js +9 -0
- package/dist/models/sessionLockfileDtoSkills.d.ts +13 -0
- package/dist/models/sessionLockfileDtoSkills.js +9 -0
- package/dist/models/sessionLockfileDtoWorkflows.d.ts +13 -0
- package/dist/models/sessionLockfileDtoWorkflows.js +9 -0
- package/dist/models/sessionMessageRole.d.ts +14 -0
- package/dist/models/sessionMessageRole.js +16 -0
- package/dist/models/sessionParticipantDto.d.ts +29 -0
- package/dist/models/sessionParticipantDto.js +2 -0
- package/dist/models/sessionParticipantDtoDataEnvelope.d.ts +11 -0
- package/dist/models/sessionParticipantDtoDataEnvelope.js +2 -0
- package/dist/models/sessionPauseReason.d.ts +15 -0
- package/dist/models/sessionPauseReason.js +14 -0
- package/dist/models/sessionProvisioningPhase.d.ts +24 -0
- package/dist/models/sessionProvisioningPhase.js +23 -0
- package/dist/models/sessionResponseDto.d.ts +134 -0
- package/dist/models/sessionResponseDto.js +2 -0
- package/dist/models/sessionResponseDtoDataEnvelope.d.ts +11 -0
- package/dist/models/sessionResponseDtoDataEnvelope.js +2 -0
- package/dist/models/sessionResponseDtoFailureMetaJson.d.ts +14 -0
- package/dist/models/sessionResponseDtoFailureMetaJson.js +9 -0
- package/dist/models/sessionResponseDtoHandoffOutput.d.ts +14 -0
- package/dist/models/sessionResponseDtoHandoffOutput.js +9 -0
- package/dist/models/sessionResponseDtoModelSelection.d.ts +14 -0
- package/dist/models/sessionResponseDtoModelSelection.js +9 -0
- package/dist/models/sessionResponseDtoPaginatedEnvelope.d.ts +13 -0
- package/dist/models/sessionResponseDtoPaginatedEnvelope.js +2 -0
- package/dist/models/sessionResponseDtoToolSelectionItem.d.ts +10 -0
- package/dist/models/sessionResponseDtoToolSelectionItem.js +9 -0
- package/dist/models/sessionStatus.d.ts +19 -0
- package/dist/models/sessionStatus.js +21 -0
- package/dist/models/sessionTimelineEntryDto.d.ts +23 -0
- package/dist/models/sessionTimelineEntryDto.js +2 -0
- package/dist/models/sessionTimelineEntryDtoEventType.d.ts +69 -0
- package/dist/models/sessionTimelineEntryDtoEventType.js +68 -0
- package/dist/models/sessionTimelineEntryDtoPayload.d.ts +17 -0
- package/dist/models/sessionTimelineEntryDtoPayload.js +2 -0
- package/dist/models/sessionTimelinePageDto.d.ts +16 -0
- package/dist/models/sessionTimelinePageDto.js +2 -0
- package/dist/models/sessionTimelinePageDtoDataEnvelope.d.ts +11 -0
- package/dist/models/sessionTimelinePageDtoDataEnvelope.js +2 -0
- package/dist/models/sessionTokenUsageDto.d.ts +11 -0
- package/dist/models/sessionTokenUsageDto.js +9 -0
- package/dist/models/sessionsControllerGetCommitHistoryParams.d.ts +13 -0
- package/dist/models/sessionsControllerGetCommitHistoryParams.js +9 -0
- package/dist/models/sessionsControllerGetGitDiffParams.d.ts +17 -0
- package/dist/models/sessionsControllerGetGitDiffParams.js +9 -0
- package/dist/models/sessionsControllerListFilesParams.d.ts +13 -0
- package/dist/models/sessionsControllerListFilesParams.js +9 -0
- package/dist/models/sessionsControllerListParams.d.ts +45 -0
- package/dist/models/sessionsControllerListParams.js +9 -0
- package/dist/models/sessionsControllerListTemplatesParams.d.ts +11 -0
- package/dist/models/sessionsControllerListTemplatesParams.js +9 -0
- package/dist/models/sessionsControllerMergeCheckParams.d.ts +13 -0
- package/dist/models/sessionsControllerMergeCheckParams.js +9 -0
- package/dist/models/sessionsControllerStreamEventsParams.d.ts +13 -0
- package/dist/models/sessionsControllerStreamEventsParams.js +9 -0
- package/dist/models/setSandboxToolMocksDto.d.ts +12 -0
- package/dist/models/setSandboxToolMocksDto.js +2 -0
- package/dist/models/shareAccessLevel.d.ts +14 -0
- package/dist/models/shareAccessLevel.js +13 -0
- package/dist/models/shareResponseDto.d.ts +21 -0
- package/dist/models/shareResponseDto.js +2 -0
- package/dist/models/shareResponseDtoDataEnvelope.d.ts +11 -0
- package/dist/models/shareResponseDtoDataEnvelope.js +2 -0
- package/dist/models/shareResponseDtoExpiresAt.d.ts +14 -0
- package/dist/models/shareResponseDtoExpiresAt.js +9 -0
- package/dist/models/startBuildImageDto.d.ts +16 -0
- package/dist/models/startBuildImageDto.js +9 -0
- package/dist/models/sweeperTickResponseDto.d.ts +13 -0
- package/dist/models/sweeperTickResponseDto.js +9 -0
- package/dist/models/templateResponseDto.d.ts +33 -0
- package/dist/models/templateResponseDto.js +2 -0
- package/dist/models/templateResponseDtoBudgetLimit.d.ts +10 -0
- package/dist/models/templateResponseDtoBudgetLimit.js +9 -0
- package/dist/models/templateResponseDtoCustomConfig.d.ts +14 -0
- package/dist/models/templateResponseDtoCustomConfig.js +9 -0
- package/dist/models/templateResponseDtoDataEnvelope.d.ts +11 -0
- package/dist/models/templateResponseDtoDataEnvelope.js +2 -0
- package/dist/models/templateResponseDtoDescription.d.ts +10 -0
- package/dist/models/templateResponseDtoDescription.js +9 -0
- package/dist/models/templateResponseDtoPaginatedEnvelope.d.ts +13 -0
- package/dist/models/templateResponseDtoPaginatedEnvelope.js +2 -0
- package/dist/models/templateResponseDtoRepositoryId.d.ts +10 -0
- package/dist/models/templateResponseDtoRepositoryId.js +9 -0
- package/dist/models/textDeltaPayloadDto.d.ts +11 -0
- package/dist/models/textDeltaPayloadDto.js +9 -0
- package/dist/models/threadResponseDto.d.ts +35 -0
- package/dist/models/threadResponseDto.js +2 -0
- package/dist/models/threadResponseDtoDataArrayEnvelope.d.ts +11 -0
- package/dist/models/threadResponseDtoDataArrayEnvelope.js +2 -0
- package/dist/models/threadResponseDtoDataEnvelope.d.ts +11 -0
- package/dist/models/threadResponseDtoDataEnvelope.js +2 -0
- package/dist/models/threadResponseDtoModelSelection.d.ts +14 -0
- package/dist/models/threadResponseDtoModelSelection.js +9 -0
- package/dist/models/threadStatus.d.ts +12 -0
- package/dist/models/threadStatus.js +14 -0
- package/dist/models/threadsControllerGetMessagesParams.d.ts +17 -0
- package/dist/models/threadsControllerGetMessagesParams.js +9 -0
- package/dist/models/threadsControllerGetTimelineParams.d.ts +17 -0
- package/dist/models/threadsControllerGetTimelineParams.js +9 -0
- package/dist/models/toolCallPayloadDto.d.ts +18 -0
- package/dist/models/toolCallPayloadDto.js +2 -0
- package/dist/models/toolCallPayloadDtoStatus.d.ts +15 -0
- package/dist/models/toolCallPayloadDtoStatus.js +14 -0
- package/dist/models/toolEntryDto.d.ts +16 -0
- package/dist/models/toolEntryDto.js +2 -0
- package/dist/models/toolEntryDtoKind.d.ts +11 -0
- package/dist/models/toolEntryDtoKind.js +13 -0
- package/dist/models/toolProviderKind.d.ts +15 -0
- package/dist/models/toolProviderKind.js +17 -0
- package/dist/models/toolUsageEntryDto.d.ts +15 -0
- package/dist/models/toolUsageEntryDto.js +9 -0
- package/dist/models/toolUsageResponseDto.d.ts +14 -0
- package/dist/models/toolUsageResponseDto.js +2 -0
- package/dist/models/toolUsageResponseDtoDataEnvelope.d.ts +11 -0
- package/dist/models/toolUsageResponseDtoDataEnvelope.js +2 -0
- package/dist/models/turnState.d.ts +16 -0
- package/dist/models/turnState.js +15 -0
- package/dist/models/updateKbMountsDto.d.ts +14 -0
- package/dist/models/updateKbMountsDto.js +2 -0
- package/dist/models/updateThreadDto.d.ts +17 -0
- package/dist/models/updateThreadDto.js +2 -0
- package/dist/models/usageResponseDto.d.ts +18 -0
- package/dist/models/usageResponseDto.js +2 -0
- package/dist/models/usageResponseDtoBudgetLimit.d.ts +13 -0
- package/dist/models/usageResponseDtoBudgetLimit.js +9 -0
- package/dist/models/usageResponseDtoBudgetRatio.d.ts +13 -0
- package/dist/models/usageResponseDtoBudgetRatio.js +9 -0
- package/dist/models/usageResponseDtoDataEnvelope.d.ts +11 -0
- package/dist/models/usageResponseDtoDataEnvelope.js +2 -0
- package/package.json +18 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for describing the origin of the Work and
|
|
141
|
+
reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Support. While redistributing the Work or
|
|
166
|
+
Derivative Works thereof, You may choose to offer, and charge a
|
|
167
|
+
fee for, acceptance of support, warranty, indemnity, or other
|
|
168
|
+
liability obligations and/or rights consistent with this License.
|
|
169
|
+
However, in accepting such obligations, You may act only on Your
|
|
170
|
+
own behalf and on Your sole responsibility, not on behalf of any
|
|
171
|
+
other Contributor, and only if You agree to indemnify, defend, and
|
|
172
|
+
hold each Contributor harmless for any liability incurred by, or
|
|
173
|
+
claims asserted against, such Contributor by reason of your
|
|
174
|
+
accepting any such warranty or support.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright 2026 Xema
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Configurable fetch wrapper for Orval-generated clients.
|
|
3
|
+
*
|
|
4
|
+
* Consumers must call `configureClient()` before using any endpoint function.
|
|
5
|
+
* The baseUrl is prepended to the relative paths generated by Orval.
|
|
6
|
+
*
|
|
7
|
+
* Features:
|
|
8
|
+
* - Automatic bearer-token injection via `getAuthToken` callback
|
|
9
|
+
* - Per-request header injection via `getHeaders` callback
|
|
10
|
+
* - Automatic 401 handling via `onUnauthorized` callback (single retry)
|
|
11
|
+
* - Exponential-backoff retry for transient failures (429, 502, 503, 504)
|
|
12
|
+
* - Typed `ClientError` for non-2xx responses
|
|
13
|
+
* - Per-call header overrides (take precedence over global headers)
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* configureClient({
|
|
17
|
+
* baseUrl: 'http://governance-api:3400',
|
|
18
|
+
* getAuthToken: () => identityBootstrapService.getAccessToken(),
|
|
19
|
+
* getHeaders: () => ({ 'X-Org-Id': orgId, 'X-Correlation-Id': crypto.randomUUID() }),
|
|
20
|
+
* });
|
|
21
|
+
*/
|
|
22
|
+
export interface ClientConfig {
|
|
23
|
+
/**
|
|
24
|
+
* Static base URL (e.g. 'http://localhost:3140') — no trailing slash.
|
|
25
|
+
* Mutually exclusive with `baseUrlResolver`; exactly one MUST be set.
|
|
26
|
+
*/
|
|
27
|
+
baseUrl?: string;
|
|
28
|
+
/**
|
|
29
|
+
* Per-request base-URL resolver. When set, the peer URL is resolved from
|
|
30
|
+
* the service registry on EVERY request (boot-order-safe). Wired by
|
|
31
|
+
* `configureOrvalClientResolved` from `@xemahq/platform-common`.
|
|
32
|
+
*/
|
|
33
|
+
baseUrlResolver?: () => string | Promise<string>;
|
|
34
|
+
/** Optional async callback to get an auth token. Auto-sets Authorization header on every request. */
|
|
35
|
+
getAuthToken?: () => Promise<string>;
|
|
36
|
+
/** Optional callback returning headers to inject on every request. Per-call headers take precedence. */
|
|
37
|
+
getHeaders?: () => Record<string, string> | Promise<Record<string, string>>;
|
|
38
|
+
/** Optional callback invoked on 401 before a single retry (e.g. force-refresh auth token). */
|
|
39
|
+
onUnauthorized?: () => Promise<void>;
|
|
40
|
+
/** Maximum retry attempts for transient failures (default: 3). Set to 0 to disable retries. */
|
|
41
|
+
maxRetries?: number;
|
|
42
|
+
}
|
|
43
|
+
export declare class ClientError extends Error {
|
|
44
|
+
readonly status: number;
|
|
45
|
+
readonly url: string;
|
|
46
|
+
readonly body: unknown;
|
|
47
|
+
constructor(status: number, url: string, body: unknown);
|
|
48
|
+
}
|
|
49
|
+
export declare function configureClient(config: ClientConfig): void;
|
|
50
|
+
export declare function getClientConfig(): ClientConfig;
|
|
51
|
+
export declare const customFetch: <T>(url: string, options: RequestInit) => Promise<T>;
|
|
52
|
+
export default customFetch;
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Configurable fetch wrapper for Orval-generated clients.
|
|
4
|
+
*
|
|
5
|
+
* Consumers must call `configureClient()` before using any endpoint function.
|
|
6
|
+
* The baseUrl is prepended to the relative paths generated by Orval.
|
|
7
|
+
*
|
|
8
|
+
* Features:
|
|
9
|
+
* - Automatic bearer-token injection via `getAuthToken` callback
|
|
10
|
+
* - Per-request header injection via `getHeaders` callback
|
|
11
|
+
* - Automatic 401 handling via `onUnauthorized` callback (single retry)
|
|
12
|
+
* - Exponential-backoff retry for transient failures (429, 502, 503, 504)
|
|
13
|
+
* - Typed `ClientError` for non-2xx responses
|
|
14
|
+
* - Per-call header overrides (take precedence over global headers)
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* configureClient({
|
|
18
|
+
* baseUrl: 'http://governance-api:3400',
|
|
19
|
+
* getAuthToken: () => identityBootstrapService.getAccessToken(),
|
|
20
|
+
* getHeaders: () => ({ 'X-Org-Id': orgId, 'X-Correlation-Id': crypto.randomUUID() }),
|
|
21
|
+
* });
|
|
22
|
+
*/
|
|
23
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
24
|
+
exports.customFetch = exports.ClientError = void 0;
|
|
25
|
+
exports.configureClient = configureClient;
|
|
26
|
+
exports.getClientConfig = getClientConfig;
|
|
27
|
+
class ClientError extends Error {
|
|
28
|
+
status;
|
|
29
|
+
url;
|
|
30
|
+
body;
|
|
31
|
+
constructor(status, url, body) {
|
|
32
|
+
super(`HTTP ${status} from ${url}`);
|
|
33
|
+
this.status = status;
|
|
34
|
+
this.url = url;
|
|
35
|
+
this.body = body;
|
|
36
|
+
this.name = 'ClientError';
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
exports.ClientError = ClientError;
|
|
40
|
+
let clientConfig = null;
|
|
41
|
+
function configureClient(config) {
|
|
42
|
+
clientConfig = config;
|
|
43
|
+
}
|
|
44
|
+
function getClientConfig() {
|
|
45
|
+
if (!clientConfig) {
|
|
46
|
+
throw new Error('Client not configured. Call configureClient({ baseUrl }) before using endpoint functions.');
|
|
47
|
+
}
|
|
48
|
+
return clientConfig;
|
|
49
|
+
}
|
|
50
|
+
const RETRYABLE_STATUSES = [429, 502, 503, 504];
|
|
51
|
+
async function buildHeaders(config, callerHeaders) {
|
|
52
|
+
const headers = new Headers(callerHeaders);
|
|
53
|
+
// Global headers from config (caller-provided headers take precedence)
|
|
54
|
+
if (config.getHeaders) {
|
|
55
|
+
const globalHeaders = await Promise.resolve(config.getHeaders());
|
|
56
|
+
for (const [key, value] of Object.entries(globalHeaders)) {
|
|
57
|
+
if (!headers.has(key)) {
|
|
58
|
+
headers.set(key, value);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
// Auth token (caller or global headers take precedence)
|
|
63
|
+
if (config.getAuthToken && !headers.has('Authorization')) {
|
|
64
|
+
const token = await config.getAuthToken();
|
|
65
|
+
headers.set('Authorization', `Bearer ${token}`);
|
|
66
|
+
}
|
|
67
|
+
return headers;
|
|
68
|
+
}
|
|
69
|
+
const customFetch = async (url, options) => {
|
|
70
|
+
const config = getClientConfig();
|
|
71
|
+
const base = config.baseUrlResolver
|
|
72
|
+
? await config.baseUrlResolver()
|
|
73
|
+
: config.baseUrl;
|
|
74
|
+
if (base === undefined) {
|
|
75
|
+
throw new Error('Client not configured: set baseUrl or baseUrlResolver via configureClient().');
|
|
76
|
+
}
|
|
77
|
+
const fullUrl = `${base}${url}`;
|
|
78
|
+
const maxRetries = config.maxRetries ?? 3;
|
|
79
|
+
const headers = await buildHeaders(config, options.headers);
|
|
80
|
+
const requestInit = { ...options, headers };
|
|
81
|
+
let delay = 1000;
|
|
82
|
+
let lastError;
|
|
83
|
+
for (let attempt = 0; attempt <= maxRetries; attempt++) {
|
|
84
|
+
try {
|
|
85
|
+
const response = await fetch(fullUrl, requestInit);
|
|
86
|
+
// 401 — invoke onUnauthorized and retry once (outside the transient retry loop)
|
|
87
|
+
if (response.status === 401 && config.onUnauthorized && attempt === 0) {
|
|
88
|
+
await config.onUnauthorized();
|
|
89
|
+
const refreshedHeaders = await buildHeaders(config, options.headers);
|
|
90
|
+
const retryResponse = await fetch(fullUrl, { ...options, headers: refreshedHeaders });
|
|
91
|
+
const retryBody = await parseBody(retryResponse);
|
|
92
|
+
if (retryResponse.status >= 400) {
|
|
93
|
+
throw new ClientError(retryResponse.status, fullUrl, retryBody);
|
|
94
|
+
}
|
|
95
|
+
return retryBody;
|
|
96
|
+
}
|
|
97
|
+
// Non-retryable status — return or throw
|
|
98
|
+
if (!RETRYABLE_STATUSES.includes(response.status) || attempt >= maxRetries) {
|
|
99
|
+
const body = await parseBody(response);
|
|
100
|
+
if (response.status >= 400) {
|
|
101
|
+
throw new ClientError(response.status, fullUrl, body);
|
|
102
|
+
}
|
|
103
|
+
return body;
|
|
104
|
+
}
|
|
105
|
+
// Retryable — wait and retry
|
|
106
|
+
const retryAfter = parseRetryAfter(response.headers.get('Retry-After'));
|
|
107
|
+
const waitMs = retryAfter ?? addJitter(delay);
|
|
108
|
+
await sleep(waitMs);
|
|
109
|
+
delay = Math.min(delay * 2, 30_000);
|
|
110
|
+
}
|
|
111
|
+
catch (error) {
|
|
112
|
+
if (error instanceof ClientError)
|
|
113
|
+
throw error; // Don't retry client errors
|
|
114
|
+
lastError = error instanceof Error ? error : new Error(String(error));
|
|
115
|
+
if (attempt >= maxRetries)
|
|
116
|
+
throw lastError;
|
|
117
|
+
const waitMs = addJitter(delay);
|
|
118
|
+
await sleep(waitMs);
|
|
119
|
+
delay = Math.min(delay * 2, 30_000);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
throw lastError ?? new Error(`All retries exhausted for ${fullUrl}`);
|
|
123
|
+
};
|
|
124
|
+
exports.customFetch = customFetch;
|
|
125
|
+
async function parseBody(response) {
|
|
126
|
+
const contentType = response.headers.get('content-type');
|
|
127
|
+
if (contentType?.includes('application/json')) {
|
|
128
|
+
return response.json();
|
|
129
|
+
}
|
|
130
|
+
if (response.status === 204) {
|
|
131
|
+
return undefined;
|
|
132
|
+
}
|
|
133
|
+
return response.text();
|
|
134
|
+
}
|
|
135
|
+
function parseRetryAfter(value) {
|
|
136
|
+
if (!value)
|
|
137
|
+
return undefined;
|
|
138
|
+
const seconds = Number(value);
|
|
139
|
+
if (!isNaN(seconds) && seconds >= 0)
|
|
140
|
+
return seconds * 1000;
|
|
141
|
+
const date = new Date(value);
|
|
142
|
+
if (!isNaN(date.getTime()))
|
|
143
|
+
return Math.max(0, date.getTime() - Date.now());
|
|
144
|
+
return undefined;
|
|
145
|
+
}
|
|
146
|
+
function addJitter(delay) {
|
|
147
|
+
return delay + (Math.random() * 2 - 1) * delay * 0.25;
|
|
148
|
+
}
|
|
149
|
+
function sleep(ms) {
|
|
150
|
+
return new Promise(resolve => setTimeout(resolve, ms));
|
|
151
|
+
}
|
|
152
|
+
exports.default = exports.customFetch;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @summary Health check
|
|
3
|
+
*/
|
|
4
|
+
export declare const getHealthControllerCheckUrl: () => string;
|
|
5
|
+
export declare const healthControllerCheck: (options?: RequestInit) => Promise<void>;
|
|
6
|
+
/**
|
|
7
|
+
* @summary Liveness probe
|
|
8
|
+
*/
|
|
9
|
+
export declare const getHealthControllerLiveUrl: () => string;
|
|
10
|
+
export declare const healthControllerLive: (options?: RequestInit) => Promise<void>;
|
|
11
|
+
/**
|
|
12
|
+
* @summary Readiness probe — checks database connectivity
|
|
13
|
+
*/
|
|
14
|
+
export declare const getHealthControllerReadyUrl: () => string;
|
|
15
|
+
export declare const healthControllerReady: (options?: RequestInit) => Promise<void>;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.healthControllerReady = exports.getHealthControllerReadyUrl = exports.healthControllerLive = exports.getHealthControllerLiveUrl = exports.healthControllerCheck = exports.getHealthControllerCheckUrl = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Generated by orval v8.6.2 🍺
|
|
6
|
+
* Do not edit manually.
|
|
7
|
+
* Interactive Session API
|
|
8
|
+
* Real-time interactive AI coding sessions with agent management, file browsing, and activity streaming
|
|
9
|
+
* OpenAPI spec version: 0.1.0
|
|
10
|
+
*/
|
|
11
|
+
const custom_fetch_1 = require("../../custom-fetch");
|
|
12
|
+
/**
|
|
13
|
+
* @summary Health check
|
|
14
|
+
*/
|
|
15
|
+
const getHealthControllerCheckUrl = () => {
|
|
16
|
+
return `/health`;
|
|
17
|
+
};
|
|
18
|
+
exports.getHealthControllerCheckUrl = getHealthControllerCheckUrl;
|
|
19
|
+
const healthControllerCheck = async (options) => {
|
|
20
|
+
return (0, custom_fetch_1.customFetch)((0, exports.getHealthControllerCheckUrl)(), {
|
|
21
|
+
...options,
|
|
22
|
+
method: 'GET'
|
|
23
|
+
});
|
|
24
|
+
};
|
|
25
|
+
exports.healthControllerCheck = healthControllerCheck;
|
|
26
|
+
/**
|
|
27
|
+
* @summary Liveness probe
|
|
28
|
+
*/
|
|
29
|
+
const getHealthControllerLiveUrl = () => {
|
|
30
|
+
return `/health/live`;
|
|
31
|
+
};
|
|
32
|
+
exports.getHealthControllerLiveUrl = getHealthControllerLiveUrl;
|
|
33
|
+
const healthControllerLive = async (options) => {
|
|
34
|
+
return (0, custom_fetch_1.customFetch)((0, exports.getHealthControllerLiveUrl)(), {
|
|
35
|
+
...options,
|
|
36
|
+
method: 'GET'
|
|
37
|
+
});
|
|
38
|
+
};
|
|
39
|
+
exports.healthControllerLive = healthControllerLive;
|
|
40
|
+
/**
|
|
41
|
+
* @summary Readiness probe — checks database connectivity
|
|
42
|
+
*/
|
|
43
|
+
const getHealthControllerReadyUrl = () => {
|
|
44
|
+
return `/health/ready`;
|
|
45
|
+
};
|
|
46
|
+
exports.getHealthControllerReadyUrl = getHealthControllerReadyUrl;
|
|
47
|
+
const healthControllerReady = async (options) => {
|
|
48
|
+
return (0, custom_fetch_1.customFetch)((0, exports.getHealthControllerReadyUrl)(), {
|
|
49
|
+
...options,
|
|
50
|
+
method: 'GET'
|
|
51
|
+
});
|
|
52
|
+
};
|
|
53
|
+
exports.healthControllerReady = healthControllerReady;
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by orval v8.6.2 🍺
|
|
3
|
+
* Do not edit manually.
|
|
4
|
+
* Interactive Session API
|
|
5
|
+
* Real-time interactive AI coding sessions with agent management, file browsing, and activity streaming
|
|
6
|
+
* OpenAPI spec version: 0.1.0
|
|
7
|
+
*/
|
|
8
|
+
import type { LaunchFailRequestDto, LaunchStepRequestDto, RunBackfillBatchRequestDto, RunBackfillBatchResponseDto, SweeperTickResponseDto } from '../../models';
|
|
9
|
+
/**
|
|
10
|
+
* @summary Launch step — resolve config (creating → provisioning)
|
|
11
|
+
*/
|
|
12
|
+
export declare const getInternalSessionLaunchControllerResolveConfigUrl: (sessionId: string) => string;
|
|
13
|
+
export declare const internalSessionLaunchControllerResolveConfig: (sessionId: string, launchStepRequestDto: LaunchStepRequestDto, options?: RequestInit) => Promise<void>;
|
|
14
|
+
/**
|
|
15
|
+
* @summary Launch step — acquire the pool worker
|
|
16
|
+
*/
|
|
17
|
+
export declare const getInternalSessionLaunchControllerAcquireWorkerUrl: (sessionId: string) => string;
|
|
18
|
+
export declare const internalSessionLaunchControllerAcquireWorker: (sessionId: string, launchStepRequestDto: LaunchStepRequestDto, options?: RequestInit) => Promise<void>;
|
|
19
|
+
/**
|
|
20
|
+
* @summary Launch step — apply the per-session control bundle
|
|
21
|
+
*/
|
|
22
|
+
export declare const getInternalSessionLaunchControllerApplyControlBundleUrl: (sessionId: string) => string;
|
|
23
|
+
export declare const internalSessionLaunchControllerApplyControlBundle: (sessionId: string, launchStepRequestDto: LaunchStepRequestDto, options?: RequestInit) => Promise<void>;
|
|
24
|
+
/**
|
|
25
|
+
* @summary Launch step — apply the workspace bootstrap + provision phase
|
|
26
|
+
*/
|
|
27
|
+
export declare const getInternalSessionLaunchControllerApplyBootstrapUrl: (sessionId: string) => string;
|
|
28
|
+
export declare const internalSessionLaunchControllerApplyBootstrap: (sessionId: string, launchStepRequestDto: LaunchStepRequestDto, options?: RequestInit) => Promise<void>;
|
|
29
|
+
/**
|
|
30
|
+
* @summary Launch step — finalize (provisioning → active)
|
|
31
|
+
*/
|
|
32
|
+
export declare const getInternalSessionLaunchControllerFinalizeUrl: (sessionId: string) => string;
|
|
33
|
+
export declare const internalSessionLaunchControllerFinalize: (sessionId: string, launchStepRequestDto: LaunchStepRequestDto, options?: RequestInit) => Promise<void>;
|
|
34
|
+
/**
|
|
35
|
+
* @summary Launch compensation — release the allocation, drive the session to failed
|
|
36
|
+
*/
|
|
37
|
+
export declare const getInternalSessionLaunchControllerFailUrl: (sessionId: string) => string;
|
|
38
|
+
export declare const internalSessionLaunchControllerFail: (sessionId: string, launchFailRequestDto: LaunchFailRequestDto, options?: RequestInit) => Promise<void>;
|
|
39
|
+
/**
|
|
40
|
+
* @summary Resume step — re-acquire, restore, recovering → active
|
|
41
|
+
*/
|
|
42
|
+
export declare const getInternalSessionLifecycleStepControllerResumeRunUrl: (sessionId: string) => string;
|
|
43
|
+
export declare const internalSessionLifecycleStepControllerResumeRun: (sessionId: string, launchStepRequestDto: LaunchStepRequestDto, options?: RequestInit) => Promise<void>;
|
|
44
|
+
/**
|
|
45
|
+
* @summary Resume compensation — roll the session back to paused
|
|
46
|
+
*/
|
|
47
|
+
export declare const getInternalSessionLifecycleStepControllerResumeFailUrl: (sessionId: string) => string;
|
|
48
|
+
export declare const internalSessionLifecycleStepControllerResumeFail: (sessionId: string, launchStepRequestDto: LaunchStepRequestDto, options?: RequestInit) => Promise<void>;
|
|
49
|
+
/**
|
|
50
|
+
* @summary Hibernate step — snapshot, release worker, active → paused
|
|
51
|
+
*/
|
|
52
|
+
export declare const getInternalSessionLifecycleStepControllerHibernateRunUrl: (sessionId: string) => string;
|
|
53
|
+
export declare const internalSessionLifecycleStepControllerHibernateRun: (sessionId: string, launchStepRequestDto: LaunchStepRequestDto, options?: RequestInit) => Promise<void>;
|
|
54
|
+
/**
|
|
55
|
+
* @summary Hibernate compensation — force-pause a session whose snapshot failed after retries exhausted (worker permanently dead). Transitions active → paused without a new snapshot so the idle monitor stops retrying.
|
|
56
|
+
*/
|
|
57
|
+
export declare const getInternalSessionLifecycleStepControllerHibernateForcePauseUrl: (sessionId: string) => string;
|
|
58
|
+
export declare const internalSessionLifecycleStepControllerHibernateForcePause: (sessionId: string, launchStepRequestDto: LaunchStepRequestDto, options?: RequestInit) => Promise<void>;
|
|
59
|
+
/**
|
|
60
|
+
* Service-to-service endpoint fired by the session-lifecycle-reconcile Temporal Schedule. (Re)starts launch workflows for sessions stranded in creating/provisioning.
|
|
61
|
+
* @summary Run one session-lifecycle reconcile sweep
|
|
62
|
+
*/
|
|
63
|
+
export declare const getInternalSessionLifecycleReconcileControllerReconcileTickUrl: () => string;
|
|
64
|
+
export declare const internalSessionLifecycleReconcileControllerReconcileTick: (options?: RequestInit) => Promise<void>;
|
|
65
|
+
/**
|
|
66
|
+
* Service-to-service endpoint fired by the session-checkpoint Temporal Schedule. Snapshots every active session to blob storage for crash recovery; an all-sessions-failed sweep throws so the activity retries.
|
|
67
|
+
* @summary Run one session-checkpoint sweep
|
|
68
|
+
*/
|
|
69
|
+
export declare const getInternalSessionCheckpointControllerCheckpointTickUrl: () => string;
|
|
70
|
+
export declare const internalSessionCheckpointControllerCheckpointTick: (options?: RequestInit) => Promise<void>;
|
|
71
|
+
/**
|
|
72
|
+
* Service-to-service endpoint fired by the backfillSessionCompositionRefWorkflow once per batch. Scans up to `batchSize` pre-Phase-6 sessions, ensures a Composition exists in llm-registry-api per content-bucket, and stamps `composition_ref` on each session. Idempotent: the SQL UPDATE is guarded by `composition_ref IS NULL` so a concurrent tick is a no-op.
|
|
73
|
+
* @summary Run one batch of the session-composition-ref backfill
|
|
74
|
+
*/
|
|
75
|
+
export declare const getInternalBackfillsControllerRunCompositionRefBatchUrl: () => string;
|
|
76
|
+
export declare const internalBackfillsControllerRunCompositionRefBatch: (runBackfillBatchRequestDto: RunBackfillBatchRequestDto, options?: RequestInit) => Promise<RunBackfillBatchResponseDto>;
|
|
77
|
+
/**
|
|
78
|
+
* Service-to-service endpoint fired by the sweeperSandboxSessionWorkflow Temporal Schedule. Disposes every live sandbox session whose `sandboxExpiresAt` has elapsed.
|
|
79
|
+
* @summary Run one sandbox-session TTL sweep
|
|
80
|
+
*/
|
|
81
|
+
export declare const getInternalSweepersControllerSandboxSessionTickUrl: () => string;
|
|
82
|
+
export declare const internalSweepersControllerSandboxSessionTick: (options?: RequestInit) => Promise<SweeperTickResponseDto>;
|