@xemahq/agent-session-api-client 0.1.2 → 0.2.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/LICENSE +175 -201
- package/README.md +62 -0
- package/dist/custom-fetch.d.ts +1 -1
- package/dist/custom-fetch.js +1 -1
- package/dist/endpoints/output-surface-inspect/output-surface-inspect.d.ts +3 -3
- package/dist/endpoints/output-surface-inspect/output-surface-inspect.js +6 -6
- package/dist/endpoints/output-surfaces/output-surfaces.d.ts +8 -8
- package/dist/endpoints/output-surfaces/output-surfaces.js +21 -21
- package/dist/endpoints/sandbox-sessions/sandbox-sessions.d.ts +8 -8
- package/dist/endpoints/sandbox-sessions/sandbox-sessions.js +21 -21
- package/dist/endpoints/session-attachments/session-attachments.d.ts +4 -4
- package/dist/endpoints/session-attachments/session-attachments.js +9 -9
- package/dist/endpoints/session-blob-attachments/session-blob-attachments.d.ts +2 -2
- package/dist/endpoints/session-blob-attachments/session-blob-attachments.js +3 -3
- package/dist/endpoints/session-participants/session-participants.d.ts +5 -5
- package/dist/endpoints/session-participants/session-participants.js +12 -12
- package/dist/endpoints/sessions/sessions.d.ts +60 -50
- package/dist/endpoints/sessions/sessions.js +177 -143
- package/dist/endpoints/threads/threads.d.ts +9 -9
- package/dist/endpoints/threads/threads.js +24 -24
- package/dist/index.d.ts +0 -3
- package/dist/index.js +1 -4
- package/dist/models/addAttachmentDto.d.ts +2 -2
- package/dist/models/attachSkillDto.d.ts +1 -1
- package/dist/models/attachSkillDto.js +1 -1
- package/dist/models/attachmentClass.d.ts +1 -1
- package/dist/models/attachmentClass.js +1 -1
- package/dist/models/attachmentResponseDto.d.ts +3 -3
- package/dist/models/attachmentResponseDtoDataArrayEnvelope.d.ts +2 -2
- package/dist/models/attachmentResponseDtoDataEnvelope.d.ts +2 -2
- package/dist/models/attachmentUploadInitResponseDto.d.ts +2 -2
- package/dist/models/attachmentUploadInitResponseDtoDataEnvelope.d.ts +2 -2
- package/dist/models/attachmentUploadInitResponseDtoRequiredHeaders.d.ts +1 -1
- package/dist/models/attachmentUploadInitResponseDtoRequiredHeaders.js +1 -1
- package/dist/models/branchStrategy.d.ts +1 -1
- package/dist/models/branchStrategy.js +1 -1
- package/dist/models/buildImageResultDto.d.ts +1 -1
- package/dist/models/buildImageResultDto.js +1 -1
- package/dist/models/buildImageStartedResponseDto.d.ts +1 -1
- package/dist/models/buildImageStartedResponseDto.js +1 -1
- package/dist/models/buildImageStartedResponseDtoDataEnvelope.d.ts +2 -2
- package/dist/models/buildImageStatusResponseDto.d.ts +4 -4
- package/dist/models/buildImageStatusResponseDtoDataEnvelope.d.ts +2 -2
- package/dist/models/buildImageStatusResponseDtoFailureMessage.d.ts +1 -1
- package/dist/models/buildImageStatusResponseDtoFailureMessage.js +1 -1
- package/dist/models/buildImageStatusResponseDtoStatus.d.ts +1 -1
- package/dist/models/buildImageStatusResponseDtoStatus.js +1 -1
- package/dist/models/changeSessionInstructionsDto.d.ts +16 -0
- package/dist/models/changeSessionInstructionsDto.js +2 -0
- package/dist/models/changeSessionInstructionsDtoInstructions.d.ts +15 -0
- package/dist/models/changeSessionInstructionsDtoInstructions.js +9 -0
- package/dist/models/changeSessionModelDto.d.ts +2 -2
- package/dist/models/changeSessionModelDtoSelection.d.ts +1 -1
- package/dist/models/changeSessionModelDtoSelection.js +1 -1
- package/dist/models/changeSessionPermissionDto.d.ts +15 -0
- package/dist/models/changeSessionPermissionDto.js +2 -0
- package/dist/models/changeSessionPermissionDtoPermission.d.ts +14 -0
- package/dist/models/changeSessionPermissionDtoPermission.js +9 -0
- package/dist/models/changeSessionToolsDto.d.ts +3 -3
- package/dist/models/createSandboxSessionDto.d.ts +3 -3
- package/dist/models/createSessionDto.d.ts +44 -0
- package/dist/models/createSessionDto.js +2 -0
- package/dist/models/createSessionDtoCustomConfig.d.ts +13 -0
- package/dist/models/createSessionDtoCustomConfig.js +9 -0
- package/dist/models/createThreadDto.d.ts +1 -1
- package/dist/models/createThreadDto.js +1 -1
- package/dist/models/environmentDriftDetectedPayloadDto.d.ts +2 -2
- package/dist/models/environmentDriftEntryDto.d.ts +3 -3
- package/dist/models/environmentDriftEntryDtoAfter.d.ts +1 -1
- package/dist/models/environmentDriftEntryDtoAfter.js +1 -1
- package/dist/models/environmentDriftEntryDtoBefore.d.ts +1 -1
- package/dist/models/environmentDriftEntryDtoBefore.js +1 -1
- package/dist/models/errorDetailsDto.d.ts +2 -2
- package/dist/models/errorDetailsDtoDetails.d.ts +1 -1
- package/dist/models/errorDetailsDtoDetails.js +1 -1
- package/dist/models/errorPayloadDto.d.ts +2 -2
- package/dist/models/errorResponseDto.d.ts +2 -2
- package/dist/models/externalInviteDeliveryMode.d.ts +1 -1
- package/dist/models/externalInviteDeliveryMode.js +1 -1
- package/dist/models/gitCommitEntryDto.d.ts +1 -1
- package/dist/models/gitCommitEntryDto.js +1 -1
- package/dist/models/gitCommitEntryDtoDataArrayEnvelope.d.ts +2 -2
- package/dist/models/gitCommitResponseDto.d.ts +1 -1
- package/dist/models/gitCommitResponseDto.js +1 -1
- package/dist/models/gitCommitResponseDtoDataEnvelope.d.ts +2 -2
- package/dist/models/gitStatusResponseDto.d.ts +2 -2
- package/dist/models/gitStatusResponseDtoDataEnvelope.d.ts +2 -2
- package/dist/models/index.d.ts +8 -13
- package/dist/models/index.js +8 -13
- package/dist/models/initAttachmentUploadDto.d.ts +1 -1
- package/dist/models/initAttachmentUploadDto.js +1 -1
- package/dist/models/inspectStepResultDto.d.ts +4 -4
- package/dist/models/inspectStepResultDtoData.d.ts +1 -1
- package/dist/models/inspectStepResultDtoData.js +1 -1
- package/dist/models/inspectStepResultDtoKind.d.ts +1 -1
- package/dist/models/inspectStepResultDtoKind.js +1 -1
- package/dist/models/inspectStepResultDtoStatus.d.ts +1 -1
- package/dist/models/inspectStepResultDtoStatus.js +1 -1
- package/dist/models/invitableParticipantRole.d.ts +1 -1
- package/dist/models/invitableParticipantRole.js +1 -1
- package/dist/models/inviteExternalDto.d.ts +3 -3
- package/dist/models/inviteParticipantDto.d.ts +2 -2
- package/dist/models/invitedExternalParticipantResponseDto.d.ts +1 -1
- package/dist/models/invitedExternalParticipantResponseDto.js +1 -1
- package/dist/models/invitedExternalParticipantResponseDtoDataEnvelope.d.ts +2 -2
- package/dist/models/kBPushResponseDto.d.ts +1 -1
- package/dist/models/kBPushResponseDto.js +1 -1
- package/dist/models/kBPushResponseDtoDataEnvelope.d.ts +2 -2
- package/dist/models/kbMountsResponseDto.d.ts +2 -2
- package/dist/models/kbMountsResponseDtoDataEnvelope.d.ts +2 -2
- package/dist/models/kbPageMountDto.d.ts +1 -1
- package/dist/models/kbPageMountDto.js +1 -1
- package/dist/models/listSessionParticipantsResponseDto.d.ts +2 -2
- package/dist/models/listSessionParticipantsResponseDtoDataEnvelope.d.ts +2 -2
- package/dist/models/mergeCheckResponseDto.d.ts +1 -1
- package/dist/models/mergeCheckResponseDto.js +1 -1
- package/dist/models/mergeCheckResponseDtoDataEnvelope.d.ts +2 -2
- package/dist/models/messageResponseDto.d.ts +3 -3
- package/dist/models/messageResponseDtoMetadata.d.ts +1 -1
- package/dist/models/messageResponseDtoMetadata.js +1 -1
- package/dist/models/messageResponseDtoPaginatedEnvelope.d.ts +3 -3
- package/dist/models/outputSurfaceAppResponseDto.d.ts +3 -3
- package/dist/models/outputSurfaceAppResponseDtoDataArrayEnvelope.d.ts +2 -2
- package/dist/models/outputSurfaceAppResponseDtoDataEnvelope.d.ts +2 -2
- package/dist/models/outputSurfaceAppStatus.d.ts +1 -1
- package/dist/models/outputSurfaceAppStatus.js +1 -1
- package/dist/models/outputSurfaceControllerRestartParams.d.ts +2 -2
- package/dist/models/outputSurfaceControllerScanParams.d.ts +2 -2
- package/dist/models/outputSurfaceRemediationKindInput.d.ts +1 -1
- package/dist/models/outputSurfaceRemediationKindInput.js +1 -1
- package/dist/models/outputSurfaceRestartMode.d.ts +1 -1
- package/dist/models/outputSurfaceRestartMode.js +1 -1
- package/dist/models/paginationMeta.d.ts +1 -1
- package/dist/models/paginationMeta.js +1 -1
- package/dist/models/participantRole.d.ts +1 -1
- package/dist/models/participantRole.js +1 -1
- package/dist/models/participantSubjectKind.d.ts +1 -1
- package/dist/models/participantSubjectKind.js +1 -1
- package/dist/models/projectKind.d.ts +1 -1
- package/dist/models/projectKind.js +1 -1
- package/dist/models/providerEntryDto.d.ts +3 -3
- package/dist/models/providerEntryDtoKind.d.ts +1 -1
- package/dist/models/providerEntryDtoKind.js +1 -1
- package/dist/models/pullRequestResponseDto.d.ts +2 -2
- package/dist/models/pullRequestResponseDtoDataEnvelope.d.ts +2 -2
- package/dist/models/pullRequestResponseDtoPrUrl.d.ts +1 -1
- package/dist/models/pullRequestResponseDtoPrUrl.js +1 -1
- package/dist/models/pushDocumentEditDto.d.ts +1 -1
- package/dist/models/pushDocumentEditDto.js +1 -1
- package/dist/models/reasoningDeltaPayloadDto.d.ts +1 -1
- package/dist/models/reasoningDeltaPayloadDto.js +1 -1
- package/dist/models/referenceAttachmentClass.d.ts +1 -1
- package/dist/models/referenceAttachmentClass.js +1 -1
- package/dist/models/remediateOutputSurfaceDto.d.ts +2 -2
- package/dist/models/remediateOutputSurfaceResponseDto.d.ts +1 -1
- package/dist/models/remediateOutputSurfaceResponseDto.js +1 -1
- package/dist/models/remediateOutputSurfaceResponseDtoDataEnvelope.d.ts +2 -2
- package/dist/models/repoGitStatusDto.d.ts +2 -2
- package/dist/models/repoRole.d.ts +1 -1
- package/dist/models/repoRole.js +1 -1
- package/dist/models/reportInspectPresenceDto.d.ts +3 -3
- package/dist/models/reportInspectPresenceDtoKind.d.ts +1 -1
- package/dist/models/reportInspectPresenceDtoKind.js +1 -1
- package/dist/models/reportInspectPresenceDtoReason.d.ts +1 -1
- package/dist/models/reportInspectPresenceDtoReason.js +1 -1
- package/dist/models/reportInspectResultDto.d.ts +2 -2
- package/dist/models/resumeSessionDto.d.ts +1 -1
- package/dist/models/resumeSessionDto.js +1 -1
- package/dist/models/rotateTokenResponseDto.d.ts +1 -1
- package/dist/models/rotateTokenResponseDto.js +1 -1
- package/dist/models/rotateTokenResponseDtoDataEnvelope.d.ts +2 -2
- package/dist/models/runSandboxEvalTurnDto.d.ts +1 -1
- package/dist/models/runSandboxEvalTurnDto.js +1 -1
- package/dist/models/sandboxEvalTurnResultDto.d.ts +1 -1
- package/dist/models/sandboxEvalTurnResultDto.js +1 -1
- package/dist/models/sandboxEvalTurnResultDtoDataEnvelope.d.ts +2 -2
- package/dist/models/sandboxSessionsControllerDeleteToolMocksParams.d.ts +1 -1
- package/dist/models/sandboxSessionsControllerDeleteToolMocksParams.js +1 -1
- package/dist/models/sandboxToolMockDto.d.ts +1 -1
- package/dist/models/sandboxToolMockDto.js +1 -1
- package/dist/models/sandboxToolMocksResponseDto.d.ts +1 -1
- package/dist/models/sandboxToolMocksResponseDto.js +1 -1
- package/dist/models/sandboxToolMocksResponseDtoDataEnvelope.d.ts +2 -2
- package/dist/models/sessionAttachmentStatus.d.ts +1 -1
- package/dist/models/sessionAttachmentStatus.js +1 -1
- package/dist/models/sessionBlobAttachmentDto.d.ts +2 -2
- package/dist/models/sessionBlobAttachmentDtoDataArrayEnvelope.d.ts +2 -2
- package/dist/models/sessionBlobAttachmentDtoRequiredHeaders.d.ts +1 -1
- package/dist/models/sessionBlobAttachmentDtoRequiredHeaders.js +1 -1
- package/dist/models/sessionContextWindowSnapshotDto.d.ts +1 -1
- package/dist/models/sessionContextWindowSnapshotDto.js +1 -1
- package/dist/models/sessionDebugCompositionNodeDto.d.ts +1 -1
- package/dist/models/sessionDebugCompositionNodeDto.js +1 -1
- package/dist/models/sessionDebugInfoDto.d.ts +7 -7
- package/dist/models/sessionDebugInfoDtoDataEnvelope.d.ts +2 -2
- package/dist/models/sessionDebugInfoDtoMountPlan.d.ts +1 -1
- package/dist/models/sessionDebugInfoDtoMountPlan.js +1 -1
- package/dist/models/sessionDebugModelDecisionDto.d.ts +1 -1
- package/dist/models/sessionDebugModelDecisionDto.js +1 -1
- package/dist/models/sessionDebugSkillDto.d.ts +2 -2
- package/dist/models/sessionDebugSkillDtoSnapshot.d.ts +1 -1
- package/dist/models/sessionDebugSkillDtoSnapshot.js +1 -1
- package/dist/models/sessionKind.d.ts +1 -1
- package/dist/models/sessionKind.js +1 -1
- package/dist/models/sessionLayer.d.ts +17 -0
- package/dist/models/sessionLayer.js +16 -0
- package/dist/models/sessionLockfileDto.d.ts +7 -7
- package/dist/models/sessionLockfileDtoAgents.d.ts +1 -1
- package/dist/models/sessionLockfileDtoAgents.js +1 -1
- package/dist/models/sessionLockfileDtoBiomes.d.ts +1 -1
- package/dist/models/sessionLockfileDtoBiomes.js +1 -1
- package/dist/models/sessionLockfileDtoCapabilities.d.ts +1 -1
- package/dist/models/sessionLockfileDtoCapabilities.js +1 -1
- package/dist/models/sessionLockfileDtoDataEnvelope.d.ts +2 -2
- package/dist/models/sessionLockfileDtoDeliverableSpecs.d.ts +1 -1
- package/dist/models/sessionLockfileDtoDeliverableSpecs.js +1 -1
- package/dist/models/sessionLockfileDtoSkills.d.ts +1 -1
- package/dist/models/sessionLockfileDtoSkills.js +1 -1
- package/dist/models/sessionLockfileDtoWorkflows.d.ts +1 -1
- package/dist/models/sessionLockfileDtoWorkflows.js +1 -1
- package/dist/models/sessionMessageRole.d.ts +1 -1
- package/dist/models/sessionMessageRole.js +1 -1
- package/dist/models/sessionParticipantDto.d.ts +3 -3
- package/dist/models/sessionParticipantDtoDataEnvelope.d.ts +2 -2
- package/dist/models/sessionPauseReason.d.ts +1 -1
- package/dist/models/sessionPauseReason.js +1 -1
- package/dist/models/sessionProvisioningPhase.d.ts +1 -1
- package/dist/models/sessionProvisioningPhase.js +1 -1
- package/dist/models/sessionResponseDto.d.ts +13 -13
- package/dist/models/sessionResponseDtoDataEnvelope.d.ts +2 -2
- package/dist/models/sessionResponseDtoFailureMetaJson.d.ts +1 -1
- package/dist/models/sessionResponseDtoFailureMetaJson.js +1 -1
- package/dist/models/sessionResponseDtoHandoffOutput.d.ts +1 -1
- package/dist/models/sessionResponseDtoHandoffOutput.js +1 -1
- package/dist/models/sessionResponseDtoModelSelection.d.ts +1 -1
- package/dist/models/sessionResponseDtoModelSelection.js +1 -1
- package/dist/models/sessionResponseDtoPaginatedEnvelope.d.ts +3 -3
- package/dist/models/sessionResponseDtoToolSelectionItem.d.ts +1 -1
- package/dist/models/sessionResponseDtoToolSelectionItem.js +1 -1
- package/dist/models/sessionStatus.d.ts +1 -1
- package/dist/models/sessionStatus.js +1 -1
- package/dist/models/sessionTimelineEntryDto.d.ts +3 -3
- package/dist/models/sessionTimelineEntryDtoEventType.d.ts +1 -1
- package/dist/models/sessionTimelineEntryDtoEventType.js +1 -1
- package/dist/models/sessionTimelineEntryDtoPayload.d.ts +5 -5
- package/dist/models/sessionTimelinePageDto.d.ts +2 -2
- package/dist/models/sessionTimelinePageDtoDataEnvelope.d.ts +2 -2
- package/dist/models/sessionTokenUsageDto.d.ts +1 -1
- package/dist/models/sessionTokenUsageDto.js +1 -1
- package/dist/models/sessionsControllerGetCommitHistoryParams.d.ts +1 -1
- package/dist/models/sessionsControllerGetCommitHistoryParams.js +1 -1
- package/dist/models/sessionsControllerGetGitDiffParams.d.ts +1 -1
- package/dist/models/sessionsControllerGetGitDiffParams.js +1 -1
- package/dist/models/sessionsControllerListFilesParams.d.ts +1 -1
- package/dist/models/sessionsControllerListFilesParams.js +1 -1
- package/dist/models/sessionsControllerListParams.d.ts +1 -1
- package/dist/models/sessionsControllerListParams.js +1 -1
- package/dist/models/sessionsControllerListTemplatesParams.d.ts +1 -1
- package/dist/models/sessionsControllerListTemplatesParams.js +1 -1
- package/dist/models/sessionsControllerMergeCheckParams.d.ts +1 -1
- package/dist/models/sessionsControllerMergeCheckParams.js +1 -1
- package/dist/models/sessionsControllerStreamEventsParams.d.ts +1 -1
- package/dist/models/sessionsControllerStreamEventsParams.js +1 -1
- package/dist/models/setSandboxToolMocksDto.d.ts +2 -2
- package/dist/models/shareAccessLevel.d.ts +1 -1
- package/dist/models/shareAccessLevel.js +1 -1
- package/dist/models/shareResponseDto.d.ts +3 -3
- package/dist/models/shareResponseDtoDataEnvelope.d.ts +2 -2
- package/dist/models/shareResponseDtoExpiresAt.d.ts +1 -1
- package/dist/models/shareResponseDtoExpiresAt.js +1 -1
- package/dist/models/startBuildImageDto.d.ts +1 -1
- package/dist/models/startBuildImageDto.js +1 -1
- package/dist/models/templateResponseDto.d.ts +6 -6
- package/dist/models/templateResponseDtoBudgetLimit.d.ts +1 -1
- package/dist/models/templateResponseDtoBudgetLimit.js +1 -1
- package/dist/models/templateResponseDtoCustomConfig.d.ts +1 -1
- package/dist/models/templateResponseDtoCustomConfig.js +1 -1
- package/dist/models/templateResponseDtoDataEnvelope.d.ts +2 -2
- package/dist/models/templateResponseDtoDescription.d.ts +1 -1
- package/dist/models/templateResponseDtoDescription.js +1 -1
- package/dist/models/templateResponseDtoPaginatedEnvelope.d.ts +3 -3
- package/dist/models/templateResponseDtoRepositoryId.d.ts +1 -1
- package/dist/models/templateResponseDtoRepositoryId.js +1 -1
- package/dist/models/textDeltaPayloadDto.d.ts +1 -1
- package/dist/models/textDeltaPayloadDto.js +1 -1
- package/dist/models/threadResponseDto.d.ts +4 -4
- package/dist/models/threadResponseDtoDataArrayEnvelope.d.ts +2 -2
- package/dist/models/threadResponseDtoDataEnvelope.d.ts +2 -2
- package/dist/models/threadResponseDtoModelSelection.d.ts +1 -1
- package/dist/models/threadResponseDtoModelSelection.js +1 -1
- package/dist/models/threadStatus.d.ts +1 -1
- package/dist/models/threadStatus.js +1 -1
- package/dist/models/threadsControllerGetMessagesParams.d.ts +1 -1
- package/dist/models/threadsControllerGetMessagesParams.js +1 -1
- package/dist/models/threadsControllerGetTimelineParams.d.ts +1 -1
- package/dist/models/threadsControllerGetTimelineParams.js +1 -1
- package/dist/models/toolCallPayloadDto.d.ts +2 -2
- package/dist/models/toolCallPayloadDtoStatus.d.ts +1 -1
- package/dist/models/toolCallPayloadDtoStatus.js +1 -1
- package/dist/models/toolEntryDto.d.ts +3 -3
- package/dist/models/toolEntryDtoKind.d.ts +1 -1
- package/dist/models/toolEntryDtoKind.js +1 -1
- package/dist/models/toolProviderKind.d.ts +1 -1
- package/dist/models/toolProviderKind.js +1 -1
- package/dist/models/toolUsageEntryDto.d.ts +1 -1
- package/dist/models/toolUsageEntryDto.js +1 -1
- package/dist/models/toolUsageResponseDto.d.ts +2 -2
- package/dist/models/toolUsageResponseDtoDataEnvelope.d.ts +2 -2
- package/dist/models/turnState.d.ts +1 -1
- package/dist/models/turnState.js +1 -1
- package/dist/models/updateKbMountsDto.d.ts +2 -2
- package/dist/models/updateThreadDto.d.ts +2 -2
- package/dist/models/usageResponseDto.d.ts +3 -3
- package/dist/models/usageResponseDtoBudgetLimit.d.ts +1 -1
- package/dist/models/usageResponseDtoBudgetLimit.js +1 -1
- package/dist/models/usageResponseDtoBudgetRatio.d.ts +1 -1
- package/dist/models/usageResponseDtoBudgetRatio.js +1 -1
- package/dist/models/usageResponseDtoDataEnvelope.d.ts +2 -2
- package/dist/models/workerRuntimeKind.d.ts +17 -0
- package/dist/models/workerRuntimeKind.js +16 -0
- package/package.json +12 -2
|
@@ -1,25 +1,24 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.buildImageControllerStatus = exports.getBuildImageControllerStatusUrl = exports.buildImageControllerStart = exports.getBuildImageControllerStartUrl = exports.sessionsControllerCreateShare = exports.getSessionsControllerCreateShareUrl = exports.sessionsControllerCloneTemplate = exports.getSessionsControllerCloneTemplateUrl = exports.sessionsControllerDeleteTemplate = exports.getSessionsControllerDeleteTemplateUrl = exports.sessionsControllerUpdateTemplate = exports.getSessionsControllerUpdateTemplateUrl = exports.sessionsControllerGetTemplate = exports.getSessionsControllerGetTemplateUrl = exports.sessionsControllerListTemplates = exports.getSessionsControllerListTemplatesUrl = exports.sessionsControllerCreateTemplate = exports.getSessionsControllerCreateTemplateUrl = exports.sessionsControllerPushToKB = exports.getSessionsControllerPushToKBUrl = exports.sessionsControllerMergeCheck = exports.getSessionsControllerMergeCheckUrl = exports.sessionsControllerGetCommitHistory = exports.getSessionsControllerGetCommitHistoryUrl = exports.sessionsControllerCreatePullRequest = exports.getSessionsControllerCreatePullRequestUrl = exports.sessionsControllerGitPush = exports.getSessionsControllerGitPushUrl = exports.sessionsControllerGitCommit = exports.getSessionsControllerGitCommitUrl = exports.sessionsControllerGetGitDiff = exports.getSessionsControllerGetGitDiffUrl = exports.sessionsControllerGetGitStatus = exports.getSessionsControllerGetGitStatusUrl = exports.sessionsControllerCreateBranch = exports.getSessionsControllerCreateBranchUrl = exports.sessionsControllerGetToolUsage = exports.getSessionsControllerGetToolUsageUrl = exports.sessionsControllerGetUsage = exports.getSessionsControllerGetUsageUrl = exports.sessionsControllerCompleteAttachmentUpload = exports.getSessionsControllerCompleteAttachmentUploadUrl = exports.sessionsControllerInitAttachmentUpload = exports.getSessionsControllerInitAttachmentUploadUrl = void 0;
|
|
3
|
+
exports.sessionsControllerAddAttachment = exports.getSessionsControllerAddAttachmentUrl = exports.sessionsControllerArchive = exports.getSessionsControllerArchiveUrl = exports.sessionsControllerCompact = exports.getSessionsControllerCompactUrl = exports.sessionsControllerResume = exports.getSessionsControllerResumeUrl = exports.sessionsControllerPause = exports.getSessionsControllerPauseUrl = exports.sessionsControllerUpdateKbMounts = exports.getSessionsControllerUpdateKbMountsUrl = exports.sessionsControllerListKbMounts = exports.getSessionsControllerListKbMountsUrl = exports.sessionsControllerChangePermission = exports.getSessionsControllerChangePermissionUrl = exports.sessionsControllerChangeInstructions = exports.getSessionsControllerChangeInstructionsUrl = exports.sessionsControllerChangeTools = exports.getSessionsControllerChangeToolsUrl = exports.sessionsControllerChangeModel = exports.getSessionsControllerChangeModelUrl = exports.sessionsControllerResyncDocument = exports.getSessionsControllerResyncDocumentUrl = exports.sessionsControllerPushDocumentEdit = exports.getSessionsControllerPushDocumentEditUrl = exports.sessionsControllerReadFile = exports.getSessionsControllerReadFileUrl = exports.sessionsControllerListFiles = exports.getSessionsControllerListFilesUrl = exports.sessionsControllerStreamEvents = exports.getSessionsControllerStreamEventsUrl = exports.sessionsControllerRejectQuestion = exports.getSessionsControllerRejectQuestionUrl = exports.sessionsControllerReplyToQuestion = exports.getSessionsControllerReplyToQuestionUrl = exports.sessionsControllerTerminateByPipelineRunId = exports.getSessionsControllerTerminateByPipelineRunIdUrl = exports.sessionsControllerGetLockfile = exports.getSessionsControllerGetLockfileUrl = exports.sessionsControllerTerminate = exports.getSessionsControllerTerminateUrl = exports.sessionsControllerGetById = exports.getSessionsControllerGetByIdUrl = exports.sessionsControllerFork = exports.getSessionsControllerForkUrl = exports.sessionsControllerList = exports.getSessionsControllerListUrl = exports.sessionsControllerCreate = exports.getSessionsControllerCreateUrl = void 0;
|
|
4
|
+
exports.buildImageControllerStatus = exports.getBuildImageControllerStatusUrl = exports.buildImageControllerStart = exports.getBuildImageControllerStartUrl = exports.sessionsControllerCreateShare = exports.getSessionsControllerCreateShareUrl = exports.sessionsControllerCloneTemplate = exports.getSessionsControllerCloneTemplateUrl = exports.sessionsControllerDeleteTemplate = exports.getSessionsControllerDeleteTemplateUrl = exports.sessionsControllerUpdateTemplate = exports.getSessionsControllerUpdateTemplateUrl = exports.sessionsControllerGetTemplate = exports.getSessionsControllerGetTemplateUrl = exports.sessionsControllerListTemplates = exports.getSessionsControllerListTemplatesUrl = exports.sessionsControllerCreateTemplate = exports.getSessionsControllerCreateTemplateUrl = exports.sessionsControllerPushToKB = exports.getSessionsControllerPushToKBUrl = exports.sessionsControllerMergeCheck = exports.getSessionsControllerMergeCheckUrl = exports.sessionsControllerGetCommitHistory = exports.getSessionsControllerGetCommitHistoryUrl = exports.sessionsControllerCreatePullRequest = exports.getSessionsControllerCreatePullRequestUrl = exports.sessionsControllerGitPush = exports.getSessionsControllerGitPushUrl = exports.sessionsControllerGitCommit = exports.getSessionsControllerGitCommitUrl = exports.sessionsControllerGetGitDiff = exports.getSessionsControllerGetGitDiffUrl = exports.sessionsControllerGetGitStatus = exports.getSessionsControllerGetGitStatusUrl = exports.sessionsControllerCreateBranch = exports.getSessionsControllerCreateBranchUrl = exports.sessionsControllerGetToolUsage = exports.getSessionsControllerGetToolUsageUrl = exports.sessionsControllerGetUsage = exports.getSessionsControllerGetUsageUrl = exports.sessionsControllerCompleteAttachmentUpload = exports.getSessionsControllerCompleteAttachmentUploadUrl = exports.sessionsControllerInitAttachmentUpload = exports.getSessionsControllerInitAttachmentUploadUrl = exports.sessionsControllerRemoveAttachment = exports.getSessionsControllerRemoveAttachmentUrl = exports.sessionsControllerListAttachments = exports.getSessionsControllerListAttachmentsUrl = void 0;
|
|
5
5
|
const custom_fetch_1 = require("../../custom-fetch");
|
|
6
|
-
/**
|
|
7
|
-
* @summary Create a new agent session
|
|
8
|
-
*/
|
|
9
6
|
const getSessionsControllerCreateUrl = () => {
|
|
10
7
|
return `/sessions`;
|
|
11
8
|
};
|
|
12
9
|
exports.getSessionsControllerCreateUrl = getSessionsControllerCreateUrl;
|
|
13
|
-
|
|
10
|
+
/**
|
|
11
|
+
* @summary Create a new agent session
|
|
12
|
+
*/
|
|
13
|
+
const sessionsControllerCreate = async (createSessionDto, options) => {
|
|
14
14
|
return (0, custom_fetch_1.customFetch)((0, exports.getSessionsControllerCreateUrl)(), {
|
|
15
15
|
...options,
|
|
16
|
-
method: 'POST'
|
|
16
|
+
method: 'POST',
|
|
17
|
+
headers: { 'Content-Type': 'application/json', ...options?.headers },
|
|
18
|
+
body: JSON.stringify(createSessionDto)
|
|
17
19
|
});
|
|
18
20
|
};
|
|
19
21
|
exports.sessionsControllerCreate = sessionsControllerCreate;
|
|
20
|
-
/**
|
|
21
|
-
* @summary List sessions with pagination and filters
|
|
22
|
-
*/
|
|
23
22
|
const getSessionsControllerListUrl = (params) => {
|
|
24
23
|
const normalizedParams = new URLSearchParams();
|
|
25
24
|
Object.entries(params || {}).forEach(([key, value]) => {
|
|
@@ -43,6 +42,9 @@ const getSessionsControllerListUrl = (params) => {
|
|
|
43
42
|
return stringifiedParams.length > 0 ? `/sessions?${stringifiedParams}` : `/sessions`;
|
|
44
43
|
};
|
|
45
44
|
exports.getSessionsControllerListUrl = getSessionsControllerListUrl;
|
|
45
|
+
/**
|
|
46
|
+
* @summary List sessions with pagination and filters
|
|
47
|
+
*/
|
|
46
48
|
const sessionsControllerList = async (params, options) => {
|
|
47
49
|
return (0, custom_fetch_1.customFetch)((0, exports.getSessionsControllerListUrl)(params), {
|
|
48
50
|
...options,
|
|
@@ -50,13 +52,13 @@ const sessionsControllerList = async (params, options) => {
|
|
|
50
52
|
});
|
|
51
53
|
};
|
|
52
54
|
exports.sessionsControllerList = sessionsControllerList;
|
|
53
|
-
/**
|
|
54
|
-
* @summary Fork an existing session. Creates a new session that inherits the parent's profile, model, repository and branch strategy, then provisions a fresh worker — no chat history is copied. Use this to explore a parallel direction without disturbing the parent.
|
|
55
|
-
*/
|
|
56
55
|
const getSessionsControllerForkUrl = (id) => {
|
|
57
56
|
return `/sessions/${id}/fork`;
|
|
58
57
|
};
|
|
59
58
|
exports.getSessionsControllerForkUrl = getSessionsControllerForkUrl;
|
|
59
|
+
/**
|
|
60
|
+
* @summary Fork an existing session. Creates a new session that inherits the parent's profile, model, repository and branch strategy, then provisions a fresh worker — no chat history is copied. Use this to explore a parallel direction without disturbing the parent.
|
|
61
|
+
*/
|
|
60
62
|
const sessionsControllerFork = async (id, options) => {
|
|
61
63
|
return (0, custom_fetch_1.customFetch)((0, exports.getSessionsControllerForkUrl)(id), {
|
|
62
64
|
...options,
|
|
@@ -64,13 +66,13 @@ const sessionsControllerFork = async (id, options) => {
|
|
|
64
66
|
});
|
|
65
67
|
};
|
|
66
68
|
exports.sessionsControllerFork = sessionsControllerFork;
|
|
67
|
-
/**
|
|
68
|
-
* @summary Get session detail
|
|
69
|
-
*/
|
|
70
69
|
const getSessionsControllerGetByIdUrl = (id) => {
|
|
71
70
|
return `/sessions/${id}`;
|
|
72
71
|
};
|
|
73
72
|
exports.getSessionsControllerGetByIdUrl = getSessionsControllerGetByIdUrl;
|
|
73
|
+
/**
|
|
74
|
+
* @summary Get session detail
|
|
75
|
+
*/
|
|
74
76
|
const sessionsControllerGetById = async (id, options) => {
|
|
75
77
|
return (0, custom_fetch_1.customFetch)((0, exports.getSessionsControllerGetByIdUrl)(id), {
|
|
76
78
|
...options,
|
|
@@ -78,13 +80,13 @@ const sessionsControllerGetById = async (id, options) => {
|
|
|
78
80
|
});
|
|
79
81
|
};
|
|
80
82
|
exports.sessionsControllerGetById = sessionsControllerGetById;
|
|
81
|
-
/**
|
|
82
|
-
* @summary Terminate and archive a session
|
|
83
|
-
*/
|
|
84
83
|
const getSessionsControllerTerminateUrl = (id) => {
|
|
85
84
|
return `/sessions/${id}`;
|
|
86
85
|
};
|
|
87
86
|
exports.getSessionsControllerTerminateUrl = getSessionsControllerTerminateUrl;
|
|
87
|
+
/**
|
|
88
|
+
* @summary Terminate and archive a session
|
|
89
|
+
*/
|
|
88
90
|
const sessionsControllerTerminate = async (id, options) => {
|
|
89
91
|
return (0, custom_fetch_1.customFetch)((0, exports.getSessionsControllerTerminateUrl)(id), {
|
|
90
92
|
...options,
|
|
@@ -92,13 +94,13 @@ const sessionsControllerTerminate = async (id, options) => {
|
|
|
92
94
|
});
|
|
93
95
|
};
|
|
94
96
|
exports.sessionsControllerTerminate = sessionsControllerTerminate;
|
|
95
|
-
/**
|
|
96
|
-
* @summary Get the pinned AppLockfile minted at session create time (plan §10.4 / §17.9 item 3). Returns 404 for sessions created before the lockfile column was introduced.
|
|
97
|
-
*/
|
|
98
97
|
const getSessionsControllerGetLockfileUrl = (id) => {
|
|
99
98
|
return `/sessions/${id}/lockfile`;
|
|
100
99
|
};
|
|
101
100
|
exports.getSessionsControllerGetLockfileUrl = getSessionsControllerGetLockfileUrl;
|
|
101
|
+
/**
|
|
102
|
+
* @summary Get the pinned AppLockfile minted at session create time (plan §10.4 / §17.9 item 3). Returns 404 for sessions created before the lockfile column was introduced.
|
|
103
|
+
*/
|
|
102
104
|
const sessionsControllerGetLockfile = async (id, options) => {
|
|
103
105
|
return (0, custom_fetch_1.customFetch)((0, exports.getSessionsControllerGetLockfileUrl)(id), {
|
|
104
106
|
...options,
|
|
@@ -106,13 +108,13 @@ const sessionsControllerGetLockfile = async (id, options) => {
|
|
|
106
108
|
});
|
|
107
109
|
};
|
|
108
110
|
exports.sessionsControllerGetLockfile = sessionsControllerGetLockfile;
|
|
109
|
-
/**
|
|
110
|
-
* @summary Terminate all non-terminal sessions tied to a pipeline run. Intended for service-to-service calls (e.g. work-orchestrator stopPipeline) that need to release OpenCode workers held by agent sessions spawned inside a run the user has just halted.
|
|
111
|
-
*/
|
|
112
111
|
const getSessionsControllerTerminateByPipelineRunIdUrl = (pipelineRunId) => {
|
|
113
112
|
return `/sessions/terminate-by-pipeline-run/${pipelineRunId}`;
|
|
114
113
|
};
|
|
115
114
|
exports.getSessionsControllerTerminateByPipelineRunIdUrl = getSessionsControllerTerminateByPipelineRunIdUrl;
|
|
115
|
+
/**
|
|
116
|
+
* @summary Terminate all non-terminal sessions tied to a pipeline run. Intended for service-to-service calls (e.g. work-orchestrator stopPipeline) that need to release OpenCode workers held by agent sessions spawned inside a run the user has just halted.
|
|
117
|
+
*/
|
|
116
118
|
const sessionsControllerTerminateByPipelineRunId = async (pipelineRunId, options) => {
|
|
117
119
|
return (0, custom_fetch_1.customFetch)((0, exports.getSessionsControllerTerminateByPipelineRunIdUrl)(pipelineRunId), {
|
|
118
120
|
...options,
|
|
@@ -120,13 +122,13 @@ const sessionsControllerTerminateByPipelineRunId = async (pipelineRunId, options
|
|
|
120
122
|
});
|
|
121
123
|
};
|
|
122
124
|
exports.sessionsControllerTerminateByPipelineRunId = sessionsControllerTerminateByPipelineRunId;
|
|
123
|
-
/**
|
|
124
|
-
* @summary Reply to a question posed by the agent during a turn
|
|
125
|
-
*/
|
|
126
125
|
const getSessionsControllerReplyToQuestionUrl = (id, requestId) => {
|
|
127
126
|
return `/sessions/${id}/question/${requestId}/reply`;
|
|
128
127
|
};
|
|
129
128
|
exports.getSessionsControllerReplyToQuestionUrl = getSessionsControllerReplyToQuestionUrl;
|
|
129
|
+
/**
|
|
130
|
+
* @summary Reply to a question posed by the agent during a turn
|
|
131
|
+
*/
|
|
130
132
|
const sessionsControllerReplyToQuestion = async (id, requestId, options) => {
|
|
131
133
|
return (0, custom_fetch_1.customFetch)((0, exports.getSessionsControllerReplyToQuestionUrl)(id, requestId), {
|
|
132
134
|
...options,
|
|
@@ -134,13 +136,13 @@ const sessionsControllerReplyToQuestion = async (id, requestId, options) => {
|
|
|
134
136
|
});
|
|
135
137
|
};
|
|
136
138
|
exports.sessionsControllerReplyToQuestion = sessionsControllerReplyToQuestion;
|
|
137
|
-
/**
|
|
138
|
-
* @summary Reject/dismiss a question posed by the agent during a turn
|
|
139
|
-
*/
|
|
140
139
|
const getSessionsControllerRejectQuestionUrl = (id, requestId) => {
|
|
141
140
|
return `/sessions/${id}/question/${requestId}/reject`;
|
|
142
141
|
};
|
|
143
142
|
exports.getSessionsControllerRejectQuestionUrl = getSessionsControllerRejectQuestionUrl;
|
|
143
|
+
/**
|
|
144
|
+
* @summary Reject/dismiss a question posed by the agent during a turn
|
|
145
|
+
*/
|
|
144
146
|
const sessionsControllerRejectQuestion = async (id, requestId, options) => {
|
|
145
147
|
return (0, custom_fetch_1.customFetch)((0, exports.getSessionsControllerRejectQuestionUrl)(id, requestId), {
|
|
146
148
|
...options,
|
|
@@ -148,9 +150,6 @@ const sessionsControllerRejectQuestion = async (id, requestId, options) => {
|
|
|
148
150
|
});
|
|
149
151
|
};
|
|
150
152
|
exports.sessionsControllerRejectQuestion = sessionsControllerRejectQuestion;
|
|
151
|
-
/**
|
|
152
|
-
* @summary Live SSE stream of session events — backlog from afterSequence, then live tail. Same wire shape as /timeline; reuse a single mapper on the FE.
|
|
153
|
-
*/
|
|
154
153
|
const getSessionsControllerStreamEventsUrl = (id, params) => {
|
|
155
154
|
const normalizedParams = new URLSearchParams();
|
|
156
155
|
Object.entries(params || {}).forEach(([key, value]) => {
|
|
@@ -174,6 +173,9 @@ const getSessionsControllerStreamEventsUrl = (id, params) => {
|
|
|
174
173
|
return stringifiedParams.length > 0 ? `/sessions/${id}/events/stream?${stringifiedParams}` : `/sessions/${id}/events/stream`;
|
|
175
174
|
};
|
|
176
175
|
exports.getSessionsControllerStreamEventsUrl = getSessionsControllerStreamEventsUrl;
|
|
176
|
+
/**
|
|
177
|
+
* @summary Live SSE stream of session events — backlog from afterSequence, then live tail. Same wire shape as /timeline; reuse a single mapper on the FE.
|
|
178
|
+
*/
|
|
177
179
|
const sessionsControllerStreamEvents = async (id, params, options) => {
|
|
178
180
|
return (0, custom_fetch_1.customFetch)((0, exports.getSessionsControllerStreamEventsUrl)(id, params), {
|
|
179
181
|
...options,
|
|
@@ -181,9 +183,6 @@ const sessionsControllerStreamEvents = async (id, params, options) => {
|
|
|
181
183
|
});
|
|
182
184
|
};
|
|
183
185
|
exports.sessionsControllerStreamEvents = sessionsControllerStreamEvents;
|
|
184
|
-
/**
|
|
185
|
-
* @summary Browse workspace file tree (scoped proxy with security boundary)
|
|
186
|
-
*/
|
|
187
186
|
const getSessionsControllerListFilesUrl = (id, params) => {
|
|
188
187
|
const normalizedParams = new URLSearchParams();
|
|
189
188
|
Object.entries(params || {}).forEach(([key, value]) => {
|
|
@@ -207,6 +206,9 @@ const getSessionsControllerListFilesUrl = (id, params) => {
|
|
|
207
206
|
return stringifiedParams.length > 0 ? `/sessions/${id}/files?${stringifiedParams}` : `/sessions/${id}/files`;
|
|
208
207
|
};
|
|
209
208
|
exports.getSessionsControllerListFilesUrl = getSessionsControllerListFilesUrl;
|
|
209
|
+
/**
|
|
210
|
+
* @summary Browse workspace file tree (scoped proxy with security boundary)
|
|
211
|
+
*/
|
|
210
212
|
const sessionsControllerListFiles = async (id, params, options) => {
|
|
211
213
|
return (0, custom_fetch_1.customFetch)((0, exports.getSessionsControllerListFilesUrl)(id, params), {
|
|
212
214
|
...options,
|
|
@@ -214,13 +216,13 @@ const sessionsControllerListFiles = async (id, params, options) => {
|
|
|
214
216
|
});
|
|
215
217
|
};
|
|
216
218
|
exports.sessionsControllerListFiles = sessionsControllerListFiles;
|
|
217
|
-
/**
|
|
218
|
-
* @summary Read file content from workspace (scoped proxy, deny list enforced, 1MB limit)
|
|
219
|
-
*/
|
|
220
219
|
const getSessionsControllerReadFileUrl = (id, filePath) => {
|
|
221
220
|
return `/sessions/${id}/files/${filePath}`;
|
|
222
221
|
};
|
|
223
222
|
exports.getSessionsControllerReadFileUrl = getSessionsControllerReadFileUrl;
|
|
223
|
+
/**
|
|
224
|
+
* @summary Read file content from workspace (scoped proxy, deny list enforced, 1MB limit)
|
|
225
|
+
*/
|
|
224
226
|
const sessionsControllerReadFile = async (id, filePath, options) => {
|
|
225
227
|
return (0, custom_fetch_1.customFetch)((0, exports.getSessionsControllerReadFileUrl)(id, filePath), {
|
|
226
228
|
...options,
|
|
@@ -228,13 +230,13 @@ const sessionsControllerReadFile = async (id, filePath, options) => {
|
|
|
228
230
|
});
|
|
229
231
|
};
|
|
230
232
|
exports.sessionsControllerReadFile = sessionsControllerReadFile;
|
|
231
|
-
/**
|
|
232
|
-
* @summary Document Buddy up-channel — stream a user editor edit into the document working file. The new base content is 3-way merged against the agent's working copy: the user edit folds into the accepted base, non-colliding agent suggestions survive, and agent hunks on the same lines are marked STALE (the user always wins). No turn gate.
|
|
233
|
-
*/
|
|
234
233
|
const getSessionsControllerPushDocumentEditUrl = (id) => {
|
|
235
234
|
return `/sessions/${id}/document-edit`;
|
|
236
235
|
};
|
|
237
236
|
exports.getSessionsControllerPushDocumentEditUrl = getSessionsControllerPushDocumentEditUrl;
|
|
237
|
+
/**
|
|
238
|
+
* @summary Document Buddy up-channel — stream a user editor edit into the document working file. The new base content is 3-way merged against the agent's working copy: the user edit folds into the accepted base, non-colliding agent suggestions survive, and agent hunks on the same lines are marked STALE (the user always wins). No turn gate.
|
|
239
|
+
*/
|
|
238
240
|
const sessionsControllerPushDocumentEdit = async (id, pushDocumentEditDto, options) => {
|
|
239
241
|
return (0, custom_fetch_1.customFetch)((0, exports.getSessionsControllerPushDocumentEditUrl)(id), {
|
|
240
242
|
...options,
|
|
@@ -244,13 +246,13 @@ const sessionsControllerPushDocumentEdit = async (id, pushDocumentEditDto, optio
|
|
|
244
246
|
});
|
|
245
247
|
};
|
|
246
248
|
exports.sessionsControllerPushDocumentEdit = sessionsControllerPushDocumentEdit;
|
|
247
|
-
/**
|
|
248
|
-
* @summary Document Buddy — re-materialize the worker's document working file from knowledge-base-api after a patch decision (accept / reject). The frontend calls this best-effort once a decision succeeds so a discarded hunk's text actually leaves the worker file. A paused session returns `resynced: false` — its file re-materializes on resume.
|
|
249
|
-
*/
|
|
250
249
|
const getSessionsControllerResyncDocumentUrl = (id) => {
|
|
251
250
|
return `/sessions/${id}/document-resync`;
|
|
252
251
|
};
|
|
253
252
|
exports.getSessionsControllerResyncDocumentUrl = getSessionsControllerResyncDocumentUrl;
|
|
253
|
+
/**
|
|
254
|
+
* @summary Document Buddy — re-materialize the worker's document working file from knowledge-base-api after a patch decision (accept / reject). The frontend calls this best-effort once a decision succeeds so a discarded hunk's text actually leaves the worker file. A paused session returns `resynced: false` — its file re-materializes on resume.
|
|
255
|
+
*/
|
|
254
256
|
const sessionsControllerResyncDocument = async (id, options) => {
|
|
255
257
|
return (0, custom_fetch_1.customFetch)((0, exports.getSessionsControllerResyncDocumentUrl)(id), {
|
|
256
258
|
...options,
|
|
@@ -258,13 +260,13 @@ const sessionsControllerResyncDocument = async (id, options) => {
|
|
|
258
260
|
});
|
|
259
261
|
};
|
|
260
262
|
exports.sessionsControllerResyncDocument = sessionsControllerResyncDocument;
|
|
261
|
-
/**
|
|
262
|
-
* @summary Switch a session's model/provider override. Picks up on the NEXT user message — no worker restart. Send `selection: null` to clear the override and fall back to the agent's default modelClass strategy. Rejected for terminal sessions (completed/failed/archived).
|
|
263
|
-
*/
|
|
264
263
|
const getSessionsControllerChangeModelUrl = (id) => {
|
|
265
264
|
return `/sessions/${id}/model`;
|
|
266
265
|
};
|
|
267
266
|
exports.getSessionsControllerChangeModelUrl = getSessionsControllerChangeModelUrl;
|
|
267
|
+
/**
|
|
268
|
+
* @summary Switch a session's model/provider override. Picks up on the NEXT user message — no worker restart. Send `selection: null` to clear the override and fall back to the agent's default modelClass strategy. Rejected for terminal sessions (completed/failed/archived).
|
|
269
|
+
*/
|
|
268
270
|
const sessionsControllerChangeModel = async (id, changeSessionModelDto, options) => {
|
|
269
271
|
return (0, custom_fetch_1.customFetch)((0, exports.getSessionsControllerChangeModelUrl)(id), {
|
|
270
272
|
...options,
|
|
@@ -274,13 +276,13 @@ const sessionsControllerChangeModel = async (id, changeSessionModelDto, options)
|
|
|
274
276
|
});
|
|
275
277
|
};
|
|
276
278
|
exports.sessionsControllerChangeModel = sessionsControllerChangeModel;
|
|
277
|
-
/**
|
|
278
|
-
* @summary Replace a session's MCP tool selection. Takes a flat list of ToolSelectionEntry (provider-kind references + optional toolName for narrow selections). Each entry is tenancy-validated against the session's (orgId, projectId) BEFORE the column is written; cross-org references fail with 403. Phase D: applies HOT — the resolved `mcpServers` map is merged into the recomposed opencode.jsonc and pushed via `PUT /control/session-bundle`, triggering one opencode restart per real change (no restart when the fingerprint matches). Returns 409 `session_busy` when the session has an in-flight turn — wait for the agent to finish and retry. Default selection is `[]` (OpenCode built-ins only baseline).
|
|
279
|
-
*/
|
|
280
279
|
const getSessionsControllerChangeToolsUrl = (id) => {
|
|
281
280
|
return `/sessions/${id}/tools`;
|
|
282
281
|
};
|
|
283
282
|
exports.getSessionsControllerChangeToolsUrl = getSessionsControllerChangeToolsUrl;
|
|
283
|
+
/**
|
|
284
|
+
* @summary Replace a session's MCP tool selection. Takes a flat list of ToolSelectionEntry (provider-kind references + optional toolName for narrow selections). Each entry is tenancy-validated against the session's (orgId, projectId) BEFORE the column is written; cross-org references fail with 403. Phase D: applies HOT — the resolved `mcpServers` map is merged into the recomposed opencode.jsonc and pushed via `PUT /control/session-bundle`, triggering one opencode restart per real change (no restart when the fingerprint matches). Returns 409 `session_busy` when the session has an in-flight turn — wait for the agent to finish and retry. Default selection is `[]` (OpenCode built-ins only baseline).
|
|
285
|
+
*/
|
|
284
286
|
const sessionsControllerChangeTools = async (id, changeSessionToolsDto, options) => {
|
|
285
287
|
return (0, custom_fetch_1.customFetch)((0, exports.getSessionsControllerChangeToolsUrl)(id), {
|
|
286
288
|
...options,
|
|
@@ -290,13 +292,45 @@ const sessionsControllerChangeTools = async (id, changeSessionToolsDto, options)
|
|
|
290
292
|
});
|
|
291
293
|
};
|
|
292
294
|
exports.sessionsControllerChangeTools = sessionsControllerChangeTools;
|
|
295
|
+
const getSessionsControllerChangeInstructionsUrl = (id) => {
|
|
296
|
+
return `/sessions/${id}/instructions`;
|
|
297
|
+
};
|
|
298
|
+
exports.getSessionsControllerChangeInstructionsUrl = getSessionsControllerChangeInstructionsUrl;
|
|
293
299
|
/**
|
|
294
|
-
* @summary
|
|
300
|
+
* @summary Set or clear the session-level instructions overlay (W4 for sessions). APPEND semantics: the text is appended AFTER the resolved primary system prompt + the composition's own root-node instructions. Send `instructions: null` (or omit) to clear it. Applies HOT via the same bundle rebuild path as model/tools (one opencode restart per real change; no-op when the fingerprint matches). Returns 409 `session_busy` during an in-flight turn; rejected for terminal sessions.
|
|
301
|
+
*/
|
|
302
|
+
const sessionsControllerChangeInstructions = async (id, changeSessionInstructionsDto, options) => {
|
|
303
|
+
return (0, custom_fetch_1.customFetch)((0, exports.getSessionsControllerChangeInstructionsUrl)(id), {
|
|
304
|
+
...options,
|
|
305
|
+
method: 'PATCH',
|
|
306
|
+
headers: { 'Content-Type': 'application/json', ...options?.headers },
|
|
307
|
+
body: JSON.stringify(changeSessionInstructionsDto)
|
|
308
|
+
});
|
|
309
|
+
};
|
|
310
|
+
exports.sessionsControllerChangeInstructions = sessionsControllerChangeInstructions;
|
|
311
|
+
const getSessionsControllerChangePermissionUrl = (id) => {
|
|
312
|
+
return `/sessions/${id}/permission`;
|
|
313
|
+
};
|
|
314
|
+
exports.getSessionsControllerChangePermissionUrl = getSessionsControllerChangePermissionUrl;
|
|
315
|
+
/**
|
|
316
|
+
* @summary Set or clear a RESTRICT-only permission overlay for the session (W4 for sessions). The map narrows the resolved primary permission map at the runtime boundary — keys are members of the closed permission-key set and values are `ask` | `deny` (or a nested per-resource sub-map); `allow` is rejected (an overlay may only narrow, never grant). Send `permission: null` (or omit) to clear it. Applies HOT via the same bundle rebuild path as model/tools. Returns 409 `session_busy` during an in-flight turn; rejected for terminal sessions.
|
|
295
317
|
*/
|
|
318
|
+
const sessionsControllerChangePermission = async (id, changeSessionPermissionDto, options) => {
|
|
319
|
+
return (0, custom_fetch_1.customFetch)((0, exports.getSessionsControllerChangePermissionUrl)(id), {
|
|
320
|
+
...options,
|
|
321
|
+
method: 'PATCH',
|
|
322
|
+
headers: { 'Content-Type': 'application/json', ...options?.headers },
|
|
323
|
+
body: JSON.stringify(changeSessionPermissionDto)
|
|
324
|
+
});
|
|
325
|
+
};
|
|
326
|
+
exports.sessionsControllerChangePermission = sessionsControllerChangePermission;
|
|
296
327
|
const getSessionsControllerListKbMountsUrl = (id) => {
|
|
297
328
|
return `/sessions/${id}/kb-mounts`;
|
|
298
329
|
};
|
|
299
330
|
exports.getSessionsControllerListKbMountsUrl = getSessionsControllerListKbMountsUrl;
|
|
331
|
+
/**
|
|
332
|
+
* @summary List the KB spaces and per-space page selections currently mounted into this session's `/workspace/references/kb/` tree. Empty arrays on a session that has never set a selection.
|
|
333
|
+
*/
|
|
300
334
|
const sessionsControllerListKbMounts = async (id, options) => {
|
|
301
335
|
return (0, custom_fetch_1.customFetch)((0, exports.getSessionsControllerListKbMountsUrl)(id), {
|
|
302
336
|
...options,
|
|
@@ -304,13 +338,13 @@ const sessionsControllerListKbMounts = async (id, options) => {
|
|
|
304
338
|
});
|
|
305
339
|
};
|
|
306
340
|
exports.sessionsControllerListKbMounts = sessionsControllerListKbMounts;
|
|
307
|
-
/**
|
|
308
|
-
* @summary Full-replace the session’s KB mount selection. Both `spaceIds` and `pageMounts` are total sets — the persisted selection is overwritten. If the session has a live worker, the workspace references slot is atomically re-applied so the agent sees the change on its next turn. If the session is paused, the change is persisted and materialized on the next resume. To clear all KB mounts, send `{ spaceIds: [], pageMounts: [] }`.
|
|
309
|
-
*/
|
|
310
341
|
const getSessionsControllerUpdateKbMountsUrl = (id) => {
|
|
311
342
|
return `/sessions/${id}/kb-mounts`;
|
|
312
343
|
};
|
|
313
344
|
exports.getSessionsControllerUpdateKbMountsUrl = getSessionsControllerUpdateKbMountsUrl;
|
|
345
|
+
/**
|
|
346
|
+
* @summary Full-replace the session’s KB mount selection. Both `spaceIds` and `pageMounts` are total sets — the persisted selection is overwritten. If the session has a live worker, the workspace references slot is atomically re-applied so the agent sees the change on its next turn. If the session is paused, the change is persisted and materialized on the next resume. To clear all KB mounts, send `{ spaceIds: [], pageMounts: [] }`.
|
|
347
|
+
*/
|
|
314
348
|
const sessionsControllerUpdateKbMounts = async (id, updateKbMountsDto, options) => {
|
|
315
349
|
return (0, custom_fetch_1.customFetch)((0, exports.getSessionsControllerUpdateKbMountsUrl)(id), {
|
|
316
350
|
...options,
|
|
@@ -320,13 +354,13 @@ const sessionsControllerUpdateKbMounts = async (id, updateKbMountsDto, options)
|
|
|
320
354
|
});
|
|
321
355
|
};
|
|
322
356
|
exports.sessionsControllerUpdateKbMounts = sessionsControllerUpdateKbMounts;
|
|
323
|
-
/**
|
|
324
|
-
* @summary Pause session — snapshot to MinIO, release worker. Requires turnState=idle.
|
|
325
|
-
*/
|
|
326
357
|
const getSessionsControllerPauseUrl = (id) => {
|
|
327
358
|
return `/sessions/${id}/pause`;
|
|
328
359
|
};
|
|
329
360
|
exports.getSessionsControllerPauseUrl = getSessionsControllerPauseUrl;
|
|
361
|
+
/**
|
|
362
|
+
* @summary Pause session — snapshot to MinIO, release worker. Requires turnState=idle.
|
|
363
|
+
*/
|
|
330
364
|
const sessionsControllerPause = async (id, options) => {
|
|
331
365
|
return (0, custom_fetch_1.customFetch)((0, exports.getSessionsControllerPauseUrl)(id), {
|
|
332
366
|
...options,
|
|
@@ -334,13 +368,13 @@ const sessionsControllerPause = async (id, options) => {
|
|
|
334
368
|
});
|
|
335
369
|
};
|
|
336
370
|
exports.sessionsControllerPause = sessionsControllerPause;
|
|
337
|
-
/**
|
|
338
|
-
* @summary Resume paused session — acquire worker, restore snapshot. Pass `agentSlugOverride` to recover a session whose primary agent was removed.
|
|
339
|
-
*/
|
|
340
371
|
const getSessionsControllerResumeUrl = (id) => {
|
|
341
372
|
return `/sessions/${id}/resume`;
|
|
342
373
|
};
|
|
343
374
|
exports.getSessionsControllerResumeUrl = getSessionsControllerResumeUrl;
|
|
375
|
+
/**
|
|
376
|
+
* @summary Resume paused session — acquire worker, restore snapshot. Pass `agentSlugOverride` to recover a session whose primary agent was removed.
|
|
377
|
+
*/
|
|
344
378
|
const sessionsControllerResume = async (id, resumeSessionDto, options) => {
|
|
345
379
|
return (0, custom_fetch_1.customFetch)((0, exports.getSessionsControllerResumeUrl)(id), {
|
|
346
380
|
...options,
|
|
@@ -350,13 +384,13 @@ const sessionsControllerResume = async (id, resumeSessionDto, options) => {
|
|
|
350
384
|
});
|
|
351
385
|
};
|
|
352
386
|
exports.sessionsControllerResume = sessionsControllerResume;
|
|
353
|
-
/**
|
|
354
|
-
* @summary Trigger OpenCode-native conversation compaction. Auto-resumes paused sessions. The summary lands as a new assistant message inside OpenCode and `session.compacted` fires, which the event-bridge relays — `Session.contextWindowSnapshot` is reset to zeros and the FE chip drops via SSE without polling. Auto-compact still runs inside OpenCode on overflow independently of this endpoint.
|
|
355
|
-
*/
|
|
356
387
|
const getSessionsControllerCompactUrl = (id) => {
|
|
357
388
|
return `/sessions/${id}/compact`;
|
|
358
389
|
};
|
|
359
390
|
exports.getSessionsControllerCompactUrl = getSessionsControllerCompactUrl;
|
|
391
|
+
/**
|
|
392
|
+
* @summary Trigger OpenCode-native conversation compaction. Auto-resumes paused sessions. The summary lands as a new assistant message inside OpenCode and `session.compacted` fires, which the event-bridge relays — `Session.contextWindowSnapshot` is reset to zeros and the FE chip drops via SSE without polling. Auto-compact still runs inside OpenCode on overflow independently of this endpoint.
|
|
393
|
+
*/
|
|
360
394
|
const sessionsControllerCompact = async (id, options) => {
|
|
361
395
|
return (0, custom_fetch_1.customFetch)((0, exports.getSessionsControllerCompactUrl)(id), {
|
|
362
396
|
...options,
|
|
@@ -364,13 +398,13 @@ const sessionsControllerCompact = async (id, options) => {
|
|
|
364
398
|
});
|
|
365
399
|
};
|
|
366
400
|
exports.sessionsControllerCompact = sessionsControllerCompact;
|
|
367
|
-
/**
|
|
368
|
-
* @summary Archive session — deletes the MinIO snapshot and the `xema/session/<id>` branches on each DELIVERABLE repo, releases any active worker, and transitions the row to status=archived. Idempotent: a call against an already-archived session returns the prior archivedAt without re-running cleanup. Distinct from `/pause`: pause preserves state for resume; archive throws it away.
|
|
369
|
-
*/
|
|
370
401
|
const getSessionsControllerArchiveUrl = (id) => {
|
|
371
402
|
return `/sessions/${id}/archive`;
|
|
372
403
|
};
|
|
373
404
|
exports.getSessionsControllerArchiveUrl = getSessionsControllerArchiveUrl;
|
|
405
|
+
/**
|
|
406
|
+
* @summary Archive session — deletes the MinIO snapshot and the `xema/session/<id>` branches on each DELIVERABLE repo, releases any active worker, and transitions the row to status=archived. Idempotent: a call against an already-archived session returns the prior archivedAt without re-running cleanup. Distinct from `/pause`: pause preserves state for resume; archive throws it away.
|
|
407
|
+
*/
|
|
374
408
|
const sessionsControllerArchive = async (id, options) => {
|
|
375
409
|
return (0, custom_fetch_1.customFetch)((0, exports.getSessionsControllerArchiveUrl)(id), {
|
|
376
410
|
...options,
|
|
@@ -378,13 +412,13 @@ const sessionsControllerArchive = async (id, options) => {
|
|
|
378
412
|
});
|
|
379
413
|
};
|
|
380
414
|
exports.sessionsControllerArchive = sessionsControllerArchive;
|
|
381
|
-
/**
|
|
382
|
-
* @summary Add reference-class attachment to session (kb_page / org_document / internal_url / repo_ref)
|
|
383
|
-
*/
|
|
384
415
|
const getSessionsControllerAddAttachmentUrl = (id) => {
|
|
385
416
|
return `/sessions/${id}/attachments`;
|
|
386
417
|
};
|
|
387
418
|
exports.getSessionsControllerAddAttachmentUrl = getSessionsControllerAddAttachmentUrl;
|
|
419
|
+
/**
|
|
420
|
+
* @summary Add reference-class attachment to session (kb_page / org_document / internal_url / repo_ref)
|
|
421
|
+
*/
|
|
388
422
|
const sessionsControllerAddAttachment = async (id, addAttachmentDto, options) => {
|
|
389
423
|
return (0, custom_fetch_1.customFetch)((0, exports.getSessionsControllerAddAttachmentUrl)(id), {
|
|
390
424
|
...options,
|
|
@@ -394,13 +428,13 @@ const sessionsControllerAddAttachment = async (id, addAttachmentDto, options) =>
|
|
|
394
428
|
});
|
|
395
429
|
};
|
|
396
430
|
exports.sessionsControllerAddAttachment = sessionsControllerAddAttachment;
|
|
397
|
-
/**
|
|
398
|
-
* @summary List session attachments
|
|
399
|
-
*/
|
|
400
431
|
const getSessionsControllerListAttachmentsUrl = (id) => {
|
|
401
432
|
return `/sessions/${id}/attachments`;
|
|
402
433
|
};
|
|
403
434
|
exports.getSessionsControllerListAttachmentsUrl = getSessionsControllerListAttachmentsUrl;
|
|
435
|
+
/**
|
|
436
|
+
* @summary List session attachments
|
|
437
|
+
*/
|
|
404
438
|
const sessionsControllerListAttachments = async (id, options) => {
|
|
405
439
|
return (0, custom_fetch_1.customFetch)((0, exports.getSessionsControllerListAttachmentsUrl)(id), {
|
|
406
440
|
...options,
|
|
@@ -408,13 +442,13 @@ const sessionsControllerListAttachments = async (id, options) => {
|
|
|
408
442
|
});
|
|
409
443
|
};
|
|
410
444
|
exports.sessionsControllerListAttachments = sessionsControllerListAttachments;
|
|
411
|
-
/**
|
|
412
|
-
* @summary Remove attachment from session
|
|
413
|
-
*/
|
|
414
445
|
const getSessionsControllerRemoveAttachmentUrl = (id, attachmentId) => {
|
|
415
446
|
return `/sessions/${id}/attachments/${attachmentId}`;
|
|
416
447
|
};
|
|
417
448
|
exports.getSessionsControllerRemoveAttachmentUrl = getSessionsControllerRemoveAttachmentUrl;
|
|
449
|
+
/**
|
|
450
|
+
* @summary Remove attachment from session
|
|
451
|
+
*/
|
|
418
452
|
const sessionsControllerRemoveAttachment = async (id, attachmentId, options) => {
|
|
419
453
|
return (0, custom_fetch_1.customFetch)((0, exports.getSessionsControllerRemoveAttachmentUrl)(id, attachmentId), {
|
|
420
454
|
...options,
|
|
@@ -422,13 +456,13 @@ const sessionsControllerRemoveAttachment = async (id, attachmentId, options) =>
|
|
|
422
456
|
});
|
|
423
457
|
};
|
|
424
458
|
exports.sessionsControllerRemoveAttachment = sessionsControllerRemoveAttachment;
|
|
425
|
-
/**
|
|
426
|
-
* @summary Initiate a direct-to-blob upload for a file attachment. Returns a short-lived presigned URL the browser uses to PUT the bytes straight to object storage; session-api never sees the buffer.
|
|
427
|
-
*/
|
|
428
459
|
const getSessionsControllerInitAttachmentUploadUrl = (id) => {
|
|
429
460
|
return `/sessions/${id}/attachments/upload-init`;
|
|
430
461
|
};
|
|
431
462
|
exports.getSessionsControllerInitAttachmentUploadUrl = getSessionsControllerInitAttachmentUploadUrl;
|
|
463
|
+
/**
|
|
464
|
+
* @summary Initiate a direct-to-blob upload for a file attachment. Returns a short-lived presigned URL the browser uses to PUT the bytes straight to object storage; session-api never sees the buffer.
|
|
465
|
+
*/
|
|
432
466
|
const sessionsControllerInitAttachmentUpload = async (id, initAttachmentUploadDto, options) => {
|
|
433
467
|
return (0, custom_fetch_1.customFetch)((0, exports.getSessionsControllerInitAttachmentUploadUrl)(id), {
|
|
434
468
|
...options,
|
|
@@ -438,13 +472,13 @@ const sessionsControllerInitAttachmentUpload = async (id, initAttachmentUploadDt
|
|
|
438
472
|
});
|
|
439
473
|
};
|
|
440
474
|
exports.sessionsControllerInitAttachmentUpload = sessionsControllerInitAttachmentUpload;
|
|
441
|
-
/**
|
|
442
|
-
* @summary Finalise a SAS upload. Verifies the blob landed in storage, flips the attachment to ready, and projects the file into the live workspace via the workspace-proxy SAS-pull endpoint so the agent sees it immediately.
|
|
443
|
-
*/
|
|
444
475
|
const getSessionsControllerCompleteAttachmentUploadUrl = (id, attachmentId) => {
|
|
445
476
|
return `/sessions/${id}/attachments/${attachmentId}/upload-complete`;
|
|
446
477
|
};
|
|
447
478
|
exports.getSessionsControllerCompleteAttachmentUploadUrl = getSessionsControllerCompleteAttachmentUploadUrl;
|
|
479
|
+
/**
|
|
480
|
+
* @summary Finalise a SAS upload. Verifies the blob landed in storage, flips the attachment to ready, and projects the file into the live workspace via the workspace-proxy SAS-pull endpoint so the agent sees it immediately.
|
|
481
|
+
*/
|
|
448
482
|
const sessionsControllerCompleteAttachmentUpload = async (id, attachmentId, options) => {
|
|
449
483
|
return (0, custom_fetch_1.customFetch)((0, exports.getSessionsControllerCompleteAttachmentUploadUrl)(id, attachmentId), {
|
|
450
484
|
...options,
|
|
@@ -452,13 +486,13 @@ const sessionsControllerCompleteAttachmentUpload = async (id, attachmentId, opti
|
|
|
452
486
|
});
|
|
453
487
|
};
|
|
454
488
|
exports.sessionsControllerCompleteAttachmentUpload = sessionsControllerCompleteAttachmentUpload;
|
|
455
|
-
/**
|
|
456
|
-
* @summary Get session token usage and budget status
|
|
457
|
-
*/
|
|
458
489
|
const getSessionsControllerGetUsageUrl = (id) => {
|
|
459
490
|
return `/sessions/${id}/usage`;
|
|
460
491
|
};
|
|
461
492
|
exports.getSessionsControllerGetUsageUrl = getSessionsControllerGetUsageUrl;
|
|
493
|
+
/**
|
|
494
|
+
* @summary Get session token usage and budget status
|
|
495
|
+
*/
|
|
462
496
|
const sessionsControllerGetUsage = async (id, options) => {
|
|
463
497
|
return (0, custom_fetch_1.customFetch)((0, exports.getSessionsControllerGetUsageUrl)(id), {
|
|
464
498
|
...options,
|
|
@@ -466,13 +500,13 @@ const sessionsControllerGetUsage = async (id, options) => {
|
|
|
466
500
|
});
|
|
467
501
|
};
|
|
468
502
|
exports.sessionsControllerGetUsage = sessionsControllerGetUsage;
|
|
469
|
-
/**
|
|
470
|
-
* @summary Per-session MCP tool-usage counters (Phase E telemetry). Returns one row per (mcpServiceSlug, command) tuple, sorted by count desc. Counters live in Redis with a 30-day TTL; an unreachable telemetry store yields an empty list plus a `warning` string instead of an error — the read is debug-grade and never blocks the UI.
|
|
471
|
-
*/
|
|
472
503
|
const getSessionsControllerGetToolUsageUrl = (id) => {
|
|
473
504
|
return `/sessions/${id}/tool-usage`;
|
|
474
505
|
};
|
|
475
506
|
exports.getSessionsControllerGetToolUsageUrl = getSessionsControllerGetToolUsageUrl;
|
|
507
|
+
/**
|
|
508
|
+
* @summary Per-session MCP tool-usage counters (Phase E telemetry). Returns one row per (mcpServiceSlug, command) tuple, sorted by count desc. Counters live in Redis with a 30-day TTL; an unreachable telemetry store yields an empty list plus a `warning` string instead of an error — the read is debug-grade and never blocks the UI.
|
|
509
|
+
*/
|
|
476
510
|
const sessionsControllerGetToolUsage = async (id, options) => {
|
|
477
511
|
return (0, custom_fetch_1.customFetch)((0, exports.getSessionsControllerGetToolUsageUrl)(id), {
|
|
478
512
|
...options,
|
|
@@ -480,13 +514,13 @@ const sessionsControllerGetToolUsage = async (id, options) => {
|
|
|
480
514
|
});
|
|
481
515
|
};
|
|
482
516
|
exports.sessionsControllerGetToolUsage = sessionsControllerGetToolUsage;
|
|
483
|
-
/**
|
|
484
|
-
* @summary Create or switch git branch. Requires turnState=idle.
|
|
485
|
-
*/
|
|
486
517
|
const getSessionsControllerCreateBranchUrl = (id) => {
|
|
487
518
|
return `/sessions/${id}/git/branch`;
|
|
488
519
|
};
|
|
489
520
|
exports.getSessionsControllerCreateBranchUrl = getSessionsControllerCreateBranchUrl;
|
|
521
|
+
/**
|
|
522
|
+
* @summary Create or switch git branch. Requires turnState=idle.
|
|
523
|
+
*/
|
|
490
524
|
const sessionsControllerCreateBranch = async (id, options) => {
|
|
491
525
|
return (0, custom_fetch_1.customFetch)((0, exports.getSessionsControllerCreateBranchUrl)(id), {
|
|
492
526
|
...options,
|
|
@@ -494,13 +528,13 @@ const sessionsControllerCreateBranch = async (id, options) => {
|
|
|
494
528
|
});
|
|
495
529
|
};
|
|
496
530
|
exports.sessionsControllerCreateBranch = sessionsControllerCreateBranch;
|
|
497
|
-
/**
|
|
498
|
-
* @summary Get git status (modified, staged, branch)
|
|
499
|
-
*/
|
|
500
531
|
const getSessionsControllerGetGitStatusUrl = (id) => {
|
|
501
532
|
return `/sessions/${id}/git/status`;
|
|
502
533
|
};
|
|
503
534
|
exports.getSessionsControllerGetGitStatusUrl = getSessionsControllerGetGitStatusUrl;
|
|
535
|
+
/**
|
|
536
|
+
* @summary Get git status (modified, staged, branch)
|
|
537
|
+
*/
|
|
504
538
|
const sessionsControllerGetGitStatus = async (id, options) => {
|
|
505
539
|
return (0, custom_fetch_1.customFetch)((0, exports.getSessionsControllerGetGitStatusUrl)(id), {
|
|
506
540
|
...options,
|
|
@@ -508,9 +542,6 @@ const sessionsControllerGetGitStatus = async (id, options) => {
|
|
|
508
542
|
});
|
|
509
543
|
};
|
|
510
544
|
exports.sessionsControllerGetGitStatus = sessionsControllerGetGitStatus;
|
|
511
|
-
/**
|
|
512
|
-
* @summary Get git diff (staged or unstaged). When `path` is provided, the diff is scoped to that single file — used by the UI to render a per-file diff viewer on top of the changed-files panel.
|
|
513
|
-
*/
|
|
514
545
|
const getSessionsControllerGetGitDiffUrl = (id, params) => {
|
|
515
546
|
const normalizedParams = new URLSearchParams();
|
|
516
547
|
Object.entries(params || {}).forEach(([key, value]) => {
|
|
@@ -534,6 +565,9 @@ const getSessionsControllerGetGitDiffUrl = (id, params) => {
|
|
|
534
565
|
return stringifiedParams.length > 0 ? `/sessions/${id}/git/diff?${stringifiedParams}` : `/sessions/${id}/git/diff`;
|
|
535
566
|
};
|
|
536
567
|
exports.getSessionsControllerGetGitDiffUrl = getSessionsControllerGetGitDiffUrl;
|
|
568
|
+
/**
|
|
569
|
+
* @summary Get git diff (staged or unstaged). When `path` is provided, the diff is scoped to that single file — used by the UI to render a per-file diff viewer on top of the changed-files panel.
|
|
570
|
+
*/
|
|
537
571
|
const sessionsControllerGetGitDiff = async (id, params, options) => {
|
|
538
572
|
return (0, custom_fetch_1.customFetch)((0, exports.getSessionsControllerGetGitDiffUrl)(id, params), {
|
|
539
573
|
...options,
|
|
@@ -541,13 +575,13 @@ const sessionsControllerGetGitDiff = async (id, params, options) => {
|
|
|
541
575
|
});
|
|
542
576
|
};
|
|
543
577
|
exports.sessionsControllerGetGitDiff = sessionsControllerGetGitDiff;
|
|
544
|
-
/**
|
|
545
|
-
* @summary Commit changes. Author=user, co-author=agent. Requires turnState=idle.
|
|
546
|
-
*/
|
|
547
578
|
const getSessionsControllerGitCommitUrl = (id) => {
|
|
548
579
|
return `/sessions/${id}/git/commit`;
|
|
549
580
|
};
|
|
550
581
|
exports.getSessionsControllerGitCommitUrl = getSessionsControllerGitCommitUrl;
|
|
582
|
+
/**
|
|
583
|
+
* @summary Commit changes. Author=user, co-author=agent. Requires turnState=idle.
|
|
584
|
+
*/
|
|
551
585
|
const sessionsControllerGitCommit = async (id, options) => {
|
|
552
586
|
return (0, custom_fetch_1.customFetch)((0, exports.getSessionsControllerGitCommitUrl)(id), {
|
|
553
587
|
...options,
|
|
@@ -555,13 +589,13 @@ const sessionsControllerGitCommit = async (id, options) => {
|
|
|
555
589
|
});
|
|
556
590
|
};
|
|
557
591
|
exports.sessionsControllerGitCommit = sessionsControllerGitCommit;
|
|
558
|
-
/**
|
|
559
|
-
* @summary Push to remote. Requires turnState=idle.
|
|
560
|
-
*/
|
|
561
592
|
const getSessionsControllerGitPushUrl = (id) => {
|
|
562
593
|
return `/sessions/${id}/git/push`;
|
|
563
594
|
};
|
|
564
595
|
exports.getSessionsControllerGitPushUrl = getSessionsControllerGitPushUrl;
|
|
596
|
+
/**
|
|
597
|
+
* @summary Push to remote. Requires turnState=idle.
|
|
598
|
+
*/
|
|
565
599
|
const sessionsControllerGitPush = async (id, options) => {
|
|
566
600
|
return (0, custom_fetch_1.customFetch)((0, exports.getSessionsControllerGitPushUrl)(id), {
|
|
567
601
|
...options,
|
|
@@ -569,13 +603,13 @@ const sessionsControllerGitPush = async (id, options) => {
|
|
|
569
603
|
});
|
|
570
604
|
};
|
|
571
605
|
exports.sessionsControllerGitPush = sessionsControllerGitPush;
|
|
572
|
-
/**
|
|
573
|
-
* @summary Create pull request from session branch
|
|
574
|
-
*/
|
|
575
606
|
const getSessionsControllerCreatePullRequestUrl = (id) => {
|
|
576
607
|
return `/sessions/${id}/git/pull-request`;
|
|
577
608
|
};
|
|
578
609
|
exports.getSessionsControllerCreatePullRequestUrl = getSessionsControllerCreatePullRequestUrl;
|
|
610
|
+
/**
|
|
611
|
+
* @summary Create pull request from session branch
|
|
612
|
+
*/
|
|
579
613
|
const sessionsControllerCreatePullRequest = async (id, options) => {
|
|
580
614
|
return (0, custom_fetch_1.customFetch)((0, exports.getSessionsControllerCreatePullRequestUrl)(id), {
|
|
581
615
|
...options,
|
|
@@ -583,9 +617,6 @@ const sessionsControllerCreatePullRequest = async (id, options) => {
|
|
|
583
617
|
});
|
|
584
618
|
};
|
|
585
619
|
exports.sessionsControllerCreatePullRequest = sessionsControllerCreatePullRequest;
|
|
586
|
-
/**
|
|
587
|
-
* @summary Get commit history for session branch
|
|
588
|
-
*/
|
|
589
620
|
const getSessionsControllerGetCommitHistoryUrl = (id, params) => {
|
|
590
621
|
const normalizedParams = new URLSearchParams();
|
|
591
622
|
Object.entries(params || {}).forEach(([key, value]) => {
|
|
@@ -609,6 +640,9 @@ const getSessionsControllerGetCommitHistoryUrl = (id, params) => {
|
|
|
609
640
|
return stringifiedParams.length > 0 ? `/sessions/${id}/git/commits?${stringifiedParams}` : `/sessions/${id}/git/commits`;
|
|
610
641
|
};
|
|
611
642
|
exports.getSessionsControllerGetCommitHistoryUrl = getSessionsControllerGetCommitHistoryUrl;
|
|
643
|
+
/**
|
|
644
|
+
* @summary Get commit history for session branch
|
|
645
|
+
*/
|
|
612
646
|
const sessionsControllerGetCommitHistory = async (id, params, options) => {
|
|
613
647
|
return (0, custom_fetch_1.customFetch)((0, exports.getSessionsControllerGetCommitHistoryUrl)(id, params), {
|
|
614
648
|
...options,
|
|
@@ -616,9 +650,6 @@ const sessionsControllerGetCommitHistory = async (id, params, options) => {
|
|
|
616
650
|
});
|
|
617
651
|
};
|
|
618
652
|
exports.sessionsControllerGetCommitHistory = sessionsControllerGetCommitHistory;
|
|
619
|
-
/**
|
|
620
|
-
* @summary Check if the session branch can merge cleanly into the target branch. Uses git merge-tree (no workspace mutation).
|
|
621
|
-
*/
|
|
622
653
|
const getSessionsControllerMergeCheckUrl = (id, params) => {
|
|
623
654
|
const normalizedParams = new URLSearchParams();
|
|
624
655
|
Object.entries(params || {}).forEach(([key, value]) => {
|
|
@@ -642,6 +673,9 @@ const getSessionsControllerMergeCheckUrl = (id, params) => {
|
|
|
642
673
|
return stringifiedParams.length > 0 ? `/sessions/${id}/git/merge-check?${stringifiedParams}` : `/sessions/${id}/git/merge-check`;
|
|
643
674
|
};
|
|
644
675
|
exports.getSessionsControllerMergeCheckUrl = getSessionsControllerMergeCheckUrl;
|
|
676
|
+
/**
|
|
677
|
+
* @summary Check if the session branch can merge cleanly into the target branch. Uses git merge-tree (no workspace mutation).
|
|
678
|
+
*/
|
|
645
679
|
const sessionsControllerMergeCheck = async (id, params, options) => {
|
|
646
680
|
return (0, custom_fetch_1.customFetch)((0, exports.getSessionsControllerMergeCheckUrl)(id, params), {
|
|
647
681
|
...options,
|
|
@@ -649,13 +683,13 @@ const sessionsControllerMergeCheck = async (id, params, options) => {
|
|
|
649
683
|
});
|
|
650
684
|
};
|
|
651
685
|
exports.sessionsControllerMergeCheck = sessionsControllerMergeCheck;
|
|
652
|
-
/**
|
|
653
|
-
* @summary Push content to knowledge base as a new or updated page
|
|
654
|
-
*/
|
|
655
686
|
const getSessionsControllerPushToKBUrl = (id) => {
|
|
656
687
|
return `/sessions/${id}/kb-push`;
|
|
657
688
|
};
|
|
658
689
|
exports.getSessionsControllerPushToKBUrl = getSessionsControllerPushToKBUrl;
|
|
690
|
+
/**
|
|
691
|
+
* @summary Push content to knowledge base as a new or updated page
|
|
692
|
+
*/
|
|
659
693
|
const sessionsControllerPushToKB = async (id, options) => {
|
|
660
694
|
return (0, custom_fetch_1.customFetch)((0, exports.getSessionsControllerPushToKBUrl)(id), {
|
|
661
695
|
...options,
|
|
@@ -663,13 +697,13 @@ const sessionsControllerPushToKB = async (id, options) => {
|
|
|
663
697
|
});
|
|
664
698
|
};
|
|
665
699
|
exports.sessionsControllerPushToKB = sessionsControllerPushToKB;
|
|
666
|
-
/**
|
|
667
|
-
* @summary Create a session template
|
|
668
|
-
*/
|
|
669
700
|
const getSessionsControllerCreateTemplateUrl = () => {
|
|
670
701
|
return `/sessions/templates`;
|
|
671
702
|
};
|
|
672
703
|
exports.getSessionsControllerCreateTemplateUrl = getSessionsControllerCreateTemplateUrl;
|
|
704
|
+
/**
|
|
705
|
+
* @summary Create a session template
|
|
706
|
+
*/
|
|
673
707
|
const sessionsControllerCreateTemplate = async (options) => {
|
|
674
708
|
return (0, custom_fetch_1.customFetch)((0, exports.getSessionsControllerCreateTemplateUrl)(), {
|
|
675
709
|
...options,
|
|
@@ -677,9 +711,6 @@ const sessionsControllerCreateTemplate = async (options) => {
|
|
|
677
711
|
});
|
|
678
712
|
};
|
|
679
713
|
exports.sessionsControllerCreateTemplate = sessionsControllerCreateTemplate;
|
|
680
|
-
/**
|
|
681
|
-
* @summary List session templates
|
|
682
|
-
*/
|
|
683
714
|
const getSessionsControllerListTemplatesUrl = (params) => {
|
|
684
715
|
const normalizedParams = new URLSearchParams();
|
|
685
716
|
Object.entries(params || {}).forEach(([key, value]) => {
|
|
@@ -703,6 +734,9 @@ const getSessionsControllerListTemplatesUrl = (params) => {
|
|
|
703
734
|
return stringifiedParams.length > 0 ? `/sessions/templates?${stringifiedParams}` : `/sessions/templates`;
|
|
704
735
|
};
|
|
705
736
|
exports.getSessionsControllerListTemplatesUrl = getSessionsControllerListTemplatesUrl;
|
|
737
|
+
/**
|
|
738
|
+
* @summary List session templates
|
|
739
|
+
*/
|
|
706
740
|
const sessionsControllerListTemplates = async (params, options) => {
|
|
707
741
|
return (0, custom_fetch_1.customFetch)((0, exports.getSessionsControllerListTemplatesUrl)(params), {
|
|
708
742
|
...options,
|
|
@@ -710,13 +744,13 @@ const sessionsControllerListTemplates = async (params, options) => {
|
|
|
710
744
|
});
|
|
711
745
|
};
|
|
712
746
|
exports.sessionsControllerListTemplates = sessionsControllerListTemplates;
|
|
713
|
-
/**
|
|
714
|
-
* @summary Get template by ID
|
|
715
|
-
*/
|
|
716
747
|
const getSessionsControllerGetTemplateUrl = (templateId) => {
|
|
717
748
|
return `/sessions/templates/${templateId}`;
|
|
718
749
|
};
|
|
719
750
|
exports.getSessionsControllerGetTemplateUrl = getSessionsControllerGetTemplateUrl;
|
|
751
|
+
/**
|
|
752
|
+
* @summary Get template by ID
|
|
753
|
+
*/
|
|
720
754
|
const sessionsControllerGetTemplate = async (templateId, options) => {
|
|
721
755
|
return (0, custom_fetch_1.customFetch)((0, exports.getSessionsControllerGetTemplateUrl)(templateId), {
|
|
722
756
|
...options,
|
|
@@ -724,13 +758,13 @@ const sessionsControllerGetTemplate = async (templateId, options) => {
|
|
|
724
758
|
});
|
|
725
759
|
};
|
|
726
760
|
exports.sessionsControllerGetTemplate = sessionsControllerGetTemplate;
|
|
727
|
-
/**
|
|
728
|
-
* @summary Update a session template
|
|
729
|
-
*/
|
|
730
761
|
const getSessionsControllerUpdateTemplateUrl = (templateId) => {
|
|
731
762
|
return `/sessions/templates/${templateId}`;
|
|
732
763
|
};
|
|
733
764
|
exports.getSessionsControllerUpdateTemplateUrl = getSessionsControllerUpdateTemplateUrl;
|
|
765
|
+
/**
|
|
766
|
+
* @summary Update a session template
|
|
767
|
+
*/
|
|
734
768
|
const sessionsControllerUpdateTemplate = async (templateId, options) => {
|
|
735
769
|
return (0, custom_fetch_1.customFetch)((0, exports.getSessionsControllerUpdateTemplateUrl)(templateId), {
|
|
736
770
|
...options,
|
|
@@ -738,13 +772,13 @@ const sessionsControllerUpdateTemplate = async (templateId, options) => {
|
|
|
738
772
|
});
|
|
739
773
|
};
|
|
740
774
|
exports.sessionsControllerUpdateTemplate = sessionsControllerUpdateTemplate;
|
|
741
|
-
/**
|
|
742
|
-
* @summary Delete a session template
|
|
743
|
-
*/
|
|
744
775
|
const getSessionsControllerDeleteTemplateUrl = (templateId) => {
|
|
745
776
|
return `/sessions/templates/${templateId}`;
|
|
746
777
|
};
|
|
747
778
|
exports.getSessionsControllerDeleteTemplateUrl = getSessionsControllerDeleteTemplateUrl;
|
|
779
|
+
/**
|
|
780
|
+
* @summary Delete a session template
|
|
781
|
+
*/
|
|
748
782
|
const sessionsControllerDeleteTemplate = async (templateId, options) => {
|
|
749
783
|
return (0, custom_fetch_1.customFetch)((0, exports.getSessionsControllerDeleteTemplateUrl)(templateId), {
|
|
750
784
|
...options,
|
|
@@ -752,13 +786,13 @@ const sessionsControllerDeleteTemplate = async (templateId, options) => {
|
|
|
752
786
|
});
|
|
753
787
|
};
|
|
754
788
|
exports.sessionsControllerDeleteTemplate = sessionsControllerDeleteTemplate;
|
|
755
|
-
/**
|
|
756
|
-
* @summary Clone a session template
|
|
757
|
-
*/
|
|
758
789
|
const getSessionsControllerCloneTemplateUrl = (templateId) => {
|
|
759
790
|
return `/sessions/templates/${templateId}/clone`;
|
|
760
791
|
};
|
|
761
792
|
exports.getSessionsControllerCloneTemplateUrl = getSessionsControllerCloneTemplateUrl;
|
|
793
|
+
/**
|
|
794
|
+
* @summary Clone a session template
|
|
795
|
+
*/
|
|
762
796
|
const sessionsControllerCloneTemplate = async (templateId, options) => {
|
|
763
797
|
return (0, custom_fetch_1.customFetch)((0, exports.getSessionsControllerCloneTemplateUrl)(templateId), {
|
|
764
798
|
...options,
|
|
@@ -766,13 +800,13 @@ const sessionsControllerCloneTemplate = async (templateId, options) => {
|
|
|
766
800
|
});
|
|
767
801
|
};
|
|
768
802
|
exports.sessionsControllerCloneTemplate = sessionsControllerCloneTemplate;
|
|
769
|
-
/**
|
|
770
|
-
* @summary Generate a read-only sharing link for the session
|
|
771
|
-
*/
|
|
772
803
|
const getSessionsControllerCreateShareUrl = (id) => {
|
|
773
804
|
return `/sessions/${id}/share`;
|
|
774
805
|
};
|
|
775
806
|
exports.getSessionsControllerCreateShareUrl = getSessionsControllerCreateShareUrl;
|
|
807
|
+
/**
|
|
808
|
+
* @summary Generate a read-only sharing link for the session
|
|
809
|
+
*/
|
|
776
810
|
const sessionsControllerCreateShare = async (id, options) => {
|
|
777
811
|
return (0, custom_fetch_1.customFetch)((0, exports.getSessionsControllerCreateShareUrl)(id), {
|
|
778
812
|
...options,
|
|
@@ -780,13 +814,13 @@ const sessionsControllerCreateShare = async (id, options) => {
|
|
|
780
814
|
});
|
|
781
815
|
};
|
|
782
816
|
exports.sessionsControllerCreateShare = sessionsControllerCreateShare;
|
|
783
|
-
/**
|
|
784
|
-
* @summary Start a Kaniko-based container-image build for the session's primary repo HEAD. Dispatches `buildContainerImageWorkflow` on the xema-platform-worker. Idempotent per (sessionId, sha): a duplicate call returns the existing run id. Only standard interactive sessions can build — pipeline + sandbox sessions are rejected.
|
|
785
|
-
*/
|
|
786
817
|
const getBuildImageControllerStartUrl = (id) => {
|
|
787
818
|
return `/sessions/${id}/build-image`;
|
|
788
819
|
};
|
|
789
820
|
exports.getBuildImageControllerStartUrl = getBuildImageControllerStartUrl;
|
|
821
|
+
/**
|
|
822
|
+
* @summary Start a Kaniko-based container-image build for the session's primary repo HEAD. Dispatches `buildContainerImageWorkflow` on the xema-platform-worker. Idempotent per (sessionId, sha): a duplicate call returns the existing run id. Only standard interactive sessions can build — pipeline + sandbox sessions are rejected.
|
|
823
|
+
*/
|
|
790
824
|
const buildImageControllerStart = async (id, startBuildImageDto, options) => {
|
|
791
825
|
return (0, custom_fetch_1.customFetch)((0, exports.getBuildImageControllerStartUrl)(id), {
|
|
792
826
|
...options,
|
|
@@ -796,13 +830,13 @@ const buildImageControllerStart = async (id, startBuildImageDto, options) => {
|
|
|
796
830
|
});
|
|
797
831
|
};
|
|
798
832
|
exports.buildImageControllerStart = buildImageControllerStart;
|
|
799
|
-
/**
|
|
800
|
-
* @summary Describe a previously-started build-image workflow. The FE polls this to flip the button between Building… / Completed / Failed.
|
|
801
|
-
*/
|
|
802
833
|
const getBuildImageControllerStatusUrl = (id, workflowId) => {
|
|
803
834
|
return `/sessions/${id}/build-image/${workflowId}`;
|
|
804
835
|
};
|
|
805
836
|
exports.getBuildImageControllerStatusUrl = getBuildImageControllerStatusUrl;
|
|
837
|
+
/**
|
|
838
|
+
* @summary Describe a previously-started build-image workflow. The FE polls this to flip the button between Building… / Completed / Failed.
|
|
839
|
+
*/
|
|
806
840
|
const buildImageControllerStatus = async (id, workflowId, options) => {
|
|
807
841
|
return (0, custom_fetch_1.customFetch)((0, exports.getBuildImageControllerStatusUrl)(id, workflowId), {
|
|
808
842
|
...options,
|