@openapi-flow/core 0.1.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +165 -5
- package/THIRD_PARTY_NOTICES.md +3 -1
- package/dist/arguments/clarification/apply-confirmed-api-inputs.d.ts +3 -0
- package/dist/arguments/clarification/apply-confirmed-api-inputs.js +16 -0
- package/dist/arguments/clarification/assign-api-input-value.d.ts +4 -0
- package/dist/arguments/clarification/assign-api-input-value.js +8 -0
- package/dist/arguments/clarification/extraction/capture-api-input-answer-context.d.ts +3 -0
- package/dist/arguments/clarification/extraction/capture-api-input-answer-context.js +17 -0
- package/dist/arguments/clarification/extraction/create-api-input-answer-extraction-record.d.ts +2 -0
- package/dist/arguments/clarification/extraction/create-api-input-answer-extraction-record.js +24 -0
- package/dist/arguments/clarification/extraction/resolve-api-input-answer-sources.d.ts +3 -0
- package/dist/arguments/clarification/extraction/resolve-api-input-answer-sources.js +40 -0
- package/dist/arguments/clarification/extraction/resolve-api-input-source-selections.d.ts +4 -0
- package/dist/arguments/clarification/extraction/resolve-api-input-source-selections.js +46 -0
- package/dist/arguments/clarification/extraction/validate-api-input-answer-extraction-record.d.ts +3 -0
- package/dist/arguments/clarification/extraction/validate-api-input-answer-extraction-record.js +12 -0
- package/dist/arguments/clarification/inspect-api-argument-requirements.d.ts +2 -0
- package/dist/arguments/clarification/inspect-api-argument-requirements.js +86 -0
- package/dist/arguments/clarification/list-missing-requested-api-inputs.d.ts +3 -0
- package/dist/arguments/clarification/list-missing-requested-api-inputs.js +21 -0
- package/dist/arguments/clarification/read-confirmed-api-inputs.d.ts +2 -0
- package/dist/arguments/clarification/read-confirmed-api-inputs.js +35 -0
- package/dist/arguments/clarification/validate-api-input-answers.d.ts +2 -0
- package/dist/arguments/clarification/validate-api-input-answers.js +65 -0
- package/dist/arguments/generation/create-api-literal-generation-record.d.ts +3 -0
- package/dist/arguments/generation/create-api-literal-generation-record.js +45 -0
- package/dist/arguments/generation/describe-api-literal-generation.d.ts +3 -0
- package/dist/arguments/generation/describe-api-literal-generation.js +50 -0
- package/dist/arguments/generation/validate-api-literal-generation-record.d.ts +3 -0
- package/dist/arguments/generation/validate-api-literal-generation-record.js +20 -0
- package/dist/arguments/list-api-request-input-roots.d.ts +3 -0
- package/dist/arguments/list-api-request-input-roots.js +9 -0
- package/dist/arguments/media/create-api-request-media-type-decision.d.ts +3 -0
- package/dist/arguments/media/create-api-request-media-type-decision.js +73 -0
- package/dist/arguments/media/describe-api-request-media-type-context.d.ts +3 -0
- package/dist/arguments/media/describe-api-request-media-type-context.js +28 -0
- package/dist/arguments/media/list-api-request-media-types.d.ts +2 -0
- package/dist/arguments/media/list-api-request-media-types.js +8 -0
- package/dist/arguments/media/request-media-type-priority.d.ts +2 -0
- package/dist/arguments/media/request-media-type-priority.js +8 -0
- package/dist/arguments/media/select-default-api-request-media-type.d.ts +3 -0
- package/dist/arguments/media/select-default-api-request-media-type.js +17 -0
- package/dist/arguments/media/validate-api-request-media-type-decision.d.ts +3 -0
- package/dist/arguments/media/validate-api-request-media-type-decision.js +28 -0
- package/dist/arguments/request-contract.d.ts +4 -0
- package/dist/arguments/request-contract.js +38 -0
- package/dist/arguments/sources/describe-api-input-sources.d.ts +3 -0
- package/dist/arguments/sources/describe-api-input-sources.js +83 -0
- package/dist/arguments/sources/locate-complete-api-input-source.d.ts +3 -0
- package/dist/arguments/sources/locate-complete-api-input-source.js +17 -0
- package/dist/arguments/sources/read-api-input-literal-source.d.ts +3 -0
- package/dist/arguments/sources/read-api-input-literal-source.js +20 -0
- package/dist/arguments/sources/scan-protected-api-input-literals.d.ts +3 -0
- package/dist/arguments/sources/scan-protected-api-input-literals.js +37 -0
- package/dist/arguments/sources/verify-api-input-literal-source.d.ts +3 -0
- package/dist/arguments/sources/verify-api-input-literal-source.js +9 -0
- package/dist/arguments/validate-api-arguments.d.ts +2 -0
- package/dist/arguments/validate-api-arguments.js +140 -0
- package/dist/bindings/assign-json-input-value.d.ts +4 -0
- package/dist/bindings/assign-json-input-value.js +35 -0
- package/dist/bindings/assign-request-input-value.d.ts +4 -0
- package/dist/bindings/assign-request-input-value.js +39 -0
- package/dist/bindings/combine-binding-schemas.d.ts +4 -0
- package/dist/bindings/combine-binding-schemas.js +17 -0
- package/dist/bindings/create-api-binding-source-registry.d.ts +3 -0
- package/dist/bindings/create-api-binding-source-registry.js +18 -0
- package/dist/bindings/create-native-array-item-schema.d.ts +4 -0
- package/dist/bindings/create-native-array-item-schema.js +16 -0
- package/dist/bindings/json-pointer.d.ts +3 -0
- package/dist/bindings/json-pointer.js +24 -0
- package/dist/bindings/materialize-api-arguments.d.ts +4 -0
- package/dist/bindings/materialize-api-arguments.js +54 -0
- package/dist/bindings/native-binding-schema.d.ts +3 -0
- package/dist/bindings/native-binding-schema.js +6 -0
- package/dist/bindings/planning/create-api-binding-planning-record.d.ts +3 -0
- package/dist/bindings/planning/create-api-binding-planning-record.js +26 -0
- package/dist/bindings/planning/describe-api-binding-planning.d.ts +3 -0
- package/dist/bindings/planning/describe-api-binding-planning.js +59 -0
- package/dist/bindings/planning/validate-api-binding-planning-record.d.ts +3 -0
- package/dist/bindings/planning/validate-api-binding-planning-record.js +13 -0
- package/dist/bindings/project-array-item-schema.d.ts +5 -0
- package/dist/bindings/project-array-item-schema.js +67 -0
- package/dist/bindings/request-binding-schema.d.ts +2 -0
- package/dist/bindings/request-binding-schema.js +23 -0
- package/dist/bindings/request-container-kind.d.ts +3 -0
- package/dist/bindings/request-container-kind.js +17 -0
- package/dist/bindings/resources/clone-schema-resource.d.ts +3 -0
- package/dist/bindings/resources/clone-schema-resource.js +38 -0
- package/dist/bindings/resources/create-schema-resource-context.d.ts +4 -0
- package/dist/bindings/resources/create-schema-resource-context.js +234 -0
- package/dist/bindings/response-binding-schema.d.ts +3 -0
- package/dist/bindings/response-binding-schema.js +21 -0
- package/dist/bindings/schema-allows-container.d.ts +3 -0
- package/dist/bindings/schema-allows-container.js +20 -0
- package/dist/bindings/schema-at-pointer.d.ts +4 -0
- package/dist/bindings/schema-at-pointer.js +89 -0
- package/dist/bindings/validate-api-binding-assignment.d.ts +3 -0
- package/dist/bindings/validate-api-binding-assignment.js +9 -0
- package/dist/bindings/validate-api-binding-assignments.d.ts +2 -0
- package/dist/bindings/validate-api-binding-assignments.js +34 -0
- package/dist/bindings/validate-api-binding-gaps.d.ts +2 -0
- package/dist/bindings/validate-api-binding-gaps.js +10 -0
- package/dist/bindings/validate-api-binding-plan.d.ts +3 -0
- package/dist/bindings/validate-api-binding-plan.js +11 -0
- package/dist/bindings/validate-native-output-contracts.d.ts +3 -0
- package/dist/bindings/validate-native-output-contracts.js +16 -0
- package/dist/bindings/validate-registered-api-binding.d.ts +3 -0
- package/dist/bindings/validate-registered-api-binding.js +52 -0
- package/dist/draft/approve-workflow-draft.d.ts +3 -0
- package/dist/draft/approve-workflow-draft.js +32 -0
- package/dist/draft/changes/apply-draft-change-set.d.ts +3 -0
- package/dist/draft/changes/apply-draft-change-set.js +75 -0
- package/dist/draft/changes/apply-draft-change.d.ts +4 -0
- package/dist/draft/changes/apply-draft-change.js +77 -0
- package/dist/draft/changes/draft-edge-key.d.ts +2 -0
- package/dist/draft/changes/draft-edge-key.js +3 -0
- package/dist/draft/contracts/resolve-workflow-draft-node-contracts.d.ts +4 -0
- package/dist/draft/contracts/resolve-workflow-draft-node-contracts.js +38 -0
- package/dist/draft/create-workflow-draft.d.ts +2 -0
- package/dist/draft/create-workflow-draft.js +24 -0
- package/dist/draft/edits/api/create-workflow-draft-api-binding-questions.d.ts +5 -0
- package/dist/draft/edits/api/create-workflow-draft-api-binding-questions.js +65 -0
- package/dist/draft/edits/api/describe-workflow-draft-api-binding-intent.d.ts +4 -0
- package/dist/draft/edits/api/describe-workflow-draft-api-binding-intent.js +32 -0
- package/dist/draft/edits/api/describe-workflow-draft-api-call-arguments.d.ts +2 -0
- package/dist/draft/edits/api/describe-workflow-draft-api-call-arguments.js +12 -0
- package/dist/draft/edits/api/describe-workflow-draft-api-call-bindings.d.ts +3 -0
- package/dist/draft/edits/api/describe-workflow-draft-api-call-bindings.js +36 -0
- package/dist/draft/edits/api/describe-workflow-draft-api-call-planning.d.ts +3 -0
- package/dist/draft/edits/api/describe-workflow-draft-api-call-planning.js +73 -0
- package/dist/draft/edits/api/resolve-api-call-arguments-context.d.ts +3 -0
- package/dist/draft/edits/api/resolve-api-call-arguments-context.js +46 -0
- package/dist/draft/edits/api/resolve-workflow-draft-api-binding-intent.d.ts +2 -0
- package/dist/draft/edits/api/resolve-workflow-draft-api-binding-intent.js +37 -0
- package/dist/draft/edits/api/resolve-workflow-draft-api-call-arguments.d.ts +3 -0
- package/dist/draft/edits/api/resolve-workflow-draft-api-call-arguments.js +77 -0
- package/dist/draft/edits/api/resolve-workflow-draft-api-call-bindings.d.ts +3 -0
- package/dist/draft/edits/api/resolve-workflow-draft-api-call-bindings.js +93 -0
- package/dist/draft/edits/api/resolve-workflow-draft-api-literal-sources.d.ts +3 -0
- package/dist/draft/edits/api/resolve-workflow-draft-api-literal-sources.js +60 -0
- package/dist/draft/edits/api/validate-workflow-draft-api-call-mappings.d.ts +4 -0
- package/dist/draft/edits/api/validate-workflow-draft-api-call-mappings.js +34 -0
- package/dist/draft/edits/assemble-workflow-draft-edit.d.ts +3 -0
- package/dist/draft/edits/assemble-workflow-draft-edit.js +55 -0
- package/dist/draft/edits/assembly/inspect-workflow-draft-edit-repairs.d.ts +4 -0
- package/dist/draft/edits/assembly/inspect-workflow-draft-edit-repairs.js +188 -0
- package/dist/draft/edits/assembly/prepare-primary-workflow-draft-edit.d.ts +4 -0
- package/dist/draft/edits/assembly/prepare-primary-workflow-draft-edit.js +288 -0
- package/dist/draft/edits/assembly/resolve-prepared-workflow-draft-edit.d.ts +4 -0
- package/dist/draft/edits/assembly/resolve-prepared-workflow-draft-edit.js +38 -0
- package/dist/draft/edits/assembly/resolve-workflow-draft-edit-repair.d.ts +4 -0
- package/dist/draft/edits/assembly/resolve-workflow-draft-edit-repair.js +37 -0
- package/dist/draft/edits/bindings/describe-workflow-draft-api-binding-edit.d.ts +3 -0
- package/dist/draft/edits/bindings/describe-workflow-draft-api-binding-edit.js +84 -0
- package/dist/draft/edits/bindings/resolve-workflow-draft-api-binding-edit.d.ts +3 -0
- package/dist/draft/edits/bindings/resolve-workflow-draft-api-binding-edit.js +152 -0
- package/dist/draft/edits/clarification/describe-workflow-draft-clarification-ownership.d.ts +3 -0
- package/dist/draft/edits/clarification/describe-workflow-draft-clarification-ownership.js +69 -0
- package/dist/draft/edits/clarification/resolve-workflow-draft-clarification-owner-index.d.ts +3 -0
- package/dist/draft/edits/clarification/resolve-workflow-draft-clarification-owner-index.js +21 -0
- package/dist/draft/edits/clarification/workflow-draft-clarification-stages.d.ts +4 -0
- package/dist/draft/edits/clarification/workflow-draft-clarification-stages.js +26 -0
- package/dist/draft/edits/connections/derive-workflow-draft-node-removal-connections.d.ts +4 -0
- package/dist/draft/edits/connections/derive-workflow-draft-node-removal-connections.js +14 -0
- package/dist/draft/edits/connections/describe-workflow-draft-connection-edit.d.ts +3 -0
- package/dist/draft/edits/connections/describe-workflow-draft-connection-edit.js +139 -0
- package/dist/draft/edits/connections/resolve-workflow-draft-connection-edit.d.ts +3 -0
- package/dist/draft/edits/connections/resolve-workflow-draft-connection-edit.js +82 -0
- package/dist/draft/edits/connections/resolve-workflow-draft-terminal-removal.d.ts +3 -0
- package/dist/draft/edits/connections/resolve-workflow-draft-terminal-removal.js +34 -0
- package/dist/draft/edits/create-workflow-draft-edit-plan.d.ts +3 -0
- package/dist/draft/edits/create-workflow-draft-edit-plan.js +140 -0
- package/dist/draft/edits/describe-workflow-draft-edit-context.d.ts +3 -0
- package/dist/draft/edits/describe-workflow-draft-edit-context.js +31 -0
- package/dist/draft/edits/describe-workflow-draft-selected-nodes.d.ts +4 -0
- package/dist/draft/edits/describe-workflow-draft-selected-nodes.js +67 -0
- package/dist/draft/edits/inputs/create-workflow-draft-api-input-edit-contract.d.ts +3 -0
- package/dist/draft/edits/inputs/create-workflow-draft-api-input-edit-contract.js +68 -0
- package/dist/draft/edits/inputs/describe-workflow-draft-api-input-edit.d.ts +2 -0
- package/dist/draft/edits/inputs/describe-workflow-draft-api-input-edit.js +36 -0
- package/dist/draft/edits/inputs/resolve-workflow-draft-api-input-edits.d.ts +3 -0
- package/dist/draft/edits/inputs/resolve-workflow-draft-api-input-edits.js +75 -0
- package/dist/draft/edits/inputs/retain-requested-api-inputs-after-edits.d.ts +3 -0
- package/dist/draft/edits/inputs/retain-requested-api-inputs-after-edits.js +7 -0
- package/dist/draft/edits/inputs/validate-workflow-draft-api-input-edit-contract.d.ts +2 -0
- package/dist/draft/edits/inputs/validate-workflow-draft-api-input-edit-contract.js +23 -0
- package/dist/draft/edits/native/additions/describe-workflow-draft-native-node-addition-readiness.d.ts +3 -0
- package/dist/draft/edits/native/additions/describe-workflow-draft-native-node-addition-readiness.js +14 -0
- package/dist/draft/edits/native/additions/describe-workflow-draft-native-node-addition.d.ts +2 -0
- package/dist/draft/edits/native/additions/describe-workflow-draft-native-node-addition.js +4 -0
- package/dist/draft/edits/native/additions/resolve-native-node-addition-context.d.ts +4 -0
- package/dist/draft/edits/native/additions/resolve-native-node-addition-context.js +58 -0
- package/dist/draft/edits/native/additions/resolve-native-node-addition-materials.d.ts +4 -0
- package/dist/draft/edits/native/additions/resolve-native-node-addition-materials.js +78 -0
- package/dist/draft/edits/native/additions/resolve-workflow-draft-native-dependencies.d.ts +7 -0
- package/dist/draft/edits/native/additions/resolve-workflow-draft-native-dependencies.js +137 -0
- package/dist/draft/edits/native/additions/resolve-workflow-draft-native-node-addition.d.ts +2 -0
- package/dist/draft/edits/native/additions/resolve-workflow-draft-native-node-addition.js +101 -0
- package/dist/draft/edits/native/additions/resolve-workflow-draft-native-node-parameter-ownership.d.ts +5 -0
- package/dist/draft/edits/native/additions/resolve-workflow-draft-native-node-parameter-ownership.js +87 -0
- package/dist/draft/edits/native/apply-workflow-draft-native-parameter-changes.d.ts +4 -0
- package/dist/draft/edits/native/apply-workflow-draft-native-parameter-changes.js +106 -0
- package/dist/draft/edits/native/describe-workflow-draft-native-parameter-edit.d.ts +3 -0
- package/dist/draft/edits/native/describe-workflow-draft-native-parameter-edit.js +67 -0
- package/dist/draft/edits/native/repairs/collect-native-reference-repair-pointers.d.ts +3 -0
- package/dist/draft/edits/native/repairs/collect-native-reference-repair-pointers.js +29 -0
- package/dist/draft/edits/native/repairs/describe-workflow-draft-native-reference-repair.d.ts +3 -0
- package/dist/draft/edits/native/repairs/describe-workflow-draft-native-reference-repair.js +65 -0
- package/dist/draft/edits/native/repairs/resolve-workflow-draft-native-reference-repair.d.ts +3 -0
- package/dist/draft/edits/native/repairs/resolve-workflow-draft-native-reference-repair.js +119 -0
- package/dist/draft/edits/native/resolve-workflow-draft-native-parameter-edit-targets.d.ts +3 -0
- package/dist/draft/edits/native/resolve-workflow-draft-native-parameter-edit-targets.js +103 -0
- package/dist/draft/edits/native/resolve-workflow-draft-native-parameter-edits.d.ts +3 -0
- package/dist/draft/edits/native/resolve-workflow-draft-native-parameter-edits.js +92 -0
- package/dist/draft/edits/native/validate-workflow-draft-native-parameter-edit-contract.d.ts +2 -0
- package/dist/draft/edits/native/validate-workflow-draft-native-parameter-edit-contract.js +24 -0
- package/dist/draft/edits/prepare-workflow-draft-edit.d.ts +3 -0
- package/dist/draft/edits/prepare-workflow-draft-edit.js +15 -0
- package/dist/draft/edits/references/describe-workflow-draft-reference-sources.d.ts +3 -0
- package/dist/draft/edits/references/describe-workflow-draft-reference-sources.js +58 -0
- package/dist/draft/edits/references/native-material-sources-from-draft-references.d.ts +3 -0
- package/dist/draft/edits/references/native-material-sources-from-draft-references.js +15 -0
- package/dist/draft/edits/references/resolve-workflow-draft-api-response-sources.d.ts +3 -0
- package/dist/draft/edits/references/resolve-workflow-draft-api-response-sources.js +42 -0
- package/dist/draft/edits/references/resolve-workflow-draft-source-evidence.d.ts +3 -0
- package/dist/draft/edits/references/resolve-workflow-draft-source-evidence.js +56 -0
- package/dist/draft/edits/references/validate-workflow-draft-native-reference.d.ts +2 -0
- package/dist/draft/edits/references/validate-workflow-draft-native-reference.js +22 -0
- package/dist/draft/edits/references/validate-workflow-draft-native-references.d.ts +2 -0
- package/dist/draft/edits/references/validate-workflow-draft-native-references.js +31 -0
- package/dist/draft/edits/resolve-workflow-draft-edit-options.d.ts +2 -0
- package/dist/draft/edits/resolve-workflow-draft-edit-options.js +9 -0
- package/dist/draft/edits/stage-workflow-draft-edit.d.ts +3 -0
- package/dist/draft/edits/stage-workflow-draft-edit.js +63 -0
- package/dist/draft/edits/validate-workflow-draft-edit-plan.d.ts +3 -0
- package/dist/draft/edits/validate-workflow-draft-edit-plan.js +20 -0
- package/dist/draft/edits/values/apply-workflow-draft-api-input-edits.d.ts +4 -0
- package/dist/draft/edits/values/apply-workflow-draft-api-input-edits.js +35 -0
- package/dist/draft/edits/values/apply-workflow-draft-binding-edits.d.ts +3 -0
- package/dist/draft/edits/values/apply-workflow-draft-binding-edits.js +17 -0
- package/dist/draft/edits/values/apply-workflow-draft-value-edits.d.ts +4 -0
- package/dist/draft/edits/values/apply-workflow-draft-value-edits.js +45 -0
- package/dist/draft/edits/values/order-workflow-draft-value-edits.d.ts +3 -0
- package/dist/draft/edits/values/order-workflow-draft-value-edits.js +25 -0
- package/dist/draft/edits/workflow-draft-edit-assembly-error.d.ts +5 -0
- package/dist/draft/edits/workflow-draft-edit-assembly-error.js +10 -0
- package/dist/draft/edits/workflow-draft-edit-stages.d.ts +3 -0
- package/dist/draft/edits/workflow-draft-edit-stages.js +33 -0
- package/dist/draft/gaps/create-workflow-draft-capability-gap.d.ts +3 -0
- package/dist/draft/gaps/create-workflow-draft-capability-gap.js +35 -0
- package/dist/draft/gaps/describe-workflow-draft-capability-gap.d.ts +3 -0
- package/dist/draft/gaps/describe-workflow-draft-capability-gap.js +10 -0
- package/dist/draft/gaps/describe-workflow-draft-gap-inventory.d.ts +4 -0
- package/dist/draft/gaps/describe-workflow-draft-gap-inventory.js +25 -0
- package/dist/draft/gaps/inspect-workflow-draft-capability-gap.d.ts +3 -0
- package/dist/draft/gaps/inspect-workflow-draft-capability-gap.js +24 -0
- package/dist/draft/impact/analyze-draft-change-impact.d.ts +2 -0
- package/dist/draft/impact/analyze-draft-change-impact.js +92 -0
- package/dist/draft/impact/workflow-draft-dependencies.d.ts +3 -0
- package/dist/draft/impact/workflow-draft-dependencies.js +38 -0
- package/dist/draft/inspect-draft-readiness.d.ts +2 -0
- package/dist/draft/inspect-draft-readiness.js +66 -0
- package/dist/draft/requirements/create-workflow-draft-edit-candidate-context.d.ts +4 -0
- package/dist/draft/requirements/create-workflow-draft-edit-candidate-context.js +55 -0
- package/dist/draft/requirements/describe-workflow-draft-clarification-scopes.d.ts +3 -0
- package/dist/draft/requirements/describe-workflow-draft-clarification-scopes.js +67 -0
- package/dist/draft/requirements/describe-workflow-draft-requirement-edit.d.ts +3 -0
- package/dist/draft/requirements/describe-workflow-draft-requirement-edit.js +26 -0
- package/dist/draft/requirements/history/append-workflow-draft-requirement-history.d.ts +3 -0
- package/dist/draft/requirements/history/append-workflow-draft-requirement-history.js +61 -0
- package/dist/draft/requirements/history/describe-workflow-draft-requirement-history.d.ts +3 -0
- package/dist/draft/requirements/history/describe-workflow-draft-requirement-history.js +22 -0
- package/dist/draft/requirements/history/list-removed-workflow-draft-requirements.d.ts +3 -0
- package/dist/draft/requirements/history/list-removed-workflow-draft-requirements.js +5 -0
- package/dist/draft/requirements/history/validate-workflow-draft-requirement-history.d.ts +3 -0
- package/dist/draft/requirements/history/validate-workflow-draft-requirement-history.js +35 -0
- package/dist/draft/requirements/project-workflow-draft-clarification-requirements.d.ts +4 -0
- package/dist/draft/requirements/project-workflow-draft-clarification-requirements.js +24 -0
- package/dist/draft/requirements/resolve-workflow-draft-clarification-scopes.d.ts +2 -0
- package/dist/draft/requirements/resolve-workflow-draft-clarification-scopes.js +31 -0
- package/dist/draft/resolve-workflow-draft-api-materials.d.ts +4 -0
- package/dist/draft/resolve-workflow-draft-api-materials.js +21 -0
- package/dist/draft/resolve-workflow-draft-materials.d.ts +2 -0
- package/dist/draft/resolve-workflow-draft-materials.js +29 -0
- package/dist/draft/resolve-workflow-draft-native-snapshot.d.ts +3 -0
- package/dist/draft/resolve-workflow-draft-native-snapshot.js +18 -0
- package/dist/draft/validate-workflow-draft.d.ts +3 -0
- package/dist/draft/validate-workflow-draft.js +96 -0
- package/dist/inputs/collect-deferred-api-input-slots.d.ts +3 -0
- package/dist/inputs/collect-deferred-api-input-slots.js +35 -0
- package/dist/inputs/deferred-api-input-error.d.ts +5 -0
- package/dist/inputs/deferred-api-input-error.js +8 -0
- package/dist/inputs/inspect-deferred-api-inputs.d.ts +3 -0
- package/dist/inputs/inspect-deferred-api-inputs.js +98 -0
- package/dist/inputs/materialize-deferred-api-inputs.d.ts +4 -0
- package/dist/inputs/materialize-deferred-api-inputs.js +9 -0
- package/dist/inputs/native/collect-native-runtime-input-slots.d.ts +3 -0
- package/dist/inputs/native/collect-native-runtime-input-slots.js +65 -0
- package/dist/inputs/native/create-native-runtime-parameter-materialization.d.ts +3 -0
- package/dist/inputs/native/create-native-runtime-parameter-materialization.js +47 -0
- package/dist/inputs/native/inspect-native-runtime-inputs.d.ts +2 -0
- package/dist/inputs/native/inspect-native-runtime-inputs.js +116 -0
- package/dist/inputs/native/materialize-native-runtime-parameters.d.ts +4 -0
- package/dist/inputs/native/materialize-native-runtime-parameters.js +47 -0
- package/dist/internal-api.d.ts +30 -0
- package/dist/internal-api.js +25 -0
- package/dist/openapi/catalog/api-operation-key-equals.d.ts +2 -0
- package/dist/openapi/catalog/api-operation-key-equals.js +5 -0
- package/dist/openapi/catalog/create-api-catalog.d.ts +2 -0
- package/dist/openapi/catalog/create-api-catalog.js +34 -0
- package/dist/openapi/catalog/list-api-operations.d.ts +2 -0
- package/dist/openapi/catalog/list-api-operations.js +3 -0
- package/dist/openapi/common/check-oas-value.d.ts +3 -0
- package/dist/openapi/common/check-oas-value.js +6 -0
- package/dist/openapi/common/check-schema-value.d.ts +2 -0
- package/dist/openapi/common/check-schema-value.js +12 -0
- package/dist/openapi/common/create-oas-value-validator.d.ts +3 -0
- package/dist/openapi/common/create-oas-value-validator.js +39 -0
- package/dist/openapi/common/normalize-oas-value-schema.d.ts +4 -0
- package/dist/openapi/common/normalize-oas-value-schema.js +50 -0
- package/dist/openapi/common/operation-metadata.d.ts +2 -0
- package/dist/openapi/common/operation-metadata.js +25 -0
- package/dist/openapi/common/operation-reference.d.ts +3 -0
- package/dist/openapi/{operation-reference.js → common/operation-reference.js} +1 -4
- package/dist/openapi/common/parse-spec-utils.d.ts +3 -0
- package/dist/openapi/common/parse-spec-utils.js +12 -0
- package/dist/openapi/common/resolve-openapi-security.d.ts +3 -0
- package/dist/openapi/common/resolve-openapi-security.js +28 -0
- package/dist/openapi/common/unsupported-operation-error.d.ts +4 -0
- package/dist/openapi/common/unsupported-operation-error.js +8 -0
- package/dist/openapi/common/validate-spec.d.ts +3 -0
- package/dist/openapi/{validate-spec.js → common/validate-spec.js} +2 -1
- package/dist/openapi/inbound/callback/parse-callback-operations.d.ts +3 -0
- package/dist/openapi/inbound/callback/parse-callback-operations.js +31 -0
- package/dist/openapi/inbound/inbound-path-item-operations.d.ts +4 -0
- package/dist/openapi/inbound/inbound-path-item-operations.js +31 -0
- package/dist/openapi/inbound/list-inbound-operations.d.ts +4 -0
- package/dist/openapi/inbound/list-inbound-operations.js +13 -0
- package/dist/openapi/inbound/webhook/parse-webhook-operations.d.ts +3 -0
- package/dist/openapi/inbound/webhook/parse-webhook-operations.js +13 -0
- package/dist/openapi/request/create-operation-catalog.d.ts +2 -0
- package/dist/openapi/request/create-operation-catalog.js +24 -0
- package/dist/openapi/request/encode-form-field.d.ts +2 -0
- package/dist/openapi/request/encode-form-field.js +6 -0
- package/dist/openapi/request/map-http-operation-contract.d.ts +4 -0
- package/dist/openapi/request/map-http-operation-contract.js +21 -0
- package/dist/openapi/request/operation-mapping.d.ts +3 -0
- package/dist/openapi/request/operation-mapping.js +10 -0
- package/dist/openapi/request/parse-operation-responses.d.ts +3 -0
- package/dist/openapi/request/parse-operation-responses.js +30 -0
- package/dist/openapi/request/parse-request-body.d.ts +3 -0
- package/dist/openapi/request/parse-request-body.js +29 -0
- package/dist/openapi/request/parse-request-operations.d.ts +7 -0
- package/dist/openapi/request/parse-request-operations.js +50 -0
- package/dist/openapi/request/parse-request-parameters.d.ts +3 -0
- package/dist/openapi/request/parse-request-parameters.js +93 -0
- package/dist/openapi/request/parse-security.d.ts +3 -0
- package/dist/openapi/request/parse-security.js +31 -0
- package/dist/openapi/request/request-operation-reference.d.ts +1 -0
- package/dist/openapi/request/request-operation-reference.js +4 -0
- package/dist/openapi/request/response-contract.d.ts +6 -0
- package/dist/openapi/request/response-contract.js +32 -0
- package/dist/openapi/request/scalar-response-schema.d.ts +2 -0
- package/dist/openapi/request/scalar-response-schema.js +20 -0
- package/dist/openapi/request/serialize-form-body.d.ts +3 -0
- package/dist/openapi/request/serialize-form-body.js +89 -0
- package/dist/openapi/request/serialize-parameter.d.ts +5 -0
- package/dist/openapi/request/serialize-parameter.js +145 -0
- package/dist/openapi/resolve-api-operations.d.ts +3 -0
- package/dist/openapi/resolve-api-operations.js +84 -0
- package/dist/openapi/response/api-response-validation-value.d.ts +3 -0
- package/dist/openapi/response/api-response-validation-value.js +21 -0
- package/dist/openapi/response/create-api-response-schema.d.ts +4 -0
- package/dist/openapi/response/create-api-response-schema.js +114 -0
- package/dist/openapi/response/create-response-array-item-schema.d.ts +4 -0
- package/dist/openapi/response/create-response-array-item-schema.js +12 -0
- package/dist/openapi/response/create-response-value-schema.d.ts +4 -0
- package/dist/openapi/response/create-response-value-schema.js +8 -0
- package/dist/openapi/response/list-api-response-pointers.d.ts +4 -0
- package/dist/openapi/response/list-api-response-pointers.js +30 -0
- package/dist/openapi/response/list-declared-schema-pointers.d.ts +4 -0
- package/dist/openapi/response/list-declared-schema-pointers.js +91 -0
- package/dist/openapi/selection/evidence/create-api-selection-explanation.d.ts +3 -0
- package/dist/openapi/selection/evidence/create-api-selection-explanation.js +29 -0
- package/dist/openapi/selection/evidence/describe-api-selection-context.d.ts +3 -0
- package/dist/openapi/selection/evidence/describe-api-selection-context.js +12 -0
- package/dist/openapi/selection/evidence/validate-api-selection-explanation.d.ts +3 -0
- package/dist/openapi/selection/evidence/validate-api-selection-explanation.js +14 -0
- package/dist/openapi/selection/resolve-api-selection-answers.d.ts +2 -0
- package/dist/openapi/selection/resolve-api-selection-answers.js +32 -0
- package/dist/planning/evidence/describe-workflow-planning-context.d.ts +3 -0
- package/dist/planning/evidence/describe-workflow-planning-context.js +71 -0
- package/dist/planning/evidence/resolve-workflow-planning-messages.d.ts +4 -0
- package/dist/planning/evidence/resolve-workflow-planning-messages.js +24 -0
- package/dist/planning/evidence/validate-workflow-planning-evidence.d.ts +5 -0
- package/dist/planning/evidence/validate-workflow-planning-evidence.js +38 -0
- package/dist/planning/evidence/workflow-planning-context-fingerprint.d.ts +3 -0
- package/dist/planning/evidence/workflow-planning-context-fingerprint.js +9 -0
- package/dist/public-api.d.ts +255 -7
- package/dist/public-api.js +194 -5
- package/dist/requirements/clarification/build-workflow-clarification-resolution.d.ts +3 -0
- package/dist/requirements/clarification/build-workflow-clarification-resolution.js +75 -0
- package/dist/requirements/clarification/create-workflow-clarification-round.d.ts +3 -0
- package/dist/requirements/clarification/create-workflow-clarification-round.js +71 -0
- package/dist/requirements/clarification/describe-workflow-draft-clarification.d.ts +4 -0
- package/dist/requirements/clarification/describe-workflow-draft-clarification.js +45 -0
- package/dist/requirements/clarification/format-workflow-requirements-prompt.d.ts +3 -0
- package/dist/requirements/clarification/format-workflow-requirements-prompt.js +21 -0
- package/dist/requirements/clarification/prepare-workflow-draft-clarification.d.ts +3 -0
- package/dist/requirements/clarification/prepare-workflow-draft-clarification.js +42 -0
- package/dist/requirements/clarification/proposal-from-clarification-round.d.ts +3 -0
- package/dist/requirements/clarification/proposal-from-clarification-round.js +28 -0
- package/dist/requirements/clarification/resolve-workflow-clarification-replies.d.ts +3 -0
- package/dist/requirements/clarification/resolve-workflow-clarification-replies.js +31 -0
- package/dist/requirements/clarification/revisions/describe-workflow-clarification-answer-revision.d.ts +4 -0
- package/dist/requirements/clarification/revisions/describe-workflow-clarification-answer-revision.js +18 -0
- package/dist/requirements/clarification/revisions/revise-workflow-clarification-answers.d.ts +3 -0
- package/dist/requirements/clarification/revisions/revise-workflow-clarification-answers.js +91 -0
- package/dist/requirements/clarification/revisions/validate-workflow-clarification-answer-revision.d.ts +3 -0
- package/dist/requirements/clarification/revisions/validate-workflow-clarification-answer-revision.js +15 -0
- package/dist/requirements/clarification/validate-workflow-clarification-round.d.ts +3 -0
- package/dist/requirements/clarification/validate-workflow-clarification-round.js +24 -0
- package/dist/requirements/configuration/read-clarification-question-limits.d.ts +3 -0
- package/dist/requirements/configuration/read-clarification-question-limits.js +18 -0
- package/dist/requirements/configuration/resolve-workflow-clarification-options.d.ts +3 -0
- package/dist/requirements/configuration/resolve-workflow-clarification-options.js +13 -0
- package/dist/review/suggestions/adopt-workflow-review-suggestion.d.ts +3 -0
- package/dist/review/suggestions/adopt-workflow-review-suggestion.js +35 -0
- package/dist/review/suggestions/create-workflow-review-suggestions.d.ts +2 -0
- package/dist/review/suggestions/create-workflow-review-suggestions.js +51 -0
- package/dist/review/suggestions/describe-workflow-review-suggestions.d.ts +2 -0
- package/dist/review/suggestions/describe-workflow-review-suggestions.js +16 -0
- package/dist/review/suggestions/read-workflow-review-suggestion-limits.d.ts +2 -0
- package/dist/review/suggestions/read-workflow-review-suggestion-limits.js +10 -0
- package/dist/review/suggestions/validate-workflow-review-suggestions.d.ts +2 -0
- package/dist/review/suggestions/validate-workflow-review-suggestions.js +20 -0
- package/dist/runtime-api.d.ts +9 -0
- package/dist/runtime-api.js +10 -0
- package/dist/schemas/api-binding-planning-schema.d.ts +67 -0
- package/dist/schemas/api-binding-planning-schema.js +58 -0
- package/dist/schemas/api-input-answer-extraction-schema.d.ts +72 -0
- package/dist/schemas/api-input-answer-extraction-schema.js +29 -0
- package/dist/schemas/api-input-literal-source-schema.d.ts +8 -0
- package/dist/schemas/api-input-literal-source-schema.js +10 -0
- package/dist/schemas/api-input-source-selection-schema.d.ts +23 -0
- package/dist/schemas/api-input-source-selection-schema.js +39 -0
- package/dist/schemas/api-literal-generation-schema.d.ts +76 -0
- package/dist/schemas/api-literal-generation-schema.js +53 -0
- package/dist/schemas/api-operation-answers-schema.d.ts +9 -0
- package/dist/schemas/api-operation-answers-schema.js +8 -0
- package/dist/schemas/api-operation-candidate-schema.d.ts +20 -0
- package/dist/schemas/api-operation-candidate-schema.js +18 -0
- package/dist/schemas/api-operation-key-schema.d.ts +6 -0
- package/dist/schemas/api-operation-key-schema.js +6 -0
- package/dist/schemas/api-request-media-type-decision-schema.d.ts +99 -0
- package/dist/schemas/api-request-media-type-decision-schema.js +67 -0
- package/dist/schemas/api-selection-evidence-schema.d.ts +61 -0
- package/dist/schemas/api-selection-evidence-schema.js +25 -0
- package/dist/schemas/confirmed-api-input-schema.d.ts +25 -0
- package/dist/schemas/confirmed-api-input-schema.js +15 -0
- package/dist/schemas/create-api-argument-generation-contract.d.ts +4 -0
- package/dist/schemas/create-api-argument-generation-contract.js +82 -0
- package/dist/schemas/create-api-arguments-schema.d.ts +4 -0
- package/dist/schemas/create-api-arguments-schema.js +4 -0
- package/dist/schemas/create-api-input-answers-schema.d.ts +11 -0
- package/dist/schemas/create-api-input-answers-schema.js +19 -0
- package/dist/schemas/create-api-input-slot-value-schema.d.ts +5 -0
- package/dist/schemas/create-api-input-slot-value-schema.js +26 -0
- package/dist/schemas/create-api-request-input-pointer-schema.d.ts +4 -0
- package/dist/schemas/create-api-request-input-pointer-schema.js +13 -0
- package/dist/schemas/create-api-request-schema.d.ts +4 -0
- package/dist/schemas/create-api-request-schema.js +50 -0
- package/dist/schemas/create-deferred-api-inputs-schema.d.ts +4 -0
- package/dist/schemas/create-deferred-api-inputs-schema.js +13 -0
- package/dist/schemas/create-json-schema-value-schema.d.ts +5 -0
- package/dist/schemas/create-json-schema-value-schema.js +21 -0
- package/dist/schemas/create-native-parameter-generation-contract.d.ts +3 -0
- package/dist/schemas/create-native-parameter-generation-contract.js +56 -0
- package/dist/schemas/create-native-runtime-parameters-schema.d.ts +4 -0
- package/dist/schemas/create-native-runtime-parameters-schema.js +26 -0
- package/dist/schemas/create-oas-value-schema.d.ts +6 -0
- package/dist/schemas/create-oas-value-schema.js +7 -0
- package/dist/schemas/create-oas-value-validation-schema.d.ts +5 -0
- package/dist/schemas/create-oas-value-validation-schema.js +19 -0
- package/dist/schemas/create-workflow-draft-api-binding-question-schema.d.ts +4 -0
- package/dist/schemas/create-workflow-draft-api-binding-question-schema.js +30 -0
- package/dist/schemas/create-workflow-draft-api-input-edit-values-schema.d.ts +5 -0
- package/dist/schemas/create-workflow-draft-api-input-edit-values-schema.js +62 -0
- package/dist/schemas/create-workflow-draft-clarification-scope-schema.d.ts +5 -0
- package/dist/schemas/create-workflow-draft-clarification-scope-schema.js +32 -0
- package/dist/schemas/create-workflow-draft-edit-proposal-schema.d.ts +4 -0
- package/dist/schemas/create-workflow-draft-edit-proposal-schema.js +148 -0
- package/dist/schemas/create-workflow-draft-native-parameter-edit-values-schema.d.ts +4 -0
- package/dist/schemas/create-workflow-draft-native-parameter-edit-values-schema.js +62 -0
- package/dist/schemas/create-workflow-draft-requirement-answer-schema.d.ts +4 -0
- package/dist/schemas/create-workflow-draft-requirement-answer-schema.js +13 -0
- package/dist/schemas/create-workflow-draft-requirement-history-schema.d.ts +4 -0
- package/dist/schemas/create-workflow-draft-requirement-history-schema.js +40 -0
- package/dist/schemas/create-workflow-draft-selected-scope-schema.d.ts +4 -0
- package/dist/schemas/create-workflow-draft-selected-scope-schema.js +18 -0
- package/dist/schemas/create-workflow-draft-source-evidence-fields.d.ts +12 -0
- package/dist/schemas/create-workflow-draft-source-evidence-fields.js +56 -0
- package/dist/schemas/create-workflow-requirements-proposal-schema.d.ts +5 -0
- package/dist/schemas/create-workflow-requirements-proposal-schema.js +105 -0
- package/dist/schemas/create-workflow-review-suggestions-proposal-schema.d.ts +4 -0
- package/dist/schemas/create-workflow-review-suggestions-proposal-schema.js +45 -0
- package/dist/schemas/create-workflow-runtime-inputs-schema.d.ts +6 -0
- package/dist/schemas/create-workflow-runtime-inputs-schema.js +24 -0
- package/dist/schemas/deferred-api-input-schema.d.ts +5 -0
- package/dist/schemas/deferred-api-input-schema.js +40 -0
- package/dist/schemas/draft-change-set-schema.d.ts +3 -0
- package/dist/schemas/draft-change-set-schema.js +54 -0
- package/dist/schemas/native-instance-dependencies-schema.d.ts +5 -0
- package/dist/schemas/native-instance-dependencies-schema.js +14 -0
- package/dist/schemas/native-instance-planning-schema.d.ts +22 -0
- package/dist/schemas/native-instance-planning-schema.js +102 -0
- package/dist/schemas/native-material-requirements-schema.d.ts +8 -0
- package/dist/schemas/native-material-requirements-schema.js +8 -0
- package/dist/schemas/native-node-planning-record-schema.d.ts +103 -0
- package/dist/schemas/native-node-planning-record-schema.js +53 -0
- package/dist/schemas/native-parameter-reference-sources-schema.d.ts +6 -0
- package/dist/schemas/native-parameter-reference-sources-schema.js +4 -0
- package/dist/schemas/native-producer-dependencies-schema.d.ts +5 -0
- package/dist/schemas/native-producer-dependencies-schema.js +26 -0
- package/dist/schemas/native-reference-binding-schema.d.ts +17 -0
- package/dist/schemas/native-reference-binding-schema.js +21 -0
- package/dist/schemas/native-runtime-input-slot-schema.d.ts +15 -0
- package/dist/schemas/native-runtime-input-slot-schema.js +16 -0
- package/dist/schemas/operation-plan-schema.d.ts +8 -0
- package/dist/schemas/operation-plan-schema.js +101 -0
- package/dist/schemas/planning-evidence-schema.d.ts +40 -0
- package/dist/schemas/planning-evidence-schema.js +45 -0
- package/dist/schemas/project-literal-array-schema.d.ts +4 -0
- package/dist/schemas/project-literal-array-schema.js +61 -0
- package/dist/schemas/project-literal-input-schema.d.ts +3 -0
- package/dist/schemas/project-literal-input-schema.js +135 -0
- package/dist/schemas/project-native-literal-parameters.d.ts +4 -0
- package/dist/schemas/project-native-literal-parameters.js +200 -0
- package/dist/schemas/requested-api-inputs-schema.d.ts +3 -0
- package/dist/schemas/requested-api-inputs-schema.js +7 -0
- package/dist/schemas/workflow-clarification-answer-revision-schema.d.ts +45 -0
- package/dist/schemas/workflow-clarification-answer-revision-schema.js +26 -0
- package/dist/schemas/workflow-clarification-reply-schema.d.ts +33 -0
- package/dist/schemas/workflow-clarification-reply-schema.js +40 -0
- package/dist/schemas/workflow-clarification-settings-schema.d.ts +11 -0
- package/dist/schemas/workflow-clarification-settings-schema.js +17 -0
- package/dist/schemas/workflow-connection-planning-schema.d.ts +147 -0
- package/dist/schemas/workflow-connection-planning-schema.js +44 -0
- package/dist/schemas/workflow-draft-api-binding-answer-schema.d.ts +27 -0
- package/dist/schemas/workflow-draft-api-binding-answer-schema.js +24 -0
- package/dist/schemas/workflow-draft-api-binding-edit-schema.d.ts +5 -0
- package/dist/schemas/workflow-draft-api-binding-edit-schema.js +58 -0
- package/dist/schemas/workflow-draft-api-binding-edit-scope-schema.d.ts +8 -0
- package/dist/schemas/workflow-draft-api-binding-edit-scope-schema.js +5 -0
- package/dist/schemas/workflow-draft-api-binding-intent-schema.d.ts +4 -0
- package/dist/schemas/workflow-draft-api-binding-intent-schema.js +14 -0
- package/dist/schemas/workflow-draft-api-call-arguments-schema.d.ts +4 -0
- package/dist/schemas/workflow-draft-api-call-arguments-schema.js +40 -0
- package/dist/schemas/workflow-draft-api-call-bindings-schema.d.ts +3 -0
- package/dist/schemas/workflow-draft-api-call-bindings-schema.js +51 -0
- package/dist/schemas/workflow-draft-api-input-edit-contract-schema.d.ts +46 -0
- package/dist/schemas/workflow-draft-api-input-edit-contract-schema.js +36 -0
- package/dist/schemas/workflow-draft-api-input-edit-proposal-schema.d.ts +5 -0
- package/dist/schemas/workflow-draft-api-input-edit-proposal-schema.js +19 -0
- package/dist/schemas/workflow-draft-capability-gap-schema.d.ts +44 -0
- package/dist/schemas/workflow-draft-capability-gap-schema.js +41 -0
- package/dist/schemas/workflow-draft-clarification-planning-stage-schema.d.ts +8 -0
- package/dist/schemas/workflow-draft-clarification-planning-stage-schema.js +8 -0
- package/dist/schemas/workflow-draft-connection-edit-schema.d.ts +5 -0
- package/dist/schemas/workflow-draft-connection-edit-schema.js +66 -0
- package/dist/schemas/workflow-draft-edit-assembly-schema.d.ts +171 -0
- package/dist/schemas/workflow-draft-edit-assembly-schema.js +93 -0
- package/dist/schemas/workflow-draft-edit-message-fields.d.ts +14 -0
- package/dist/schemas/workflow-draft-edit-message-fields.js +34 -0
- package/dist/schemas/workflow-draft-edit-options-schema.d.ts +5 -0
- package/dist/schemas/workflow-draft-edit-options-schema.js +8 -0
- package/dist/schemas/workflow-draft-edit-plan-schema.d.ts +33 -0
- package/dist/schemas/workflow-draft-edit-plan-schema.js +31 -0
- package/dist/schemas/workflow-draft-native-dependencies-schema.d.ts +4 -0
- package/dist/schemas/workflow-draft-native-dependencies-schema.js +13 -0
- package/dist/schemas/workflow-draft-native-node-addition-schema.d.ts +5 -0
- package/dist/schemas/workflow-draft-native-node-addition-schema.js +75 -0
- package/dist/schemas/workflow-draft-native-parameter-edit-schema.d.ts +50 -0
- package/dist/schemas/workflow-draft-native-parameter-edit-schema.js +72 -0
- package/dist/schemas/workflow-draft-native-reference-repair-schema.d.ts +4 -0
- package/dist/schemas/workflow-draft-native-reference-repair-schema.js +47 -0
- package/dist/schemas/workflow-draft-schema.d.ts +73 -0
- package/dist/schemas/workflow-draft-schema.js +88 -0
- package/dist/schemas/workflow-graph-planning-schema.d.ts +331 -0
- package/dist/schemas/workflow-graph-planning-schema.js +68 -0
- package/dist/schemas/workflow-planning-material-schema.d.ts +41 -0
- package/dist/schemas/workflow-planning-material-schema.js +24 -0
- package/dist/schemas/workflow-planning-message-ids-schema.d.ts +2 -0
- package/dist/schemas/workflow-planning-message-ids-schema.js +5 -0
- package/dist/schemas/workflow-review-suggestion-evidence-schema.d.ts +23 -0
- package/dist/schemas/workflow-review-suggestion-evidence-schema.js +9 -0
- package/dist/schemas/workflow-review-suggestion-settings-schema.d.ts +23 -0
- package/dist/schemas/workflow-review-suggestion-settings-schema.js +26 -0
- package/dist/schemas/workflow-review-suggestions-record-schema.d.ts +31 -0
- package/dist/schemas/workflow-review-suggestions-record-schema.js +13 -0
- package/dist/types/api-argument-generation.d.ts +17 -0
- package/dist/types/api-arguments.d.ts +46 -0
- package/dist/types/api-arguments.js +1 -0
- package/dist/types/api-binding-planning.d.ts +47 -0
- package/dist/types/api-binding-planning.js +1 -0
- package/dist/types/api-bindings.d.ts +45 -0
- package/dist/types/api-bindings.js +1 -0
- package/dist/types/api-catalog.d.ts +37 -0
- package/dist/types/api-catalog.js +1 -0
- package/dist/types/api-clarification.d.ts +80 -0
- package/dist/types/api-clarification.js +1 -0
- package/dist/types/api-input-answer-extraction.d.ts +49 -0
- package/dist/types/api-input-answer-extraction.js +1 -0
- package/dist/types/api-input-literal-source.d.ts +17 -0
- package/dist/types/api-input-literal-source.js +1 -0
- package/dist/types/api-input-source-selection.d.ts +36 -0
- package/dist/types/api-input-source-selection.js +1 -0
- package/dist/types/api-literal-generation.d.ts +59 -0
- package/dist/types/api-literal-generation.js +1 -0
- package/dist/types/api-operation.d.ts +26 -0
- package/dist/types/api-operation.js +1 -0
- package/dist/types/api-request-media-type-decision.d.ts +71 -0
- package/dist/types/api-request-media-type-decision.js +1 -0
- package/dist/types/api-response-pointers.d.ts +20 -0
- package/dist/types/api-response-pointers.js +1 -0
- package/dist/types/api-response.d.ts +14 -0
- package/dist/types/api-response.js +1 -0
- package/dist/types/api-selection-evidence.d.ts +29 -0
- package/dist/types/api-selection-evidence.js +1 -0
- package/dist/types/array-projection.d.ts +5 -0
- package/dist/types/array-projection.js +1 -0
- package/dist/types/binding-validation-internal.d.ts +12 -0
- package/dist/types/binding-validation-internal.js +1 -0
- package/dist/types/catalog.d.ts +17 -0
- package/dist/types/catalog.js +1 -0
- package/dist/types/deferred-api-inputs.d.ts +45 -0
- package/dist/types/deferred-api-inputs.js +1 -0
- package/dist/types/inbound.d.ts +18 -0
- package/dist/types/inbound.js +1 -0
- package/dist/types/json-input-assignment.d.ts +9 -0
- package/dist/types/json-input-assignment.js +1 -0
- package/dist/types/legacy-plan.d.ts +47 -0
- package/dist/types/legacy-plan.js +1 -0
- package/dist/types/native-instance-dependencies.d.ts +35 -0
- package/dist/types/native-instance-dependencies.js +1 -0
- package/dist/types/native-material-snapshot.d.ts +44 -0
- package/dist/types/native-material-snapshot.js +1 -0
- package/dist/types/native-node-planning.d.ts +253 -0
- package/dist/types/native-node-planning.js +1 -0
- package/dist/types/native-parameter-reference.d.ts +17 -0
- package/dist/types/native-parameter-reference.js +1 -0
- package/dist/types/native-producer-dependencies.d.ts +9 -0
- package/dist/types/native-producer-dependencies.js +1 -0
- package/dist/types/native-producer-eligibility.d.ts +11 -0
- package/dist/types/native-producer-eligibility.js +1 -0
- package/dist/types/native-reference-validation.d.ts +12 -0
- package/dist/types/native-reference-validation.js +1 -0
- package/dist/types/native-runtime-inputs.d.ts +53 -0
- package/dist/types/native-runtime-inputs.js +1 -0
- package/dist/types/node-output.d.ts +11 -0
- package/dist/types/node-output.js +1 -0
- package/dist/types/oas-value-validation.d.ts +8 -0
- package/dist/types/oas-value-validation.js +1 -0
- package/dist/types/openapi.d.ts +7 -23
- package/dist/types/planning-evidence.d.ts +56 -0
- package/dist/types/planning-evidence.js +1 -0
- package/dist/types/request.d.ts +41 -0
- package/dist/types/request.js +1 -0
- package/dist/types/requested-api-inputs.d.ts +8 -0
- package/dist/types/requested-api-inputs.js +1 -0
- package/dist/types/reviewable-workflow.d.ts +57 -0
- package/dist/types/reviewable-workflow.js +1 -0
- package/dist/types/schema-dialect.d.ts +1 -0
- package/dist/types/schema-dialect.js +1 -0
- package/dist/types/schema-json.d.ts +4 -0
- package/dist/types/schema-json.js +1 -0
- package/dist/types/schema-resource.d.ts +18 -0
- package/dist/types/schema-resource.js +1 -0
- package/dist/types/security.d.ts +17 -0
- package/dist/types/security.js +1 -0
- package/dist/types/workflow-capability-planning.d.ts +10 -0
- package/dist/types/workflow-capability-planning.js +1 -0
- package/dist/types/workflow-clarification-answer-revision.d.ts +43 -0
- package/dist/types/workflow-clarification-answer-revision.js +1 -0
- package/dist/types/workflow-clarification.d.ts +153 -0
- package/dist/types/workflow-clarification.js +1 -0
- package/dist/types/workflow-connection-planning.d.ts +89 -0
- package/dist/types/workflow-connection-planning.js +1 -0
- package/dist/types/workflow-draft-api-binding-clarification.d.ts +42 -0
- package/dist/types/workflow-draft-api-binding-clarification.js +1 -0
- package/dist/types/workflow-draft-api-binding-edit.d.ts +98 -0
- package/dist/types/workflow-draft-api-binding-edit.js +1 -0
- package/dist/types/workflow-draft-api-binding-intent.d.ts +28 -0
- package/dist/types/workflow-draft-api-binding-intent.js +1 -0
- package/dist/types/workflow-draft-api-call-planning-internal.d.ts +7 -0
- package/dist/types/workflow-draft-api-call-planning-internal.js +1 -0
- package/dist/types/workflow-draft-api-call-planning.d.ts +127 -0
- package/dist/types/workflow-draft-api-call-planning.js +1 -0
- package/dist/types/workflow-draft-api-input-edit.d.ts +91 -0
- package/dist/types/workflow-draft-api-input-edit.js +1 -0
- package/dist/types/workflow-draft-api-literal-sources.d.ts +14 -0
- package/dist/types/workflow-draft-api-literal-sources.js +1 -0
- package/dist/types/workflow-draft-api-response-sources.d.ts +26 -0
- package/dist/types/workflow-draft-api-response-sources.js +1 -0
- package/dist/types/workflow-draft-capability-gap.d.ts +54 -0
- package/dist/types/workflow-draft-capability-gap.js +1 -0
- package/dist/types/workflow-draft-changes.d.ts +62 -0
- package/dist/types/workflow-draft-changes.js +1 -0
- package/dist/types/workflow-draft-clarification-ownership.d.ts +35 -0
- package/dist/types/workflow-draft-clarification-ownership.js +1 -0
- package/dist/types/workflow-draft-clarification.d.ts +64 -0
- package/dist/types/workflow-draft-clarification.js +1 -0
- package/dist/types/workflow-draft-connection-edit.d.ts +96 -0
- package/dist/types/workflow-draft-connection-edit.js +1 -0
- package/dist/types/workflow-draft-edit-assembly-internal.d.ts +23 -0
- package/dist/types/workflow-draft-edit-assembly-internal.js +1 -0
- package/dist/types/workflow-draft-edit-assembly.d.ts +146 -0
- package/dist/types/workflow-draft-edit-assembly.js +1 -0
- package/dist/types/workflow-draft-edit.d.ts +110 -0
- package/dist/types/workflow-draft-edit.js +1 -0
- package/dist/types/workflow-draft-native-dependencies.d.ts +43 -0
- package/dist/types/workflow-draft-native-dependencies.js +1 -0
- package/dist/types/workflow-draft-native-materials.d.ts +9 -0
- package/dist/types/workflow-draft-native-materials.js +1 -0
- package/dist/types/workflow-draft-native-node-addition-internal.d.ts +25 -0
- package/dist/types/workflow-draft-native-node-addition-internal.js +1 -0
- package/dist/types/workflow-draft-native-node-addition.d.ts +113 -0
- package/dist/types/workflow-draft-native-node-addition.js +1 -0
- package/dist/types/workflow-draft-native-parameter-edit.d.ts +129 -0
- package/dist/types/workflow-draft-native-parameter-edit.js +1 -0
- package/dist/types/workflow-draft-native-reference-repair.d.ts +84 -0
- package/dist/types/workflow-draft-native-reference-repair.js +1 -0
- package/dist/types/workflow-draft-reference-sources.d.ts +31 -0
- package/dist/types/workflow-draft-reference-sources.js +1 -0
- package/dist/types/workflow-draft-requirement-edit.d.ts +18 -0
- package/dist/types/workflow-draft-requirement-edit.js +1 -0
- package/dist/types/workflow-draft-requirement-history.d.ts +47 -0
- package/dist/types/workflow-draft-requirement-history.js +1 -0
- package/dist/types/workflow-draft-selected-nodes.d.ts +20 -0
- package/dist/types/workflow-draft-selected-nodes.js +1 -0
- package/dist/types/workflow-draft-source-evidence.d.ts +30 -0
- package/dist/types/workflow-draft-source-evidence.js +1 -0
- package/dist/types/workflow-draft-terminal-removal.d.ts +16 -0
- package/dist/types/workflow-draft-terminal-removal.js +1 -0
- package/dist/types/workflow-draft.d.ts +108 -0
- package/dist/types/workflow-draft.js +1 -0
- package/dist/types/workflow-graph-planning.d.ts +114 -0
- package/dist/types/workflow-graph-planning.js +1 -0
- package/dist/types/workflow-plan.d.ts +132 -0
- package/dist/types/workflow-plan.js +1 -0
- package/dist/types/workflow-planning-materials.d.ts +29 -0
- package/dist/types/workflow-planning-materials.js +1 -0
- package/dist/types/workflow-review-suggestions.d.ts +89 -0
- package/dist/types/workflow-review-suggestions.js +1 -0
- package/dist/utils/clone-json-value.d.ts +3 -0
- package/dist/utils/clone-json-value.js +11 -0
- package/dist/utils/is-object.d.ts +2 -0
- package/dist/utils/is-object.js +3 -0
- package/dist/utils/json-values-equal.d.ts +2 -0
- package/dist/utils/json-values-equal.js +16 -0
- package/dist/workflow/assert-api-call-identities.d.ts +1 -0
- package/dist/workflow/assert-api-call-identities.js +6 -0
- package/dist/workflow/bind-native-material-contracts.d.ts +4 -0
- package/dist/workflow/bind-native-material-contracts.js +16 -0
- package/dist/workflow/connections/create-workflow-connection-plan.d.ts +3 -0
- package/dist/workflow/connections/create-workflow-connection-plan.js +15 -0
- package/dist/workflow/connections/create-workflow-connection-planning-record.d.ts +2 -0
- package/dist/workflow/connections/create-workflow-connection-planning-record.js +32 -0
- package/dist/workflow/connections/describe-workflow-connection-planning.d.ts +3 -0
- package/dist/workflow/connections/describe-workflow-connection-planning.js +81 -0
- package/dist/workflow/connections/prepare-workflow-connection-materials.d.ts +3 -0
- package/dist/workflow/connections/prepare-workflow-connection-materials.js +108 -0
- package/dist/workflow/connections/project-workflow-connection-decision.d.ts +3 -0
- package/dist/workflow/connections/project-workflow-connection-decision.js +18 -0
- package/dist/workflow/connections/validate-workflow-connection-planning-record.d.ts +2 -0
- package/dist/workflow/connections/validate-workflow-connection-planning-record.js +12 -0
- package/dist/workflow/create-native-output-contracts.d.ts +3 -0
- package/dist/workflow/create-native-output-contracts.js +23 -0
- package/dist/workflow/create-native-structure-contracts.d.ts +3 -0
- package/dist/workflow/create-native-structure-contracts.js +38 -0
- package/dist/workflow/create-reviewable-node-contracts.d.ts +3 -0
- package/dist/workflow/create-reviewable-node-contracts.js +28 -0
- package/dist/workflow/create-reviewable-workflow-graph-plan.d.ts +2 -0
- package/dist/workflow/create-reviewable-workflow-graph-plan.js +29 -0
- package/dist/workflow/create-unresolved-node-contracts.d.ts +4 -0
- package/dist/workflow/create-unresolved-node-contracts.js +12 -0
- package/dist/workflow/create-workflow-graph-plan.d.ts +2 -0
- package/dist/workflow/create-workflow-graph-plan.js +17 -0
- package/dist/workflow/create-workflow-node-contracts.d.ts +2 -0
- package/dist/workflow/create-workflow-node-contracts.js +68 -0
- package/dist/workflow/create-workflow-planning-capabilities.d.ts +3 -0
- package/dist/workflow/create-workflow-planning-capabilities.js +20 -0
- package/dist/workflow/describe-native-reference-bindings.d.ts +3 -0
- package/dist/workflow/describe-native-reference-bindings.js +37 -0
- package/dist/workflow/graphs/create-workflow-graph-planning-record.d.ts +2 -0
- package/dist/workflow/graphs/create-workflow-graph-planning-record.js +51 -0
- package/dist/workflow/graphs/create-workflow-graph-planning-result.d.ts +4 -0
- package/dist/workflow/graphs/create-workflow-graph-planning-result.js +37 -0
- package/dist/workflow/graphs/describe-workflow-graph-planning-verification.d.ts +5 -0
- package/dist/workflow/graphs/describe-workflow-graph-planning-verification.js +49 -0
- package/dist/workflow/graphs/describe-workflow-graph-planning.d.ts +2 -0
- package/dist/workflow/graphs/describe-workflow-graph-planning.js +101 -0
- package/dist/workflow/graphs/validate-workflow-graph-planning-record.d.ts +2 -0
- package/dist/workflow/graphs/validate-workflow-graph-planning-record.js +13 -0
- package/dist/workflow/inspect-native-reference-structure.d.ts +3 -0
- package/dist/workflow/inspect-native-reference-structure.js +19 -0
- package/dist/workflow/native-material-resolution-error.d.ts +5 -0
- package/dist/workflow/native-material-resolution-error.js +8 -0
- package/dist/workflow/parse-native-node-parameters.d.ts +3 -0
- package/dist/workflow/parse-native-node-parameters.js +9 -0
- package/dist/workflow/planning/assemble-native-node-materials.d.ts +3 -0
- package/dist/workflow/planning/assemble-native-node-materials.js +8 -0
- package/dist/workflow/planning/capture-native-planning-capability.d.ts +3 -0
- package/dist/workflow/planning/capture-native-planning-capability.js +79 -0
- package/dist/workflow/planning/capture-workflow-planning-data.d.ts +3 -0
- package/dist/workflow/planning/capture-workflow-planning-data.js +66 -0
- package/dist/workflow/planning/capture-workflow-planning-materials.d.ts +3 -0
- package/dist/workflow/planning/capture-workflow-planning-materials.js +53 -0
- package/dist/workflow/planning/create-native-node-plan.d.ts +3 -0
- package/dist/workflow/planning/create-native-node-plan.js +54 -0
- package/dist/workflow/planning/create-native-node-planning-record.d.ts +2 -0
- package/dist/workflow/planning/create-native-node-planning-record.js +69 -0
- package/dist/workflow/planning/create-native-planning-capability-material.d.ts +4 -0
- package/dist/workflow/planning/create-native-planning-capability-material.js +46 -0
- package/dist/workflow/planning/create-prepared-native-node-materials.d.ts +4 -0
- package/dist/workflow/planning/create-prepared-native-node-materials.js +15 -0
- package/dist/workflow/planning/describe-native-node-configuration.d.ts +4 -0
- package/dist/workflow/planning/describe-native-node-configuration.js +110 -0
- package/dist/workflow/planning/describe-native-node-planning.d.ts +3 -0
- package/dist/workflow/planning/describe-native-node-planning.js +51 -0
- package/dist/workflow/planning/has-fixed-empty-native-parameters.d.ts +4 -0
- package/dist/workflow/planning/has-fixed-empty-native-parameters.js +24 -0
- package/dist/workflow/planning/resolve-native-configuration-materials.d.ts +8 -0
- package/dist/workflow/planning/resolve-native-configuration-materials.js +166 -0
- package/dist/workflow/planning/resolve-native-instance-dependencies.d.ts +7 -0
- package/dist/workflow/planning/resolve-native-instance-dependencies.js +77 -0
- package/dist/workflow/planning/resolve-native-instance-selection.d.ts +6 -0
- package/dist/workflow/planning/resolve-native-instance-selection.js +100 -0
- package/dist/workflow/planning/resolve-native-planning-materials.d.ts +3 -0
- package/dist/workflow/planning/resolve-native-planning-materials.js +31 -0
- package/dist/workflow/planning/select-native-parameter-producers.d.ts +8 -0
- package/dist/workflow/planning/select-native-parameter-producers.js +26 -0
- package/dist/workflow/planning/validate-native-node-planning-record.d.ts +2 -0
- package/dist/workflow/planning/validate-native-node-planning-record.js +12 -0
- package/dist/workflow/planning/validate-native-producer-dependency-graph.d.ts +3 -0
- package/dist/workflow/planning/validate-native-producer-dependency-graph.js +19 -0
- package/dist/workflow/resolve-native-material-snapshot.d.ts +3 -0
- package/dist/workflow/resolve-native-material-snapshot.js +200 -0
- package/dist/workflow/resolve-native-structure-parameters.d.ts +4 -0
- package/dist/workflow/resolve-native-structure-parameters.js +56 -0
- package/dist/workflow/validate-exclusive-output-rejoin.d.ts +3 -0
- package/dist/workflow/validate-exclusive-output-rejoin.js +26 -0
- package/dist/workflow/validate-native-api-response-references.d.ts +2 -0
- package/dist/workflow/validate-native-api-response-references.js +26 -0
- package/dist/workflow/validate-native-material-sources.d.ts +4 -0
- package/dist/workflow/validate-native-material-sources.js +26 -0
- package/dist/workflow/validate-native-reference-binding-locations.d.ts +4 -0
- package/dist/workflow/validate-native-reference-binding-locations.js +35 -0
- package/dist/workflow/validate-reviewable-workflow-graph-plan.d.ts +2 -0
- package/dist/workflow/validate-reviewable-workflow-graph-plan.js +100 -0
- package/dist/workflow/validate-workflow-edges.d.ts +2 -0
- package/dist/workflow/validate-workflow-edges.js +19 -0
- package/dist/workflow/validate-workflow-graph-plan.d.ts +3 -0
- package/dist/workflow/validate-workflow-graph-plan.js +53 -0
- package/dist/workflow/validate-workflow-topology.d.ts +2 -0
- package/dist/workflow/validate-workflow-topology.js +105 -0
- package/package.json +21 -21
- package/dist/openapi/operation-reference.d.ts +0 -3
- package/dist/openapi/parse-spec-utils.d.ts +0 -5
- package/dist/openapi/parse-spec-utils.js +0 -52
- package/dist/openapi/parse-spec.d.ts +0 -5
- package/dist/openapi/parse-spec.js +0 -182
- package/dist/openapi/validate-spec.d.ts +0 -3
- package/dist/planning/generate-workflow.d.ts +0 -2
- package/dist/planning/generate-workflow.js +0 -126
- package/dist/schemas/planning-schemas.d.ts +0 -62
- package/dist/schemas/planning-schemas.js +0 -48
- package/dist/types/workflow.d.ts +0 -75
- package/dist/utils/validation.d.ts +0 -7
- package/dist/utils/validation.js +0 -44
- package/dist/utils/workflow-id.d.ts +0 -1
- package/dist/utils/workflow-id.js +0 -8
- package/dist/workflow/compile-sequence.d.ts +0 -2
- package/dist/workflow/compile-sequence.js +0 -167
- package/dist/workflow/compile-workflow.d.ts +0 -4
- package/dist/workflow/compile-workflow.js +0 -128
- package/dist/workflow/sequence-url.d.ts +0 -3
- package/dist/workflow/sequence-url.js +0 -81
- package/dist/workflow/workflow-helpers.d.ts +0 -6
- package/dist/workflow/workflow-helpers.js +0 -81
- /package/dist/types/{workflow.js → api-argument-generation.js} +0 -0
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { createHash } from 'node:crypto';
|
|
2
|
+
import { createWorkflowRequirementsProposalSchema } from '../../schemas/create-workflow-requirements-proposal-schema.js';
|
|
3
|
+
import { workflowPlanningEvidenceSchema } from '../../schemas/planning-evidence-schema.js';
|
|
4
|
+
import { clarificationQuestionLimitsSchema } from '../../schemas/workflow-clarification-settings-schema.js';
|
|
5
|
+
import { workflowPlanningContextFingerprintFromDescription } from '../../planning/evidence/workflow-planning-context-fingerprint.js';
|
|
6
|
+
import { describeWorkflowPlanningContext } from '../../planning/evidence/describe-workflow-planning-context.js';
|
|
7
|
+
import { validateDescribedWorkflowPlanningEvidence } from '../../planning/evidence/validate-workflow-planning-evidence.js';
|
|
8
|
+
import { resolveWorkflowClarificationOptions } from '../configuration/resolve-workflow-clarification-options.js';
|
|
9
|
+
/** The model proposes meaning; code validates sources and owns every identity. */
|
|
10
|
+
export function createWorkflowClarificationRound(input) {
|
|
11
|
+
const limits = clarificationQuestionLimitsSchema.parse(input.limits);
|
|
12
|
+
const options = resolveWorkflowClarificationOptions(input.options);
|
|
13
|
+
const context = describeWorkflowPlanningContext(input.context);
|
|
14
|
+
const contextFingerprint = workflowPlanningContextFingerprintFromDescription(context);
|
|
15
|
+
const proposal = createWorkflowRequirementsProposalSchema(limits, options, workflowPlanningEvidenceSchema).parse(input.proposal);
|
|
16
|
+
const described = [
|
|
17
|
+
...proposal.statements,
|
|
18
|
+
...proposal.categories,
|
|
19
|
+
...proposal.categories.flatMap((category) => category.questions),
|
|
20
|
+
...proposal.categories.flatMap((category) => category.questions.flatMap((question) => question.answer.kind === 'text' ? [] : question.answer.choices)),
|
|
21
|
+
...(proposal.suggestions ?? []),
|
|
22
|
+
];
|
|
23
|
+
for (const statement of proposal.statements)
|
|
24
|
+
validateDescribedWorkflowPlanningEvidence(context, statement.sources);
|
|
25
|
+
for (const item of described)
|
|
26
|
+
if (item.explanation)
|
|
27
|
+
validateDescribedWorkflowPlanningEvidence(context, item.explanation.evidence);
|
|
28
|
+
const id = 'clarification:' +
|
|
29
|
+
createHash('sha256')
|
|
30
|
+
.update(JSON.stringify([contextFingerprint, limits, options, proposal]))
|
|
31
|
+
.digest('hex');
|
|
32
|
+
return {
|
|
33
|
+
id,
|
|
34
|
+
contextFingerprint,
|
|
35
|
+
sourceMessages: structuredClone(context.messages),
|
|
36
|
+
limits,
|
|
37
|
+
options,
|
|
38
|
+
statements: proposal.statements.map((statement, index) => ({
|
|
39
|
+
...statement,
|
|
40
|
+
id: `${id}:statement:${index + 1}`,
|
|
41
|
+
})),
|
|
42
|
+
categories: proposal.categories.map((category, categoryIndex) => ({
|
|
43
|
+
...category,
|
|
44
|
+
id: `${id}:category:${categoryIndex + 1}`,
|
|
45
|
+
questions: category.questions.map((question, questionIndex) => {
|
|
46
|
+
const questionId = `${id}:question:${categoryIndex + 1}:${questionIndex + 1}`;
|
|
47
|
+
return {
|
|
48
|
+
...question,
|
|
49
|
+
id: questionId,
|
|
50
|
+
answer: question.answer.kind === 'text'
|
|
51
|
+
? question.answer
|
|
52
|
+
: {
|
|
53
|
+
...question.answer,
|
|
54
|
+
choices: question.answer.choices.map((choice, choiceIndex) => ({
|
|
55
|
+
...choice,
|
|
56
|
+
id: `${questionId}:choice:${choiceIndex + 1}`,
|
|
57
|
+
})),
|
|
58
|
+
},
|
|
59
|
+
};
|
|
60
|
+
}),
|
|
61
|
+
})),
|
|
62
|
+
...(proposal.suggestions === undefined
|
|
63
|
+
? {}
|
|
64
|
+
: {
|
|
65
|
+
suggestions: proposal.suggestions.map((suggestion, index) => ({
|
|
66
|
+
...suggestion,
|
|
67
|
+
id: `${id}:suggestion:${index + 1}`,
|
|
68
|
+
})),
|
|
69
|
+
}),
|
|
70
|
+
};
|
|
71
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { WorkflowPlanningContext } from '../../types/planning-evidence.js';
|
|
2
|
+
import type { WorkflowDraftClarificationDescription } from '../../types/workflow-draft-clarification.js';
|
|
3
|
+
/** Validate against current declarations and original source messages, never client-edited facts or receipt text. */
|
|
4
|
+
export declare function describeWorkflowDraftClarification(context: WorkflowPlanningContext): WorkflowDraftClarificationDescription | undefined;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { isDeepStrictEqual } from 'node:util';
|
|
2
|
+
import { prepareWorkflowDraftClarification } from './prepare-workflow-draft-clarification.js';
|
|
3
|
+
/** Validate against current declarations and original source messages, never client-edited facts or receipt text. */
|
|
4
|
+
export function describeWorkflowDraftClarification(context) {
|
|
5
|
+
const supplied = context.clarification;
|
|
6
|
+
if (supplied === undefined)
|
|
7
|
+
return undefined;
|
|
8
|
+
if (!supplied ||
|
|
9
|
+
!supplied.round ||
|
|
10
|
+
!supplied.resolution ||
|
|
11
|
+
!Array.isArray(supplied.answerMessages) ||
|
|
12
|
+
!Array.isArray(supplied.confirmedAnswerMessageIds))
|
|
13
|
+
throw new Error('planning context.clarification requires round, resolution, answerMessages and confirmedAnswerMessageIds');
|
|
14
|
+
for (const message of supplied.round.sourceMessages)
|
|
15
|
+
if (!context.messages.some((current) => isDeepStrictEqual(current, message)))
|
|
16
|
+
throw new Error(`Draft clarification source message ${message.id} is missing or changed`);
|
|
17
|
+
const originalContext = {
|
|
18
|
+
messages: supplied.round.sourceMessages,
|
|
19
|
+
operations: context.operations,
|
|
20
|
+
capabilities: context.capabilities,
|
|
21
|
+
...(context.entrypoint === undefined
|
|
22
|
+
? {}
|
|
23
|
+
: { entrypoint: context.entrypoint }),
|
|
24
|
+
};
|
|
25
|
+
const derived = prepareWorkflowDraftClarification({
|
|
26
|
+
context: originalContext,
|
|
27
|
+
round: supplied.round,
|
|
28
|
+
resolution: supplied.resolution,
|
|
29
|
+
});
|
|
30
|
+
if (!isDeepStrictEqual(derived, supplied))
|
|
31
|
+
throw new Error('Draft clarification data differs from its original validated round and replies');
|
|
32
|
+
for (const message of derived.answerMessages)
|
|
33
|
+
if (!context.messages.some((current) => isDeepStrictEqual(current, message)))
|
|
34
|
+
throw new Error(`Draft clarification reply evidence ${message.id} is missing or changed`);
|
|
35
|
+
const questions = supplied.round.categories.flatMap((category) => category.questions);
|
|
36
|
+
return {
|
|
37
|
+
roundId: supplied.round.id,
|
|
38
|
+
facts: structuredClone(derived.resolution.facts),
|
|
39
|
+
pendingQuestions: structuredClone(questions.filter((question) => derived.resolution.pendingQuestionIds.includes(question.id))),
|
|
40
|
+
deferredQuestions: structuredClone(questions.filter((question) => derived.resolution.deferredQuestionIds.includes(question.id))),
|
|
41
|
+
requirementsPrompt: derived.resolution.requirementsPrompt,
|
|
42
|
+
answerMessageIds: derived.answerMessages.map((message) => message.id),
|
|
43
|
+
confirmedAnswerMessageIds: [...derived.confirmedAnswerMessageIds],
|
|
44
|
+
};
|
|
45
|
+
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { WorkflowRequirementsPromptInput } from '../../types/workflow-clarification.js';
|
|
2
|
+
/** A readable projection of structured facts, never a second source of truth. */
|
|
3
|
+
export declare function formatWorkflowRequirementsPrompt(input: WorkflowRequirementsPromptInput): string;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/** A readable projection of structured facts, never a second source of truth. */
|
|
2
|
+
export function formatWorkflowRequirementsPrompt(input) {
|
|
3
|
+
return [
|
|
4
|
+
'사용자 원문',
|
|
5
|
+
...input.sourceMessages.map((message) => `- [${message.id}] ${message.text}`),
|
|
6
|
+
'확인된 요구사항',
|
|
7
|
+
...input.facts.map((fact) => `- ${fact.text}`),
|
|
8
|
+
...(input.pendingQuestions.length
|
|
9
|
+
? [
|
|
10
|
+
'미답변 질문',
|
|
11
|
+
...input.pendingQuestions.map((question) => `- ${question.message}`),
|
|
12
|
+
]
|
|
13
|
+
: []),
|
|
14
|
+
...(input.deferredQuestions.length
|
|
15
|
+
? [
|
|
16
|
+
'보류한 질문',
|
|
17
|
+
...input.deferredQuestions.map((question) => `- ${question.message}`),
|
|
18
|
+
]
|
|
19
|
+
: []),
|
|
20
|
+
].join('\n');
|
|
21
|
+
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { PrepareWorkflowDraftClarificationInput, WorkflowDraftClarification } from '../../types/workflow-draft-clarification.js';
|
|
2
|
+
/** Re-derive facts and reply evidence from the original round. No summary text is promoted to a user's answer. */
|
|
3
|
+
export declare function prepareWorkflowDraftClarification(input: PrepareWorkflowDraftClarificationInput): WorkflowDraftClarification;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { createHash } from 'node:crypto';
|
|
2
|
+
import { isDeepStrictEqual } from 'node:util';
|
|
3
|
+
import { resolveWorkflowClarificationReplies } from './resolve-workflow-clarification-replies.js';
|
|
4
|
+
/** Re-derive facts and reply evidence from the original round. No summary text is promoted to a user's answer. */
|
|
5
|
+
export function prepareWorkflowDraftClarification(input) {
|
|
6
|
+
if (input.context.clarification !== undefined)
|
|
7
|
+
throw new Error('prepareWorkflowDraftClarification.context must be the original question context, not a nested clarified context');
|
|
8
|
+
const resolution = resolveWorkflowClarificationReplies({
|
|
9
|
+
round: input.round,
|
|
10
|
+
context: input.context,
|
|
11
|
+
replies: input.resolution.replies,
|
|
12
|
+
});
|
|
13
|
+
if (!isDeepStrictEqual(resolution, input.resolution))
|
|
14
|
+
throw new Error('Draft clarification resolution has modified facts, replies, provenance or readiness');
|
|
15
|
+
const questions = input.round.categories.flatMap((category) => category.questions);
|
|
16
|
+
const answerMessages = resolution.replies.map((reply) => {
|
|
17
|
+
const question = questions.find((item) => item.id === reply.questionId);
|
|
18
|
+
const fact = resolution.facts.find((item) => item.sources.some((source) => source.kind === 'clarification-answer' &&
|
|
19
|
+
source.questionId === reply.questionId));
|
|
20
|
+
const text = JSON.stringify({
|
|
21
|
+
kind: 'clarification-reply-evidence',
|
|
22
|
+
roundId: input.round.id,
|
|
23
|
+
questionId: question.id,
|
|
24
|
+
question: question.message,
|
|
25
|
+
reply,
|
|
26
|
+
...(fact === undefined ? {} : { confirmedFact: fact }),
|
|
27
|
+
});
|
|
28
|
+
return {
|
|
29
|
+
id: 'clarification-reply:' +
|
|
30
|
+
createHash('sha256').update(text).digest('hex'),
|
|
31
|
+
text,
|
|
32
|
+
};
|
|
33
|
+
});
|
|
34
|
+
return {
|
|
35
|
+
round: structuredClone(input.round),
|
|
36
|
+
resolution,
|
|
37
|
+
answerMessages,
|
|
38
|
+
confirmedAnswerMessageIds: answerMessages
|
|
39
|
+
.filter((_message, index) => resolution.replies[index].kind !== 'defer')
|
|
40
|
+
.map((message) => message.id),
|
|
41
|
+
};
|
|
42
|
+
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { WorkflowClarificationRound, WorkflowRequirementsProposal } from '../../types/workflow-clarification.js';
|
|
2
|
+
/** Remove only the code-owned identities; strict proposal parsing follows. */
|
|
3
|
+
export declare function proposalFromClarificationRound(round: WorkflowClarificationRound): WorkflowRequirementsProposal;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
function withoutIdentity(part) {
|
|
2
|
+
const result = { ...part };
|
|
3
|
+
Reflect.deleteProperty(result, 'id');
|
|
4
|
+
return result;
|
|
5
|
+
}
|
|
6
|
+
/** Remove only the code-owned identities; strict proposal parsing follows. */
|
|
7
|
+
export function proposalFromClarificationRound(round) {
|
|
8
|
+
return {
|
|
9
|
+
statements: round.statements.map(withoutIdentity),
|
|
10
|
+
categories: round.categories.map((category) => ({
|
|
11
|
+
...withoutIdentity(category),
|
|
12
|
+
questions: category.questions.map((question) => ({
|
|
13
|
+
...withoutIdentity(question),
|
|
14
|
+
answer: question.answer.kind === 'text'
|
|
15
|
+
? question.answer
|
|
16
|
+
: {
|
|
17
|
+
...question.answer,
|
|
18
|
+
choices: question.answer.choices.map(withoutIdentity),
|
|
19
|
+
},
|
|
20
|
+
})),
|
|
21
|
+
})),
|
|
22
|
+
...(round.suggestions === undefined
|
|
23
|
+
? {}
|
|
24
|
+
: {
|
|
25
|
+
suggestions: round.suggestions.map(withoutIdentity),
|
|
26
|
+
}),
|
|
27
|
+
};
|
|
28
|
+
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { ResolveWorkflowClarificationRepliesInput, WorkflowClarificationResolution } from '../../types/workflow-clarification.js';
|
|
2
|
+
/** Retain confirmed answers across partial replies; stale/modified state fails. */
|
|
3
|
+
export declare function resolveWorkflowClarificationReplies(input: ResolveWorkflowClarificationRepliesInput): WorkflowClarificationResolution;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { isDeepStrictEqual } from 'node:util';
|
|
2
|
+
import { workflowClarificationRepliesSchema } from '../../schemas/workflow-clarification-reply-schema.js';
|
|
3
|
+
import { buildWorkflowClarificationResolution } from './build-workflow-clarification-resolution.js';
|
|
4
|
+
import { validateWorkflowClarificationRound } from './validate-workflow-clarification-round.js';
|
|
5
|
+
/** Retain confirmed answers across partial replies; stale/modified state fails. */
|
|
6
|
+
export function resolveWorkflowClarificationReplies(input) {
|
|
7
|
+
validateWorkflowClarificationRound(input);
|
|
8
|
+
const replies = workflowClarificationRepliesSchema.parse(input.replies);
|
|
9
|
+
if (input.previous !== undefined) {
|
|
10
|
+
if (input.previous.roundId !== input.round.id ||
|
|
11
|
+
input.previous.contextFingerprint !== input.round.contextFingerprint)
|
|
12
|
+
throw new Error('Previous clarification resolution belongs to a different round or planning context');
|
|
13
|
+
const expected = buildWorkflowClarificationResolution({
|
|
14
|
+
round: input.round,
|
|
15
|
+
replies: input.previous.replies,
|
|
16
|
+
});
|
|
17
|
+
if (!isDeepStrictEqual(expected, input.previous))
|
|
18
|
+
throw new Error('Previous clarification resolution has modified facts, answers or readiness');
|
|
19
|
+
}
|
|
20
|
+
const combined = new Map(input.previous?.replies.map((reply) => [reply.questionId, reply]));
|
|
21
|
+
for (const reply of replies) {
|
|
22
|
+
const previous = combined.get(reply.questionId);
|
|
23
|
+
if (previous && previous.kind !== 'defer')
|
|
24
|
+
throw new Error(`Clarification question ${reply.questionId} is already answered; start an explicit requirements revision to change it`);
|
|
25
|
+
combined.set(reply.questionId, reply);
|
|
26
|
+
}
|
|
27
|
+
return buildWorkflowClarificationResolution({
|
|
28
|
+
round: input.round,
|
|
29
|
+
replies: [...combined.values()],
|
|
30
|
+
});
|
|
31
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { WorkflowPlanningContext } from '../../../types/planning-evidence.js';
|
|
2
|
+
import type { WorkflowClarificationAnswerRevisionDescription } from '../../../types/workflow-clarification-answer-revision.js';
|
|
3
|
+
/** Describe only already-confirmed questions. Pending answers use the ordinary reply boundary. */
|
|
4
|
+
export declare function describeWorkflowClarificationAnswerRevision(context: WorkflowPlanningContext): WorkflowClarificationAnswerRevisionDescription;
|
package/dist/requirements/clarification/revisions/describe-workflow-clarification-answer-revision.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { createHash } from 'node:crypto';
|
|
2
|
+
import { describeWorkflowPlanningContext } from '../../../planning/evidence/describe-workflow-planning-context.js';
|
|
3
|
+
/** Describe only already-confirmed questions. Pending answers use the ordinary reply boundary. */
|
|
4
|
+
export function describeWorkflowClarificationAnswerRevision(context) {
|
|
5
|
+
const description = describeWorkflowPlanningContext(context);
|
|
6
|
+
const clarification = context.clarification;
|
|
7
|
+
if (!clarification)
|
|
8
|
+
throw new Error('Clarification answer revision requires context.clarification');
|
|
9
|
+
const replies = clarification.resolution.replies.filter((reply) => reply.kind !== 'defer');
|
|
10
|
+
return {
|
|
11
|
+
fingerprint: createHash('sha256')
|
|
12
|
+
.update(JSON.stringify([description, clarification]))
|
|
13
|
+
.digest('hex'),
|
|
14
|
+
roundId: clarification.round.id,
|
|
15
|
+
questions: structuredClone(clarification.round.categories.flatMap((category) => category.questions.filter((question) => replies.some((reply) => reply.questionId === question.id)))),
|
|
16
|
+
replies: structuredClone(replies),
|
|
17
|
+
};
|
|
18
|
+
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { ReviseWorkflowClarificationAnswersInput, WorkflowClarificationAnswerRevisionResult } from '../../../types/workflow-clarification-answer-revision.js';
|
|
2
|
+
/** Explicit, atomic answer replacement/reopening. No model call, guessed choice or in-place mutation. */
|
|
3
|
+
export declare function reviseWorkflowClarificationAnswers(input: ReviseWorkflowClarificationAnswersInput): WorkflowClarificationAnswerRevisionResult;
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { createHash } from 'node:crypto';
|
|
2
|
+
import { isDeepStrictEqual } from 'node:util';
|
|
3
|
+
import { workflowClarificationAnswerChangesSchema } from '../../../schemas/workflow-clarification-answer-revision-schema.js';
|
|
4
|
+
import { planningEvidenceTextSchema } from '../../../schemas/planning-evidence-schema.js';
|
|
5
|
+
import { describeWorkflowClarificationAnswerRevision } from './describe-workflow-clarification-answer-revision.js';
|
|
6
|
+
import { resolveWorkflowClarificationReplies } from '../resolve-workflow-clarification-replies.js';
|
|
7
|
+
import { prepareWorkflowDraftClarification } from '../prepare-workflow-draft-clarification.js';
|
|
8
|
+
/** Explicit, atomic answer replacement/reopening. No model call, guessed choice or in-place mutation. */
|
|
9
|
+
export function reviseWorkflowClarificationAnswers(input) {
|
|
10
|
+
const description = describeWorkflowClarificationAnswerRevision(input.context);
|
|
11
|
+
if (input.fingerprint !== description.fingerprint)
|
|
12
|
+
throw new Error('Stale clarification answer revision fingerprint');
|
|
13
|
+
const messageId = planningEvidenceTextSchema.parse(input.messageId);
|
|
14
|
+
if (input.context.messages.some((message) => message.id === messageId))
|
|
15
|
+
throw new Error(`Clarification revision message ID already exists: ${messageId}`);
|
|
16
|
+
const changes = workflowClarificationAnswerChangesSchema.parse(input.changes);
|
|
17
|
+
const before = structuredClone(input.context.clarification);
|
|
18
|
+
const replies = new Map(before.resolution.replies.map((reply) => [reply.questionId, reply]));
|
|
19
|
+
for (const change of changes) {
|
|
20
|
+
const questionId = change.kind === 'replace-answer'
|
|
21
|
+
? change.reply.questionId
|
|
22
|
+
: change.questionId;
|
|
23
|
+
if (!description.replies.some((reply) => reply.questionId === questionId))
|
|
24
|
+
throw new Error(`Clarification revision requires a currently confirmed answer: ${questionId}`);
|
|
25
|
+
if (change.kind === 'reopen-question')
|
|
26
|
+
replies.delete(questionId);
|
|
27
|
+
else {
|
|
28
|
+
if (isDeepStrictEqual(replies.get(questionId), change.reply))
|
|
29
|
+
throw new Error(`Clarification answer change is a no-op: ${questionId}`);
|
|
30
|
+
replies.set(questionId, change.reply);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
const originalContext = {
|
|
34
|
+
messages: before.round.sourceMessages,
|
|
35
|
+
...(input.context.operations === undefined
|
|
36
|
+
? {}
|
|
37
|
+
: { operations: input.context.operations }),
|
|
38
|
+
...(input.context.capabilities === undefined
|
|
39
|
+
? {}
|
|
40
|
+
: { capabilities: input.context.capabilities }),
|
|
41
|
+
...(input.context.entrypoint === undefined
|
|
42
|
+
? {}
|
|
43
|
+
: { entrypoint: input.context.entrypoint }),
|
|
44
|
+
};
|
|
45
|
+
const after = prepareWorkflowDraftClarification({
|
|
46
|
+
context: originalContext,
|
|
47
|
+
round: before.round,
|
|
48
|
+
resolution: resolveWorkflowClarificationReplies({
|
|
49
|
+
context: originalContext,
|
|
50
|
+
round: before.round,
|
|
51
|
+
replies: [...replies.values()],
|
|
52
|
+
}),
|
|
53
|
+
});
|
|
54
|
+
const supersededAnswerMessageIds = before.answerMessages
|
|
55
|
+
.filter((message) => !after.answerMessages.some((next) => next.id === message.id))
|
|
56
|
+
.map((message) => message.id);
|
|
57
|
+
const message = {
|
|
58
|
+
id: messageId,
|
|
59
|
+
text: JSON.stringify({
|
|
60
|
+
kind: 'explicit-clarification-answer-revision',
|
|
61
|
+
roundId: before.round.id,
|
|
62
|
+
fingerprint: description.fingerprint,
|
|
63
|
+
changes,
|
|
64
|
+
}),
|
|
65
|
+
};
|
|
66
|
+
const body = {
|
|
67
|
+
fingerprint: description.fingerprint,
|
|
68
|
+
message,
|
|
69
|
+
changes,
|
|
70
|
+
before,
|
|
71
|
+
after,
|
|
72
|
+
supersededAnswerMessageIds,
|
|
73
|
+
};
|
|
74
|
+
const revision = {
|
|
75
|
+
id: 'clarification-answer-revision:' +
|
|
76
|
+
createHash('sha256').update(JSON.stringify(body)).digest('hex'),
|
|
77
|
+
...body,
|
|
78
|
+
};
|
|
79
|
+
const activeMessages = input.context.messages
|
|
80
|
+
.filter((item) => !supersededAnswerMessageIds.includes(item.id))
|
|
81
|
+
.map((item) => ({ ...item }));
|
|
82
|
+
activeMessages.push(message);
|
|
83
|
+
for (const receipt of after.answerMessages) {
|
|
84
|
+
const existing = activeMessages.find((item) => item.id === receipt.id);
|
|
85
|
+
if (existing && !isDeepStrictEqual(existing, receipt))
|
|
86
|
+
throw new Error(`Clarification answer evidence conflicts with message ${receipt.id}`);
|
|
87
|
+
if (!existing)
|
|
88
|
+
activeMessages.push(structuredClone(receipt));
|
|
89
|
+
}
|
|
90
|
+
return { revision, activeMessages };
|
|
91
|
+
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { ValidateWorkflowClarificationAnswerRevisionInput } from '../../../types/workflow-clarification-answer-revision.js';
|
|
2
|
+
/** Reconstruct against the trusted pre-change context, not a receipt's claimed original state. */
|
|
3
|
+
export declare function validateWorkflowClarificationAnswerRevision(input: ValidateWorkflowClarificationAnswerRevisionInput): void;
|
package/dist/requirements/clarification/revisions/validate-workflow-clarification-answer-revision.js
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { isDeepStrictEqual } from 'node:util';
|
|
2
|
+
import { reviseWorkflowClarificationAnswers } from './revise-workflow-clarification-answers.js';
|
|
3
|
+
/** Reconstruct against the trusted pre-change context, not a receipt's claimed original state. */
|
|
4
|
+
export function validateWorkflowClarificationAnswerRevision(input) {
|
|
5
|
+
if (!input.revision || !input.revision.message)
|
|
6
|
+
throw new Error('Clarification answer revision requires its original receipt');
|
|
7
|
+
const result = reviseWorkflowClarificationAnswers({
|
|
8
|
+
context: input.context,
|
|
9
|
+
fingerprint: input.revision.fingerprint,
|
|
10
|
+
messageId: input.revision.message.id,
|
|
11
|
+
changes: input.revision.changes,
|
|
12
|
+
});
|
|
13
|
+
if (!isDeepStrictEqual(result.revision, input.revision))
|
|
14
|
+
throw new Error('Clarification answer revision has modified lineage, facts or evidence');
|
|
15
|
+
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { WorkflowClarificationRoundInput } from '../../types/workflow-clarification.js';
|
|
2
|
+
/** Host-owned question data must match the current sources and original shape. */
|
|
3
|
+
export declare function validateWorkflowClarificationRound(input: WorkflowClarificationRoundInput): void;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { isDeepStrictEqual } from 'node:util';
|
|
2
|
+
import { workflowPlanningContextFingerprint } from '../../planning/evidence/workflow-planning-context-fingerprint.js';
|
|
3
|
+
import { createWorkflowClarificationRound } from './create-workflow-clarification-round.js';
|
|
4
|
+
import { proposalFromClarificationRound } from './proposal-from-clarification-round.js';
|
|
5
|
+
/** Host-owned question data must match the current sources and original shape. */
|
|
6
|
+
export function validateWorkflowClarificationRound(input) {
|
|
7
|
+
const fingerprint = workflowPlanningContextFingerprint(input.context);
|
|
8
|
+
if (!input.round || input.round.contextFingerprint !== fingerprint)
|
|
9
|
+
throw new Error('Clarification round is missing or stale for planning context');
|
|
10
|
+
let expected;
|
|
11
|
+
try {
|
|
12
|
+
expected = createWorkflowClarificationRound({
|
|
13
|
+
context: input.context,
|
|
14
|
+
limits: input.round.limits,
|
|
15
|
+
options: input.round.options,
|
|
16
|
+
proposal: proposalFromClarificationRound(input.round),
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
catch (cause) {
|
|
20
|
+
throw new Error('Invalid clarification round: questions, sources or settings do not match the contract', { cause });
|
|
21
|
+
}
|
|
22
|
+
if (!isDeepStrictEqual(expected, input.round))
|
|
23
|
+
throw new Error('Clarification round has modified identities, fields or settings');
|
|
24
|
+
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { ClarificationQuestionLimits } from '../../types/workflow-clarification.js';
|
|
2
|
+
/** Read once at the host boundary; no process.env access or silent defaults. */
|
|
3
|
+
export declare function readClarificationQuestionLimits(environment: Record<string, string | undefined>): ClarificationQuestionLimits;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { clarificationQuestionLimitsSchema } from '../../schemas/workflow-clarification-settings-schema.js';
|
|
2
|
+
/** Read once at the host boundary; no process.env access or silent defaults. */
|
|
3
|
+
export function readClarificationQuestionLimits(environment) {
|
|
4
|
+
function read(name) {
|
|
5
|
+
const value = environment[name];
|
|
6
|
+
if (typeof value !== 'string' ||
|
|
7
|
+
!/^[1-9][0-9]*$/.test(value) ||
|
|
8
|
+
!Number.isSafeInteger(Number(value)))
|
|
9
|
+
throw new Error(`${name} must be an explicitly configured positive safe integer`);
|
|
10
|
+
return Number(value);
|
|
11
|
+
}
|
|
12
|
+
return clarificationQuestionLimitsSchema.parse({
|
|
13
|
+
maxCategories: read('OPENAPI_FLOW_CLARIFY_MAX_CATEGORIES'),
|
|
14
|
+
maxQuestionsPerCategory: read('OPENAPI_FLOW_CLARIFY_MAX_QUESTIONS_PER_CATEGORY'),
|
|
15
|
+
maxChoicesPerQuestion: read('OPENAPI_FLOW_CLARIFY_MAX_CHOICES_PER_QUESTION'),
|
|
16
|
+
maxQuestionsPerRound: read('OPENAPI_FLOW_CLARIFY_MAX_QUESTIONS_PER_ROUND'),
|
|
17
|
+
});
|
|
18
|
+
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { WorkflowClarificationOptions, ResolvedWorkflowClarificationOptions } from '../../types/workflow-clarification.js';
|
|
2
|
+
/** Product-approved optional feature defaults, not recovery of required data. */
|
|
3
|
+
export declare function resolveWorkflowClarificationOptions(input?: WorkflowClarificationOptions): ResolvedWorkflowClarificationOptions;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { workflowClarificationOptionsSchema } from '../../schemas/workflow-clarification-settings-schema.js';
|
|
2
|
+
/** Product-approved optional feature defaults, not recovery of required data. */
|
|
3
|
+
export function resolveWorkflowClarificationOptions(input = {}) {
|
|
4
|
+
const options = workflowClarificationOptionsSchema.parse(input);
|
|
5
|
+
return {
|
|
6
|
+
includeExplanations: options.includeExplanations === undefined
|
|
7
|
+
? true
|
|
8
|
+
: options.includeExplanations,
|
|
9
|
+
includeSuggestions: options.includeSuggestions === undefined
|
|
10
|
+
? true
|
|
11
|
+
: options.includeSuggestions,
|
|
12
|
+
};
|
|
13
|
+
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { AdoptWorkflowReviewSuggestionInput, WorkflowReviewSuggestionAdoption } from '../../types/workflow-review-suggestions.js';
|
|
2
|
+
/** The caller must authenticate the human action. This receipt authorizes no implicit graph edit. */
|
|
3
|
+
export declare function adoptWorkflowReviewSuggestion(input: AdoptWorkflowReviewSuggestionInput): WorkflowReviewSuggestionAdoption;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { validateWorkflowReviewSuggestions } from './validate-workflow-review-suggestions.js';
|
|
3
|
+
/** The caller must authenticate the human action. This receipt authorizes no implicit graph edit. */
|
|
4
|
+
export function adoptWorkflowReviewSuggestion(input) {
|
|
5
|
+
validateWorkflowReviewSuggestions(input);
|
|
6
|
+
const messageId = z
|
|
7
|
+
.string()
|
|
8
|
+
.refine((id) => id.trim().length > 0)
|
|
9
|
+
.parse(input.messageId);
|
|
10
|
+
if (input.context.messages.some((message) => message.id === messageId))
|
|
11
|
+
throw new Error(`Review suggestion adoption message id already exists: ${messageId}`);
|
|
12
|
+
const suggestion = input.review.suggestions.find((item) => item.id === input.suggestionId);
|
|
13
|
+
if (!suggestion)
|
|
14
|
+
throw new Error(`Review suggestion adoption references unknown suggestion ${input.suggestionId}`);
|
|
15
|
+
return {
|
|
16
|
+
reviewId: input.review.id,
|
|
17
|
+
suggestionId: suggestion.id,
|
|
18
|
+
boundaryKey: input.review.boundaryKey,
|
|
19
|
+
suggestion: structuredClone(suggestion),
|
|
20
|
+
message: {
|
|
21
|
+
id: messageId,
|
|
22
|
+
text: JSON.stringify({
|
|
23
|
+
kind: 'user-adopted-workflow-review-suggestion',
|
|
24
|
+
reviewId: input.review.id,
|
|
25
|
+
suggestionId: suggestion.id,
|
|
26
|
+
boundaryKey: input.review.boundaryKey,
|
|
27
|
+
intent: suggestion.kind,
|
|
28
|
+
...(suggestion.kind === 'answer-question'
|
|
29
|
+
? { questionIds: suggestion.questionIds }
|
|
30
|
+
: {}),
|
|
31
|
+
adoptedText: suggestion.text,
|
|
32
|
+
}),
|
|
33
|
+
},
|
|
34
|
+
};
|
|
35
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { createHash } from 'node:crypto';
|
|
2
|
+
import { isDeepStrictEqual } from 'node:util';
|
|
3
|
+
import { describeWorkflowReviewSuggestions } from './describe-workflow-review-suggestions.js';
|
|
4
|
+
import { createWorkflowReviewSuggestionsProposalSchema } from '../../schemas/create-workflow-review-suggestions-proposal-schema.js';
|
|
5
|
+
import { workflowReviewSuggestionEvidenceSchema } from '../../schemas/workflow-review-suggestion-evidence-schema.js';
|
|
6
|
+
import { validateDescribedWorkflowPlanningEvidence } from '../../planning/evidence/validate-workflow-planning-evidence.js';
|
|
7
|
+
export function createWorkflowReviewSuggestions(input) {
|
|
8
|
+
const description = describeWorkflowReviewSuggestions(input);
|
|
9
|
+
const proposal = createWorkflowReviewSuggestionsProposalSchema(description, workflowReviewSuggestionEvidenceSchema).parse(input.proposal);
|
|
10
|
+
if (!isDeepStrictEqual(proposal, input.proposal))
|
|
11
|
+
throw new Error('Review suggestions must validate without defaults, coercion or transformation');
|
|
12
|
+
for (const suggestion of proposal.suggestions) {
|
|
13
|
+
const keys = suggestion.sources.map((source) => JSON.stringify(source));
|
|
14
|
+
if (new Set(keys).size !== keys.length)
|
|
15
|
+
throw new Error('Review suggestion evidence must not repeat identical sources');
|
|
16
|
+
for (const source of suggestion.sources) {
|
|
17
|
+
if (source.kind === 'review-question') {
|
|
18
|
+
if (!description.boundary.questions.some((question) => question.id === source.questionId))
|
|
19
|
+
throw new Error(`Review suggestion cites unknown current question ${source.questionId}`);
|
|
20
|
+
}
|
|
21
|
+
else
|
|
22
|
+
validateDescribedWorkflowPlanningEvidence(description.context, [
|
|
23
|
+
source,
|
|
24
|
+
]);
|
|
25
|
+
}
|
|
26
|
+
if (suggestion.kind === 'answer-question' &&
|
|
27
|
+
suggestion.questionIds.some((id) => !suggestion.sources.some((source) => source.kind === 'review-question' && source.questionId === id)))
|
|
28
|
+
throw new Error('An answer suggestion must cite every actual question it proposes to answer');
|
|
29
|
+
}
|
|
30
|
+
const id = 'workflow-review:' +
|
|
31
|
+
createHash('sha256')
|
|
32
|
+
.update(JSON.stringify([description.fingerprint, proposal]))
|
|
33
|
+
.digest('hex');
|
|
34
|
+
return {
|
|
35
|
+
id,
|
|
36
|
+
fingerprint: description.fingerprint,
|
|
37
|
+
boundaryKey: description.boundary.key,
|
|
38
|
+
target: {
|
|
39
|
+
kind: description.boundary.kind,
|
|
40
|
+
revision: description.boundary.revision,
|
|
41
|
+
questions: structuredClone(description.boundary.questions),
|
|
42
|
+
data: structuredClone(description.boundary.data),
|
|
43
|
+
},
|
|
44
|
+
limits: description.limits,
|
|
45
|
+
options: description.options,
|
|
46
|
+
suggestions: proposal.suggestions.map((suggestion, index) => ({
|
|
47
|
+
...suggestion,
|
|
48
|
+
id: `${id}:suggestion:${index + 1}`,
|
|
49
|
+
})),
|
|
50
|
+
};
|
|
51
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { createHash } from 'node:crypto';
|
|
2
|
+
import { workflowReviewBoundarySchema, workflowReviewSuggestionLimitsSchema, workflowReviewSuggestionOptionsSchema, } from '../../schemas/workflow-review-suggestion-settings-schema.js';
|
|
3
|
+
import { describeWorkflowPlanningContext } from '../../planning/evidence/describe-workflow-planning-context.js';
|
|
4
|
+
export function describeWorkflowReviewSuggestions(input) {
|
|
5
|
+
const context = describeWorkflowPlanningContext(input.context);
|
|
6
|
+
const boundary = workflowReviewBoundarySchema.parse(input.boundary);
|
|
7
|
+
const limits = workflowReviewSuggestionLimitsSchema.parse(input.limits);
|
|
8
|
+
const options = workflowReviewSuggestionOptionsSchema.parse(input.options === undefined ? {} : input.options);
|
|
9
|
+
const described = { context, boundary, limits, options };
|
|
10
|
+
return {
|
|
11
|
+
...described,
|
|
12
|
+
fingerprint: createHash('sha256')
|
|
13
|
+
.update(JSON.stringify(described))
|
|
14
|
+
.digest('hex'),
|
|
15
|
+
};
|
|
16
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import type { WorkflowReviewSuggestionEnvironment, WorkflowReviewSuggestionLimits } from '../../types/workflow-review-suggestions.js';
|
|
2
|
+
export declare function readWorkflowReviewSuggestionLimits(environment: WorkflowReviewSuggestionEnvironment): WorkflowReviewSuggestionLimits;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { workflowReviewSuggestionLimitsSchema } from '../../schemas/workflow-review-suggestion-settings-schema.js';
|
|
2
|
+
export function readWorkflowReviewSuggestionLimits(environment) {
|
|
3
|
+
const name = 'OPENAPI_FLOW_REVIEW_MAX_SUGGESTIONS';
|
|
4
|
+
const value = environment[name];
|
|
5
|
+
if (typeof value !== 'string' || !/^[1-9]\d*$/.test(value))
|
|
6
|
+
throw new Error(`${name} must explicitly provide a positive integer`);
|
|
7
|
+
return workflowReviewSuggestionLimitsSchema.parse({
|
|
8
|
+
maxSuggestions: Number(value),
|
|
9
|
+
});
|
|
10
|
+
}
|