@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,99 @@
|
|
|
1
|
+
import { relative } from "node:path";
|
|
2
|
+
import { Clock, Effect } from "effect";
|
|
3
|
+
import { board as boardApi } from "@shivaedev/work-board/integration/board.ts";
|
|
4
|
+
import { responses } from "@shivaedev/work-board/integration/responses.ts";
|
|
5
|
+
import { decisionAnswer } from "#board/decisionAnswer.ts";
|
|
6
|
+
import type { BoardDocument } from "#board/documents.ts";
|
|
7
|
+
import { recordBoardSource } from "#board/readPass.ts";
|
|
8
|
+
import type { BoardDecision } from "#board/schema.ts";
|
|
9
|
+
import { BoardFailure, type BoardWork, type Decision } from "#policy.ts";
|
|
10
|
+
|
|
11
|
+
const { publish, questionFrom, questionId, questionMarkdown, revisionOf } = responses;
|
|
12
|
+
|
|
13
|
+
function quoted(text: string): string {
|
|
14
|
+
const fence = "~".repeat(Math.max(3, ...Array.from(text.matchAll(/~+/gu), (match) => match[0].length + 1)));
|
|
15
|
+
return `${fence}\n${text}\n${fence}`;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
function linked(text: string): string {
|
|
19
|
+
if (!URL.canParse(text)) {
|
|
20
|
+
return quoted(text);
|
|
21
|
+
}
|
|
22
|
+
const url = new URL(text);
|
|
23
|
+
return url.protocol === "https:" || url.protocol === "http:" ? `<${url.href.replaceAll("<", "%3C").replaceAll(">", "%3E")}>` : quoted(text);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
function decisionSource(itemId: string, work: BoardWork, input: Decision): string {
|
|
27
|
+
const metadata = {
|
|
28
|
+
attention: [
|
|
29
|
+
{
|
|
30
|
+
id: input.id,
|
|
31
|
+
kind: "decision",
|
|
32
|
+
managed: true,
|
|
33
|
+
reason: input.reason,
|
|
34
|
+
"response_from": [input.attentionOwner ?? "orchestrator"],
|
|
35
|
+
state: "open",
|
|
36
|
+
unblocks: [work.workId],
|
|
37
|
+
},
|
|
38
|
+
],
|
|
39
|
+
id: itemId,
|
|
40
|
+
kind: "decision",
|
|
41
|
+
relationships: [{ kind: "relates_to", target: work.workId }],
|
|
42
|
+
};
|
|
43
|
+
const answer = decisionAnswer(input);
|
|
44
|
+
return `---\n${JSON.stringify(metadata)}\n---\n# Fleet decision for ${work.workId}\n\n## Decision\n\n${quoted(input.reason)}\n\n## Recommendation\n\n${quoted(input.recommendation)}\n\n## Relevant links\n\n${input.links.map(linked).join("\n\n")}\n\n${answer}\n\n## Reviewed Board work\n\n${quoted(work.context)}\n`;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export function publishBoard(root: string, realRoot: string, documents: Effect.Effect<readonly BoardDocument[], BoardFailure>) {
|
|
48
|
+
return Effect.fn("FleetBoard.decision")(function* (work: BoardWork, input: Decision): Effect.fn.Return<BoardDecision, BoardFailure> {
|
|
49
|
+
const workSourcePath = relative(realRoot, work.sourcePath);
|
|
50
|
+
const itemId = `decision.${revisionOf(JSON.stringify([work.workId, work.revision, workSourcePath, input.id, input.reason, input.recommendation, input.links, ...(input.worker === undefined ? [] : [input.worker])]))}`;
|
|
51
|
+
const existing = input.published === undefined ? undefined : (yield* documents).find((document) => document.file === input.published?.sourcePath);
|
|
52
|
+
const context = existing?.parsed.fields.id === itemId ? existing.source : decisionSource(itemId, work, input);
|
|
53
|
+
const parsed = boardApi.metadataParse(context);
|
|
54
|
+
if (new TextEncoder().encode(context).length > 256 * 1024 || parsed.diagnostics.length > 0) {
|
|
55
|
+
return yield* Effect.fail(new BoardFailure({ message: "Fleet decision context exceeds Board limits or contains invalid attention metadata." }));
|
|
56
|
+
}
|
|
57
|
+
const sourcePath = `responses/${itemId}.md`;
|
|
58
|
+
const revision = revisionOf(context);
|
|
59
|
+
const id = questionId(itemId, input.id, revision, sourcePath);
|
|
60
|
+
const receipt = {
|
|
61
|
+
itemId,
|
|
62
|
+
questionId: id,
|
|
63
|
+
request: input.id,
|
|
64
|
+
revision,
|
|
65
|
+
sourcePath,
|
|
66
|
+
workId: work.workId,
|
|
67
|
+
workRevision: work.revision,
|
|
68
|
+
workSourcePath,
|
|
69
|
+
};
|
|
70
|
+
yield* publish(root, realRoot, itemId, context).pipe(
|
|
71
|
+
Effect.mapError(() => new BoardFailure({ message: "Fleet decision source could not be recorded on Board." })),
|
|
72
|
+
);
|
|
73
|
+
yield* recordBoardSource(realRoot, sourcePath, context, parsed);
|
|
74
|
+
const all = yield* documents;
|
|
75
|
+
if (all.some((document) => questionFrom(document)?.id === id)) {
|
|
76
|
+
return receipt;
|
|
77
|
+
}
|
|
78
|
+
const registeredAt = yield* Clock.currentTimeMillis;
|
|
79
|
+
const question = {
|
|
80
|
+
context,
|
|
81
|
+
id,
|
|
82
|
+
question: {
|
|
83
|
+
deadline: registeredAt + 48 * 60 * 60 * 1000,
|
|
84
|
+
item: itemId,
|
|
85
|
+
reason: input.reason,
|
|
86
|
+
registeredAt,
|
|
87
|
+
request: input.id,
|
|
88
|
+
reviewedRevision: revision,
|
|
89
|
+
source: sourcePath,
|
|
90
|
+
},
|
|
91
|
+
};
|
|
92
|
+
const questionSource = questionMarkdown(question);
|
|
93
|
+
yield* publish(root, realRoot, id, questionSource).pipe(
|
|
94
|
+
Effect.mapError(() => new BoardFailure({ message: "Fleet decision question could not be registered on Board." })),
|
|
95
|
+
);
|
|
96
|
+
yield* recordBoardSource(realRoot, `responses/${id}.md`, questionSource);
|
|
97
|
+
return receipt;
|
|
98
|
+
});
|
|
99
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { relative } from "node:path";
|
|
2
|
+
import { Effect } from "effect";
|
|
3
|
+
import { board } from "@shivaedev/work-board/integration/board.ts";
|
|
4
|
+
import { responses } from "@shivaedev/work-board/integration/responses.ts";
|
|
5
|
+
import { briefRevision } from "#board/briefRevision.ts";
|
|
6
|
+
import type { BoardDocument } from "#board/documents.ts";
|
|
7
|
+
import { recordBoardSource, workMetadata } from "#board/readPass.ts";
|
|
8
|
+
import { reportContent } from "#board/reportContent.ts";
|
|
9
|
+
import { reportIdentity } from "#board/reportIdentity.ts";
|
|
10
|
+
import { workRevision } from "#board/workRevision.ts";
|
|
11
|
+
import { BoardFailure, type BoardWork } from "#policy.ts";
|
|
12
|
+
import type { SessionObservation } from "#session/schema.ts";
|
|
13
|
+
|
|
14
|
+
const { metadataModel } = board;
|
|
15
|
+
const { publish, revisionOf } = responses;
|
|
16
|
+
|
|
17
|
+
export function publishReport(root: string, realRoot: string, documents: Effect.Effect<readonly BoardDocument[], BoardFailure>) {
|
|
18
|
+
return Effect.fn("FleetBoard.report")(function* (work: BoardWork, observation: SessionObservation) {
|
|
19
|
+
const all = yield* documents;
|
|
20
|
+
const matches = metadataModel(all).ids.get(work.workId);
|
|
21
|
+
const source = all.find((document) => document.file === relative(realRoot, work.sourcePath));
|
|
22
|
+
const parsed = yield* workMetadata(work);
|
|
23
|
+
if (
|
|
24
|
+
matches?.length !== 1
|
|
25
|
+
|| source?.parsed.fields.id !== work.workId
|
|
26
|
+
|| parsed.fields.id !== work.workId
|
|
27
|
+
|| parsed.diagnostics.length > 0
|
|
28
|
+
|| briefRevision(source.parsed) !== workRevision(work.revision, work.context)
|
|
29
|
+
|| workRevision(work.revision, work.context) !== briefRevision(parsed)
|
|
30
|
+
|| observation.execution !== "completed"
|
|
31
|
+
|| !observation.output.trim()
|
|
32
|
+
) {
|
|
33
|
+
return yield* Effect.fail(new BoardFailure({ message: "Report needs nonempty completed output and the exact current Board context." }));
|
|
34
|
+
}
|
|
35
|
+
const { itemId } = reportIdentity(work, observation.receipt);
|
|
36
|
+
const content = yield* reportContent(work, observation);
|
|
37
|
+
yield* publish(root, realRoot, itemId, content).pipe(
|
|
38
|
+
Effect.mapError(() => new BoardFailure({ message: "The worker report could not be recorded on Board; retry the same completed attempt." })),
|
|
39
|
+
);
|
|
40
|
+
yield* recordBoardSource(realRoot, `responses/${itemId}.md`, content);
|
|
41
|
+
return { itemId, receipt: observation.receipt, revision: revisionOf(content), sourcePath: `responses/${itemId}.md`, workRevision: work.revision };
|
|
42
|
+
});
|
|
43
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { Effect, FileSystem } from "effect";
|
|
2
|
+
import { board as boardApi } from "@shivaedev/work-board/integration/board.ts";
|
|
3
|
+
import { STATUS_MARKER } from "#board/statusMarkdown.ts";
|
|
4
|
+
import { BoardFailure } from "#policy.ts";
|
|
5
|
+
|
|
6
|
+
export const readDocument = Effect.fn("FleetBoard.readDocument")(function* (root: string, realRoot: string, file: string) {
|
|
7
|
+
const fs = yield* FileSystem.FileSystem;
|
|
8
|
+
const real = yield* boardApi.markdownPath(root, realRoot, file);
|
|
9
|
+
if (!real) {
|
|
10
|
+
return yield* Effect.fail(new BoardFailure({ code: "incomplete-observation", message: `Board source is unavailable: ${file}` }));
|
|
11
|
+
}
|
|
12
|
+
const source = yield* fs
|
|
13
|
+
.readFileString(real)
|
|
14
|
+
.pipe(
|
|
15
|
+
Effect.mapError(
|
|
16
|
+
(error) => new BoardFailure({ code: "incomplete-observation", message: `Board source could not be read: ${file} (${error.message})` }),
|
|
17
|
+
),
|
|
18
|
+
);
|
|
19
|
+
if (file === "fleet/status.md" && source.startsWith(`${STATUS_MARKER}\n`)) {
|
|
20
|
+
return { document: undefined, problem: undefined };
|
|
21
|
+
}
|
|
22
|
+
const parsed = boardApi.metadataParse(source);
|
|
23
|
+
const diagnostics = parsed.diagnostics;
|
|
24
|
+
return {
|
|
25
|
+
document: { file, parsed, source },
|
|
26
|
+
problem:
|
|
27
|
+
diagnostics.length === 0
|
|
28
|
+
? undefined
|
|
29
|
+
: new BoardFailure({
|
|
30
|
+
message: `Board metadata is invalid: ${file} (${diagnostics.map((diagnostic) => `line ${diagnostic.line}: ${diagnostic.message}`).join("; ")})`,
|
|
31
|
+
}),
|
|
32
|
+
};
|
|
33
|
+
});
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import { join } from "node:path";
|
|
2
|
+
import { Context, Effect, type FileSystem, type Path } from "effect";
|
|
3
|
+
import type { MetadataModel, ParsedMetadata } from "@shivaedev/work-board/integration/board.ts";
|
|
4
|
+
import { board as boardApi } from "@shivaedev/work-board/integration/board.ts";
|
|
5
|
+
import type { BoardDocument } from "#board/documents.ts";
|
|
6
|
+
import type { BoardFailure, BoardWork } from "#policy.ts";
|
|
7
|
+
|
|
8
|
+
const { metadataModel } = boardApi;
|
|
9
|
+
|
|
10
|
+
export class BoardSnapshot {
|
|
11
|
+
documents: readonly BoardDocument[];
|
|
12
|
+
model: MetadataModel;
|
|
13
|
+
files: ReadonlyMap<string, BoardDocument>;
|
|
14
|
+
readonly problems: Map<string, BoardFailure>;
|
|
15
|
+
|
|
16
|
+
constructor(documents: readonly BoardDocument[], problems: Map<string, BoardFailure> = new Map()) {
|
|
17
|
+
this.problems = problems;
|
|
18
|
+
this.documents = documents;
|
|
19
|
+
this.model = metadataModel(documents);
|
|
20
|
+
this.files = new Map(documents.map((document) => [document.file, document]));
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
record(document: BoardDocument) {
|
|
24
|
+
this.problems.delete(document.file);
|
|
25
|
+
this.documents = [...this.documents.filter((entry) => entry.file !== document.file), document];
|
|
26
|
+
this.model = metadataModel(this.documents);
|
|
27
|
+
this.files = new Map(this.documents.map((entry) => [entry.file, entry]));
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
type Read = Effect.Effect<BoardSnapshot, BoardFailure>;
|
|
32
|
+
interface Pass {
|
|
33
|
+
active: boolean;
|
|
34
|
+
readonly publications: Set<Effect.Effect<void>>;
|
|
35
|
+
readonly reads: Map<string, Read>;
|
|
36
|
+
}
|
|
37
|
+
const ReadPass = Context.Reference<Pass | undefined>("@shivaedev/work-fleet/board/ReadPass", { defaultValue: () => undefined });
|
|
38
|
+
|
|
39
|
+
export function withBoardReadPass<A, E, R>(effect: Effect.Effect<A, E, R>) {
|
|
40
|
+
return Effect.suspend(() => {
|
|
41
|
+
const pass: Pass = { active: true, publications: new Set(), reads: new Map() };
|
|
42
|
+
return effect.pipe(
|
|
43
|
+
Effect.provideService(ReadPass, pass),
|
|
44
|
+
Effect.ensuring(
|
|
45
|
+
Effect.gen(function* () {
|
|
46
|
+
pass.active = false;
|
|
47
|
+
for (const publication of pass.publications) {
|
|
48
|
+
yield* publication;
|
|
49
|
+
}
|
|
50
|
+
}),
|
|
51
|
+
),
|
|
52
|
+
);
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export const inBoardReadPass = Effect.fnUntraced(function* <A, E, R>(effect: Effect.Effect<A, E, R>) {
|
|
57
|
+
return yield* (yield* ReadPass)?.active === true ? effect : withBoardReadPass(effect);
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
export const readSnapshot = Effect.fn("FleetBoard.readSnapshot")(function* (
|
|
61
|
+
realRoot: string,
|
|
62
|
+
read: Effect.Effect<BoardSnapshot, BoardFailure, FileSystem.FileSystem | Path.Path>,
|
|
63
|
+
) {
|
|
64
|
+
const pass = yield* ReadPass;
|
|
65
|
+
if (pass?.active !== true) {
|
|
66
|
+
return yield* read;
|
|
67
|
+
}
|
|
68
|
+
let cached = pass.reads.get(realRoot);
|
|
69
|
+
if (cached === undefined) {
|
|
70
|
+
const services = yield* Effect.context<FileSystem.FileSystem | Path.Path>();
|
|
71
|
+
const next = yield* Effect.cached(read.pipe(Effect.provideContext(services)));
|
|
72
|
+
cached = pass.reads.get(realRoot) ?? next;
|
|
73
|
+
pass.reads.set(realRoot, cached);
|
|
74
|
+
}
|
|
75
|
+
return yield* cached;
|
|
76
|
+
});
|
|
77
|
+
|
|
78
|
+
export const recordBoardSource = Effect.fn("FleetBoard.recordBoardSource")(function* (
|
|
79
|
+
realRoot: string,
|
|
80
|
+
file: string,
|
|
81
|
+
source: string,
|
|
82
|
+
parsed?: ParsedMetadata,
|
|
83
|
+
) {
|
|
84
|
+
const pass = yield* ReadPass;
|
|
85
|
+
const read = pass?.active === true ? pass.reads.get(realRoot) : undefined;
|
|
86
|
+
if (read !== undefined) {
|
|
87
|
+
const snapshot = yield* read;
|
|
88
|
+
const existing = snapshot.files.get(file);
|
|
89
|
+
if (existing?.source !== source) {
|
|
90
|
+
snapshot.record({ file, parsed: parsed ?? boardApi.metadataParse(source), source });
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
});
|
|
94
|
+
|
|
95
|
+
export const workMetadata = Effect.fn("FleetBoard.workMetadata")(function* (work: BoardWork): Effect.fn.Return<ParsedMetadata, BoardFailure> {
|
|
96
|
+
const pass = yield* ReadPass;
|
|
97
|
+
for (const [root, read] of pass?.active === true ? pass.reads : []) {
|
|
98
|
+
const snapshot = yield* read;
|
|
99
|
+
const matches = snapshot.model.ids.get(work.workId);
|
|
100
|
+
const document = matches?.length === 1 ? snapshot.files.get(matches[0]?.file ?? "") : undefined;
|
|
101
|
+
if (document?.source === work.context && join(root, document.file) === work.sourcePath) {
|
|
102
|
+
return document.parsed;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
return boardApi.metadataParse(work.context);
|
|
106
|
+
});
|
|
107
|
+
|
|
108
|
+
export const publishAfterBoardPass = Effect.fn("FleetBoard.publishAfterBoardPass")(function* (publication: Effect.Effect<void>) {
|
|
109
|
+
const pass = yield* ReadPass;
|
|
110
|
+
if (pass?.active === true) {
|
|
111
|
+
pass.publications.add(publication);
|
|
112
|
+
} else {
|
|
113
|
+
yield* publication;
|
|
114
|
+
}
|
|
115
|
+
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Effect } from "effect";
|
|
2
|
+
import { reportIdentity } from "#board/reportIdentity.ts";
|
|
3
|
+
import { BoardFailure, type BoardWork } from "#policy.ts";
|
|
4
|
+
import type { SessionObservation } from "#session/schema.ts";
|
|
5
|
+
|
|
6
|
+
export function reportContent(work: BoardWork, observation: SessionObservation) {
|
|
7
|
+
const { provenance, itemId } = reportIdentity(work, observation.receipt);
|
|
8
|
+
const metadata = { id: itemId, kind: "result", relationships: [{ kind: "informs", target: work.workId }] };
|
|
9
|
+
const content = `---\n${JSON.stringify(metadata)}\n---\n# Fleet report\n\n## Worker receipt\n\n\`\`\`json\n${JSON.stringify(provenance)}\n\`\`\`\n\n## Report\n\n${observation.output}`;
|
|
10
|
+
return new TextEncoder().encode(content).length > 256 * 1024
|
|
11
|
+
? Effect.fail(
|
|
12
|
+
new BoardFailure({
|
|
13
|
+
code: "report-too-large",
|
|
14
|
+
message: "Worker report exceeds Board’s 256 KiB context limit, including metadata and receipt; request a shorter report before retrying.",
|
|
15
|
+
}),
|
|
16
|
+
)
|
|
17
|
+
: Effect.succeed(content);
|
|
18
|
+
}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { randomUUID } from "node:crypto";
|
|
2
|
+
import { constants } from "node:fs";
|
|
3
|
+
import { type FileHandle, link, mkdir, open, realpath, unlink } from "node:fs/promises";
|
|
4
|
+
import { join } from "node:path";
|
|
5
|
+
import { Effect } from "effect";
|
|
6
|
+
import { reportFileName, reportLinks } from "#board/reportLinks.ts";
|
|
7
|
+
import type { ReportFile } from "#reportAttachments.ts";
|
|
8
|
+
import { type ReportDirectory, validateReportDirectory, withReportDirectory } from "#reportFileDirectory.ts";
|
|
9
|
+
import { hasFileCode, ReportFileFailure, reportFileIo, withReportFile } from "#reportFileFailure.ts";
|
|
10
|
+
|
|
11
|
+
function ensureDirectory(path: string, label: string) {
|
|
12
|
+
return reportFileIo(label, () => mkdir(path, { mode: 0o700 })).pipe(
|
|
13
|
+
Effect.catchTag("ReportFileFailure", (error) => (hasFileCode(error.cause, "EEXIST") ? Effect.void : Effect.fail(error))),
|
|
14
|
+
);
|
|
15
|
+
}
|
|
16
|
+
function existingFile(path: string, bytes: Uint8Array, label: string) {
|
|
17
|
+
return withReportFile(
|
|
18
|
+
label,
|
|
19
|
+
() => open(path, constants.O_RDONLY | constants.O_NOFOLLOW | constants.O_NONBLOCK),
|
|
20
|
+
(existing) =>
|
|
21
|
+
Effect.gen(function* () {
|
|
22
|
+
if (
|
|
23
|
+
!(
|
|
24
|
+
(yield* reportFileIo(label, () => existing.stat())).isFile()
|
|
25
|
+
&& Buffer.from(bytes).equals(yield* reportFileIo(label, () => existing.readFile()))
|
|
26
|
+
)
|
|
27
|
+
) {
|
|
28
|
+
return yield* Effect.fail(new ReportFileFailure({ path: label, reason: "Attachment identity already contains different bytes" }));
|
|
29
|
+
}
|
|
30
|
+
yield* reportFileIo(label, () => existing.sync());
|
|
31
|
+
}),
|
|
32
|
+
);
|
|
33
|
+
}
|
|
34
|
+
const publishFile = Effect.fnUntraced(function* (directory: FileHandle, folder: string, name: string, bytes: Uint8Array, label: string) {
|
|
35
|
+
const temporary = `${folder}/.${randomUUID()}.tmp`;
|
|
36
|
+
yield* Effect.acquireUseRelease(
|
|
37
|
+
reportFileIo(label, () => open(temporary, "wx", 0o600)),
|
|
38
|
+
(file) =>
|
|
39
|
+
Effect.gen(function* () {
|
|
40
|
+
yield* reportFileIo(label, () => file.writeFile(bytes));
|
|
41
|
+
yield* reportFileIo(label, () => file.sync());
|
|
42
|
+
yield* reportFileIo(label, () => link(temporary, `${folder}/${name}`)).pipe(
|
|
43
|
+
Effect.catchTag("ReportFileFailure", (error) =>
|
|
44
|
+
hasFileCode(error.cause, "EEXIST") ? existingFile(`${folder}/${name}`, bytes, label) : Effect.fail(error),
|
|
45
|
+
),
|
|
46
|
+
);
|
|
47
|
+
yield* reportFileIo(label, () => directory.sync());
|
|
48
|
+
}),
|
|
49
|
+
(file) => reportFileIo(label, () => file.close()).pipe(Effect.onExit(() => reportFileIo(label, () => unlink(temporary)))),
|
|
50
|
+
);
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
function publishAttachments(workspace: ReportDirectory, responses: ReportDirectory, itemId: string, files: readonly ReportFile[], label: string) {
|
|
54
|
+
const folderName = `${itemId}.attachments`;
|
|
55
|
+
return Effect.gen(function* () {
|
|
56
|
+
yield* ensureDirectory(`${responses.folder}/${folderName}`, label);
|
|
57
|
+
yield* reportFileIo(label, () => responses.file.sync());
|
|
58
|
+
return yield* withReportDirectory(label, `${responses.folder}/${folderName}`, join(responses.expected, folderName), (directory) =>
|
|
59
|
+
Effect.gen(function* () {
|
|
60
|
+
for (const file of files) {
|
|
61
|
+
yield* validateReportDirectory(file.path, workspace);
|
|
62
|
+
yield* validateReportDirectory(file.path, responses);
|
|
63
|
+
yield* validateReportDirectory(file.path, directory);
|
|
64
|
+
yield* publishFile(directory.file, directory.folder, reportFileName(file.path), file.bytes, file.path);
|
|
65
|
+
}
|
|
66
|
+
yield* validateReportDirectory(label, directory);
|
|
67
|
+
yield* validateReportDirectory(label, workspace);
|
|
68
|
+
yield* validateReportDirectory(label, responses);
|
|
69
|
+
return reportLinks(itemId, files);
|
|
70
|
+
}),
|
|
71
|
+
);
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export const reportFiles = Effect.fn("Fleet.reportFiles")(function* (root: string, itemId: string, files: readonly ReportFile[]) {
|
|
76
|
+
if (files.length === 0) {
|
|
77
|
+
return "";
|
|
78
|
+
}
|
|
79
|
+
const label = `responses/${itemId}.attachments`;
|
|
80
|
+
if (!/^fleet-report\.[a-f\d]+$/u.test(itemId)) {
|
|
81
|
+
return yield* Effect.fail(new ReportFileFailure({ path: label, reason: "Invalid report identity" }));
|
|
82
|
+
}
|
|
83
|
+
const realRoot = yield* reportFileIo(label, () => realpath(root));
|
|
84
|
+
return yield* withReportDirectory(label, root, realRoot, (workspace) =>
|
|
85
|
+
Effect.gen(function* () {
|
|
86
|
+
yield* ensureDirectory(`${workspace.folder}/responses`, label);
|
|
87
|
+
yield* reportFileIo(label, () => workspace.file.sync());
|
|
88
|
+
return yield* withReportDirectory(label, `${workspace.folder}/responses`, join(realRoot, "responses"), (responses) =>
|
|
89
|
+
publishAttachments(workspace, responses, itemId, files, label),
|
|
90
|
+
);
|
|
91
|
+
}),
|
|
92
|
+
);
|
|
93
|
+
});
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { responses } from "@shivaedev/work-board/integration/responses.ts";
|
|
2
|
+
import type { BoardWork } from "#policy.ts";
|
|
3
|
+
import type { SessionReceipt } from "#session/schema.ts";
|
|
4
|
+
|
|
5
|
+
const { revisionOf } = responses;
|
|
6
|
+
|
|
7
|
+
export function reportIdentity(work: BoardWork, receipt: SessionReceipt) {
|
|
8
|
+
const provenance = { ...receipt, workRevision: work.revision };
|
|
9
|
+
return { itemId: `fleet-report.${revisionOf(JSON.stringify({ workId: work.workId, ...provenance }))}`, provenance };
|
|
10
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { basename } from "node:path";
|
|
2
|
+
import { responses } from "@shivaedev/work-board/integration/responses.ts";
|
|
3
|
+
import type { ReportFile, UnavailableAttachment } from "#reportAttachments.ts";
|
|
4
|
+
|
|
5
|
+
const { revisionOf } = responses;
|
|
6
|
+
|
|
7
|
+
export function reportFileName(path: string) {
|
|
8
|
+
return `${revisionOf(path)}-${basename(path)}${path.endsWith(".md") ? ".attachment" : ""}`;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export function reportLinks(itemId: string, files: readonly ReportFile[], unavailable: readonly UnavailableAttachment[] = []) {
|
|
12
|
+
const links = files.map(
|
|
13
|
+
(file) => `- [${file.path.replaceAll(/[[\]\\\r\n]/gu, "\\$&")}](${itemId}.attachments/${encodeURIComponent(reportFileName(file.path))})`,
|
|
14
|
+
);
|
|
15
|
+
const warnings = unavailable.map(({ path, reason }) => `- ${escapeText(path)}: ${escapeText(reason)}`);
|
|
16
|
+
return (
|
|
17
|
+
(links.length === 0 ? "" : `\n\n## Attachments\n\n${links.join("\n")}`)
|
|
18
|
+
+ (warnings.length === 0 ? "" : `\n\n## Unavailable attachments\n\n${warnings.join("\n")}`)
|
|
19
|
+
);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
function escapeText(text: string) {
|
|
23
|
+
return text.replaceAll(/[[\]\\`*_<>\r\n]/gu, (character) => (character === "\n" || character === "\r" ? " " : `\\${character}`));
|
|
24
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { Effect, Schema } from "effect";
|
|
2
|
+
import { reportIdentity } from "#board/reportIdentity.ts";
|
|
3
|
+
import { reportPayloadFile } from "#board/reportPayloadFile.ts";
|
|
4
|
+
import { BoardFailure, type BoardWork } from "#policy.ts";
|
|
5
|
+
import type { ReportFile } from "#reportAttachments.ts";
|
|
6
|
+
import { ReportFileFailure } from "#reportFileFailure.ts";
|
|
7
|
+
import { REPORT_LIMITS } from "#reportLimits.ts";
|
|
8
|
+
import type { SessionObservation } from "#session/schema.ts";
|
|
9
|
+
|
|
10
|
+
const Payload = Schema.Struct({
|
|
11
|
+
files: Schema.Array(Schema.Struct({ base64: Schema.String, path: Schema.String })),
|
|
12
|
+
output: Schema.String,
|
|
13
|
+
});
|
|
14
|
+
interface ReportPayload {
|
|
15
|
+
readonly files: readonly ReportFile[];
|
|
16
|
+
readonly output: string;
|
|
17
|
+
}
|
|
18
|
+
function validFile(file: (typeof Payload.Type)["files"][number]) {
|
|
19
|
+
return (
|
|
20
|
+
file.base64 === Buffer.from(file.base64, "base64").toString("base64")
|
|
21
|
+
&& !(file.path.includes("\\") || /\p{Cc}/u.test(file.path))
|
|
22
|
+
&& file.path.split("/").every((part) => part !== "" && part !== "." && part !== ".." && part !== ".git")
|
|
23
|
+
);
|
|
24
|
+
}
|
|
25
|
+
const decode = Effect.fnUntraced(function* (content: string, payloadPath: string) {
|
|
26
|
+
const payload = yield* Schema.decodeUnknownEffect(Schema.fromJsonString(Payload))(content).pipe(
|
|
27
|
+
Effect.mapError((cause) => new ReportFileFailure({ cause, path: payloadPath, reason: `Saved report payload is invalid: ${cause.message}` })),
|
|
28
|
+
);
|
|
29
|
+
const names = new Set<string>();
|
|
30
|
+
for (const file of payload.files) {
|
|
31
|
+
if (!validFile(file) || names.has(file.path)) {
|
|
32
|
+
return yield* Effect.fail(new ReportFileFailure({ path: file.path, reason: `Invalid or duplicate attachment in ${payloadPath}` }));
|
|
33
|
+
}
|
|
34
|
+
names.add(file.path);
|
|
35
|
+
}
|
|
36
|
+
const files = payload.files.map(({ path, base64 }) => ({ bytes: Buffer.from(base64, "base64"), path }));
|
|
37
|
+
if (files.length > REPORT_LIMITS.attachmentCount || files.reduce((size, file) => size + file.bytes.length, 0) > REPORT_LIMITS.attachmentBytes) {
|
|
38
|
+
return yield* Effect.fail(new ReportFileFailure({ path: payloadPath, reason: "Saved report payload exceeds attachment limits" }));
|
|
39
|
+
}
|
|
40
|
+
return { files, output: payload.output };
|
|
41
|
+
});
|
|
42
|
+
export function reportPayload(root: string, work: BoardWork, observation: SessionObservation) {
|
|
43
|
+
const { itemId } = reportIdentity(work, observation.receipt);
|
|
44
|
+
const payloadPath = `.fleet-reports/${itemId}.json`;
|
|
45
|
+
function saved(content: string | undefined) {
|
|
46
|
+
return content === undefined
|
|
47
|
+
? Effect.fail(
|
|
48
|
+
new ReportFileFailure({
|
|
49
|
+
path: payloadPath,
|
|
50
|
+
reason: "Report payload could not be recovered or persisted; retry the same completed attempt",
|
|
51
|
+
}),
|
|
52
|
+
)
|
|
53
|
+
: decode(content, payloadPath);
|
|
54
|
+
}
|
|
55
|
+
function failure(error: ReportFileFailure) {
|
|
56
|
+
return new BoardFailure({ message: error.message });
|
|
57
|
+
}
|
|
58
|
+
return {
|
|
59
|
+
read: reportPayloadFile(root, itemId).pipe(
|
|
60
|
+
Effect.flatMap((content) => (content === undefined ? Effect.succeed(undefined) : decode(content, payloadPath))),
|
|
61
|
+
Effect.mapError(failure),
|
|
62
|
+
),
|
|
63
|
+
save: (payload: ReportPayload) =>
|
|
64
|
+
reportPayloadFile(
|
|
65
|
+
root,
|
|
66
|
+
itemId,
|
|
67
|
+
JSON.stringify({
|
|
68
|
+
files: payload.files.map(({ path, bytes }) => ({ base64: Buffer.from(bytes).toString("base64"), path })),
|
|
69
|
+
output: payload.output,
|
|
70
|
+
}),
|
|
71
|
+
).pipe(Effect.flatMap(saved), Effect.mapError(failure)),
|
|
72
|
+
};
|
|
73
|
+
}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { randomUUID } from "node:crypto";
|
|
2
|
+
import { constants } from "node:fs";
|
|
3
|
+
import { type FileHandle, link, mkdir, open, realpath, unlink } from "node:fs/promises";
|
|
4
|
+
import { join } from "node:path";
|
|
5
|
+
import { Effect } from "effect";
|
|
6
|
+
import { type ReportDirectory, validateReportDirectory, withReportDirectory } from "#reportFileDirectory.ts";
|
|
7
|
+
import { hasFileCode, ReportFileFailure, reportFileIo, withReportFile } from "#reportFileFailure.ts";
|
|
8
|
+
import { REPORT_LIMITS } from "#reportLimits.ts";
|
|
9
|
+
|
|
10
|
+
const MAX_BYTES = REPORT_LIMITS.attachmentBytes * 2 + 512 * 1024;
|
|
11
|
+
function readPayload(path: string, label: string) {
|
|
12
|
+
return withReportFile(
|
|
13
|
+
label,
|
|
14
|
+
() => open(path, constants.O_RDONLY | constants.O_NOFOLLOW | constants.O_NONBLOCK),
|
|
15
|
+
(file) =>
|
|
16
|
+
Effect.gen(function* () {
|
|
17
|
+
if (!(yield* reportFileIo(label, () => file.stat())).isFile()) {
|
|
18
|
+
return yield* Effect.fail(new ReportFileFailure({ path: label, reason: "Report payload must be a regular file" }));
|
|
19
|
+
}
|
|
20
|
+
const chunks: Uint8Array[] = [];
|
|
21
|
+
let size = 0;
|
|
22
|
+
for (;;) {
|
|
23
|
+
const buffer = new Uint8Array(Math.min(64 * 1024, MAX_BYTES - size + 1));
|
|
24
|
+
const { bytesRead } = yield* reportFileIo(label, () => file.read(buffer));
|
|
25
|
+
if (bytesRead === 0) {
|
|
26
|
+
break;
|
|
27
|
+
}
|
|
28
|
+
size += bytesRead;
|
|
29
|
+
if (size > MAX_BYTES) {
|
|
30
|
+
return yield* Effect.fail(new ReportFileFailure({ path: label, reason: "Report payload exceeds size limit" }));
|
|
31
|
+
}
|
|
32
|
+
chunks.push(buffer.subarray(0, bytesRead));
|
|
33
|
+
}
|
|
34
|
+
yield* reportFileIo(label, () => file.sync());
|
|
35
|
+
return Buffer.concat(chunks).toString("utf8");
|
|
36
|
+
}),
|
|
37
|
+
).pipe(Effect.catchTag("ReportFileFailure", (error) => (hasFileCode(error.cause, "ENOENT") ? Effect.succeed(undefined) : Effect.fail(error))));
|
|
38
|
+
}
|
|
39
|
+
const persist = Effect.fnUntraced(function* (directory: FileHandle, folder: string, name: string, content: string, label: string) {
|
|
40
|
+
if (Buffer.byteLength(content) > MAX_BYTES) {
|
|
41
|
+
return yield* Effect.fail(new ReportFileFailure({ path: label, reason: "Report payload exceeds size limit" }));
|
|
42
|
+
}
|
|
43
|
+
const temporary = `${folder}/.${randomUUID()}.tmp`;
|
|
44
|
+
yield* Effect.acquireUseRelease(
|
|
45
|
+
reportFileIo(label, () => open(temporary, "wx", 0o600)),
|
|
46
|
+
(file) =>
|
|
47
|
+
Effect.gen(function* () {
|
|
48
|
+
yield* reportFileIo(label, () => file.writeFile(content));
|
|
49
|
+
yield* reportFileIo(label, () => file.sync());
|
|
50
|
+
yield* reportFileIo(label, () => link(temporary, `${folder}/${name}`)).pipe(
|
|
51
|
+
Effect.catchTag("ReportFileFailure", (error) => (hasFileCode(error.cause, "EEXIST") ? Effect.void : Effect.fail(error))),
|
|
52
|
+
);
|
|
53
|
+
yield* reportFileIo(label, () => directory.sync());
|
|
54
|
+
}),
|
|
55
|
+
(file) => reportFileIo(label, () => file.close()).pipe(Effect.onExit(() => reportFileIo(label, () => unlink(temporary)))),
|
|
56
|
+
);
|
|
57
|
+
});
|
|
58
|
+
const payloadInDirectory = Effect.fnUntraced(function* (
|
|
59
|
+
workspace: ReportDirectory,
|
|
60
|
+
directory: ReportDirectory,
|
|
61
|
+
name: string,
|
|
62
|
+
label: string,
|
|
63
|
+
content?: string,
|
|
64
|
+
) {
|
|
65
|
+
yield* validateReportDirectory(label, workspace);
|
|
66
|
+
if (content !== undefined) {
|
|
67
|
+
yield* persist(directory.file, directory.folder, name, content, label);
|
|
68
|
+
}
|
|
69
|
+
const payload = yield* readPayload(`${directory.folder}/${name}`, label);
|
|
70
|
+
yield* reportFileIo(label, () => directory.file.sync());
|
|
71
|
+
yield* validateReportDirectory(label, directory);
|
|
72
|
+
yield* validateReportDirectory(label, workspace);
|
|
73
|
+
return payload;
|
|
74
|
+
});
|
|
75
|
+
export const reportPayloadFile = Effect.fn("Fleet.reportPayloadFile")(function* (root: string, itemId: string, content?: string) {
|
|
76
|
+
const name = `${itemId}.json`;
|
|
77
|
+
const label = `.fleet-reports/${name}`;
|
|
78
|
+
if (!/^fleet-report\.[a-f\d]+$/u.test(itemId)) {
|
|
79
|
+
return yield* Effect.fail(new ReportFileFailure({ path: label, reason: "Invalid report identity" }));
|
|
80
|
+
}
|
|
81
|
+
const realRoot = yield* reportFileIo(label, () => realpath(root));
|
|
82
|
+
return yield* withReportDirectory(label, root, realRoot, (workspace) =>
|
|
83
|
+
Effect.gen(function* () {
|
|
84
|
+
yield* reportFileIo(label, () => mkdir(`${workspace.folder}/.fleet-reports`, { mode: 0o700 })).pipe(
|
|
85
|
+
Effect.catchTag("ReportFileFailure", (error) => (hasFileCode(error.cause, "EEXIST") ? Effect.void : Effect.fail(error))),
|
|
86
|
+
);
|
|
87
|
+
yield* reportFileIo(label, () => workspace.file.sync());
|
|
88
|
+
return yield* withReportDirectory(label, `${workspace.folder}/.fleet-reports`, join(realRoot, ".fleet-reports"), (directory) =>
|
|
89
|
+
payloadInDirectory(workspace, directory, name, label, content),
|
|
90
|
+
);
|
|
91
|
+
}),
|
|
92
|
+
);
|
|
93
|
+
});
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { Schema } from "effect";
|
|
2
|
+
import { attention } from "@shivaedev/work-board/integration/attention.ts";
|
|
3
|
+
import { responses } from "@shivaedev/work-board/integration/responses.ts";
|
|
4
|
+
import { SessionReceipt } from "#session/schema.ts";
|
|
5
|
+
|
|
6
|
+
const { RequestReceipt } = attention;
|
|
7
|
+
const { RecordedResponse } = responses;
|
|
8
|
+
|
|
9
|
+
export const BoardReport = Schema.Struct({
|
|
10
|
+
itemId: Schema.String,
|
|
11
|
+
receipt: SessionReceipt,
|
|
12
|
+
revision: Schema.String,
|
|
13
|
+
sourcePath: Schema.String,
|
|
14
|
+
workRevision: Schema.String,
|
|
15
|
+
});
|
|
16
|
+
export type BoardReport = typeof BoardReport.Type;
|
|
17
|
+
|
|
18
|
+
export const BoardDecision = Schema.Struct({
|
|
19
|
+
itemId: Schema.String,
|
|
20
|
+
questionId: Schema.String,
|
|
21
|
+
request: Schema.String,
|
|
22
|
+
revision: Schema.String,
|
|
23
|
+
sourcePath: Schema.String,
|
|
24
|
+
workId: Schema.String,
|
|
25
|
+
workRevision: Schema.String,
|
|
26
|
+
workSourcePath: Schema.String,
|
|
27
|
+
});
|
|
28
|
+
export type BoardDecision = typeof BoardDecision.Type;
|
|
29
|
+
|
|
30
|
+
export const BoardDecisionAcknowledgement = Schema.Struct({
|
|
31
|
+
decision: BoardDecision,
|
|
32
|
+
disposition: RequestReceipt.fields.disposition,
|
|
33
|
+
recordedAt: RequestReceipt.fields.recordedAt,
|
|
34
|
+
responseId: Schema.optional(Schema.String),
|
|
35
|
+
});
|
|
36
|
+
export type BoardDecisionAcknowledgement = typeof BoardDecisionAcknowledgement.Type;
|
|
37
|
+
|
|
38
|
+
export class BoardAcknowledgementStale extends Schema.TaggedError<BoardAcknowledgementStale>()("BoardAcknowledgementStale", {
|
|
39
|
+
message: Schema.String,
|
|
40
|
+
}) {}
|
|
41
|
+
|
|
42
|
+
export const BoardDecisionReading = Schema.Union([
|
|
43
|
+
Schema.Struct({ _tag: Schema.Literal("Pending") }),
|
|
44
|
+
Schema.Struct({ _tag: Schema.Literal("Stale"), reason: Schema.String }),
|
|
45
|
+
Schema.Struct({ _tag: Schema.Literal("Ambiguous"), responseIds: Schema.Array(Schema.String) }),
|
|
46
|
+
Schema.Struct({ _tag: Schema.Literal("Response"), response: RecordedResponse }),
|
|
47
|
+
]);
|
|
48
|
+
export type BoardDecisionReading = typeof BoardDecisionReading.Type;
|