@kern0x1b/penstock-cli 26.11.0 → 26.11.2
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/THIRD-PARTY-NOTICES.md +16 -16
- package/dist/chunk-account-BaYNvO18.js +1 -0
- package/dist/{chunk-agentLaunch-D21uPuMr.js → chunk-agentLaunch-BnrpVME4.js} +1 -1
- package/dist/chunk-agentServe-BeOh1rjE.js +10 -0
- package/dist/chunk-agents-CZJoU2u2.js +1 -0
- package/dist/chunk-agentsMigrate-DnrqoXNz.js +2 -0
- package/dist/{chunk-analyze-BG-rlggA.js → chunk-analyze-ClE2LBCj.js} +1 -1
- package/dist/chunk-analyze-DgQqzEgb.js +1 -0
- package/dist/{chunk-analyzeFlow-2cYPgjh-.js → chunk-analyzeFlow-F2ZFmJhv.js} +1 -1
- package/dist/chunk-apiTemplates-Cl_z63FA.js +1 -0
- package/dist/{chunk-bot-DlhStBoG.js → chunk-bot-C2k8yaXA.js} +5 -5
- package/dist/chunk-cmmnFindings-DKpYqUZN.js +1 -0
- package/dist/{chunk-codeFactSet-LxSnQy8K.js → chunk-codeFactSet-DiAYqvbb.js} +1 -1
- package/dist/{chunk-codeIndex-N1gnP_sW.js → chunk-codeIndex-vStNh6Bm.js} +1 -1
- package/dist/chunk-codeLinks-BVpn4_Sr.js +1 -0
- package/dist/chunk-codeLinks-BrGduhsm.js +1 -0
- package/dist/chunk-command-8s6m3ZUw.js +5 -0
- package/dist/chunk-command-aMxPQdiV.js +1 -0
- package/dist/chunk-command-vH1_y5F0.js +1 -0
- package/dist/chunk-commands-B8YVT41b.js +5 -0
- package/dist/{chunk-commands-DcjlDt7B.js → chunk-commands-CJCSznbv.js} +1 -1
- package/dist/chunk-compose-BUJTvoFX.js +4 -0
- package/dist/chunk-connections-Drr67X9U.js +1 -0
- package/dist/chunk-connectors-DcMqy0u8.js +1 -0
- package/dist/chunk-convert-Ce1MZmsE.js +3 -0
- package/dist/chunk-convert-FkMnlxyi.js +1 -0
- package/dist/chunk-deploy-BHg8pB9x.js +1 -0
- package/dist/chunk-deploy-DZgCTgaY.js +6 -0
- package/dist/{chunk-diagrams-BukAOL0g.js → chunk-diagrams-CtGMGTa8.js} +1 -1
- package/dist/chunk-diff-9hjavV6V.js +1 -0
- package/dist/chunk-diff-Dp3fUALc.js +1 -0
- package/dist/chunk-dispatch-o-eqJb9Y.js +7 -0
- package/dist/chunk-dmnTests-BOxutoRs.js +1 -0
- package/dist/{chunk-dmnTests-ChwX1YVo.js → chunk-dmnTests-BzNA-u2k.js} +1 -1
- package/dist/{chunk-docs-D7yEDpa4.js → chunk-docs-B3C3pZpY.js} +17 -17
- package/dist/chunk-doctor-CRxbsAm7.js +1 -0
- package/dist/{chunk-editPreview-CC2vwhIW.js → chunk-editPreview-DCUnMkTU.js} +1 -1
- package/dist/chunk-evidence-ny_2ltVe.js +23 -0
- package/dist/{chunk-examples-0HkF-frb.js → chunk-examples-BG0lGXcZ.js} +9 -9
- package/dist/chunk-export-Blwjf23H.js +1 -0
- package/dist/chunk-export-kt3sBTZu.js +20 -0
- package/dist/{chunk-facts-DSVaURw5.js → chunk-facts-Dl5lLriU.js} +1 -1
- package/dist/chunk-failure-BRyRvObj.js +1 -0
- package/dist/{chunk-file-BswMa3FN.js → chunk-file-1YhfNmPn.js} +1 -1
- package/dist/chunk-import-Dh3az4BC.js +6 -0
- package/dist/chunk-importCommand-Dhikkmo0.js +1 -0
- package/dist/chunk-incident-LJe2-ohi.js +1 -0
- package/dist/chunk-init-D34Q4YA8.js +227 -0
- package/dist/chunk-lint-CnEhoYRB.js +1 -0
- package/dist/{chunk-lsp-7vA_mIt1.js → chunk-lsp-BzeJkpmf.js} +1 -1
- package/dist/chunk-main-BZF-ErAx.js +1 -0
- package/dist/chunk-mcp-B_B9bet5.js +95 -0
- package/dist/{chunk-mcpLaunch-LyfmIF_Z.js → chunk-mcpLaunch-BS709697.js} +1 -1
- package/dist/chunk-migrate-DVfXC-iJ.js +1 -0
- package/dist/chunk-migrate-DwWg0k5_.js +16 -0
- package/dist/{chunk-migrateApply-CzOkgKhB.js → chunk-migrateApply-e8O9oZXP.js} +3 -3
- package/dist/chunk-migrateVerify-oIBf-PM3.js +1 -0
- package/dist/{chunk-model-f8AzYUK7.js → chunk-model-BulEKnY1.js} +2 -2
- package/dist/{chunk-parse-B-uKGDy-.js → chunk-parse-DiOcpdOU.js} +1 -1
- package/dist/{chunk-penstockCli-CKMvaZ0O.js → chunk-penstockCli-C41P_G7i.js} +1 -1
- package/dist/chunk-policy-BVb7c7G_.js +1 -0
- package/dist/chunk-policyGate-BOgKsqLq.js +2 -0
- package/dist/chunk-pr-1jKcTNnP.js +1 -0
- package/dist/{chunk-project-DBYOlYRi.js → chunk-project-COaBZhMt.js} +1 -1
- package/dist/chunk-project-lO_6DX8G.js +1 -0
- package/dist/chunk-promotion-CTMPjXjZ.js +2 -0
- package/dist/chunk-promotion-DDLrgBqZ.js +1 -0
- package/dist/{chunk-promotion-DchO6xoC.js → chunk-promotion-NeRj4uTP.js} +1 -1
- package/dist/chunk-receipt-C4NqnSkH.js +1 -0
- package/dist/chunk-receiptDeps-B7MehyHT.js +1 -0
- package/dist/chunk-receiptGate-BZCKCMTV.js +1 -0
- package/dist/chunk-receiptGate-DRcw327y.js +1 -0
- package/dist/{chunk-receiptSnapshot-B6ruXw8z.js → chunk-receiptSnapshot-CHSk3_4N.js} +1 -1
- package/dist/{chunk-receiptStore-Cy-L0H1u.js → chunk-receiptStore-DhROtI2h.js} +1 -1
- package/dist/chunk-refactor-CO3qyIEv.js +17 -0
- package/dist/chunk-refactor-CWeCOl7w.js +1 -0
- package/dist/{chunk-render-Ci5d6mg4.js → chunk-render-DZd5hScS.js} +1 -1
- package/dist/chunk-report-w7YZwhyg.js +1 -0
- package/dist/chunk-review-DYMgFDSy.js +1 -0
- package/dist/chunk-say-CP1IyOSv.js +1 -0
- package/dist/{chunk-security-VgKwtohm.js → chunk-security-pgip-kdY.js} +2 -2
- package/dist/chunk-serve-CKt2rO05.js +10 -0
- package/dist/{chunk-share-CBV2FuKq.js → chunk-share-rsL0itIM.js} +18 -18
- package/dist/chunk-stages-B2sBBxUc.js +3 -0
- package/dist/chunk-systemError-O3vQ8hLb.js +1 -0
- package/dist/chunk-systemError-n2E6isvg.js +1 -0
- package/dist/chunk-taskTest-DWoME1mY.js +2 -0
- package/dist/chunk-taskTest-JErgWO6t.js +1 -0
- package/dist/{chunk-templateDiagnostics-BwH7RNkz.js → chunk-templateDiagnostics-6txfKwas.js} +2 -2
- package/dist/chunk-templates-Y3xfCO_3.js +1 -0
- package/dist/chunk-testCases-BwimUfDC.js +4 -0
- package/dist/chunk-testCases-DO2Rkyvd.js +1 -0
- package/dist/chunk-tests-Cy325OGw.js +1 -0
- package/dist/chunk-tests-DNkORsqB.js +23 -0
- package/dist/{chunk-trust-DXcsUJaK.js → chunk-trust-DSX-k3by.js} +1 -1
- package/dist/{chunk-trust-DubjEjlN.js → chunk-trust-Di4EYPah.js} +1 -1
- package/dist/{chunk-variableChecks-KnECGMR3.js → chunk-variableChecks-CBDpmI4d.js} +1 -1
- package/dist/{chunk-workerVariables-CajAcbwl.js → chunk-workerVariables-CNnCRijJ.js} +1 -1
- package/dist/{chunk-workerVariables-DIDoUpHF.js → chunk-workerVariables-CulLc3YH.js} +1 -1
- package/dist/chunk-wrapper-CGYED7G2.js +1 -0
- package/dist/chunk-wrapper-CK7Xtes6.js +3 -0
- package/dist/grammars/web-tree-sitter.wasm +0 -0
- package/dist/penstock.js +1 -1
- package/dist/web/assets/{AgentSettings-Cn5Vcph3.js → AgentSettings-D24jOuht.js} +1 -1
- package/dist/web/assets/{AgentsDialog-C6WqzlxZ.js → AgentsDialog-BMWv3Gyk.js} +1 -1
- package/dist/web/assets/{AgentsDialog-dpbwVSxk.js → AgentsDialog-DbY2O6O5.js} +1 -1
- package/dist/web/assets/{AgentsTab-C34OhVkw.js → AgentsTab-D6LbK6sG.js} +2 -2
- package/dist/web/assets/{BpmnCanvas-yur9daZa.js → BpmnCanvas-BcQRQ2Br.js} +27 -27
- package/dist/web/assets/BpmnDocument-Ce5F4K1e.js +27 -0
- package/dist/web/assets/CmmnDocument-C_UlPowC.js +17 -0
- package/dist/web/assets/{ConflictDialog-Bb5kduaR.js → ConflictDialog-DfFp8F7n.js} +1 -1
- package/dist/web/assets/{ConnectionsDialog-qtF7yDFw.js → ConnectionsDialog-BaYtHD5h.js} +1 -1
- package/dist/web/assets/{DiffDocument-LHOif5Ac.js → DiffDocument-BOPdBEN3.js} +1 -1
- package/dist/web/assets/{DmnDocument-0f5uS67x.css → DmnDocument-DZ9u2uk2.css} +1 -1
- package/dist/web/assets/DmnDocument-vtnARy7Q.js +41 -0
- package/dist/web/assets/{DriftDialog-Chl6BX6k.js → DriftDialog-dIbCbSK2.js} +1 -1
- package/dist/web/assets/FormDocument-B0q8DF9v.css +1 -0
- package/dist/web/assets/FormDocument-DHBUBUzO.js +32 -0
- package/dist/web/assets/FormStepView-CbHb32_8.js +1 -0
- package/dist/web/assets/{GraphAwareLayoutService-wsos3yPD.js → GraphAwareLayoutService-C5N8K9dm.js} +1 -1
- package/dist/web/assets/{MigrationDialog-CBJU7Oe3.js → MigrationDialog-DA3Vrzgw.js} +1 -1
- package/dist/web/assets/{NewFileDialog-B7075LWG.js → NewFileDialog-Dev41oA1.js} +1 -1
- package/dist/web/assets/PolicyDialog-qR19Csji.js +1 -0
- package/dist/web/assets/{QuickOpen-DJQrI7Od.js → QuickOpen-ps-rMjiS.js} +1 -1
- package/dist/web/assets/ScriptPane-BQLMNYzc.js +2 -0
- package/dist/web/assets/{ScriptRunDialog-BwE4cXnp.js → ScriptRunDialog-YivjHB6j.js} +1 -1
- package/dist/web/assets/{SettingsDialog-c307wPsg.js → SettingsDialog-DI0vZ6Ay.js} +1 -1
- package/dist/web/assets/ShortcutsDialog-DLXnv4Vm.js +1 -0
- package/dist/web/assets/SourceDocument-Cj8cGsoS.js +1 -0
- package/dist/web/assets/TemplateDocument-BRyFsofH.js +7 -0
- package/dist/web/assets/TextDocument-DB2hEuMA.js +1 -0
- package/dist/web/assets/{UnreadableFileLayer-CUP_30X8.js → UnreadableFileLayer-CRW3MM7w.js} +1 -1
- package/dist/web/assets/{UploadDialog-CaVBOxUL.js → UploadDialog-D-X6GG98.js} +1 -1
- package/dist/web/assets/Viewer-BcpDlvg_.js +4 -0
- package/dist/web/assets/apply-Nsj6ek02.js +1 -0
- package/dist/web/assets/{bpmnTheme-CZ7xp4R5.js → bpmnTheme-pKgl9Mrn.js} +2 -2
- package/dist/web/assets/{data-ZauKnQ2Z.js → data-CdiToGOq.js} +2 -2
- package/dist/web/assets/{data-Da5Nxzev.js → data-wU6sw6RY.js} +1 -1
- package/dist/web/assets/{dialog-DSLu1Bbo.js → dialog-BDJ5dDiU.js} +1 -1
- package/dist/web/assets/{diff-C4hitkRR.js → diff-BhYqTg4l.js} +1 -1
- package/dist/web/assets/dist-27z6Phtg.js +23 -0
- package/dist/web/assets/{dist-CofBTWz1.js → dist-B7TL-7R3.js} +4 -4
- package/dist/web/assets/dist-BEpeEbIu.js +1 -0
- package/dist/web/assets/{dist-CYCbBoYQ.js → dist-BTf7NfeQ.js} +1 -1
- package/dist/web/assets/{dist-CJKVV2_S.js → dist-BqGv7f4M.js} +10 -10
- package/dist/web/assets/dist-C-q1IWjr.js +6 -0
- package/dist/web/assets/{dist-Blylfrak.js → dist-CJx_2eBF.js} +2 -2
- package/dist/web/assets/dist-COUY_jv5.js +1 -0
- package/dist/web/assets/{dist-DpDu6Wz_.js → dist-CWjAtsKe.js} +1 -1
- package/dist/web/assets/{dist-gb3IfUZi.js → dist-Cv8_A_95.js} +2 -2
- package/dist/web/assets/dist-DDE6BjgI.js +5 -0
- package/dist/web/assets/{dist-7VC_hKpw.js → dist-DDNYYQtV.js} +1 -1
- package/dist/web/assets/dist-DW-S9iZN.js +1 -0
- package/dist/web/assets/dist-OnU5n5o1.js +1 -0
- package/dist/web/assets/dmn-Cgoh6wXm.js +3 -0
- package/dist/web/assets/{documentBridge-1Eg7H9yI.js → documentBridge-CHw4XsZH.js} +3 -3
- package/dist/web/assets/{documents-LG-7CTrn.js → documents-CEtohzAC.js} +1 -1
- package/dist/web/assets/duplicate-D_ic-m62.js +342 -0
- package/dist/web/assets/{engines-DhO6OW1S.js → engines-lyEvb0pH.js} +1 -1
- package/dist/web/assets/{executable-BTarDLry.js → executable--4381_Lf.js} +1 -1
- package/dist/web/assets/{file-CIeVSOHy.js → file-BbVBUuIH.js} +1 -1
- package/dist/web/assets/formChecks-CSClH9sH.js +1 -0
- package/dist/web/assets/frontend-uXAWaalt.js +1 -0
- package/dist/web/assets/{httpHost-DBSjdVth.js → httpHost-C973OTRe.js} +1 -1
- package/dist/web/assets/{index.es-pigASDxC.js → index.es-CMvq8Bhe.js} +3 -3
- package/dist/web/assets/index.es-GbdJvMnO.js +78 -0
- package/dist/web/assets/{index.esm-CTLpq4ik.js → index.esm-Ba6q0zSu.js} +1 -1
- package/dist/web/assets/{intelligence-_1C71hkQ.js → intelligence-DNqJNmdB.js} +3 -3
- package/dist/web/assets/{jspdf.es.min-PgZzOmkT.js → jspdf.es.min-C0L4zezU.js} +6 -6
- package/dist/web/assets/{kind-X3_nabTt.js → kind-DDHnk6dW.js} +1 -1
- package/dist/web/assets/{lib-BmLAen_d.js → lib-DrkEMJ65.js} +1 -1
- package/dist/web/assets/{list-DovB9lWV.js → list-TmXvCwja.js} +1 -1
- package/dist/web/assets/{migrationHost-BcguK4K5.js → migrationHost-DCWBb3L6.js} +1 -1
- package/dist/web/assets/moddle-f0Q4Guwd.js +1 -0
- package/dist/web/assets/{model--Bj28IOj.js → model-afHgSxJs.js} +1 -1
- package/dist/web/assets/{nudges-UF9_cBuO.js → nudges-DPG3WpyV.js} +1 -1
- package/dist/web/assets/{open-C9Kt9JLw.js → open-Vkx72dYx.js} +1 -1
- package/dist/web/assets/platform-G53Cenyw.js +2 -0
- package/dist/web/assets/{preload-helper-VRuDKI9K.js → preload-helper-DExCAR_V.js} +1 -1
- package/dist/web/assets/{run-BZgz1U9U.js → run-BMfRBe5O.js} +1 -1
- package/dist/web/assets/samples-BL3jA_Vd.js +1 -0
- package/dist/web/assets/{say-WvEHqIbO.js → say-BkdZMivA.js} +1 -1
- package/dist/web/assets/{say-ChFGKK2E.js → say-C7KqKcFr.js} +1 -1
- package/dist/web/assets/{sections-N6WYk7b8.js → sections-LJKSRDTS.js} +1 -1
- package/dist/web/assets/sharedReader-BsXfiBT8.js +1 -0
- package/dist/web/assets/{source-frame-DcptKpVq.js → source-frame-DC4W0A5-.js} +2 -2
- package/dist/web/assets/{syntax-DW10Wzg4.js → syntax-00Hk6Xv7.js} +4 -4
- package/dist/web/assets/{template-CMl68jPp.js → template-BQP7ZXdK.js} +1 -1
- package/dist/web/assets/testCaseRuns-liAhWMg7.js +1 -0
- package/dist/web/assets/{trace-DLziNpe2.js → trace-DXQU2N_l.js} +1 -1
- package/dist/web/assets/{translator-DLDFsUlE.js → translator-BLCeE6UY.js} +1 -1
- package/dist/web/assets/ui-BLtm3Y1J.js +1 -0
- package/dist/web/assets/{useTrace-UYBskc2k.js → useTrace-dZdQ805W.js} +1 -1
- package/dist/web/assets/web-C4k0NLZ9.js +982 -0
- package/dist/web/assets/web-CnDpD6qy.css +1 -0
- package/dist/web/assets/{workerVariables-DURgyUbG.js → workerVariables-O6VqwDzr.js} +1 -1
- package/dist/web/assets/xml-DIWt4von.js +1 -0
- package/dist/web/index.html +39 -40
- package/package.json +5 -5
- package/dist/chunk-account-CpZu-RTg.js +0 -1
- package/dist/chunk-agentServe-BYRtgGGD.js +0 -10
- package/dist/chunk-agents-B9oxdPTA.js +0 -1
- package/dist/chunk-agentsMigrate-BV8TeRXq.js +0 -2
- package/dist/chunk-analyze-pgzR-Cx-.js +0 -1
- package/dist/chunk-apiTemplates-cU7C8vap.js +0 -1
- package/dist/chunk-cmmnFindings-S2TGSnEp.js +0 -1
- package/dist/chunk-codeLinks-C8N6e8k3.js +0 -1
- package/dist/chunk-codeLinks-o0a8tBGk.js +0 -1
- package/dist/chunk-command-Bqlbgo-2.js +0 -1
- package/dist/chunk-command-DT84ioJb.js +0 -5
- package/dist/chunk-command-DrGP2kg8.js +0 -1
- package/dist/chunk-commands-B4PoZbpX.js +0 -5
- package/dist/chunk-compose-CWKKVtN5.js +0 -4
- package/dist/chunk-connections-DQpKbIGD.js +0 -1
- package/dist/chunk-connectors-PtAvE91B.js +0 -1
- package/dist/chunk-convert-CpgtOlZk.js +0 -1
- package/dist/chunk-convert-HbFpg8ab.js +0 -3
- package/dist/chunk-deploy-l4MdFfn8.js +0 -6
- package/dist/chunk-deploy-qRaaKGZb.js +0 -1
- package/dist/chunk-diff-BhTFlCE3.js +0 -1
- package/dist/chunk-diff-kBF83vzM.js +0 -1
- package/dist/chunk-dispatch-BnO-QhMh.js +0 -7
- package/dist/chunk-dmnTests-0x_yUH6S.js +0 -1
- package/dist/chunk-doctor-BuHK1dTm.js +0 -1
- package/dist/chunk-evidence-oLw_C6j8.js +0 -23
- package/dist/chunk-export-cIFHDXug.js +0 -1
- package/dist/chunk-export-jBVxtmCH.js +0 -20
- package/dist/chunk-failure-D5brrYW2.js +0 -1
- package/dist/chunk-import-BBOe-5RZ.js +0 -6
- package/dist/chunk-importCommand-DRjYoljA.js +0 -1
- package/dist/chunk-incident-BK1h37CD.js +0 -1
- package/dist/chunk-init-_OALJuKm.js +0 -227
- package/dist/chunk-lint-7KJFxyCN.js +0 -1
- package/dist/chunk-main-Cw2JXCil.js +0 -1
- package/dist/chunk-mcp-K63bhqnF.js +0 -95
- package/dist/chunk-migrate-BMwBV5sc.js +0 -16
- package/dist/chunk-migrate-CxfVmKt0.js +0 -1
- package/dist/chunk-migrateVerify-DSEXSpfR.js +0 -1
- package/dist/chunk-policy-BX0Ftdws.js +0 -1
- package/dist/chunk-policyGate-dmcufnwB.js +0 -2
- package/dist/chunk-pr-ByrGcfam.js +0 -1
- package/dist/chunk-project-DA3KnAZH.js +0 -1
- package/dist/chunk-promotion-Boedyq43.js +0 -1
- package/dist/chunk-promotion-D8Ti-vxp.js +0 -2
- package/dist/chunk-receipt-CusJaqNn.js +0 -1
- package/dist/chunk-receiptDeps-oVbX156d.js +0 -1
- package/dist/chunk-receiptGate-DrGChj7i.js +0 -1
- package/dist/chunk-receiptGate-xldHKMyJ.js +0 -1
- package/dist/chunk-refactor-B1W_MGTp.js +0 -1
- package/dist/chunk-refactor-BJXxEtVs.js +0 -17
- package/dist/chunk-report-D9pM09Nu.js +0 -1
- package/dist/chunk-review-UcqS5AAi.js +0 -1
- package/dist/chunk-say-CYb4HeJD.js +0 -1
- package/dist/chunk-serve-Dmqen1yd.js +0 -10
- package/dist/chunk-stages-BTQJrAMF.js +0 -3
- package/dist/chunk-systemError-BYrMzp2o.js +0 -1
- package/dist/chunk-systemError-CXvnhNPK.js +0 -1
- package/dist/chunk-taskTest-9gMsx0zu.js +0 -2
- package/dist/chunk-taskTest-BjXYpG5p.js +0 -1
- package/dist/chunk-templates-D3ouIwHD.js +0 -1
- package/dist/chunk-testCases-9jwT_Y7z.js +0 -4
- package/dist/chunk-testCases-BcpBPg9L.js +0 -1
- package/dist/chunk-tests-CEEXnWOp.js +0 -23
- package/dist/chunk-tests-CRVosdWp.js +0 -1
- package/dist/chunk-wrapper-B2WnOIoB.js +0 -3
- package/dist/chunk-wrapper-DiKCKZti.js +0 -1
- package/dist/web/assets/BpmnDocument-C247Rqim.js +0 -27
- package/dist/web/assets/CmmnDocument-Dj48bsUd.js +0 -17
- package/dist/web/assets/DmnDocument-Cb9Zi9fS.js +0 -41
- package/dist/web/assets/FormDocument-DoZaxWd-.js +0 -32
- package/dist/web/assets/FormDocument-URLcKn84.css +0 -1
- package/dist/web/assets/FormStepView-D8MFcpeI.js +0 -1
- package/dist/web/assets/PolicyDialog-CGdglmDn.js +0 -1
- package/dist/web/assets/ScriptPane-T6M5f6fc.js +0 -2
- package/dist/web/assets/ShortcutsDialog-BAoL9EHu.js +0 -1
- package/dist/web/assets/SourceDocument-C9KIzBA5.js +0 -1
- package/dist/web/assets/TemplateDocument-CNt2turg.js +0 -7
- package/dist/web/assets/TextDocument-CtkHoEqN.js +0 -1
- package/dist/web/assets/Viewer-DZske1C5.js +0 -4
- package/dist/web/assets/apply-nnKP9HIM.js +0 -1
- package/dist/web/assets/dist--PmHUHDp.js +0 -1
- package/dist/web/assets/dist-BoPrKCf2.js +0 -5
- package/dist/web/assets/dist-C1m02xAO.js +0 -1
- package/dist/web/assets/dist-CLqJMzT-.js +0 -1
- package/dist/web/assets/dist-D3jqq0XS.js +0 -1
- package/dist/web/assets/dist-DA-9F0U9.js +0 -1
- package/dist/web/assets/dist-DojzF5q2.js +0 -6
- package/dist/web/assets/dist-yvjzrXXf.js +0 -23
- package/dist/web/assets/dmn-DwdcYXGr.js +0 -3
- package/dist/web/assets/duplicate-D-ilQqKz.js +0 -342
- package/dist/web/assets/formChecks-CGox1z7R.js +0 -1
- package/dist/web/assets/frontend-Qq5hBH0U.js +0 -1
- package/dist/web/assets/index.es-CcNNw3VB.js +0 -78
- package/dist/web/assets/moddle-DJxj0oEU.js +0 -1
- package/dist/web/assets/platform-BLPhsye9.js +0 -2
- package/dist/web/assets/samples-oeXBsJ9Y.js +0 -1
- package/dist/web/assets/sharedReader-Bopy7Uk9.js +0 -1
- package/dist/web/assets/testCaseRuns-B_XdqGFh.js +0 -1
- package/dist/web/assets/ui-BTKMbWYG.js +0 -1
- package/dist/web/assets/web-FzNBw1kZ.css +0 -1
- package/dist/web/assets/web-jPMZVwbQ.js +0 -982
- package/dist/web/assets/xml-DTgZ-B-l.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{i as e}from"./rolldown-runtime-B8BYMn-z.js";import{r as t}from"./moddle-
|
|
1
|
+
import{i as e}from"./rolldown-runtime-B8BYMn-z.js";import{r as t}from"./moddle-f0Q4Guwd.js";import{n}from"./dmn-Cgoh6wXm.js";import{t as r}from"./steps-BB_6M1MU.js";var i=/(?<![\w.$#])([A-Za-z_]\w*)/g,a=/[$#]\{([\s\S]*?)}/g,o=/"(?:\\.|[^"\\])*"/g,s=/'(?:\\.|[^'\\])*'/g,c=/^\.\s*\w+\s*\(/,l=/\b(?:for|some|every)\s+([A-Za-z_]\w*)\s+in\b/g,u=new Set([`true`,`false`,`null`,`and`,`or`,`not`,`if`,`then`,`else`,`for`,`in`,`return`,`some`,`every`,`satisfies`,`instance`,`of`,`between`,`function`,`external`,`item`]),d=new Set([`true`,`false`,`null`,`empty`,`not`,`and`,`or`,`eq`,`ne`,`lt`,`gt`,`le`,`ge`,`div`,`mod`,`instanceof`,`execution`,`task`,`variableScope`,`authenticatedUserId`]);function identifiers(e,t,n){let r=new Set;for(let a of e.matchAll(i)){let i=a[1],o=e.slice((a.index??0)+i.length).trimStart();t.has(i)||o.startsWith(`(`)||!n&&o.startsWith(`:`)&&!o.startsWith(`::`)||n&&c.test(o)||r.add(i)}return r}function feel(e){let t=e?.trim().replace(/^=/,``);if(!t)return new Set;let n=t.replace(o,`""`),r=new Set([...n.matchAll(l)].map(e=>e[1]));return new Set([...identifiers(n,u,!1)].filter(e=>!r.has(e)))}function feelIfExpression(e){return e?.trimStart().startsWith(`=`)?feel(e):new Set}function juel(e){if(!e?.trim())return new Set;let t=new Set;for(let n of e.matchAll(a))identifiers(n[1].replace(o,`""`).replace(s,`''`),d,!0).forEach(e=>t.add(e));return t}function anyExpression(e){return new Set([...feelIfExpression(e),...juel(e)])}var f=/(?<![\w.$#\]])([A-Za-z_]\w*)/g,p=/^\s*(\[[^[\]]*\]|\.\s*([A-Za-z_]\w*))/,m=/^\s*\(/;function chainsIn(e,t,n){let r=e.replace(o,`""`).replace(s,`''`),i=[];for(let e of r.matchAll(f)){let a=e[1];if(t.has(a)||n.has(a))continue;let o=(e.index??0)+a.length,s=a,c=0;for(let e=p.exec(r.slice(o));e&&!(e[2]!==void 0&&m.test(r.slice(o+e[0].length)));e=p.exec(r.slice(o)))s+=e[2]===void 0?e[1].replace(/\s+/g,``):`.${e[2]}`,o+=e[0].length,c+=1;c>0&&!m.test(r.slice(o))&&i.push(s)}return i}function juelPaths(e){return e?[...e.matchAll(a)].flatMap(e=>chainsIn(e[1],d,new Set)):[]}function feelPaths(e){let t=e?.trim().replace(/^=/,``)??``;return t?chainsIn(t,u,new Set([...t.replace(o,`""`).matchAll(l)].map(e=>e[1]))):[]}function pathsOf(e){let t=e?.trim()??``;return/[$#]\{/.test(t)?juelPaths(t):t.startsWith(`=`)?feelPaths(t):[]}function chainOf(e){let t=/^[A-Za-z_]\w*/.exec(e)?.[0]??``,n=[];for(let r of e.slice(t.length).matchAll(/\[[^\]]*\]|\.([A-Za-z_]\w*)/g))n.push(r[1]===void 0?{kind:`index`}:{kind:`field`,name:r[1]});return{root:t,steps:n}}function escapeRegExp(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}var h=new Map([[`string`,`String`],[`boolean`,`Boolean`],[`integer`,`Integer`],[`long`,`Long`],[`double`,`Double`],[`float`,`Float`]]);function typed(e){let t=h.get(e);if(t===void 0)throw Error(`no Java type is named for ${e}`);return t}var g=2147483647,_=-2147483648,v=`9223372036854775807`,y=`9223372036854775808`,b=/\b(?:execution|task)\s*\.\s*setVariable\s*\(\s*(["'])/g,x=/^[^"'\\\r\n]+$/,S=/^[A-Za-z_$][\w$]*$/,C=/^\s*,\s*/,w=/^(?:'(?:[^'\\\r\n]|\\.)*'|"(?:[^"\\\r\n]|\\.)*")/,T=/^(?:true|false)(?![\w$])/,E=/^(-?)(\d+)(\.\d+)?([dDfFlL])?(?![\w$.])/,D=/^new\s+((?:[a-z]\w*\.)*[A-Z]\w*(?:\.[A-Z]\w*)*)\s*(?:<[^()\n]*>)?\s*\(/,O=/^(-?\d+(?:\.\d+)?)(?![\w$.])/,k={"\\":`\\`,"'":`'`,'"':`"`,$:`$`,n:`
|
|
2
2
|
`,r:`\r`,t:` `},A=/^\s*[),;\n]|^\s*$/,j=[`return`,`throw`,`new`,`else`,`case`,`in`,`is`,`as`,`instanceof`,`assert`,`yield`];function scriptLanguageOf(e){let t=e?.trim().toLowerCase();return t===`groovy`?`groovy`:t===`javascript`||t===`js`||t===`ecmascript`?`javascript`:null}function skeletonOf(e){let t=``,n=null;for(let r=0;r<e.length;r+=1){let i=e[r];if(n)i===`\\`&&r+1<e.length?(t+=e[r+1]===`
|
|
3
3
|
`?`
|
|
4
4
|
`:` `,r+=1):i===n||i===`
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./rolldown-runtime-B8BYMn-z.js";import{t as e}from"./dist-BT_v6mN5.js";import{i as t}from"./translator-BLCeE6UY.js";var XmlError=class extends Error{},n=`http://www.w3.org/XML/1998/namespace`;function split(e){let t=e.indexOf(`:`);return t<0?{prefix:``,local:e}:{prefix:e.slice(0,t),local:e.slice(t+1)}}function parseXml(r){let i=new e,a=[],o=null,s=null;i.on(`openTag`,(e,t,r)=>{let i={},s=t();for(let[e,t]of Object.entries(s))i[e]=r(t);let c=new Map(a.length>0?a[a.length-1].scope:[[`xml`,n]]);for(let[e,t]of Object.entries(i))e===`xmlns`?c.set(``,t):e.startsWith(`xmlns:`)&&c.set(e.slice(6),t);let{prefix:l,local:u}=split(e),d={name:e,local:u,prefix:l,ns:c.get(l)??``,attrs:i,children:[],text:``,scope:c};a.length>0?a[a.length-1].node.children.push(d):o||=d,a.push({node:d,scope:c})}),i.on(`closeTag`,()=>{a.pop()}),i.on(`text`,(e,t)=>{a.length>0&&(a[a.length-1].node.text+=t(e))}),i.on(`cdata`,e=>{a.length>0&&(a[a.length-1].node.text+=e)}),i.on(`error`,e=>{s??=e.message});try{i.parse(r)}catch(e){s??=e instanceof Error?e.message:String(e)}if(s)throw new XmlError(t(`app.xml.notWellFormed`,{reason:s}));if(!o||a.length>0)throw new XmlError(t(`app.xml.emptyOrNotClosed`));return o}function childrenOf(e,t){return e.children.filter(e=>e.local===t)}function findAll(e,t){let n=[],r=[...e.children].reverse();for(let e=r.pop();e;e=r.pop()){e.local===t&&n.push(e);for(let t=e.children.length-1;t>=0;--t)r.push(e.children[t])}return n}function escapeText(e){return e.replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`)}function escapeXml(e){return escapeText(e).replace(/"/g,`"`)}function serializeXml(e){let t=[],n=[e];for(let e=n.pop();e!==void 0;e=n.pop()){if(typeof e==`string`){t.push(e);continue}let r=Object.entries(e.attrs).map(([e,t])=>` ${e}="${escapeXml(t)}"`).join(``);if(e.children.length===0&&e.text.trim()===``)t.push(`<${e.name}${r}/>`);else if(t.push(`<${e.name}${r}>`),n.push(`</${e.name}>`),e.children.length>0)for(let t=e.children.length-1;t>=0;--t)n.push(e.children[t]);else t.push(escapeXml(e.text))}return t.join(``)}export{findAll as a,escapeXml as i,childrenOf as n,parseXml as o,escapeText as r,serializeXml as s,XmlError as t};
|
package/dist/web/index.html
CHANGED
|
@@ -10,68 +10,67 @@
|
|
|
10
10
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
11
11
|
<meta name="color-scheme" content="light dark">
|
|
12
12
|
<title>Penstock</title>
|
|
13
|
-
<script type="module" crossorigin src="./assets/web-
|
|
13
|
+
<script type="module" crossorigin src="./assets/web-C4k0NLZ9.js"></script>
|
|
14
14
|
<link rel="modulepreload" crossorigin href="./assets/rolldown-runtime-B8BYMn-z.js">
|
|
15
15
|
<link rel="modulepreload" crossorigin href="./assets/vendor-NJP34MHU.js">
|
|
16
|
-
<link rel="modulepreload" crossorigin href="./assets/preload-helper-
|
|
17
|
-
<link rel="modulepreload" crossorigin href="./assets/translator-
|
|
18
|
-
<link rel="modulepreload" crossorigin href="./assets/frontend-
|
|
19
|
-
<link rel="modulepreload" crossorigin href="./assets/dialog-
|
|
16
|
+
<link rel="modulepreload" crossorigin href="./assets/preload-helper-DExCAR_V.js">
|
|
17
|
+
<link rel="modulepreload" crossorigin href="./assets/translator-BLCeE6UY.js">
|
|
18
|
+
<link rel="modulepreload" crossorigin href="./assets/frontend-uXAWaalt.js">
|
|
19
|
+
<link rel="modulepreload" crossorigin href="./assets/dialog-BDJ5dDiU.js">
|
|
20
20
|
<link rel="modulepreload" crossorigin href="./assets/dist-BT_v6mN5.js">
|
|
21
|
-
<link rel="modulepreload" crossorigin href="./assets/xml-
|
|
22
|
-
<link rel="modulepreload" crossorigin href="./assets/httpHost-
|
|
21
|
+
<link rel="modulepreload" crossorigin href="./assets/xml-DIWt4von.js">
|
|
22
|
+
<link rel="modulepreload" crossorigin href="./assets/httpHost-C973OTRe.js">
|
|
23
23
|
<link rel="modulepreload" crossorigin href="./assets/bridgeInstance-qzSInqLW.js">
|
|
24
|
-
<link rel="modulepreload" crossorigin href="./assets/platform-
|
|
25
|
-
<link rel="modulepreload" crossorigin href="./assets/trace-
|
|
24
|
+
<link rel="modulepreload" crossorigin href="./assets/platform-G53Cenyw.js">
|
|
25
|
+
<link rel="modulepreload" crossorigin href="./assets/trace-DXQU2N_l.js">
|
|
26
26
|
<link rel="modulepreload" crossorigin href="./assets/docs-B2ZDPeJU.js">
|
|
27
|
-
<link rel="modulepreload" crossorigin href="./assets/ui-
|
|
27
|
+
<link rel="modulepreload" crossorigin href="./assets/ui-BLtm3Y1J.js">
|
|
28
|
+
<link rel="modulepreload" crossorigin href="./assets/preferences-BcLlKYFq.js">
|
|
29
|
+
<link rel="modulepreload" crossorigin href="./assets/files-DI8LgQfb.js">
|
|
30
|
+
<link rel="modulepreload" crossorigin href="./assets/documents-CEtohzAC.js">
|
|
28
31
|
<link rel="modulepreload" crossorigin href="./assets/dist-DHrd1AHo.js">
|
|
29
32
|
<link rel="modulepreload" crossorigin href="./assets/dist-CdHwU8_m.js">
|
|
30
|
-
<link rel="modulepreload" crossorigin href="./assets/lib-
|
|
31
|
-
<link rel="modulepreload" crossorigin href="./assets/preferences-BcLlKYFq.js">
|
|
33
|
+
<link rel="modulepreload" crossorigin href="./assets/lib-DrkEMJ65.js">
|
|
32
34
|
<link rel="modulepreload" crossorigin href="./assets/dist-BqwyxNP3.js">
|
|
33
35
|
<link rel="modulepreload" crossorigin href="./assets/dist-CRJyslwo.js">
|
|
34
|
-
<link rel="modulepreload" crossorigin href="./assets/dist
|
|
35
|
-
<link rel="modulepreload" crossorigin href="./assets/
|
|
36
|
-
<link rel="modulepreload" crossorigin href="./assets/Viewer-DZske1C5.js">
|
|
36
|
+
<link rel="modulepreload" crossorigin href="./assets/dist-B7TL-7R3.js">
|
|
37
|
+
<link rel="modulepreload" crossorigin href="./assets/Viewer-BcpDlvg_.js">
|
|
37
38
|
<link rel="modulepreload" crossorigin href="./assets/dist-BrFvWnvj.js">
|
|
38
39
|
<link rel="modulepreload" crossorigin href="./assets/dist-Bb5-DGtZ.js">
|
|
39
|
-
<link rel="modulepreload" crossorigin href="./assets/dist-
|
|
40
|
-
<link rel="modulepreload" crossorigin href="./assets/dist-
|
|
40
|
+
<link rel="modulepreload" crossorigin href="./assets/dist-DDNYYQtV.js">
|
|
41
|
+
<link rel="modulepreload" crossorigin href="./assets/dist-BEpeEbIu.js">
|
|
41
42
|
<link rel="modulepreload" crossorigin href="./assets/dist-_eOLjmnv.js">
|
|
42
|
-
<link rel="modulepreload" crossorigin href="./assets/dist-
|
|
43
|
-
<link rel="modulepreload" crossorigin href="./assets/bpmnTheme-
|
|
44
|
-
<link rel="modulepreload" crossorigin href="./assets/dist-
|
|
43
|
+
<link rel="modulepreload" crossorigin href="./assets/dist-DDE6BjgI.js">
|
|
44
|
+
<link rel="modulepreload" crossorigin href="./assets/bpmnTheme-pKgl9Mrn.js">
|
|
45
|
+
<link rel="modulepreload" crossorigin href="./assets/dist-CWjAtsKe.js">
|
|
45
46
|
<link rel="modulepreload" crossorigin href="./assets/typing-CXvbBSPr.js">
|
|
46
|
-
<link rel="modulepreload" crossorigin href="./assets/duplicate-
|
|
47
|
+
<link rel="modulepreload" crossorigin href="./assets/duplicate-D_ic-m62.js">
|
|
47
48
|
<link rel="modulepreload" crossorigin href="./assets/descriptors-B5VIyY5g.js">
|
|
48
|
-
<link rel="modulepreload" crossorigin href="./assets/moddle-
|
|
49
|
-
<link rel="modulepreload" crossorigin href="./assets/kind-
|
|
49
|
+
<link rel="modulepreload" crossorigin href="./assets/moddle-f0Q4Guwd.js">
|
|
50
|
+
<link rel="modulepreload" crossorigin href="./assets/kind-DDHnk6dW.js">
|
|
50
51
|
<link rel="modulepreload" crossorigin href="./assets/stackblur-es-Djj-lnDR.js">
|
|
51
52
|
<link rel="modulepreload" crossorigin href="./assets/array-move-Bc4mVEdq.js">
|
|
52
53
|
<link rel="modulepreload" crossorigin href="./assets/dist-DN6jzqTC.js">
|
|
53
|
-
<link rel="modulepreload" crossorigin href="./assets/dist-
|
|
54
|
+
<link rel="modulepreload" crossorigin href="./assets/dist-CJx_2eBF.js">
|
|
54
55
|
<link rel="modulepreload" crossorigin href="./assets/groovy-DASguM_i.js">
|
|
55
|
-
<link rel="modulepreload" crossorigin href="./assets/dist-
|
|
56
|
-
<link rel="modulepreload" crossorigin href="./assets/dmn-
|
|
56
|
+
<link rel="modulepreload" crossorigin href="./assets/dist-27z6Phtg.js">
|
|
57
|
+
<link rel="modulepreload" crossorigin href="./assets/dmn-Cgoh6wXm.js">
|
|
57
58
|
<link rel="modulepreload" crossorigin href="./assets/steps-BB_6M1MU.js">
|
|
58
|
-
<link rel="modulepreload" crossorigin href="./assets/workerVariables-
|
|
59
|
-
<link rel="modulepreload" crossorigin href="./assets/say-
|
|
60
|
-
<link rel="modulepreload" crossorigin href="./assets/apply-
|
|
59
|
+
<link rel="modulepreload" crossorigin href="./assets/workerVariables-O6VqwDzr.js">
|
|
60
|
+
<link rel="modulepreload" crossorigin href="./assets/say-C7KqKcFr.js">
|
|
61
|
+
<link rel="modulepreload" crossorigin href="./assets/apply-Nsj6ek02.js">
|
|
61
62
|
<link rel="modulepreload" crossorigin href="./assets/dockLayout-CxOMo-Nl.js">
|
|
62
|
-
<link rel="modulepreload" crossorigin href="./assets/BpmnCanvas-
|
|
63
|
-
<link rel="modulepreload" crossorigin href="./assets/files-DI8LgQfb.js">
|
|
64
|
-
<link rel="modulepreload" crossorigin href="./assets/documents-LG-7CTrn.js">
|
|
65
|
-
<link rel="modulepreload" crossorigin href="./assets/types-BL-9oaVm.js">
|
|
66
|
-
<link rel="modulepreload" crossorigin href="./assets/file-CIeVSOHy.js">
|
|
67
|
-
<link rel="modulepreload" crossorigin href="./assets/engines-DhO6OW1S.js">
|
|
68
|
-
<link rel="modulepreload" crossorigin href="./assets/list-DovB9lWV.js">
|
|
69
|
-
<link rel="modulepreload" crossorigin href="./assets/testCaseRuns-B_XdqGFh.js">
|
|
70
|
-
<link rel="modulepreload" crossorigin href="./assets/executable-BTarDLry.js">
|
|
63
|
+
<link rel="modulepreload" crossorigin href="./assets/BpmnCanvas-BcQRQ2Br.js">
|
|
71
64
|
<link rel="modulepreload" crossorigin href="./assets/shortcut-BRxHV_3d.js">
|
|
72
|
-
<link rel="modulepreload" crossorigin href="./assets/AgentSettings-Cn5Vcph3.js">
|
|
73
65
|
<link rel="modulepreload" crossorigin href="./assets/commands-GT3J_YEC.js">
|
|
74
|
-
<link rel="
|
|
66
|
+
<link rel="modulepreload" crossorigin href="./assets/AgentSettings-D24jOuht.js">
|
|
67
|
+
<link rel="modulepreload" crossorigin href="./assets/executable--4381_Lf.js">
|
|
68
|
+
<link rel="modulepreload" crossorigin href="./assets/file-BbVBUuIH.js">
|
|
69
|
+
<link rel="modulepreload" crossorigin href="./assets/engines-lyEvb0pH.js">
|
|
70
|
+
<link rel="modulepreload" crossorigin href="./assets/list-TmXvCwja.js">
|
|
71
|
+
<link rel="modulepreload" crossorigin href="./assets/testCaseRuns-liAhWMg7.js">
|
|
72
|
+
<link rel="modulepreload" crossorigin href="./assets/types-BL-9oaVm.js">
|
|
73
|
+
<link rel="stylesheet" crossorigin href="./assets/web-CnDpD6qy.css">
|
|
75
74
|
</head>
|
|
76
75
|
<body>
|
|
77
76
|
<div id="app"></div>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kern0x1b/penstock-cli",
|
|
3
|
-
"version": "26.11.
|
|
3
|
+
"version": "26.11.2",
|
|
4
4
|
"description": "Check, lint, lay out, draw and deploy BPMN diagrams with the configuration the project already has.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"node": "^22.22.2 || ^24.15.0 || >=26.0.0"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@agentclientprotocol/sdk": "2.0
|
|
17
|
+
"@agentclientprotocol/sdk": "2.7.0",
|
|
18
18
|
"@bpmn-io/dmn-migrate": "0.7.1",
|
|
19
19
|
"@bpmn-io/element-templates-validator": "^2.26.0",
|
|
20
20
|
"@bpmn-io/feelin": "^7.0.0",
|
|
@@ -24,18 +24,18 @@
|
|
|
24
24
|
"bpmn-js": "18.31.1",
|
|
25
25
|
"bpmn-js-differ": "^3.2.0",
|
|
26
26
|
"bpmn-moddle": "^10.3.1",
|
|
27
|
-
"bpmnlint": "12.
|
|
27
|
+
"bpmnlint": "12.1.1",
|
|
28
28
|
"bpmnlint-plugin-camunda-compat": "2.63.0",
|
|
29
29
|
"camunda-bpmn-moddle": "^8.0.2",
|
|
30
30
|
"camunda-dmn-moddle": "^1.3.1",
|
|
31
31
|
"dmn-moddle": "^12.2.1",
|
|
32
|
-
"docx": "9.15.
|
|
32
|
+
"docx": "9.15.4",
|
|
33
33
|
"fflate": "^0.8.3",
|
|
34
34
|
"jsdom": "^30.1.3",
|
|
35
35
|
"pdfkit": "0.20.2",
|
|
36
36
|
"saxen": "^11.2.0",
|
|
37
37
|
"svg-to-pdfkit": "0.1.8",
|
|
38
|
-
"web-tree-sitter": "0.27.
|
|
38
|
+
"web-tree-sitter": "0.27.2",
|
|
39
39
|
"webcola": "^3.4.0",
|
|
40
40
|
"yaml": "^2.9.1",
|
|
41
41
|
"zeebe-bpmn-moddle": "^2.0.0"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{_ as e,a as t,b as n,c as r,d as i,g as a,i as o,l as s,n as c,s as l,u,v as d,y as f}from"./chunk-license-BG88gpDZ.js";import{r as p}from"./chunk-translator-DNm9zRpP.js";import{n as m}from"./chunk-features-C6o8of19.js";import{t as h}from"./chunk-table-BOiaGWwY.js";import{spawn as g}from"node:child_process";import{createInterface as _}from"node:readline/promises";function v(e){return e.ask?e.ask:async e=>{let t=_({input:process.stdin,output:process.stderr});try{return(await t.question(e)).trim()}finally{t.close()}}}function y(e){return e.say??(e=>process.stderr.write(`${e}\n`))}const b=/["\u0000-\u001f]/;function x(e,t=process.platform){let n;try{n=new URL(e).protocol}catch{return null}return n!==`http:`&&n!==`https:`||b.test(e)?null:t===`darwin`?{command:`open`,args:[e],verbatim:!1}:t===`win32`?{command:`cmd`,args:[`/c`,`start`,`""`,`"${e}"`],verbatim:!0}:{command:`xdg-open`,args:[e],verbatim:!1}}function S(e){let t=x(e);if(t)try{g(t.command,t.args,{stdio:`ignore`,detached:!0,windowsVerbatimArguments:t.verbatim}).unref()}catch{return}}function C(e){return e.interactive??(process.stdin.isTTY===!0&&process.stderr.isTTY===!0)}function w(){return[p(`app.cli.license.notInteractive`)]}async function T(e,t){let n=v(t),i=y(t);await f(e,t),i(p(`app.cli.license.codeOnItsWay`,{email:e}));let a=null;for(let e=0;e<3&&!a;e+=1){let e=await n(p(`app.cli.license.codeQuestion`));if(!e)return null;try{a=await r(e,t)}catch(e){if(!(e instanceof c))throw e;i(e.message)}}return a}async function E(e,t){let n=v(t),r=y(t),i=await T(e,t);if(!i)return{ok:!1,lines:[p(`app.cli.license.nothingChangedAgain`)]};let a=await s(i,t);for(;a.kind===`full`;){let e=(t.now??Date.now)();r(p(`app.cli.license.tooManyMachines`,{tier:o[a.key.tier],machines:a.activations.length}));let c=a.activations.map((t,n)=>({num:`${n+1}.`,machine:t.label,since:p(`app.cli.license.since`,{when:l(t.createdAt,e)})}));h(c,{columns:[{name:`num`,align:`right`,minWidth:2},{name:`machine`,minWidth:16},{name:`since`,minWidth:14}],headers:!1}).forEach(e=>r(` ${e}`));let u=await n(p(`app.cli.license.freeWhich`)),f=a.activations[Number(u)-1];if(!f)return{ok:!1,lines:[p(`app.cli.nothingChanged`)]};await d(a.key.key,f.id,t),a=await s(i,t)}return a.kind===`none`?{ok:!1,lines:[p(`app.cli.license.noneBought`,{email:e}),p(`app.cli.license.buyOrSignIn`)]}:{ok:!0,lines:[p(`app.cli.license.activeHere`,{tier:o[a.tier],again:a.reused?p(`app.cli.license.again`):``})]}}async function D(e,t={}){if(!C(t))return{ok:!1,lines:w()};try{let n=e[0]??await v(t)(p(`app.cli.license.emailQuestion`));return n?await E(n,t):{ok:!1,lines:[p(`app.cli.nothingChanged`)]}}catch(e){return N(e)}}async function O(t,r={}){let i=t[0]??`pro`;if(i!==`pro`&&i!==`team`)return{ok:!1,lines:[p(`app.cli.license.buyUsage`)]};if(!C(r))return{ok:!1,lines:w()};let a=y(r),s=r.wait??(e=>new Promise(t=>setTimeout(t,e)));try{let t=await u(r);if(t.source===`activation`&&t.tier===i)return{ok:!0,lines:[p(`app.cli.license.alreadyActive`,{tier:o[i]})]};let l=await n(i,void 0,r);(r.open??S)(l.url),a(p(`app.cli.license.checkoutOpen`,{tier:o[i]})),a(` ${l.url}`),a(p(`app.cli.license.waitingForPayment`));let d=(r.now??Date.now)()+36e5,f=0;for(;(r.now??Date.now)()<d;){let t;try{t=await e(l.secret,r),f=0}catch(e){if(e instanceof c||(f+=1)>5)throw e;await s(3e3);continue}if(t.status===`succeeded`){let e=t.email??await v(r)(p(`app.cli.license.paidEmailQuestion`));return a(p(`app.cli.license.paid`)),await E(e,r)}if(t.status===`failed`)return{ok:!1,lines:[p(`app.cli.license.paymentFailed`)]};if(t.status===`expired`)return{ok:!1,lines:[p(`app.cli.license.checkoutExpired`)]};await s(3e3)}return{ok:!1,lines:[p(`app.cli.license.stoppedWaiting`)]}}catch(e){return N(e)}}async function k(e={}){try{let t=await i(e);return t===`released`?{ok:!0,lines:[p(`app.cli.license.released`)]}:t===`cleared`?{ok:!0,lines:[p(`app.cli.license.cleared`)]}:{ok:!1,lines:[p(`app.cli.license.nothingToRelease`)]}}catch(e){return N(e)}}function A(e){let t=e.trialEndsAt?.slice(0,10);return e.source===`trial`&&t?{ok:!1,lines:[p(`app.cli.license.trial`,{left:/\d+ days? left/.exec(e.detail)?.[0]??p(`app.cli.license.running`),ends:t}),p(`app.cli.license.keyComesWithPurchase`),p(`app.cli.license.enterAKey`)]}:{ok:!1,lines:[p(`app.cli.license.noneOnThisMachine`,{trial:t?p(`app.cli.license.trialEnded`,{ends:t}):``}),p(`app.cli.license.orBuyOne`)]}}async function j(e,t){let n=await u(t);if(n.source!==`activation`)return A(n);if(!C(t))return{ok:!1,lines:w()};let r=e??await v(t)(p(`app.cli.license.emailQuestion`));if(!r)return{ok:!1,lines:[p(`app.cli.nothingChanged`)]};let i=await T(r,t);if(!i)return{ok:!1,lines:[p(`app.cli.license.nothingChangedAgain`)]};let s=await a(i,t);if(s.length===0)return{ok:!1,lines:[p(`app.cli.license.noneBought`,{email:r})]};let c=s.filter(e=>e.tier===`team`);return c.length===0?{ok:!1,lines:[p(`app.cli.license.teamOnly`),p(`app.cli.license.buyTeam`)]}:{ok:!0,lines:[...c.map(e=>`${o[e.tier].padEnd(5)} ${e.key}`),``,p(`app.cli.license.keepKeySecret`)]}}async function M(e,n={}){let[r,i]=e;try{switch(r){case`activate`:{if(!i)return{ok:!1,lines:[p(`app.cli.license.activateUsage`)]};await t(i,n);let e=await u(n);return{ok:!0,lines:[p(`app.cli.license.activeHerePlain`,{tier:o[e.tier]})]}}case`deactivate`:return await k(n);case`key`:return await j(i,n);case void 0:case`status`:{let e=await u(n),t=[{property:p(`app.cli.license.tierRow`),value:o[e.tier]},{property:p(`app.cli.license.statusRow`),value:e.detail}],r=h(t,{columns:[{name:`property`,header:p(`app.cli.header.property`),minWidth:10},{name:`value`,header:p(`app.cli.header.value`)}],headers:!1});if(e.tier===`free`||e.source===`trial`){r.push(``,p(`app.cli.license.buyAndSignIn`));let e=m();e&&r.push(e)}return{ok:!0,lines:r}}default:return{ok:!1,lines:[p(`app.cli.license.usage`)]}}}catch(e){return N(e)}}function N(e){return e instanceof c?{ok:!1,lines:[e.message]}:{ok:!1,lines:[p(`app.cli.license.serviceUnreachable`,{reason:e instanceof Error?e.message:String(e)})]}}export{M as licenseCommand,D as loginCommand,k as logoutCommand,O as upgradeCommand};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import{n as e}from"./chunk-version-CdS8_QQd.js";import{t}from"./chunk-atomicWrite-C6J1gDtO.js";import{u as n}from"./chunk-license-BG88gpDZ.js";import{r}from"./chunk-translator-DNm9zRpP.js";import{s as i,t as a}from"./chunk-features-C6o8of19.js";import{r as o,t as s}from"./chunk-preferencesFile-F6bAlNrk.js";import{B as c,C as l,D as u,E as d,H as f,L as p,N as m,O as h,S as g,V as _,Z as v,_ as y,a as ee,b,c as x,d as te,f as S,g as C,h as w,j as T,l as ne,m as E,n as re,o as ie,p as D,r as O,s as k,t as A,u as j,v as ae,w as oe,x as M,y as se,z as ce}from"./chunk-mcpLaunch-LyfmIF_Z.js";import{t as N}from"./chunk-redact-Bz1nB1gq.js";import{A as le,C as ue,E as de,F as P,I as fe,L as pe,M as me,N as he,O as ge,P as F,T as I,_ as L,a as _e,b as ve,f as ye,g as be,j as xe,k as R,l as Se,s as Ce,v as z,w as we,x as Te,y as Ee}from"./chunk-security-VgKwtohm.js";import{r as De}from"./chunk-failure-D5brrYW2.js";import{n as Oe}from"./chunk-aiVerify-DPNBNhx4.js";import{i as ke,n as Ae,r as je,t as Me}from"./chunk-receiptSnapshot-B6ruXw8z.js";import{t as Ne}from"./chunk-context-rCJvBM9p.js";import{r as Pe}from"./chunk-editPreview-CC2vwhIW.js";import{o as Fe,r as Ie}from"./chunk-receiptStore-Cy-L0H1u.js";import{t as Le}from"./chunk-receiptDeps-oVbX156d.js";import B from"node:path";import{mkdirSync as Re,readFileSync as V,rmSync as ze,statSync as H}from"node:fs";import{execFileSync as Be,spawn as Ve}from"node:child_process";import{randomBytes as He}from"node:crypto";import{createServer as Ue}from"node:http";import{RequestError as U}from"@agentclientprotocol/sdk";function W(e,t){return ee(e,t).replace(/\.json$/,`.children.json`)}function We(e){return Array.isArray(e)?e.filter(e=>{let t=e;return typeof t==`object`&&!!t&&Number.isInteger(t.pid)&&(t.pid??0)>0&&typeof t.command==`string`&&t.command!==``}):[]}function G(e){try{return We(JSON.parse(V(e,`utf8`)))}catch{return[]}}function Ge(e,n){n.length===0?ze(e,{force:!0}):(Re(B.dirname(e),{recursive:!0,mode:448}),t(e,`${JSON.stringify(n)}\n`,384))}function Ke(e,t,n){let r=W(e,t);Ge(r,[...G(r).filter(e=>e.pid!==n.pid),n])}function qe(e,t,n){let r=W(e,t);Ge(r,G(r).filter(e=>e.pid!==n))}function Je(e){if(process.platform===`win32`)return null;try{return Be(`ps`,[`-o`,`command=`,`-p`,String(e)],{encoding:`utf8`,stdio:[`ignore`,`pipe`,`ignore`]}).trim()}catch{return null}}async function Ye(e,t){let n=W(e,t),r=G(n).filter(e=>x(e.pid)&&Je(e.pid)?.includes(e.command));ze(n,{force:!0});for(let e of r)j(e.pid,`SIGTERM`);if(r.length!==0){await new Promise(e=>setTimeout(e,1e3));for(let e of r)x(e.pid)&&j(e.pid,`SIGKILL`)}}var Xe=class{graceMs;holds=0;attendedAt;idleAt;constructor(e,t){this.graceMs=e,this.attendedAt=t,this.idleAt=t}hold(e){this.holds+=1,this.touch(e);let t=!0;return e=>{t&&(t=!1,--this.holds,this.touch(e))}}tick(e,t,n){let r=this.holds>0;return r&&this.touch(e),t&&(this.idleAt=e),{unattended:!r&&e-this.attendedAt>=this.graceMs,leave:n?!t:!r&&e-this.idleAt>=this.graceMs}}touch(e){this.attendedAt=e,this.idleAt=e}};const K={required:[`file`],allowed:[`file`]},Ze={required:[`file`,`element`],allowed:[`file`,`element`]},Qe={required:[],allowed:[`project`]},$e={list_diagrams:Qe,show_diagram:K,element_context:Ze,check_diagram:K,analyze_flow:K,list_scenarios:K,check_code_links:Qe,search_elements:{required:[`query`],allowed:[`query`,`project`]},diff_diagrams:{required:[`file`],allowed:[`file`,`other`,`ref`]}},et=Object.keys($e),tt=[`file`,`operations`,`dryRun`],nt=/* @__PURE__ */ new Set([`edit`,`delete`,`move`]),rt=/* @__PURE__ */ new Set([`read`,`search`,`other`]),it=/* @__PURE__ */ new Set([`allowAlways`,`rejectAlways`]);function at(e,t){return RegExp(`(?:^|[^a-z0-9_]|__|penstock_)${t}(?![a-z0-9_])`,`i`).test(e.title)}function ot(e,t){return RegExp(`^\\s*(?:tool:\\s*)?(?:mcp__penstock__|penstock(?:[_/:.]|\\s*[:/]\\s*))${t}\\s*$`,`i`).test(e.title)}function st(e){return at(e,`edit_diagram`)}function ct(e,t){let n=t=>t.every(t=>typeof e[t]==`string`&&e[t]!==``);return Object.keys(e).every(e=>t.allowed.includes(e))&&n(t.required)&&n(Object.keys(e))}function lt(e,t){if(!rt.has(e.kind)||e.diffs.length>0)return!1;let n=et.find(t=>ot(e,t));if(n===void 0)return!1;let r=pt(t);return r!==null&&ct(r,$e[n])}function ut(e){return nt.has(e.kind)||e.diffs.length>0||st(e)}function dt(e){return{...e,options:e.options.filter(e=>!it.has(e.kind))}}function ft(e){return e.options.find(e=>e.kind===`allow`)?.id??null}function pt(e){let t=e;if(typeof t==`string`)try{t=JSON.parse(t)}catch{return null}return typeof t==`object`&&t&&!Array.isArray(t)?t:null}function mt(e,t){if(!ot(e,`edit_diagram`)||e.diffs.length>0)return!1;let n=pt(t);return n===null||n.dryRun!==!0||!Object.keys(n).every(e=>tt.includes(e))?!1:typeof n.file==`string`&&n.file!==``&&n.operations!==void 0}function ht(e){let t=e;if(typeof t==`string`)try{t=JSON.parse(t)}catch{return null}if(typeof t!=`object`||!t)return null;let n=t;return typeof n.file!=`string`||n.file===``||n.operations===void 0?null:{file:n.file,operations:n.operations}}const gt=2e5,q=8388608,J=16777216,Y=-32602,X=-32603,Z={outcome:{outcome:`cancelled`}},_t=`app.agent.authRequired`;function vt(e,t){let n=e instanceof U?e.data:null,r=[n?.message,n?.details].find(e=>typeof e==`string`&&e.trim()!==``);return r&&!t.includes(r)?`${t}: ${r}`:t}function yt(e){if(!(e instanceof U))return``;let t=([e.data?.message,e.message].find(e=>typeof e==`string`&&e.trim()!==``)??``).split(/\r?\n/).map(e=>e.trim()).find(e=>e!==``)??``;return N(Array.from(t).slice(0,300).join(``))}function bt(e,t,n,r){if(e instanceof xe)return{key:u(e.tail),detail:e.tail===``?e.how:`${e.how}: ${e.tail}`};if(e instanceof F)return{key:`app.agent.timeout`,detail:``};if(P(e))return{key:_t,detail:yt(e),signIn:r};let i=e?.code;if(e instanceof he||i===`ENOENT`||i===`EACCES`)return{key:`app.agent.notFound`,detail:m(n,t)??``};if(e instanceof v)return{key:`app.agent.unsafe`,detail:``};let a=e instanceof Error?e.message:String(e);return{key:`app.agent.failed`,detail:N(vt(e,a))}}function xt(){return He(9).toString(`base64url`)}var St=class{host;timings;store;feed;chats=/* @__PURE__ */ new Map;processes=/* @__PURE__ */ new Map;live=/* @__PURE__ */ new Set;started=/* @__PURE__ */ new Map;owners=/* @__PURE__ */ new Map;offered=/* @__PURE__ */ new Map;dirty=/* @__PURE__ */ new Map;unsaved=/* @__PURE__ */ new Set;flushTimer=null;saveTimer=null;watcher=null;asked=0;on=!0;retiring=!1;checkedAt=0;disposed=!1;constructor(e,t={}){this.host=e,this.timings={connectMs:t.connectMs??3e4,flushMs:t.flushMs??40,killMs:t.killMs??2e3,stopMs:t.stopMs??1e4,saveMs:t.saveMs??400,prefsMs:t.prefsMs??1e3,watchMs:t.watchMs??1e3,signInMs:t.signInMs??3e5},this.store=new w(e.home,e.folder);for(let e of this.store.load())this.chats.set(e.id,C.from(e));this.feed=new ge(()=>this.replay(),t.feed),this.on=this.readEnabled()}enabled(){return this.refresh(!1),this.on}refresh(e=!0){if(this.disposed)return;let t=Date.now();if(!e&&t-this.checkedAt<this.timings.prefsMs)return;this.checkedAt=t;let n=this.readEnabled();n!==this.on&&(this.on=n,n||this.shutDown(),this.publish({type:`enabled`,enabled:n}),this.publishChats())}busy(){for(let e of this.chats.values())if(e.turn!==null||e.checking||e.questions.length>0||e.queue.length>0)return!0;return!1}retire(){return this.retiring=!0,this.busy()}drained(){return Promise.all([...this.live].map(e=>e.exited(this.timings.killMs*2))).then(()=>void 0)}cancelUnanswered(){for(let e of this.chats.values()){if(e.questions.length===0)continue;let t=e.transcript.notice(r(`app.agent.unanswered`));this.publish(this.entryEvent(e,t)),this.touch(e),this.halt(e)}}stopQuiet(e){let t=performance.now();for(let n of this.chats.values()){let i=n.turn;if(!i||i.stopping||n.questions.length>0||t-i.heard<e)continue;let a=n.transcript.notice(r(`app.agent.quiet`));this.publish(this.entryEvent(n,a)),this.touch(n),this.halt(n)}}catalog(){return le({home:this.host.home,env:this.host.env,folder:this.host.folder,version:this.host.version})}choices(){return this.installed().map(e=>({...e,options:this.cached(e.id)}))}installed(){return h(this.host.env,this.host.home,this.host.folder)}cached(e){let t=this.offered.get(e)??fe(this.host.home,e)?.options;if(!t)return[];let n=_(this.host.home,e);return t.map(e=>{let t=M.includes(e.category)?n[e.category]:void 0;return g(t!==void 0&&l(e,t)?{...e,current:t}:e)})}list(){let e=this.enabled();return e?{chats:this.dtos(),enabled:e}:{chats:[],enabled:e}}create(e){this.requireOn(),this.requireFree();let t=this.installed();if(e!==null&&!t.some(t=>t.id===e))throw D(404,`app.agent.reason.unknownAgent`,{agent:e.slice(0,80)});let n=e??T(t,this.host.home)??f(this.host.home)??t[0]?.id??`claude`,r=new C(xt(),n,Date.now());return this.chats.set(r.id,r),this.publishChats(),r.dto()}get(e){this.requireOn();let t=this.chat(e);return this.shown(t),t.describe()}rename(e,t){this.requireOn();let n=this.chat(e),r=t.replace(/[\u0000-\u001f\u007f]+/g,` `).trim();if(r===``||Array.from(r).length>120)throw D(400,`app.agent.reason.badTitle`,{limit:120});return n.title=r,this.touch(n),this.publishChats(),n.dto()}remove(e){this.requireOn();let t=this.chat(e);this.forget(t);try{this.store.remove(e)}catch(t){console.warn(r(`app.agent.log.notKept`,{id:e,reason:t instanceof Error?t.message:String(t)}))}this.publishChats()}async prompt(e,t,n=null){this.requireOn(),this.requireFree();let r=this.chat(e),i=t.trim();if(i===``||i.length>gt)throw D(400,`app.agent.reason.badText`,{limit:gt});if(await this.requireLicence(),this.requireOn(),this.requireFree(),this.chats.get(e)!==r)throw D(404,`app.agent.reason.noSuchChat`);let a=this.contextOf(n);if(this.remember(r,this.contextFile(n)),r.turn!==null||r.checking||r.queue.length>0){if(r.queue.length>=20)throw D(409,`app.agent.reason.queueFull`,{limit:20});let e={id:xt(),text:i,context:a};return r.queue.push(e),this.watch(),this.publish({type:`queue`,chatId:r.id,queue:this.queueOf(r)}),this.drainSoon(r),{queued:!0,queueId:e.id}}return this.begin(r,i,a),{queued:!1,queueId:null}}unqueue(e,t){this.requireOn();let n=this.chat(e),r=n.queue.findIndex(e=>e.id===t);if(r<0)throw D(404,`app.agent.reason.noSuchQueued`);n.queue.splice(r,1),this.publish({type:`queue`,chatId:n.id,queue:this.queueOf(n)})}stop(e){this.requireOn(),this.halt(this.chat(e))}async signIn(e){this.requireOn();let t=this.chat(e),n=t.failure;if(t.turn!==null||n?.key!==_t||n.signIn!==!0)throw D(409,`app.agent.reason.noSignIn`);if(await this.requireLicence(),this.requireOn(),this.chats.get(e)!==t)throw D(404,`app.agent.reason.noSuchChat`);try{let e=await this.processOf(t.agentId),n=e.signInMethods[0];if(n===void 0)throw D(409,`app.agent.reason.noSignIn`);await e.authenticate(n,this.timings.signInMs)}catch(e){throw e instanceof S?e:this.signInFailure(e,t.agentId)}this.chats.get(e)===t&&t.failure===n&&(t.failure=null,this.touch(t),this.publish({type:`error`,chatId:t.id,error:null}),this.publishChats())}signInFailure(e,t){return e instanceof U?D(502,`app.agent.reason.signInRefused`,{reason:yt(e)}):E(e instanceof F?504:500,bt(e,this.host.home,t,!1))}answer(e,t,n){this.requireOn();let r=this.chat(e),i=r.questions[0];if(!i||i.permission.id!==t)throw D(409,`app.agent.reason.staleQuestion`);let a=i.permission.options.find(e=>e.id===n);if(!a)throw D(409,`app.agent.reason.badOption`,{option:n.slice(0,80)});r.questions.shift(),i.grants&&a.kind===`allow`&&this.grant(r,i.permission.tool),i.resolve(n),this.publish({type:`permission`,chatId:r.id,permission:r.questions[0]?.permission??null}),this.publishChats()}next(e,t){return this.refresh(!1),this.watch(),this.feed.next(e,t)}dispose(){if(!this.disposed){this.disposed=!0,this.watcher&&clearInterval(this.watcher),this.watcher=null,this.flush(),this.saveAll();for(let e of this.chats.values()){for(let t of e.questions.splice(0))t.resolve(null);e.turn?.stopping&&clearTimeout(e.turn.stopping)}this.shutDown(),this.saveAll(),this.feed.close()}}readEnabled(){try{return new s(this.host.home).aiChat()!==`off`}catch{return!0}}requireOn(){if(!this.enabled())throw D(409,`app.agent.reason.off`)}requireFree(){if(this.retiring)throw D(409,`app.agent.retiring`)}async requireLicence(){let e={env:this.host.env},t=await n(e);if(!(this.host.licensed?await this.host.licensed():a(t,e)))throw new S(402,i(t,`ai-chat`,e).join(`
|
|
2
|
-
`))}chat(e){let t=this.chats.get(e);if(!t)throw D(404,`app.agent.reason.noSuchChat`);return t}forget(e){this.abandon(e),this.chats.delete(e.id),this.unsaved.delete(e),this.dirty.delete(e);for(let t of this.owners.values())e.sessionId&&t.delete(e.sessionId)}watch(){this.watcher||this.disposed||(this.watcher=setInterval(()=>this.tick(),this.timings.watchMs),this.watcher.unref())}tick(){if(!this.disposed&&(this.refresh(!1),this.on))for(let e of this.chats.values())e.queue.length>0&&e.turn===null&&this.drainSoon(e)}dtos(){return[...this.chats.values()].sort((e,t)=>t.updated-e.updated).map(e=>e.dto())}entryEvent(e,t){if(t.kind===`tool`)for(let n of t.tool.paths)this.remember(e,n);return t.kind===`tool`?{type:`tool`,chatId:e.id,tool:t.tool}:t.kind===`plan`?{type:`plan`,chatId:e.id,items:t.items}:{type:`entry`,chatId:e.id,entry:y(t)}}replay(){return[{type:`sync`},this.chatsEvent()]}chatsEvent(){let e=this.on;return{type:`chats`,chats:e?this.dtos():[],enabled:e}}publishChats(){this.flush(),this.feed.publish(this.chatsEvent())}publish(e){this.flush(),this.feed.publish(e)}queueOf(e){return e.queue.map(e=>({id:e.id,text:e.text}))}contextFile(e){if(!e||typeof e.file!=`string`||e.file===``)return null;try{return this.host.files.relative(this.host.files.resolve(e.file))}catch{return null}}remember(e,t){t!==null&&e.addFile(t)&&(this.markUnsaved(e),this.publishChats())}contextOf(e){if(!e)return null;let t=[],n=this.contextFile(e);n!==null&&t.push(r(`app.agent.contextFile`,{file:n}));let i=(e.elementIds??[]).filter(e=>typeof e==`string`&&e!==``&&e.length<=200).slice(0,50);return i.length>0&&t.push(r(`app.agent.contextElements`,{elements:i.join(`, `)})),t.length>0?t.join(`
|
|
3
|
-
`):null}touch(e){e.updated=Date.now(),this.markUnsaved(e)}markUnsaved(e){e.worth&&(this.unsaved.add(e),!(this.saveTimer||this.disposed)&&(this.saveTimer=setTimeout(()=>{this.saveTimer=null,this.saveAll()},this.timings.saveMs),this.saveTimer.unref()))}saveAll(){this.saveTimer&&clearTimeout(this.saveTimer),this.saveTimer=null;let e=[...this.unsaved];this.unsaved.clear();for(let t of e)this.chats.get(t.id)===t&&this.persist(t)}persist(e){try{let t=this.store.save(e.stored());e.turn===null&&t.entries.length!==e.transcript.list().length&&e.transcript.restore(t.entries)}catch(t){console.warn(r(`app.agent.log.notKept`,{id:e.id,reason:t instanceof Error?t.message:String(t)}))}}begin(e,t,n,r=!1){e.turns+=1;let i={id:e.turns,cancelled:!1,stopping:null,heard:performance.now(),repair:r};if(e.turn=i,e.failure=null,e.connecting=!0,e.grants=/* @__PURE__ */ new Map,r)e.transcript.closeMessage(),this.touch(e);else{let n=e.transcript.message(`user`,t,`user-${i.id}`);e.transcript.closeMessage(),e.title===null&&(e.title=ae(t)),this.watchFiles(e,i),this.touch(e),this.saveAll(),this.publish(this.entryEvent(e,n))}this.publishChats(),this.run(e,i,t,n)}async run(e,t,n,i){let a=null,o=`end_turn`;try{let a=await this.processOf(e.agentId);if(t.cancelled||e.turn!==t)return;let s=await this.sessionOf(e,a);if(t.cancelled||e.turn!==t)return;e.connecting=!1,this.publishChats();let c=[i,e.briefed===s?null:r(`app.agent.contextLinks`)].filter(e=>e!==null).join(`
|
|
4
|
-
`);e.briefed=s;let l=[{type:`text`,text:n},...c?[{type:`text`,text:c}]:[]];o=await a.prompt(s,l),await new Promise(e=>setImmediate(e))}catch(n){if(t.cancelled||e.turn!==t)return;let r=e.process,i=!(n instanceof U)&&!(n instanceof F);if(i&&r&&await r.exited(this.timings.killMs),t.cancelled||e.turn!==t)return;if(r?.killedByUs){e.process=null,this.release(r),this.stoppedBy(e,t);return}a=bt(i&&r?.exitCause?r.exitCause:n,this.host.home,e.agentId,(r?.signInMethods.length??0)>0)}this.finish(e,t,a,o)}finish(e,t,n,r){if(e.turn===t){if(this.flush(),t.stopping&&clearTimeout(t.stopping),this.settleQuestions(e),e.turn=null,e.connecting=!1,e.failure=n,e.grants=/* @__PURE__ */ new Map,n)for(let t of e.transcript.failRunning())this.publish({type:`tool`,chatId:e.id,tool:t});else if(r===`cancelled`)for(let t of e.transcript.stopRunning())this.publish({type:`tool`,chatId:e.id,tool:t});this.touch(e),this.saveAll(),n&&this.publish({type:`error`,chatId:e.id,error:n}),this.publishChats(),!n&&r!==`cancelled`&&e.loop!==null?this.check(e):(e.loop=null,this.afterTurn(e))}}watchFiles(e,t){if(e.loop=null,this.host.receipts)try{e.loop={snapshot:Ae({folders:[this.host.folder]},this.host.folder),attempts:[],entryId:`receipt:${t.id}`}}catch(t){console.warn(r(`app.agent.log.notKept`,{id:e.id,reason:t instanceof Error?t.message:String(t)}))}}async canVerify(){let e={env:this.host.env};return this.host.licensed?await this.host.licensed():a(await n(e),e)}async check(e){e.checking=!0,e.checkStopped=!1,this.publishChats();let t=null;try{t=await this.verify(e)}catch(t){e.loop=null,console.warn(r(`app.agent.log.notKept`,{id:e.id,reason:t instanceof Error?t.message:String(t)}))}e.checking=!1,!(this.disposed||this.chats.get(e.id)!==e)&&(t!==null&&!e.checkStopped&&e.turn===null&&this.on?this.begin(e,t,null,!0):(e.loop=null,this.publishChats(),this.afterTurn(e)))}async verify(e){let t=e.loop,n=this.host.receipts;if(t===null||!n)return null;let{changes:i,incomplete:a}=Me(t.snapshot);if(i.length===0&&t.attempts.length===0)return e.loop=null,null;let o=Oe(Ne(this.host.folder).values),s=await this.canVerify(),c=await Fe(i,{root:this.host.folder,source:`chat`,agent:e.agentId,maxAttempts:o.attempts,attempts:t.attempts,incomplete:a},n());if(e.checkStopped||this.disposed)return e.loop=null,null;let l=je(c,t.attempts,{repair:s});t.attempts=l.receipt.attempts;let u=e.transcript.receipt(t.entryId,l.receipt);if(this.publish(this.entryEvent(e,u)),this.touch(e),l.handBack)return ke(l.receipt);if(s&&o.keepReceipts)try{Ie(this.host.folder,l.receipt)}catch(t){console.warn(r(`app.agent.log.notKept`,{id:e.id,reason:t instanceof Error?t.message:String(t)}))}return e.loop=null,null}afterTurn(e){e.wanted.size===0||!e.process?.alive?this.drainSoon(e):this.settle(e,!1).catch(()=>void 0).finally(()=>this.drainSoon(e))}drainSoon(e){e.queue.length!==0&&setImmediate(()=>{if(this.disposed||!this.on||e.turn||e.checking||this.chats.get(e.id)!==e)return;let t=e.queue.shift();t&&(this.publish({type:`queue`,chatId:e.id,queue:this.queueOf(e)}),this.begin(e,t.text,t.context))})}settleQuestions(e){if(e.questions.length!==0){for(let t of e.questions.splice(0))t.resolve(null);this.publish({type:`permission`,chatId:e.id,permission:null})}}halt(e){this.settleQuestions(e),e.checking&&(e.checkStopped=!0);let t=e.turn;if(!t)return;if(e.connecting){t.cancelled=!0,e.turn=null,e.connecting=!1,e.loop=null,this.touch(e),this.saveAll(),this.publishChats(),this.drainSoon(e);return}let n=e.process;n&&e.sessionId&&n.cancel(e.sessionId),!t.stopping&&(t.stopping=setTimeout(()=>{e.turn===t&&n&&(this.othersWorking(e)?this.stoppedBy(e,t,`app.agent.stopped`):(this.release(n),n.kill(!0)))},this.timings.stopMs),t.stopping.unref())}othersWorking(e){for(let t of this.chats.values())if(t!==e&&t.agentId===e.agentId&&t.turn!==null)return!0;return!1}abandon(e){this.settleQuestions(e),e.loop=null,e.checkStopped=!0;let t=e.turn;t&&(t.cancelled=!0,t.stopping&&clearTimeout(t.stopping),e.turn=null,e.process&&e.sessionId&&e.process.cancel(e.sessionId))}shutDown(){for(let e of this.chats.values()){this.settleQuestions(e),e.loop=null,e.checkStopped=!0;let t=e.turn;if(t){t.cancelled=!0,t.stopping&&clearTimeout(t.stopping),e.turn=null,e.connecting=!1;for(let t of e.transcript.stopRunning())this.publish({type:`tool`,chatId:e.id,tool:t});e.transcript.notice(r(`app.agent.stopped`)),this.touch(e)}e.queue=[]}for(let e of[...this.live])e.kill(!0);this.processes.clear(),this.started.clear()}processOf(e){let t=this.processes.get(e);if(t)return t;let n={update:e=>this.update(e),permission:(e,t)=>this.requestPermission(e,t),read:e=>this.readText(e),write:e=>this.writeText(e),gone:(e,t,n,r)=>this.gone(e,t,n,r)},r=(async()=>{let t=p(e,this.host.env,this.host.home,this.host.folder);if(!t)throw new he;let r=await me.launch(t,{folder:this.host.folder,env:this.host.env,version:this.host.version,connectMs:this.timings.connectMs,killMs:this.timings.killMs},n);if(this.disposed||!this.on)throw r.kill(!0),Error(`closed`);return this.live.add(r),this.started.set(e,r),this.owners.set(r,/* @__PURE__ */ new Map),r.pid!==void 0&&Ke(this.host.home,this.host.folder,{pid:r.pid,command:r.command}),r})();return this.processes.set(e,r),r.catch(()=>{this.processes.get(e)===r&&this.processes.delete(e)}),r}mcpServers(){let e=this.host.mcp;return e?[{name:`penstock`,command:e.command,args:[...e.args,`--project`,this.host.folder],env:Object.entries(e.env??{}).map(([e,t])=>({name:e,value:t}))}]:[]}async sessionOf(e,t){let n=this.owners.get(t);if(e.process=t,e.sessionId&&n?.get(e.sessionId)===e)return e.sessionId;let i=e.sessionId;if(i&&t.loadSession){e.fenced=!0,n?.set(i,e);try{let n=await t.loadSessionById(i,this.host.folder,this.mcpServers());return this.offer(e,n),await this.settle(e,!1),i}catch(e){if(n?.delete(i),P(e)||e instanceof F)throw e}finally{e.fenced=!1}}let a=await t.newSession(this.host.folder,this.mcpServers());if(e.sessionId=a.sessionId,n?.set(a.sessionId,e),this.offered.set(e.agentId,a.options),this.offer(e,a.options),await this.settle(e,!0),i!==null){let t=e.transcript.notice(r(`app.agent.newSession`));this.publish(this.entryEvent(e,t))}return f(this.host.home)!==e.agentId&&ce(this.host.home,e.agentId),this.markUnsaved(e),a.sessionId}offer(e,t){(t.length!==0||e.options.length!==0)&&(e.options=t,pe(this.host.home,e.agentId,t),this.publishOptions(e))}publishOptions(e){this.publish({type:`options`,chatId:e.id,options:e.shownOptions()}),this.markUnsaved(e)}desired(e,t){let n=/* @__PURE__ */ new Map,r=t?_(this.host.home,e.agentId):{};for(let t of e.options){let i=e.wanted.get(t.id)??(M.includes(t.category)?r[t.category]:void 0);i!==void 0&&i!==t.current&&l(t,i)&&n.set(t.id,i)}return n}settle(e,t){let n=e.configured.then(async()=>{let n=e.process,r=e.sessionId;if(n&&n.alive&&r)for(let i of d(e.options)){let a=this.desired(e,t).get(i.id);if(a===void 0)continue;let o=e.options.find(e=>e.id===i.id);if(o)try{await this.change(e,n,r,o,a)}catch(t){if(P(t))throw t;e.wanted.delete(i.id)}}});return e.configured=n.catch(()=>void 0),n}async change(e,t,n,r,i){let a=await t.setOption(n,r,i);e.sessionId===n&&(e.options=a===null?e.options.map(e=>e.id===r.id?{...e,current:i}:e):a.length>0?a:e.options.map(e=>e.id===r.id?{...e,current:i}:e),e.wanted.get(r.id)===i&&e.wanted.delete(r.id),pe(this.host.home,e.agentId,e.options),this.publishOptions(e))}shown(e){if(e.options.length===0){let t=this.offered.get(e.agentId)??fe(this.host.home,e.agentId)?.options;if(!t)return;e.options=t.map(e=>({...e}))}if(e.sessionId===null)for(let[t,n]of this.desired(e,!0))e.wanted.set(t,n)}async setOption(e,t,n){this.requireOn();let r=this.chat(e);this.shown(r);let i=r.options.find(e=>e.id===t);if(!i)throw D(404,`app.agent.reason.noSuchOption`,{option:t.slice(0,80)});if(!l(i,n))throw D(400,`app.agent.reason.badOptionValue`,{value:n.slice(0,80)});r.wanted.set(i.id,n),M.includes(i.category)&&c(this.host.home,r.agentId,i.category,n),this.publishOptions(r);let a=r.process,o=r.sessionId;if(!r.turn&&a?.alive&&o&&this.owners.get(a)?.get(o)===r){let e=r.configured.then(()=>this.change(r,a,o,i,n));r.configured=e.catch(()=>void 0);try{await e}catch(e){throw r.wanted.delete(i.id),this.publishOptions(r),D(502,`app.agent.reason.optionRefused`,{reason:N(e instanceof Error?e.message:String(e))})}}return r.shownOptions()}gone(e,t,n,r){this.live.delete(e),e.pid!==void 0&&qe(this.host.home,this.host.folder,e.pid);let i=this.owners.get(e);if(this.owners.delete(e),this.release(e),i)for(let a of i.values()){if(a.process!==e)continue;a.process=null;let i=a.turn;i&&(r?this.stoppedBy(a,i):this.finish(a,i,{key:u(n),detail:n===``?t:`${t}: ${n}`},`end_turn`))}}release(e){this.started.get(e.agentId)===e&&(this.started.delete(e.agentId),this.processes.delete(e.agentId))}stoppedBy(e,t,n=`app.agent.killed`){if(e.turn!==t)return;this.flush(),t.stopping&&clearTimeout(t.stopping),this.settleQuestions(e),e.turn=null,e.connecting=!1,e.loop=null,e.failure=null;for(let t of e.transcript.stopRunning())this.publish({type:`tool`,chatId:e.id,tool:t});let i=e.transcript.notice(r(n));this.publish(this.entryEvent(e,i)),this.touch(e),this.saveAll(),this.publishChats(),this.drainSoon(e)}ownerOf(e){for(let t of this.owners.values()){let n=t.get(e);if(n)return n}return null}schedule(e,t){let n=this.dirty.get(e);n||(n=/* @__PURE__ */ new Set,this.dirty.set(e,n)),n.add(t.id),!this.flushTimer&&(this.flushTimer=setTimeout(()=>this.flush(),this.timings.flushMs),this.flushTimer.unref())}flush(){if(this.flushTimer&&clearTimeout(this.flushTimer),this.flushTimer=null,this.dirty.size===0)return;let e=[...this.dirty];this.dirty.clear();for(let[t,n]of e){for(let e of n){let n=t.transcript.find(e);n&&this.feed.publish(this.entryEvent(t,n))}this.markUnsaved(t)}}relative(e){if(!B.isAbsolute(e))return e;let t=this.host.files.relative(e);return t.startsWith(`..`)||t===``?e:t}update(e){let t=this.ownerOf(e.sessionId);if(!t||t.fenced)return;t.turn&&(t.turn.heard=performance.now());let n=e.update;switch(n.sessionUpdate){case`agent_message_chunk`:case`agent_thought_chunk`:{if(n.content.type!==`text`)return;let e=n.sessionUpdate===`agent_message_chunk`?`agent`:`thought`;this.schedule(t,t.transcript.message(e,n.content.text,n.messageId??null));return}case`tool_call`:{this.keepInput(t,n.toolCallId,n.rawInput);let e=t.transcript.upsertTool(b(n,void 0,e=>this.relative(e)));this.publish(this.entryEvent(t,e));return}case`tool_call_update`:{this.keepInput(t,n.toolCallId,n.rawInput),(n.status===`completed`||n.status===`failed`)&&t.grants.delete(n.toolCallId);let e=t.transcript.tool(n.toolCallId),r=t.transcript.upsertTool(b(n,e,e=>this.relative(e)));this.publish(this.entryEvent(t,r));return}case`config_option_update`:{let e=oe(n.configOptions,null);if(e.length===0)return;for(let n of e)t.wanted.get(n.id)===n.current&&t.wanted.delete(n.id);this.offer(t,e);return}case`current_mode_update`:if(!t.options.some(e=>e.legacy))return;t.options=t.options.map(e=>e.legacy&&l(e,n.currentModeId)?{...e,current:n.currentModeId}:e),this.publishOptions(t);return;case`plan`:{let e=t.transcript.plan(n.entries);this.publish(this.entryEvent(t,e)),this.publishChats();return}default:return}}keepInput(e,t,n){n!=null&&(e.rawInputs.set(t,n),e.rawInputs.size>40&&e.rawInputs.delete(e.rawInputs.keys().next().value))}async announced(e,t,n){let r=Date.now()+200;for(;!e.rawInputs.has(t)&&!n.aborted&&Date.now()<r;)await new Promise(e=>setTimeout(e,5))}async requestPermission(e,t){let n=this.ownerOf(e.sessionId);if(!n||n.fenced||t.aborted||!n.turn)return Z;this.asked+=1;let r=`ask:${this.asked}`,i=e.toolCall.toolCallId;if(e.toolCall.rawInput==null&&!n.rawInputs.has(i)&&await this.announced(n,i,t),t.aborted||!n.turn)return Z;let a=se(r,e.toolCall,e.options,n.transcript.tool(i),e=>this.relative(e)),o=e.toolCall.rawInput??n.rawInputs.get(i);if(lt(a.tool,o)||mt(a.tool,o)){let e=ft(a);if(e!==null)return{outcome:{outcome:`selected`,optionId:e}}}if(ut(a.tool)&&(a=dt(a),st(a.tool)&&a.tool.diffs.length===0)){let r=await this.previewOf(n,e.toolCall.toolCallId,e.toolCall.rawInput);if(r&&(a={...a,tool:{...a.tool,...r}}),t.aborted||!n.turn)return Z}let s=a;return new Promise(e=>{let r={permission:s,grants:!0,resolve:t=>e(t===null?Z:{outcome:{outcome:`selected`,optionId:t}})},i=()=>{let e=n.questions.indexOf(r);e<0||(n.questions.splice(e,1),this.publish({type:`permission`,chatId:n.id,permission:n.questions[0]?.permission??null}),this.publishChats())};t.addEventListener(`abort`,()=>{i(),e(Z)}),this.ask(n,r)})}ask(e,t){let n=e.transcript.upsertTool(t.permission.tool);this.publish(this.entryEvent(e,n)),e.questions.push(t),e.questions.length===1&&(this.publish({type:`permission`,chatId:e.id,permission:t.permission}),this.publishChats())}async previewOf(e,t,n){let r=ht(n??e.rawInputs.get(t));if(!r)return null;let i;try{i=this.host.files.resolve(r.file)}catch{return null}let a;try{a=await(this.host.preview??Pe)(i,r.operations)}catch{return null}if(!a.ok)return null;let o=this.relative(i);return{diffs:[{path:o,oldText:a.before,newText:a.after}],paths:[o],locations:[{path:o,line:null}]}}grant(e,t){(t.kind===`edit`||t.kind===`delete`||t.kind===`move`||t.diffs.length>0)&&t.paths.length!==0&&e.grants.set(t.id,new Set(t.paths))}granted(e,t){for(let[n,r]of e.grants)if(r.delete(t))return r.size===0&&e.grants.delete(n),!0;return!1}target(e){try{return this.host.files.resolve(e)}catch(e){throw new U(Y,e instanceof Error?e.message:String(e))}}known(e){let t=this.ownerOf(e);if(!t||t.fenced)throw new U(Y,r(`app.agent.reason.notRunning`));return t}readText(e){let t=this.known(e.sessionId),n=this.target(e.path),i;try{let e=H(n);if(!e.isFile())throw new U(Y,r(`app.agent.reason.noSuchFile`));if(e.size>q)throw new U(X,r(`app.agent.reason.fileTooLarge`,{limit:q/1048576}));i=V(n,`utf8`)}catch(e){throw e instanceof U?e:new U(-32002,r(`app.agent.reason.noSuchFile`))}this.remember(t,this.relative(n));let a=Math.max(1,e.line??1);if(a===1&&(e.limit===void 0||e.limit===null))return{content:i};let o=i.split(`
|
|
5
|
-
`);return{content:(e.limit===void 0||e.limit===null?o.slice(a-1):o.slice(a-1,a-1+Math.max(0,e.limit))).join(`
|
|
6
|
-
`)}}async writeText(e){let n=this.known(e.sessionId),i=this.target(e.path),a=this.relative(i);if(Buffer.byteLength(e.content)>J)throw new U(X,r(`app.agent.reason.fileTooLarge`,{limit:J/1048576}));let o=null;try{let e=H(i);if(e.isDirectory())throw new U(Y,r(`app.agent.reason.isAFolder`));e.size<=q&&(o=V(i,`utf8`))}catch(e){if(e instanceof U)throw e}if(!this.granted(n,a)&&!await this.askToWrite(n,a,o,e.content))throw new U(X,r(`app.agent.writeRejected`,{path:a}));try{t(i,e.content)}catch(e){throw new U(X,e instanceof Error?e.message:String(e))}this.remember(n,a),this.host.changed([i]).catch(()=>void 0)}async askToWrite(e,t,n,i){this.asked+=1;let a={id:`write:${this.asked}`,title:r(`app.agent.write`,{path:t}),kind:`edit`,status:`pending`,diffs:[{path:t,oldText:n,newText:i}],paths:[t],locations:[{path:t,line:null}]},o={id:`ask:${this.asked}`,tool:a,options:[{id:`allow`,label:r(`app.agent.allow`),kind:`allow`},{id:`reject`,label:r(`app.agent.reject`),kind:`reject`}]},s=await new Promise(t=>this.ask(e,{permission:o,grants:!1,resolve:t}))===`allow`,c={...a,status:s?`done`:`failed`},l=e.transcript.upsertTool(c);return this.publish(this.entryEvent(e,l)),s}},Ct=class extends Error{};const wt=/^Bearer ([\w.~+/-]{1,512}=*)$/,Tt=/^[0-9a-f]{32,128}$/,Et=ye(ve);function Dt(e){let t=e.url??``,n=`${O.ping.path}?`;if(e.method!==O.ping.method||!t.startsWith(n))return null;let r=new URLSearchParams(t.slice(n.length));return r.has(`nonce`)?r:null}function Ot(e){if(e===void 0)return null;let t=wt.exec(e);return t?t[1]:null}async function kt(t){let n=t.env??process.env,r=t.home??o(n),i=t.token??Ce(),a=new Te(t.folder),s=t.agent??{},c=new St({folder:a.root,files:a,env:n,home:r,version:e(),mcp:s.mcp===void 0?re():s.mcp,licensed:s.licensed,preview:s.preview,receipts:s.receipts===void 0?Le:s.receipts,changed:async()=>void 0},s.timings),l=/* @__PURE__ */ new Set,u=t.graceMs??O.graceMs,d=t.quietMs??O.quietMs,f=new Xe(u,performance.now()),p=(/* @__PURE__ */ new Date()).toISOString(),m=t.record??!0,h=ee(r,a.root),g=null,_=!1,v=null,y=()=>void 0,b=new Promise(e=>{y=e}),x=t=>({pid:process.pid,apiVersion:O.apiVersion,cliVersion:e()??``,startedAt:p,compatible:t.get(`apiVersion`)===String(O.apiVersion),retiring:_,busy:c.busy()}),S=async(e,t,n,r,i)=>{let a=new AbortController,o=n.held?f.hold(performance.now()):null;t.once(`close`,()=>{t.writableEnded||a.abort(),o?.(performance.now())});let s=null;try{let o;if(e.method!==`GET`){let t=await be(e,n.limit??1048576);if(t.length>0){if(!/^application\/json\b/i.test(e.headers[`content-type`]??``))throw I(415,`app.cli.web.reason.notJson`);try{o=JSON.parse(t.toString(`utf8`))}catch{throw I(400,`app.cli.web.reason.notJson`)}}}else e.resume();let l=Promise.resolve().then(()=>n.run({body:o,query:i,params:r,signal:a.signal},c));l.catch(()=>void 0);let u=n.held?await l:await Promise.race([l,new Promise((e,t)=>{s=setTimeout(()=>{a.abort(),t(I(504,`app.cli.web.reason.tookTooLong`))},de),s.unref()})]);if(a.signal.aborted&&t.destroyed)return;z(t,200,u)}catch(e){if(e instanceof R||e instanceof R)return void t.destroy();if(t.destroyed)return;L(t,e instanceof ue?e:we(e))}finally{s&&clearTimeout(s)}},C=(e,t,n)=>n.pathname===O.ping.path?(e.method===O.ping.method?z(t,200,x(n.searchParams)):L(t,I(405,`app.cli.web.reason.methodNotAllowed`),{Allow:O.ping.method}),!0):n.pathname===O.retire.path?(e.method===O.retire.method?(_=!0,z(t,200,{retiring:_,busy:c.retire()})):L(t,I(405,`app.cli.web.reason.methodNotAllowed`),{Allow:O.retire.method}),!0):n.pathname===O.shutdown.path&&(e.method===O.shutdown.method?(z(t,200,{stopping:!0}),setImmediate(()=>void D())):L(t,I(405,`app.cli.web.reason.methodNotAllowed`),{Allow:O.shutdown.method}),!0),w=async(e,t)=>{if(Ee(t),!g||!g.allowsHost(e.headers.host))return L(t,I(403,`app.cli.web.reason.wrongHost`));if(e.headers.origin!==void 0||e.headers[`sec-fetch-site`]!==void 0)return L(t,I(403,`app.cli.web.reason.wrongOrigin`));let n=Dt(e);if(n!==null){let e=n.get(`nonce`)??``;return Tt.test(e)?z(t,200,{pid:process.pid,apiVersion:O.apiVersion,compatible:n.get(`apiVersion`)===String(O.apiVersion),proof:ie(i,e)}):L(t,I(400,`app.cli.web.reason.badPath`,{path:``}))}if(!Se(Ot(e.headers.authorization),i))return L(t,I(401,`app.cli.web.reason.noToken`),{"WWW-Authenticate":`Bearer`});let r=e.url??``;if(r.length>8192)return L(t,I(414,`app.cli.web.reason.tooLong`));if(!r.startsWith(`/`)||r.startsWith(`//`))return L(t,I(400,`app.cli.web.reason.badPath`,{path:``}));let a;try{a=new URL(r,`http://${e.headers.host}`)}catch{return L(t,I(400,`app.cli.web.reason.badPath`,{path:``}))}if(C(e,t,a))return;let o=Et(e.method??``,a.pathname);if(o.kind===`none`)return L(t,I(404,`app.cli.web.reason.noSuchOperation`));if(o.kind===`method`)return L(t,I(405,`app.cli.web.reason.methodNotAllowed`),{Allow:o.allowed.join(`, `)});await S(e,t,o.route,o.params,a.searchParams)},T=Ue({maxHeaderSize:16384,requestTimeout:6e4,headersTimeout:15e3,keepAliveTimeout:5e3},(e,t)=>{w(e,t).catch(e=>{t.headersSent?t.destroy():L(t,we(e))})});T.maxConnections=64,T.on(`connection`,e=>{l.add(e),e.once(`close`,()=>l.delete(e))}),T.on(`clientError`,(e,t)=>{t.writable?t.end(`HTTP/1.1 400 Bad Request\r
|
|
7
|
-
Connection: close\r
|
|
8
|
-
Content-Length: 0\r
|
|
9
|
-
\r
|
|
10
|
-
`):t.destroy()});try{await new Promise((e,t)=>{T.once(`error`,t),T.listen(0,`127.0.0.1`,()=>{T.off(`error`,t),e()})})}catch(e){throw c.dispose(),e}let E=T.address().port;if(g=_e(`127.0.0.1`,E),m){if(await k(r,a.root))throw await new Promise(e=>T.close(()=>e())),c.dispose(),new Ct;await Ye(r,a.root),te(h,{pid:process.pid,port:E,token:i,apiVersion:O.apiVersion,cliVersion:e()??``,startedAt:p})}let D=()=>(v??=(async()=>{m&&ne(h,{pid:process.pid,token:i}),c.dispose();let e=new Promise(e=>T.close(()=>e()));T.closeIdleConnections(),setTimeout(()=>{for(let e of l)e.destroy();T.closeAllConnections()},500).unref(),await c.drained(),await e})().finally(()=>y()),v),A=setInterval(()=>{if(v)return;let e=f.tick(performance.now(),c.busy(),_);e.unattended&&(c.cancelUnanswered(),c.stopQuiet(d)),e.leave&&D()},t.checkMs??Math.min(1e3,Math.max(20,u/4)));return A.unref(),b.then(()=>clearInterval(A)),{server:T,manager:c,port:E,token:i,exited:b,close:D}}function Q(e,t){let n=Number(e[t]);return Number.isInteger(n)&&n>0?n:void 0}function $(e,t){return new Promise(n=>{let r=()=>{process.off(`SIGINT`,r),process.off(`SIGTERM`,r),e.stdin.off(`end`,r),e.stdin.off(`close`,r),e.stdin.off(`error`,r),n()};process.on(`SIGINT`,r),process.on(`SIGTERM`,r),t&&(e.stdin.on(`end`,r),e.stdin.on(`close`,r),e.stdin.on(`error`,r)),e.stdin.resume()})}function At(e){return new Promise(t=>setTimeout(t,e))}async function jt(e,t,n){let i=await k(t,e);if(i)return n.write(JSON.stringify({port:i.port,token:i.token})),{ok:!0,lines:[]};let a=A(`agent`,`serve`,`--project`,e);if(!a)return{ok:!1,lines:[r(`app.agent.notFound`)]};let o={error:null},s=Ve(a.command,a.args,{detached:!0,stdio:[`ignore`,`inherit`,`inherit`],env:{...process.env,...a.env,PENSTOCK_HOME:t},windowsHide:!0});s.on(`error`,e=>{o.error=e});let c=performance.now()+O.startMs;for(;;){let i=await k(t,e);if(i)return s.unref(),n.write(JSON.stringify({port:i.port,token:i.token})),{ok:!0,lines:[]};if(o.error)return{ok:!1,lines:[r(`app.agent.failed`,{detail:o.error.message})]};if(performance.now()>=c)return s.pid!==void 0&&j(s.pid,`SIGTERM`),{ok:!1,lines:[r(`app.agent.timeout`)]};await At(O.pollMs)}}async function Mt(e,t={stdin:process.stdin,write:e=>process.stdout.write(`${e}\n`)},n={}){if(e===void 0||e===``)return{ok:!1,lines:[r(`app.cli.agentServe.needsProject`)]};let i=B.resolve(e),a;try{a=H(i)}catch{return{ok:!1,lines:[De(i)]}}if(!a.isDirectory())return{ok:!1,lines:[r(`app.cli.web.notAFolder`,{folder:i})]};let s=o(process.env);if(n.detach)return jt(i,s,t);let c=await k(s,i);if(c)return t.write(JSON.stringify({port:c.port,token:c.token})),await $(t,!0),{ok:!0,lines:[]};let l;try{l=await kt({folder:i,home:s,graceMs:Q(process.env,`PENSTOCK_AGENT_GRACE_MS`),quietMs:Q(process.env,`PENSTOCK_AGENT_QUIET_MS`)})}catch(e){if(e instanceof Ct){let e=await k(s,i);if(e)return t.write(JSON.stringify({port:e.port,token:e.token})),await $(t,!0),{ok:!0,lines:[]}}return{ok:!1,lines:[r(`app.cli.web.cannotListen`,{reason:e instanceof Error?e.message:String(e)})]}}return t.write(JSON.stringify({port:l.port,token:l.token})),await Promise.race([$(t,!1),l.exited]),await l.close(),{ok:!0,lines:[]}}export{Mt as agentServeCommand};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{u as e}from"./chunk-license-BG88gpDZ.js";import{r as t}from"./chunk-translator-DNm9zRpP.js";import{s as n,t as r}from"./chunk-features-C6o8of19.js";import{a as i}from"./chunk-moddle-D3Ym38EZ.js";import{a,l as o,u as s}from"./chunk-file-BswMa3FN.js";import{a as c}from"./chunk-migrateApply-CzOkgKhB.js";import{r as l,t as u}from"./chunk-context-rCJvBM9p.js";import{d,l as f,m as p,u as m}from"./chunk-commands-B4PoZbpX.js";import{t as h}from"./chunk-plural-Dn-7ulHf.js";import{t as g}from"./chunk-diagrams-BukAOL0g.js";import{t as _}from"./chunk-connections-D_wC6d0W.js";import{a as v,t as y}from"./chunk-safeWrite-RgLbdyzl.js";import b from"node:path";import{existsSync as x,mkdirSync as S,readFileSync as C,realpathSync as w,statSync as T}from"node:fs";const E=/agenticai|aiAgent|toolContainer|fromAi|AgentDefinition/;async function D(e,t){let n={agents:[],orphans:[],standalone:[],findings:[]},r=e=>e.remote||e.clientId===null||!t?null:t(e.clientId);for(let a of e){if(!E.test(a.text))continue;let e=await i(a.text);if(!e)continue;let o=f(e),s=d(o,t?{mcpStatus:t}:{});for(let e of o.agents)n.agents.push({file:a.path,agent:e,clients:e.mcpClients.map(e=>({elementId:e.elementId,status:r(e)})),findings:s.filter(t=>t.agentId===e.id)});for(let e of o.orphans)n.orphans.push({...e,file:a.path});for(let e of o.standaloneMcp)n.standalone.push({file:a.path,client:e,status:r(e)});for(let e of s)n.findings.push({file:a.path,finding:e})}return n}async function O(e){let t=u(e),n=w(t.root),r=[];for(let i of g(e,[`process`]).sort()){let e=c(i,n,[]);e!==null&&r.push({path:b.relative(t.root,i).split(b.sep).join(`/`),text:e})}let i;try{let e=new Map(_(t.root).rows.filter(e=>e.kind===`mcp-client`).map(e=>[e.name,e.status]));i=t=>e.get(t)??`unverifiable`}catch{i=void 0}return{root:n,report:await D(r,i)}}const k=`agent`;function A(e,t){if(e?.id===t)return e;for(let n of e?.flowElements??[]){let e=A(n,t);if(e)return e}return null}function j(e,t){for(let n of e?.rootElements??[]){let e=A(n,t);if(e)return e;for(let e of n.participants??[]){let n=e.processRef?A(e.processRef,t):null;if(n)return n}}return null}function M(e,t){return e?.extensionElements?.values?.find(e=>e.$type===t)}function N(e){let t=M(e,`zeebe:TaskDefinition`)?.type;return typeof t==`string`&&t!==``&&!t.startsWith(`=`)?t:null}function P(e){let t=(M(e,`zeebe:TaskHeaders`)?.values??[]).find(e=>e.key===`resultVariable`)?.value;return typeof t==`string`&&t.trim()!==``&&!t.startsWith(`=`)?t.trim():k}function F(e){return{processDefinitionId:e}}function I(e,n,r){let i=F(e.processId),a=[{type:`CREATE_PROCESS_INSTANCE`,processDefinitionSelector:F(e.processId),variables:{}},{type:`MOCK_JOB_WORKER_COMPLETE_JOB`,jobType:n,variables:{[r]:{context:{},toolCalls:[],responseText:t(`app.agents.scenario.stubAnswer`)}}},{type:`ASSERT_ELEMENT_INSTANCE`,processInstanceSelector:i,elementSelector:{elementId:e.id},state:`IS_COMPLETED`}];return e.tools.length>0&&a.push({type:`ASSERT_ELEMENT_INSTANCES`,processInstanceSelector:i,elementSelectors:e.tools.map(e=>({elementId:e.id})),state:`IS_NOT_ACTIVATED`}),{instructions:a,notes:[t(`app.agents.scenario.noteTaskStub`)]}}function L(e){let n=F(e.processId),r=e.tools[0],i=[{type:`CREATE_PROCESS_INSTANCE`,processDefinitionSelector:F(e.processId),variables:{}},{type:`COMPLETE_JOB_AD_HOC_SUB_PROCESS`,jobSelector:{elementId:e.id},...r?{activateElements:[{elementId:r.id}]}:{},variables:{agent:{responseText:t(`app.agents.scenario.stubAnswer`)}}}];return r&&i.push({type:`ASSERT_ELEMENT_INSTANCE`,processInstanceSelector:n,elementSelector:{elementId:r.id},state:`IS_COMPLETED`}),i.push({type:`ASSERT_ELEMENT_INSTANCE`,processInstanceSelector:n,elementSelector:{elementId:e.id},state:`IS_ACTIVE`}),{instructions:i,notes:[t(`app.agents.scenario.noteSubprocessRunner`)]}}async function R(e,n){let r=await i(e);if(!r)return{scenarios:[],missing:t(`app.agents.scenario.unreadable`)};let a=f(r),o=n===void 0?a.agents:a.agents.filter(e=>e.id===n);if(o.length===0)return{scenarios:[],missing:n===void 0?t(`app.agents.scenario.noAgents`):t(`app.agents.scenario.noSuchAgent`,{id:n})};let s=[];for(let e of o){let n=j(r,e.id),i=n?N(n):null,a=n?m(n):{id:null,version:null};if(!i){s.push({agentId:e.id,processId:e.processId,runnable:!1,notes:[t(`app.agents.scenario.noJobType`,{template:a.id??``})],testCase:null});continue}let o=e.kind===`task`?I(e,i,n?P(n):k):L(e);s.push({agentId:e.id,processId:e.processId,runnable:e.kind===`task`,notes:o.notes,testCase:{name:t(`app.agents.scenario.name`,{agent:e.id}),description:t(`app.agents.scenario.description`,{agent:e.name||e.id}),instructions:o.instructions}})}return{scenarios:s,missing:null}}async function z(e){let n=u(e.file).root,r=b.resolve(e.file),i=x(r)?c(r,w(n),[]):null;if(i===null)return{ok:!1,reason:t(`app.agents.scenario.unreadable`)};let l=await R(i,e.agent);if(l.missing!==null)return{ok:!1,reason:l.missing};let d=b.resolve(s(r));try{e.confine?.(r),e.confine?.(d)}catch(e){return{ok:!1,reason:e instanceof Error?e.message:String(e)}}let f=l.scenarios.flatMap(e=>e.testCase?[e.testCase]:[]),p=a(x(d)?C(d,`utf8`):null,f);if(`problem`in p)return{ok:!1,reason:p.problem};let m=!1;if(e.write&&p.added.length>0)try{S(b.dirname(d),{recursive:!0}),v([{path:d,content:o(p.file)}],n,{replace:!0}),m=!0}catch(e){if(e instanceof y)return{ok:!1,reason:e.message};throw e}return{ok:!0,file:r,casesFile:d,scenarios:l.scenarios,added:p.added,kept:p.kept,written:m}}function B(e){return{agents:e.agents.map(({file:e,agent:t,clients:n,findings:r})=>({file:e,...t,mcpClients:t.mcpClients.map(e=>({...e,status:n.find(t=>t.elementId===e.elementId)?.status??null})),findings:r.map(e=>({rule:`agents/${e.rule}`,severity:e.severity,element:e.elementId,message:p(e)}))})),orphans:e.orphans,standalone:e.standalone.map(({file:e,client:t,status:n})=>({file:e,...t,status:n})),findings:e.findings.map(({file:e,finding:t})=>({file:e,rule:`agents/${t.rule}`,severity:t.severity,element:t.elementId,message:p(t)}))}}function V(e){let t=e.parameters.map(e=>`${e.name}${e.type?`: ${e.type}`:``}`).join(`, `);return t===``?e.id:`${e.id} (${t})`}function H(e,n){let r=e.clientId??e.url??e.elementId;return n===null?r:`${r}: ${t(`app.cli.connections.status.${n}`)}`}function U(e){let{agent:n}=e,r=[n.provider,n.model].filter(e=>!!e).join(` / `),i=[`${e.file} ${n.id}${n.name?` "${n.name}"`:``} ${t(n.kind===`task`?`app.cli.agents.kindTask`:`app.cli.agents.kindSubprocess`)}${r?` ${r}`:``}`,` ${t(`app.cli.agents.limits`,{calls:n.maxModelCalls??t(`app.cli.agents.unset`)})}`,` ${t(`app.cli.agents.memory`,{storage:n.memory.storage??t(`app.cli.agents.unset`),window:n.memory.contextWindowSize??t(`app.cli.agents.unset`)})}`,` ${n.tools.length===0?t(`app.cli.agents.noTools`):t(`app.cli.agents.tools`,{count:n.tools.length})}`,...n.tools.map(e=>` ${V(e)}`)];if(e.clients.length>0){i.push(` ${t(`app.cli.agents.clients`)}`);for(let t of n.mcpClients)i.push(` ${H(t,e.clients.find(e=>e.elementId===t.elementId)?.status??null)}`)}for(let t of e.findings)i.push(` ${t.severity} agents/${t.rule}: ${p(t)}`);return i}function W(e,n){let r=[t(`app.cli.agents.title`,{folder:l(e)})];if(n.agents.length===0&&n.orphans.length===0&&n.standalone.length===0)return[...r,``,t(`app.cli.agents.none`)];for(let e of n.agents)r.push(``,...U(e));for(let e of n.orphans)r.push(``,t(`app.cli.agents.orphan`,{id:e.id,file:e.file}));for(let e of n.standalone)r.push(``,t(`app.cli.agents.standalone`,{client:H(e.client,e.status),file:e.file}));return r.push(``,h(n.agents.length,`app.cli.agents.count.agent`)),r}async function G(i,a,o){if(!i)return{ok:!1,lines:[t(`app.cli.agents.scenarioNeedsFile`)]};let s=o??await e();if(a.write&&!r(s))return{ok:!1,lines:n(s,`agent-tools`)};let c=await z({file:i,write:a.write,...a.agent===void 0?{}:{agent:a.agent}});if(!c.ok)return{ok:!1,lines:[c.reason]};let u=l(c.casesFile);if(a.format===`json`)return{ok:!0,refused:!1,lines:[JSON.stringify({file:l(c.file),casesFile:u,write:a.write,written:c.written,added:c.added,kept:c.kept,scenarios:c.scenarios.map(e=>({agent:e.agentId,runnable:e.runnable,notes:e.notes,testCase:e.testCase}))},null,2)]};let d=[];for(let e of c.scenarios)d.push(e.testCase?t(`app.cli.agents.scenario`,{name:e.testCase.name}):t(`app.cli.agents.scenarioSkipped`,{agent:e.agentId})),e.notes.forEach(e=>d.push(` - ${e}`));return d.push(``),c.added.length===0?d.push(t(`app.cli.agents.scenarioExists`,{file:u})):c.written?d.push(t(`app.cli.agents.scenarioWritten`,{file:u})):d.push(t(`app.cli.agents.scenarioDryRun`,{file:u})),{ok:!0,lines:d}}async function K(e,n,r){if(e[0]===`scenario`)return G(e[1],n,r);let i=b.resolve(e[0]??process.cwd());if(!x(i)||!T(i).isDirectory())return{ok:!1,lines:[t(`app.cli.web.notAFolder`,{folder:e[0]??i})]};let{root:a,report:o}=await O(i),s=!o.findings.some(e=>e.finding.severity===`error`);return n.format===`json`?{ok:s,refused:!1,lines:[JSON.stringify({root:l(a),...B(o)},null,2)]}:{ok:s,refused:!1,lines:W(a,o)}}export{K as agentsCommand};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{u as e}from"./chunk-license-BG88gpDZ.js";import{r as t}from"./chunk-translator-DNm9zRpP.js";import{s as n,t as r}from"./chunk-features-C6o8of19.js";import{n as i}from"./chunk-status-CmYxwOCn.js";import{a}from"./chunk-moddle-D3Ym38EZ.js";import{a as o,o as s,r as c,t as l}from"./chunk-migrateApply-CzOkgKhB.js";import{t as u}from"./chunk-context-rCJvBM9p.js";import{c as d,f,p,u as m}from"./chunk-commands-B4PoZbpX.js";import{t as h}from"./chunk-diagrams-BukAOL0g.js";import g from"node:path";import{realpathSync as _}from"node:fs";var v={id:`io.camunda.connectors.agenticai.ai-agent-subprocess.v2`,version:1,elementType:`bpmn:AdHocSubProcess`,taskDefinitionType:`io.camunda.agenticai:aiagent:subprocess:2`,agentType:`aiAgentSubProcess`,inputs:[{name:`provider.type`,type:`Dropdown`,value:`anthropic`,choices:[`anthropic`,`bedrock`,`openai`,`google-gemini`,`mistral`,`custom`]},{name:`provider.anthropic.backend.type`,type:`Dropdown`,value:`anthropic-api`,condition:{property:`provider.type`,equals:`anthropic`},choices:[`anthropic-api`,`aws-bedrock-mantle`,`foundry`,`custom`]},{name:`provider.anthropic.backend.anthropic.apiKey`,type:`String`,feel:`optional`,condition:{allMatch:[{property:`provider.anthropic.backend.type`,equals:`anthropic-api`},{property:`provider.type`,equals:`anthropic`}]}},{name:`provider.anthropic.backend.anthropic.endpoint`,type:`Hidden`,condition:{allMatch:[{property:`provider.anthropic.backend.type`,equals:`anthropic-api`},{property:`provider.type`,equals:`anthropic`}]},optional:!0},{name:`provider.anthropic.backend.awsBedrockMantle.region`,type:`String`,feel:`optional`,condition:{allMatch:[{property:`provider.anthropic.backend.type`,equals:`aws-bedrock-mantle`},{property:`provider.type`,equals:`anthropic`}]}},{name:`provider.anthropic.backend.awsBedrockMantle.endpoint`,type:`String`,feel:`optional`,condition:{allMatch:[{property:`provider.anthropic.backend.type`,equals:`aws-bedrock-mantle`},{property:`provider.type`,equals:`anthropic`}]},optional:!0},{name:`provider.anthropic.backend.awsBedrockMantle.authentication.type`,type:`Dropdown`,value:`credentials`,condition:{allMatch:[{property:`provider.anthropic.backend.type`,equals:`aws-bedrock-mantle`},{property:`provider.type`,equals:`anthropic`}]},choices:[`credentials`,`apiKey`,`defaultCredentialsChain`]},{name:`provider.anthropic.backend.awsBedrockMantle.authentication.accessKey`,type:`String`,feel:`optional`,condition:{allMatch:[{property:`provider.anthropic.backend.awsBedrockMantle.authentication.type`,equals:`credentials`},{property:`provider.anthropic.backend.type`,equals:`aws-bedrock-mantle`},{property:`provider.type`,equals:`anthropic`}]}},{name:`provider.anthropic.backend.awsBedrockMantle.authentication.secretKey`,type:`String`,feel:`optional`,condition:{allMatch:[{property:`provider.anthropic.backend.awsBedrockMantle.authentication.type`,equals:`credentials`},{property:`provider.anthropic.backend.type`,equals:`aws-bedrock-mantle`},{property:`provider.type`,equals:`anthropic`}]}},{name:`provider.anthropic.backend.awsBedrockMantle.authentication.apiKey`,type:`String`,feel:`optional`,condition:{allMatch:[{property:`provider.anthropic.backend.awsBedrockMantle.authentication.type`,equals:`apiKey`},{property:`provider.anthropic.backend.type`,equals:`aws-bedrock-mantle`},{property:`provider.type`,equals:`anthropic`}]}},{name:`provider.anthropic.backend.foundry.endpoint`,type:`String`,feel:`optional`,condition:{allMatch:[{property:`provider.anthropic.backend.type`,equals:`foundry`},{property:`provider.type`,equals:`anthropic`}]}},{name:`provider.anthropic.backend.foundry.authentication.type`,type:`Dropdown`,value:`apiKey`,condition:{allMatch:[{property:`provider.anthropic.backend.type`,equals:`foundry`},{property:`provider.type`,equals:`anthropic`}]},choices:[`apiKey`,`clientCredentials`,`managedIdentity`]},{name:`provider.anthropic.backend.foundry.authentication.apiKey`,type:`String`,feel:`optional`,condition:{allMatch:[{property:`provider.anthropic.backend.foundry.authentication.type`,equals:`apiKey`},{property:`provider.anthropic.backend.type`,equals:`foundry`},{property:`provider.type`,equals:`anthropic`}]}},{name:`provider.anthropic.backend.foundry.authentication.clientId`,type:`String`,feel:`optional`,condition:{allMatch:[{property:`provider.anthropic.backend.foundry.authentication.type`,equals:`clientCredentials`},{property:`provider.anthropic.backend.type`,equals:`foundry`},{property:`provider.type`,equals:`anthropic`}]},optional:!0},{name:`provider.anthropic.backend.foundry.authentication.clientSecret`,type:`String`,feel:`optional`,condition:{allMatch:[{property:`provider.anthropic.backend.foundry.authentication.type`,equals:`clientCredentials`},{property:`provider.anthropic.backend.type`,equals:`foundry`},{property:`provider.type`,equals:`anthropic`}]}},{name:`provider.anthropic.backend.foundry.authentication.tenantId`,type:`String`,feel:`optional`,condition:{allMatch:[{property:`provider.anthropic.backend.foundry.authentication.type`,equals:`clientCredentials`},{property:`provider.anthropic.backend.type`,equals:`foundry`},{property:`provider.type`,equals:`anthropic`}]}},{name:`provider.anthropic.backend.foundry.authentication.authorityHost`,type:`String`,feel:`optional`,condition:{allMatch:[{property:`provider.anthropic.backend.foundry.authentication.type`,equals:`clientCredentials`},{property:`provider.anthropic.backend.type`,equals:`foundry`},{property:`provider.type`,equals:`anthropic`}]},optional:!0},{name:`provider.anthropic.backend.foundry.authentication.entraIdScope`,type:`Hidden`,condition:{allMatch:[{property:`provider.anthropic.backend.foundry.authentication.type`,equals:`clientCredentials`},{property:`provider.anthropic.backend.type`,equals:`foundry`},{property:`provider.type`,equals:`anthropic`}]},optional:!0},{name:`provider.anthropic.backend.foundry.authentication.clientId`,id:`provider.anthropic.backend.foundry.authentication.managedIdentity.clientId`,type:`String`,feel:`optional`,condition:{allMatch:[{property:`provider.anthropic.backend.foundry.authentication.type`,equals:`managedIdentity`},{property:`provider.anthropic.backend.type`,equals:`foundry`},{property:`provider.type`,equals:`anthropic`}]},optional:!0},{name:`provider.anthropic.backend.foundry.authentication.entraIdScope`,id:`provider.anthropic.backend.foundry.authentication.managedIdentity.entraIdScope`,type:`Hidden`,condition:{allMatch:[{property:`provider.anthropic.backend.foundry.authentication.type`,equals:`managedIdentity`},{property:`provider.anthropic.backend.type`,equals:`foundry`},{property:`provider.type`,equals:`anthropic`}]},optional:!0},{name:`provider.anthropic.backend.custom.endpoint`,type:`String`,feel:`optional`,condition:{allMatch:[{property:`provider.anthropic.backend.type`,equals:`custom`},{property:`provider.type`,equals:`anthropic`}]}},{name:`provider.anthropic.backend.custom.authentication.type`,type:`Dropdown`,value:`none`,condition:{allMatch:[{property:`provider.anthropic.backend.type`,equals:`custom`},{property:`provider.type`,equals:`anthropic`}]},choices:[`none`,`apiKey`,`oauth-client-credentials-flow`]},{name:`provider.anthropic.backend.custom.authentication.apiKey`,type:`String`,feel:`optional`,condition:{allMatch:[{property:`provider.anthropic.backend.custom.authentication.type`,equals:`apiKey`},{property:`provider.anthropic.backend.type`,equals:`custom`},{property:`provider.type`,equals:`anthropic`}]}},{name:`provider.anthropic.backend.custom.authentication.oauthTokenEndpoint`,type:`String`,feel:`optional`,condition:{allMatch:[{property:`provider.anthropic.backend.custom.authentication.type`,equals:`oauth-client-credentials-flow`},{property:`provider.anthropic.backend.type`,equals:`custom`},{property:`provider.type`,equals:`anthropic`}]}},{name:`provider.anthropic.backend.custom.authentication.clientId`,type:`String`,feel:`optional`,condition:{allMatch:[{property:`provider.anthropic.backend.custom.authentication.type`,equals:`oauth-client-credentials-flow`},{property:`provider.anthropic.backend.type`,equals:`custom`},{property:`provider.type`,equals:`anthropic`}]}},{name:`provider.anthropic.backend.custom.authentication.clientSecret`,type:`String`,feel:`optional`,condition:{allMatch:[{property:`provider.anthropic.backend.custom.authentication.type`,equals:`oauth-client-credentials-flow`},{property:`provider.anthropic.backend.type`,equals:`custom`},{property:`provider.type`,equals:`anthropic`}]}},{name:`provider.anthropic.backend.custom.authentication.audience`,type:`String`,feel:`optional`,condition:{allMatch:[{property:`provider.anthropic.backend.custom.authentication.type`,equals:`oauth-client-credentials-flow`},{property:`provider.anthropic.backend.type`,equals:`custom`},{property:`provider.type`,equals:`anthropic`}]},optional:!0},{name:`provider.anthropic.backend.custom.authentication.clientAuthentication`,type:`Dropdown`,value:`BASIC_AUTH_HEADER`,condition:{allMatch:[{property:`provider.anthropic.backend.custom.authentication.type`,equals:`oauth-client-credentials-flow`},{property:`provider.anthropic.backend.type`,equals:`custom`},{property:`provider.type`,equals:`anthropic`}]},choices:[`BASIC_AUTH_HEADER`,`CREDENTIALS_BODY`]},{name:`provider.anthropic.backend.custom.authentication.scopes`,type:`String`,feel:`optional`,condition:{allMatch:[{property:`provider.anthropic.backend.custom.authentication.type`,equals:`oauth-client-credentials-flow`},{property:`provider.anthropic.backend.type`,equals:`custom`},{property:`provider.type`,equals:`anthropic`}]},optional:!0},{name:`provider.anthropic.timeouts.timeout`,type:`String`,feel:`optional`,condition:{property:`provider.type`,equals:`anthropic`},optional:!0},{name:`provider.bedrock.region`,type:`String`,feel:`optional`,condition:{property:`provider.type`,equals:`bedrock`}},{name:`provider.bedrock.endpoint`,type:`String`,feel:`optional`,condition:{property:`provider.type`,equals:`bedrock`},optional:!0},{name:`provider.bedrock.authentication.type`,type:`Dropdown`,value:`credentials`,condition:{property:`provider.type`,equals:`bedrock`},choices:[`credentials`,`apiKey`,`defaultCredentialsChain`]},{name:`provider.bedrock.authentication.accessKey`,type:`String`,feel:`optional`,condition:{allMatch:[{property:`provider.bedrock.authentication.type`,equals:`credentials`},{property:`provider.type`,equals:`bedrock`}]}},{name:`provider.bedrock.authentication.secretKey`,type:`String`,feel:`optional`,condition:{allMatch:[{property:`provider.bedrock.authentication.type`,equals:`credentials`},{property:`provider.type`,equals:`bedrock`}]}},{name:`provider.bedrock.authentication.apiKey`,type:`String`,feel:`optional`,condition:{allMatch:[{property:`provider.bedrock.authentication.type`,equals:`apiKey`},{property:`provider.type`,equals:`bedrock`}]}},{name:`provider.bedrock.timeouts.timeout`,type:`String`,feel:`optional`,condition:{property:`provider.type`,equals:`bedrock`},optional:!0},{name:`provider.openai.api.type`,type:`Dropdown`,value:`responses`,condition:{property:`provider.type`,equals:`openai`},choices:[`responses`,`completions`]},{name:`provider.openai.backend.type`,type:`Dropdown`,value:`openai-api`,condition:{property:`provider.type`,equals:`openai`},choices:[`openai-api`,`foundry`,`custom`]},{name:`provider.openai.backend.openai.apiKey`,type:`String`,feel:`optional`,condition:{allMatch:[{property:`provider.openai.backend.type`,equals:`openai-api`},{property:`provider.type`,equals:`openai`}]}},{name:`provider.openai.backend.openai.organizationId`,type:`String`,feel:`optional`,condition:{allMatch:[{property:`provider.openai.backend.type`,equals:`openai-api`},{property:`provider.type`,equals:`openai`}]},optional:!0},{name:`provider.openai.backend.openai.projectId`,type:`String`,feel:`optional`,condition:{allMatch:[{property:`provider.openai.backend.type`,equals:`openai-api`},{property:`provider.type`,equals:`openai`}]},optional:!0},{name:`provider.openai.backend.openai.endpoint`,type:`Hidden`,condition:{allMatch:[{property:`provider.openai.backend.type`,equals:`openai-api`},{property:`provider.type`,equals:`openai`}]},optional:!0},{name:`provider.openai.backend.foundry.endpoint`,type:`String`,feel:`optional`,condition:{allMatch:[{property:`provider.openai.backend.type`,equals:`foundry`},{property:`provider.type`,equals:`openai`}]}},{name:`provider.openai.backend.foundry.authentication.type`,type:`Dropdown`,value:`apiKey`,condition:{allMatch:[{property:`provider.openai.backend.type`,equals:`foundry`},{property:`provider.type`,equals:`openai`}]},choices:[`apiKey`,`clientCredentials`,`managedIdentity`]},{name:`provider.openai.backend.foundry.authentication.apiKey`,type:`String`,feel:`optional`,condition:{allMatch:[{property:`provider.openai.backend.foundry.authentication.type`,equals:`apiKey`},{property:`provider.openai.backend.type`,equals:`foundry`},{property:`provider.type`,equals:`openai`}]}},{name:`provider.openai.backend.foundry.authentication.clientId`,type:`String`,feel:`optional`,condition:{allMatch:[{property:`provider.openai.backend.foundry.authentication.type`,equals:`clientCredentials`},{property:`provider.openai.backend.type`,equals:`foundry`},{property:`provider.type`,equals:`openai`}]},optional:!0},{name:`provider.openai.backend.foundry.authentication.clientSecret`,type:`String`,feel:`optional`,condition:{allMatch:[{property:`provider.openai.backend.foundry.authentication.type`,equals:`clientCredentials`},{property:`provider.openai.backend.type`,equals:`foundry`},{property:`provider.type`,equals:`openai`}]}},{name:`provider.openai.backend.foundry.authentication.tenantId`,type:`String`,feel:`optional`,condition:{allMatch:[{property:`provider.openai.backend.foundry.authentication.type`,equals:`clientCredentials`},{property:`provider.openai.backend.type`,equals:`foundry`},{property:`provider.type`,equals:`openai`}]}},{name:`provider.openai.backend.foundry.authentication.authorityHost`,type:`String`,feel:`optional`,condition:{allMatch:[{property:`provider.openai.backend.foundry.authentication.type`,equals:`clientCredentials`},{property:`provider.openai.backend.type`,equals:`foundry`},{property:`provider.type`,equals:`openai`}]},optional:!0},{name:`provider.openai.backend.foundry.authentication.entraIdScope`,type:`Hidden`,condition:{allMatch:[{property:`provider.openai.backend.foundry.authentication.type`,equals:`clientCredentials`},{property:`provider.openai.backend.type`,equals:`foundry`},{property:`provider.type`,equals:`openai`}]},optional:!0},{name:`provider.openai.backend.foundry.authentication.clientId`,id:`provider.openai.backend.foundry.authentication.managedIdentity.clientId`,type:`String`,feel:`optional`,condition:{allMatch:[{property:`provider.openai.backend.foundry.authentication.type`,equals:`managedIdentity`},{property:`provider.openai.backend.type`,equals:`foundry`},{property:`provider.type`,equals:`openai`}]},optional:!0},{name:`provider.openai.backend.foundry.authentication.entraIdScope`,id:`provider.openai.backend.foundry.authentication.managedIdentity.entraIdScope`,type:`Hidden`,condition:{allMatch:[{property:`provider.openai.backend.foundry.authentication.type`,equals:`managedIdentity`},{property:`provider.openai.backend.type`,equals:`foundry`},{property:`provider.type`,equals:`openai`}]},optional:!0},{name:`provider.openai.backend.custom.endpoint`,type:`String`,feel:`optional`,condition:{allMatch:[{property:`provider.openai.backend.type`,equals:`custom`},{property:`provider.type`,equals:`openai`}]}},{name:`provider.openai.backend.custom.authentication.type`,type:`Dropdown`,value:`none`,condition:{allMatch:[{property:`provider.openai.backend.type`,equals:`custom`},{property:`provider.type`,equals:`openai`}]},choices:[`none`,`apiKey`,`oauth-client-credentials-flow`]},{name:`provider.openai.backend.custom.authentication.apiKey`,type:`String`,feel:`optional`,condition:{allMatch:[{property:`provider.openai.backend.custom.authentication.type`,equals:`apiKey`},{property:`provider.openai.backend.type`,equals:`custom`},{property:`provider.type`,equals:`openai`}]}},{name:`provider.openai.backend.custom.authentication.oauthTokenEndpoint`,type:`String`,feel:`optional`,condition:{allMatch:[{property:`provider.openai.backend.custom.authentication.type`,equals:`oauth-client-credentials-flow`},{property:`provider.openai.backend.type`,equals:`custom`},{property:`provider.type`,equals:`openai`}]}},{name:`provider.openai.backend.custom.authentication.clientId`,type:`String`,feel:`optional`,condition:{allMatch:[{property:`provider.openai.backend.custom.authentication.type`,equals:`oauth-client-credentials-flow`},{property:`provider.openai.backend.type`,equals:`custom`},{property:`provider.type`,equals:`openai`}]}},{name:`provider.openai.backend.custom.authentication.clientSecret`,type:`String`,feel:`optional`,condition:{allMatch:[{property:`provider.openai.backend.custom.authentication.type`,equals:`oauth-client-credentials-flow`},{property:`provider.openai.backend.type`,equals:`custom`},{property:`provider.type`,equals:`openai`}]}},{name:`provider.openai.backend.custom.authentication.audience`,type:`String`,feel:`optional`,condition:{allMatch:[{property:`provider.openai.backend.custom.authentication.type`,equals:`oauth-client-credentials-flow`},{property:`provider.openai.backend.type`,equals:`custom`},{property:`provider.type`,equals:`openai`}]},optional:!0},{name:`provider.openai.backend.custom.authentication.clientAuthentication`,type:`Dropdown`,value:`BASIC_AUTH_HEADER`,condition:{allMatch:[{property:`provider.openai.backend.custom.authentication.type`,equals:`oauth-client-credentials-flow`},{property:`provider.openai.backend.type`,equals:`custom`},{property:`provider.type`,equals:`openai`}]},choices:[`BASIC_AUTH_HEADER`,`CREDENTIALS_BODY`]},{name:`provider.openai.backend.custom.authentication.scopes`,type:`String`,feel:`optional`,condition:{allMatch:[{property:`provider.openai.backend.custom.authentication.type`,equals:`oauth-client-credentials-flow`},{property:`provider.openai.backend.type`,equals:`custom`},{property:`provider.type`,equals:`openai`}]},optional:!0},{name:`provider.openai.timeouts.timeout`,type:`String`,feel:`optional`,condition:{property:`provider.type`,equals:`openai`},optional:!0},{name:`provider.googleGemini.backend.type`,type:`Dropdown`,value:`google-gemini-api`,condition:{property:`provider.type`,equals:`google-gemini`},choices:[`google-gemini-api`,`google-vertex-ai`]},{name:`provider.googleGemini.backend.googleGeminiApi.apiKey`,type:`String`,feel:`optional`,condition:{allMatch:[{property:`provider.googleGemini.backend.type`,equals:`google-gemini-api`},{property:`provider.type`,equals:`google-gemini`}]}},{name:`provider.googleGemini.backend.googleGeminiApi.endpoint`,type:`Hidden`,condition:{allMatch:[{property:`provider.googleGemini.backend.type`,equals:`google-gemini-api`},{property:`provider.type`,equals:`google-gemini`}]},optional:!0},{name:`provider.googleGemini.backend.googleVertexAi.projectId`,type:`String`,feel:`optional`,condition:{allMatch:[{property:`provider.googleGemini.backend.type`,equals:`google-vertex-ai`},{property:`provider.type`,equals:`google-gemini`}]}},{name:`provider.googleGemini.backend.googleVertexAi.region`,type:`String`,feel:`optional`,condition:{allMatch:[{property:`provider.googleGemini.backend.type`,equals:`google-vertex-ai`},{property:`provider.type`,equals:`google-gemini`}]}},{name:`provider.googleGemini.backend.googleVertexAi.endpoint`,type:`Hidden`,condition:{allMatch:[{property:`provider.googleGemini.backend.type`,equals:`google-vertex-ai`},{property:`provider.type`,equals:`google-gemini`}]},optional:!0},{name:`provider.googleGemini.backend.googleVertexAi.authentication.type`,type:`Dropdown`,value:`serviceAccountCredentials`,condition:{allMatch:[{property:`provider.googleGemini.backend.type`,equals:`google-vertex-ai`},{property:`provider.type`,equals:`google-gemini`}]},choices:[`serviceAccountCredentials`,`applicationDefaultCredentials`]},{name:`provider.googleGemini.backend.googleVertexAi.authentication.jsonKey`,type:`String`,feel:`optional`,condition:{allMatch:[{property:`provider.googleGemini.backend.googleVertexAi.authentication.type`,equals:`serviceAccountCredentials`},{property:`provider.googleGemini.backend.type`,equals:`google-vertex-ai`},{property:`provider.type`,equals:`google-gemini`}]}},{name:`provider.googleGemini.timeouts.timeout`,type:`String`,feel:`optional`,condition:{property:`provider.type`,equals:`google-gemini`},optional:!0},{name:`provider.mistral.backend.type`,type:`Dropdown`,value:`mistral-api`,condition:{property:`provider.type`,equals:`mistral`},choices:[`mistral-api`,`custom`]},{name:`provider.mistral.backend.mistral.apiKey`,type:`String`,feel:`optional`,condition:{allMatch:[{property:`provider.mistral.backend.type`,equals:`mistral-api`},{property:`provider.type`,equals:`mistral`}]}},{name:`provider.mistral.backend.mistral.endpoint`,type:`Hidden`,value:`https://api.mistral.ai/v1`,condition:{allMatch:[{property:`provider.mistral.backend.type`,equals:`mistral-api`},{property:`provider.type`,equals:`mistral`}]},optional:!0},{name:`provider.mistral.backend.custom.endpoint`,type:`String`,feel:`optional`,condition:{allMatch:[{property:`provider.mistral.backend.type`,equals:`custom`},{property:`provider.type`,equals:`mistral`}]}},{name:`provider.mistral.backend.custom.authentication.type`,type:`Dropdown`,value:`none`,condition:{allMatch:[{property:`provider.mistral.backend.type`,equals:`custom`},{property:`provider.type`,equals:`mistral`}]},choices:[`none`,`apiKey`,`oauth-client-credentials-flow`]},{name:`provider.mistral.backend.custom.authentication.apiKey`,type:`String`,feel:`optional`,condition:{allMatch:[{property:`provider.mistral.backend.custom.authentication.type`,equals:`apiKey`},{property:`provider.mistral.backend.type`,equals:`custom`},{property:`provider.type`,equals:`mistral`}]}},{name:`provider.mistral.backend.custom.authentication.oauthTokenEndpoint`,type:`String`,feel:`optional`,condition:{allMatch:[{property:`provider.mistral.backend.custom.authentication.type`,equals:`oauth-client-credentials-flow`},{property:`provider.mistral.backend.type`,equals:`custom`},{property:`provider.type`,equals:`mistral`}]}},{name:`provider.mistral.backend.custom.authentication.clientId`,type:`String`,feel:`optional`,condition:{allMatch:[{property:`provider.mistral.backend.custom.authentication.type`,equals:`oauth-client-credentials-flow`},{property:`provider.mistral.backend.type`,equals:`custom`},{property:`provider.type`,equals:`mistral`}]}},{name:`provider.mistral.backend.custom.authentication.clientSecret`,type:`String`,feel:`optional`,condition:{allMatch:[{property:`provider.mistral.backend.custom.authentication.type`,equals:`oauth-client-credentials-flow`},{property:`provider.mistral.backend.type`,equals:`custom`},{property:`provider.type`,equals:`mistral`}]}},{name:`provider.mistral.backend.custom.authentication.audience`,type:`String`,feel:`optional`,condition:{allMatch:[{property:`provider.mistral.backend.custom.authentication.type`,equals:`oauth-client-credentials-flow`},{property:`provider.mistral.backend.type`,equals:`custom`},{property:`provider.type`,equals:`mistral`}]},optional:!0},{name:`provider.mistral.backend.custom.authentication.clientAuthentication`,type:`Dropdown`,value:`BASIC_AUTH_HEADER`,condition:{allMatch:[{property:`provider.mistral.backend.custom.authentication.type`,equals:`oauth-client-credentials-flow`},{property:`provider.mistral.backend.type`,equals:`custom`},{property:`provider.type`,equals:`mistral`}]},choices:[`BASIC_AUTH_HEADER`,`CREDENTIALS_BODY`]},{name:`provider.mistral.backend.custom.authentication.scopes`,type:`String`,feel:`optional`,condition:{allMatch:[{property:`provider.mistral.backend.custom.authentication.type`,equals:`oauth-client-credentials-flow`},{property:`provider.mistral.backend.type`,equals:`custom`},{property:`provider.type`,equals:`mistral`}]},optional:!0},{name:`provider.mistral.timeouts.timeout`,type:`String`,feel:`optional`,condition:{property:`provider.type`,equals:`mistral`},optional:!0},{name:`provider.providerType`,type:`String`,feel:`optional`,condition:{property:`provider.type`,equals:`custom`}},{name:`provider.parameters`,type:`String`,feel:`required`,condition:{property:`provider.type`,equals:`custom`},optional:!0},{name:`provider.anthropic.backend.anthropic.headers`,type:`Hidden`,condition:{allMatch:[{property:`provider.anthropic.backend.type`,equals:`anthropic-api`},{property:`provider.type`,equals:`anthropic`}]},optional:!0},{name:`provider.anthropic.backend.anthropic.queryParameters`,type:`Hidden`,condition:{allMatch:[{property:`provider.anthropic.backend.type`,equals:`anthropic-api`},{property:`provider.type`,equals:`anthropic`}]},optional:!0},{name:`provider.anthropic.backend.anthropic.bodyProperties`,type:`Hidden`,condition:{allMatch:[{property:`provider.anthropic.backend.type`,equals:`anthropic-api`},{property:`provider.type`,equals:`anthropic`}]},optional:!0},{name:`provider.anthropic.backend.awsBedrockMantle.headers`,type:`Hidden`,condition:{allMatch:[{property:`provider.anthropic.backend.type`,equals:`aws-bedrock-mantle`},{property:`provider.type`,equals:`anthropic`}]},optional:!0},{name:`provider.anthropic.backend.awsBedrockMantle.queryParameters`,type:`Hidden`,condition:{allMatch:[{property:`provider.anthropic.backend.type`,equals:`aws-bedrock-mantle`},{property:`provider.type`,equals:`anthropic`}]},optional:!0},{name:`provider.anthropic.backend.awsBedrockMantle.bodyProperties`,type:`Hidden`,condition:{allMatch:[{property:`provider.anthropic.backend.type`,equals:`aws-bedrock-mantle`},{property:`provider.type`,equals:`anthropic`}]},optional:!0},{name:`provider.anthropic.backend.foundry.headers`,type:`Hidden`,condition:{allMatch:[{property:`provider.anthropic.backend.type`,equals:`foundry`},{property:`provider.type`,equals:`anthropic`}]},optional:!0},{name:`provider.anthropic.backend.foundry.queryParameters`,type:`Hidden`,condition:{allMatch:[{property:`provider.anthropic.backend.type`,equals:`foundry`},{property:`provider.type`,equals:`anthropic`}]},optional:!0},{name:`provider.anthropic.backend.foundry.bodyProperties`,type:`Hidden`,condition:{allMatch:[{property:`provider.anthropic.backend.type`,equals:`foundry`},{property:`provider.type`,equals:`anthropic`}]},optional:!0},{name:`provider.anthropic.backend.custom.headers`,type:`String`,feel:`required`,condition:{allMatch:[{property:`provider.anthropic.backend.type`,equals:`custom`},{property:`provider.type`,equals:`anthropic`}]},optional:!0},{name:`provider.anthropic.backend.custom.queryParameters`,type:`String`,feel:`required`,condition:{allMatch:[{property:`provider.anthropic.backend.type`,equals:`custom`},{property:`provider.type`,equals:`anthropic`}]},optional:!0},{name:`provider.anthropic.backend.custom.bodyProperties`,type:`String`,feel:`required`,condition:{allMatch:[{property:`provider.anthropic.backend.type`,equals:`custom`},{property:`provider.type`,equals:`anthropic`}]},optional:!0},{name:`provider.bedrock.headers`,type:`String`,feel:`required`,condition:{property:`provider.type`,equals:`bedrock`},optional:!0},{name:`provider.bedrock.queryParameters`,type:`String`,feel:`required`,condition:{property:`provider.type`,equals:`bedrock`},optional:!0},{name:`provider.bedrock.bodyProperties`,type:`String`,feel:`required`,condition:{property:`provider.type`,equals:`bedrock`},optional:!0},{name:`provider.openai.backend.openai.headers`,type:`Hidden`,condition:{allMatch:[{property:`provider.openai.backend.type`,equals:`openai-api`},{property:`provider.type`,equals:`openai`}]},optional:!0},{name:`provider.openai.backend.openai.queryParameters`,type:`Hidden`,condition:{allMatch:[{property:`provider.openai.backend.type`,equals:`openai-api`},{property:`provider.type`,equals:`openai`}]},optional:!0},{name:`provider.openai.backend.openai.bodyProperties`,type:`Hidden`,condition:{allMatch:[{property:`provider.openai.backend.type`,equals:`openai-api`},{property:`provider.type`,equals:`openai`}]},optional:!0},{name:`provider.openai.backend.foundry.apiVersion`,type:`Hidden`,condition:{allMatch:[{property:`provider.openai.backend.type`,equals:`foundry`},{property:`provider.type`,equals:`openai`}]},optional:!0},{name:`provider.openai.backend.foundry.headers`,type:`Hidden`,condition:{allMatch:[{property:`provider.openai.backend.type`,equals:`foundry`},{property:`provider.type`,equals:`openai`}]},optional:!0},{name:`provider.openai.backend.foundry.queryParameters`,type:`Hidden`,condition:{allMatch:[{property:`provider.openai.backend.type`,equals:`foundry`},{property:`provider.type`,equals:`openai`}]},optional:!0},{name:`provider.openai.backend.foundry.bodyProperties`,type:`Hidden`,condition:{allMatch:[{property:`provider.openai.backend.type`,equals:`foundry`},{property:`provider.type`,equals:`openai`}]},optional:!0},{name:`provider.openai.backend.custom.headers`,type:`String`,feel:`required`,condition:{allMatch:[{property:`provider.openai.backend.type`,equals:`custom`},{property:`provider.type`,equals:`openai`}]},optional:!0},{name:`provider.openai.backend.custom.queryParameters`,type:`String`,feel:`required`,condition:{allMatch:[{property:`provider.openai.backend.type`,equals:`custom`},{property:`provider.type`,equals:`openai`}]},optional:!0},{name:`provider.openai.backend.custom.bodyProperties`,type:`String`,feel:`required`,condition:{allMatch:[{property:`provider.openai.backend.type`,equals:`custom`},{property:`provider.type`,equals:`openai`}]},optional:!0},{name:`provider.mistral.backend.mistral.headers`,type:`Hidden`,condition:{allMatch:[{property:`provider.mistral.backend.type`,equals:`mistral-api`},{property:`provider.type`,equals:`mistral`}]},optional:!0},{name:`provider.mistral.backend.mistral.queryParameters`,type:`Hidden`,condition:{allMatch:[{property:`provider.mistral.backend.type`,equals:`mistral-api`},{property:`provider.type`,equals:`mistral`}]},optional:!0},{name:`provider.mistral.backend.mistral.bodyProperties`,type:`Hidden`,condition:{allMatch:[{property:`provider.mistral.backend.type`,equals:`mistral-api`},{property:`provider.type`,equals:`mistral`}]},optional:!0},{name:`provider.mistral.backend.custom.headers`,type:`String`,feel:`required`,condition:{allMatch:[{property:`provider.mistral.backend.type`,equals:`custom`},{property:`provider.type`,equals:`mistral`}]},optional:!0},{name:`provider.mistral.backend.custom.queryParameters`,type:`String`,feel:`required`,condition:{allMatch:[{property:`provider.mistral.backend.type`,equals:`custom`},{property:`provider.type`,equals:`mistral`}]},optional:!0},{name:`provider.mistral.backend.custom.bodyProperties`,type:`String`,feel:`required`,condition:{allMatch:[{property:`provider.mistral.backend.type`,equals:`custom`},{property:`provider.type`,equals:`mistral`}]},optional:!0},{name:`provider.anthropic.model.model`,type:`String`,feel:`optional`,condition:{property:`provider.type`,equals:`anthropic`}},{name:`provider.anthropic.model.parameters.effort`,type:`Dropdown`,value:`modelDefault`,condition:{property:`provider.type`,equals:`anthropic`},choices:[`modelDefault`,`low`,`medium`,`high`,`xhigh`,`max`]},{name:`provider.anthropic.model.parameters.thinking.mode`,type:`Dropdown`,value:`modelDefault`,condition:{property:`provider.type`,equals:`anthropic`},choices:[`modelDefault`,`enabled`,`adaptive`,`disabled`]},{name:`provider.anthropic.model.parameters.thinking.budgetTokens`,type:`Number`,feel:`required`,condition:{allMatch:[{property:`provider.anthropic.model.parameters.thinking.mode`,equals:`enabled`},{property:`provider.type`,equals:`anthropic`}]}},{name:`provider.anthropic.model.parameters.thinking.display`,type:`Dropdown`,value:`summarized`,condition:{allMatch:[{property:`provider.anthropic.model.parameters.thinking.mode`,equals:`adaptive`},{property:`provider.type`,equals:`anthropic`}]},choices:[`summarized`,`omitted`],optional:!0},{name:`provider.anthropic.model.parameters.promptCaching.enabled`,type:`Boolean`,value:!0,feel:`static`,condition:{property:`provider.type`,equals:`anthropic`},optional:!0},{name:`provider.bedrock.model.model`,type:`String`,feel:`optional`,condition:{property:`provider.type`,equals:`bedrock`}},{name:`provider.bedrock.model.parameters.promptCaching.enabled`,type:`Boolean`,value:!0,feel:`static`,condition:{property:`provider.type`,equals:`bedrock`},optional:!0},{name:`provider.openai.model.model`,type:`String`,feel:`optional`,condition:{property:`provider.type`,equals:`openai`}},{name:`provider.openai.api.responses.effort`,type:`Dropdown`,value:`modelDefault`,condition:{allMatch:[{property:`provider.openai.api.type`,equals:`responses`},{property:`provider.type`,equals:`openai`}]},choices:[`modelDefault`,`minimal`,`low`,`medium`,`high`,`xhigh`,`max`]},{name:`provider.openai.api.completions.effort`,type:`Dropdown`,value:`modelDefault`,condition:{allMatch:[{property:`provider.openai.api.type`,equals:`completions`},{property:`provider.type`,equals:`openai`}]},choices:[`modelDefault`,`minimal`,`low`,`medium`,`high`,`xhigh`,`max`]},{name:`provider.googleGemini.model.model`,type:`String`,feel:`optional`,condition:{property:`provider.type`,equals:`google-gemini`}},{name:`provider.googleGemini.model.parameters.thinking.thinkingBudget`,type:`Number`,feel:`required`,condition:{allMatch:[{property:`provider.googleGemini.model.parameters.thinking.thinkingLevel`,equals:`modelDefault`},{property:`provider.type`,equals:`google-gemini`}]},optional:!0},{name:`provider.googleGemini.model.parameters.thinking.thinkingLevel`,type:`Dropdown`,value:`modelDefault`,condition:{property:`provider.type`,equals:`google-gemini`},choices:[`modelDefault`,`minimal`,`low`,`medium`,`high`]},{name:`provider.mistral.model.model`,type:`String`,feel:`optional`,condition:{property:`provider.type`,equals:`mistral`}},{name:`provider.mistral.parameters.effort`,type:`Dropdown`,value:`modelDefault`,condition:{property:`provider.type`,equals:`mistral`},choices:[`modelDefault`,`none`,`high`]},{name:`provider.model`,type:`String`,feel:`optional`,condition:{property:`provider.type`,equals:`custom`}},{name:`provider.anthropic.model.parameters.maxTokens`,type:`Number`,feel:`required`,condition:{property:`provider.type`,equals:`anthropic`},optional:!0},{name:`provider.anthropic.model.parameters.temperature`,type:`Number`,feel:`required`,condition:{property:`provider.type`,equals:`anthropic`},optional:!0},{name:`provider.anthropic.model.parameters.topP`,type:`Number`,feel:`required`,condition:{property:`provider.type`,equals:`anthropic`},optional:!0},{name:`provider.anthropic.model.parameters.topK`,type:`Number`,feel:`required`,condition:{property:`provider.type`,equals:`anthropic`},optional:!0},{name:`provider.bedrock.model.parameters.maxTokens`,type:`Number`,feel:`required`,condition:{property:`provider.type`,equals:`bedrock`},optional:!0},{name:`provider.bedrock.model.parameters.temperature`,type:`Number`,feel:`required`,condition:{property:`provider.type`,equals:`bedrock`},optional:!0},{name:`provider.bedrock.model.parameters.topP`,type:`Number`,feel:`required`,condition:{property:`provider.type`,equals:`bedrock`},optional:!0},{name:`provider.openai.api.responses.maxOutputTokens`,type:`Number`,feel:`required`,condition:{allMatch:[{property:`provider.openai.api.type`,equals:`responses`},{property:`provider.type`,equals:`openai`}]},optional:!0},{name:`provider.openai.api.responses.temperature`,type:`Number`,feel:`required`,condition:{allMatch:[{property:`provider.openai.api.type`,equals:`responses`},{property:`provider.type`,equals:`openai`}]},optional:!0},{name:`provider.openai.api.responses.topP`,type:`Number`,feel:`required`,condition:{allMatch:[{property:`provider.openai.api.type`,equals:`responses`},{property:`provider.type`,equals:`openai`}]},optional:!0},{name:`provider.openai.api.completions.maxCompletionTokens`,type:`Number`,feel:`required`,condition:{allMatch:[{property:`provider.openai.api.type`,equals:`completions`},{property:`provider.type`,equals:`openai`}]},optional:!0},{name:`provider.openai.api.completions.temperature`,type:`Number`,feel:`required`,condition:{allMatch:[{property:`provider.openai.api.type`,equals:`completions`},{property:`provider.type`,equals:`openai`}]},optional:!0},{name:`provider.openai.api.completions.topP`,type:`Number`,feel:`required`,condition:{allMatch:[{property:`provider.openai.api.type`,equals:`completions`},{property:`provider.type`,equals:`openai`}]},optional:!0},{name:`provider.googleGemini.model.parameters.maxTokens`,type:`Number`,feel:`required`,condition:{property:`provider.type`,equals:`google-gemini`},optional:!0},{name:`provider.googleGemini.model.parameters.temperature`,type:`Number`,feel:`required`,condition:{property:`provider.type`,equals:`google-gemini`},optional:!0},{name:`provider.googleGemini.model.parameters.topP`,type:`Number`,feel:`required`,condition:{property:`provider.type`,equals:`google-gemini`},optional:!0},{name:`provider.googleGemini.model.parameters.topK`,type:`Number`,feel:`required`,condition:{property:`provider.type`,equals:`google-gemini`},optional:!0},{name:`provider.mistral.parameters.maxTokens`,type:`Number`,feel:`required`,condition:{property:`provider.type`,equals:`mistral`},optional:!0},{name:`provider.mistral.parameters.temperature`,type:`Number`,feel:`required`,condition:{property:`provider.type`,equals:`mistral`},optional:!0},{name:`provider.mistral.parameters.topP`,type:`Number`,feel:`required`,condition:{property:`provider.type`,equals:`mistral`},optional:!0},{name:`data.systemPrompt.prompt`,type:`Text`,value:`="You are **TaskAgent**, a helpful, capable agent that can handle a wide variety of customer requests using your own knowledge **and** any tools explicitly provided to you at runtime. Prefer a provided tool over guessing whenever it would give a more accurate or reliable answer, and only use tools that were explicitly configured for you (never assume a tool exists). You can call the same tool multiple times with different inputs if that helps complete the request. If no tool fits the request, answer from your own knowledge; if you can't produce a reliable answer, say so plainly and explain why, rather than guessing."`,feel:`required`},{name:`data.userPrompt.prompt`,type:`Text`,feel:`required`},{name:`data.userPrompt.documents`,type:`String`,feel:`required`,optional:!0},{name:`agentContext`,type:`Text`,feel:`required`},{name:`data.memory.storage.type`,type:`Dropdown`,value:`in-process`,choices:[`in-process`,`camunda-document`,`aws-agentcore`,`custom`]},{name:`data.memory.storage.timeToLive`,type:`String`,feel:`optional`,condition:{property:`data.memory.storage.type`,equals:`camunda-document`},optional:!0},{name:`data.memory.storage.customProperties`,type:`String`,feel:`required`,condition:{property:`data.memory.storage.type`,equals:`camunda-document`},optional:!0},{name:`data.memory.storage.region`,type:`String`,feel:`optional`,condition:{property:`data.memory.storage.type`,equals:`aws-agentcore`}},{name:`data.memory.storage.endpoint`,type:`String`,feel:`optional`,condition:{property:`data.memory.storage.type`,equals:`aws-agentcore`},optional:!0},{name:`data.memory.storage.authentication.type`,type:`Dropdown`,value:`credentials`,condition:{property:`data.memory.storage.type`,equals:`aws-agentcore`},choices:[`credentials`,`defaultCredentialsChain`]},{name:`data.memory.storage.authentication.accessKey`,type:`String`,feel:`optional`,condition:{allMatch:[{property:`data.memory.storage.authentication.type`,equals:`credentials`},{property:`data.memory.storage.type`,equals:`aws-agentcore`}]}},{name:`data.memory.storage.authentication.secretKey`,type:`String`,feel:`optional`,condition:{allMatch:[{property:`data.memory.storage.authentication.type`,equals:`credentials`},{property:`data.memory.storage.type`,equals:`aws-agentcore`}]}},{name:`data.memory.storage.memoryId`,type:`String`,feel:`optional`,condition:{property:`data.memory.storage.type`,equals:`aws-agentcore`}},{name:`data.memory.storage.actorId`,type:`String`,feel:`optional`,condition:{property:`data.memory.storage.type`,equals:`aws-agentcore`}},{name:`data.memory.storage.storeType`,type:`String`,feel:`optional`,condition:{property:`data.memory.storage.type`,equals:`custom`}},{name:`data.memory.storage.parameters`,type:`String`,feel:`required`,condition:{property:`data.memory.storage.type`,equals:`custom`},optional:!0},{name:`data.memory.contextWindowSize`,type:`Number`,value:20,feel:`static`},{name:`data.limits.maxModelCalls`,type:`Number`,value:10,feel:`static`},{name:`data.events.behavior`,type:`Dropdown`,value:`WAIT_FOR_TOOL_CALL_RESULTS`,choices:[`WAIT_FOR_TOOL_CALL_RESULTS`,`INTERRUPT_TOOL_CALLS`]},{name:`data.response.format.type`,type:`Dropdown`,value:`text`,choices:[`text`,`json`]},{name:`data.response.format.parseJson`,type:`Boolean`,feel:`static`,condition:{property:`data.response.format.type`,equals:`text`},optional:!0},{name:`data.response.format.schema`,type:`String`,feel:`required`,condition:{property:`data.response.format.type`,equals:`json`},optional:!0},{name:`data.response.format.schemaName`,type:`String`,value:`Response`,feel:`optional`,condition:{property:`data.response.format.type`,equals:`json`},optional:!0},{name:`data.response.includeAssistantMessage`,type:`Boolean`,feel:`static`,optional:!0},{name:`data.response.includeAgentContext`,type:`Boolean`,feel:`static`,optional:!0},{name:`agent`,type:`Hidden`}],migratesFrom:{schemaVersion:1,sources:[{kind:`change`,sourceTemplateId:`io.camunda.connectors.agenticai.aiagent.jobworker.v1`,minSourceVersion:12,paths:[{from:`provider.type`,to:`provider.type`,valueMap:{rules:[{match:`anthropic`,value:`anthropic`},{match:`bedrock`,value:`bedrock`},{match:`openai`,value:`openai`},{match:`azureOpenAi`,value:`openai`},{match:`openaiCompatible`,value:`openai`},{match:`google-vertex-ai`,value:`google-gemini`}]}},{when:{path:`provider.type`,equals:`anthropic`},rules:[{to:`provider.anthropic.model.parameters.promptCaching.enabled`,set:!0,note:`Anthropic prompt caching is now enabled, and effort and thinking use the model default. v1 sent no caching or reasoning settings.`},{when:{path:`provider.anthropic.endpoint`,exists:!1},rules:[{to:`provider.anthropic.backend.type`,set:`anthropic-api`},{from:`provider.anthropic.authentication.apiKey`,to:`provider.anthropic.backend.anthropic.apiKey`}]},{when:{path:`provider.anthropic.endpoint`,matches:`*.azure.com*`},rules:[{to:`provider.anthropic.backend.type`,set:`foundry`},{to:`provider.anthropic.backend.foundry.authentication.type`,set:`apiKey`},{from:`provider.anthropic.authentication.apiKey`,to:`provider.anthropic.backend.foundry.authentication.apiKey`},{from:`provider.anthropic.endpoint`,to:`provider.anthropic.backend.foundry.endpoint`,note:{level:`warning`,message:`The Anthropic endpoint was copied as-is to the Microsoft Foundry backend. v2 adds /anthropic if missing and appends /v1/messages, so remove a trailing /anthropic/v1 or /v1.`}}]},{when:{path:`provider.anthropic.endpoint`,matches:`*.azure.us*`},rules:[{to:`provider.anthropic.backend.type`,set:`foundry`},{to:`provider.anthropic.backend.foundry.authentication.type`,set:`apiKey`},{from:`provider.anthropic.authentication.apiKey`,to:`provider.anthropic.backend.foundry.authentication.apiKey`},{from:`provider.anthropic.endpoint`,to:`provider.anthropic.backend.foundry.endpoint`,note:{level:`warning`,message:`The Anthropic endpoint was copied as-is to the Microsoft Foundry backend. v2 adds /anthropic if missing and appends /v1/messages, so remove a trailing /anthropic/v1 or /v1.`}}]},{when:{path:`provider.anthropic.endpoint`,matches:`*.azure.cn*`},rules:[{to:`provider.anthropic.backend.type`,set:`foundry`},{to:`provider.anthropic.backend.foundry.authentication.type`,set:`apiKey`},{from:`provider.anthropic.authentication.apiKey`,to:`provider.anthropic.backend.foundry.authentication.apiKey`},{from:`provider.anthropic.endpoint`,to:`provider.anthropic.backend.foundry.endpoint`,note:{level:`warning`,message:`The Anthropic endpoint was copied as-is to the Microsoft Foundry backend. v2 adds /anthropic if missing and appends /v1/messages, so remove a trailing /anthropic/v1 or /v1.`}}]},{when:[{path:`provider.anthropic.endpoint`,exists:!0},{path:`provider.anthropic.endpoint`,matches:`*.azure.com*`,not:!0},{path:`provider.anthropic.endpoint`,matches:`*.azure.us*`,not:!0},{path:`provider.anthropic.endpoint`,matches:`*.azure.cn*`,not:!0}],rules:[{to:`provider.anthropic.backend.type`,set:`custom`},{to:`provider.anthropic.backend.custom.authentication.type`,set:`apiKey`},{from:`provider.anthropic.authentication.apiKey`,to:`provider.anthropic.backend.custom.authentication.apiKey`},{from:`provider.anthropic.endpoint`,to:`provider.anthropic.backend.custom.endpoint`,note:{level:`warning`,message:`The Anthropic endpoint was copied as-is to the custom backend. v2 appends /v1/messages, so remove a trailing /v1.`}}]}]},{when:{path:`provider.type`,equals:`bedrock`},rules:[{to:`provider.bedrock.model.parameters.promptCaching.enabled`,set:!0,note:`AWS Bedrock prompt caching is now enabled. v1 sent no caching settings.`}]},{when:{path:`provider.type`,equals:`openai`},rules:[{to:`provider.openai.api.type`,set:`completions`},{to:`provider.openai.backend.type`,set:`openai-api`},{from:`provider.openai.authentication.apiKey`,to:`provider.openai.backend.openai.apiKey`},{from:`provider.openai.authentication.organizationId`,to:`provider.openai.backend.openai.organizationId`},{from:`provider.openai.authentication.projectId`,to:`provider.openai.backend.openai.projectId`},{from:`provider.openai.model.parameters.maxCompletionTokens`,to:`provider.openai.api.completions.maxCompletionTokens`},{from:`provider.openai.model.parameters.temperature`,to:`provider.openai.api.completions.temperature`},{from:`provider.openai.model.parameters.topP`,to:`provider.openai.api.completions.topP`}]},{when:{path:`provider.type`,equals:`azureOpenAi`},rules:[{to:`provider.openai.api.type`,set:`completions`},{to:`provider.openai.backend.type`,set:`foundry`},{from:`provider.azureOpenAi.endpoint`,to:`provider.openai.backend.foundry.endpoint`},{from:`provider.azureOpenAi.authentication.type`,to:`provider.openai.backend.foundry.authentication.type`},{from:`provider.azureOpenAi.authentication.apiKey`,to:`provider.openai.backend.foundry.authentication.apiKey`},{from:`provider.azureOpenAi.authentication.clientId`,to:`provider.openai.backend.foundry.authentication.clientId`},{from:`provider.azureOpenAi.authentication.clientSecret`,to:`provider.openai.backend.foundry.authentication.clientSecret`},{from:`provider.azureOpenAi.authentication.tenantId`,to:`provider.openai.backend.foundry.authentication.tenantId`},{from:`provider.azureOpenAi.authentication.authorityHost`,to:`provider.openai.backend.foundry.authentication.authorityHost`},{from:`provider.azureOpenAi.timeouts.timeout`,to:`provider.openai.timeouts.timeout`},{from:`provider.azureOpenAi.model.deploymentName`,to:`provider.openai.model.model`},{from:`provider.azureOpenAi.model.parameters.maxTokens`,to:`provider.openai.api.completions.maxCompletionTokens`},{from:`provider.azureOpenAi.model.parameters.temperature`,to:`provider.openai.api.completions.temperature`},{from:`provider.azureOpenAi.model.parameters.topP`,to:`provider.openai.api.completions.topP`}]},{when:{path:`provider.type`,equals:`openaiCompatible`},rules:[{to:`provider.openai.api.type`,set:`completions`},{to:`provider.openai.backend.type`,set:`custom`},{from:`provider.openaiCompatible.endpoint`,to:`provider.openai.backend.custom.endpoint`},{from:`provider.openaiCompatible.headers`,to:`provider.openai.backend.custom.headers`},{from:`provider.openaiCompatible.queryParameters`,to:`provider.openai.backend.custom.queryParameters`},{from:`provider.openaiCompatible.timeouts.timeout`,to:`provider.openai.timeouts.timeout`},{from:`provider.openaiCompatible.model.model`,to:`provider.openai.model.model`},{from:`provider.openaiCompatible.model.parameters.maxCompletionTokens`,to:`provider.openai.api.completions.maxCompletionTokens`},{from:`provider.openaiCompatible.model.parameters.temperature`,to:`provider.openai.api.completions.temperature`},{from:`provider.openaiCompatible.model.parameters.topP`,to:`provider.openai.api.completions.topP`},{from:`provider.openaiCompatible.model.parameters.customParameters`,to:`provider.openai.backend.custom.bodyProperties`},{when:{path:`provider.openaiCompatible.authentication.apiKey`,exists:!0},rules:[{to:`provider.openai.backend.custom.authentication.type`,set:`apiKey`},{from:`provider.openaiCompatible.authentication.apiKey`,to:`provider.openai.backend.custom.authentication.apiKey`}]},{when:{path:`provider.openaiCompatible.authentication.apiKey`,exists:!1},rules:[{to:`provider.openai.backend.custom.authentication.type`,set:`none`}]}]},{when:{path:`provider.type`,equals:`google-vertex-ai`},rules:[{to:`provider.googleGemini.backend.type`,set:`google-vertex-ai`},{from:`provider.googleVertexAi.projectId`,to:`provider.googleGemini.backend.googleVertexAi.projectId`},{from:`provider.googleVertexAi.region`,to:`provider.googleGemini.backend.googleVertexAi.region`},{from:`provider.googleVertexAi.endpoint`,to:`provider.googleGemini.backend.googleVertexAi.endpoint`,note:{level:`warning`,message:`The custom Vertex AI endpoint was moved to a hidden v2 field. It applies at runtime, but Modeler no longer shows or edits it.`}},{from:`provider.googleVertexAi.authentication.type`,to:`provider.googleGemini.backend.googleVertexAi.authentication.type`},{from:`provider.googleVertexAi.authentication.jsonKey`,to:`provider.googleGemini.backend.googleVertexAi.authentication.jsonKey`},{from:`provider.googleVertexAi.timeouts.timeout`,to:`provider.googleGemini.timeouts.timeout`},{from:`provider.googleVertexAi.model.model`,to:`provider.googleGemini.model.model`},{from:`provider.googleVertexAi.model.parameters.maxOutputTokens`,to:`provider.googleGemini.model.parameters.maxTokens`},{from:`provider.googleVertexAi.model.parameters.temperature`,to:`provider.googleGemini.model.parameters.temperature`},{from:`provider.googleVertexAi.model.parameters.topP`,to:`provider.googleGemini.model.parameters.topP`},{from:`provider.googleVertexAi.model.parameters.topK`,to:`provider.googleGemini.model.parameters.topK`}]}]}]}},y={id:`io.camunda.connectors.agenticai.ai-agent-task.v2`,version:1,elementType:`bpmn:ServiceTask`,taskDefinitionType:`io.camunda.agenticai:aiagent:task:2`,agentType:`aiAgentTask`,inputs:[{name:`provider.type`,type:`Dropdown`,value:`anthropic`,choices:[`anthropic`,`bedrock`,`openai`,`google-gemini`,`mistral`,`custom`]},{name:`provider.anthropic.backend.type`,type:`Dropdown`,value:`anthropic-api`,condition:{property:`provider.type`,equals:`anthropic`},choices:[`anthropic-api`,`aws-bedrock-mantle`,`foundry`,`custom`]},{name:`provider.anthropic.backend.anthropic.apiKey`,type:`String`,feel:`optional`,condition:{allMatch:[{property:`provider.anthropic.backend.type`,equals:`anthropic-api`},{property:`provider.type`,equals:`anthropic`}]}},{name:`provider.anthropic.backend.anthropic.endpoint`,type:`Hidden`,condition:{allMatch:[{property:`provider.anthropic.backend.type`,equals:`anthropic-api`},{property:`provider.type`,equals:`anthropic`}]},optional:!0},{name:`provider.anthropic.backend.awsBedrockMantle.region`,type:`String`,feel:`optional`,condition:{allMatch:[{property:`provider.anthropic.backend.type`,equals:`aws-bedrock-mantle`},{property:`provider.type`,equals:`anthropic`}]}},{name:`provider.anthropic.backend.awsBedrockMantle.endpoint`,type:`String`,feel:`optional`,condition:{allMatch:[{property:`provider.anthropic.backend.type`,equals:`aws-bedrock-mantle`},{property:`provider.type`,equals:`anthropic`}]},optional:!0},{name:`provider.anthropic.backend.awsBedrockMantle.authentication.type`,type:`Dropdown`,value:`credentials`,condition:{allMatch:[{property:`provider.anthropic.backend.type`,equals:`aws-bedrock-mantle`},{property:`provider.type`,equals:`anthropic`}]},choices:[`credentials`,`apiKey`,`defaultCredentialsChain`]},{name:`provider.anthropic.backend.awsBedrockMantle.authentication.accessKey`,type:`String`,feel:`optional`,condition:{allMatch:[{property:`provider.anthropic.backend.awsBedrockMantle.authentication.type`,equals:`credentials`},{property:`provider.anthropic.backend.type`,equals:`aws-bedrock-mantle`},{property:`provider.type`,equals:`anthropic`}]}},{name:`provider.anthropic.backend.awsBedrockMantle.authentication.secretKey`,type:`String`,feel:`optional`,condition:{allMatch:[{property:`provider.anthropic.backend.awsBedrockMantle.authentication.type`,equals:`credentials`},{property:`provider.anthropic.backend.type`,equals:`aws-bedrock-mantle`},{property:`provider.type`,equals:`anthropic`}]}},{name:`provider.anthropic.backend.awsBedrockMantle.authentication.apiKey`,type:`String`,feel:`optional`,condition:{allMatch:[{property:`provider.anthropic.backend.awsBedrockMantle.authentication.type`,equals:`apiKey`},{property:`provider.anthropic.backend.type`,equals:`aws-bedrock-mantle`},{property:`provider.type`,equals:`anthropic`}]}},{name:`provider.anthropic.backend.foundry.endpoint`,type:`String`,feel:`optional`,condition:{allMatch:[{property:`provider.anthropic.backend.type`,equals:`foundry`},{property:`provider.type`,equals:`anthropic`}]}},{name:`provider.anthropic.backend.foundry.authentication.type`,type:`Dropdown`,value:`apiKey`,condition:{allMatch:[{property:`provider.anthropic.backend.type`,equals:`foundry`},{property:`provider.type`,equals:`anthropic`}]},choices:[`apiKey`,`clientCredentials`,`managedIdentity`]},{name:`provider.anthropic.backend.foundry.authentication.apiKey`,type:`String`,feel:`optional`,condition:{allMatch:[{property:`provider.anthropic.backend.foundry.authentication.type`,equals:`apiKey`},{property:`provider.anthropic.backend.type`,equals:`foundry`},{property:`provider.type`,equals:`anthropic`}]}},{name:`provider.anthropic.backend.foundry.authentication.clientId`,type:`String`,feel:`optional`,condition:{allMatch:[{property:`provider.anthropic.backend.foundry.authentication.type`,equals:`clientCredentials`},{property:`provider.anthropic.backend.type`,equals:`foundry`},{property:`provider.type`,equals:`anthropic`}]},optional:!0},{name:`provider.anthropic.backend.foundry.authentication.clientSecret`,type:`String`,feel:`optional`,condition:{allMatch:[{property:`provider.anthropic.backend.foundry.authentication.type`,equals:`clientCredentials`},{property:`provider.anthropic.backend.type`,equals:`foundry`},{property:`provider.type`,equals:`anthropic`}]}},{name:`provider.anthropic.backend.foundry.authentication.tenantId`,type:`String`,feel:`optional`,condition:{allMatch:[{property:`provider.anthropic.backend.foundry.authentication.type`,equals:`clientCredentials`},{property:`provider.anthropic.backend.type`,equals:`foundry`},{property:`provider.type`,equals:`anthropic`}]}},{name:`provider.anthropic.backend.foundry.authentication.authorityHost`,type:`String`,feel:`optional`,condition:{allMatch:[{property:`provider.anthropic.backend.foundry.authentication.type`,equals:`clientCredentials`},{property:`provider.anthropic.backend.type`,equals:`foundry`},{property:`provider.type`,equals:`anthropic`}]},optional:!0},{name:`provider.anthropic.backend.foundry.authentication.entraIdScope`,type:`Hidden`,condition:{allMatch:[{property:`provider.anthropic.backend.foundry.authentication.type`,equals:`clientCredentials`},{property:`provider.anthropic.backend.type`,equals:`foundry`},{property:`provider.type`,equals:`anthropic`}]},optional:!0},{name:`provider.anthropic.backend.foundry.authentication.clientId`,id:`provider.anthropic.backend.foundry.authentication.managedIdentity.clientId`,type:`String`,feel:`optional`,condition:{allMatch:[{property:`provider.anthropic.backend.foundry.authentication.type`,equals:`managedIdentity`},{property:`provider.anthropic.backend.type`,equals:`foundry`},{property:`provider.type`,equals:`anthropic`}]},optional:!0},{name:`provider.anthropic.backend.foundry.authentication.entraIdScope`,id:`provider.anthropic.backend.foundry.authentication.managedIdentity.entraIdScope`,type:`Hidden`,condition:{allMatch:[{property:`provider.anthropic.backend.foundry.authentication.type`,equals:`managedIdentity`},{property:`provider.anthropic.backend.type`,equals:`foundry`},{property:`provider.type`,equals:`anthropic`}]},optional:!0},{name:`provider.anthropic.backend.custom.endpoint`,type:`String`,feel:`optional`,condition:{allMatch:[{property:`provider.anthropic.backend.type`,equals:`custom`},{property:`provider.type`,equals:`anthropic`}]}},{name:`provider.anthropic.backend.custom.authentication.type`,type:`Dropdown`,value:`none`,condition:{allMatch:[{property:`provider.anthropic.backend.type`,equals:`custom`},{property:`provider.type`,equals:`anthropic`}]},choices:[`none`,`apiKey`,`oauth-client-credentials-flow`]},{name:`provider.anthropic.backend.custom.authentication.apiKey`,type:`String`,feel:`optional`,condition:{allMatch:[{property:`provider.anthropic.backend.custom.authentication.type`,equals:`apiKey`},{property:`provider.anthropic.backend.type`,equals:`custom`},{property:`provider.type`,equals:`anthropic`}]}},{name:`provider.anthropic.backend.custom.authentication.oauthTokenEndpoint`,type:`String`,feel:`optional`,condition:{allMatch:[{property:`provider.anthropic.backend.custom.authentication.type`,equals:`oauth-client-credentials-flow`},{property:`provider.anthropic.backend.type`,equals:`custom`},{property:`provider.type`,equals:`anthropic`}]}},{name:`provider.anthropic.backend.custom.authentication.clientId`,type:`String`,feel:`optional`,condition:{allMatch:[{property:`provider.anthropic.backend.custom.authentication.type`,equals:`oauth-client-credentials-flow`},{property:`provider.anthropic.backend.type`,equals:`custom`},{property:`provider.type`,equals:`anthropic`}]}},{name:`provider.anthropic.backend.custom.authentication.clientSecret`,type:`String`,feel:`optional`,condition:{allMatch:[{property:`provider.anthropic.backend.custom.authentication.type`,equals:`oauth-client-credentials-flow`},{property:`provider.anthropic.backend.type`,equals:`custom`},{property:`provider.type`,equals:`anthropic`}]}},{name:`provider.anthropic.backend.custom.authentication.audience`,type:`String`,feel:`optional`,condition:{allMatch:[{property:`provider.anthropic.backend.custom.authentication.type`,equals:`oauth-client-credentials-flow`},{property:`provider.anthropic.backend.type`,equals:`custom`},{property:`provider.type`,equals:`anthropic`}]},optional:!0},{name:`provider.anthropic.backend.custom.authentication.clientAuthentication`,type:`Dropdown`,value:`BASIC_AUTH_HEADER`,condition:{allMatch:[{property:`provider.anthropic.backend.custom.authentication.type`,equals:`oauth-client-credentials-flow`},{property:`provider.anthropic.backend.type`,equals:`custom`},{property:`provider.type`,equals:`anthropic`}]},choices:[`BASIC_AUTH_HEADER`,`CREDENTIALS_BODY`]},{name:`provider.anthropic.backend.custom.authentication.scopes`,type:`String`,feel:`optional`,condition:{allMatch:[{property:`provider.anthropic.backend.custom.authentication.type`,equals:`oauth-client-credentials-flow`},{property:`provider.anthropic.backend.type`,equals:`custom`},{property:`provider.type`,equals:`anthropic`}]},optional:!0},{name:`provider.anthropic.timeouts.timeout`,type:`String`,feel:`optional`,condition:{property:`provider.type`,equals:`anthropic`},optional:!0},{name:`provider.bedrock.region`,type:`String`,feel:`optional`,condition:{property:`provider.type`,equals:`bedrock`}},{name:`provider.bedrock.endpoint`,type:`String`,feel:`optional`,condition:{property:`provider.type`,equals:`bedrock`},optional:!0},{name:`provider.bedrock.authentication.type`,type:`Dropdown`,value:`credentials`,condition:{property:`provider.type`,equals:`bedrock`},choices:[`credentials`,`apiKey`,`defaultCredentialsChain`]},{name:`provider.bedrock.authentication.accessKey`,type:`String`,feel:`optional`,condition:{allMatch:[{property:`provider.bedrock.authentication.type`,equals:`credentials`},{property:`provider.type`,equals:`bedrock`}]}},{name:`provider.bedrock.authentication.secretKey`,type:`String`,feel:`optional`,condition:{allMatch:[{property:`provider.bedrock.authentication.type`,equals:`credentials`},{property:`provider.type`,equals:`bedrock`}]}},{name:`provider.bedrock.authentication.apiKey`,type:`String`,feel:`optional`,condition:{allMatch:[{property:`provider.bedrock.authentication.type`,equals:`apiKey`},{property:`provider.type`,equals:`bedrock`}]}},{name:`provider.bedrock.timeouts.timeout`,type:`String`,feel:`optional`,condition:{property:`provider.type`,equals:`bedrock`},optional:!0},{name:`provider.openai.api.type`,type:`Dropdown`,value:`responses`,condition:{property:`provider.type`,equals:`openai`},choices:[`responses`,`completions`]},{name:`provider.openai.backend.type`,type:`Dropdown`,value:`openai-api`,condition:{property:`provider.type`,equals:`openai`},choices:[`openai-api`,`foundry`,`custom`]},{name:`provider.openai.backend.openai.apiKey`,type:`String`,feel:`optional`,condition:{allMatch:[{property:`provider.openai.backend.type`,equals:`openai-api`},{property:`provider.type`,equals:`openai`}]}},{name:`provider.openai.backend.openai.organizationId`,type:`String`,feel:`optional`,condition:{allMatch:[{property:`provider.openai.backend.type`,equals:`openai-api`},{property:`provider.type`,equals:`openai`}]},optional:!0},{name:`provider.openai.backend.openai.projectId`,type:`String`,feel:`optional`,condition:{allMatch:[{property:`provider.openai.backend.type`,equals:`openai-api`},{property:`provider.type`,equals:`openai`}]},optional:!0},{name:`provider.openai.backend.openai.endpoint`,type:`Hidden`,condition:{allMatch:[{property:`provider.openai.backend.type`,equals:`openai-api`},{property:`provider.type`,equals:`openai`}]},optional:!0},{name:`provider.openai.backend.foundry.endpoint`,type:`String`,feel:`optional`,condition:{allMatch:[{property:`provider.openai.backend.type`,equals:`foundry`},{property:`provider.type`,equals:`openai`}]}},{name:`provider.openai.backend.foundry.authentication.type`,type:`Dropdown`,value:`apiKey`,condition:{allMatch:[{property:`provider.openai.backend.type`,equals:`foundry`},{property:`provider.type`,equals:`openai`}]},choices:[`apiKey`,`clientCredentials`,`managedIdentity`]},{name:`provider.openai.backend.foundry.authentication.apiKey`,type:`String`,feel:`optional`,condition:{allMatch:[{property:`provider.openai.backend.foundry.authentication.type`,equals:`apiKey`},{property:`provider.openai.backend.type`,equals:`foundry`},{property:`provider.type`,equals:`openai`}]}},{name:`provider.openai.backend.foundry.authentication.clientId`,type:`String`,feel:`optional`,condition:{allMatch:[{property:`provider.openai.backend.foundry.authentication.type`,equals:`clientCredentials`},{property:`provider.openai.backend.type`,equals:`foundry`},{property:`provider.type`,equals:`openai`}]},optional:!0},{name:`provider.openai.backend.foundry.authentication.clientSecret`,type:`String`,feel:`optional`,condition:{allMatch:[{property:`provider.openai.backend.foundry.authentication.type`,equals:`clientCredentials`},{property:`provider.openai.backend.type`,equals:`foundry`},{property:`provider.type`,equals:`openai`}]}},{name:`provider.openai.backend.foundry.authentication.tenantId`,type:`String`,feel:`optional`,condition:{allMatch:[{property:`provider.openai.backend.foundry.authentication.type`,equals:`clientCredentials`},{property:`provider.openai.backend.type`,equals:`foundry`},{property:`provider.type`,equals:`openai`}]}},{name:`provider.openai.backend.foundry.authentication.authorityHost`,type:`String`,feel:`optional`,condition:{allMatch:[{property:`provider.openai.backend.foundry.authentication.type`,equals:`clientCredentials`},{property:`provider.openai.backend.type`,equals:`foundry`},{property:`provider.type`,equals:`openai`}]},optional:!0},{name:`provider.openai.backend.foundry.authentication.entraIdScope`,type:`Hidden`,condition:{allMatch:[{property:`provider.openai.backend.foundry.authentication.type`,equals:`clientCredentials`},{property:`provider.openai.backend.type`,equals:`foundry`},{property:`provider.type`,equals:`openai`}]},optional:!0},{name:`provider.openai.backend.foundry.authentication.clientId`,id:`provider.openai.backend.foundry.authentication.managedIdentity.clientId`,type:`String`,feel:`optional`,condition:{allMatch:[{property:`provider.openai.backend.foundry.authentication.type`,equals:`managedIdentity`},{property:`provider.openai.backend.type`,equals:`foundry`},{property:`provider.type`,equals:`openai`}]},optional:!0},{name:`provider.openai.backend.foundry.authentication.entraIdScope`,id:`provider.openai.backend.foundry.authentication.managedIdentity.entraIdScope`,type:`Hidden`,condition:{allMatch:[{property:`provider.openai.backend.foundry.authentication.type`,equals:`managedIdentity`},{property:`provider.openai.backend.type`,equals:`foundry`},{property:`provider.type`,equals:`openai`}]},optional:!0},{name:`provider.openai.backend.custom.endpoint`,type:`String`,feel:`optional`,condition:{allMatch:[{property:`provider.openai.backend.type`,equals:`custom`},{property:`provider.type`,equals:`openai`}]}},{name:`provider.openai.backend.custom.authentication.type`,type:`Dropdown`,value:`none`,condition:{allMatch:[{property:`provider.openai.backend.type`,equals:`custom`},{property:`provider.type`,equals:`openai`}]},choices:[`none`,`apiKey`,`oauth-client-credentials-flow`]},{name:`provider.openai.backend.custom.authentication.apiKey`,type:`String`,feel:`optional`,condition:{allMatch:[{property:`provider.openai.backend.custom.authentication.type`,equals:`apiKey`},{property:`provider.openai.backend.type`,equals:`custom`},{property:`provider.type`,equals:`openai`}]}},{name:`provider.openai.backend.custom.authentication.oauthTokenEndpoint`,type:`String`,feel:`optional`,condition:{allMatch:[{property:`provider.openai.backend.custom.authentication.type`,equals:`oauth-client-credentials-flow`},{property:`provider.openai.backend.type`,equals:`custom`},{property:`provider.type`,equals:`openai`}]}},{name:`provider.openai.backend.custom.authentication.clientId`,type:`String`,feel:`optional`,condition:{allMatch:[{property:`provider.openai.backend.custom.authentication.type`,equals:`oauth-client-credentials-flow`},{property:`provider.openai.backend.type`,equals:`custom`},{property:`provider.type`,equals:`openai`}]}},{name:`provider.openai.backend.custom.authentication.clientSecret`,type:`String`,feel:`optional`,condition:{allMatch:[{property:`provider.openai.backend.custom.authentication.type`,equals:`oauth-client-credentials-flow`},{property:`provider.openai.backend.type`,equals:`custom`},{property:`provider.type`,equals:`openai`}]}},{name:`provider.openai.backend.custom.authentication.audience`,type:`String`,feel:`optional`,condition:{allMatch:[{property:`provider.openai.backend.custom.authentication.type`,equals:`oauth-client-credentials-flow`},{property:`provider.openai.backend.type`,equals:`custom`},{property:`provider.type`,equals:`openai`}]},optional:!0},{name:`provider.openai.backend.custom.authentication.clientAuthentication`,type:`Dropdown`,value:`BASIC_AUTH_HEADER`,condition:{allMatch:[{property:`provider.openai.backend.custom.authentication.type`,equals:`oauth-client-credentials-flow`},{property:`provider.openai.backend.type`,equals:`custom`},{property:`provider.type`,equals:`openai`}]},choices:[`BASIC_AUTH_HEADER`,`CREDENTIALS_BODY`]},{name:`provider.openai.backend.custom.authentication.scopes`,type:`String`,feel:`optional`,condition:{allMatch:[{property:`provider.openai.backend.custom.authentication.type`,equals:`oauth-client-credentials-flow`},{property:`provider.openai.backend.type`,equals:`custom`},{property:`provider.type`,equals:`openai`}]},optional:!0},{name:`provider.openai.timeouts.timeout`,type:`String`,feel:`optional`,condition:{property:`provider.type`,equals:`openai`},optional:!0},{name:`provider.googleGemini.backend.type`,type:`Dropdown`,value:`google-gemini-api`,condition:{property:`provider.type`,equals:`google-gemini`},choices:[`google-gemini-api`,`google-vertex-ai`]},{name:`provider.googleGemini.backend.googleGeminiApi.apiKey`,type:`String`,feel:`optional`,condition:{allMatch:[{property:`provider.googleGemini.backend.type`,equals:`google-gemini-api`},{property:`provider.type`,equals:`google-gemini`}]}},{name:`provider.googleGemini.backend.googleGeminiApi.endpoint`,type:`Hidden`,condition:{allMatch:[{property:`provider.googleGemini.backend.type`,equals:`google-gemini-api`},{property:`provider.type`,equals:`google-gemini`}]},optional:!0},{name:`provider.googleGemini.backend.googleVertexAi.projectId`,type:`String`,feel:`optional`,condition:{allMatch:[{property:`provider.googleGemini.backend.type`,equals:`google-vertex-ai`},{property:`provider.type`,equals:`google-gemini`}]}},{name:`provider.googleGemini.backend.googleVertexAi.region`,type:`String`,feel:`optional`,condition:{allMatch:[{property:`provider.googleGemini.backend.type`,equals:`google-vertex-ai`},{property:`provider.type`,equals:`google-gemini`}]}},{name:`provider.googleGemini.backend.googleVertexAi.endpoint`,type:`Hidden`,condition:{allMatch:[{property:`provider.googleGemini.backend.type`,equals:`google-vertex-ai`},{property:`provider.type`,equals:`google-gemini`}]},optional:!0},{name:`provider.googleGemini.backend.googleVertexAi.authentication.type`,type:`Dropdown`,value:`serviceAccountCredentials`,condition:{allMatch:[{property:`provider.googleGemini.backend.type`,equals:`google-vertex-ai`},{property:`provider.type`,equals:`google-gemini`}]},choices:[`serviceAccountCredentials`,`applicationDefaultCredentials`]},{name:`provider.googleGemini.backend.googleVertexAi.authentication.jsonKey`,type:`String`,feel:`optional`,condition:{allMatch:[{property:`provider.googleGemini.backend.googleVertexAi.authentication.type`,equals:`serviceAccountCredentials`},{property:`provider.googleGemini.backend.type`,equals:`google-vertex-ai`},{property:`provider.type`,equals:`google-gemini`}]}},{name:`provider.googleGemini.timeouts.timeout`,type:`String`,feel:`optional`,condition:{property:`provider.type`,equals:`google-gemini`},optional:!0},{name:`provider.mistral.backend.type`,type:`Dropdown`,value:`mistral-api`,condition:{property:`provider.type`,equals:`mistral`},choices:[`mistral-api`,`custom`]},{name:`provider.mistral.backend.mistral.apiKey`,type:`String`,feel:`optional`,condition:{allMatch:[{property:`provider.mistral.backend.type`,equals:`mistral-api`},{property:`provider.type`,equals:`mistral`}]}},{name:`provider.mistral.backend.mistral.endpoint`,type:`Hidden`,value:`https://api.mistral.ai/v1`,condition:{allMatch:[{property:`provider.mistral.backend.type`,equals:`mistral-api`},{property:`provider.type`,equals:`mistral`}]},optional:!0},{name:`provider.mistral.backend.custom.endpoint`,type:`String`,feel:`optional`,condition:{allMatch:[{property:`provider.mistral.backend.type`,equals:`custom`},{property:`provider.type`,equals:`mistral`}]}},{name:`provider.mistral.backend.custom.authentication.type`,type:`Dropdown`,value:`none`,condition:{allMatch:[{property:`provider.mistral.backend.type`,equals:`custom`},{property:`provider.type`,equals:`mistral`}]},choices:[`none`,`apiKey`,`oauth-client-credentials-flow`]},{name:`provider.mistral.backend.custom.authentication.apiKey`,type:`String`,feel:`optional`,condition:{allMatch:[{property:`provider.mistral.backend.custom.authentication.type`,equals:`apiKey`},{property:`provider.mistral.backend.type`,equals:`custom`},{property:`provider.type`,equals:`mistral`}]}},{name:`provider.mistral.backend.custom.authentication.oauthTokenEndpoint`,type:`String`,feel:`optional`,condition:{allMatch:[{property:`provider.mistral.backend.custom.authentication.type`,equals:`oauth-client-credentials-flow`},{property:`provider.mistral.backend.type`,equals:`custom`},{property:`provider.type`,equals:`mistral`}]}},{name:`provider.mistral.backend.custom.authentication.clientId`,type:`String`,feel:`optional`,condition:{allMatch:[{property:`provider.mistral.backend.custom.authentication.type`,equals:`oauth-client-credentials-flow`},{property:`provider.mistral.backend.type`,equals:`custom`},{property:`provider.type`,equals:`mistral`}]}},{name:`provider.mistral.backend.custom.authentication.clientSecret`,type:`String`,feel:`optional`,condition:{allMatch:[{property:`provider.mistral.backend.custom.authentication.type`,equals:`oauth-client-credentials-flow`},{property:`provider.mistral.backend.type`,equals:`custom`},{property:`provider.type`,equals:`mistral`}]}},{name:`provider.mistral.backend.custom.authentication.audience`,type:`String`,feel:`optional`,condition:{allMatch:[{property:`provider.mistral.backend.custom.authentication.type`,equals:`oauth-client-credentials-flow`},{property:`provider.mistral.backend.type`,equals:`custom`},{property:`provider.type`,equals:`mistral`}]},optional:!0},{name:`provider.mistral.backend.custom.authentication.clientAuthentication`,type:`Dropdown`,value:`BASIC_AUTH_HEADER`,condition:{allMatch:[{property:`provider.mistral.backend.custom.authentication.type`,equals:`oauth-client-credentials-flow`},{property:`provider.mistral.backend.type`,equals:`custom`},{property:`provider.type`,equals:`mistral`}]},choices:[`BASIC_AUTH_HEADER`,`CREDENTIALS_BODY`]},{name:`provider.mistral.backend.custom.authentication.scopes`,type:`String`,feel:`optional`,condition:{allMatch:[{property:`provider.mistral.backend.custom.authentication.type`,equals:`oauth-client-credentials-flow`},{property:`provider.mistral.backend.type`,equals:`custom`},{property:`provider.type`,equals:`mistral`}]},optional:!0},{name:`provider.mistral.timeouts.timeout`,type:`String`,feel:`optional`,condition:{property:`provider.type`,equals:`mistral`},optional:!0},{name:`provider.providerType`,type:`String`,feel:`optional`,condition:{property:`provider.type`,equals:`custom`}},{name:`provider.parameters`,type:`String`,feel:`required`,condition:{property:`provider.type`,equals:`custom`},optional:!0},{name:`provider.anthropic.backend.anthropic.headers`,type:`Hidden`,condition:{allMatch:[{property:`provider.anthropic.backend.type`,equals:`anthropic-api`},{property:`provider.type`,equals:`anthropic`}]},optional:!0},{name:`provider.anthropic.backend.anthropic.queryParameters`,type:`Hidden`,condition:{allMatch:[{property:`provider.anthropic.backend.type`,equals:`anthropic-api`},{property:`provider.type`,equals:`anthropic`}]},optional:!0},{name:`provider.anthropic.backend.anthropic.bodyProperties`,type:`Hidden`,condition:{allMatch:[{property:`provider.anthropic.backend.type`,equals:`anthropic-api`},{property:`provider.type`,equals:`anthropic`}]},optional:!0},{name:`provider.anthropic.backend.awsBedrockMantle.headers`,type:`Hidden`,condition:{allMatch:[{property:`provider.anthropic.backend.type`,equals:`aws-bedrock-mantle`},{property:`provider.type`,equals:`anthropic`}]},optional:!0},{name:`provider.anthropic.backend.awsBedrockMantle.queryParameters`,type:`Hidden`,condition:{allMatch:[{property:`provider.anthropic.backend.type`,equals:`aws-bedrock-mantle`},{property:`provider.type`,equals:`anthropic`}]},optional:!0},{name:`provider.anthropic.backend.awsBedrockMantle.bodyProperties`,type:`Hidden`,condition:{allMatch:[{property:`provider.anthropic.backend.type`,equals:`aws-bedrock-mantle`},{property:`provider.type`,equals:`anthropic`}]},optional:!0},{name:`provider.anthropic.backend.foundry.headers`,type:`Hidden`,condition:{allMatch:[{property:`provider.anthropic.backend.type`,equals:`foundry`},{property:`provider.type`,equals:`anthropic`}]},optional:!0},{name:`provider.anthropic.backend.foundry.queryParameters`,type:`Hidden`,condition:{allMatch:[{property:`provider.anthropic.backend.type`,equals:`foundry`},{property:`provider.type`,equals:`anthropic`}]},optional:!0},{name:`provider.anthropic.backend.foundry.bodyProperties`,type:`Hidden`,condition:{allMatch:[{property:`provider.anthropic.backend.type`,equals:`foundry`},{property:`provider.type`,equals:`anthropic`}]},optional:!0},{name:`provider.anthropic.backend.custom.headers`,type:`String`,feel:`required`,condition:{allMatch:[{property:`provider.anthropic.backend.type`,equals:`custom`},{property:`provider.type`,equals:`anthropic`}]},optional:!0},{name:`provider.anthropic.backend.custom.queryParameters`,type:`String`,feel:`required`,condition:{allMatch:[{property:`provider.anthropic.backend.type`,equals:`custom`},{property:`provider.type`,equals:`anthropic`}]},optional:!0},{name:`provider.anthropic.backend.custom.bodyProperties`,type:`String`,feel:`required`,condition:{allMatch:[{property:`provider.anthropic.backend.type`,equals:`custom`},{property:`provider.type`,equals:`anthropic`}]},optional:!0},{name:`provider.bedrock.headers`,type:`String`,feel:`required`,condition:{property:`provider.type`,equals:`bedrock`},optional:!0},{name:`provider.bedrock.queryParameters`,type:`String`,feel:`required`,condition:{property:`provider.type`,equals:`bedrock`},optional:!0},{name:`provider.bedrock.bodyProperties`,type:`String`,feel:`required`,condition:{property:`provider.type`,equals:`bedrock`},optional:!0},{name:`provider.openai.backend.openai.headers`,type:`Hidden`,condition:{allMatch:[{property:`provider.openai.backend.type`,equals:`openai-api`},{property:`provider.type`,equals:`openai`}]},optional:!0},{name:`provider.openai.backend.openai.queryParameters`,type:`Hidden`,condition:{allMatch:[{property:`provider.openai.backend.type`,equals:`openai-api`},{property:`provider.type`,equals:`openai`}]},optional:!0},{name:`provider.openai.backend.openai.bodyProperties`,type:`Hidden`,condition:{allMatch:[{property:`provider.openai.backend.type`,equals:`openai-api`},{property:`provider.type`,equals:`openai`}]},optional:!0},{name:`provider.openai.backend.foundry.apiVersion`,type:`Hidden`,condition:{allMatch:[{property:`provider.openai.backend.type`,equals:`foundry`},{property:`provider.type`,equals:`openai`}]},optional:!0},{name:`provider.openai.backend.foundry.headers`,type:`Hidden`,condition:{allMatch:[{property:`provider.openai.backend.type`,equals:`foundry`},{property:`provider.type`,equals:`openai`}]},optional:!0},{name:`provider.openai.backend.foundry.queryParameters`,type:`Hidden`,condition:{allMatch:[{property:`provider.openai.backend.type`,equals:`foundry`},{property:`provider.type`,equals:`openai`}]},optional:!0},{name:`provider.openai.backend.foundry.bodyProperties`,type:`Hidden`,condition:{allMatch:[{property:`provider.openai.backend.type`,equals:`foundry`},{property:`provider.type`,equals:`openai`}]},optional:!0},{name:`provider.openai.backend.custom.headers`,type:`String`,feel:`required`,condition:{allMatch:[{property:`provider.openai.backend.type`,equals:`custom`},{property:`provider.type`,equals:`openai`}]},optional:!0},{name:`provider.openai.backend.custom.queryParameters`,type:`String`,feel:`required`,condition:{allMatch:[{property:`provider.openai.backend.type`,equals:`custom`},{property:`provider.type`,equals:`openai`}]},optional:!0},{name:`provider.openai.backend.custom.bodyProperties`,type:`String`,feel:`required`,condition:{allMatch:[{property:`provider.openai.backend.type`,equals:`custom`},{property:`provider.type`,equals:`openai`}]},optional:!0},{name:`provider.mistral.backend.mistral.headers`,type:`Hidden`,condition:{allMatch:[{property:`provider.mistral.backend.type`,equals:`mistral-api`},{property:`provider.type`,equals:`mistral`}]},optional:!0},{name:`provider.mistral.backend.mistral.queryParameters`,type:`Hidden`,condition:{allMatch:[{property:`provider.mistral.backend.type`,equals:`mistral-api`},{property:`provider.type`,equals:`mistral`}]},optional:!0},{name:`provider.mistral.backend.mistral.bodyProperties`,type:`Hidden`,condition:{allMatch:[{property:`provider.mistral.backend.type`,equals:`mistral-api`},{property:`provider.type`,equals:`mistral`}]},optional:!0},{name:`provider.mistral.backend.custom.headers`,type:`String`,feel:`required`,condition:{allMatch:[{property:`provider.mistral.backend.type`,equals:`custom`},{property:`provider.type`,equals:`mistral`}]},optional:!0},{name:`provider.mistral.backend.custom.queryParameters`,type:`String`,feel:`required`,condition:{allMatch:[{property:`provider.mistral.backend.type`,equals:`custom`},{property:`provider.type`,equals:`mistral`}]},optional:!0},{name:`provider.mistral.backend.custom.bodyProperties`,type:`String`,feel:`required`,condition:{allMatch:[{property:`provider.mistral.backend.type`,equals:`custom`},{property:`provider.type`,equals:`mistral`}]},optional:!0},{name:`provider.anthropic.model.model`,type:`String`,feel:`optional`,condition:{property:`provider.type`,equals:`anthropic`}},{name:`provider.anthropic.model.parameters.effort`,type:`Dropdown`,value:`modelDefault`,condition:{property:`provider.type`,equals:`anthropic`},choices:[`modelDefault`,`low`,`medium`,`high`,`xhigh`,`max`]},{name:`provider.anthropic.model.parameters.thinking.mode`,type:`Dropdown`,value:`modelDefault`,condition:{property:`provider.type`,equals:`anthropic`},choices:[`modelDefault`,`enabled`,`adaptive`,`disabled`]},{name:`provider.anthropic.model.parameters.thinking.budgetTokens`,type:`Number`,feel:`required`,condition:{allMatch:[{property:`provider.anthropic.model.parameters.thinking.mode`,equals:`enabled`},{property:`provider.type`,equals:`anthropic`}]}},{name:`provider.anthropic.model.parameters.thinking.display`,type:`Dropdown`,value:`summarized`,condition:{allMatch:[{property:`provider.anthropic.model.parameters.thinking.mode`,equals:`adaptive`},{property:`provider.type`,equals:`anthropic`}]},choices:[`summarized`,`omitted`],optional:!0},{name:`provider.anthropic.model.parameters.promptCaching.enabled`,type:`Boolean`,value:!0,feel:`static`,condition:{property:`provider.type`,equals:`anthropic`},optional:!0},{name:`provider.bedrock.model.model`,type:`String`,feel:`optional`,condition:{property:`provider.type`,equals:`bedrock`}},{name:`provider.bedrock.model.parameters.promptCaching.enabled`,type:`Boolean`,value:!0,feel:`static`,condition:{property:`provider.type`,equals:`bedrock`},optional:!0},{name:`provider.openai.model.model`,type:`String`,feel:`optional`,condition:{property:`provider.type`,equals:`openai`}},{name:`provider.openai.api.responses.effort`,type:`Dropdown`,value:`modelDefault`,condition:{allMatch:[{property:`provider.openai.api.type`,equals:`responses`},{property:`provider.type`,equals:`openai`}]},choices:[`modelDefault`,`minimal`,`low`,`medium`,`high`,`xhigh`,`max`]},{name:`provider.openai.api.completions.effort`,type:`Dropdown`,value:`modelDefault`,condition:{allMatch:[{property:`provider.openai.api.type`,equals:`completions`},{property:`provider.type`,equals:`openai`}]},choices:[`modelDefault`,`minimal`,`low`,`medium`,`high`,`xhigh`,`max`]},{name:`provider.googleGemini.model.model`,type:`String`,feel:`optional`,condition:{property:`provider.type`,equals:`google-gemini`}},{name:`provider.googleGemini.model.parameters.thinking.thinkingBudget`,type:`Number`,feel:`required`,condition:{allMatch:[{property:`provider.googleGemini.model.parameters.thinking.thinkingLevel`,equals:`modelDefault`},{property:`provider.type`,equals:`google-gemini`}]},optional:!0},{name:`provider.googleGemini.model.parameters.thinking.thinkingLevel`,type:`Dropdown`,value:`modelDefault`,condition:{property:`provider.type`,equals:`google-gemini`},choices:[`modelDefault`,`minimal`,`low`,`medium`,`high`]},{name:`provider.mistral.model.model`,type:`String`,feel:`optional`,condition:{property:`provider.type`,equals:`mistral`}},{name:`provider.mistral.parameters.effort`,type:`Dropdown`,value:`modelDefault`,condition:{property:`provider.type`,equals:`mistral`},choices:[`modelDefault`,`none`,`high`]},{name:`provider.model`,type:`String`,feel:`optional`,condition:{property:`provider.type`,equals:`custom`}},{name:`provider.anthropic.model.parameters.maxTokens`,type:`Number`,feel:`required`,condition:{property:`provider.type`,equals:`anthropic`},optional:!0},{name:`provider.anthropic.model.parameters.temperature`,type:`Number`,feel:`required`,condition:{property:`provider.type`,equals:`anthropic`},optional:!0},{name:`provider.anthropic.model.parameters.topP`,type:`Number`,feel:`required`,condition:{property:`provider.type`,equals:`anthropic`},optional:!0},{name:`provider.anthropic.model.parameters.topK`,type:`Number`,feel:`required`,condition:{property:`provider.type`,equals:`anthropic`},optional:!0},{name:`provider.bedrock.model.parameters.maxTokens`,type:`Number`,feel:`required`,condition:{property:`provider.type`,equals:`bedrock`},optional:!0},{name:`provider.bedrock.model.parameters.temperature`,type:`Number`,feel:`required`,condition:{property:`provider.type`,equals:`bedrock`},optional:!0},{name:`provider.bedrock.model.parameters.topP`,type:`Number`,feel:`required`,condition:{property:`provider.type`,equals:`bedrock`},optional:!0},{name:`provider.openai.api.responses.maxOutputTokens`,type:`Number`,feel:`required`,condition:{allMatch:[{property:`provider.openai.api.type`,equals:`responses`},{property:`provider.type`,equals:`openai`}]},optional:!0},{name:`provider.openai.api.responses.temperature`,type:`Number`,feel:`required`,condition:{allMatch:[{property:`provider.openai.api.type`,equals:`responses`},{property:`provider.type`,equals:`openai`}]},optional:!0},{name:`provider.openai.api.responses.topP`,type:`Number`,feel:`required`,condition:{allMatch:[{property:`provider.openai.api.type`,equals:`responses`},{property:`provider.type`,equals:`openai`}]},optional:!0},{name:`provider.openai.api.completions.maxCompletionTokens`,type:`Number`,feel:`required`,condition:{allMatch:[{property:`provider.openai.api.type`,equals:`completions`},{property:`provider.type`,equals:`openai`}]},optional:!0},{name:`provider.openai.api.completions.temperature`,type:`Number`,feel:`required`,condition:{allMatch:[{property:`provider.openai.api.type`,equals:`completions`},{property:`provider.type`,equals:`openai`}]},optional:!0},{name:`provider.openai.api.completions.topP`,type:`Number`,feel:`required`,condition:{allMatch:[{property:`provider.openai.api.type`,equals:`completions`},{property:`provider.type`,equals:`openai`}]},optional:!0},{name:`provider.googleGemini.model.parameters.maxTokens`,type:`Number`,feel:`required`,condition:{property:`provider.type`,equals:`google-gemini`},optional:!0},{name:`provider.googleGemini.model.parameters.temperature`,type:`Number`,feel:`required`,condition:{property:`provider.type`,equals:`google-gemini`},optional:!0},{name:`provider.googleGemini.model.parameters.topP`,type:`Number`,feel:`required`,condition:{property:`provider.type`,equals:`google-gemini`},optional:!0},{name:`provider.googleGemini.model.parameters.topK`,type:`Number`,feel:`required`,condition:{property:`provider.type`,equals:`google-gemini`},optional:!0},{name:`provider.mistral.parameters.maxTokens`,type:`Number`,feel:`required`,condition:{property:`provider.type`,equals:`mistral`},optional:!0},{name:`provider.mistral.parameters.temperature`,type:`Number`,feel:`required`,condition:{property:`provider.type`,equals:`mistral`},optional:!0},{name:`provider.mistral.parameters.topP`,type:`Number`,feel:`required`,condition:{property:`provider.type`,equals:`mistral`},optional:!0},{name:`data.systemPrompt.prompt`,type:`Text`,value:`="You are **TaskAgent**, a helpful, capable agent that can handle a wide variety of customer requests using your own knowledge **and** any tools explicitly provided to you at runtime. Prefer a provided tool over guessing whenever it would give a more accurate or reliable answer, and only use tools that were explicitly configured for you (never assume a tool exists). You can call the same tool multiple times with different inputs if that helps complete the request. If no tool fits the request, answer from your own knowledge; if you can't produce a reliable answer, say so plainly and explain why, rather than guessing."`,feel:`required`},{name:`data.userPrompt.prompt`,type:`Text`,feel:`required`},{name:`data.userPrompt.documents`,type:`String`,feel:`required`,optional:!0},{name:`data.tools.containerElementId`,type:`String`,feel:`optional`,optional:!0},{name:`data.tools.toolCallResults`,type:`Text`,feel:`required`,optional:!0},{name:`data.context`,id:`data.agentContext`,type:`Text`,value:`=agent.context`,feel:`required`},{name:`data.memory.storage.type`,type:`Dropdown`,value:`in-process`,choices:[`in-process`,`camunda-document`,`aws-agentcore`,`custom`]},{name:`data.memory.storage.timeToLive`,type:`String`,feel:`optional`,condition:{property:`data.memory.storage.type`,equals:`camunda-document`},optional:!0},{name:`data.memory.storage.customProperties`,type:`String`,feel:`required`,condition:{property:`data.memory.storage.type`,equals:`camunda-document`},optional:!0},{name:`data.memory.storage.region`,type:`String`,feel:`optional`,condition:{property:`data.memory.storage.type`,equals:`aws-agentcore`}},{name:`data.memory.storage.endpoint`,type:`String`,feel:`optional`,condition:{property:`data.memory.storage.type`,equals:`aws-agentcore`},optional:!0},{name:`data.memory.storage.authentication.type`,type:`Dropdown`,value:`credentials`,condition:{property:`data.memory.storage.type`,equals:`aws-agentcore`},choices:[`credentials`,`defaultCredentialsChain`]},{name:`data.memory.storage.authentication.accessKey`,type:`String`,feel:`optional`,condition:{allMatch:[{property:`data.memory.storage.authentication.type`,equals:`credentials`},{property:`data.memory.storage.type`,equals:`aws-agentcore`}]}},{name:`data.memory.storage.authentication.secretKey`,type:`String`,feel:`optional`,condition:{allMatch:[{property:`data.memory.storage.authentication.type`,equals:`credentials`},{property:`data.memory.storage.type`,equals:`aws-agentcore`}]}},{name:`data.memory.storage.memoryId`,type:`String`,feel:`optional`,condition:{property:`data.memory.storage.type`,equals:`aws-agentcore`}},{name:`data.memory.storage.actorId`,type:`String`,feel:`optional`,condition:{property:`data.memory.storage.type`,equals:`aws-agentcore`}},{name:`data.memory.storage.storeType`,type:`String`,feel:`optional`,condition:{property:`data.memory.storage.type`,equals:`custom`}},{name:`data.memory.storage.parameters`,type:`String`,feel:`required`,condition:{property:`data.memory.storage.type`,equals:`custom`},optional:!0},{name:`data.memory.contextWindowSize`,type:`Number`,value:20,feel:`static`},{name:`data.limits.maxModelCalls`,type:`Number`,value:10,feel:`static`},{name:`data.response.format.type`,type:`Dropdown`,value:`text`,choices:[`text`,`json`]},{name:`data.response.format.parseJson`,type:`Boolean`,feel:`static`,condition:{property:`data.response.format.type`,equals:`text`},optional:!0},{name:`data.response.format.schema`,type:`String`,feel:`required`,condition:{property:`data.response.format.type`,equals:`json`},optional:!0},{name:`data.response.format.schemaName`,type:`String`,value:`Response`,feel:`optional`,condition:{property:`data.response.format.type`,equals:`json`},optional:!0},{name:`data.response.includeAssistantMessage`,type:`Boolean`,feel:`static`,optional:!0}],migratesFrom:{schemaVersion:1,sources:[{kind:`change`,sourceTemplateId:`io.camunda.connectors.agenticai.aiagent.v1`,minSourceVersion:12,paths:[{from:`provider.type`,to:`provider.type`,valueMap:{rules:[{match:`anthropic`,value:`anthropic`},{match:`bedrock`,value:`bedrock`},{match:`openai`,value:`openai`},{match:`azureOpenAi`,value:`openai`},{match:`openaiCompatible`,value:`openai`},{match:`google-vertex-ai`,value:`google-gemini`}]}},{when:{path:`provider.type`,equals:`anthropic`},rules:[{to:`provider.anthropic.model.parameters.promptCaching.enabled`,set:!0,note:`Anthropic prompt caching is now enabled, and effort and thinking use the model default. v1 sent no caching or reasoning settings.`},{when:{path:`provider.anthropic.endpoint`,exists:!1},rules:[{to:`provider.anthropic.backend.type`,set:`anthropic-api`},{from:`provider.anthropic.authentication.apiKey`,to:`provider.anthropic.backend.anthropic.apiKey`}]},{when:{path:`provider.anthropic.endpoint`,matches:`*.azure.com*`},rules:[{to:`provider.anthropic.backend.type`,set:`foundry`},{to:`provider.anthropic.backend.foundry.authentication.type`,set:`apiKey`},{from:`provider.anthropic.authentication.apiKey`,to:`provider.anthropic.backend.foundry.authentication.apiKey`},{from:`provider.anthropic.endpoint`,to:`provider.anthropic.backend.foundry.endpoint`,note:{level:`warning`,message:`The Anthropic endpoint was copied as-is to the Microsoft Foundry backend. v2 adds /anthropic if missing and appends /v1/messages, so remove a trailing /anthropic/v1 or /v1.`}}]},{when:{path:`provider.anthropic.endpoint`,matches:`*.azure.us*`},rules:[{to:`provider.anthropic.backend.type`,set:`foundry`},{to:`provider.anthropic.backend.foundry.authentication.type`,set:`apiKey`},{from:`provider.anthropic.authentication.apiKey`,to:`provider.anthropic.backend.foundry.authentication.apiKey`},{from:`provider.anthropic.endpoint`,to:`provider.anthropic.backend.foundry.endpoint`,note:{level:`warning`,message:`The Anthropic endpoint was copied as-is to the Microsoft Foundry backend. v2 adds /anthropic if missing and appends /v1/messages, so remove a trailing /anthropic/v1 or /v1.`}}]},{when:{path:`provider.anthropic.endpoint`,matches:`*.azure.cn*`},rules:[{to:`provider.anthropic.backend.type`,set:`foundry`},{to:`provider.anthropic.backend.foundry.authentication.type`,set:`apiKey`},{from:`provider.anthropic.authentication.apiKey`,to:`provider.anthropic.backend.foundry.authentication.apiKey`},{from:`provider.anthropic.endpoint`,to:`provider.anthropic.backend.foundry.endpoint`,note:{level:`warning`,message:`The Anthropic endpoint was copied as-is to the Microsoft Foundry backend. v2 adds /anthropic if missing and appends /v1/messages, so remove a trailing /anthropic/v1 or /v1.`}}]},{when:[{path:`provider.anthropic.endpoint`,exists:!0},{path:`provider.anthropic.endpoint`,matches:`*.azure.com*`,not:!0},{path:`provider.anthropic.endpoint`,matches:`*.azure.us*`,not:!0},{path:`provider.anthropic.endpoint`,matches:`*.azure.cn*`,not:!0}],rules:[{to:`provider.anthropic.backend.type`,set:`custom`},{to:`provider.anthropic.backend.custom.authentication.type`,set:`apiKey`},{from:`provider.anthropic.authentication.apiKey`,to:`provider.anthropic.backend.custom.authentication.apiKey`},{from:`provider.anthropic.endpoint`,to:`provider.anthropic.backend.custom.endpoint`,note:{level:`warning`,message:`The Anthropic endpoint was copied as-is to the custom backend. v2 appends /v1/messages, so remove a trailing /v1.`}}]}]},{when:{path:`provider.type`,equals:`bedrock`},rules:[{to:`provider.bedrock.model.parameters.promptCaching.enabled`,set:!0,note:`AWS Bedrock prompt caching is now enabled. v1 sent no caching settings.`}]},{when:{path:`provider.type`,equals:`openai`},rules:[{to:`provider.openai.api.type`,set:`completions`},{to:`provider.openai.backend.type`,set:`openai-api`},{from:`provider.openai.authentication.apiKey`,to:`provider.openai.backend.openai.apiKey`},{from:`provider.openai.authentication.organizationId`,to:`provider.openai.backend.openai.organizationId`},{from:`provider.openai.authentication.projectId`,to:`provider.openai.backend.openai.projectId`},{from:`provider.openai.model.parameters.maxCompletionTokens`,to:`provider.openai.api.completions.maxCompletionTokens`},{from:`provider.openai.model.parameters.temperature`,to:`provider.openai.api.completions.temperature`},{from:`provider.openai.model.parameters.topP`,to:`provider.openai.api.completions.topP`}]},{when:{path:`provider.type`,equals:`azureOpenAi`},rules:[{to:`provider.openai.api.type`,set:`completions`},{to:`provider.openai.backend.type`,set:`foundry`},{from:`provider.azureOpenAi.endpoint`,to:`provider.openai.backend.foundry.endpoint`},{from:`provider.azureOpenAi.authentication.type`,to:`provider.openai.backend.foundry.authentication.type`},{from:`provider.azureOpenAi.authentication.apiKey`,to:`provider.openai.backend.foundry.authentication.apiKey`},{from:`provider.azureOpenAi.authentication.clientId`,to:`provider.openai.backend.foundry.authentication.clientId`},{from:`provider.azureOpenAi.authentication.clientSecret`,to:`provider.openai.backend.foundry.authentication.clientSecret`},{from:`provider.azureOpenAi.authentication.tenantId`,to:`provider.openai.backend.foundry.authentication.tenantId`},{from:`provider.azureOpenAi.authentication.authorityHost`,to:`provider.openai.backend.foundry.authentication.authorityHost`},{from:`provider.azureOpenAi.timeouts.timeout`,to:`provider.openai.timeouts.timeout`},{from:`provider.azureOpenAi.model.deploymentName`,to:`provider.openai.model.model`},{from:`provider.azureOpenAi.model.parameters.maxTokens`,to:`provider.openai.api.completions.maxCompletionTokens`},{from:`provider.azureOpenAi.model.parameters.temperature`,to:`provider.openai.api.completions.temperature`},{from:`provider.azureOpenAi.model.parameters.topP`,to:`provider.openai.api.completions.topP`}]},{when:{path:`provider.type`,equals:`openaiCompatible`},rules:[{to:`provider.openai.api.type`,set:`completions`},{to:`provider.openai.backend.type`,set:`custom`},{from:`provider.openaiCompatible.endpoint`,to:`provider.openai.backend.custom.endpoint`},{from:`provider.openaiCompatible.headers`,to:`provider.openai.backend.custom.headers`},{from:`provider.openaiCompatible.queryParameters`,to:`provider.openai.backend.custom.queryParameters`},{from:`provider.openaiCompatible.timeouts.timeout`,to:`provider.openai.timeouts.timeout`},{from:`provider.openaiCompatible.model.model`,to:`provider.openai.model.model`},{from:`provider.openaiCompatible.model.parameters.maxCompletionTokens`,to:`provider.openai.api.completions.maxCompletionTokens`},{from:`provider.openaiCompatible.model.parameters.temperature`,to:`provider.openai.api.completions.temperature`},{from:`provider.openaiCompatible.model.parameters.topP`,to:`provider.openai.api.completions.topP`},{from:`provider.openaiCompatible.model.parameters.customParameters`,to:`provider.openai.backend.custom.bodyProperties`},{when:{path:`provider.openaiCompatible.authentication.apiKey`,exists:!0},rules:[{to:`provider.openai.backend.custom.authentication.type`,set:`apiKey`},{from:`provider.openaiCompatible.authentication.apiKey`,to:`provider.openai.backend.custom.authentication.apiKey`}]},{when:{path:`provider.openaiCompatible.authentication.apiKey`,exists:!1},rules:[{to:`provider.openai.backend.custom.authentication.type`,set:`none`}]}]},{when:{path:`provider.type`,equals:`google-vertex-ai`},rules:[{to:`provider.googleGemini.backend.type`,set:`google-vertex-ai`},{from:`provider.googleVertexAi.projectId`,to:`provider.googleGemini.backend.googleVertexAi.projectId`},{from:`provider.googleVertexAi.region`,to:`provider.googleGemini.backend.googleVertexAi.region`},{from:`provider.googleVertexAi.endpoint`,to:`provider.googleGemini.backend.googleVertexAi.endpoint`,note:{level:`warning`,message:`The custom Vertex AI endpoint was moved to a hidden v2 field. It applies at runtime, but Modeler no longer shows or edits it.`}},{from:`provider.googleVertexAi.authentication.type`,to:`provider.googleGemini.backend.googleVertexAi.authentication.type`},{from:`provider.googleVertexAi.authentication.jsonKey`,to:`provider.googleGemini.backend.googleVertexAi.authentication.jsonKey`},{from:`provider.googleVertexAi.timeouts.timeout`,to:`provider.googleGemini.timeouts.timeout`},{from:`provider.googleVertexAi.model.model`,to:`provider.googleGemini.model.model`},{from:`provider.googleVertexAi.model.parameters.maxOutputTokens`,to:`provider.googleGemini.model.parameters.maxTokens`},{from:`provider.googleVertexAi.model.parameters.temperature`,to:`provider.googleGemini.model.parameters.temperature`},{from:`provider.googleVertexAi.model.parameters.topP`,to:`provider.googleGemini.model.parameters.topP`},{from:`provider.googleVertexAi.model.parameters.topK`,to:`provider.googleGemini.model.parameters.topK`}]}]}]}};const b={[p]:y,[f]:v};var x=class extends Error{reason;detail;constructor(e,n,r={}){let i=t(`app.agents.migrate.refusal.${n}`,r);super(i),this.reason=e,this.detail=i}};function S(e,t){let n=e.split(`*`).map(e=>e.replace(/[.+?^${}()|[\]\\]/g,`\\$&`)).join(`.*`);return RegExp(`^${n}$`,`s`).test(t)}function C(e,t){let n=t.get(e.path),r;if(e.exists!==void 0)r=(n!==void 0&&n.trim()!==``)===e.exists;else if(e.equals!==void 0)r=n===e.equals;else if(e.matches!==void 0)r=n!==void 0&&S(e.matches,n);else throw new x(`unsupported-rule`,`unknownCondition`,{what:JSON.stringify(e)});return e.not===!0?!r:r}function w(e,t){return e===void 0||(Array.isArray(e)?e:[e]).every(e=>C(e,t))}function T(e){return e===void 0?null:typeof e==`string`?{level:`info`,message:e}:typeof e.message==`string`?{level:e.level===`warning`?`warning`:`info`,message:e.message}:null}function E(e,t){return typeof t==`boolean`?`=${t}`:typeof t==`number`?e?.feel===`static`||e?.type===`Number`?`=${t}`:String(t):t}function D(e,t,n,r){for(let i of e)if(i.rules!==void 0)w(i.when,t)&&D(i.rules,t,n,r);else{if(i.to===void 0)throw new x(`unsupported-rule`,`noTarget`);if(w(i.when,t)){if(i.from!==void 0){let e=t.get(i.from);if(e===void 0)continue;let r=e;if(i.valueMap){let t=i.valueMap.rules.find(t=>t.match===e);if(!t)throw new x(`unmapped-value`,e.startsWith(`=`)?`unmappedExpression`:`unmappedValue`,{path:i.from,value:e});r=t.value}n.moves.set(i.from,{to:i.to,source:r}),n.changes.push({kind:`moved`,target:i.to,from:i.from});let a=T(i.note);a&&n.notes.push(a)}else if(i.set!==void 0){n.sets.set(i.to,E(r.get(i.to),i.set)),n.changes.push({kind:`set`,target:i.to});let e=T(i.note);e&&n.notes.push(e)}else throw new x(`unsupported-rule`,`noAction`,{target:i.to})}}}function O(e,t){if(e===void 0)return!0;if(e.allMatch)return e.allMatch.every(e=>O(e,t));let n=t(e.property);if(n===null)throw new x(`dynamic-value`,`dynamicValue`,{property:e.property});if(e.equals!==void 0)return n===e.equals;if(e.oneOf!==void 0)return n!==void 0&&e.oneOf.includes(n);throw new x(`unsupported-rule`,`unknownCondition`,{what:JSON.stringify(e)})}function k(e,t){let n=b[t.id],r=n.migratesFrom.sources.find(e=>e.sourceTemplateId===t.id);if(!r)throw new x(`unsupported-rule`,`noMigration`);if(t.version===null)throw new x(`no-version`,`noVersion`);if(t.version<r.minSourceVersion)throw new x(`too-old`,`tooOld`,{version:t.version,min:r.minSourceVersion});if(t.version>13)throw new x(`too-new`,`tooNew`,{version:t.version,max:13});let i=d(e);if(((e.extensionElements?.values??[]).find(e=>e.$type===`zeebe:IoMapping`)?.inputParameters??[]).length!==i.size)throw new x(`duplicate-input`,`duplicateInput`);let a=new Map(n.inputs.map(e=>[e.name,e])),o=new Map(n.inputs.map(e=>[e.id??e.name,e])),s={moves:/* @__PURE__ */ new Map,sets:/* @__PURE__ */ new Map,notes:[],changes:[]};D(r.paths,i,s,a);let c=[],l=/* @__PURE__ */ new Map,u=e=>{let t=l.get(e.target);t===void 0?(l.set(e.target,c.length),c.push(e)):c[t]=e};for(let[e,t]of i){let n=s.moves.get(e);u(n?{target:n.to,source:n.source,raw:null,origin:`moved`,oldTarget:e}:{target:e,source:t,raw:t,origin:`old`,oldTarget:e})}for(let[e,t]of s.sets)u({target:e,source:t,raw:null,origin:`set`,oldTarget:e});let f=new Map(c.map(e=>[e.target,e.source??``])),p=e=>{let t=o.get(e),n=t?.name??e,r=f.get(n);return r===void 0?t?.value===void 0?void 0:E(t,t.value):r.startsWith(`=`)?null:r},m=/* @__PURE__ */ new Set;for(let e of n.inputs)O(e.condition,p)&&m.add(e.name);let h=[];for(let e of c){let t=a.get(e.target);if(!t)throw new x(`unknown-input`,`unknownInput`,{target:e.oldTarget});if(!m.has(e.target)){if((e.source??``).trim()===``)continue;throw new x(`inactive-input`,`inactiveInput`,{target:e.target})}if(t.choices&&e.source!==null&&!t.choices.includes(e.source)&&!(e.source.startsWith(`=`)&&t.feel!==void 0&&t.type!==`Dropdown`))throw new x(`bad-choice`,`badChoice`,{target:e.target,value:e.source});h.push(e)}let g=new Set(h.map(e=>e.target));for(let e of n.inputs)if(m.has(e.name)&&!g.has(e.name)){if(e.value!==void 0)h.push({target:e.name,source:E(e,e.value),raw:null,origin:`default`,oldTarget:e.name});else if(e.optional!==!0){if(e.type===`Dropdown`)throw new x(`unmapped-value`,`mustChoose`,{target:e.name});h.push({target:e.name,source:e.type===`Boolean`?`=false`:null,raw:null,origin:`default`,oldTarget:e.name})}}let _=[];for(let e of s.changes)h.some(t=>t.target===e.target)&&_.push(e);for(let e of h)e.origin==="default"&&_.push({kind:`added`,target:e.target});return{finals:h,changes:_,notes:s.notes,template:n}}const A=`(?:\\s+[^\\s=>/]+\\s*=\\s*(?:"[^"]*"|'[^']*'))*`;function j(e){return e.replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`).replace(/"/g,`"`).replace(/\r?\n/g,` `).replace(/\t/g,`	`)}function M(e){return e.replace(/&#(\d+);/g,(e,t)=>String.fromCodePoint(Number(t))).replace(/&#x([0-9a-f]+);/gi,(e,t)=>String.fromCodePoint(parseInt(t,16))).replace(/"/g,`"`).replace(/'/g,`'`).replace(/</g,`<`).replace(/>/g,`>`).replace(/&/g,`&`)}function N(e){let t=/* @__PURE__ */ new Map;for(let n of e.matchAll(/([^\s=]+)\s*=\s*(?:"([^"]*)"|'([^']*)')/g))t.set(n[1],M(n[2]??n[3]??``));return t}function P(e){let t=/xmlns:([\w.-]+)\s*=\s*["']http:\/\/camunda\.org\/schema\/zeebe\/1\.0["']/.exec(e);return t?t[1]:null}function F(e,t){let n=[...e.matchAll(RegExp(`<([\\w.-]+:)?(?:serviceTask|adHocSubProcess)(${A})\\s*(/?)>`,`g`))].filter(e=>N(e[2]).get(`id`)===t);if(n.length!==1||n[0][3]===`/`)return null;let r=n[0],i=r.index,a=i+r[0].length,o=r[1]??``,s=e.slice(a),c=RegExp(`^(?:\\s|<${o}documentation(?:\\s[^>]*)?>[\\s\\S]*?</${o}documentation>)*<${o}extensionElements\\s*>`).exec(s);if(!c)return null;let l=a+c[0].length,u=e.indexOf(`</${o}extensionElements>`,l);return u<0?null:{tagStart:i,tagEnd:a,tag:r[0],blockStart:l,blockEnd:u,block:e.slice(l,u)}}function I(e,t){let n=RegExp(`<${t}ioMapping\\s*>([\\s\\S]*?)</${t}ioMapping>`).exec(e);if(!n)return null;let r=`<${t}ioMapping>`,i=n[1],a=n.index+n[0].indexOf(`>`)+1,o=[],s=RegExp(`<${t}(input|output)(${A})\\s*/>`,`g`);for(let e of i.matchAll(s)){if(e[1]===`output`)continue;let t=N(e[2]);o.push({start:a+e.index,end:a+e.index+e[0].length,text:e[0],target:t.get(`target`)??``,source:t.get(`source`)??``})}let c=/\n([ \t]*)<[^>]*\/>/.exec(i);return{start:n.index,end:n.index+n[0].length,open:r,inputs:o,indent:c?c[1]:``}}function L(e,t,n){return n===null?`<${e}input target="${j(t)}" />`:`<${e}input source="${j(n)}" target="${j(t)}" />`}function R(e,t,n){let r=RegExp(`(\\s${t.replace(/[.:]/g,`\\$&`)}\\s*=\\s*)(?:"[^"]*"|'[^']*')`);return r.test(e)?e.replace(r,`$1"${j(n)}"`):e.replace(/\s*(\/?)>$/,` ${t}="${j(n)}"$1>`)}function z(e,t,n){let r=P(e);if(r===null)throw new x(`not-locatable`,`noZeebe`);let i=F(e,t);if(!i)throw new x(`not-locatable`,`noElement`);let a=`${r}:`,o=I(i.block,a);if(!o)throw new x(`not-locatable`,`noInputs`);let s=new Map(o.inputs.map(e=>[e.target,e.text])),c=n.finals.map(e=>e.origin===`old`?s.get(e.oldTarget)??L(a,e.target,e.source):L(a,e.target,e.source)),l=i.block.slice(0,o.start),u=i.block.slice(o.end),d=`\n${o.indent}${c.join(`\n${o.indent}`)}\n${o.indent.slice(0,Math.max(0,o.indent.length-2))}`,f=`${l}${o.open}${d}</${a}ioMapping>${u}`,p=RegExp(`(<${a}taskDefinition${A}\\s*/>)`).exec(f);if(!p)throw new x(`not-locatable`,`noTaskDefinition`);f=f.replace(p[1],R(p[1],`type`,n.template.taskDefinitionType));for(let[e,t]of[[`elementTemplateVersion`,String(n.template.version)],[`elementTemplateId`,n.template.id]]){let n=RegExp(`<${a}header(?=\\s)[^>]*\\bkey\\s*=\\s*"${e}"[^>]*/>`).exec(f);n&&(f=f.replace(n[0],R(n[0],`value`,t)))}let m=i.tag;return m=R(m,`${a}modelerTemplate`,n.template.id),m=R(m,`${a}modelerTemplateVersion`,String(n.template.version)),`${e.slice(0,i.tagStart)}${m}${e.slice(i.tagEnd,i.blockStart)}${f}${e.slice(i.blockEnd)}`}function B(e){let t=[],n=e=>{for(let r of e.flowElements??[])t.push(r),r.flowElements&&n(r)};for(let t of e?.rootElements??[])if(t.$type===`bpmn:Process`&&n(t),t.$type===`bpmn:Collaboration`)for(let e of t.participants??[])e.processRef&&n(e.processRef);return t}function V(e){return typeof e.name==`string`&&e.name.trim()!==``?e.name:e.id}function H(e,t){let n=[];for(let r of B(e)){if(t.has(r.id))continue;let e=(r.extensionElements?.values??[]).find(e=>e.$type===`zeebe:TaskHeaders`)?.values??[];n.push(JSON.stringify([r.id,r.$type,m(r),[...d(r)],e.map(e=>[e.key,e.value])]))}return n.join(`
|
|
2
|
-
`)}async function U(e){let t=await a(e),n=[];if(!t)return{xml:e,items:n};let r=e;for(let e of B(t)){let t=m(e);if(t.id===null||!(t.id in b))continue;let i=t.id===`io.camunda.connectors.agenticai.aiagent.v1`?`task`:`subprocess`,o=b[t.id],s={id:o.id,version:o.version},c={elementId:e.id,name:V(e),kind:i,from:{id:t.id,version:t.version},to:s};try{if((i===`task`?`bpmn:ServiceTask`:`bpmn:AdHocSubProcess`)!==e.$type)throw new x(`unsupported-rule`,`wrongType`,{type:e.$type});let o=k(e,{id:t.id,version:t.version}),l=z(r,e.id,o),u=await a(l);if(!u)throw new x(`verification`,`unreadable`);let f=B(u).find(t=>t.id===e.id),p=new Map(o.finals.map(e=>[e.target,e.source??``])),h=f?d(f):/* @__PURE__ */ new Map,g=h.size===p.size&&[...p].every(([e,t])=>h.get(e)===t),_=f?m(f):{id:null,version:null};if(!f||!g||_.id!==s.id||_.version!==s.version)throw new x(`verification`,`readBack`);if(H(u,/* @__PURE__ */ new Set([e.id]))!==H(await a(r),/* @__PURE__ */ new Set([e.id])))throw new x(`verification`,`otherChanged`);r=l,n.push({...c,status:`migrated`,reason:null,detail:null,changes:o.changes,notes:o.notes})}catch(e){if(!(e instanceof x))throw e;n.push({...c,status:`untouched`,reason:e.reason,detail:e.detail,changes:[],notes:[]})}}return{xml:r,items:n}}async function W(e){let t=u(e[0]),n=_(t.root),r=[],i=[...new Set(e.flatMap(e=>h(e,[`process`])))].sort(),a=[],s=[];for(let e of i){let i=o(e,n,r);if(i===null)continue;let l=g.join(n,g.relative(t.root,e)),u=await U(i);u.items.length!==0&&(a.push({path:l,before:i,after:u.xml,items:u.items}),s.push({path:l,hash:c(i)}))}return{files:a,skipped:r,snapshots:s,root:n,plan:{edits:a.filter(e=>e.before!==e.after).map(e=>({path:e.path,before:e.before,after:e.after})),creates:[]}}}const G={symlink:`app.migration.apply.reason.symlink`,outside:`app.migration.apply.reason.outside`};function K(e){return e.kind===`moved`&&e.from===e.target?t(`app.cli.agents.migrate.change.remapped`,{target:e.target}):t(`app.cli.agents.migrate.change.${e.kind}`,{target:e.target,from:e.from??``})}function q(e,n){return[t(`app.cli.agents.migrate.element`,{file:e,id:n.elementId,from:n.from.version??`?`,to:n.to.version}),...n.changes.map(e=>` ${K(e)}`),...n.notes.map(e=>` ${e.level}: ${e.message}`)]}async function J(a,o,c){let u=c??await e(),d=r(u);if(o.write&&!d)return{ok:!1,lines:n(u,`agent-tools`)};let f=await W(a),p=e=>g.relative(f.root,e).split(g.sep).join(`/`),m=f.files.flatMap(e=>e.items.map(t=>({file:p(e.path),item:t}))),h=m.filter(e=>e.item.status===`migrated`),_=m.filter(e=>e.item.status===`untouched`),v=o.write||d?0:Math.max(0,h.length-3),y=v>0?h.slice(0,3):h,b=[];if(o.write&&f.plan.edits.length>0)try{b=s(f).rewritten}catch(e){if(e instanceof l){let n=e.files.map(e=>`${p(e.path)}: ${t(`app.migration.apply.reason.${e.reason}`)}`);return{ok:!1,lines:[t(`app.cli.migrate.apply.refused`),...n.map(e=>` ${e}`)]}}throw e}if(o.format===`json`)return{ok:!0,refused:!1,lines:[JSON.stringify({write:o.write,written:b.map(p),migrated:y.map(({file:e,item:t})=>({file:e,...t})),migratedTotal:h.length,truncated:v>0||void 0,untouched:_.map(({file:e,item:t})=>({file:e,element:t.elementId,name:t.name,reason:t.reason,detail:t.detail})),skipped:f.skipped.map(e=>({file:p(e.path),reason:e.reason}))},null,2)]};if(m.length===0&&f.skipped.length===0)return{ok:!0,lines:[t(`app.cli.agents.migrate.nothing`)]};let x=[];o.write||x.push(t(`app.cli.agents.migrate.dryRun`),``),o.write&&b.forEach(e=>x.push(`${i(`wrote`)}\t${p(e)}`));for(let{file:e,item:t}of y)x.push(...q(e,t));if(v>0&&x.push(``,t(`app.cli.agents.migrate.freePreview`,{shown:y.length,total:h.length}),...n(u,`agent-tools`)),_.length>0){x.push(``,t(`app.cli.agents.migrate.untouched`));for(let{file:e,item:t}of _)x.push(` ${e}: ${t.elementId}: ${t.detail??t.reason??``}`)}return f.skipped.forEach(e=>x.push(t(`app.cli.migrate.apply.skipped`,{file:p(e.path),reason:t(G[e.reason])}))),x.push(``,t(o.write?`app.cli.agents.migrate.summaryWritten`:`app.cli.agents.migrate.summaryDry`,{migrated:h.length,untouched:_.length})),!o.write&&h.length>0&&x.push(t(`app.cli.agents.migrate.runWrite`)),{ok:!0,lines:x}}export{J as migrateAgentsCommand};
|