@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,54 @@
|
|
|
1
|
+
import { Effect, Result } from "effect";
|
|
2
|
+
import { BadRequest, Conflict } from "@shivaedev/platform/errors/taxonomy.ts";
|
|
3
|
+
import type { DecisionCode } from "#DecisionCode.ts";
|
|
4
|
+
import { failureCode } from "#engine/failureCode.ts";
|
|
5
|
+
import { withFailureContext } from "#engine/failureContext.ts";
|
|
6
|
+
import { makeLaunch } from "#engine/makeLaunch.ts";
|
|
7
|
+
import type { EngineState } from "#engine/makeState.ts";
|
|
8
|
+
import type { FleetError } from "#errors.ts";
|
|
9
|
+
import { resultReport } from "#host/resultReport.ts";
|
|
10
|
+
import { executing, type FleetRecord } from "#model.ts";
|
|
11
|
+
import type { DecisionResponse } from "#policy.ts";
|
|
12
|
+
import type { Versioned } from "#storage/model.ts";
|
|
13
|
+
|
|
14
|
+
const correctionPrompt = [
|
|
15
|
+
"Your completed turn did not contain a valid worker report. Reply only with a corrected report using the result and evidence from that turn.",
|
|
16
|
+
"Include exactly one FLEET_HEAD line containing the full 40-character head SHA of the existing PR, or the exact checked main SHA for no change, immediately before the final FLEET_PR line.",
|
|
17
|
+
"The FLEET_PR value must be the existing GitHub PR URL or none. Do not add text after it. The required ending is:",
|
|
18
|
+
"FLEET_HEAD: <sha>",
|
|
19
|
+
"FLEET_PR: <url or none>",
|
|
20
|
+
].join("\n");
|
|
21
|
+
|
|
22
|
+
export const workerReportFailure = Effect.fn("Fleet.workerReportFailure")(function* (record: FleetRecord, code: DecisionCode | undefined) {
|
|
23
|
+
const latest = record.attempts.at(-1);
|
|
24
|
+
if (record.deliverable === "report" || latest?.role === "reviewer" || latest?.status !== "completed" || executing(record)) {
|
|
25
|
+
return undefined;
|
|
26
|
+
}
|
|
27
|
+
const parsed = yield* resultReport(latest.output ?? "").pipe(Effect.result);
|
|
28
|
+
if (Result.isFailure(parsed)) {
|
|
29
|
+
return failureCode(parsed.failure) === code ? parsed.failure : undefined;
|
|
30
|
+
}
|
|
31
|
+
return code !== undefined && ["worker-report-head-moved", "worker-report-merged-head-mismatch"].includes(code)
|
|
32
|
+
? withFailureContext(new Conflict({ message: "The reported head changed; request a corrected worker report" }), { code })
|
|
33
|
+
: undefined;
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
export function correctWorkerReport(state: EngineState) {
|
|
37
|
+
return Effect.fn("Fleet.correctWorkerReport")(function* (
|
|
38
|
+
stored: Versioned<FleetRecord>,
|
|
39
|
+
failure: FleetError,
|
|
40
|
+
responses?: readonly DecisionResponse[],
|
|
41
|
+
) {
|
|
42
|
+
const latest = stored.value.attempts.at(-1);
|
|
43
|
+
if (latest?.receipt === undefined || latest.role === "reviewer" || latest.status !== "completed") {
|
|
44
|
+
return yield* new BadRequest({ message: "Report execution lacks a completed receipt" });
|
|
45
|
+
}
|
|
46
|
+
if (responses === undefined && latest.prompt?.startsWith(correctionPrompt)) {
|
|
47
|
+
return yield* state.decision(stored, failureCode(failure), failure.message, "Retry to request a corrected worker report or safely release");
|
|
48
|
+
}
|
|
49
|
+
return yield* makeLaunch(state)(stored, latest.role, correctionPrompt, {
|
|
50
|
+
responses: responses ?? stored.value.responses ?? [],
|
|
51
|
+
sessionId: latest.receipt.sessionId,
|
|
52
|
+
});
|
|
53
|
+
});
|
|
54
|
+
}
|
package/src/errors.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Schema } from "effect";
|
|
2
|
+
import { BadRequest, Conflict, Forbidden, NotFound, ServiceUnavailable } from "@shivaedev/platform/errors/taxonomy.ts";
|
|
3
|
+
|
|
4
|
+
export const fleetRejections = { BadRequest, Conflict, Forbidden, NotFound, ServiceUnavailable };
|
|
5
|
+
export const FleetError = Schema.Union(Object.values(fleetRejections));
|
|
6
|
+
export type FleetError = typeof FleetError.Type;
|
|
7
|
+
export const isFleetError = Schema.is(FleetError);
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { Effect } from "effect";
|
|
2
|
+
import { Conflict, Forbidden, ServiceUnavailable } from "@shivaedev/platform/errors/taxonomy.ts";
|
|
3
|
+
import { rpcBoundary } from "@shivaedev/platform/rpc-server/boundary.ts";
|
|
4
|
+
import { failureMessage } from "#engine/failureMessage.ts";
|
|
5
|
+
import { FleetError, isFleetError } from "#errors.ts";
|
|
6
|
+
import { StorageAdmission, StorageCapacity, StorageConflict, StorageQuota } from "#storage/errors.ts";
|
|
7
|
+
|
|
8
|
+
function rejection(error: unknown): FleetError {
|
|
9
|
+
if (isFleetError(error)) {
|
|
10
|
+
return error;
|
|
11
|
+
}
|
|
12
|
+
const message = failureMessage(error);
|
|
13
|
+
if (error instanceof StorageConflict) {
|
|
14
|
+
return new Conflict({ message });
|
|
15
|
+
}
|
|
16
|
+
if (error instanceof StorageAdmission || error instanceof StorageCapacity || error instanceof StorageQuota) {
|
|
17
|
+
return new Forbidden({ message });
|
|
18
|
+
}
|
|
19
|
+
return new ServiceUnavailable({ message });
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export function exposeFailure<A, E, R>(effect: Effect.Effect<A, E, R>) {
|
|
23
|
+
return effect.pipe(
|
|
24
|
+
Effect.mapError(rejection),
|
|
25
|
+
rpcBoundary(FleetError, {
|
|
26
|
+
message: "The integration is unavailable; inspect runtime diagnostics",
|
|
27
|
+
unexpected: (message) => new ServiceUnavailable({ message }),
|
|
28
|
+
}),
|
|
29
|
+
);
|
|
30
|
+
}
|
package/src/fleet.ts
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { Effect } from "effect";
|
|
2
|
+
import { defineService } from "@shivaedev/effect-service/define-service.ts";
|
|
3
|
+
import { closeDecisions } from "#engine/closeDecisions.ts";
|
|
4
|
+
import { continueCommand } from "#engine/continueCommand.ts";
|
|
5
|
+
import { dispatchCommand } from "#engine/dispatchCommand.ts";
|
|
6
|
+
import { ensurePublication } from "#engine/ensurePublication.ts";
|
|
7
|
+
import { makeAdvance } from "#engine/makeAdvance.ts";
|
|
8
|
+
import { makeLaunch } from "#engine/makeLaunch.ts";
|
|
9
|
+
import { makeState } from "#engine/makeState.ts";
|
|
10
|
+
import { prepareCommand } from "#engine/prepareCommand.ts";
|
|
11
|
+
import { queueAnswerCommand } from "#engine/queueAnswerCommand.ts";
|
|
12
|
+
import { reassignCommand } from "#engine/reassignCommand.ts";
|
|
13
|
+
import { reconcileCommand } from "#engine/reconcileCommand.ts";
|
|
14
|
+
import { FleetRepository } from "#engine/repository.ts";
|
|
15
|
+
import { resolveCommand } from "#engine/resolveCommand.ts";
|
|
16
|
+
import { cleanupSessions } from "#engine/sessionCleanup.ts";
|
|
17
|
+
import { BoardGateway, FleetIntegrations, FleetPolicy } from "#policy.ts";
|
|
18
|
+
import type { Preparation } from "#preparation/schema.ts";
|
|
19
|
+
import type { LaunchSettings } from "#session/schema.ts";
|
|
20
|
+
import { SessionService } from "#session/service.ts";
|
|
21
|
+
export interface PrepareWork {
|
|
22
|
+
readonly cwd: string;
|
|
23
|
+
readonly launch?: LaunchSettings | undefined;
|
|
24
|
+
readonly preparation: Preparation;
|
|
25
|
+
readonly prompt: string;
|
|
26
|
+
readonly workId: string;
|
|
27
|
+
}
|
|
28
|
+
export const Fleet = defineService({
|
|
29
|
+
id: "@shivaedev/work-fleet/Fleet",
|
|
30
|
+
initialize: Effect.gen(function* () {
|
|
31
|
+
const state = yield* makeState;
|
|
32
|
+
const launch = makeLaunch(state);
|
|
33
|
+
return { ...state, advance: makeAdvance(state, launch), launch };
|
|
34
|
+
}),
|
|
35
|
+
methods: (state) => ({
|
|
36
|
+
continue: continueCommand(state, state.launch),
|
|
37
|
+
dispatch: dispatchCommand(state, state.launch),
|
|
38
|
+
get: (workId: string) => state.load(workId),
|
|
39
|
+
hasLaunchRetry: () => state.store.hasLaunchRetry(),
|
|
40
|
+
list: () => state.store.list(),
|
|
41
|
+
prepare: (input: PrepareWork) => prepareCommand(state)(input).pipe(Effect.flatMap(closeDecisions(state)), Effect.flatMap(cleanupSessions(state))),
|
|
42
|
+
publishDecision: (workId: string) => state.load(workId).pipe(Effect.flatMap((stored) => ensurePublication(state)(stored, true))),
|
|
43
|
+
queueAnswer: queueAnswerCommand(state),
|
|
44
|
+
reassign: reassignCommand(state),
|
|
45
|
+
reconcile: (workId: string) => reconcileCommand(state, state.advance)(workId).pipe(Effect.flatMap(cleanupSessions(state))),
|
|
46
|
+
resolve: (workId: string, decisionId: string, responseId: string) =>
|
|
47
|
+
resolveCommand(state)(workId, decisionId, responseId).pipe(Effect.flatMap(cleanupSessions(state))),
|
|
48
|
+
}),
|
|
49
|
+
requires: [FleetRepository, BoardGateway, FleetPolicy, FleetIntegrations, SessionService],
|
|
50
|
+
});
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { Console, Effect, Option } from "effect";
|
|
2
|
+
import * as Argument from "effect/cli/Argument";
|
|
3
|
+
import * as Command from "effect/cli/Command";
|
|
4
|
+
import * as Flag from "effect/cli/Flag";
|
|
5
|
+
import { answerText } from "#host/answerText.ts";
|
|
6
|
+
import { board, config, port } from "#host/cliOptions.ts";
|
|
7
|
+
import { continuationMessage } from "#host/continuationMessage.ts";
|
|
8
|
+
import { daemonRequest } from "#host/daemonClient.ts";
|
|
9
|
+
|
|
10
|
+
export const continueCommand = Command.make(
|
|
11
|
+
"continue",
|
|
12
|
+
{ args: [Argument.String("id"), Argument.String("message").pipe(Argument.optional)] as const, board, config, port },
|
|
13
|
+
Effect.fn("WorkFleetCli.continue")(function* (input) {
|
|
14
|
+
const message = yield* continuationMessage(Option.getOrUndefined(input.args[1]));
|
|
15
|
+
const value = yield* daemonRequest(input.port, (client) => client("fleet.continue", { message, workId: input.args[0] }));
|
|
16
|
+
yield* Console.log(`${value.workId} ${value.stage}${value.blocker === undefined ? "" : `: ${value.blocker}`}`);
|
|
17
|
+
}),
|
|
18
|
+
).pipe(
|
|
19
|
+
Command.withDescription("Continue terminal needs-human or completed work on its existing worker thread; read the message from stdin if omitted"),
|
|
20
|
+
);
|
|
21
|
+
|
|
22
|
+
export const releaseCommand = Command.make(
|
|
23
|
+
"release",
|
|
24
|
+
{ board, config, port, workIds: Argument.String("id").pipe(Argument.variadic({ min: 1 })) },
|
|
25
|
+
Effect.fn("WorkFleetCli.release")(function* (input) {
|
|
26
|
+
const released = yield* daemonRequest(input.port, (client) => client("daemon.release", { workIds: input.workIds }));
|
|
27
|
+
for (const value of released) {
|
|
28
|
+
yield* Console.log(`${value.workId} ${value.stage}${value.blocker === undefined ? "" : `: ${value.blocker}`}`);
|
|
29
|
+
}
|
|
30
|
+
}),
|
|
31
|
+
).pipe(Command.withDescription("Safely release terminal needs-human items and record their closing Board responses"));
|
|
32
|
+
|
|
33
|
+
export const reassignCommand = Command.make(
|
|
34
|
+
"reassign",
|
|
35
|
+
{
|
|
36
|
+
board,
|
|
37
|
+
config,
|
|
38
|
+
id: Argument.String("id"),
|
|
39
|
+
port,
|
|
40
|
+
question: Argument.String("decision-id"),
|
|
41
|
+
to: Argument.Literals("owner", ["maintainer", "orchestrator", "automation"]),
|
|
42
|
+
},
|
|
43
|
+
Effect.fn("WorkFleetCli.reassign")(function* (input) {
|
|
44
|
+
const value = yield* daemonRequest(input.port, (client) =>
|
|
45
|
+
client("fleet.reassign", { attentionOwner: input.to, decisionId: input.question, workId: input.id }),
|
|
46
|
+
);
|
|
47
|
+
yield* Console.log(`${value.workId} ${value.stage} (waiting on ${value.attentionOwner})`);
|
|
48
|
+
}),
|
|
49
|
+
).pipe(Command.withDescription("Reassign the exact waiting decision to its next actor"));
|
|
50
|
+
|
|
51
|
+
export const nameThreadsCommand = Command.make(
|
|
52
|
+
"name-threads",
|
|
53
|
+
{ board, config, port },
|
|
54
|
+
Effect.fn("WorkFleetCli.nameThreads")(function* (input) {
|
|
55
|
+
const results = yield* daemonRequest(input.port, (client) => client("daemon.name-threads", {}));
|
|
56
|
+
for (const result of results) {
|
|
57
|
+
yield* result.error ? Console.error(result.message) : Console.log(result.message);
|
|
58
|
+
}
|
|
59
|
+
}),
|
|
60
|
+
).pipe(Command.withDescription("Name existing Fleet Cloud threads after their Board work, best-effort"));
|
|
61
|
+
|
|
62
|
+
export const answerCommand = Command.make(
|
|
63
|
+
"answer",
|
|
64
|
+
{
|
|
65
|
+
args: [Argument.String("id"), Argument.String("text").pipe(Argument.optional)] as const,
|
|
66
|
+
board,
|
|
67
|
+
config,
|
|
68
|
+
port,
|
|
69
|
+
release: Flag.Boolean("release").pipe(Flag.withDefault(false)),
|
|
70
|
+
},
|
|
71
|
+
Effect.fn("WorkFleetCli.answer")(function* (input) {
|
|
72
|
+
const text = yield* answerText(Option.getOrUndefined(input.args[1]));
|
|
73
|
+
const value = yield* daemonRequest(input.port, (client) => client("daemon.answer", { release: input.release, text, workId: input.args[0] }));
|
|
74
|
+
const detail = (value.pendingAnswers?.length ?? 0) > 0 ? "queued for the next turn" : value.blocker;
|
|
75
|
+
yield* Console.log(`${value.workId} ${value.stage}${detail === undefined ? "" : `: ${detail}`}`);
|
|
76
|
+
}),
|
|
77
|
+
).pipe(Command.withDescription("Answer the waiting worker question or Fleet decision; read text from stdin if omitted, or use --release"));
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import { Effect, FileSystem, Schema } from "effect";
|
|
2
|
+
import { BadRequest, Forbidden } from "@shivaedev/platform/errors/taxonomy.ts";
|
|
3
|
+
import { boardDocuments, boardSnapshot } from "#board/documents.ts";
|
|
4
|
+
import { fleetApproved, fleetLaunch } from "#board/fleetField.ts";
|
|
5
|
+
import { inBoardReadPass, workMetadata } from "#board/readPass.ts";
|
|
6
|
+
import { briefChanged } from "#engine/boardBrief.ts";
|
|
7
|
+
import { Fleet } from "#fleet.ts";
|
|
8
|
+
import type { FleetHost } from "#host/config.ts";
|
|
9
|
+
import { type MainSnapshot, MainSource } from "#host/mainSource.ts";
|
|
10
|
+
import { workerCwd } from "#host/providers.ts";
|
|
11
|
+
import type { FleetRecord } from "#model.ts";
|
|
12
|
+
import { BoardGateway, type BoardWork } from "#policy.ts";
|
|
13
|
+
import type { Preparation } from "#preparation/schema.ts";
|
|
14
|
+
import { workerPrompt } from "#prompt/worker.ts";
|
|
15
|
+
import { LaunchSettings } from "#session/schema.ts";
|
|
16
|
+
|
|
17
|
+
// Workers start from current main, so the whole repository is their scope and preparation pins only the base.
|
|
18
|
+
function preparation(main: MainSnapshot): Preparation {
|
|
19
|
+
return {
|
|
20
|
+
baselinePaths: [],
|
|
21
|
+
baseRevision: main.revision,
|
|
22
|
+
configuration: [],
|
|
23
|
+
contextComplete: false,
|
|
24
|
+
dependencyPaths: [],
|
|
25
|
+
observedAt: main.observedAt,
|
|
26
|
+
ownedPaths: ["."],
|
|
27
|
+
qualityPaths: [],
|
|
28
|
+
setupPaths: [],
|
|
29
|
+
sourcePaths: [],
|
|
30
|
+
validation: [],
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
function launchPrompt(host: FleetHost, work: BoardWork): string {
|
|
35
|
+
return host.provider === "cloud" && host.worker !== undefined
|
|
36
|
+
? workerPrompt({
|
|
37
|
+
branch: `${host.worker.branchPrefix}${work.workId}`,
|
|
38
|
+
deliverable: work.deliverable,
|
|
39
|
+
sharedEnvironment: host.worker.sharedEnvironment,
|
|
40
|
+
task: work.context,
|
|
41
|
+
workId: work.workId,
|
|
42
|
+
})
|
|
43
|
+
: work.context;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
const taskLaunch = Effect.fn("FleetHost.taskLaunch")(function* (work: BoardWork) {
|
|
47
|
+
const override = fleetLaunch(yield* workMetadata(work));
|
|
48
|
+
return yield* override === undefined
|
|
49
|
+
? Effect.succeed(undefined)
|
|
50
|
+
: Schema.decodeUnknownEffect(LaunchSettings)(override).pipe(
|
|
51
|
+
Effect.mapError(() => new BadRequest({ message: `${work.workId} has an invalid fleet-launch; use model, effort and serviceTier strings` })),
|
|
52
|
+
);
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
function unlaunched(record: FleetRecord) {
|
|
56
|
+
return record.stage === "prepared" && record.attempts.length === 0;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
function stalePreparation(record: FleetRecord, work: BoardWork, main: MainSnapshot) {
|
|
60
|
+
return unlaunched(record) && (briefChanged(record, work) || record.preparation.baseRevision !== main.revision);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export type Approval = "board" | "explicit";
|
|
64
|
+
|
|
65
|
+
export const prepareApproved = Effect.fn("FleetHost.prepareApproved")(function* (
|
|
66
|
+
host: FleetHost,
|
|
67
|
+
work: BoardWork,
|
|
68
|
+
record: FleetRecord | undefined,
|
|
69
|
+
approval: Approval,
|
|
70
|
+
) {
|
|
71
|
+
if (record?.stage === "prepared" && record.launchRetry !== undefined) {
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
const fleet = yield* Fleet;
|
|
75
|
+
const main = yield* MainSource;
|
|
76
|
+
const snapshot = yield* main.current;
|
|
77
|
+
const reapproved = record !== undefined && approval === "explicit" && (record.stage === "released" || briefChanged(record, work));
|
|
78
|
+
if (record !== undefined && !reapproved && !stalePreparation(record, work, snapshot)) {
|
|
79
|
+
return;
|
|
80
|
+
}
|
|
81
|
+
yield* fleet.prepare({
|
|
82
|
+
cwd: workerCwd(host, main.repositoryRoot),
|
|
83
|
+
launch: yield* taskLaunch(work),
|
|
84
|
+
preparation: preparation(snapshot),
|
|
85
|
+
prompt: launchPrompt(host, work),
|
|
86
|
+
workId: work.workId,
|
|
87
|
+
});
|
|
88
|
+
});
|
|
89
|
+
|
|
90
|
+
export const approvedWorkIds = Effect.fn("FleetHost.approvedWorkIds")(function* (host: FleetHost) {
|
|
91
|
+
const fs = yield* FileSystem.FileSystem;
|
|
92
|
+
const documents = yield* boardDocuments(host.boardDir, yield* fs.realPath(host.boardDir));
|
|
93
|
+
return documents.flatMap((document) =>
|
|
94
|
+
document.parsed.fields.id !== undefined && fleetApproved(document.parsed) ? [document.parsed.fields.id] : [],
|
|
95
|
+
);
|
|
96
|
+
});
|
|
97
|
+
|
|
98
|
+
export const admitApproved = Effect.fn("FleetHost.admitApproved")(function* (host: FleetHost) {
|
|
99
|
+
const fleet = yield* Fleet;
|
|
100
|
+
const board = yield* BoardGateway;
|
|
101
|
+
yield* (yield* MainSource).refresh;
|
|
102
|
+
const records = new Map((yield* fleet.list()).map(({ value }) => [value.workId, value]));
|
|
103
|
+
const fs = yield* FileSystem.FileSystem;
|
|
104
|
+
const snapshot = yield* boardSnapshot(host.boardDir, yield* fs.realPath(host.boardDir));
|
|
105
|
+
const failures = Array.from(snapshot.problems.values(), (problem) => problem.message);
|
|
106
|
+
for (const workId of yield* approvedWorkIds(host)) {
|
|
107
|
+
const admitted = yield* board.get(workId).pipe(
|
|
108
|
+
Effect.flatMap((work) => prepareApproved(host, work, records.get(workId), "board")),
|
|
109
|
+
Effect.result,
|
|
110
|
+
);
|
|
111
|
+
if (admitted._tag === "Failure") {
|
|
112
|
+
failures.push(`${workId}: ${admitted.failure.message}`);
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
return failures;
|
|
116
|
+
}, inBoardReadPass);
|
|
117
|
+
|
|
118
|
+
export const dispatchApproved = Effect.fn("FleetHost.dispatchApproved")(function* (host: FleetHost, workId: string) {
|
|
119
|
+
const fleet = yield* Fleet;
|
|
120
|
+
const work = yield* (yield* BoardGateway).get(workId);
|
|
121
|
+
if (!work.approved) {
|
|
122
|
+
return yield* Effect.fail(new Forbidden({ message: `${workId} needs "fleet: approved" in its Board frontmatter` }));
|
|
123
|
+
}
|
|
124
|
+
yield* (yield* MainSource).refresh;
|
|
125
|
+
const existing = (yield* fleet.list()).find(({ value }) => value.workId === workId)?.value;
|
|
126
|
+
if (existing === undefined || ["completed", "released"].includes(existing.stage) || unlaunched(existing) || !briefChanged(existing, work)) {
|
|
127
|
+
yield* prepareApproved(host, work, existing, "explicit");
|
|
128
|
+
}
|
|
129
|
+
return yield* fleet.dispatch(workId, launchPrompt(host, work));
|
|
130
|
+
}, inBoardReadPass);
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import process from "node:process";
|
|
2
|
+
import { text } from "node:stream/consumers";
|
|
3
|
+
import { Effect } from "effect";
|
|
4
|
+
import { BadRequest } from "@shivaedev/platform/errors/taxonomy.ts";
|
|
5
|
+
|
|
6
|
+
export function answerText(value: string | undefined) {
|
|
7
|
+
if (value !== undefined || process.stdin.isTTY) {
|
|
8
|
+
return Effect.succeed(value ?? "");
|
|
9
|
+
}
|
|
10
|
+
return Effect.tryPromise({ catch: () => new BadRequest({ message: "Could not read answer text from stdin" }), try: () => text(process.stdin) });
|
|
11
|
+
}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { Effect } from "effect";
|
|
2
|
+
import { BadRequest, Conflict } from "@shivaedev/platform/errors/taxonomy.ts";
|
|
3
|
+
import { Fleet } from "#fleet.ts";
|
|
4
|
+
import type { FleetHost } from "#host/config.ts";
|
|
5
|
+
import { recordDecisionResponse } from "#host/recordDecisionResponse.ts";
|
|
6
|
+
import { withDecisionResponses } from "#host/releaseWork.ts";
|
|
7
|
+
import type { FleetRecord } from "#model.ts";
|
|
8
|
+
import type { Decision } from "#policy.ts";
|
|
9
|
+
|
|
10
|
+
export function answerWork(host: FleetHost, workId: string, text = "", release = false) {
|
|
11
|
+
return withDecisionResponses(
|
|
12
|
+
host,
|
|
13
|
+
Effect.gen(function* () {
|
|
14
|
+
const fleet = yield* Fleet;
|
|
15
|
+
const original = (yield* fleet.get(workId)).value.decision;
|
|
16
|
+
let recorded: { readonly decisionId: string; readonly responseId: string } | undefined;
|
|
17
|
+
return yield* Effect.gen(function* () {
|
|
18
|
+
const current = (yield* fleet.get(workId)).value;
|
|
19
|
+
if (recorded !== undefined && hasResponse(current, recorded)) {
|
|
20
|
+
return yield* fleet.resolve(workId, recorded.decisionId, recorded.responseId);
|
|
21
|
+
}
|
|
22
|
+
if (canQueueAnswer(current, text, release)) {
|
|
23
|
+
return yield* fleet.queueAnswer(workId, text);
|
|
24
|
+
}
|
|
25
|
+
yield* checkDecision(current, original);
|
|
26
|
+
const response = yield* publishAnswer(host, workId, original, text, release);
|
|
27
|
+
recorded = response;
|
|
28
|
+
return yield* fleet
|
|
29
|
+
.resolve(workId, response.decisionId, response.responseId)
|
|
30
|
+
.pipe(Effect.catchTag("Conflict", (error) => decisionConflict(fleet, workId, response.decisionId, error)));
|
|
31
|
+
}).pipe(
|
|
32
|
+
Effect.retry({ while: (error) => error._tag === "StorageConflict" || (error._tag === "Conflict" && error.message === "Decision changed") }),
|
|
33
|
+
);
|
|
34
|
+
}),
|
|
35
|
+
);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
function checkDecision(record: FleetRecord, original: Decision | undefined) {
|
|
39
|
+
const current = record.decision;
|
|
40
|
+
if (original !== undefined && (record.stage !== "needs-human" || current === undefined || !sameKind(original, current))) {
|
|
41
|
+
return Effect.fail(
|
|
42
|
+
new Conflict({
|
|
43
|
+
message: `Decision changed: ${record.stage === "needs-human" ? (current?.reason ?? record.blocker ?? record.stage) : (record.blocker ?? record.stage)}`,
|
|
44
|
+
}),
|
|
45
|
+
);
|
|
46
|
+
}
|
|
47
|
+
return record.stage === "needs-human" && current !== undefined
|
|
48
|
+
? Effect.void
|
|
49
|
+
: Effect.fail(new BadRequest({ message: `${record.workId} waits on no answer in stage ${record.stage}` }));
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
function sameKind(original: Decision, current: Decision) {
|
|
53
|
+
return original.code === undefined ? original.code === current.code && original.reason === current.reason : original.code === current.code;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
function hasResponse(record: FleetRecord, recorded: { readonly decisionId: string; readonly responseId: string }) {
|
|
57
|
+
const receipts = [...(record.history ?? []).flatMap((cycle) => cycle.responses ?? []), ...(record.responses ?? [])];
|
|
58
|
+
return receipts.some((receipt) => receipt.decisionId === recorded.decisionId && receipt.responseId === recorded.responseId);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
const publishAnswer = Effect.fn("FleetHost.publishAnswer")(function* (
|
|
62
|
+
host: FleetHost,
|
|
63
|
+
workId: string,
|
|
64
|
+
original: Decision | undefined,
|
|
65
|
+
text: string,
|
|
66
|
+
release: boolean,
|
|
67
|
+
) {
|
|
68
|
+
const fleet = yield* Fleet;
|
|
69
|
+
const stored = yield* fleet.publishDecision(workId);
|
|
70
|
+
if (canQueueAnswer(stored.value, text, release)) {
|
|
71
|
+
return yield* new Conflict({ message: "Decision changed" });
|
|
72
|
+
}
|
|
73
|
+
yield* checkDecision(stored.value, original);
|
|
74
|
+
const decision = stored.value.decision;
|
|
75
|
+
if (decision?.published === undefined) {
|
|
76
|
+
return yield* new BadRequest({ message: `${workId} has no published question in stage ${stored.value.stage}` });
|
|
77
|
+
}
|
|
78
|
+
if (!release && decision.worker !== undefined && !text.trim()) {
|
|
79
|
+
return yield* new BadRequest({ message: "Supply a nonempty answer for the worker as text or on stdin" });
|
|
80
|
+
}
|
|
81
|
+
const responseId = yield* recordDecisionResponse(
|
|
82
|
+
host.boardDir,
|
|
83
|
+
{ ...decision, published: decision.published },
|
|
84
|
+
release ? "release" : "retry",
|
|
85
|
+
text,
|
|
86
|
+
).pipe(Effect.catchTag("Conflict", (error) => decisionConflict(fleet, workId, decision.id, error)));
|
|
87
|
+
return { decisionId: decision.id, responseId };
|
|
88
|
+
});
|
|
89
|
+
|
|
90
|
+
const decisionConflict = Effect.fn("FleetHost.decisionConflict")(function* (
|
|
91
|
+
fleet: typeof Fleet.Service,
|
|
92
|
+
workId: string,
|
|
93
|
+
decisionId: string,
|
|
94
|
+
error: Conflict,
|
|
95
|
+
) {
|
|
96
|
+
const current = (yield* fleet.get(workId)).value;
|
|
97
|
+
return yield* Effect.fail(
|
|
98
|
+
current.stage !== "needs-human" || current.decision?.id !== decisionId ? new Conflict({ message: "Decision changed" }) : error,
|
|
99
|
+
);
|
|
100
|
+
});
|
|
101
|
+
|
|
102
|
+
function canQueueAnswer(record: FleetRecord, text: string, release: boolean) {
|
|
103
|
+
return !release && text.trim() !== "" && ["repairing", "executing"].includes(record.stage);
|
|
104
|
+
}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { Effect } from "effect";
|
|
2
|
+
import { ReportFileFailure } from "#reportFileFailure.ts";
|
|
3
|
+
|
|
4
|
+
function lines(text: string) {
|
|
5
|
+
return text.match(/[^\n]*\n|[^\n]+$/gu) ?? [];
|
|
6
|
+
}
|
|
7
|
+
function invalid(path: string) {
|
|
8
|
+
return Effect.fail(new ReportFileFailure({ path, reason: "Update diff does not match the reconstructed attachment" }));
|
|
9
|
+
}
|
|
10
|
+
interface Hunk {
|
|
11
|
+
readonly body: string[];
|
|
12
|
+
readonly newCount: number;
|
|
13
|
+
readonly newStart: number;
|
|
14
|
+
readonly oldCount: number;
|
|
15
|
+
readonly oldStart: number;
|
|
16
|
+
}
|
|
17
|
+
function readHunk(line: string): Hunk | undefined {
|
|
18
|
+
const groups = /^@@ -(?<oldStart>\d+)(?:,(?<oldCount>\d+))? \+(?<newStart>\d+)(?:,(?<newCount>\d+))? @@[^\n]*\n?$/u.exec(line)?.groups;
|
|
19
|
+
return groups === undefined
|
|
20
|
+
? undefined
|
|
21
|
+
: {
|
|
22
|
+
body: [],
|
|
23
|
+
newCount: Number(groups.newCount ?? 1),
|
|
24
|
+
newStart: Number(groups.newStart),
|
|
25
|
+
oldCount: Number(groups.oldCount ?? 1),
|
|
26
|
+
oldStart: Number(groups.oldStart),
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
const appendLine = Effect.fnUntraced(function* (hunk: Hunk, line: string, path: string) {
|
|
30
|
+
if (/^\\n?$/u.test(line)) {
|
|
31
|
+
const previous = hunk.body.pop();
|
|
32
|
+
if (previous === undefined || !previous.endsWith("\n")) {
|
|
33
|
+
return yield* invalid(path);
|
|
34
|
+
}
|
|
35
|
+
hunk.body.push(previous.slice(0, -1));
|
|
36
|
+
} else if (/^[ +-]/u.test(line)) {
|
|
37
|
+
hunk.body.push(line);
|
|
38
|
+
} else {
|
|
39
|
+
return yield* invalid(path);
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
const hunks = Effect.fnUntraced(function* (diff: string, path: string) {
|
|
43
|
+
const result: Hunk[] = [];
|
|
44
|
+
let current: Hunk | undefined;
|
|
45
|
+
for (const line of lines(diff)) {
|
|
46
|
+
if (current === undefined && (line.startsWith("--- ") || line.startsWith("+++ "))) {
|
|
47
|
+
continue;
|
|
48
|
+
}
|
|
49
|
+
const header = readHunk(line);
|
|
50
|
+
if (header === undefined) {
|
|
51
|
+
if (current === undefined) {
|
|
52
|
+
return yield* invalid(path);
|
|
53
|
+
}
|
|
54
|
+
yield* appendLine(current, line, path);
|
|
55
|
+
} else {
|
|
56
|
+
current = header;
|
|
57
|
+
result.push(header);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
if (result.length === 0) {
|
|
61
|
+
return yield* invalid(path);
|
|
62
|
+
}
|
|
63
|
+
return result;
|
|
64
|
+
});
|
|
65
|
+
const writeHunk = Effect.fnUntraced(function* (original: string[], output: string[], hunk: Hunk, start: number, path: string) {
|
|
66
|
+
let cursor = start;
|
|
67
|
+
let added = 0;
|
|
68
|
+
for (const line of hunk.body) {
|
|
69
|
+
const value = line.slice(1);
|
|
70
|
+
if (!line.startsWith("+")) {
|
|
71
|
+
if (original[cursor] !== value) {
|
|
72
|
+
return yield* invalid(path);
|
|
73
|
+
}
|
|
74
|
+
cursor += 1;
|
|
75
|
+
}
|
|
76
|
+
if (!line.startsWith("-")) {
|
|
77
|
+
output.push(value);
|
|
78
|
+
added += 1;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
if (cursor - start !== hunk.oldCount || added !== hunk.newCount) {
|
|
82
|
+
return yield* invalid(path);
|
|
83
|
+
}
|
|
84
|
+
return cursor;
|
|
85
|
+
});
|
|
86
|
+
const applyHunk = Effect.fnUntraced(function* (original: string[], output: string[], hunk: Hunk, cursor: number, path: string) {
|
|
87
|
+
const start = hunk.oldCount === 0 ? hunk.oldStart : hunk.oldStart - 1;
|
|
88
|
+
if (start < cursor || start > original.length) {
|
|
89
|
+
return yield* invalid(path);
|
|
90
|
+
}
|
|
91
|
+
for (const line of original.slice(cursor, start)) {
|
|
92
|
+
output.push(line);
|
|
93
|
+
}
|
|
94
|
+
const newStart = hunk.newCount === 0 ? hunk.newStart : hunk.newStart - 1;
|
|
95
|
+
if (newStart !== output.length) {
|
|
96
|
+
return yield* invalid(path);
|
|
97
|
+
}
|
|
98
|
+
return yield* writeHunk(original, output, hunk, start, path);
|
|
99
|
+
});
|
|
100
|
+
export const applyReportPatch = Effect.fn("Fleet.applyReportPatch")(function* (content: string, diff: string, path = "Attachment") {
|
|
101
|
+
if (diff === "") {
|
|
102
|
+
return content;
|
|
103
|
+
}
|
|
104
|
+
const original = lines(content);
|
|
105
|
+
const output: string[] = [];
|
|
106
|
+
let cursor = 0;
|
|
107
|
+
for (const hunk of yield* hunks(diff, path)) {
|
|
108
|
+
cursor = yield* applyHunk(original, output, hunk, cursor, path);
|
|
109
|
+
}
|
|
110
|
+
return output.concat(original.slice(cursor)).join("");
|
|
111
|
+
});
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as Flag from "effect/cli/Flag";
|
|
2
|
+
import * as Option from "effect/Option";
|
|
3
|
+
import { diagnostics as diagnosticsApi } from "@shivaedev/work-board/integration/diagnostics.ts";
|
|
4
|
+
import { loadHost } from "#host/config.ts";
|
|
5
|
+
|
|
6
|
+
const { DAEMON_PORT } = diagnosticsApi;
|
|
7
|
+
|
|
8
|
+
export const board = Flag.Directory("board").pipe(Flag.withDefault(".work"), Flag.withDescription("Board folder holding fleet.config.json"));
|
|
9
|
+
export const config = Flag.File("config").pipe(Flag.optional, Flag.withDescription("Host configuration instead of <board>/fleet.config.json"));
|
|
10
|
+
|
|
11
|
+
export function host(folder: string, file: Option.Option<string>) {
|
|
12
|
+
return loadHost(folder, Option.getOrUndefined(file));
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export const port = Flag.Int("port").pipe(Flag.withDefault(DAEMON_PORT), Flag.withDescription("Local Fleet daemon port"));
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import * as NodeServices from "@effect/platform-node/NodeServices";
|
|
2
|
+
import { Console, Effect, Layer } from "effect";
|
|
3
|
+
import type { ReportInspection } from "#engine/ReportInspection.ts";
|
|
4
|
+
import { run } from "#engine/scheduler.ts";
|
|
5
|
+
import { Fleet } from "#fleet.ts";
|
|
6
|
+
import { admitApproved, dispatchApproved } from "#host/admission.ts";
|
|
7
|
+
import type { FleetHost } from "#host/config.ts";
|
|
8
|
+
import { healthLayer } from "#host/healthLayer.ts";
|
|
9
|
+
import { gitMainSource, type MainSource } from "#host/mainSource.ts";
|
|
10
|
+
import { hostProvider } from "#host/providers.ts";
|
|
11
|
+
import { fleetHostLayer } from "#host/runtime.ts";
|
|
12
|
+
import { statusLayer } from "#host/statusLayer.ts";
|
|
13
|
+
import type { BoardGateway, FleetIntegrations, FleetPolicy } from "#policy.ts";
|
|
14
|
+
import type { SessionTransport } from "#session/service.ts";
|
|
15
|
+
|
|
16
|
+
export interface HostParts {
|
|
17
|
+
readonly board?: Layer.Layer<BoardGateway | ReportInspection, unknown, MainSource>;
|
|
18
|
+
readonly integrations?: Layer.Layer<FleetIntegrations, unknown, MainSource>;
|
|
19
|
+
readonly main: Layer.Layer<MainSource, unknown>;
|
|
20
|
+
readonly policy?: Layer.Layer<FleetPolicy>;
|
|
21
|
+
readonly provider: Layer.Layer<SessionTransport, unknown>;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export function productionParts(host: FleetHost): HostParts {
|
|
25
|
+
return { main: gitMainSource(host), provider: hostProvider(host) };
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export function hostLayer(host: FleetHost, parts: HostParts) {
|
|
29
|
+
const runtime = Layer.mergeAll(fleetHostLayer(host, parts), NodeServices.layer).pipe(Layer.provideMerge(healthLayer(host.boardDir)));
|
|
30
|
+
return statusLayer(host.boardDir, { concurrency: host.concurrency, staleAfterMs: Math.max(60_000, host.interval * 3000) }).pipe(
|
|
31
|
+
Layer.provideMerge(runtime),
|
|
32
|
+
);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export function hostScheduler(host: FleetHost) {
|
|
36
|
+
let reported = new Set<string>();
|
|
37
|
+
const admission = admitApproved(host).pipe(
|
|
38
|
+
Effect.catch((error) => Effect.succeed([`admission: ${error.message}`])),
|
|
39
|
+
Effect.flatMap((failures) =>
|
|
40
|
+
Effect.gen(function* () {
|
|
41
|
+
for (const failure of failures.filter((entry) => !reported.has(entry))) {
|
|
42
|
+
yield* Console.error(`work-fleet: ${failure}`);
|
|
43
|
+
}
|
|
44
|
+
reported = new Set(failures);
|
|
45
|
+
}),
|
|
46
|
+
),
|
|
47
|
+
);
|
|
48
|
+
return run(`${host.interval} seconds`, admission);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export function runFleet(host: FleetHost, parts: HostParts = productionParts(host)) {
|
|
52
|
+
return Effect.scoped(hostScheduler(host)).pipe(Effect.provide(hostLayer(host, parts)));
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export function dispatchWork(host: FleetHost, workId: string, parts: HostParts = productionParts(host)) {
|
|
56
|
+
return dispatchApproved(host, workId).pipe(Effect.provide(hostLayer(host, parts)));
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export function continueWork(host: FleetHost, workId: string, message: string, parts: HostParts = productionParts(host)) {
|
|
60
|
+
return Effect.gen(function* () {
|
|
61
|
+
return yield* (yield* Fleet).continue(workId, message);
|
|
62
|
+
}).pipe(Effect.provide(hostLayer(host, parts)));
|
|
63
|
+
}
|