@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
package/package.json
CHANGED
|
@@ -1,11 +1,86 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shivaedev/work-fleet",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "
|
|
5
|
-
"
|
|
3
|
+
"version": "0.1.1",
|
|
4
|
+
"description": "Optional Board-backed execution, review and authorized delivery",
|
|
5
|
+
"homepage": "https://github.com/ShivaeDev/platform/tree/main/packages/work-fleet#readme",
|
|
6
|
+
"bugs": {
|
|
7
|
+
"url": "https://github.com/ShivaeDev/platform/issues"
|
|
8
|
+
},
|
|
6
9
|
"repository": {
|
|
7
10
|
"type": "git",
|
|
8
11
|
"url": "git+https://github.com/ShivaeDev/platform.git",
|
|
9
12
|
"directory": "packages/work-fleet"
|
|
13
|
+
},
|
|
14
|
+
"license": "MIT",
|
|
15
|
+
"sideEffects": false,
|
|
16
|
+
"type": "module",
|
|
17
|
+
"imports": {
|
|
18
|
+
"#test/*": "./src/test-support/*",
|
|
19
|
+
"#*.ts": {
|
|
20
|
+
"source": "./src/*.ts",
|
|
21
|
+
"types": "./dist/*.d.ts",
|
|
22
|
+
"default": "./dist/*.js"
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"exports": {
|
|
26
|
+
"./*.ts": {
|
|
27
|
+
"types": "./dist/*.d.ts",
|
|
28
|
+
"source": "./src/*.ts",
|
|
29
|
+
"import": "./dist/*.js",
|
|
30
|
+
"default": "./dist/*.js"
|
|
31
|
+
},
|
|
32
|
+
"./package.json": "./package.json"
|
|
33
|
+
},
|
|
34
|
+
"bin": {
|
|
35
|
+
"work-fleet": "./dist/cli.js"
|
|
36
|
+
},
|
|
37
|
+
"files": [
|
|
38
|
+
"dist",
|
|
39
|
+
"src",
|
|
40
|
+
"!src/**/*.test.ts",
|
|
41
|
+
"!src/**/*.spec.ts",
|
|
42
|
+
"!src/**/test-support",
|
|
43
|
+
"CHANGELOG.md",
|
|
44
|
+
"README.md"
|
|
45
|
+
],
|
|
46
|
+
"dependencies": {
|
|
47
|
+
"@effect/sql-pg": "4.0.4",
|
|
48
|
+
"@shivaedev/effect-contract": "0.5.0",
|
|
49
|
+
"@shivaedev/effect-service": "0.3.0",
|
|
50
|
+
"@shivaedev/effect-sql": "0.3.0",
|
|
51
|
+
"@shivaedev/platform": "0.10.0",
|
|
52
|
+
"@shivaedev/work-board": "0.14.0",
|
|
53
|
+
"yaml": "2.9.1"
|
|
54
|
+
},
|
|
55
|
+
"devDependencies": {
|
|
56
|
+
"@effect/platform-node": "4.0.4",
|
|
57
|
+
"@effect/platform-node-shared": "4.0.4",
|
|
58
|
+
"@effect/vitest": "4.0.4",
|
|
59
|
+
"@shivaedev/effect-test": "0.4.0",
|
|
60
|
+
"@shivaedev/effect-test-sql": "0.3.0",
|
|
61
|
+
"@shivaedev/quality": "0.21.0",
|
|
62
|
+
"@types/node": "24.19.1",
|
|
63
|
+
"@typescript/native": "npm:typescript@7.0.2",
|
|
64
|
+
"effect": "4.0.4",
|
|
65
|
+
"typescript": "npm:@typescript/typescript6@6.0.2",
|
|
66
|
+
"vitest": "5.0.3"
|
|
67
|
+
},
|
|
68
|
+
"peerDependencies": {
|
|
69
|
+
"@effect/platform-node": "4.0.4",
|
|
70
|
+
"@effect/platform-node-shared": "4.0.4",
|
|
71
|
+
"effect": "4.0.4"
|
|
72
|
+
},
|
|
73
|
+
"engines": {
|
|
74
|
+
"node": ">=24"
|
|
75
|
+
},
|
|
76
|
+
"publishConfig": {
|
|
77
|
+
"access": "public",
|
|
78
|
+
"provenance": true
|
|
79
|
+
},
|
|
80
|
+
"scripts": {
|
|
81
|
+
"build": "node --eval \"import('node:fs').then(({ rmSync }) => rmSync('dist', { force: true, recursive: true }))\" && tsc --project tsconfig.build.json",
|
|
82
|
+
"ready": "pnpm typecheck && pnpm test && pnpm build",
|
|
83
|
+
"test": "vitest run",
|
|
84
|
+
"typecheck": "tsc --noEmit"
|
|
10
85
|
}
|
|
11
86
|
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { Schema } from "effect";
|
|
2
|
+
|
|
3
|
+
export const DecisionCode = Schema.Literals([
|
|
4
|
+
"approval-required",
|
|
5
|
+
"board-failure",
|
|
6
|
+
"checks-repair-exhausted",
|
|
7
|
+
"checks-result-invalid",
|
|
8
|
+
"delivery-head-mismatch",
|
|
9
|
+
"delivery-pr-required",
|
|
10
|
+
"duplicate-turns",
|
|
11
|
+
"empty-report",
|
|
12
|
+
"fleet-denied",
|
|
13
|
+
"fleet-integration",
|
|
14
|
+
"fleet-invalid",
|
|
15
|
+
"fleet-missing",
|
|
16
|
+
"fleet-stale",
|
|
17
|
+
"foreign-pr",
|
|
18
|
+
"incomplete-context",
|
|
19
|
+
"incomplete-observation",
|
|
20
|
+
"integration-failure",
|
|
21
|
+
"no-change-checks-unconfigured",
|
|
22
|
+
"not-ancestor",
|
|
23
|
+
"pr-conflicting",
|
|
24
|
+
"pr-head-moved",
|
|
25
|
+
"provider-quota-unavailable",
|
|
26
|
+
"relevant-change",
|
|
27
|
+
"report-published",
|
|
28
|
+
"report-too-large",
|
|
29
|
+
"result-identity-changed",
|
|
30
|
+
"reviewed-pr-ready",
|
|
31
|
+
"reviewer-terminal",
|
|
32
|
+
"session-active-turn",
|
|
33
|
+
"session-active-turn-exhausted",
|
|
34
|
+
"session-ambiguous",
|
|
35
|
+
"session-persistence",
|
|
36
|
+
"session-protocol",
|
|
37
|
+
"session-queue-full",
|
|
38
|
+
"session-rejected",
|
|
39
|
+
"session-stalled",
|
|
40
|
+
"session-turn-missing",
|
|
41
|
+
"session-unavailable",
|
|
42
|
+
"worker-question",
|
|
43
|
+
"worker-receipt-missing",
|
|
44
|
+
"worker-report-head-invalid",
|
|
45
|
+
"worker-report-head-moved",
|
|
46
|
+
"worker-report-merged-head-mismatch",
|
|
47
|
+
"worker-report-pr-invalid",
|
|
48
|
+
"worker-terminal",
|
|
49
|
+
]);
|
|
50
|
+
export type DecisionCode = typeof DecisionCode.Type;
|
package/src/admit.ts
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { Effect } from "effect";
|
|
2
|
+
import { Forbidden } from "@shivaedev/platform/errors/taxonomy.ts";
|
|
3
|
+
import { withFailureContext } from "#engine/failureContext.ts";
|
|
4
|
+
import { allAttempts, type FleetRecord } from "#model.ts";
|
|
5
|
+
import type { BoardFailure, BoardWork, FleetConfiguration } from "#policy.ts";
|
|
6
|
+
import { qualifyDependencies } from "#qualifyDependencies.ts";
|
|
7
|
+
export const admit = Effect.fn("Fleet.admit")(function* (
|
|
8
|
+
work: BoardWork,
|
|
9
|
+
records: readonly FleetRecord[],
|
|
10
|
+
policy: FleetConfiguration,
|
|
11
|
+
get: (workId: string) => Effect.Effect<BoardWork, BoardFailure>,
|
|
12
|
+
) {
|
|
13
|
+
if (!work.approved) {
|
|
14
|
+
return yield* Effect.fail(
|
|
15
|
+
withFailureContext(new Forbidden({ message: "Current Board revision needs maintainer approval" }), { code: "approval-required" }),
|
|
16
|
+
);
|
|
17
|
+
}
|
|
18
|
+
yield* qualifyDependencies(work.dependsOn, records, get);
|
|
19
|
+
const quota = policy.quota;
|
|
20
|
+
const submitted = records.flatMap(allAttempts).filter((attempt) => attempt.submittedAt >= quota.observedAt).length;
|
|
21
|
+
if (
|
|
22
|
+
!(Number.isFinite(quota.observedAt) && Number.isFinite(quota.expiresAt))
|
|
23
|
+
|| quota.observedAt > policy.now()
|
|
24
|
+
|| quota.expiresAt <= quota.observedAt
|
|
25
|
+
|| quota.available === undefined
|
|
26
|
+
|| !Number.isFinite(quota.available)
|
|
27
|
+
|| !Number.isInteger(quota.available)
|
|
28
|
+
|| quota.available < 0
|
|
29
|
+
|| quota.expiresAt <= policy.now()
|
|
30
|
+
|| quota.available <= submitted
|
|
31
|
+
) {
|
|
32
|
+
return yield* Effect.fail(
|
|
33
|
+
withFailureContext(new Forbidden({ message: "Fresh available provider quota is required" }), {
|
|
34
|
+
attentionOwner: "automation",
|
|
35
|
+
code: "provider-quota-unavailable",
|
|
36
|
+
}),
|
|
37
|
+
);
|
|
38
|
+
}
|
|
39
|
+
});
|
package/src/attention.ts
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Schema } from "effect";
|
|
2
|
+
|
|
3
|
+
export const AttentionOwner = Schema.Literals(["maintainer", "orchestrator", "automation"]);
|
|
4
|
+
export type AttentionOwner = typeof AttentionOwner.Type;
|
|
5
|
+
|
|
6
|
+
export function waitingOwner(record: {
|
|
7
|
+
readonly attentionOwner?: AttentionOwner | undefined;
|
|
8
|
+
readonly blocker?: string | undefined;
|
|
9
|
+
readonly checks?: { readonly pending?: boolean | undefined } | undefined;
|
|
10
|
+
readonly decision?: { readonly attentionOwner?: AttentionOwner | undefined } | undefined;
|
|
11
|
+
readonly launchRetry?: { readonly retryAt: number } | undefined;
|
|
12
|
+
readonly stage: string;
|
|
13
|
+
}): AttentionOwner | undefined {
|
|
14
|
+
if (record.launchRetry !== undefined || (record.stage === "prepared" && record.blocker?.startsWith("waiting for dependency "))) {
|
|
15
|
+
return "automation";
|
|
16
|
+
}
|
|
17
|
+
if (record.stage === "needs-human") {
|
|
18
|
+
return record.attentionOwner ?? record.decision?.attentionOwner ?? "orchestrator";
|
|
19
|
+
}
|
|
20
|
+
if (record.blocker !== undefined) {
|
|
21
|
+
return record.attentionOwner ?? "orchestrator";
|
|
22
|
+
}
|
|
23
|
+
return record.stage === "validating" && record.checks?.pending ? "automation" : undefined;
|
|
24
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { Effect } from "effect";
|
|
2
|
+
import { attention } from "@shivaedev/work-board/integration/attention.ts";
|
|
3
|
+
import { board as boardApi } from "@shivaedev/work-board/integration/board.ts";
|
|
4
|
+
import { responses } from "@shivaedev/work-board/integration/responses.ts";
|
|
5
|
+
import { type BoardSnapshot, recordBoardSource } from "#board/readPass.ts";
|
|
6
|
+
import { BoardAcknowledgementStale, type BoardDecisionAcknowledgement } from "#board/schema.ts";
|
|
7
|
+
import { BoardFailure } from "#policy.ts";
|
|
8
|
+
|
|
9
|
+
const { managedRequestReceipt } = attention;
|
|
10
|
+
const { metadataModel } = boardApi;
|
|
11
|
+
const { publish, revisionOf } = responses;
|
|
12
|
+
|
|
13
|
+
export function acknowledgeDecision(root: string, realRoot: string, snapshot: Effect.Effect<BoardSnapshot, BoardFailure>) {
|
|
14
|
+
return Effect.fn("FleetBoard.acknowledgeDecision")(function* (input: BoardDecisionAcknowledgement) {
|
|
15
|
+
const current = yield* snapshot;
|
|
16
|
+
const incomplete = Array.from(current.problems.values()).find((problem) => problem.code === "incomplete-observation");
|
|
17
|
+
if (incomplete !== undefined) {
|
|
18
|
+
return yield* Effect.fail(incomplete);
|
|
19
|
+
}
|
|
20
|
+
const all = current.documents.filter((document) => !current.problems.has(document.file));
|
|
21
|
+
const decision = input.decision;
|
|
22
|
+
const source = all.find((document) => document.file === decision.sourcePath);
|
|
23
|
+
if (!source || source.parsed.fields.id !== decision.itemId || revisionOf(source.source) !== decision.revision) {
|
|
24
|
+
return yield* Effect.fail(
|
|
25
|
+
new BoardAcknowledgementStale({ message: "The decision source changed or moved; its request cannot be acknowledged." }),
|
|
26
|
+
);
|
|
27
|
+
}
|
|
28
|
+
const request = source.parsed.fields.attention?.find((candidate) => candidate.id === decision.request);
|
|
29
|
+
const requestReceipt = {
|
|
30
|
+
disposition: input.disposition,
|
|
31
|
+
question: decision.questionId,
|
|
32
|
+
recordedAt: input.recordedAt,
|
|
33
|
+
reviewedRevision: decision.revision,
|
|
34
|
+
...(input.responseId === undefined ? {} : { response: input.responseId }),
|
|
35
|
+
};
|
|
36
|
+
const id = `request-receipt.${revisionOf(JSON.stringify(requestReceipt))}`;
|
|
37
|
+
const content = `---\n${JSON.stringify({ id, kind: "result", "request_receipt": requestReceipt })}\n---\n# Managed request acknowledgement\n\nThis immutable receipt acknowledges request handling; it grants no execution, acceptance or delivery authority.\n`;
|
|
38
|
+
const file = `responses/${id}.md`;
|
|
39
|
+
const receiptDocument = { file, parsed: boardApi.metadataParse(content) };
|
|
40
|
+
const model = metadataModel([...all.filter((document) => document.file !== file), receiptDocument]);
|
|
41
|
+
if (!request || managedRequestReceipt(source, request, model) === undefined) {
|
|
42
|
+
return yield* Effect.fail(
|
|
43
|
+
new BoardAcknowledgementStale({ message: "The exact managed question and applicable response cannot be qualified for acknowledgement." }),
|
|
44
|
+
);
|
|
45
|
+
}
|
|
46
|
+
yield* publish(root, realRoot, id, content).pipe(
|
|
47
|
+
Effect.mapError(() => new BoardFailure({ message: "The managed request acknowledgement could not be recorded on Board." })),
|
|
48
|
+
);
|
|
49
|
+
yield* recordBoardSource(realRoot, file, content, receiptDocument.parsed);
|
|
50
|
+
});
|
|
51
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { ParsedMetadata } from "@shivaedev/work-board/integration/board.ts";
|
|
2
|
+
import { responses } from "@shivaedev/work-board/integration/responses.ts";
|
|
3
|
+
import { fleetDeliverable } from "#board/fleetField.ts";
|
|
4
|
+
|
|
5
|
+
const { revisionOf } = responses;
|
|
6
|
+
|
|
7
|
+
export function briefRevision(parsed: ParsedMetadata): string {
|
|
8
|
+
return revisionOf(
|
|
9
|
+
JSON.stringify({
|
|
10
|
+
body: parsed.body,
|
|
11
|
+
criteria: (parsed.fields.criteria ?? []).map(({ id, text }) => ({ id, text })),
|
|
12
|
+
deliverable: fleetDeliverable(parsed) ?? "change",
|
|
13
|
+
kind: parsed.fields.kind,
|
|
14
|
+
relationships: (parsed.fields.relationships ?? []).map(({ kind, target }) => ({ kind, target })),
|
|
15
|
+
}),
|
|
16
|
+
);
|
|
17
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { isAlias, isMap, isScalar, parseDocument } from "yaml";
|
|
2
|
+
|
|
3
|
+
interface Edit {
|
|
4
|
+
readonly end: number;
|
|
5
|
+
readonly start: number;
|
|
6
|
+
readonly text: string;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
function scalarEdit(header: string, node: unknown, value: string, encoded: string): Edit | false | undefined {
|
|
10
|
+
if (!(isScalar(node) || isAlias(node)) || node.range === undefined || node.range === null) {
|
|
11
|
+
return false;
|
|
12
|
+
}
|
|
13
|
+
if (isScalar(node) && node.value === value) {
|
|
14
|
+
return;
|
|
15
|
+
}
|
|
16
|
+
const [start, end] = node.range;
|
|
17
|
+
const token = node.srcToken;
|
|
18
|
+
const ending =
|
|
19
|
+
token?.type === "block-scalar"
|
|
20
|
+
? token.props
|
|
21
|
+
.slice(1)
|
|
22
|
+
.map((part) => ("source" in part ? part.source : ""))
|
|
23
|
+
.join("")
|
|
24
|
+
: "";
|
|
25
|
+
const spacing = header[start - 1] === ":" ? " " : "";
|
|
26
|
+
return { end, start, text: `${spacing}${encoded}${ending}` };
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export function completionFields(header: string, nextAction: string, newline: string): readonly Edit[] | undefined {
|
|
30
|
+
const document = parseDocument(header, { keepSourceTokens: true });
|
|
31
|
+
const mapping = document.contents;
|
|
32
|
+
if (document.errors.length > 0 || document.warnings.length > 0 || !isMap(mapping) || mapping.range === undefined) {
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
const edits: Edit[] = [];
|
|
36
|
+
const missing: string[] = [];
|
|
37
|
+
for (const [key, value, encoded] of [
|
|
38
|
+
["status", "done", "done"],
|
|
39
|
+
["next_action", nextAction, JSON.stringify(nextAction)],
|
|
40
|
+
] as const) {
|
|
41
|
+
const pair = mapping.items.find((item) => isScalar(item.key) && item.key.value === key);
|
|
42
|
+
if (pair === undefined) {
|
|
43
|
+
missing.push(`${key}: ${encoded}`);
|
|
44
|
+
continue;
|
|
45
|
+
}
|
|
46
|
+
const edit = scalarEdit(header, pair.value, value, encoded);
|
|
47
|
+
if (edit === false) {
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
if (edit !== undefined) {
|
|
51
|
+
edits.push(edit);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
if (missing.length > 0) {
|
|
55
|
+
edits.push(missingEdit(header, mapping.flow === true, mapping.range[1], mapping.items.length, missing, newline));
|
|
56
|
+
}
|
|
57
|
+
return edits;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
function missingEdit(header: string, flow: boolean, end: number, count: number, missing: readonly string[], newline: string): Edit {
|
|
61
|
+
const start = flow ? end - 1 : header.length;
|
|
62
|
+
const separator = count > 0 && !header.slice(0, start).trimEnd().endsWith(",") ? ", " : "";
|
|
63
|
+
const text = flow ? `${separator}${missing.join(", ")}` : `${missing.join(newline)}${newline}`;
|
|
64
|
+
return { end: start, start, text };
|
|
65
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { completionFields } from "#board/completionFields.ts";
|
|
2
|
+
|
|
3
|
+
export function completionMarkdown(source: string, nextAction: string): string | undefined {
|
|
4
|
+
const opening = /^\uFEFF?---[ \t]*\r?\n/u.exec(source);
|
|
5
|
+
if (opening === null) {
|
|
6
|
+
return;
|
|
7
|
+
}
|
|
8
|
+
const offset = opening[0].length;
|
|
9
|
+
const closing = /^---[ \t]*\r?$/mu.exec(source.slice(offset));
|
|
10
|
+
if (closing === null) {
|
|
11
|
+
return;
|
|
12
|
+
}
|
|
13
|
+
const header = source.slice(offset, offset + closing.index);
|
|
14
|
+
const newline = opening[0].endsWith("\r\n") ? "\r\n" : "\n";
|
|
15
|
+
const edits = completionFields(header, nextAction, newline);
|
|
16
|
+
if (edits === undefined) {
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
let result = source;
|
|
20
|
+
for (const edit of [...edits].sort((left, right) => right.start - left.start)) {
|
|
21
|
+
result = result.slice(0, offset + edit.start) + edit.text + result.slice(offset + edit.end);
|
|
22
|
+
}
|
|
23
|
+
return result;
|
|
24
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { releaseOnly } from "#engine/releaseOnly.ts";
|
|
2
|
+
import type { Decision } from "#policy.ts";
|
|
3
|
+
|
|
4
|
+
export function decisionAnswer(input: Decision) {
|
|
5
|
+
if (input.worker !== undefined) {
|
|
6
|
+
return "Record your answer on this item’s answer card to continue the worker in its existing thread. Use a guided release answer or the release command to free terminal ownership instead.";
|
|
7
|
+
}
|
|
8
|
+
const explanation = releaseOnly(input.code);
|
|
9
|
+
const retryText = "### Request changes\nFleet keeps the branch and PR and works on your answer";
|
|
10
|
+
const retry = explanation === undefined ? `:::option{id="retry"}\n${retryText}\n:::\n\n` : "";
|
|
11
|
+
return `${explanation === undefined ? "" : `${explanation}\n\n`}::::question{id="fleet-action" select="one"}\n### How should Fleet proceed?\n\n${retry}:::option{id="release"}\n### Release\nFleet stops and hands the work back\n:::\n::::`;
|
|
12
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { Effect } from "effect";
|
|
2
|
+
import { board } from "@shivaedev/work-board/integration/board.ts";
|
|
3
|
+
import type { Reading } from "@shivaedev/work-board/integration/responses.ts";
|
|
4
|
+
import { responses } from "@shivaedev/work-board/integration/responses.ts";
|
|
5
|
+
import type { BoardDocument } from "#board/documents.ts";
|
|
6
|
+
import type { BoardDecision, BoardDecisionReading } from "#board/schema.ts";
|
|
7
|
+
import { BoardFailure } from "#policy.ts";
|
|
8
|
+
|
|
9
|
+
const { metadataModel } = board;
|
|
10
|
+
const { currentResponses, questionId, readResponses, revisionOf } = responses;
|
|
11
|
+
|
|
12
|
+
function currentResponse(reading: Reading): BoardDecisionReading {
|
|
13
|
+
const current = currentResponses(reading.responses);
|
|
14
|
+
if (current.length === 0 && reading.responses.length === 0) {
|
|
15
|
+
return { _tag: "Pending" };
|
|
16
|
+
}
|
|
17
|
+
if (current.length !== 1 || !current[0]) {
|
|
18
|
+
return { _tag: "Ambiguous", responseIds: current.map((response) => response.id) };
|
|
19
|
+
}
|
|
20
|
+
return { _tag: "Response", response: current[0] };
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export function decisionReading(documents: Effect.Effect<readonly BoardDocument[], BoardFailure>) {
|
|
24
|
+
return Effect.fn("FleetBoard.readDecision")(function* (receipt: BoardDecision): Effect.fn.Return<BoardDecisionReading, BoardFailure> {
|
|
25
|
+
const all = yield* documents;
|
|
26
|
+
const model = metadataModel(all);
|
|
27
|
+
const matches = model.ids.get(receipt.itemId);
|
|
28
|
+
const document = matches?.length === 1 ? all.find((entry) => entry.file === matches[0]?.file) : undefined;
|
|
29
|
+
if (!document || document.file !== receipt.sourcePath || revisionOf(document.source) !== receipt.revision) {
|
|
30
|
+
return { _tag: "Stale", reason: "The decision source changed, moved or became ambiguous." };
|
|
31
|
+
}
|
|
32
|
+
if (
|
|
33
|
+
document.parsed.fields.kind !== "decision"
|
|
34
|
+
|| document.parsed.fields.attention?.filter((request) => request.id === receipt.request && request.state === "open").length !== 1
|
|
35
|
+
|| questionId(receipt.itemId, receipt.request, receipt.revision, receipt.sourcePath) !== receipt.questionId
|
|
36
|
+
) {
|
|
37
|
+
return { _tag: "Stale", reason: "The exact open decision request is unavailable." };
|
|
38
|
+
}
|
|
39
|
+
const snapshot = Effect.succeed({ documents: all, entries: [], model, modified: new Map<string, number>(), revision: 0, unavailable: [] });
|
|
40
|
+
const reading = yield* readResponses(snapshot)(receipt.questionId).pipe(
|
|
41
|
+
Effect.mapError(() => new BoardFailure({ message: "Fleet decision response history is incomplete or ambiguous." })),
|
|
42
|
+
);
|
|
43
|
+
if (
|
|
44
|
+
reading.question.question.item !== receipt.itemId
|
|
45
|
+
|| reading.question.question.request !== receipt.request
|
|
46
|
+
|| reading.question.question.source !== receipt.sourcePath
|
|
47
|
+
|| reading.question.question.reviewedRevision !== receipt.revision
|
|
48
|
+
|| reading.question.context !== document.source
|
|
49
|
+
) {
|
|
50
|
+
return { _tag: "Stale", reason: "The registered question does not match the reviewed decision context." };
|
|
51
|
+
}
|
|
52
|
+
return currentResponse(reading);
|
|
53
|
+
});
|
|
54
|
+
}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { Effect, FileSystem, Path } from "effect";
|
|
2
|
+
import type { MetadataDocument } from "@shivaedev/work-board/integration/board.ts";
|
|
3
|
+
import { board as boardApi } from "@shivaedev/work-board/integration/board.ts";
|
|
4
|
+
import { readDocument } from "#board/readDocument.ts";
|
|
5
|
+
import { BoardSnapshot, readSnapshot } from "#board/readPass.ts";
|
|
6
|
+
import { BoardFailure } from "#policy.ts";
|
|
7
|
+
|
|
8
|
+
const { listMarkdown } = boardApi;
|
|
9
|
+
|
|
10
|
+
export type BoardDocument = MetadataDocument & { readonly source: string };
|
|
11
|
+
|
|
12
|
+
export const snapshotDocument = Effect.fn("FleetBoard.snapshotDocument")(function* (snapshot: BoardSnapshot, workId: string) {
|
|
13
|
+
const matches = snapshot.model.ids.get(workId);
|
|
14
|
+
const found = matches?.length === 1 ? snapshot.files.get(matches[0]?.file ?? "") : undefined;
|
|
15
|
+
if (found === undefined) {
|
|
16
|
+
const message = [
|
|
17
|
+
`Board identity is missing or ambiguous: ${workId}`,
|
|
18
|
+
...Array.from(snapshot.problems.values(), (failure) => failure.message),
|
|
19
|
+
].join("; ");
|
|
20
|
+
const incomplete = Array.from(snapshot.problems.values()).some((failure) => failure.code === "incomplete-observation");
|
|
21
|
+
return yield* Effect.fail(new BoardFailure({ code: incomplete ? "incomplete-observation" : undefined, message }));
|
|
22
|
+
}
|
|
23
|
+
const problem = snapshot.problems.get(found.file);
|
|
24
|
+
return yield* problem === undefined ? Effect.succeed(found) : Effect.fail(problem);
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
const readDocuments = Effect.fn("FleetBoard.readDocuments")(function* (root: string, realRoot: string) {
|
|
28
|
+
const files = yield* listMarkdown(root, realRoot).pipe(
|
|
29
|
+
Effect.mapError(
|
|
30
|
+
(error) => new BoardFailure({ code: "incomplete-observation", message: `Board sources could not be listed: ${root} (${error.message})` }),
|
|
31
|
+
),
|
|
32
|
+
);
|
|
33
|
+
const problems = new Map<string, BoardFailure>();
|
|
34
|
+
const documents = yield* Effect.forEach(files, (file) =>
|
|
35
|
+
readDocument(root, realRoot, file.path).pipe(
|
|
36
|
+
Effect.map(({ document, problem }) => {
|
|
37
|
+
if (problem !== undefined) {
|
|
38
|
+
problems.set(file.path, problem);
|
|
39
|
+
}
|
|
40
|
+
return document;
|
|
41
|
+
}),
|
|
42
|
+
Effect.catch((error) => {
|
|
43
|
+
problems.set(file.path, error);
|
|
44
|
+
return Effect.succeed(undefined);
|
|
45
|
+
}),
|
|
46
|
+
),
|
|
47
|
+
);
|
|
48
|
+
for (const problem of problems.values()) {
|
|
49
|
+
yield* Effect.logWarning(problem.message);
|
|
50
|
+
}
|
|
51
|
+
return new BoardSnapshot(
|
|
52
|
+
documents.filter((document) => document !== undefined),
|
|
53
|
+
problems,
|
|
54
|
+
);
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
export const refreshSnapshotDocument = Effect.fn("FleetBoard.refreshSnapshotDocument")(function* (
|
|
58
|
+
root: string,
|
|
59
|
+
realRoot: string,
|
|
60
|
+
snapshot: BoardSnapshot,
|
|
61
|
+
workId: string,
|
|
62
|
+
) {
|
|
63
|
+
const previous = yield* snapshotDocument(snapshot, workId);
|
|
64
|
+
const { document, problem } = yield* readDocument(root, realRoot, previous.file);
|
|
65
|
+
if (problem !== undefined) {
|
|
66
|
+
return yield* Effect.fail(problem);
|
|
67
|
+
}
|
|
68
|
+
if (document === undefined) {
|
|
69
|
+
return yield* Effect.fail(new BoardFailure({ code: "incomplete-observation", message: `Board source is unavailable: ${previous.file}` }));
|
|
70
|
+
}
|
|
71
|
+
snapshot.record(document);
|
|
72
|
+
return yield* snapshotDocument(snapshot, workId);
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
export function boardSnapshot(root: string, realRoot: string) {
|
|
76
|
+
return readSnapshot(realRoot, readDocuments(root, realRoot));
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export function boardDocuments(root: string, realRoot: string) {
|
|
80
|
+
return boardSnapshot(root, realRoot).pipe(Effect.map((snapshot) => snapshot.documents.filter((document) => !snapshot.problems.has(document.file))));
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export function boundSnapshot(root: string, realRoot: string, fs: FileSystem.FileSystem, path: Path.Path) {
|
|
84
|
+
return boardSnapshot(root, realRoot).pipe(Effect.provideService(FileSystem.FileSystem, fs), Effect.provideService(Path.Path, path));
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export function boundDocuments(root: string, realRoot: string, fs: FileSystem.FileSystem, path: Path.Path) {
|
|
88
|
+
return boardDocuments(root, realRoot).pipe(Effect.provideService(FileSystem.FileSystem, fs), Effect.provideService(Path.Path, path));
|
|
89
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { parse } from "yaml";
|
|
2
|
+
import type { ParsedMetadata } from "@shivaedev/work-board/integration/board.ts";
|
|
3
|
+
|
|
4
|
+
const APPROVAL = "fleet";
|
|
5
|
+
const LAUNCH = "fleet-launch";
|
|
6
|
+
const DELIVERABLE = "fleet-deliverable";
|
|
7
|
+
const parsedFields = new WeakMap<ParsedMetadata, ReadonlyMap<string, unknown>>();
|
|
8
|
+
|
|
9
|
+
function fleetField(parsed: ParsedMetadata, field: string): unknown {
|
|
10
|
+
if (parsed.raw === undefined || parsed.lines[field] === undefined || parsed.diagnostics.some((diagnostic) => diagnostic.field === undefined)) {
|
|
11
|
+
return undefined;
|
|
12
|
+
}
|
|
13
|
+
const cached = parsedFields.get(parsed);
|
|
14
|
+
if (cached !== undefined) {
|
|
15
|
+
return cached.get(field);
|
|
16
|
+
}
|
|
17
|
+
const lines = parsed.raw.split(/\r?\n/u);
|
|
18
|
+
const closing = lines.findLastIndex((line) => line.trimEnd() === "---");
|
|
19
|
+
const data: unknown = parse(lines.slice(1, closing).join("\n"));
|
|
20
|
+
const values = new Map(typeof data === "object" && data !== null ? Object.entries(data) : []);
|
|
21
|
+
parsedFields.set(parsed, values);
|
|
22
|
+
return values.get(field);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export function fleetApproved(parsed: ParsedMetadata): boolean {
|
|
26
|
+
return fleetField(parsed, APPROVAL) === "approved";
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export function fleetLaunch(parsed: ParsedMetadata): unknown {
|
|
30
|
+
return fleetField(parsed, LAUNCH);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export function fleetDeliverable(parsed: ParsedMetadata): unknown {
|
|
34
|
+
return fleetField(parsed, DELIVERABLE);
|
|
35
|
+
}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { Context, Effect, FileSystem, Layer, Path, Schema } from "effect";
|
|
2
|
+
import { defineService } from "@shivaedev/effect-service/define-service.ts";
|
|
3
|
+
import { board as boardApi } from "@shivaedev/work-board/integration/board.ts";
|
|
4
|
+
import { acknowledgeDecision } from "#board/acknowledgeDecision.ts";
|
|
5
|
+
import { briefRevision } from "#board/briefRevision.ts";
|
|
6
|
+
import { completionMarkdown } from "#board/completionMarkdown.ts";
|
|
7
|
+
import { decisionReading } from "#board/decisionReading.ts";
|
|
8
|
+
import { boundDocuments, boundSnapshot, refreshSnapshotDocument, snapshotDocument } from "#board/documents.ts";
|
|
9
|
+
import { fleetApproved, fleetDeliverable } from "#board/fleetField.ts";
|
|
10
|
+
import { publishBoard } from "#board/publish.ts";
|
|
11
|
+
import { publishReport } from "#board/publishReport.ts";
|
|
12
|
+
import { workMetadata } from "#board/readPass.ts";
|
|
13
|
+
import { workRevision } from "#board/workRevision.ts";
|
|
14
|
+
import { writeCompletion } from "#board/writeCompletion.ts";
|
|
15
|
+
import { BoardFailure, BoardGateway } from "#policy.ts";
|
|
16
|
+
import { RepositoryPath } from "#preparation/schema.ts";
|
|
17
|
+
|
|
18
|
+
class BoardRoot extends Context.Service<BoardRoot, string>()("Fleet/BoardRoot") {}
|
|
19
|
+
|
|
20
|
+
const MarkdownBoard = defineService({
|
|
21
|
+
id: "Fleet/MarkdownBoard",
|
|
22
|
+
initialize: Effect.gen(function* () {
|
|
23
|
+
const root = yield* BoardRoot;
|
|
24
|
+
const fs = yield* FileSystem.FileSystem;
|
|
25
|
+
const path = yield* Path.Path;
|
|
26
|
+
const realRoot = yield* fs.realPath(root);
|
|
27
|
+
const documents = boundDocuments(root, realRoot, fs, path);
|
|
28
|
+
const snapshot = boundSnapshot(root, realRoot, fs, path);
|
|
29
|
+
const get = Effect.fn("FleetBoard.get")(function* (workId: string, options?: { readonly fresh?: boolean }) {
|
|
30
|
+
const current = yield* snapshot;
|
|
31
|
+
const found = yield* options?.fresh
|
|
32
|
+
? refreshSnapshotDocument(root, realRoot, current, workId).pipe(
|
|
33
|
+
Effect.provideService(FileSystem.FileSystem, fs),
|
|
34
|
+
Effect.provideService(Path.Path, path),
|
|
35
|
+
)
|
|
36
|
+
: snapshotDocument(current, workId);
|
|
37
|
+
const deliverable = fleetDeliverable(found.parsed);
|
|
38
|
+
if (deliverable !== undefined && deliverable !== "report") {
|
|
39
|
+
return yield* Effect.fail(new BoardFailure({ message: "Invalid fleet-deliverable; use report or omit the field for pull requests." }));
|
|
40
|
+
}
|
|
41
|
+
return {
|
|
42
|
+
approved: fleetApproved(found.parsed),
|
|
43
|
+
areas: found.parsed.fields.areas,
|
|
44
|
+
status: found.parsed.fields.status,
|
|
45
|
+
...(deliverable === "report" ? { deliverable: "report" as const } : {}),
|
|
46
|
+
context: found.source,
|
|
47
|
+
dependsOn: (found.parsed.fields.relationships ?? []).filter((relation) => relation.kind === "depends_on").map((relation) => relation.target),
|
|
48
|
+
revision: briefRevision(found.parsed),
|
|
49
|
+
sourcePath: path.join(realRoot, found.file),
|
|
50
|
+
workId,
|
|
51
|
+
};
|
|
52
|
+
});
|
|
53
|
+
const publish = publishBoard(root, realRoot, documents);
|
|
54
|
+
return { documents, get, path, publish, realRoot, root, snapshot };
|
|
55
|
+
}),
|
|
56
|
+
methods: ({ root, realRoot, documents, get, publish, path, snapshot }) =>
|
|
57
|
+
BoardGateway.of({
|
|
58
|
+
acknowledgeDecision: acknowledgeDecision(root, realRoot, snapshot),
|
|
59
|
+
complete: Effect.fn("FleetBoard.complete")(function* (workId, sourcePath, nextAction) {
|
|
60
|
+
const work = yield* get(workId);
|
|
61
|
+
if (work.sourcePath !== sourcePath) {
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
const content = completionMarkdown(work.context, nextAction);
|
|
65
|
+
if (content === undefined) {
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
const parsed = boardApi.metadataParse(content);
|
|
69
|
+
if (parsed.fields.id !== workId || parsed.diagnostics.length > 0 || briefRevision(parsed) !== work.revision) {
|
|
70
|
+
return yield* Effect.fail(new BoardFailure({ message: "Completion bookkeeping would change authored Board context or identity." }));
|
|
71
|
+
}
|
|
72
|
+
yield* writeCompletion(root, realRoot, path.relative(realRoot, sourcePath), work.context, content).pipe(
|
|
73
|
+
Effect.mapError((error) => new BoardFailure({ message: error.message })),
|
|
74
|
+
);
|
|
75
|
+
}),
|
|
76
|
+
decision: Effect.fn("FleetBoard.decision")(function* (workId, input, originalContext) {
|
|
77
|
+
const work = originalContext ?? (yield* get(workId));
|
|
78
|
+
const parsed = yield* workMetadata(work);
|
|
79
|
+
const relativeSource = path.relative(realRoot, work.sourcePath);
|
|
80
|
+
if (
|
|
81
|
+
work.workId !== workId
|
|
82
|
+
|| workRevision(work.revision, work.context) !== briefRevision(parsed)
|
|
83
|
+
|| parsed.fields.id !== workId
|
|
84
|
+
|| parsed.diagnostics.length > 0
|
|
85
|
+
|| relativeSource === "."
|
|
86
|
+
|| !Schema.is(RepositoryPath)(relativeSource)
|
|
87
|
+
) {
|
|
88
|
+
return yield* Effect.fail(
|
|
89
|
+
new BoardFailure({ message: "The original Board publication context does not match its identity, revision or source boundary." }),
|
|
90
|
+
);
|
|
91
|
+
}
|
|
92
|
+
return yield* publish(work, input);
|
|
93
|
+
}),
|
|
94
|
+
get,
|
|
95
|
+
readDecision: decisionReading(documents),
|
|
96
|
+
report: publishReport(root, realRoot, documents),
|
|
97
|
+
}),
|
|
98
|
+
requires: [BoardRoot, FileSystem.FileSystem, Path.Path],
|
|
99
|
+
});
|
|
100
|
+
|
|
101
|
+
export function markdownBoard(root: string) {
|
|
102
|
+
return Layer.effect(BoardGateway)(MarkdownBoard).pipe(Layer.provide(MarkdownBoard.layer.pipe(Layer.provide(Layer.succeed(BoardRoot, root)))));
|
|
103
|
+
}
|