@shivaedev/work-fleet 0.0.0 → 0.1.1
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/CHANGELOG.md +164 -0
- package/LICENSE +21 -0
- package/README.md +362 -1
- package/dist/DecisionCode.d.ts +4 -0
- package/dist/DecisionCode.d.ts.map +1 -0
- package/dist/DecisionCode.js +49 -0
- package/dist/DecisionCode.js.map +1 -0
- package/dist/admit.d.ts +494 -0
- package/dist/admit.d.ts.map +1 -0
- package/dist/admit.js +28 -0
- package/dist/admit.js.map +1 -0
- package/dist/attention.d.ts +18 -0
- package/dist/attention.d.ts.map +1 -0
- package/dist/attention.js +15 -0
- package/dist/attention.js.map +1 -0
- package/dist/board/acknowledgeDecision.d.ts +20 -0
- package/dist/board/acknowledgeDecision.d.ts.map +1 -0
- package/dist/board/acknowledgeDecision.js +44 -0
- package/dist/board/acknowledgeDecision.js.map +1 -0
- package/dist/board/briefRevision.d.ts +3 -0
- package/dist/board/briefRevision.d.ts.map +1 -0
- package/dist/board/briefRevision.js +13 -0
- package/dist/board/briefRevision.js.map +1 -0
- package/dist/board/completionFields.d.ts +8 -0
- package/dist/board/completionFields.d.ts.map +1 -0
- package/dist/board/completionFields.js +56 -0
- package/dist/board/completionFields.js.map +1 -0
- package/dist/board/completionMarkdown.d.ts +2 -0
- package/dist/board/completionMarkdown.d.ts.map +1 -0
- package/dist/board/completionMarkdown.js +24 -0
- package/dist/board/completionMarkdown.js.map +1 -0
- package/dist/board/decisionAnswer.d.ts +3 -0
- package/dist/board/decisionAnswer.d.ts.map +1 -0
- package/dist/board/decisionAnswer.js +11 -0
- package/dist/board/decisionAnswer.js.map +1 -0
- package/dist/board/decisionReading.d.ts +41 -0
- package/dist/board/decisionReading.d.ts.map +1 -0
- package/dist/board/decisionReading.js +43 -0
- package/dist/board/decisionReading.js.map +1 -0
- package/dist/board/documents.d.ts +14 -0
- package/dist/board/documents.d.ts.map +1 -0
- package/dist/board/documents.js +62 -0
- package/dist/board/documents.js.map +1 -0
- package/dist/board/fleetField.d.ts +5 -0
- package/dist/board/fleetField.d.ts.map +1 -0
- package/dist/board/fleetField.js +30 -0
- package/dist/board/fleetField.js.map +1 -0
- package/dist/board/markdown.d.ts +4 -0
- package/dist/board/markdown.d.ts.map +1 -0
- package/dist/board/markdown.js +92 -0
- package/dist/board/markdown.js.map +1 -0
- package/dist/board/publish.d.ts +57 -0
- package/dist/board/publish.d.ts.map +1 -0
- package/dist/board/publish.js +89 -0
- package/dist/board/publish.js.map +1 -0
- package/dist/board/publishReport.d.ts +39 -0
- package/dist/board/publishReport.d.ts.map +1 -0
- package/dist/board/publishReport.js +36 -0
- package/dist/board/publishReport.js.map +1 -0
- package/dist/board/readDocument.d.ts +14 -0
- package/dist/board/readDocument.d.ts.map +1 -0
- package/dist/board/readDocument.js +28 -0
- package/dist/board/readDocument.js.map +1 -0
- package/dist/board/readPass.d.ts +29 -0
- package/dist/board/readPass.d.ts.map +1 -0
- package/dist/board/readPass.js +84 -0
- package/dist/board/readPass.js.map +1 -0
- package/dist/board/reportContent.d.ts +5 -0
- package/dist/board/reportContent.d.ts.map +1 -0
- package/dist/board/reportContent.js +15 -0
- package/dist/board/reportContent.js.map +1 -0
- package/dist/board/reportFiles.d.ts +5 -0
- package/dist/board/reportFiles.d.ts.map +1 -0
- package/dist/board/reportFiles.js +64 -0
- package/dist/board/reportFiles.js.map +1 -0
- package/dist/board/reportIdentity.d.ts +11 -0
- package/dist/board/reportIdentity.d.ts.map +1 -0
- package/dist/board/reportIdentity.js +7 -0
- package/dist/board/reportIdentity.js.map +1 -0
- package/dist/board/reportLinks.d.ts +4 -0
- package/dist/board/reportLinks.d.ts.map +1 -0
- package/dist/board/reportLinks.js +16 -0
- package/dist/board/reportLinks.js.map +1 -0
- package/dist/board/reportPayload.d.ts +26 -0
- package/dist/board/reportPayload.d.ts.map +1 -0
- package/dist/board/reportPayload.js +53 -0
- package/dist/board/reportPayload.js.map +1 -0
- package/dist/board/reportPayloadFile.d.ts +4 -0
- package/dist/board/reportPayloadFile.d.ts.map +1 -0
- package/dist/board/reportPayloadFile.js +69 -0
- package/dist/board/reportPayloadFile.js.map +1 -0
- package/dist/board/schema.d.ts +75 -0
- package/dist/board/schema.d.ts.map +1 -0
- package/dist/board/schema.js +40 -0
- package/dist/board/schema.js.map +1 -0
- package/dist/board/statusMarkdown.d.ts +4 -0
- package/dist/board/statusMarkdown.d.ts.map +1 -0
- package/dist/board/statusMarkdown.js +34 -0
- package/dist/board/statusMarkdown.js.map +1 -0
- package/dist/board/workRevision.d.ts +2 -0
- package/dist/board/workRevision.d.ts.map +1 -0
- package/dist/board/workRevision.js +8 -0
- package/dist/board/workRevision.js.map +1 -0
- package/dist/board/writeCompletion.d.ts +3 -0
- package/dist/board/writeCompletion.d.ts.map +1 -0
- package/dist/board/writeCompletion.js +45 -0
- package/dist/board/writeCompletion.js.map +1 -0
- package/dist/board/writeHealth.d.ts +5 -0
- package/dist/board/writeHealth.d.ts.map +1 -0
- package/dist/board/writeHealth.js +20 -0
- package/dist/board/writeHealth.js.map +1 -0
- package/dist/board/writePublished.d.ts +4 -0
- package/dist/board/writePublished.d.ts.map +1 -0
- package/dist/board/writePublished.js +42 -0
- package/dist/board/writePublished.js.map +1 -0
- package/dist/board/writeStatus.d.ts +5 -0
- package/dist/board/writeStatus.d.ts.map +1 -0
- package/dist/board/writeStatus.js +8 -0
- package/dist/board/writeStatus.js.map +1 -0
- package/dist/cli.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +59 -0
- package/dist/cli.js.map +1 -0
- package/dist/completion.d.ts +8 -0
- package/dist/completion.d.ts.map +1 -0
- package/dist/completion.js +23 -0
- package/dist/completion.js.map +1 -0
- package/dist/engine/ReportInspection.d.ts +10 -0
- package/dist/engine/ReportInspection.d.ts.map +1 -0
- package/dist/engine/ReportInspection.js +4 -0
- package/dist/engine/ReportInspection.js.map +1 -0
- package/dist/engine/applyResolution.d.ts +983 -0
- package/dist/engine/applyResolution.d.ts.map +1 -0
- package/dist/engine/applyResolution.js +97 -0
- package/dist/engine/applyResolution.js.map +1 -0
- package/dist/engine/approveBrief.d.ts +1475 -0
- package/dist/engine/approveBrief.d.ts.map +1 -0
- package/dist/engine/approveBrief.js +82 -0
- package/dist/engine/approveBrief.js.map +1 -0
- package/dist/engine/authorizeResolution.d.ts +8355 -0
- package/dist/engine/authorizeResolution.d.ts.map +1 -0
- package/dist/engine/authorizeResolution.js +18 -0
- package/dist/engine/authorizeResolution.js.map +1 -0
- package/dist/engine/boardBrief.d.ts +1470 -0
- package/dist/engine/boardBrief.d.ts.map +1 -0
- package/dist/engine/boardBrief.js +57 -0
- package/dist/engine/boardBrief.js.map +1 -0
- package/dist/engine/capacityRetry.d.ts +25539 -0
- package/dist/engine/capacityRetry.d.ts.map +1 -0
- package/dist/engine/capacityRetry.js +55 -0
- package/dist/engine/capacityRetry.js.map +1 -0
- package/dist/engine/closeDecisions.d.ts +963 -0
- package/dist/engine/closeDecisions.d.ts.map +1 -0
- package/dist/engine/closeDecisions.js +74 -0
- package/dist/engine/closeDecisions.js.map +1 -0
- package/dist/engine/completeBoardWork.d.ts +965 -0
- package/dist/engine/completeBoardWork.d.ts.map +1 -0
- package/dist/engine/completeBoardWork.js +29 -0
- package/dist/engine/completeBoardWork.js.map +1 -0
- package/dist/engine/completeReport.d.ts +977 -0
- package/dist/engine/completeReport.d.ts.map +1 -0
- package/dist/engine/completeReport.js +20 -0
- package/dist/engine/completeReport.js.map +1 -0
- package/dist/engine/continueCommand.d.ts +485 -0
- package/dist/engine/continueCommand.d.ts.map +1 -0
- package/dist/engine/continueCommand.js +28 -0
- package/dist/engine/continueCommand.js.map +1 -0
- package/dist/engine/continueWorker.d.ts +984 -0
- package/dist/engine/continueWorker.d.ts.map +1 -0
- package/dist/engine/continueWorker.js +20 -0
- package/dist/engine/continueWorker.js.map +1 -0
- package/dist/engine/continuedRecord.d.ts +3 -0
- package/dist/engine/continuedRecord.d.ts.map +1 -0
- package/dist/engine/continuedRecord.js +23 -0
- package/dist/engine/continuedRecord.js.map +1 -0
- package/dist/engine/deliverPendingAnswers.d.ts +9797 -0
- package/dist/engine/deliverPendingAnswers.d.ts.map +1 -0
- package/dist/engine/deliverPendingAnswers.js +22 -0
- package/dist/engine/deliverPendingAnswers.js.map +1 -0
- package/dist/engine/deliveryFailure.d.ts +6 -0
- package/dist/engine/deliveryFailure.d.ts.map +1 -0
- package/dist/engine/deliveryFailure.js +11 -0
- package/dist/engine/deliveryFailure.js.map +1 -0
- package/dist/engine/dispatchCommand.d.ts +485 -0
- package/dist/engine/dispatchCommand.d.ts.map +1 -0
- package/dist/engine/dispatchCommand.js +69 -0
- package/dist/engine/dispatchCommand.js.map +1 -0
- package/dist/engine/ensureDecisionOwner.d.ts +963 -0
- package/dist/engine/ensureDecisionOwner.d.ts.map +1 -0
- package/dist/engine/ensureDecisionOwner.js +13 -0
- package/dist/engine/ensureDecisionOwner.js.map +1 -0
- package/dist/engine/ensurePublication.d.ts +964 -0
- package/dist/engine/ensurePublication.d.ts.map +1 -0
- package/dist/engine/ensurePublication.js +25 -0
- package/dist/engine/ensurePublication.js.map +1 -0
- package/dist/engine/exhaustedCheckRepairs.d.ts +3 -0
- package/dist/engine/exhaustedCheckRepairs.d.ts.map +1 -0
- package/dist/engine/exhaustedCheckRepairs.js +10 -0
- package/dist/engine/exhaustedCheckRepairs.js.map +1 -0
- package/dist/engine/failureCode.d.ts +3 -0
- package/dist/engine/failureCode.d.ts.map +1 -0
- package/dist/engine/failureCode.js +28 -0
- package/dist/engine/failureCode.js.map +1 -0
- package/dist/engine/failureContext.d.ts +14 -0
- package/dist/engine/failureContext.d.ts.map +1 -0
- package/dist/engine/failureContext.js +9 -0
- package/dist/engine/failureContext.js.map +1 -0
- package/dist/engine/failureMessage.d.ts +2 -0
- package/dist/engine/failureMessage.d.ts.map +1 -0
- package/dist/engine/failureMessage.js +20 -0
- package/dist/engine/failureMessage.js.map +1 -0
- package/dist/engine/failureOwner.d.ts +3 -0
- package/dist/engine/failureOwner.d.ts.map +1 -0
- package/dist/engine/failureOwner.js +9 -0
- package/dist/engine/failureOwner.js.map +1 -0
- package/dist/engine/health.d.ts +36 -0
- package/dist/engine/health.d.ts.map +1 -0
- package/dist/engine/health.js +26 -0
- package/dist/engine/health.js.map +1 -0
- package/dist/engine/inspectRenewal.d.ts +974 -0
- package/dist/engine/inspectRenewal.d.ts.map +1 -0
- package/dist/engine/inspectRenewal.js +53 -0
- package/dist/engine/inspectRenewal.js.map +1 -0
- package/dist/engine/launchInput.d.ts +492 -0
- package/dist/engine/launchInput.d.ts.map +1 -0
- package/dist/engine/launchInput.js +24 -0
- package/dist/engine/launchInput.js.map +1 -0
- package/dist/engine/launchObservationRetries.d.ts +3 -0
- package/dist/engine/launchObservationRetries.d.ts.map +1 -0
- package/dist/engine/launchObservationRetries.js +4 -0
- package/dist/engine/launchObservationRetries.js.map +1 -0
- package/dist/engine/launchReceipt.d.ts +486 -0
- package/dist/engine/launchReceipt.d.ts.map +1 -0
- package/dist/engine/launchReceipt.js +14 -0
- package/dist/engine/launchReceipt.js.map +1 -0
- package/dist/engine/launchRecord.d.ts +4 -0
- package/dist/engine/launchRecord.d.ts.map +1 -0
- package/dist/engine/launchRecord.js +8 -0
- package/dist/engine/launchRecord.js.map +1 -0
- package/dist/engine/localOnlyCriteria.d.ts +13 -0
- package/dist/engine/localOnlyCriteria.d.ts.map +1 -0
- package/dist/engine/localOnlyCriteria.js +13 -0
- package/dist/engine/localOnlyCriteria.js.map +1 -0
- package/dist/engine/makeAdopt.d.ts +974 -0
- package/dist/engine/makeAdopt.d.ts.map +1 -0
- package/dist/engine/makeAdopt.js +52 -0
- package/dist/engine/makeAdopt.js.map +1 -0
- package/dist/engine/makeAdvance.d.ts +485 -0
- package/dist/engine/makeAdvance.d.ts.map +1 -0
- package/dist/engine/makeAdvance.js +79 -0
- package/dist/engine/makeAdvance.js.map +1 -0
- package/dist/engine/makeDeliver.d.ts +963 -0
- package/dist/engine/makeDeliver.d.ts.map +1 -0
- package/dist/engine/makeDeliver.js +85 -0
- package/dist/engine/makeDeliver.js.map +1 -0
- package/dist/engine/makeHuman.d.ts +965 -0
- package/dist/engine/makeHuman.d.ts.map +1 -0
- package/dist/engine/makeHuman.js +39 -0
- package/dist/engine/makeHuman.js.map +1 -0
- package/dist/engine/makeLaunch.d.ts +971 -0
- package/dist/engine/makeLaunch.d.ts.map +1 -0
- package/dist/engine/makeLaunch.js +75 -0
- package/dist/engine/makeLaunch.js.map +1 -0
- package/dist/engine/makeObserve.d.ts +964 -0
- package/dist/engine/makeObserve.d.ts.map +1 -0
- package/dist/engine/makeObserve.js +89 -0
- package/dist/engine/makeObserve.js.map +1 -0
- package/dist/engine/makeReview.d.ts +973 -0
- package/dist/engine/makeReview.d.ts.map +1 -0
- package/dist/engine/makeReview.js +84 -0
- package/dist/engine/makeReview.js.map +1 -0
- package/dist/engine/makeState.d.ts +7880 -0
- package/dist/engine/makeState.d.ts.map +1 -0
- package/dist/engine/makeState.js +61 -0
- package/dist/engine/makeState.js.map +1 -0
- package/dist/engine/makeValidate.d.ts +973 -0
- package/dist/engine/makeValidate.d.ts.map +1 -0
- package/dist/engine/makeValidate.js +34 -0
- package/dist/engine/makeValidate.js.map +1 -0
- package/dist/engine/mergeReadiness.d.ts +10759 -0
- package/dist/engine/mergeReadiness.d.ts.map +1 -0
- package/dist/engine/mergeReadiness.js +25 -0
- package/dist/engine/mergeReadiness.js.map +1 -0
- package/dist/engine/observeDeliveryFailure.d.ts +8836 -0
- package/dist/engine/observeDeliveryFailure.d.ts.map +1 -0
- package/dist/engine/observeDeliveryFailure.js +40 -0
- package/dist/engine/observeDeliveryFailure.js.map +1 -0
- package/dist/engine/observeRenewal.d.ts +1535 -0
- package/dist/engine/observeRenewal.d.ts.map +1 -0
- package/dist/engine/observeRenewal.js +27 -0
- package/dist/engine/observeRenewal.js.map +1 -0
- package/dist/engine/observedAttempt.d.ts +4 -0
- package/dist/engine/observedAttempt.d.ts.map +1 -0
- package/dist/engine/observedAttempt.js +15 -0
- package/dist/engine/observedAttempt.js.map +1 -0
- package/dist/engine/obtainReview.d.ts +515 -0
- package/dist/engine/obtainReview.d.ts.map +1 -0
- package/dist/engine/obtainReview.js +100 -0
- package/dist/engine/obtainReview.js.map +1 -0
- package/dist/engine/operationRecord.d.ts +6299 -0
- package/dist/engine/operationRecord.d.ts.map +1 -0
- package/dist/engine/operationRecord.js +19 -0
- package/dist/engine/operationRecord.js.map +1 -0
- package/dist/engine/originalWork.d.ts +4 -0
- package/dist/engine/originalWork.d.ts.map +1 -0
- package/dist/engine/originalWork.js +14 -0
- package/dist/engine/originalWork.js.map +1 -0
- package/dist/engine/pendingAcknowledgements.d.ts +9 -0
- package/dist/engine/pendingAcknowledgements.d.ts.map +1 -0
- package/dist/engine/pendingAcknowledgements.js +38 -0
- package/dist/engine/pendingAcknowledgements.js.map +1 -0
- package/dist/engine/persistTerminalReceipts.d.ts +968 -0
- package/dist/engine/persistTerminalReceipts.d.ts.map +1 -0
- package/dist/engine/persistTerminalReceipts.js +12 -0
- package/dist/engine/persistTerminalReceipts.js.map +1 -0
- package/dist/engine/prepareCommand.d.ts +488 -0
- package/dist/engine/prepareCommand.d.ts.map +1 -0
- package/dist/engine/prepareCommand.js +69 -0
- package/dist/engine/prepareCommand.js.map +1 -0
- package/dist/engine/queueAnswerCommand.d.ts +487 -0
- package/dist/engine/queueAnswerCommand.d.ts.map +1 -0
- package/dist/engine/queueAnswerCommand.js +15 -0
- package/dist/engine/queueAnswerCommand.js.map +1 -0
- package/dist/engine/readOrContinueReview.d.ts +517 -0
- package/dist/engine/readOrContinueReview.d.ts.map +1 -0
- package/dist/engine/readOrContinueReview.js +54 -0
- package/dist/engine/readOrContinueReview.js.map +1 -0
- package/dist/engine/readResolution.d.ts +134 -0
- package/dist/engine/readResolution.d.ts.map +1 -0
- package/dist/engine/readResolution.js +45 -0
- package/dist/engine/readResolution.js.map +1 -0
- package/dist/engine/readRetry.d.ts +17668 -0
- package/dist/engine/readRetry.d.ts.map +1 -0
- package/dist/engine/readRetry.js +80 -0
- package/dist/engine/readRetry.js.map +1 -0
- package/dist/engine/reassignCommand.d.ts +484 -0
- package/dist/engine/reassignCommand.d.ts.map +1 -0
- package/dist/engine/reassignCommand.js +40 -0
- package/dist/engine/reassignCommand.js.map +1 -0
- package/dist/engine/reconcileAttempt.d.ts +534 -0
- package/dist/engine/reconcileAttempt.d.ts.map +1 -0
- package/dist/engine/reconcileAttempt.js +26 -0
- package/dist/engine/reconcileAttempt.js.map +1 -0
- package/dist/engine/reconcileCommand.d.ts +486 -0
- package/dist/engine/reconcileCommand.d.ts.map +1 -0
- package/dist/engine/reconcileCommand.js +52 -0
- package/dist/engine/reconcileCommand.js.map +1 -0
- package/dist/engine/recoverStall.d.ts +8881 -0
- package/dist/engine/recoverStall.d.ts.map +1 -0
- package/dist/engine/recoverStall.js +62 -0
- package/dist/engine/recoverStall.js.map +1 -0
- package/dist/engine/recoverUnobservable.d.ts +8881 -0
- package/dist/engine/recoverUnobservable.d.ts.map +1 -0
- package/dist/engine/recoverUnobservable.js +26 -0
- package/dist/engine/recoverUnobservable.js.map +1 -0
- package/dist/engine/refreshBrief.d.ts +17675 -0
- package/dist/engine/refreshBrief.d.ts.map +1 -0
- package/dist/engine/refreshBrief.js +48 -0
- package/dist/engine/refreshBrief.js.map +1 -0
- package/dist/engine/refreshReviewResult.d.ts +984 -0
- package/dist/engine/refreshReviewResult.d.ts.map +1 -0
- package/dist/engine/refreshReviewResult.js +69 -0
- package/dist/engine/refreshReviewResult.js.map +1 -0
- package/dist/engine/releaseClosedPreparation.d.ts +8845 -0
- package/dist/engine/releaseClosedPreparation.d.ts.map +1 -0
- package/dist/engine/releaseClosedPreparation.js +17 -0
- package/dist/engine/releaseClosedPreparation.js.map +1 -0
- package/dist/engine/releaseExecution.d.ts +8836 -0
- package/dist/engine/releaseExecution.d.ts.map +1 -0
- package/dist/engine/releaseExecution.js +54 -0
- package/dist/engine/releaseExecution.js.map +1 -0
- package/dist/engine/releaseFinishedWork.d.ts +485 -0
- package/dist/engine/releaseFinishedWork.d.ts.map +1 -0
- package/dist/engine/releaseFinishedWork.js +27 -0
- package/dist/engine/releaseFinishedWork.js.map +1 -0
- package/dist/engine/releaseOnly.d.ts +3 -0
- package/dist/engine/releaseOnly.d.ts.map +1 -0
- package/dist/engine/releaseOnly.js +19 -0
- package/dist/engine/releaseOnly.js.map +1 -0
- package/dist/engine/releaseReceipts.d.ts +12 -0
- package/dist/engine/releaseReceipts.d.ts.map +1 -0
- package/dist/engine/releaseReceipts.js +20 -0
- package/dist/engine/releaseReceipts.js.map +1 -0
- package/dist/engine/repository.d.ts +5824 -0
- package/dist/engine/repository.d.ts.map +1 -0
- package/dist/engine/repository.js +112 -0
- package/dist/engine/repository.js.map +1 -0
- package/dist/engine/requestConflictRepair.d.ts +8835 -0
- package/dist/engine/requestConflictRepair.d.ts.map +1 -0
- package/dist/engine/requestConflictRepair.js +26 -0
- package/dist/engine/requestConflictRepair.js.map +1 -0
- package/dist/engine/requestRework.d.ts +983 -0
- package/dist/engine/requestRework.d.ts.map +1 -0
- package/dist/engine/requestRework.js +35 -0
- package/dist/engine/requestRework.js.map +1 -0
- package/dist/engine/reserveRenewal.d.ts +25 -0
- package/dist/engine/reserveRenewal.d.ts.map +1 -0
- package/dist/engine/reserveRenewal.js +15 -0
- package/dist/engine/reserveRenewal.js.map +1 -0
- package/dist/engine/resolveCommand.d.ts +484 -0
- package/dist/engine/resolveCommand.d.ts.map +1 -0
- package/dist/engine/resolveCommand.js +36 -0
- package/dist/engine/resolveCommand.js.map +1 -0
- package/dist/engine/resolveExecution.d.ts +8834 -0
- package/dist/engine/resolveExecution.d.ts.map +1 -0
- package/dist/engine/resolveExecution.js +32 -0
- package/dist/engine/resolveExecution.js.map +1 -0
- package/dist/engine/restartableReview.d.ts +4 -0
- package/dist/engine/restartableReview.d.ts.map +1 -0
- package/dist/engine/restartableReview.js +14 -0
- package/dist/engine/restartableReview.js.map +1 -0
- package/dist/engine/resumeAttempt.d.ts +8884 -0
- package/dist/engine/resumeAttempt.d.ts.map +1 -0
- package/dist/engine/resumeAttempt.js +21 -0
- package/dist/engine/resumeAttempt.js.map +1 -0
- package/dist/engine/retireUnacknowledged.d.ts +967 -0
- package/dist/engine/retireUnacknowledged.d.ts.map +1 -0
- package/dist/engine/retireUnacknowledged.js +14 -0
- package/dist/engine/retireUnacknowledged.js.map +1 -0
- package/dist/engine/retryPrompt.d.ts +3 -0
- package/dist/engine/retryPrompt.d.ts.map +1 -0
- package/dist/engine/retryPrompt.js +13 -0
- package/dist/engine/retryPrompt.js.map +1 -0
- package/dist/engine/retryTerminal.d.ts +8370 -0
- package/dist/engine/retryTerminal.d.ts.map +1 -0
- package/dist/engine/retryTerminal.js +15 -0
- package/dist/engine/retryTerminal.js.map +1 -0
- package/dist/engine/scheduler.d.ts +966 -0
- package/dist/engine/scheduler.d.ts.map +1 -0
- package/dist/engine/scheduler.js +68 -0
- package/dist/engine/scheduler.js.map +1 -0
- package/dist/engine/sessionCleanup.d.ts +965 -0
- package/dist/engine/sessionCleanup.d.ts.map +1 -0
- package/dist/engine/sessionCleanup.js +42 -0
- package/dist/engine/sessionCleanup.js.map +1 -0
- package/dist/engine/sessionStatus.d.ts +3 -0
- package/dist/engine/sessionStatus.d.ts.map +1 -0
- package/dist/engine/sessionStatus.js +13 -0
- package/dist/engine/sessionStatus.js.map +1 -0
- package/dist/engine/settleMergedDelivery.d.ts +8839 -0
- package/dist/engine/settleMergedDelivery.d.ts.map +1 -0
- package/dist/engine/settleMergedDelivery.js +16 -0
- package/dist/engine/settleMergedDelivery.js.map +1 -0
- package/dist/engine/submissionFailure.d.ts +7875 -0
- package/dist/engine/submissionFailure.d.ts.map +1 -0
- package/dist/engine/submissionFailure.js +32 -0
- package/dist/engine/submissionFailure.js.map +1 -0
- package/dist/engine/submitLaunch.d.ts +8358 -0
- package/dist/engine/submitLaunch.d.ts.map +1 -0
- package/dist/engine/submitLaunch.js +17 -0
- package/dist/engine/submitLaunch.js.map +1 -0
- package/dist/engine/threadNames.d.ts +4 -0
- package/dist/engine/threadNames.d.ts.map +1 -0
- package/dist/engine/threadNames.js +53 -0
- package/dist/engine/threadNames.js.map +1 -0
- package/dist/engine/views.d.ts +3 -0
- package/dist/engine/views.d.ts.map +1 -0
- package/dist/engine/views.js +40 -0
- package/dist/engine/views.js.map +1 -0
- package/dist/engine/workerReport.d.ts +1464 -0
- package/dist/engine/workerReport.d.ts.map +1 -0
- package/dist/engine/workerReport.js +43 -0
- package/dist/engine/workerReport.js.map +1 -0
- package/dist/errors.d.ts +13 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +6 -0
- package/dist/errors.js.map +1 -0
- package/dist/exposeFailure.d.ts +4 -0
- package/dist/exposeFailure.d.ts.map +1 -0
- package/dist/exposeFailure.js +26 -0
- package/dist/exposeFailure.js.map +1 -0
- package/dist/fleet.d.ts +4827 -0
- package/dist/fleet.d.ts.map +1 -0
- package/dist/fleet.js +41 -0
- package/dist/fleet.js.map +1 -0
- package/dist/fleetRecords.d.ts +2 -0
- package/dist/fleetRecords.d.ts.map +1 -0
- package/dist/fleetRecords.js +4 -0
- package/dist/fleetRecords.js.map +1 -0
- package/dist/host/actionCommands.d.ts +35 -0
- package/dist/host/actionCommands.d.ts.map +1 -0
- package/dist/host/actionCommands.js +49 -0
- package/dist/host/actionCommands.js.map +1 -0
- package/dist/host/admission.d.ts +979 -0
- package/dist/host/admission.d.ts.map +1 -0
- package/dist/host/admission.js +105 -0
- package/dist/host/admission.js.map +1 -0
- package/dist/host/answerText.d.ts +4 -0
- package/dist/host/answerText.d.ts.map +1 -0
- package/dist/host/answerText.js +11 -0
- package/dist/host/answerText.js.map +1 -0
- package/dist/host/answerWork.d.ts +483 -0
- package/dist/host/answerWork.d.ts.map +1 -0
- package/dist/host/answerWork.js +70 -0
- package/dist/host/answerWork.js.map +1 -0
- package/dist/host/applyReportPatch.d.ts +4 -0
- package/dist/host/applyReportPatch.d.ts.map +1 -0
- package/dist/host/applyReportPatch.js +107 -0
- package/dist/host/applyReportPatch.js.map +1 -0
- package/dist/host/cliOptions.d.ts +7 -0
- package/dist/host/cliOptions.d.ts.map +1 -0
- package/dist/host/cliOptions.js +12 -0
- package/dist/host/cliOptions.js.map +1 -0
- package/dist/host/commands.d.ts +979 -0
- package/dist/host/commands.d.ts.map +1 -0
- package/dist/host/commands.js +39 -0
- package/dist/host/commands.js.map +1 -0
- package/dist/host/config.d.ts +86 -0
- package/dist/host/config.d.ts.map +1 -0
- package/dist/host/config.js +81 -0
- package/dist/host/config.js.map +1 -0
- package/dist/host/continuationMessage.d.ts +5 -0
- package/dist/host/continuationMessage.d.ts.map +1 -0
- package/dist/host/continuationMessage.js +13 -0
- package/dist/host/continuationMessage.js.map +1 -0
- package/dist/host/daemon.d.ts +5537 -0
- package/dist/host/daemon.d.ts.map +1 -0
- package/dist/host/daemon.js +37 -0
- package/dist/host/daemon.js.map +1 -0
- package/dist/host/daemonClient.d.ts +5520 -0
- package/dist/host/daemonClient.d.ts.map +1 -0
- package/dist/host/daemonClient.js +27 -0
- package/dist/host/daemonClient.js.map +1 -0
- package/dist/host/daemonContract.d.ts +9040 -0
- package/dist/host/daemonContract.d.ts.map +1 -0
- package/dist/host/daemonContract.js +63 -0
- package/dist/host/daemonContract.js.map +1 -0
- package/dist/host/daemonDiagnostics.d.ts +4 -0
- package/dist/host/daemonDiagnostics.d.ts.map +1 -0
- package/dist/host/daemonDiagnostics.js +17 -0
- package/dist/host/daemonDiagnostics.js.map +1 -0
- package/dist/host/daemonHandlers.d.ts +4 -0
- package/dist/host/daemonHandlers.d.ts.map +1 -0
- package/dist/host/daemonHandlers.js +23 -0
- package/dist/host/daemonHandlers.js.map +1 -0
- package/dist/host/daemonSnapshots.d.ts +25 -0
- package/dist/host/daemonSnapshots.d.ts.map +1 -0
- package/dist/host/daemonSnapshots.js +15 -0
- package/dist/host/daemonSnapshots.js.map +1 -0
- package/dist/host/defaults.d.ts +5 -0
- package/dist/host/defaults.d.ts.map +1 -0
- package/dist/host/defaults.js +5 -0
- package/dist/host/defaults.js.map +1 -0
- package/dist/host/fleetItems.d.ts +22 -0
- package/dist/host/fleetItems.d.ts.map +1 -0
- package/dist/host/fleetItems.js +30 -0
- package/dist/host/fleetItems.js.map +1 -0
- package/dist/host/follow.d.ts +10 -0
- package/dist/host/follow.d.ts.map +1 -0
- package/dist/host/follow.js +30 -0
- package/dist/host/follow.js.map +1 -0
- package/dist/host/followCommands.d.ts +20 -0
- package/dist/host/followCommands.d.ts.map +1 -0
- package/dist/host/followCommands.js +45 -0
- package/dist/host/followCommands.js.map +1 -0
- package/dist/host/followState.d.ts +9 -0
- package/dist/host/followState.d.ts.map +1 -0
- package/dist/host/followState.js +30 -0
- package/dist/host/followState.js.map +1 -0
- package/dist/host/github.d.ts +32 -0
- package/dist/host/github.d.ts.map +1 -0
- package/dist/host/github.js +19 -0
- package/dist/host/github.js.map +1 -0
- package/dist/host/githubCheckState.d.ts +34 -0
- package/dist/host/githubCheckState.d.ts.map +1 -0
- package/dist/host/githubCheckState.js +74 -0
- package/dist/host/githubCheckState.js.map +1 -0
- package/dist/host/githubChecks.d.ts +31 -0
- package/dist/host/githubChecks.d.ts.map +1 -0
- package/dist/host/githubChecks.js +38 -0
- package/dist/host/githubChecks.js.map +1 -0
- package/dist/host/githubDelivery.d.ts +15 -0
- package/dist/host/githubDelivery.d.ts.map +1 -0
- package/dist/host/githubDelivery.js +53 -0
- package/dist/host/githubDelivery.js.map +1 -0
- package/dist/host/githubRead.d.ts +5 -0
- package/dist/host/githubRead.d.ts.map +1 -0
- package/dist/host/githubRead.js +15 -0
- package/dist/host/githubRead.js.map +1 -0
- package/dist/host/githubRequiredChecks.d.ts +5 -0
- package/dist/host/githubRequiredChecks.d.ts.map +1 -0
- package/dist/host/githubRequiredChecks.js +13 -0
- package/dist/host/githubRequiredChecks.js.map +1 -0
- package/dist/host/githubResult.d.ts +42 -0
- package/dist/host/githubResult.d.ts.map +1 -0
- package/dist/host/githubResult.js +60 -0
- package/dist/host/githubResult.js.map +1 -0
- package/dist/host/guidance.d.ts +4 -0
- package/dist/host/guidance.d.ts.map +1 -0
- package/dist/host/guidance.js +28 -0
- package/dist/host/guidance.js.map +1 -0
- package/dist/host/healthLayer.d.ts +4 -0
- package/dist/host/healthLayer.d.ts.map +1 -0
- package/dist/host/healthLayer.js +16 -0
- package/dist/host/healthLayer.js.map +1 -0
- package/dist/host/localOnlyBoardPath.d.ts +4 -0
- package/dist/host/localOnlyBoardPath.d.ts.map +1 -0
- package/dist/host/localOnlyBoardPath.js +24 -0
- package/dist/host/localOnlyBoardPath.js.map +1 -0
- package/dist/host/mainSource.d.ts +21 -0
- package/dist/host/mainSource.d.ts.map +1 -0
- package/dist/host/mainSource.js +71 -0
- package/dist/host/mainSource.js.map +1 -0
- package/dist/host/nameThreads.d.ts +10 -0
- package/dist/host/nameThreads.d.ts.map +1 -0
- package/dist/host/nameThreads.js +46 -0
- package/dist/host/nameThreads.js.map +1 -0
- package/dist/host/providerHealth.d.ts +4 -0
- package/dist/host/providerHealth.d.ts.map +1 -0
- package/dist/host/providerHealth.js +46 -0
- package/dist/host/providerHealth.js.map +1 -0
- package/dist/host/providers.d.ts +6 -0
- package/dist/host/providers.d.ts.map +1 -0
- package/dist/host/providers.js +27 -0
- package/dist/host/providers.js.map +1 -0
- package/dist/host/quota.d.ts +10 -0
- package/dist/host/quota.d.ts.map +1 -0
- package/dist/host/quota.js +30 -0
- package/dist/host/quota.js.map +1 -0
- package/dist/host/readCommand.d.ts +5 -0
- package/dist/host/readCommand.d.ts.map +1 -0
- package/dist/host/readCommand.js +18 -0
- package/dist/host/readCommand.js.map +1 -0
- package/dist/host/readWaitStates.d.ts +25 -0
- package/dist/host/readWaitStates.d.ts.map +1 -0
- package/dist/host/readWaitStates.js +26 -0
- package/dist/host/readWaitStates.js.map +1 -0
- package/dist/host/reassignWork.d.ts +485 -0
- package/dist/host/reassignWork.d.ts.map +1 -0
- package/dist/host/reassignWork.js +9 -0
- package/dist/host/reassignWork.js.map +1 -0
- package/dist/host/recordDecisionResponse.d.ts +40 -0
- package/dist/host/recordDecisionResponse.d.ts.map +1 -0
- package/dist/host/recordDecisionResponse.js +37 -0
- package/dist/host/recordDecisionResponse.js.map +1 -0
- package/dist/host/recordPayloads.d.ts +4 -0
- package/dist/host/recordPayloads.d.ts.map +1 -0
- package/dist/host/recordPayloads.js +16 -0
- package/dist/host/recordPayloads.js.map +1 -0
- package/dist/host/releaseWork.d.ts +965 -0
- package/dist/host/releaseWork.d.ts.map +1 -0
- package/dist/host/releaseWork.js +47 -0
- package/dist/host/releaseWork.js.map +1 -0
- package/dist/host/renderStatus.d.ts +3 -0
- package/dist/host/renderStatus.d.ts.map +1 -0
- package/dist/host/renderStatus.js +26 -0
- package/dist/host/renderStatus.js.map +1 -0
- package/dist/host/reportAttachmentFiles.d.ts +5 -0
- package/dist/host/reportAttachmentFiles.d.ts.map +1 -0
- package/dist/host/reportAttachmentFiles.js +71 -0
- package/dist/host/reportAttachmentFiles.js.map +1 -0
- package/dist/host/reportBoard.d.ts +11 -0
- package/dist/host/reportBoard.d.ts.map +1 -0
- package/dist/host/reportBoard.js +103 -0
- package/dist/host/reportBoard.js.map +1 -0
- package/dist/host/reportFileChanges.d.ts +19 -0
- package/dist/host/reportFileChanges.d.ts.map +1 -0
- package/dist/host/reportFileChanges.js +31 -0
- package/dist/host/reportFileChanges.js.map +1 -0
- package/dist/host/reportFileReplay.d.ts +19 -0
- package/dist/host/reportFileReplay.d.ts.map +1 -0
- package/dist/host/reportFileReplay.js +102 -0
- package/dist/host/reportFileReplay.js.map +1 -0
- package/dist/host/reportPublication.d.ts +7 -0
- package/dist/host/reportPublication.d.ts.map +1 -0
- package/dist/host/reportPublication.js +23 -0
- package/dist/host/reportPublication.js.map +1 -0
- package/dist/host/resultReport.d.ts +13 -0
- package/dist/host/resultReport.d.ts.map +1 -0
- package/dist/host/resultReport.js +29 -0
- package/dist/host/resultReport.js.map +1 -0
- package/dist/host/runtime.d.ts +18 -0
- package/dist/host/runtime.d.ts.map +1 -0
- package/dist/host/runtime.js +91 -0
- package/dist/host/runtime.js.map +1 -0
- package/dist/host/snapshotStream.d.ts +7 -0
- package/dist/host/snapshotStream.d.ts.map +1 -0
- package/dist/host/snapshotStream.js +15 -0
- package/dist/host/snapshotStream.js.map +1 -0
- package/dist/host/status.d.ts +294 -0
- package/dist/host/status.d.ts.map +1 -0
- package/dist/host/status.js +14 -0
- package/dist/host/status.js.map +1 -0
- package/dist/host/statusLayer.d.ts +7 -0
- package/dist/host/statusLayer.d.ts.map +1 -0
- package/dist/host/statusLayer.js +76 -0
- package/dist/host/statusLayer.js.map +1 -0
- package/dist/host/wait.d.ts +36 -0
- package/dist/host/wait.d.ts.map +1 -0
- package/dist/host/wait.js +23 -0
- package/dist/host/wait.js.map +1 -0
- package/dist/host/waitOutcome.d.ts +52 -0
- package/dist/host/waitOutcome.d.ts.map +1 -0
- package/dist/host/waitOutcome.js +36 -0
- package/dist/host/waitOutcome.js.map +1 -0
- package/dist/host/watch.d.ts +7 -0
- package/dist/host/watch.d.ts.map +1 -0
- package/dist/host/watch.js +54 -0
- package/dist/host/watch.js.map +1 -0
- package/dist/model.d.ts +1122 -0
- package/dist/model.d.ts.map +1 -0
- package/dist/model.js +114 -0
- package/dist/model.js.map +1 -0
- package/dist/operations.d.ts +11167 -0
- package/dist/operations.d.ts.map +1 -0
- package/dist/operations.js +72 -0
- package/dist/operations.js.map +1 -0
- package/dist/packageInfo.d.ts +4 -0
- package/dist/packageInfo.d.ts.map +1 -0
- package/dist/packageInfo.js +4 -0
- package/dist/packageInfo.js.map +1 -0
- package/dist/policy.d.ts +196 -0
- package/dist/policy.d.ts.map +1 -0
- package/dist/policy.js +85 -0
- package/dist/policy.js.map +1 -0
- package/dist/policyGuidance.d.ts +4 -0
- package/dist/policyGuidance.d.ts.map +1 -0
- package/dist/policyGuidance.js +5 -0
- package/dist/policyGuidance.js.map +1 -0
- package/dist/preparation/compatibility.d.ts +60 -0
- package/dist/preparation/compatibility.d.ts.map +1 -0
- package/dist/preparation/compatibility.js +41 -0
- package/dist/preparation/compatibility.js.map +1 -0
- package/dist/preparation/schema.d.ts +78 -0
- package/dist/preparation/schema.d.ts.map +1 -0
- package/dist/preparation/schema.js +43 -0
- package/dist/preparation/schema.js.map +1 -0
- package/dist/prompt/reviewer.d.ts +31 -0
- package/dist/prompt/reviewer.d.ts.map +1 -0
- package/dist/prompt/reviewer.js +49 -0
- package/dist/prompt/reviewer.js.map +1 -0
- package/dist/prompt/worker.d.ts +28 -0
- package/dist/prompt/worker.d.ts.map +1 -0
- package/dist/prompt/worker.js +116 -0
- package/dist/prompt/worker.js.map +1 -0
- package/dist/providers/capacity.d.ts +2 -0
- package/dist/providers/capacity.d.ts.map +1 -0
- package/dist/providers/capacity.js +8 -0
- package/dist/providers/capacity.js.map +1 -0
- package/dist/providers/codexAdapter.d.ts +13 -0
- package/dist/providers/codexAdapter.d.ts.map +1 -0
- package/dist/providers/codexAdapter.js +55 -0
- package/dist/providers/codexAdapter.js.map +1 -0
- package/dist/providers/codexCloud.d.ts +40 -0
- package/dist/providers/codexCloud.d.ts.map +1 -0
- package/dist/providers/codexCloud.js +92 -0
- package/dist/providers/codexCloud.js.map +1 -0
- package/dist/providers/codexCloudConnection.d.ts +5 -0
- package/dist/providers/codexCloudConnection.d.ts.map +1 -0
- package/dist/providers/codexCloudConnection.js +34 -0
- package/dist/providers/codexCloudConnection.js.map +1 -0
- package/dist/providers/codexLocal.d.ts +16 -0
- package/dist/providers/codexLocal.d.ts.map +1 -0
- package/dist/providers/codexLocal.js +49 -0
- package/dist/providers/codexLocal.js.map +1 -0
- package/dist/providers/codexLogin.d.ts +16 -0
- package/dist/providers/codexLogin.d.ts.map +1 -0
- package/dist/providers/codexLogin.js +63 -0
- package/dist/providers/codexLogin.js.map +1 -0
- package/dist/providers/codexProtocol.d.ts +81 -0
- package/dist/providers/codexProtocol.d.ts.map +1 -0
- package/dist/providers/codexProtocol.js +33 -0
- package/dist/providers/codexProtocol.js.map +1 -0
- package/dist/providers/codexReportAttachments.d.ts +21 -0
- package/dist/providers/codexReportAttachments.d.ts.map +1 -0
- package/dist/providers/codexReportAttachments.js +17 -0
- package/dist/providers/codexReportAttachments.js.map +1 -0
- package/dist/providers/codexRpc.d.ts +24 -0
- package/dist/providers/codexRpc.d.ts.map +1 -0
- package/dist/providers/codexRpc.js +109 -0
- package/dist/providers/codexRpc.js.map +1 -0
- package/dist/providers/codexSettings.d.ts +20 -0
- package/dist/providers/codexSettings.d.ts.map +1 -0
- package/dist/providers/codexSettings.js +24 -0
- package/dist/providers/codexSettings.js.map +1 -0
- package/dist/providers/codexTurns.d.ts +72 -0
- package/dist/providers/codexTurns.d.ts.map +1 -0
- package/dist/providers/codexTurns.js +128 -0
- package/dist/providers/codexTurns.js.map +1 -0
- package/dist/providers/genericRejection.d.ts +3 -0
- package/dist/providers/genericRejection.d.ts.map +1 -0
- package/dist/providers/genericRejection.js +7 -0
- package/dist/providers/genericRejection.js.map +1 -0
- package/dist/providers/makeWaitUntilIdle.d.ts +4 -0
- package/dist/providers/makeWaitUntilIdle.d.ts.map +1 -0
- package/dist/providers/makeWaitUntilIdle.js +27 -0
- package/dist/providers/makeWaitUntilIdle.js.map +1 -0
- package/dist/providers/observeCodexTurn.d.ts +23 -0
- package/dist/providers/observeCodexTurn.d.ts.map +1 -0
- package/dist/providers/observeCodexTurn.js +39 -0
- package/dist/providers/observeCodexTurn.js.map +1 -0
- package/dist/providers/readActiveTurn.d.ts +6 -0
- package/dist/providers/readActiveTurn.d.ts.map +1 -0
- package/dist/providers/readActiveTurn.js +22 -0
- package/dist/providers/readActiveTurn.js.map +1 -0
- package/dist/providers/recoverTurn.d.ts +10 -0
- package/dist/providers/recoverTurn.d.ts.map +1 -0
- package/dist/providers/recoverTurn.js +54 -0
- package/dist/providers/recoverTurn.js.map +1 -0
- package/dist/providers/startCodexTurn.d.ts +9 -0
- package/dist/providers/startCodexTurn.d.ts.map +1 -0
- package/dist/providers/startCodexTurn.js +59 -0
- package/dist/providers/startCodexTurn.js.map +1 -0
- package/dist/qualifyDependencies.d.ts +484 -0
- package/dist/qualifyDependencies.d.ts.map +1 -0
- package/dist/qualifyDependencies.js +36 -0
- package/dist/qualifyDependencies.js.map +1 -0
- package/dist/reportAttachments.d.ts +16 -0
- package/dist/reportAttachments.d.ts.map +1 -0
- package/dist/reportAttachments.js +11 -0
- package/dist/reportAttachments.js.map +1 -0
- package/dist/reportFileDirectory.d.ts +10 -0
- package/dist/reportFileDirectory.d.ts.map +1 -0
- package/dist/reportFileDirectory.js +16 -0
- package/dist/reportFileDirectory.js.map +1 -0
- package/dist/reportFileFailure.d.ts +15 -0
- package/dist/reportFileFailure.d.ts.map +1 -0
- package/dist/reportFileFailure.js +23 -0
- package/dist/reportFileFailure.js.map +1 -0
- package/dist/reportLimits.d.ts +9 -0
- package/dist/reportLimits.d.ts.map +1 -0
- package/dist/reportLimits.js +17 -0
- package/dist/reportLimits.js.map +1 -0
- package/dist/scheduling/areas.d.ts +1447 -0
- package/dist/scheduling/areas.d.ts.map +1 -0
- package/dist/scheduling/areas.js +59 -0
- package/dist/scheduling/areas.js.map +1 -0
- package/dist/session/schema.d.ts +84 -0
- package/dist/session/schema.d.ts.map +1 -0
- package/dist/session/schema.js +55 -0
- package/dist/session/schema.js.map +1 -0
- package/dist/session/service.d.ts +105 -0
- package/dist/session/service.d.ts.map +1 -0
- package/dist/session/service.js +61 -0
- package/dist/session/service.js.map +1 -0
- package/dist/session/transientFailure.d.ts +5 -0
- package/dist/session/transientFailure.d.ts.map +1 -0
- package/dist/session/transientFailure.js +22 -0
- package/dist/session/transientFailure.js.map +1 -0
- package/dist/session/validateReceipt.d.ts +4 -0
- package/dist/session/validateReceipt.d.ts.map +1 -0
- package/dist/session/validateReceipt.js +8 -0
- package/dist/session/validateReceipt.js.map +1 -0
- package/dist/storage/FleetStoreOptions.d.ts +13 -0
- package/dist/storage/FleetStoreOptions.d.ts.map +1 -0
- package/dist/storage/FleetStoreOptions.js +2 -0
- package/dist/storage/FleetStoreOptions.js.map +1 -0
- package/dist/storage/admission.d.ts +18 -0
- package/dist/storage/admission.d.ts.map +1 -0
- package/dist/storage/admission.js +39 -0
- package/dist/storage/admission.js.map +1 -0
- package/dist/storage/admissionReads.d.ts +7 -0
- package/dist/storage/admissionReads.d.ts.map +1 -0
- package/dist/storage/admissionReads.js +12 -0
- package/dist/storage/admissionReads.js.map +1 -0
- package/dist/storage/backfillDecisionCodes.d.ts +4 -0
- package/dist/storage/backfillDecisionCodes.d.ts.map +1 -0
- package/dist/storage/backfillDecisionCodes.js +81 -0
- package/dist/storage/backfillDecisionCodes.js.map +1 -0
- package/dist/storage/errors.d.ts +31 -0
- package/dist/storage/errors.d.ts.map +1 -0
- package/dist/storage/errors.js +22 -0
- package/dist/storage/errors.js.map +1 -0
- package/dist/storage/fleetMigrations.d.ts +43 -0
- package/dist/storage/fleetMigrations.d.ts.map +1 -0
- package/dist/storage/fleetMigrations.js +58 -0
- package/dist/storage/fleetMigrations.js.map +1 -0
- package/dist/storage/makeFleetTransaction.d.ts +6 -0
- package/dist/storage/makeFleetTransaction.d.ts.map +1 -0
- package/dist/storage/makeFleetTransaction.js +12 -0
- package/dist/storage/makeFleetTransaction.js.map +1 -0
- package/dist/storage/makePostgresFleetStore.d.ts +46 -0
- package/dist/storage/makePostgresFleetStore.d.ts.map +1 -0
- package/dist/storage/makePostgresFleetStore.js +109 -0
- package/dist/storage/makePostgresFleetStore.js.map +1 -0
- package/dist/storage/migrateFleet.d.ts +3 -0
- package/dist/storage/migrateFleet.d.ts.map +1 -0
- package/dist/storage/migrateFleet.js +11 -0
- package/dist/storage/migrateFleet.js.map +1 -0
- package/dist/storage/model.d.ts +197 -0
- package/dist/storage/model.d.ts.map +1 -0
- package/dist/storage/model.js +91 -0
- package/dist/storage/model.js.map +1 -0
- package/dist/storage/modelTables.d.ts +37 -0
- package/dist/storage/modelTables.d.ts.map +1 -0
- package/dist/storage/modelTables.js +54 -0
- package/dist/storage/modelTables.js.map +1 -0
- package/dist/storage/nextAdmissionOrder.d.ts +4 -0
- package/dist/storage/nextAdmissionOrder.d.ts.map +1 -0
- package/dist/storage/nextAdmissionOrder.js +7 -0
- package/dist/storage/nextAdmissionOrder.js.map +1 -0
- package/dist/storage/operationEntries.d.ts +6 -0
- package/dist/storage/operationEntries.d.ts.map +1 -0
- package/dist/storage/operationEntries.js +17 -0
- package/dist/storage/operationEntries.js.map +1 -0
- package/dist/storage/pruneEmptyCycles.d.ts +4 -0
- package/dist/storage/pruneEmptyCycles.d.ts.map +1 -0
- package/dist/storage/pruneEmptyCycles.js +20 -0
- package/dist/storage/pruneEmptyCycles.js.map +1 -0
- package/dist/storage/recordTimes.d.ts +23 -0
- package/dist/storage/recordTimes.d.ts.map +1 -0
- package/dist/storage/recordTimes.js +24 -0
- package/dist/storage/recordTimes.js.map +1 -0
- package/dist/storage/recordValue.d.ts +7 -0
- package/dist/storage/recordValue.d.ts.map +1 -0
- package/dist/storage/recordValue.js +39 -0
- package/dist/storage/recordValue.js.map +1 -0
- package/package.json +78 -3
- package/src/DecisionCode.ts +50 -0
- package/src/admit.ts +39 -0
- package/src/attention.ts +24 -0
- package/src/board/acknowledgeDecision.ts +51 -0
- package/src/board/briefRevision.ts +17 -0
- package/src/board/completionFields.ts +65 -0
- package/src/board/completionMarkdown.ts +24 -0
- package/src/board/decisionAnswer.ts +12 -0
- package/src/board/decisionReading.ts +54 -0
- package/src/board/documents.ts +89 -0
- package/src/board/fleetField.ts +35 -0
- package/src/board/markdown.ts +103 -0
- package/src/board/publish.ts +99 -0
- package/src/board/publishReport.ts +43 -0
- package/src/board/readDocument.ts +33 -0
- package/src/board/readPass.ts +115 -0
- package/src/board/reportContent.ts +18 -0
- package/src/board/reportFiles.ts +93 -0
- package/src/board/reportIdentity.ts +10 -0
- package/src/board/reportLinks.ts +24 -0
- package/src/board/reportPayload.ts +73 -0
- package/src/board/reportPayloadFile.ts +93 -0
- package/src/board/schema.ts +48 -0
- package/src/board/statusMarkdown.ts +40 -0
- package/src/board/workRevision.ts +9 -0
- package/src/board/writeCompletion.ts +69 -0
- package/src/board/writeHealth.ts +30 -0
- package/src/board/writePublished.ts +72 -0
- package/src/board/writeStatus.ts +11 -0
- package/src/cli.ts +97 -0
- package/src/completion.ts +27 -0
- package/src/engine/ReportInspection.ts +10 -0
- package/src/engine/applyResolution.ts +117 -0
- package/src/engine/approveBrief.ts +97 -0
- package/src/engine/authorizeResolution.ts +23 -0
- package/src/engine/boardBrief.ts +84 -0
- package/src/engine/capacityRetry.ts +72 -0
- package/src/engine/closeDecisions.ts +92 -0
- package/src/engine/completeBoardWork.ts +33 -0
- package/src/engine/completeReport.ts +24 -0
- package/src/engine/continueCommand.ts +30 -0
- package/src/engine/continueWorker.ts +25 -0
- package/src/engine/continuedRecord.ts +24 -0
- package/src/engine/deliverPendingAnswers.ts +30 -0
- package/src/engine/deliveryFailure.ts +13 -0
- package/src/engine/dispatchCommand.ts +88 -0
- package/src/engine/ensureDecisionOwner.ts +16 -0
- package/src/engine/ensurePublication.ts +32 -0
- package/src/engine/exhaustedCheckRepairs.ts +11 -0
- package/src/engine/failureCode.ts +30 -0
- package/src/engine/failureContext.ts +22 -0
- package/src/engine/failureMessage.ts +19 -0
- package/src/engine/failureOwner.ts +10 -0
- package/src/engine/health.ts +31 -0
- package/src/engine/inspectRenewal.ts +64 -0
- package/src/engine/launchInput.ts +30 -0
- package/src/engine/launchObservationRetries.ts +5 -0
- package/src/engine/launchReceipt.ts +14 -0
- package/src/engine/launchRecord.ts +10 -0
- package/src/engine/localOnlyCriteria.ts +14 -0
- package/src/engine/makeAdopt.ts +57 -0
- package/src/engine/makeAdvance.ts +84 -0
- package/src/engine/makeDeliver.ts +114 -0
- package/src/engine/makeHuman.ts +46 -0
- package/src/engine/makeLaunch.ts +111 -0
- package/src/engine/makeObserve.ts +113 -0
- package/src/engine/makeReview.ts +104 -0
- package/src/engine/makeState.ts +89 -0
- package/src/engine/makeValidate.ts +43 -0
- package/src/engine/mergeReadiness.ts +44 -0
- package/src/engine/observeDeliveryFailure.ts +67 -0
- package/src/engine/observeRenewal.ts +36 -0
- package/src/engine/observedAttempt.ts +17 -0
- package/src/engine/obtainReview.ts +148 -0
- package/src/engine/operationRecord.ts +22 -0
- package/src/engine/originalWork.ts +16 -0
- package/src/engine/pendingAcknowledgements.ts +52 -0
- package/src/engine/persistTerminalReceipts.ts +16 -0
- package/src/engine/prepareCommand.ts +80 -0
- package/src/engine/queueAnswerCommand.ts +16 -0
- package/src/engine/readOrContinueReview.ts +77 -0
- package/src/engine/readResolution.ts +53 -0
- package/src/engine/readRetry.ts +104 -0
- package/src/engine/reassignCommand.ts +45 -0
- package/src/engine/reconcileAttempt.ts +29 -0
- package/src/engine/reconcileCommand.ts +74 -0
- package/src/engine/recoverStall.ts +83 -0
- package/src/engine/recoverUnobservable.ts +39 -0
- package/src/engine/refreshBrief.ts +59 -0
- package/src/engine/refreshReviewResult.ts +85 -0
- package/src/engine/releaseClosedPreparation.ts +31 -0
- package/src/engine/releaseExecution.ts +66 -0
- package/src/engine/releaseFinishedWork.ts +31 -0
- package/src/engine/releaseOnly.ts +24 -0
- package/src/engine/releaseReceipts.ts +25 -0
- package/src/engine/repository.ts +143 -0
- package/src/engine/requestConflictRepair.ts +40 -0
- package/src/engine/requestRework.ts +45 -0
- package/src/engine/reserveRenewal.ts +19 -0
- package/src/engine/resolveCommand.ts +42 -0
- package/src/engine/resolveExecution.ts +42 -0
- package/src/engine/restartableReview.ts +17 -0
- package/src/engine/resumeAttempt.ts +29 -0
- package/src/engine/retireUnacknowledged.ts +19 -0
- package/src/engine/retryPrompt.ts +14 -0
- package/src/engine/retryTerminal.ts +22 -0
- package/src/engine/scheduler.ts +87 -0
- package/src/engine/sessionCleanup.ts +51 -0
- package/src/engine/sessionStatus.ts +14 -0
- package/src/engine/settleMergedDelivery.ts +31 -0
- package/src/engine/submissionFailure.ts +47 -0
- package/src/engine/submitLaunch.ts +43 -0
- package/src/engine/threadNames.ts +56 -0
- package/src/engine/views.ts +42 -0
- package/src/engine/workerReport.ts +54 -0
- package/src/errors.ts +7 -0
- package/src/exposeFailure.ts +30 -0
- package/src/fleet.ts +50 -0
- package/src/fleetRecords.ts +4 -0
- package/src/host/actionCommands.ts +77 -0
- package/src/host/admission.ts +130 -0
- package/src/host/answerText.ts +11 -0
- package/src/host/answerWork.ts +104 -0
- package/src/host/applyReportPatch.ts +111 -0
- package/src/host/cliOptions.ts +15 -0
- package/src/host/commands.ts +63 -0
- package/src/host/config.ts +111 -0
- package/src/host/continuationMessage.ts +19 -0
- package/src/host/daemon.ts +45 -0
- package/src/host/daemonClient.ts +36 -0
- package/src/host/daemonContract.ts +64 -0
- package/src/host/daemonDiagnostics.ts +20 -0
- package/src/host/daemonHandlers.ts +33 -0
- package/src/host/daemonSnapshots.ts +24 -0
- package/src/host/defaults.ts +4 -0
- package/src/host/fleetItems.ts +33 -0
- package/src/host/follow.ts +44 -0
- package/src/host/followCommands.ts +54 -0
- package/src/host/followState.ts +41 -0
- package/src/host/github.ts +32 -0
- package/src/host/githubCheckState.ts +95 -0
- package/src/host/githubChecks.ts +53 -0
- package/src/host/githubDelivery.ts +65 -0
- package/src/host/githubRead.ts +20 -0
- package/src/host/githubRequiredChecks.ts +19 -0
- package/src/host/githubResult.ts +76 -0
- package/src/host/guidance.ts +28 -0
- package/src/host/healthLayer.ts +19 -0
- package/src/host/localOnlyBoardPath.ts +23 -0
- package/src/host/mainSource.ts +97 -0
- package/src/host/nameThreads.ts +61 -0
- package/src/host/providerHealth.ts +57 -0
- package/src/host/providers.ts +34 -0
- package/src/host/quota.ts +46 -0
- package/src/host/readCommand.ts +25 -0
- package/src/host/readWaitStates.ts +39 -0
- package/src/host/reassignWork.ts +17 -0
- package/src/host/recordDecisionResponse.ts +44 -0
- package/src/host/recordPayloads.ts +16 -0
- package/src/host/releaseWork.ts +56 -0
- package/src/host/renderStatus.ts +33 -0
- package/src/host/reportAttachmentFiles.ts +91 -0
- package/src/host/reportBoard.ts +143 -0
- package/src/host/reportFileChanges.ts +32 -0
- package/src/host/reportFileReplay.ts +118 -0
- package/src/host/reportPublication.ts +36 -0
- package/src/host/resultReport.ts +32 -0
- package/src/host/runtime.ts +129 -0
- package/src/host/snapshotStream.ts +21 -0
- package/src/host/status.ts +16 -0
- package/src/host/statusLayer.ts +101 -0
- package/src/host/wait.ts +38 -0
- package/src/host/waitOutcome.ts +47 -0
- package/src/host/watch.ts +68 -0
- package/src/model.ts +123 -0
- package/src/operations.ts +76 -0
- package/src/packageInfo.ts +3 -0
- package/src/policy.ts +131 -0
- package/src/policyGuidance.ts +6 -0
- package/src/preparation/compatibility.ts +49 -0
- package/src/preparation/schema.ts +55 -0
- package/src/prompt/reviewer.ts +64 -0
- package/src/prompt/worker.ts +132 -0
- package/src/providers/capacity.ts +8 -0
- package/src/providers/codexAdapter.ts +73 -0
- package/src/providers/codexCloud.ts +112 -0
- package/src/providers/codexCloudConnection.ts +49 -0
- package/src/providers/codexLocal.ts +67 -0
- package/src/providers/codexLogin.ts +87 -0
- package/src/providers/codexProtocol.ts +33 -0
- package/src/providers/codexReportAttachments.ts +23 -0
- package/src/providers/codexRpc.ts +140 -0
- package/src/providers/codexSettings.ts +31 -0
- package/src/providers/codexTurns.ts +133 -0
- package/src/providers/genericRejection.ts +12 -0
- package/src/providers/makeWaitUntilIdle.ts +30 -0
- package/src/providers/observeCodexTurn.ts +40 -0
- package/src/providers/readActiveTurn.ts +26 -0
- package/src/providers/recoverTurn.ts +69 -0
- package/src/providers/startCodexTurn.ts +78 -0
- package/src/qualifyDependencies.ts +54 -0
- package/src/reportAttachments.ts +26 -0
- package/src/reportFileDirectory.ts +33 -0
- package/src/reportFileFailure.ts +27 -0
- package/src/reportLimits.ts +19 -0
- package/src/scheduling/areas.ts +81 -0
- package/src/session/schema.ts +66 -0
- package/src/session/service.ts +103 -0
- package/src/session/transientFailure.ts +32 -0
- package/src/session/validateReceipt.ts +9 -0
- package/src/storage/FleetStoreOptions.ts +13 -0
- package/src/storage/admission.ts +82 -0
- package/src/storage/admissionReads.ts +16 -0
- package/src/storage/backfillDecisionCodes.ts +89 -0
- package/src/storage/errors.ts +23 -0
- package/src/storage/fleetMigrations.ts +60 -0
- package/src/storage/makeFleetTransaction.ts +16 -0
- package/src/storage/makePostgresFleetStore.ts +147 -0
- package/src/storage/migrateFleet.ts +11 -0
- package/src/storage/model.ts +115 -0
- package/src/storage/modelTables.ts +57 -0
- package/src/storage/nextAdmissionOrder.ts +8 -0
- package/src/storage/operationEntries.ts +24 -0
- package/src/storage/pruneEmptyCycles.ts +20 -0
- package/src/storage/recordTimes.ts +28 -0
- package/src/storage/recordValue.ts +42 -0
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import * as Effect from "effect/Effect";
|
|
2
|
+
import * as Schema from "effect/Schema";
|
|
3
|
+
import { makeRepository } from "@shivaedev/effect-sql/repository.ts";
|
|
4
|
+
import { State } from "#host/waitOutcome.ts";
|
|
5
|
+
import { recordColumns, recordJson, recordModel } from "#storage/model.ts";
|
|
6
|
+
|
|
7
|
+
export interface ReadOptions {
|
|
8
|
+
readonly namespace: string;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export const readWaitStates = Effect.fn("FleetReader.readWaitStates")(function* (options: ReadOptions, ids?: readonly string[]) {
|
|
12
|
+
const read = Effect.gen(function* () {
|
|
13
|
+
const repository = yield* makeRepository(recordModel(), {
|
|
14
|
+
idColumn: "work_id",
|
|
15
|
+
spanPrefix: "FleetReader",
|
|
16
|
+
tableName: `${options.namespace}_records`,
|
|
17
|
+
});
|
|
18
|
+
const rows = yield* repository
|
|
19
|
+
.findMany({
|
|
20
|
+
orderBy: { direction: "asc", field: "work_id" },
|
|
21
|
+
select: ["work_id", "stage", "blocker", "attentionOwner", "checks", "decision", "outcome"],
|
|
22
|
+
})
|
|
23
|
+
.pipe(
|
|
24
|
+
Effect.catchTag("SqlError", (error) => {
|
|
25
|
+
const cause = error.reason.cause;
|
|
26
|
+
return typeof cause === "object" && cause !== null && "code" in cause && cause.code === "42P01" ? Effect.succeed([]) : Effect.fail(error);
|
|
27
|
+
}),
|
|
28
|
+
);
|
|
29
|
+
return yield* Effect.forEach(
|
|
30
|
+
rows.filter((row) => ids === undefined || ids.includes(row.work_id)),
|
|
31
|
+
(row) =>
|
|
32
|
+
recordJson(row, recordColumns()).pipe(
|
|
33
|
+
Effect.flatMap(Schema.decodeUnknownEffect(Schema.fromJsonString(State))),
|
|
34
|
+
Effect.map((state) => ({ ...state, outcome: state.outcome ?? {} })),
|
|
35
|
+
),
|
|
36
|
+
);
|
|
37
|
+
});
|
|
38
|
+
return yield* read;
|
|
39
|
+
});
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Effect } from "effect";
|
|
2
|
+
import type { AttentionOwner } from "#attention.ts";
|
|
3
|
+
import { Fleet } from "#fleet.ts";
|
|
4
|
+
import { type HostParts, hostLayer, productionParts } from "#host/commands.ts";
|
|
5
|
+
import type { FleetHost } from "#host/config.ts";
|
|
6
|
+
|
|
7
|
+
export function reassignWork(
|
|
8
|
+
host: FleetHost,
|
|
9
|
+
workId: string,
|
|
10
|
+
decisionId: string,
|
|
11
|
+
attentionOwner: AttentionOwner,
|
|
12
|
+
parts: HostParts = productionParts(host),
|
|
13
|
+
) {
|
|
14
|
+
return Effect.gen(function* () {
|
|
15
|
+
return yield* (yield* Fleet).reassign(workId, decisionId, attentionOwner);
|
|
16
|
+
}).pipe(Effect.provide(hostLayer(host, parts)));
|
|
17
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { Clock, Effect, FileSystem, Schema } from "effect";
|
|
2
|
+
import { BadRequest, Conflict } from "@shivaedev/platform/errors/taxonomy.ts";
|
|
3
|
+
import { responses as responsesApi } from "@shivaedev/work-board/integration/responses.ts";
|
|
4
|
+
import type { BoardDecision } from "#board/schema.ts";
|
|
5
|
+
import { BoardGateway, type Decision } from "#policy.ts";
|
|
6
|
+
|
|
7
|
+
const { DraftInput, makeResponse, publish, Responses, responseMarkdown } = responsesApi;
|
|
8
|
+
|
|
9
|
+
export const recordDecisionResponse = Effect.fn("FleetHost.recordDecisionResponse")(function* (
|
|
10
|
+
root: string,
|
|
11
|
+
decision: Decision & { readonly published: BoardDecision },
|
|
12
|
+
action: "retry" | "release",
|
|
13
|
+
text?: string,
|
|
14
|
+
) {
|
|
15
|
+
const responses = yield* Responses;
|
|
16
|
+
const board = yield* BoardGateway;
|
|
17
|
+
const published = decision.published;
|
|
18
|
+
const reading = yield* board.readDecision(published);
|
|
19
|
+
if (reading._tag === "Stale" || reading._tag === "Ambiguous") {
|
|
20
|
+
return yield* Effect.fail(new Conflict({ message: "Reconcile the exact decision response before answering" }));
|
|
21
|
+
}
|
|
22
|
+
const id = `response.fleet-${action}.${published.questionId}`;
|
|
23
|
+
if (reading._tag === "Response" && reading.response.id === id) {
|
|
24
|
+
return id;
|
|
25
|
+
}
|
|
26
|
+
const input = yield* Schema.decodeUnknownEffect(DraftInput)({
|
|
27
|
+
...(decision.worker !== undefined && action !== "release" ? {} : { answers: [{ prompt: "fleet-action", selected: [action], text: "" }] }),
|
|
28
|
+
author: "orchestrator",
|
|
29
|
+
body: text ?? (action === "release" ? "Release Fleet ownership." : "Retry Fleet work under trusted runtime policy."),
|
|
30
|
+
id,
|
|
31
|
+
question: published.questionId,
|
|
32
|
+
...(reading._tag === "Response" ? { supersedes: reading.response.id } : {}),
|
|
33
|
+
type: "answer",
|
|
34
|
+
}).pipe(Effect.mapError(() => new BadRequest({ message: "Invalid Board response; text must not exceed 32768 characters" })));
|
|
35
|
+
if (decision.worker === undefined && text === undefined) {
|
|
36
|
+
return (yield* responses.record(input)).id;
|
|
37
|
+
}
|
|
38
|
+
const question = (yield* responses.read(published.questionId)).question;
|
|
39
|
+
const response = makeResponse(input, question, yield* Clock.currentTimeMillis);
|
|
40
|
+
const fs = yield* FileSystem.FileSystem;
|
|
41
|
+
const realRoot = yield* fs.realPath(root);
|
|
42
|
+
yield* publish(root, realRoot, id, responseMarkdown(response));
|
|
43
|
+
return id;
|
|
44
|
+
});
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Effect } from "effect";
|
|
2
|
+
import { SqlClient } from "effect/sql";
|
|
3
|
+
import { makeRepository } from "@shivaedev/effect-sql/repository.ts";
|
|
4
|
+
import { recordColumns, recordJson, recordModel } from "#storage/model.ts";
|
|
5
|
+
|
|
6
|
+
export const recordPayloads = Effect.fn("FleetHost.recordPayloads")(function* (namespace: string, workId?: string) {
|
|
7
|
+
const sql = yield* SqlClient.SqlClient;
|
|
8
|
+
const table = `${namespace}_records`;
|
|
9
|
+
const [present] = yield* sql<{ readonly present: boolean }>`select to_regclass(${table}) is not null as present`;
|
|
10
|
+
if (present?.present !== true) {
|
|
11
|
+
return [];
|
|
12
|
+
}
|
|
13
|
+
const repository = yield* makeRepository(recordModel(), { idColumn: "work_id", spanPrefix: "FleetReader", tableName: table });
|
|
14
|
+
const rows = yield* repository.findMany({ orderBy: { direction: "asc", field: "work_id" }, where: { "work_id": workId } });
|
|
15
|
+
return yield* Effect.forEach(rows, (row) => recordJson(row, recordColumns()));
|
|
16
|
+
});
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import * as NodeServices from "@effect/platform-node/NodeServices";
|
|
2
|
+
import { Effect, Layer } from "effect";
|
|
3
|
+
import { Conflict, Forbidden } from "@shivaedev/platform/errors/taxonomy.ts";
|
|
4
|
+
import { board } from "@shivaedev/work-board/integration/board.ts";
|
|
5
|
+
import { responses } from "@shivaedev/work-board/integration/responses.ts";
|
|
6
|
+
import { Fleet } from "#fleet.ts";
|
|
7
|
+
import { type HostParts, hostLayer, productionParts } from "#host/commands.ts";
|
|
8
|
+
import type { FleetHost } from "#host/config.ts";
|
|
9
|
+
import { recordDecisionResponse } from "#host/recordDecisionResponse.ts";
|
|
10
|
+
import { executing } from "#model.ts";
|
|
11
|
+
|
|
12
|
+
const { searchSnapshot, watchChanges } = board;
|
|
13
|
+
const { ResponseConfig, Responses } = responses;
|
|
14
|
+
|
|
15
|
+
export function releaseWork(host: FleetHost, workIds: readonly string[], parts: HostParts = productionParts(host)) {
|
|
16
|
+
return releaseItems(host, workIds).pipe(Effect.provide(hostLayer(host, parts)));
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export function releaseItems(host: FleetHost, workIds: readonly string[]) {
|
|
20
|
+
return withDecisionResponses(host, Effect.forEach(workIds, releaseItem(host.boardDir)));
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export function withDecisionResponses<A, E, R>(host: FleetHost, effect: Effect.Effect<A, E, R>) {
|
|
24
|
+
return Effect.scoped(
|
|
25
|
+
Effect.gen(function* () {
|
|
26
|
+
const changes = yield* watchChanges(host.boardDir);
|
|
27
|
+
const read = yield* searchSnapshot(host.boardDir, undefined, changes);
|
|
28
|
+
const index = read.pipe(Effect.provide(NodeServices.layer));
|
|
29
|
+
return yield* effect.pipe(
|
|
30
|
+
Effect.provide(Responses.layer.pipe(Layer.provide(Layer.succeed(ResponseConfig, { changes, enabled: true, index, root: host.boardDir })))),
|
|
31
|
+
);
|
|
32
|
+
}),
|
|
33
|
+
);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
function releaseItem(root: string) {
|
|
37
|
+
return Effect.fn("FleetHost.releaseItem")(function* (workId: string) {
|
|
38
|
+
const fleet = yield* Fleet;
|
|
39
|
+
let stored = yield* fleet.get(workId);
|
|
40
|
+
if (stored.value.stage === "released") {
|
|
41
|
+
return yield* fleet.reconcile(workId);
|
|
42
|
+
}
|
|
43
|
+
if (stored.value.stage !== "needs-human" || executing(stored.value)) {
|
|
44
|
+
return yield* Effect.fail(new Forbidden({ message: "Only terminal needs-human work can be released" }));
|
|
45
|
+
}
|
|
46
|
+
if (stored.value.decision?.published === undefined) {
|
|
47
|
+
stored = yield* fleet.reconcile(workId);
|
|
48
|
+
}
|
|
49
|
+
const decision = stored.value.decision;
|
|
50
|
+
if (decision?.published === undefined) {
|
|
51
|
+
return yield* Effect.fail(new Conflict({ message: "Publish the waiting decision before release" }));
|
|
52
|
+
}
|
|
53
|
+
const responseId = yield* recordDecisionResponse(root, { ...decision, published: decision.published }, "release");
|
|
54
|
+
return yield* fleet.resolve(workId, decision.id, responseId);
|
|
55
|
+
});
|
|
56
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { diagnostics as diagnosticsApi } from "@shivaedev/work-board/integration/diagnostics.ts";
|
|
2
|
+
import { sessionStatus } from "#engine/sessionStatus.ts";
|
|
3
|
+
import type { FleetViews } from "#model.ts";
|
|
4
|
+
|
|
5
|
+
const { DAEMON_PORT } = diagnosticsApi;
|
|
6
|
+
|
|
7
|
+
type View = (typeof FleetViews.Type)["active"][number];
|
|
8
|
+
|
|
9
|
+
function line(view: View, waiting: boolean, port: number) {
|
|
10
|
+
const reason = view.decision?.reason ?? view.blocker;
|
|
11
|
+
const detail = reason === undefined ? "" : ` ${reason}`;
|
|
12
|
+
const links = [...view.links, ...view.sessions.map(sessionStatus)];
|
|
13
|
+
const answer = waiting ? `\n work-fleet answer ${view.workId}${port === DAEMON_PORT ? "" : ` --port ${port}`}` : "";
|
|
14
|
+
return ` ${view.workId} ${view.stage}${detail}${links.length === 0 ? "" : ` (${links.join(", ")})`}${answer}`;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export function renderStatus(current: typeof FleetViews.Type, port: number = DAEMON_PORT): string {
|
|
18
|
+
const sections: readonly [string, readonly View[]][] = [
|
|
19
|
+
["Active", current.active],
|
|
20
|
+
["Waiting on maintainer", current.waiting.maintainer],
|
|
21
|
+
["Waiting on orchestrator", current.waiting.orchestrator],
|
|
22
|
+
["Waiting on automation", current.waiting.automation],
|
|
23
|
+
["Completed", current.completed],
|
|
24
|
+
];
|
|
25
|
+
return sections
|
|
26
|
+
.map(([title, items]) =>
|
|
27
|
+
[
|
|
28
|
+
`${title} (${items.length})`,
|
|
29
|
+
...items.map((item) => line(item, title === "Waiting on maintainer" || title === "Waiting on orchestrator", port)),
|
|
30
|
+
].join("\n"),
|
|
31
|
+
)
|
|
32
|
+
.join("\n");
|
|
33
|
+
}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { constants, type Stats } from "node:fs";
|
|
2
|
+
import { type FileHandle, lstat, open, realpath } from "node:fs/promises";
|
|
3
|
+
import { isAbsolute, relative, resolve, sep } from "node:path";
|
|
4
|
+
import { Effect } from "effect";
|
|
5
|
+
import type { ReportFile } from "#reportAttachments.ts";
|
|
6
|
+
import { ReportFileFailure, reportFileIo, withReportFile } from "#reportFileFailure.ts";
|
|
7
|
+
import { REPORT_LIMITS, reportLimit } from "#reportLimits.ts";
|
|
8
|
+
|
|
9
|
+
function inside(folder: string, file: string) {
|
|
10
|
+
const name = relative(folder, file);
|
|
11
|
+
return name !== "" && name !== ".." && !name.startsWith(`..${sep}`) && !isAbsolute(name);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
const readBounded = Effect.fnUntraced(function* (path: string, file: FileHandle, remaining: number) {
|
|
15
|
+
const chunks: Uint8Array[] = [];
|
|
16
|
+
let size = 0;
|
|
17
|
+
for (;;) {
|
|
18
|
+
const buffer = new Uint8Array(Math.min(64 * 1024, remaining - size + 1));
|
|
19
|
+
const { bytesRead } = yield* reportFileIo(path, () => file.read(buffer));
|
|
20
|
+
if (bytesRead === 0) {
|
|
21
|
+
return Buffer.concat(chunks);
|
|
22
|
+
}
|
|
23
|
+
size += bytesRead;
|
|
24
|
+
if (size > remaining) {
|
|
25
|
+
return yield* Effect.fail(new ReportFileFailure({ path, reason: reportLimit("attachmentBytes").message }));
|
|
26
|
+
}
|
|
27
|
+
chunks.push(buffer.subarray(0, bytesRead));
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
interface AttachmentEntry {
|
|
32
|
+
readonly info: Stats;
|
|
33
|
+
readonly name: string;
|
|
34
|
+
readonly target: string;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
const attachmentEntries = Effect.fnUntraced(function* (root: string, names: readonly string[]) {
|
|
38
|
+
if (names.length > REPORT_LIMITS.attachmentCount) {
|
|
39
|
+
return yield* Effect.fail(
|
|
40
|
+
new ReportFileFailure({ path: names[REPORT_LIMITS.attachmentCount] ?? root, reason: reportLimit("attachmentCount").message }),
|
|
41
|
+
);
|
|
42
|
+
}
|
|
43
|
+
const entries: AttachmentEntry[] = [];
|
|
44
|
+
let total = 0;
|
|
45
|
+
for (const name of names) {
|
|
46
|
+
const target = resolve(root, name);
|
|
47
|
+
if (!inside(root, target)) {
|
|
48
|
+
return yield* Effect.fail(new ReportFileFailure({ path: name, reason: "Attachment path escapes scratch folder" }));
|
|
49
|
+
}
|
|
50
|
+
const info = yield* reportFileIo(name, () => lstat(target));
|
|
51
|
+
if (!(info.isFile() && inside(root, yield* reportFileIo(name, () => realpath(target))))) {
|
|
52
|
+
return yield* Effect.fail(new ReportFileFailure({ path: name, reason: "Attachment is not a regular file inside scratch folder" }));
|
|
53
|
+
}
|
|
54
|
+
total += info.size;
|
|
55
|
+
if (total > REPORT_LIMITS.attachmentBytes) {
|
|
56
|
+
return yield* Effect.fail(new ReportFileFailure({ path: name, reason: reportLimit("attachmentBytes").message }));
|
|
57
|
+
}
|
|
58
|
+
entries.push({ info, name, target });
|
|
59
|
+
}
|
|
60
|
+
return entries;
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
function readAttachment(root: string, { info, name, target }: AttachmentEntry, remaining: number) {
|
|
64
|
+
return withReportFile(
|
|
65
|
+
name,
|
|
66
|
+
() => open(target, constants.O_RDONLY | constants.O_NOFOLLOW | constants.O_NONBLOCK),
|
|
67
|
+
(file) =>
|
|
68
|
+
Effect.gen(function* () {
|
|
69
|
+
const opened = yield* reportFileIo(name, () => file.stat());
|
|
70
|
+
if (
|
|
71
|
+
!(opened.isFile() && opened.dev === info.dev && opened.ino === info.ino && inside(root, yield* reportFileIo(name, () => realpath(target))))
|
|
72
|
+
) {
|
|
73
|
+
return yield* Effect.fail(new ReportFileFailure({ path: name, reason: "Attachment changed after validation" }));
|
|
74
|
+
}
|
|
75
|
+
return yield* readBounded(name, file, remaining);
|
|
76
|
+
}),
|
|
77
|
+
);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export const reportAttachmentFiles = Effect.fn("Fleet.reportAttachmentFiles")(function* (folder: string, names: readonly string[]) {
|
|
81
|
+
const root = yield* reportFileIo(folder, () => realpath(folder));
|
|
82
|
+
const entries = yield* attachmentEntries(root, names);
|
|
83
|
+
const files: ReportFile[] = [];
|
|
84
|
+
let total = 0;
|
|
85
|
+
for (const entry of entries) {
|
|
86
|
+
const bytes = yield* readAttachment(root, entry, REPORT_LIMITS.attachmentBytes - total);
|
|
87
|
+
total += bytes.length;
|
|
88
|
+
files.push({ bytes, path: entry.name });
|
|
89
|
+
}
|
|
90
|
+
return files;
|
|
91
|
+
});
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
import * as NodeServices from "@effect/platform-node/NodeServices";
|
|
2
|
+
import { Context, Effect, Layer } from "effect";
|
|
3
|
+
import { defineService } from "@shivaedev/effect-service/define-service.ts";
|
|
4
|
+
import { BadRequest, ServiceUnavailable } from "@shivaedev/platform/errors/taxonomy.ts";
|
|
5
|
+
import { markdownBoard } from "#board/markdown.ts";
|
|
6
|
+
import { reportContent } from "#board/reportContent.ts";
|
|
7
|
+
import { reportFiles } from "#board/reportFiles.ts";
|
|
8
|
+
import { reportIdentity } from "#board/reportIdentity.ts";
|
|
9
|
+
import { reportLinks } from "#board/reportLinks.ts";
|
|
10
|
+
import { reportPayload } from "#board/reportPayload.ts";
|
|
11
|
+
import { withFailureContext } from "#engine/failureContext.ts";
|
|
12
|
+
import { ReportInspection } from "#engine/ReportInspection.ts";
|
|
13
|
+
import { isFleetError } from "#errors.ts";
|
|
14
|
+
import type { FleetHost } from "#host/config.ts";
|
|
15
|
+
import { MainSource } from "#host/mainSource.ts";
|
|
16
|
+
import { reportPublication, reportRepository } from "#host/reportPublication.ts";
|
|
17
|
+
import { BoardFailure, BoardGateway, type BoardWork } from "#policy.ts";
|
|
18
|
+
import { codexReportAttachments } from "#providers/codexReportAttachments.ts";
|
|
19
|
+
import { declaredAttachments, type ReportAttachments } from "#reportAttachments.ts";
|
|
20
|
+
import { ReportFileFailure } from "#reportFileFailure.ts";
|
|
21
|
+
import { SessionFailure, type SessionObservation } from "#session/schema.ts";
|
|
22
|
+
|
|
23
|
+
export const PUBLISHED_REPORT = "Report worker published to GitHub";
|
|
24
|
+
|
|
25
|
+
function attachmentFailure(error: unknown) {
|
|
26
|
+
if (error instanceof BoardFailure) {
|
|
27
|
+
return error;
|
|
28
|
+
}
|
|
29
|
+
const message =
|
|
30
|
+
isFleetError(error) || error instanceof SessionFailure || error instanceof ReportFileFailure
|
|
31
|
+
? error.message
|
|
32
|
+
: "Cloud report attachments could not be downloaded";
|
|
33
|
+
return new BoardFailure({ message });
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
function unavailableAttachments(observation: SessionObservation, error: unknown): ReportAttachments {
|
|
37
|
+
const declared = declaredAttachments(observation.output);
|
|
38
|
+
return {
|
|
39
|
+
files: [],
|
|
40
|
+
unavailable: (declared.length === 0 ? ["Attachment collection"] : declared).map((path) => ({ path, reason: attachmentFailure(error).message })),
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
class ReportInputs extends Context.Service<
|
|
45
|
+
ReportInputs,
|
|
46
|
+
{
|
|
47
|
+
readonly root: string;
|
|
48
|
+
readonly check: (work: BoardWork) => Effect.Effect<boolean, unknown>;
|
|
49
|
+
readonly files: (observation: SessionObservation) => Effect.Effect<ReportAttachments, unknown>;
|
|
50
|
+
}
|
|
51
|
+
>()("Fleet/ReportInputs") {}
|
|
52
|
+
|
|
53
|
+
const ReportBoard = defineService({
|
|
54
|
+
id: "Fleet/ReportBoard",
|
|
55
|
+
initialize: Effect.gen(function* () {
|
|
56
|
+
const board = yield* BoardGateway;
|
|
57
|
+
const { root, check, files } = yield* ReportInputs;
|
|
58
|
+
function inspect(work: BoardWork) {
|
|
59
|
+
return check(work).pipe(
|
|
60
|
+
Effect.mapError(() => new ServiceUnavailable({ message: "Report publication could not be checked on GitHub" })),
|
|
61
|
+
Effect.flatMap((published) =>
|
|
62
|
+
published ? Effect.fail(withFailureContext(new BadRequest({ message: PUBLISHED_REPORT }), { code: "report-published" })) : Effect.void,
|
|
63
|
+
),
|
|
64
|
+
);
|
|
65
|
+
}
|
|
66
|
+
const collect = Effect.fn("Fleet.collect")(function* (work: BoardWork, observation: SessionObservation) {
|
|
67
|
+
const attachments = yield* files(observation).pipe(
|
|
68
|
+
Effect.catch((error) =>
|
|
69
|
+
error instanceof ReportFileFailure ? Effect.fail(error) : Effect.succeed(unavailableAttachments(observation, error)),
|
|
70
|
+
),
|
|
71
|
+
);
|
|
72
|
+
const { itemId } = reportIdentity(work, observation.receipt);
|
|
73
|
+
const output = observation.output + reportLinks(itemId, attachments.files, attachments.unavailable);
|
|
74
|
+
yield* reportContent(work, { ...observation, output });
|
|
75
|
+
return yield* reportPayload(root, work, observation).save({ files: attachments.files, output });
|
|
76
|
+
});
|
|
77
|
+
const report = Effect.fn("Fleet.report")(function* (work: BoardWork, observation: SessionObservation) {
|
|
78
|
+
const { itemId } = reportIdentity(work, observation.receipt);
|
|
79
|
+
const existing = yield* reportPayload(root, work, observation).read;
|
|
80
|
+
const payload = existing ?? (yield* collect(work, observation));
|
|
81
|
+
const reportObservation = { ...observation, output: payload.output };
|
|
82
|
+
yield* reportContent(work, reportObservation);
|
|
83
|
+
yield* reportFiles(root, itemId, payload.files);
|
|
84
|
+
return yield* board.report(work, reportObservation);
|
|
85
|
+
}, Effect.mapError(attachmentFailure));
|
|
86
|
+
|
|
87
|
+
return { inspect, report };
|
|
88
|
+
}),
|
|
89
|
+
methods: ({ inspect, report }) => ({ check: inspect, report }),
|
|
90
|
+
requires: [BoardGateway, ReportInputs],
|
|
91
|
+
});
|
|
92
|
+
|
|
93
|
+
export function reportBoard<TCheckServices, TCheckError, TFileServices, TFileError>(
|
|
94
|
+
root: string,
|
|
95
|
+
check: (work: BoardWork) => Effect.Effect<boolean, TCheckError, TCheckServices>,
|
|
96
|
+
files: (observation: SessionObservation) => Effect.Effect<ReportAttachments, TFileError, TFileServices>,
|
|
97
|
+
) {
|
|
98
|
+
return Layer.unwrap(
|
|
99
|
+
Effect.gen(function* () {
|
|
100
|
+
const services = yield* Effect.context<TCheckServices | TFileServices>();
|
|
101
|
+
const inputs = Layer.succeed(ReportInputs, {
|
|
102
|
+
check: (work) => check(work).pipe(Effect.provide(services)),
|
|
103
|
+
files: (observation) => files(observation).pipe(Effect.provide(services)),
|
|
104
|
+
root,
|
|
105
|
+
});
|
|
106
|
+
return Layer.unwrap(
|
|
107
|
+
Effect.gen(function* () {
|
|
108
|
+
const board = yield* BoardGateway;
|
|
109
|
+
const reports = yield* ReportBoard;
|
|
110
|
+
return Layer.merge(
|
|
111
|
+
Layer.succeed(ReportInspection)({ check: reports.check }),
|
|
112
|
+
Layer.succeed(BoardGateway)({ ...board, report: reports.report }),
|
|
113
|
+
);
|
|
114
|
+
}),
|
|
115
|
+
).pipe(Layer.provide(ReportBoard.layer.pipe(Layer.provide(inputs))));
|
|
116
|
+
}),
|
|
117
|
+
);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
export function hostReportBoard(host: FleetHost) {
|
|
121
|
+
return Layer.unwrap(
|
|
122
|
+
Effect.gen(function* () {
|
|
123
|
+
const main = yield* MainSource;
|
|
124
|
+
function check(work: BoardWork) {
|
|
125
|
+
return Effect.gen(function* () {
|
|
126
|
+
if (host.worker === undefined) {
|
|
127
|
+
return yield* Effect.fail(new BoardFailure({ message: "Report publication checks need worker.branchPrefix" }));
|
|
128
|
+
}
|
|
129
|
+
return yield* reportPublication(
|
|
130
|
+
yield* reportRepository(main.repositoryRoot, host.repository.remote),
|
|
131
|
+
`${host.worker.branchPrefix}${work.workId}`,
|
|
132
|
+
);
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
function files(observation: SessionObservation) {
|
|
136
|
+
return host.provider === "cloud" && host.cloud !== undefined
|
|
137
|
+
? codexReportAttachments(host.cloud, host.cloud.requestTimeoutMs ?? 60_000)(observation)
|
|
138
|
+
: Effect.succeed({ files: [], unavailable: [] });
|
|
139
|
+
}
|
|
140
|
+
return reportBoard(host.boardDir, check, files).pipe(Layer.provide(markdownBoard(host.boardDir)));
|
|
141
|
+
}),
|
|
142
|
+
).pipe(Layer.provide(NodeServices.layer));
|
|
143
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { join } from "node:path";
|
|
2
|
+
import { Effect, FileSystem } from "effect";
|
|
3
|
+
import { BadRequest } from "@shivaedev/platform/errors/taxonomy.ts";
|
|
4
|
+
import { reportAttachmentFiles } from "#host/reportAttachmentFiles.ts";
|
|
5
|
+
import { reportFileReplay } from "#host/reportFileReplay.ts";
|
|
6
|
+
import type { Item } from "#providers/codexProtocol.ts";
|
|
7
|
+
import { declaredAttachments, type ReportAttachments } from "#reportAttachments.ts";
|
|
8
|
+
import { ReportFileFailure } from "#reportFileFailure.ts";
|
|
9
|
+
|
|
10
|
+
export const reportFileChanges = Effect.fn("Fleet.reportFileChanges")(function* (items: readonly (typeof Item.Type)[], output: string) {
|
|
11
|
+
const state = yield* reportFileReplay(items).pipe(Effect.mapError((error) => new BadRequest({ message: error.message })));
|
|
12
|
+
for (const path of declaredAttachments(output)) {
|
|
13
|
+
if (!(state.contents.has(path) || state.unavailable.has(path))) {
|
|
14
|
+
state.unavailable.set(path, "No file-edit attachment was exposed by this turn");
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
const fs = yield* FileSystem.FileSystem;
|
|
18
|
+
const folder = yield* fs
|
|
19
|
+
.makeTempDirectoryScoped()
|
|
20
|
+
.pipe(Effect.mapError((cause) => new ReportFileFailure({ cause, path: "Attachment scratch folder", reason: cause.message })));
|
|
21
|
+
for (const [name, text] of state.contents) {
|
|
22
|
+
const target = join(folder, name);
|
|
23
|
+
yield* fs
|
|
24
|
+
.makeDirectory(join(target, ".."), { recursive: true })
|
|
25
|
+
.pipe(Effect.mapError((cause) => new ReportFileFailure({ cause, path: name, reason: cause.message })));
|
|
26
|
+
yield* fs
|
|
27
|
+
.writeFileString(target, text, { flag: "wx" })
|
|
28
|
+
.pipe(Effect.mapError((cause) => new ReportFileFailure({ cause, path: name, reason: cause.message })));
|
|
29
|
+
}
|
|
30
|
+
const files = yield* reportAttachmentFiles(folder, [...state.contents.keys()].sort());
|
|
31
|
+
return { files, unavailable: [...state.unavailable].map(([path, reason]) => ({ path, reason })) } satisfies ReportAttachments;
|
|
32
|
+
});
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import { Effect, Schema } from "effect";
|
|
2
|
+
import { applyReportPatch } from "#host/applyReportPatch.ts";
|
|
3
|
+
import type { Item } from "#providers/codexProtocol.ts";
|
|
4
|
+
import { REPORT_ATTACHMENT_DIRECTORY } from "#reportAttachments.ts";
|
|
5
|
+
import { ReportFileFailure } from "#reportFileFailure.ts";
|
|
6
|
+
import { REPORT_LIMITS, reportLimit } from "#reportLimits.ts";
|
|
7
|
+
|
|
8
|
+
const Change = Schema.Struct({
|
|
9
|
+
diff: Schema.String,
|
|
10
|
+
kind: Schema.Union([
|
|
11
|
+
Schema.Struct({ type: Schema.Literal("add") }),
|
|
12
|
+
Schema.Struct({ type: Schema.Literal("delete") }),
|
|
13
|
+
Schema.Struct({ movePath: Schema.optional(Schema.NullOr(Schema.String)), type: Schema.Literal("update") }).pipe(
|
|
14
|
+
Schema.encodeKeys({ movePath: "move_path" }),
|
|
15
|
+
),
|
|
16
|
+
]),
|
|
17
|
+
path: Schema.String,
|
|
18
|
+
});
|
|
19
|
+
type Change = typeof Change.Type;
|
|
20
|
+
interface Replay {
|
|
21
|
+
readonly contents: Map<string, string>;
|
|
22
|
+
diffBytes: number;
|
|
23
|
+
readonly names: Set<string>;
|
|
24
|
+
readonly unavailable: Map<string, string>;
|
|
25
|
+
}
|
|
26
|
+
function attachmentName(path: string) {
|
|
27
|
+
return path.startsWith(REPORT_ATTACHMENT_DIRECTORY) ? path.slice(REPORT_ATTACHMENT_DIRECTORY.length) : undefined;
|
|
28
|
+
}
|
|
29
|
+
function safeName(name: string) {
|
|
30
|
+
return (
|
|
31
|
+
!(name.includes("\\") || /\p{Cc}/u.test(name)) && name.split("/").every((part) => part !== "" && part !== "." && part !== ".." && part !== ".git")
|
|
32
|
+
);
|
|
33
|
+
}
|
|
34
|
+
const update = Effect.fnUntraced(function* (state: Replay, change: Change, name: string, target: string) {
|
|
35
|
+
const previous = state.contents.get(name);
|
|
36
|
+
if (previous === undefined) {
|
|
37
|
+
return yield* Effect.fail(new ReportFileFailure({ path: name, reason: "Attachment update has no retrievable add in this turn" }));
|
|
38
|
+
}
|
|
39
|
+
if (target !== name && state.contents.has(target)) {
|
|
40
|
+
return yield* Effect.fail(new ReportFileFailure({ path: target, reason: "Attachment move overwrites another attachment" }));
|
|
41
|
+
}
|
|
42
|
+
const updated = yield* applyReportPatch(previous, change.diff, name);
|
|
43
|
+
state.contents.delete(name);
|
|
44
|
+
state.contents.set(target, updated);
|
|
45
|
+
});
|
|
46
|
+
const applyChange = Effect.fnUntraced(function* (state: Replay, change: Change, name: string | undefined, target: string | undefined) {
|
|
47
|
+
if (name === undefined || target === undefined || !safeName(name) || !safeName(target)) {
|
|
48
|
+
return yield* Effect.fail(
|
|
49
|
+
new ReportFileFailure({ path: change.path, reason: "Unsafe attachment path or move outside the attachment directory" }),
|
|
50
|
+
);
|
|
51
|
+
}
|
|
52
|
+
if (change.kind.type === "delete") {
|
|
53
|
+
state.contents.delete(name);
|
|
54
|
+
} else if (change.kind.type === "add") {
|
|
55
|
+
if (state.contents.has(name)) {
|
|
56
|
+
return yield* Effect.fail(new ReportFileFailure({ path: name, reason: "Attachment was added more than once without deletion" }));
|
|
57
|
+
}
|
|
58
|
+
state.contents.set(name, change.diff);
|
|
59
|
+
} else {
|
|
60
|
+
yield* update(state, change, name, target);
|
|
61
|
+
}
|
|
62
|
+
state.unavailable.delete(name);
|
|
63
|
+
state.unavailable.delete(target);
|
|
64
|
+
});
|
|
65
|
+
const replayChange = Effect.fnUntraced(function* (state: Replay, change: Change) {
|
|
66
|
+
const name = attachmentName(change.path);
|
|
67
|
+
const moved = change.kind.type === "update" ? change.kind.movePath : undefined;
|
|
68
|
+
const target = moved === null || moved === undefined ? name : attachmentName(moved);
|
|
69
|
+
if (name === undefined && target === undefined) {
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
const label = target ?? name ?? change.path;
|
|
73
|
+
state.names.add(label);
|
|
74
|
+
if (state.names.size > REPORT_LIMITS.attachmentCount) {
|
|
75
|
+
return yield* Effect.fail(new ReportFileFailure({ path: label, reason: reportLimit("attachmentCount").message }));
|
|
76
|
+
}
|
|
77
|
+
state.diffBytes += Buffer.byteLength(change.diff, "utf8");
|
|
78
|
+
if (state.diffBytes > REPORT_LIMITS.diffBytes) {
|
|
79
|
+
return yield* Effect.fail(new ReportFileFailure({ path: label, reason: reportLimit("diffBytes").message }));
|
|
80
|
+
}
|
|
81
|
+
yield* applyChange(state, change, name, target).pipe(
|
|
82
|
+
Effect.catchTag("ReportFileFailure", (error) =>
|
|
83
|
+
Effect.sync(() => {
|
|
84
|
+
if (name !== undefined) {
|
|
85
|
+
state.contents.delete(name);
|
|
86
|
+
}
|
|
87
|
+
if (target !== undefined) {
|
|
88
|
+
state.contents.delete(target);
|
|
89
|
+
}
|
|
90
|
+
state.unavailable.set(label, error.reason);
|
|
91
|
+
}),
|
|
92
|
+
),
|
|
93
|
+
);
|
|
94
|
+
});
|
|
95
|
+
export const reportFileReplay = Effect.fn("Fleet.reportFileReplay")(function* (items: readonly (typeof Item.Type)[]) {
|
|
96
|
+
const state: Replay = { contents: new Map(), diffBytes: 0, names: new Set(), unavailable: new Map() };
|
|
97
|
+
for (const item of items) {
|
|
98
|
+
if (item.type !== "fileChange" || (item.status !== undefined && item.status !== "completed")) {
|
|
99
|
+
continue;
|
|
100
|
+
}
|
|
101
|
+
const changes = Schema.decodeUnknownOption(Schema.Array(Change))(item.changes);
|
|
102
|
+
if (changes._tag === "None") {
|
|
103
|
+
state.unavailable.set("Attachment changes", "Codex returned malformed file changes");
|
|
104
|
+
continue;
|
|
105
|
+
}
|
|
106
|
+
for (const change of changes.value) {
|
|
107
|
+
yield* replayChange(state, change);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
let bytes = 0;
|
|
111
|
+
for (const [path, text] of state.contents) {
|
|
112
|
+
bytes += Buffer.byteLength(text, "utf8");
|
|
113
|
+
if (bytes > REPORT_LIMITS.attachmentBytes) {
|
|
114
|
+
return yield* Effect.fail(new ReportFileFailure({ path, reason: reportLimit("attachmentBytes").message }));
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
return state;
|
|
118
|
+
});
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { Effect, Schema } from "effect";
|
|
2
|
+
import { ServiceUnavailable } from "@shivaedev/platform/errors/taxonomy.ts";
|
|
3
|
+
import type { FleetError } from "#errors.ts";
|
|
4
|
+
import { readCommand } from "#host/readCommand.ts";
|
|
5
|
+
|
|
6
|
+
const References = Schema.Array(Schema.Array(Schema.Struct({ ref: Schema.String })));
|
|
7
|
+
const PullRequests = Schema.Array(Schema.Array(Schema.Struct({ htmlUrl: Schema.String }).pipe(Schema.encodeKeys({ htmlUrl: "html_url" }))));
|
|
8
|
+
|
|
9
|
+
export function makeReportPublication<R>(read: (endpoint: string) => Effect.Effect<string, FleetError, R>) {
|
|
10
|
+
return Effect.fn("Fleet.reportPublication")(
|
|
11
|
+
function* (repository: string, branch: string) {
|
|
12
|
+
const refs = yield* read(`repos/${repository}/git/matching-refs/heads/${encodeURIComponent(branch)}`).pipe(
|
|
13
|
+
Effect.flatMap(Schema.decodeUnknownEffect(Schema.fromJsonString(References))),
|
|
14
|
+
);
|
|
15
|
+
const prs = yield* read(
|
|
16
|
+
`repos/${repository}/pulls?state=all&head=${encodeURIComponent(`${repository.split("/")[0]}:${branch}`)}&per_page=100`,
|
|
17
|
+
).pipe(Effect.flatMap(Schema.decodeUnknownEffect(Schema.fromJsonString(PullRequests))));
|
|
18
|
+
return refs.flat().some((ref) => ref.ref === `refs/heads/${branch}`) || prs.flat().length > 0;
|
|
19
|
+
},
|
|
20
|
+
Effect.mapError(() => new ServiceUnavailable({ message: "Report publication could not be checked on GitHub" })),
|
|
21
|
+
);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export const reportPublication = makeReportPublication((endpoint) =>
|
|
25
|
+
readCommand("gh", ["api", "--method", "GET", "--paginate", "--slurp", endpoint]),
|
|
26
|
+
);
|
|
27
|
+
|
|
28
|
+
export const reportRepository = Effect.fn("Fleet.reportRepository")(function* (cwd: string, remote: string) {
|
|
29
|
+
const url = (yield* readCommand("git", ["remote", "get-url", remote], cwd)).trim();
|
|
30
|
+
const repository = /^(?:https:\/\/github\.com\/|git@github\.com:)(?<repository>[A-Za-z0-9-]+\/[A-Za-z0-9_.-]+?)(?:\.git)?$/u.exec(url)?.groups
|
|
31
|
+
?.repository;
|
|
32
|
+
if (repository === undefined) {
|
|
33
|
+
return yield* Effect.fail(new ServiceUnavailable({ message: "Report publication checks need a GitHub remote" }));
|
|
34
|
+
}
|
|
35
|
+
return repository;
|
|
36
|
+
});
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { Effect } from "effect";
|
|
2
|
+
import { BadRequest } from "@shivaedev/platform/errors/taxonomy.ts";
|
|
3
|
+
import { withFailureContext } from "#engine/failureContext.ts";
|
|
4
|
+
import { reportedPullRequest } from "#prompt/worker.ts";
|
|
5
|
+
|
|
6
|
+
export const resultReport = Effect.fn("FleetHost.resultReport")(function* (output: string) {
|
|
7
|
+
const pr = reportedPullRequest(output);
|
|
8
|
+
if (pr === undefined) {
|
|
9
|
+
return yield* withFailureContext(new BadRequest({ message: "Worker report needs one final FLEET_PR line containing a GitHub PR URL or none" }), {
|
|
10
|
+
code: "worker-report-pr-invalid",
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
const lines = output
|
|
14
|
+
.trim()
|
|
15
|
+
.split(/\r?\n/u)
|
|
16
|
+
.map((line) => line.trim());
|
|
17
|
+
const heads = lines.filter((line) => line.startsWith("FLEET_HEAD:"));
|
|
18
|
+
const head = heads[0]
|
|
19
|
+
?.slice("FLEET_HEAD:".length)
|
|
20
|
+
.trim()
|
|
21
|
+
.replace(/^`(?<value>[^`]*)`$/u, "$<value>")
|
|
22
|
+
.trim();
|
|
23
|
+
if (heads.length !== 1 || heads[0] !== lines.at(-2) || head === undefined || /^[a-f\d]{40}$/u.exec(head) === null) {
|
|
24
|
+
return yield* withFailureContext(
|
|
25
|
+
new BadRequest({
|
|
26
|
+
message: "Worker report needs one FLEET_HEAD line with the exact full head SHA immediately before the final PR line",
|
|
27
|
+
}),
|
|
28
|
+
{ code: "worker-report-head-invalid" },
|
|
29
|
+
);
|
|
30
|
+
}
|
|
31
|
+
return { head, pr };
|
|
32
|
+
});
|