deepline 0.3.551 → 0.3.553
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/dist/bundling-sources/sdk/src/client-core.ts +130 -12
- package/dist/bundling-sources/sdk/src/compat.ts +239 -87
- package/dist/bundling-sources/sdk/src/config.ts +113 -2
- package/dist/bundling-sources/sdk/src/errors.ts +2 -0
- package/dist/bundling-sources/sdk/src/http-core.ts +124 -10
- package/dist/bundling-sources/sdk/src/index.ts +2 -0
- package/dist/bundling-sources/sdk/src/integrations.ts +6 -4
- package/dist/bundling-sources/sdk/src/play.ts +3 -0
- package/dist/bundling-sources/sdk/src/plays/run-request.ts +1 -1
- package/dist/bundling-sources/sdk/src/release.ts +1 -1
- package/dist/bundling-sources/sdk/src/runs/watch-polling.ts +66 -30
- package/dist/bundling-sources/sdk/src/tool-calls.ts +2 -1
- package/dist/bundling-sources/sdk/src/tool-failure-hint.ts +104 -0
- package/dist/bundling-sources/sdk/src/types.ts +9 -1
- package/dist/bundling-sources/shared_libs/integration-contracts/billing-entitlements.ts +4 -2
- package/dist/bundling-sources/shared_libs/integration-contracts/billing-plan-skus.ts +25 -0
- package/dist/bundling-sources/shared_libs/monitors/action-actor.ts +2 -0
- package/dist/bundling-sources/shared_libs/monitors/billing/credit-recovery.ts +58 -4
- package/dist/bundling-sources/shared_libs/monitors/billing/policy-builders.ts +8 -0
- package/dist/bundling-sources/shared_libs/monitors/billing/pricing.ts +11 -0
- package/dist/bundling-sources/shared_libs/monitors/billing/types.ts +13 -0
- package/dist/bundling-sources/shared_libs/monitors/deactivation-reasons.ts +103 -5
- package/dist/bundling-sources/shared_libs/monitors/fleets/converge-admission.ts +133 -0
- package/dist/bundling-sources/shared_libs/monitors/fleets/fence-attention.ts +165 -0
- package/dist/bundling-sources/shared_libs/monitors/fleets/fence-release.ts +726 -0
- package/dist/bundling-sources/shared_libs/monitors/fleets/fence-walk.ts +274 -0
- package/dist/bundling-sources/shared_libs/monitors/fleets/issues.ts +1 -0
- package/dist/bundling-sources/shared_libs/monitors/fleets/limits.ts +28 -0
- package/dist/bundling-sources/shared_libs/monitors/fleets/provider-bulk-wait.ts +126 -0
- package/dist/bundling-sources/shared_libs/monitors/fleets/shared-payload.ts +189 -0
- package/dist/bundling-sources/shared_libs/monitors/http-error-response.ts +28 -0
- package/dist/bundling-sources/shared_libs/monitors/inbound-publish-key.ts +4 -0
- package/dist/bundling-sources/shared_libs/monitors/inventory-counter-errors.ts +25 -0
- package/dist/bundling-sources/shared_libs/monitors/org-monitor-limits.ts +65 -0
- package/dist/bundling-sources/shared_libs/monitors/package.json +11 -0
- package/dist/bundling-sources/shared_libs/monitors/provider-callback-verification.ts +152 -1
- package/dist/bundling-sources/shared_libs/monitors/provider-monitor-batch-operation.ts +6 -0
- package/dist/bundling-sources/shared_libs/monitors/provider-monitor-capability.ts +390 -10
- package/dist/bundling-sources/shared_libs/monitors/provider-monitor-errors.ts +34 -0
- package/dist/bundling-sources/shared_libs/monitors/provider-monitor-identity-claims.ts +66 -30
- package/dist/bundling-sources/shared_libs/monitors/provider-monitor-state.ts +30 -0
- package/dist/bundling-sources/shared_libs/monitors/provider-monitor-upstream-identity.ts +80 -13
- package/dist/bundling-sources/shared_libs/monitors/provider-resource-failure.ts +26 -3
- package/dist/bundling-sources/shared_libs/monitors/signal-radars/inbound-dead-letter.ts +41 -13
- package/dist/bundling-sources/shared_libs/monitors/signal-radars/raw-receipt-causes.ts +219 -0
- package/dist/bundling-sources/shared_libs/monitors/snitcher-ip2company.ts +21 -10
- package/dist/bundling-sources/shared_libs/monitors/starter-templates.ts +13 -0
- package/dist/bundling-sources/shared_libs/monitors/tamradar-countries.ts +285 -0
- package/dist/bundling-sources/shared_libs/monitors/tracking-provider-guidance.ts +6 -0
- package/dist/bundling-sources/shared_libs/monitors/tracking-provider-integrations.ts +13 -0
- package/dist/bundling-sources/shared_libs/observability/dlq.ts +1 -1
- package/dist/bundling-sources/shared_libs/observability/log-metadata.ts +5 -3
- package/dist/bundling-sources/shared_libs/observability/queue-health.ts +10 -1
- package/dist/bundling-sources/shared_libs/observability/queue-item-connectors.ts +1 -0
- package/dist/bundling-sources/shared_libs/observability/redaction.ts +24 -1
- package/dist/bundling-sources/shared_libs/observability/scheduled-jobs.json +312 -41
- package/dist/bundling-sources/shared_libs/observability/scheduled-work-manual.ts +1 -2
- package/dist/bundling-sources/shared_libs/play-data-plane/preview-r2-oidc.ts +188 -0
- package/dist/bundling-sources/shared_libs/play-data-plane/r2.ts +170 -16
- package/dist/bundling-sources/shared_libs/play-data-plane/runtime-sheet-storage-contract.ts +5 -0
- package/dist/bundling-sources/shared_libs/play-runtime/app-runtime-api.ts +68 -2
- package/dist/bundling-sources/shared_libs/play-runtime/context.ts +568 -26
- package/dist/bundling-sources/shared_libs/play-runtime/ctx-fetch-caller-deadline.ts +200 -0
- package/dist/bundling-sources/shared_libs/play-runtime/ctx-types.ts +6 -0
- package/dist/bundling-sources/shared_libs/play-runtime/deployment/runtime-topology.ts +21 -1
- package/dist/bundling-sources/shared_libs/play-runtime/durable-call-cache.ts +3 -2
- package/dist/bundling-sources/shared_libs/play-runtime/durable-runs-rollout.ts +14 -2
- package/dist/bundling-sources/shared_libs/play-runtime/durable-summary-events.ts +70 -2
- package/dist/bundling-sources/shared_libs/play-runtime/durable-tool-identity.ts +3 -3
- package/dist/bundling-sources/shared_libs/play-runtime/execution-capabilities.ts +16 -0
- package/dist/bundling-sources/shared_libs/play-runtime/experiment-switches.ts +92 -16
- package/dist/bundling-sources/shared_libs/play-runtime/fixture-behavior.ts +1 -0
- package/dist/bundling-sources/shared_libs/play-runtime/governor/policy.ts +7 -1
- package/dist/bundling-sources/shared_libs/play-runtime/internal-bootstrap-token.ts +62 -0
- package/dist/bundling-sources/shared_libs/play-runtime/map-memory-limits.ts +74 -3
- package/dist/bundling-sources/shared_libs/play-runtime/output-size-limits.ts +31 -3
- package/dist/bundling-sources/shared_libs/play-runtime/play-http-request.ts +6 -0
- package/dist/bundling-sources/shared_libs/play-runtime/protocol.ts +8 -0
- package/dist/bundling-sources/shared_libs/play-runtime/query-result-dataset.ts +19 -0
- package/dist/bundling-sources/shared_libs/play-runtime/resource-governor.ts +39 -2
- package/dist/bundling-sources/shared_libs/play-runtime/run-failure.ts +9 -1
- package/dist/bundling-sources/shared_libs/play-runtime/run-identity.ts +33 -0
- package/dist/bundling-sources/shared_libs/play-runtime/run-ledger-projection-contract.ts +24 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runner-app/index.ts +300 -57
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-payload-transport.ts +87 -6
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/modal.ts +241 -10
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/early-sandbox-egress.ts +161 -14
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/early-sandbox.ts +16 -3
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-api-compression.ts +37 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-api-paths.ts +9 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-api.ts +298 -46
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-authority.ts +13 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-constants.ts +39 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-operation-contract.ts +62 -1
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-scheduler-topology.ts +36 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-sheet-row-transition.ts +36 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-speed-profile.ts +206 -2
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-pool.ts +42 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-runtime-worker.ts +185 -64
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-worker-slot-ledger.ts +157 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/early-sandbox-lane.ts +110 -2
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/early-sandbox-listener-hint.ts +323 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/executor-attempt-standing.ts +72 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/integration-operation-value-storage.ts +23 -4
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres-rate-state.ts +32 -10
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres-workspace-purge.ts +199 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres.ts +632 -66
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/run-ledger-outbox-recovery.ts +517 -16
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-api-origin.ts +1 -1
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-receipt-value-storage.ts +9 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-worker-wake.ts +599 -2
- package/dist/bundling-sources/shared_libs/play-runtime/secret-resolution-retry-policy.ts +26 -1
- package/dist/bundling-sources/shared_libs/play-runtime/startup-read-tool-ids.ts +60 -0
- package/dist/bundling-sources/shared_libs/play-runtime/test-runtime-seams.ts +51 -0
- package/dist/bundling-sources/shared_libs/play-runtime/tool-call-retry-facts.ts +2 -0
- package/dist/bundling-sources/shared_libs/play-runtime/tool-execute-retry-policy.ts +113 -3
- package/dist/bundling-sources/shared_libs/play-runtime/tool-http-errors.ts +5 -7
- package/dist/bundling-sources/shared_libs/play-runtime/tool-result.ts +37 -7
- package/dist/bundling-sources/shared_libs/play-runtime/work-receipt-storage-contract.ts +2 -0
- package/dist/bundling-sources/shared_libs/play-runtime/workflow-executor-auth.ts +3 -0
- package/dist/bundling-sources/shared_libs/plays/authoring-contract.ts +40 -5
- package/dist/bundling-sources/shared_libs/plays/deploy/api-client.ts +3 -0
- package/dist/bundling-sources/shared_libs/plays/deploy/control-plane-types.ts +16 -0
- package/dist/bundling-sources/shared_libs/plays/deploy/run-deployment.ts +10 -41
- package/dist/bundling-sources/shared_libs/plays/extension-bridge.ts +33 -0
- package/dist/bundling-sources/shared_libs/plays/row-identity.ts +18 -1
- package/dist/bundling-sources/shared_libs/plays/tool-execution-error.ts +108 -0
- package/dist/bundling-sources/shared_libs/plays/trigger-config-contract.ts +14 -0
- package/dist/bundling-sources/shared_libs/product-notifications/catalog.ts +171 -0
- package/dist/bundling-sources/shared_libs/product-notifications/events.ts +27 -1
- package/dist/bundling-sources/shared_libs/security/email-blacklist.ts +9 -24
- package/dist/bundling-sources/shared_libs/security/secret-redaction.ts +178 -5
- package/dist/bundling-sources/shared_libs/security/signup-email-dns-screen.ts +148 -0
- package/dist/bundling-sources/shared_libs/tool-execution-error.ts +108 -0
- package/dist/cli/{auth-E7BH4GMJ.mjs → auth-I3QAU4RV.mjs} +8 -7
- package/dist/cli/auth-MQCN7WGZ.js +44 -0
- package/dist/cli/{billing-OXKU462W.mjs → billing-3IC54OQQ.mjs} +202 -59
- package/dist/cli/{billing-DNQAZGX7.js → billing-YGFFVAIC.js} +302 -159
- package/dist/cli/{chunk-COGREZAO.js → chunk-2B5B5KAW.js} +210 -128
- package/dist/cli/{chunk-UBKA33KY.mjs → chunk-2MGZAI54.mjs} +17 -0
- package/dist/cli/{chunk-T2B5BVZE.js → chunk-3NTP2OSG.js} +13 -13
- package/dist/cli/{chunk-FOTGUFVK.mjs → chunk-45OAVGU6.mjs} +5 -5
- package/dist/cli/{chunk-54EEYLTF.js → chunk-4747TPLV.js} +3 -3
- package/dist/cli/{chunk-CLRAANWH.mjs → chunk-4BFTDNHU.mjs} +1 -1
- package/dist/cli/{chunk-BGBJV26E.mjs → chunk-4HYNMXXF.mjs} +4 -4
- package/dist/cli/{chunk-5S6PHKRV.mjs → chunk-4SMCFQ23.mjs} +1 -1
- package/dist/cli/{chunk-VWLHRZFG.mjs → chunk-55F6HNOY.mjs} +5 -5
- package/dist/cli/{chunk-LX35AXTN.mjs → chunk-5TYLSS4Q.mjs} +6 -6
- package/dist/cli/{chunk-VTGG2RT3.js → chunk-6NE3RRRY.js} +1 -1
- package/dist/cli/{chunk-EITMD3A5.js → chunk-6VLFQZK6.js} +8 -8
- package/dist/cli/{chunk-MNSTCJMX.mjs → chunk-72V4PDH5.mjs} +18 -18
- package/dist/cli/{chunk-ZCDKE4UH.js → chunk-74RES4DS.js} +5 -5
- package/dist/cli/{chunk-WKBHUB6R.js → chunk-7GEMELKI.js} +366 -320
- package/dist/cli/{chunk-C4CUZH57.js → chunk-7O6J6A7P.js} +1871 -92
- package/dist/cli/{chunk-7RSIFA72.js → chunk-7SERLBNR.js} +161 -53
- package/dist/cli/{chunk-3G6QZACZ.js → chunk-7YRJ5UC4.js} +21 -21
- package/dist/cli/{chunk-I4VKGNAQ.mjs → chunk-A7DLBE5K.mjs} +136 -54
- package/dist/cli/{chunk-GGB3JYCW.mjs → chunk-AGICYWGN.mjs} +299 -69
- package/dist/cli/{chunk-44KSACJW.mjs → chunk-AGIQDA2T.mjs} +12 -12
- package/dist/cli/{chunk-PACD5DGC.js → chunk-AGLR6QVN.js} +255 -109
- package/dist/cli/{chunk-NURW5XH4.mjs → chunk-ASB47RXJ.mjs} +1 -1
- package/dist/cli/{chunk-4OMAGJ6U.js → chunk-BVDKFS2T.js} +2 -2
- package/dist/cli/{chunk-LPJPCGT3.js → chunk-CACFJODG.js} +190 -134
- package/dist/cli/{chunk-GVYLCCKN.mjs → chunk-CAEBJOYU.mjs} +1 -1
- package/dist/cli/{chunk-XDVT3GOM.js → chunk-CFJFUVX2.js} +18 -1
- package/dist/cli/{chunk-POLUE7D5.js → chunk-DP2VH7CO.js} +12 -12
- package/dist/cli/{chunk-D6M5HFBB.mjs → chunk-DP64MD6U.mjs} +1 -1
- package/dist/cli/{chunk-W425ERWN.mjs → chunk-DZA7RFGL.mjs} +5 -5
- package/dist/cli/{chunk-R7J7CJPZ.js → chunk-E2G2DNAB.js} +4 -1
- package/dist/cli/{chunk-GGGAEVCX.mjs → chunk-E7WZOX2A.mjs} +22 -18
- package/dist/cli/{chunk-44I675YK.js → chunk-FM7LPUPA.js} +41 -41
- package/dist/cli/{chunk-2UXDHFSF.mjs → chunk-GAVZ4EOD.mjs} +1 -1
- package/dist/cli/{chunk-Z2FIOG3V.js → chunk-HEBO3XNZ.js} +27 -31
- package/dist/cli/{chunk-6PWJKMFQ.mjs → chunk-HSJ6X2AQ.mjs} +4 -4
- package/dist/cli/{chunk-UPMRIVZB.js → chunk-HVI55MTK.js} +61 -10
- package/dist/cli/{chunk-KWSH5T7K.js → chunk-IH6GDNKW.js} +21 -21
- package/dist/cli/{chunk-3KYBDAR3.js → chunk-IMX7J4DU.js} +8 -8
- package/dist/cli/{chunk-HEHVGEZV.mjs → chunk-INEMTYMT.mjs} +8 -8
- package/dist/cli/{chunk-5VVSEU67.js → chunk-IUOGII7D.js} +6 -7
- package/dist/cli/{chunk-MXGA6JFI.mjs → chunk-JJGWHITQ.mjs} +5 -5
- package/dist/cli/{chunk-QM6Y6S4E.js → chunk-JLGP5XAJ.js} +5 -5
- package/dist/cli/{chunk-V6SCP4B7.mjs → chunk-LFOERUQY.mjs} +69 -3
- package/dist/cli/{chunk-BBTKAASQ.js → chunk-LFQJW4S2.js} +42 -1
- package/dist/cli/{chunk-ZMNGZ6XS.mjs → chunk-LH5PZKER.mjs} +80 -24
- package/dist/cli/{chunk-MR5LTVHD.js → chunk-LRDHPOZW.js} +69 -69
- package/dist/cli/{chunk-5LUF4LAR.mjs → chunk-LRZGS6RZ.mjs} +3 -0
- package/dist/cli/{chunk-SL6MYJYM.js → chunk-MJTVX4QK.js} +35 -35
- package/dist/cli/{chunk-UDXULACQ.js → chunk-MLABYI4M.js} +90 -24
- package/dist/cli/{chunk-S7IZWGUA.mjs → chunk-NDNHYONK.mjs} +17 -21
- package/dist/cli/{chunk-4D3WIZST.mjs → chunk-OTV2UUKW.mjs} +164 -18
- package/dist/cli/{chunk-XYE5XPGF.js → chunk-Q6Z6N3A7.js} +18 -18
- package/dist/cli/{chunk-7WQNWJQW.mjs → chunk-QG6JIWUL.mjs} +151 -43
- package/dist/cli/{chunk-3T65J5RG.mjs → chunk-QI5S5HWB.mjs} +2 -2
- package/dist/cli/{chunk-CBV7AKWM.js → chunk-R6DZ6NQ2.js} +5 -5
- package/dist/cli/{chunk-PM7MO62Y.mjs → chunk-RMNOZKRI.mjs} +3 -3
- package/dist/cli/{chunk-NMWGZD6Y.js → chunk-RTV4RF7N.js} +36 -36
- package/dist/cli/{chunk-CQ6JYQSW.js → chunk-SBH4CKPN.js} +11 -11
- package/dist/cli/{chunk-BIIJATTX.mjs → chunk-SG3LUONJ.mjs} +3 -3
- package/dist/cli/{chunk-2WFPHBR4.js → chunk-TFEXSHPM.js} +22 -18
- package/dist/cli/{chunk-5IL7SC45.mjs → chunk-TN4TY6TT.mjs} +6 -7
- package/dist/cli/{chunk-WEHCBH5R.mjs → chunk-UEVKMZLR.mjs} +54 -3
- package/dist/cli/{chunk-RE5MJBEV.mjs → chunk-UVQJYV76.mjs} +2 -2
- package/dist/cli/{chunk-FSIVF2SI.mjs → chunk-VZGLIK5U.mjs} +1 -1
- package/dist/cli/{chunk-W2ZWQUHT.js → chunk-WOCHZCUJ.js} +2 -2
- package/dist/cli/{chunk-ZDQFBJPO.js → chunk-XLIHTJVM.js} +348 -118
- package/dist/cli/{chunk-2ZYRBMQM.js → chunk-Y6SP3JMI.js} +22 -22
- package/dist/cli/{chunk-PPSDCN6C.js → chunk-YUA6HA6D.js} +2 -2
- package/dist/cli/{chunk-JL2OTMSG.mjs → chunk-Z3A2S3QM.mjs} +41 -0
- package/dist/cli/{chunk-E64HFB4L.mjs → chunk-Z6XPSHKM.mjs} +87 -41
- package/dist/cli/{chunk-7DOQ3OEX.mjs → chunk-Z7AOIHFE.mjs} +1870 -91
- package/dist/cli/command-docs.js +3 -3
- package/dist/cli/command-docs.mjs +2 -2
- package/dist/cli/concurrent-runs-help-CFJH4KXV.js +22 -0
- package/dist/cli/{concurrent-runs-help-C6L6I5OR.mjs → concurrent-runs-help-DNV2X5AZ.mjs} +9 -8
- package/dist/cli/{csv-QMF4FWE7.js → csv-SA6ELJY6.js} +16 -15
- package/dist/cli/{csv-SYSDXFEM.mjs → csv-ZXZGHWOM.mjs} +7 -6
- package/dist/cli/{db-Q7HURWRZ.mjs → db-A54SP6AD.mjs} +16 -16
- package/dist/cli/{db-YSHPPA4H.js → db-JHFEIQBU.js} +43 -43
- package/dist/cli/describe-PHQ33AGS.mjs +50 -0
- package/dist/cli/describe-RHJ4XRFI.js +50 -0
- package/dist/cli/describe-core.d.mts +3 -3
- package/dist/cli/describe-core.d.ts +3 -3
- package/dist/cli/describe-core.js +6 -6
- package/dist/cli/describe-core.mjs +5 -5
- package/dist/cli/{executions-G7U3VUXN.mjs → executions-HL2M2DFU.mjs} +10 -10
- package/dist/cli/{executions-MWBC5TAW.js → executions-TLFZRHBJ.js} +12 -12
- package/dist/cli/{feedback-SD55OY6H.js → feedback-5UEX5UZK.js} +17 -16
- package/dist/cli/{feedback-GMHIFLBJ.mjs → feedback-QMBTNXVG.mjs} +9 -8
- package/dist/cli/git-4JWOOHBG.js +26 -0
- package/dist/cli/{git-HPE45OPD.mjs → git-LKGXVIVC.mjs} +8 -7
- package/dist/cli/index.js +170 -158
- package/dist/cli/index.mjs +60 -48
- package/dist/cli/{integrations-HFKVBY6G.js → integrations-6RUTLMN7.js} +23 -27
- package/dist/cli/{integrations-2W4MGIQR.mjs → integrations-FGGRVUJ7.mjs} +15 -19
- package/dist/cli/{legacy-noops-SXVNDEXN.js → legacy-noops-J3Z7QRWZ.js} +12 -11
- package/dist/cli/{legacy-noops-GZYKNU2Z.mjs → legacy-noops-YIPRMVXZ.mjs} +9 -8
- package/dist/cli/{mcp-PJRHQHHU.js → mcp-6LWFP7RW.js} +121 -48
- package/dist/cli/{mcp-BWA6KULG.mjs → mcp-CHDYFO7F.mjs} +100 -27
- package/dist/cli/{monitors-K2WSI6CR.js → monitors-STM6A7OU.js} +221 -186
- package/dist/cli/{monitors-SYQKCATO.mjs → monitors-UGRY2BXI.mjs} +58 -23
- package/dist/cli/org-3SYOUQCX.mjs +2289 -0
- package/dist/cli/org-ZOBSNSIB.js +2289 -0
- package/dist/cli/outcomes-H4YYAT5X.js +2865 -0
- package/dist/cli/outcomes-Z3P2JE67.mjs +2865 -0
- package/dist/cli/{play-SZXY2F2S.js → play-SM4CW2GS.js} +1116 -846
- package/dist/cli/{play-TTMABJEI.mjs → play-SN5YWLS7.mjs} +375 -105
- package/dist/cli/{providers-GQIOMRQO.mjs → providers-WZ4YBR5Y.mjs} +10 -10
- package/dist/cli/{providers-YDHCTZAF.js → providers-WZARYMCF.js} +13 -13
- package/dist/cli/{quickstart-PHSSMKCA.mjs → quickstart-2575BNKA.mjs} +7 -6
- package/dist/cli/{quickstart-BNYOXQXG.js → quickstart-PS4YHQJ6.js} +9 -8
- package/dist/cli/{run-GFIAZXVL.js → run-FLZ6OTM7.js} +51 -51
- package/dist/cli/{run-74C3C75C.mjs → run-ZUHCZOJS.mjs} +31 -31
- package/dist/cli/run-identity-LMLFMACS.js +31 -0
- package/dist/cli/{run-identity-MRNCEGV2.mjs → run-identity-MAZ7ANH5.mjs} +9 -3
- package/dist/cli/{search-3SWUB7KX.mjs → search-HLPPKQEO.mjs} +11 -11
- package/dist/cli/search-JJWVHR3N.js +32 -0
- package/dist/cli/{search-output-K2SWHVHQ.mjs → search-output-PDAXNOGP.mjs} +9 -8
- package/dist/cli/{search-output-6JF3S4TP.js → search-output-RXJLU36B.js} +12 -11
- package/dist/cli/{secrets-2M4XWEKE.mjs → secrets-CGELYQ3H.mjs} +11 -11
- package/dist/cli/{secrets-2SAKLH2H.js → secrets-QJNG7G2Y.js} +20 -20
- package/dist/cli/sessions-DHTBT2GN.js +23 -0
- package/dist/cli/{sessions-A64BCXTO.mjs → sessions-ELMWVR4M.mjs} +9 -8
- package/dist/cli/{settings-HV64WIJF.js → settings-44I44P5F.js} +89 -89
- package/dist/cli/{settings-SVGEC3FI.mjs → settings-RR3LZXL7.mjs} +16 -16
- package/dist/cli/{setup-EDC3NEJ3.mjs → setup-KGWRWH4B.mjs} +20 -19
- package/dist/cli/{setup-FHXOLQGQ.js → setup-KTEYOCJO.js} +60 -59
- package/dist/cli/skills-EPZPEXI2.js +37 -0
- package/dist/cli/{skills-3HGHZMXB.mjs → skills-FPRID2I5.mjs} +10 -9
- package/dist/cli/tools-IGQQ5TML.js +57 -0
- package/dist/cli/{tools-P2QS6A6Q.mjs → tools-PI4WMDLY.mjs} +23 -23
- package/dist/cli/update-4RNCVYGE.js +37 -0
- package/dist/cli/{update-552BYQM4.mjs → update-VJOJAZ7B.mjs} +14 -11
- package/dist/cli/{views-PA25NAE3.js → views-NTUOLNQU.js} +62 -64
- package/dist/cli/{views-LD5HXJYY.mjs → views-OVPSINZO.mjs} +47 -49
- package/dist/cli/{workflow-FIDBUQV6.js → workflow-2UDYDM6F.js} +23 -23
- package/dist/cli/{workflow-LDYFGBYP.mjs → workflow-7OEFNXZC.mjs} +13 -13
- package/dist/{client-DuDFiJDU.d.mts → client-B8f7RNF8.d.mts} +1 -1
- package/dist/{client-t9HZAkFD.d.ts → client-C5TgXmJQ.d.ts} +1 -1
- package/dist/{client-core-DydMQOft.d.mts → client-core-SLLGBTht.d.mts} +285 -23
- package/dist/{client-core-CJRzLanv.d.ts → client-core-p0sOxnkl.d.ts} +285 -23
- package/dist/{compiler-manifest-BqwVrOri.d.mts → compiler-manifest-D_zZEh9Q.d.mts} +70 -5
- package/dist/{compiler-manifest-BqwVrOri.d.ts → compiler-manifest-D_zZEh9Q.d.ts} +70 -5
- package/dist/{errors-BU8FB99X.d.mts → errors-CZCrBFrQ.d.mts} +1 -1
- package/dist/{errors-DfVN_FUG.d.ts → errors-DsUkLrdZ.d.ts} +1 -1
- package/dist/{index-BGnvtYGc.d.ts → index-B6RTOZGC.d.ts} +1 -1
- package/dist/{index-DjZgwpGw.d.mts → index-DeOVrEmX.d.mts} +1 -1
- package/dist/index.d.mts +7 -7
- package/dist/index.d.ts +7 -7
- package/dist/index.js +66 -55
- package/dist/index.mjs +25 -14
- package/dist/install-integrity.json +162 -142
- package/dist/plays/bundle-play-file.d.mts +3 -3
- package/dist/plays/bundle-play-file.d.ts +3 -3
- package/dist/plays/bundle-play-file.mjs +23 -4
- package/dist/plays/csv-data-input.js +3 -3
- package/dist/plays/csv-data-input.mjs +2 -2
- package/dist/plays/play-description.d.mts +2 -2
- package/dist/plays/play-description.d.ts +2 -2
- package/dist/plays/run-request.d.mts +2 -2
- package/dist/plays/run-request.d.ts +2 -2
- package/dist/plays/run-request.js +4 -4
- package/dist/plays/run-request.mjs +3 -3
- package/dist/release.d.mts +1 -1
- package/dist/release.d.ts +1 -1
- package/dist/release.js +2 -2
- package/dist/release.mjs +1 -1
- package/dist/server.d.mts +4 -4
- package/dist/server.d.ts +4 -4
- package/dist/server.js +15 -13
- package/dist/server.mjs +9 -7
- package/package.json +1 -1
- package/dist/cli/auth-B4PI7GVY.js +0 -43
- package/dist/cli/concurrent-runs-help-JEFQZTJI.js +0 -21
- package/dist/cli/describe-PXTSBJTL.js +0 -50
- package/dist/cli/describe-YGMQBV44.mjs +0 -50
- package/dist/cli/git-I3JV7IGH.js +0 -25
- package/dist/cli/org-5KD7X7IA.mjs +0 -1282
- package/dist/cli/org-YQ2CR32B.js +0 -1282
- package/dist/cli/run-identity-G257GQED.js +0 -25
- package/dist/cli/search-2RRRF4LW.js +0 -32
- package/dist/cli/sessions-SBH27JNW.js +0 -22
- package/dist/cli/skills-Y3SRLOYD.js +0 -36
- package/dist/cli/tools-OFYPUPUV.js +0 -57
- package/dist/cli/update-SOUSCLB7.js +0 -34
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _chunkDP2VH7COjs = require('./chunk-DP2VH7CO.js');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
@@ -11,11 +11,11 @@ var _chunkPOLUE7D5js = require('./chunk-POLUE7D5.js');
|
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _chunkHEBO3XNZjs = require('./chunk-HEBO3XNZ.js');
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
|
|
18
|
-
var
|
|
18
|
+
var _chunkSBH4CKPNjs = require('./chunk-SBH4CKPN.js');
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
|
|
@@ -36,10 +36,11 @@ var _chunkCQ6JYQSWjs = require('./chunk-CQ6JYQSW.js');
|
|
|
36
36
|
|
|
37
37
|
|
|
38
38
|
|
|
39
|
-
var _chunkUPMRIVZBjs = require('./chunk-UPMRIVZB.js');
|
|
40
39
|
|
|
40
|
+
var _chunkHVI55MTKjs = require('./chunk-HVI55MTK.js');
|
|
41
41
|
|
|
42
|
-
|
|
42
|
+
|
|
43
|
+
var _chunkTFEXSHPMjs = require('./chunk-TFEXSHPM.js');
|
|
43
44
|
|
|
44
45
|
|
|
45
46
|
var _chunkAID3OYVJjs = require('./chunk-AID3OYVJ.js');
|
|
@@ -55,48 +56,49 @@ var _chunkJ33TSWO5js = require('./chunk-J33TSWO5.js');
|
|
|
55
56
|
var _chunkHGFFYVXNjs = require('./chunk-HGFFYVXN.js');
|
|
56
57
|
|
|
57
58
|
|
|
58
|
-
var
|
|
59
|
+
var _chunkJLGP5XAJjs = require('./chunk-JLGP5XAJ.js');
|
|
60
|
+
|
|
59
61
|
|
|
62
|
+
var _chunkCACFJODGjs = require('./chunk-CACFJODG.js');
|
|
60
63
|
|
|
61
|
-
var _chunkLPJPCGT3js = require('./chunk-LPJPCGT3.js');
|
|
62
64
|
|
|
63
65
|
|
|
64
|
-
var _chunkXDVT3GOMjs = require('./chunk-XDVT3GOM.js');
|
|
65
66
|
|
|
66
67
|
|
|
67
68
|
|
|
69
|
+
var _chunkY6SP3JMIjs = require('./chunk-Y6SP3JMI.js');
|
|
68
70
|
|
|
69
71
|
|
|
70
72
|
|
|
71
|
-
var _chunk2ZYRBMQMjs = require('./chunk-2ZYRBMQM.js');
|
|
72
73
|
|
|
74
|
+
var _chunkWOCHZCUJjs = require('./chunk-WOCHZCUJ.js');
|
|
73
75
|
|
|
74
76
|
|
|
75
77
|
|
|
76
|
-
var _chunkW2ZWQUHTjs = require('./chunk-W2ZWQUHT.js');
|
|
77
78
|
|
|
78
79
|
|
|
79
80
|
|
|
81
|
+
var _chunk2B5B5KAWjs = require('./chunk-2B5B5KAW.js');
|
|
80
82
|
|
|
81
83
|
|
|
82
|
-
var _chunkCOGREZAOjs = require('./chunk-COGREZAO.js');
|
|
83
84
|
|
|
84
85
|
|
|
85
86
|
|
|
86
87
|
|
|
87
88
|
|
|
88
89
|
|
|
90
|
+
var _chunkXLIHTJVMjs = require('./chunk-XLIHTJVM.js');
|
|
89
91
|
|
|
90
92
|
|
|
91
|
-
var _chunkZDQFBJPOjs = require('./chunk-ZDQFBJPO.js');
|
|
92
93
|
|
|
93
94
|
|
|
95
|
+
var _chunkMLABYI4Mjs = require('./chunk-MLABYI4M.js');
|
|
94
96
|
|
|
95
97
|
|
|
96
|
-
var
|
|
98
|
+
var _chunkLFQJW4S2js = require('./chunk-LFQJW4S2.js');
|
|
97
99
|
|
|
98
100
|
|
|
99
|
-
var
|
|
101
|
+
var _chunkCFJFUVX2js = require('./chunk-CFJFUVX2.js');
|
|
100
102
|
|
|
101
103
|
// src/cli/commands/tools.ts
|
|
102
104
|
var _commander = require('commander');
|
|
@@ -199,10 +201,10 @@ var ToolCallRecovery = class _ToolCallRecovery {
|
|
|
199
201
|
}
|
|
200
202
|
};
|
|
201
203
|
function pendingToolExecutionPath(input) {
|
|
202
|
-
const config =
|
|
203
|
-
const fingerprint = _crypto.createHash.call(void 0, "sha256").update(config.baseUrl).update("\0").update(_crypto.createHash.call(void 0, "sha256").update(config.apiKey).digest("hex")).update("\0").update(input.toolId).update("\0").update(
|
|
204
|
+
const config = _chunkMLABYI4Mjs.resolveConfig.call(void 0, );
|
|
205
|
+
const fingerprint = _crypto.createHash.call(void 0, "sha256").update(config.baseUrl).update("\0").update(_crypto.createHash.call(void 0, "sha256").update(config.apiKey).digest("hex")).update("\0").update(input.toolId).update("\0").update(_chunkCFJFUVX2js.stableStringify.call(void 0, input.params)).update("\0").update(input.responseIntent).digest("hex");
|
|
204
206
|
return _path.join.call(void 0,
|
|
205
|
-
|
|
207
|
+
_chunkMLABYI4Mjs.sdkCliStateDirPath.call(void 0, config.baseUrl),
|
|
206
208
|
`${PENDING_PREFIX}${fingerprint}.json`
|
|
207
209
|
);
|
|
208
210
|
}
|
|
@@ -354,13 +356,13 @@ var TOOL_COMMAND_TEMPLATES = {
|
|
|
354
356
|
execute: "deepline run <toolId> --input '{...}'"
|
|
355
357
|
};
|
|
356
358
|
function toListedTool(tool) {
|
|
357
|
-
if (
|
|
359
|
+
if (_chunkHVI55MTKjs.isPlayLikeTool.call(void 0, tool)) {
|
|
358
360
|
return {
|
|
359
361
|
...tool,
|
|
360
362
|
description: listedToolDescription(tool),
|
|
361
363
|
id: tool.toolId,
|
|
362
364
|
type: "play",
|
|
363
|
-
executeCommand:
|
|
365
|
+
executeCommand: _chunkHVI55MTKjs.playRunCommandForTool.call(void 0, tool, tool.toolId)
|
|
364
366
|
};
|
|
365
367
|
}
|
|
366
368
|
return {
|
|
@@ -436,37 +438,37 @@ function firstSentence(text) {
|
|
|
436
438
|
return (match ? match[0] : clean).trim();
|
|
437
439
|
}
|
|
438
440
|
function requiredInputIds(tool) {
|
|
439
|
-
const inputSchema =
|
|
441
|
+
const inputSchema = _chunkHVI55MTKjs.recordField.call(void 0,
|
|
440
442
|
tool,
|
|
441
443
|
"inputSchema",
|
|
442
444
|
"input_schema"
|
|
443
445
|
);
|
|
444
|
-
return
|
|
446
|
+
return _chunkHVI55MTKjs.toolInputFieldsForDisplay.call(void 0, inputSchema).filter((field) => field.required === true).map((field) => String(_nullishCoalesce(field.name, () => ( "")))).filter(Boolean);
|
|
445
447
|
}
|
|
446
448
|
function notConnectedSuffix(tool) {
|
|
447
449
|
const record = tool;
|
|
448
|
-
const status =
|
|
450
|
+
const status = _chunkHVI55MTKjs.stringField.call(void 0, record, "credentialStatus", "credential_status");
|
|
449
451
|
const connected = record.connected;
|
|
450
452
|
const message = toolConnectionStatusMessage({
|
|
451
453
|
connected: connected === false ? false : void 0,
|
|
452
454
|
credentialStatus: status || void 0,
|
|
453
|
-
connectionMessage:
|
|
455
|
+
connectionMessage: _chunkHVI55MTKjs.stringField.call(void 0, record, "connectionMessage", "connection_message") || void 0
|
|
454
456
|
});
|
|
455
457
|
return message ? ` - \u26A0 ${message}` : "";
|
|
456
458
|
}
|
|
457
459
|
function shortPricingHint(tool) {
|
|
458
|
-
const pricing =
|
|
460
|
+
const pricing = _chunkHVI55MTKjs.recordField.call(void 0,
|
|
459
461
|
tool,
|
|
460
462
|
"pricing"
|
|
461
463
|
);
|
|
462
464
|
const credits = numberField(pricing, "creditsPerUnit", "credits_per_unit");
|
|
463
|
-
const unit =
|
|
465
|
+
const unit = _chunkHVI55MTKjs.stringField.call(void 0, pricing, "unit");
|
|
464
466
|
if (credits !== null) {
|
|
465
467
|
return `${formatDecimal(credits)} cr/${unit || "unit"}`;
|
|
466
468
|
}
|
|
467
|
-
const summary =
|
|
469
|
+
const summary = _chunkHVI55MTKjs.stringField.call(void 0, pricing, "summary");
|
|
468
470
|
if (summary) return summary;
|
|
469
|
-
const displayText =
|
|
471
|
+
const displayText = _chunkHVI55MTKjs.stringField.call(void 0, pricing, "displayText", "display_text");
|
|
470
472
|
return displayText || null;
|
|
471
473
|
}
|
|
472
474
|
function aggregateCategorySummaries(tools) {
|
|
@@ -510,13 +512,13 @@ function categoryEnumerationRender(summaries) {
|
|
|
510
512
|
};
|
|
511
513
|
}
|
|
512
514
|
async function listToolCategories(emitJson, compact) {
|
|
513
|
-
const client = new (0,
|
|
515
|
+
const client = new (0, _chunkJLGP5XAJjs.DeeplineClient)();
|
|
514
516
|
if (!emitJson) {
|
|
515
517
|
const summaries2 = (await client.listToolCategories()).map((category) => ({
|
|
516
518
|
...category,
|
|
517
519
|
description: describeToolCategory(category.name)
|
|
518
520
|
}));
|
|
519
|
-
|
|
521
|
+
_chunkXLIHTJVMjs.printCommandEnvelope.call(void 0,
|
|
520
522
|
{ categories: summaries2, render: categoryEnumerationRender(summaries2) },
|
|
521
523
|
{ json: false }
|
|
522
524
|
);
|
|
@@ -526,7 +528,7 @@ async function listToolCategories(emitJson, compact) {
|
|
|
526
528
|
const items = rawTools.map(toListedTool);
|
|
527
529
|
const summaries = aggregateCategorySummaries(rawTools);
|
|
528
530
|
const outputItems = compact ? items.map(compactTool) : items;
|
|
529
|
-
|
|
531
|
+
_chunkXLIHTJVMjs.printCommandEnvelope.call(void 0,
|
|
530
532
|
{
|
|
531
533
|
tools: outputItems,
|
|
532
534
|
count: outputItems.length,
|
|
@@ -545,7 +547,7 @@ function unknownCategoryError(category, summaries, emitJson) {
|
|
|
545
547
|
const known = summaries.map((item) => item.name);
|
|
546
548
|
const message = `Unknown tool category "${category}". Run \`deepline tools list\` to browse categories.`;
|
|
547
549
|
if (emitJson) {
|
|
548
|
-
|
|
550
|
+
_chunkXLIHTJVMjs.printJson.call(void 0, {
|
|
549
551
|
ok: false,
|
|
550
552
|
exitCode: 4,
|
|
551
553
|
code: "TOOL_CATEGORY_NOT_FOUND",
|
|
@@ -559,13 +561,13 @@ function unknownCategoryError(category, summaries, emitJson) {
|
|
|
559
561
|
const render = categoryEnumerationRender(summaries);
|
|
560
562
|
console.error(message);
|
|
561
563
|
console.error("");
|
|
562
|
-
console.error(
|
|
564
|
+
console.error(_chunkXLIHTJVMjs.renderCommandEnvelopeText.call(void 0, { render }).trimEnd());
|
|
563
565
|
console.error("");
|
|
564
566
|
console.error(`Valid categories: ${known.join(", ")}`);
|
|
565
567
|
return 4;
|
|
566
568
|
}
|
|
567
569
|
async function listToolsInCategory(category, emitJson) {
|
|
568
|
-
const client = new (0,
|
|
570
|
+
const client = new (0, _chunkJLGP5XAJjs.DeeplineClient)();
|
|
569
571
|
const { tools: rawTools, categories } = await client.listToolsInCategory(category);
|
|
570
572
|
const summaries = categories.map((item) => ({
|
|
571
573
|
...item,
|
|
@@ -601,7 +603,7 @@ async function listToolsInCategory(category, emitJson) {
|
|
|
601
603
|
}
|
|
602
604
|
]
|
|
603
605
|
};
|
|
604
|
-
|
|
606
|
+
_chunkXLIHTJVMjs.printCommandEnvelope.call(void 0,
|
|
605
607
|
{
|
|
606
608
|
category,
|
|
607
609
|
total: rows.length,
|
|
@@ -614,7 +616,7 @@ async function listToolsInCategory(category, emitJson) {
|
|
|
614
616
|
return 0;
|
|
615
617
|
}
|
|
616
618
|
async function listToolsForCategoryFilter(requestedCategories, emitJson, compact) {
|
|
617
|
-
const client = new (0,
|
|
619
|
+
const client = new (0, _chunkJLGP5XAJjs.DeeplineClient)();
|
|
618
620
|
const items = (await client.listTools({
|
|
619
621
|
categories: requestedCategories.join(","),
|
|
620
622
|
compact
|
|
@@ -643,7 +645,7 @@ async function listToolsForCategoryFilter(requestedCategories, emitJson, compact
|
|
|
643
645
|
]
|
|
644
646
|
};
|
|
645
647
|
const outputItems = compact ? items.map(compactTool) : items;
|
|
646
|
-
|
|
648
|
+
_chunkXLIHTJVMjs.printCommandEnvelope.call(void 0,
|
|
647
649
|
{
|
|
648
650
|
tools: outputItems,
|
|
649
651
|
count: outputItems.length,
|
|
@@ -662,13 +664,13 @@ async function listTools(category, options = {}) {
|
|
|
662
664
|
const positional = _nullishCoalesce(_optionalChain([category, 'optionalAccess', _10 => _10.trim, 'call', _11 => _11()]), () => ( ""));
|
|
663
665
|
const flagCategories = (_nullishCoalesce(options.categories, () => ( ""))).split(",").map((item) => item.trim()).filter(Boolean);
|
|
664
666
|
const compact = options.compact !== false;
|
|
665
|
-
const emitJson = options.json === true ||
|
|
667
|
+
const emitJson = options.json === true || _chunkXLIHTJVMjs.shouldEmitJson.call(void 0, );
|
|
666
668
|
if (positional && flagCategories.length > 0) {
|
|
667
669
|
const flagIsSameSingle = flagCategories.length === 1 && flagCategories[0] === positional;
|
|
668
670
|
if (!flagIsSameSingle) {
|
|
669
671
|
const message = `Category "${positional}" and --categories ${flagCategories.join(",")} disagree. Pass one: deepline tools list ${positional}`;
|
|
670
672
|
if (emitJson) {
|
|
671
|
-
|
|
673
|
+
_chunkXLIHTJVMjs.printJson.call(void 0, {
|
|
672
674
|
ok: false,
|
|
673
675
|
exitCode: 2,
|
|
674
676
|
code: "TOOL_LIST_CATEGORY_CONFLICT",
|
|
@@ -695,7 +697,7 @@ async function grepTools(queryInput, options = {}) {
|
|
|
695
697
|
console.error("Usage: deepline tools grep <query> [--json]");
|
|
696
698
|
return 1;
|
|
697
699
|
}
|
|
698
|
-
const client = new (0,
|
|
700
|
+
const client = new (0, _chunkJLGP5XAJjs.DeeplineClient)();
|
|
699
701
|
const requestedCategories = options.categories ? options.categories.split(",").map((item) => item.trim()).filter(Boolean) : [];
|
|
700
702
|
const mode = _nullishCoalesce(options.mode, () => ( "all"));
|
|
701
703
|
const jsonOutput = options.json === true;
|
|
@@ -719,7 +721,7 @@ async function grepTools(queryInput, options = {}) {
|
|
|
719
721
|
query,
|
|
720
722
|
mode
|
|
721
723
|
}) : null;
|
|
722
|
-
|
|
724
|
+
_chunkXLIHTJVMjs.printCommandEnvelope.call(void 0,
|
|
723
725
|
{
|
|
724
726
|
tools: outputTools,
|
|
725
727
|
count: outputTools.length,
|
|
@@ -737,7 +739,7 @@ async function grepTools(queryInput, options = {}) {
|
|
|
737
739
|
} : {},
|
|
738
740
|
commandTemplates: TOOL_COMMAND_TEMPLATES
|
|
739
741
|
},
|
|
740
|
-
{ json: options.json ||
|
|
742
|
+
{ json: options.json || _chunkXLIHTJVMjs.shouldEmitJson.call(void 0, ) }
|
|
741
743
|
);
|
|
742
744
|
return 0;
|
|
743
745
|
}
|
|
@@ -780,7 +782,7 @@ async function findPlayForToolId(client, toolId, cliInvocationId) {
|
|
|
780
782
|
return _nullishCoalesce(plays.find((play) => playIdentifiers(play).includes(requested)), () => ( null));
|
|
781
783
|
}
|
|
782
784
|
function isMissingToolMetadataError(error) {
|
|
783
|
-
return error instanceof
|
|
785
|
+
return error instanceof _chunkLFQJW4S2js.DeeplineError && error.statusCode === 404;
|
|
784
786
|
}
|
|
785
787
|
function playAliasToolErrorMessage(toolId, play) {
|
|
786
788
|
const playName = _nullishCoalesce(play.reference, () => ( play.name));
|
|
@@ -792,8 +794,8 @@ function printPlayAliasToolError(toolId, play) {
|
|
|
792
794
|
console.error(playAliasToolErrorMessage(toolId, play));
|
|
793
795
|
}
|
|
794
796
|
function playLikeToolExecuteErrorMessage(toolId, tool) {
|
|
795
|
-
const playReference = tool ?
|
|
796
|
-
const nextStep = playReference ? `Use: deepline run ${playReference} --input '{...}'` : `Find the maintained workflow with: ${
|
|
797
|
+
const playReference = tool ? _chunkHVI55MTKjs.playReferenceForTool.call(void 0, tool) : null;
|
|
798
|
+
const nextStep = playReference ? `Use: deepline run ${playReference} --input '{...}'` : `Find the maintained workflow with: ${_chunkHVI55MTKjs.playSearchCommandForToolId.call(void 0, toolId)}`;
|
|
797
799
|
return [
|
|
798
800
|
`${toolId} is a workflow/play entry, not an atomic provider tool.`,
|
|
799
801
|
nextStep,
|
|
@@ -829,17 +831,17 @@ Common commands:
|
|
|
829
831
|
Output:
|
|
830
832
|
deepline describe shows a tool's contract and price, and deepline run runs
|
|
831
833
|
it. The receipt's billing command (next.billing with --json) gives a call's
|
|
832
|
-
exact charge.
|
|
834
|
+
exact charge. Org balance changes also include other callers'
|
|
833
835
|
activity.
|
|
834
836
|
`
|
|
835
837
|
);
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
838
|
+
_chunkHEBO3XNZjs.registerIntegrationBalanceCommand.call(void 0, tools, true);
|
|
839
|
+
_chunkHEBO3XNZjs.registerWorkspaceConnectionListCommand.call(void 0, tools, "workspace-connections", true);
|
|
840
|
+
_chunkHEBO3XNZjs.registerLegacyHubSpotMembersCommand.call(void 0, tools, true);
|
|
841
|
+
_chunkHEBO3XNZjs.registerLegacyWorkspaceConnectionCommand.call(void 0, tools, true);
|
|
842
|
+
_chunkHEBO3XNZjs.registerLegacyCalendarDelegationCommand.call(void 0, tools, true);
|
|
843
|
+
_chunkHEBO3XNZjs.registerLegacyAvailabilityCalendarsCommand.call(void 0, tools, true);
|
|
844
|
+
_chunkHEBO3XNZjs.registerIntegrationConnectCommand.call(void 0, tools, false, true);
|
|
843
845
|
tools.command("list [category]").description("Browse tool categories, or list every tool in a category.").addHelpText(
|
|
844
846
|
"after",
|
|
845
847
|
`
|
|
@@ -872,7 +874,7 @@ Examples:
|
|
|
872
874
|
json: Boolean(options.json)
|
|
873
875
|
});
|
|
874
876
|
});
|
|
875
|
-
|
|
877
|
+
_chunkSBH4CKPNjs.registerDeprecatedSearchCommand.call(void 0, tools, () => ["tools", "monitors"]);
|
|
876
878
|
tools.command("grep <query>").description(
|
|
877
879
|
"Regex grep over tool ids, descriptions, categories, and input fields."
|
|
878
880
|
).addHelpText(
|
|
@@ -907,7 +909,7 @@ Examples:
|
|
|
907
909
|
});
|
|
908
910
|
const addToolMetadataCommand = (command) => {
|
|
909
911
|
let compatibilityMetadata;
|
|
910
|
-
|
|
912
|
+
_chunkY6SP3JMIjs.registerCompatibilityCatalog.call(void 0, command, () => ({
|
|
911
913
|
toolId: command.args[0],
|
|
912
914
|
acceptMetadata: (metadata) => {
|
|
913
915
|
compatibilityMetadata = metadata;
|
|
@@ -932,15 +934,15 @@ Examples:
|
|
|
932
934
|
deepline describe hunter_email_verifier --feature byok
|
|
933
935
|
deepline tools describe deeplineagent --model openai/gpt-5.6-luna
|
|
934
936
|
deepline tools describe ai_inference --estimate-payload @payload.json
|
|
935
|
-
deepline tools describe
|
|
937
|
+
deepline tools describe ai_decision --estimate-payload @payload.json
|
|
936
938
|
deepline run hunter_email_verifier --input '{"email":"a@b.com"}'
|
|
937
939
|
`
|
|
938
940
|
).option("--json", "Emit JSON output").option(
|
|
939
941
|
"--model <model>",
|
|
940
|
-
"For language tools, include AI Gateway metadata; for
|
|
942
|
+
"For language tools, include AI Gateway metadata; for ai_decision, set the quote payload model"
|
|
941
943
|
).option(
|
|
942
944
|
"--estimate-payload <payload>",
|
|
943
|
-
"Quote an
|
|
945
|
+
"Quote an ai_decision, ai_inference, or deeplineagent JSON payload (inline or @file)"
|
|
944
946
|
).option("--pricing-only", "Only print pricing and billing semantics").option(
|
|
945
947
|
"--examples-only",
|
|
946
948
|
"Only print input payload and full Deepline execution response examples"
|
|
@@ -977,7 +979,7 @@ Examples:
|
|
|
977
979
|
process.exitCode = await narrowView();
|
|
978
980
|
return;
|
|
979
981
|
}
|
|
980
|
-
const { describeAnything } = await Promise.resolve().then(() => _interopRequireWildcard(require("./describe-
|
|
982
|
+
const { describeAnything } = await Promise.resolve().then(() => _interopRequireWildcard(require("./describe-RHJ4XRFI.js")));
|
|
981
983
|
process.exitCode = await describeAnything(
|
|
982
984
|
toolId,
|
|
983
985
|
{
|
|
@@ -992,12 +994,12 @@ Examples:
|
|
|
992
994
|
});
|
|
993
995
|
};
|
|
994
996
|
addToolMetadataCommand(
|
|
995
|
-
|
|
997
|
+
_chunkDP2VH7COjs.addDescribeOptions.call(void 0,
|
|
996
998
|
tools.command("describe <toolId>", { hidden: true }).alias("get"),
|
|
997
999
|
{ json: false }
|
|
998
1000
|
)
|
|
999
1001
|
);
|
|
1000
|
-
tools.command("execute <toolId>", { hidden: true }).alias("call").description("Execute a tool by id.").option("--connection <name>", "Use an exact named
|
|
1002
|
+
tools.command("execute <toolId>", { hidden: true }).alias("call").description("Execute a tool by id.").option("--connection <name>", "Use an exact named org connection").addHelpText(
|
|
1001
1003
|
"after",
|
|
1002
1004
|
`
|
|
1003
1005
|
Notes:
|
|
@@ -1007,7 +1009,7 @@ Notes:
|
|
|
1007
1009
|
stable result payload plus output preview and debugging helpers.
|
|
1008
1010
|
Read pricing first with deepline describe <toolId>.
|
|
1009
1011
|
Use the returned next.billing command to look up this execution's exact charge;
|
|
1010
|
-
|
|
1012
|
+
org balance changes also include other callers' activity.
|
|
1011
1013
|
--timeout sets this CLI request's HTTP deadline; it does not cancel provider work.
|
|
1012
1014
|
|
|
1013
1015
|
Examples:
|
|
@@ -1061,7 +1063,7 @@ Examples:
|
|
|
1061
1063
|
options,
|
|
1062
1064
|
void 0,
|
|
1063
1065
|
true,
|
|
1064
|
-
|
|
1066
|
+
_chunkWOCHZCUJjs.resolveCliMaintenancePolicy.call(void 0, command.optsWithGlobals())
|
|
1065
1067
|
);
|
|
1066
1068
|
}
|
|
1067
1069
|
);
|
|
@@ -1069,13 +1071,13 @@ Examples:
|
|
|
1069
1071
|
function beginDeferredToolExecuteCompatibility(toolId, cliInvocationId) {
|
|
1070
1072
|
let metadata;
|
|
1071
1073
|
const startedAt = performance.now();
|
|
1072
|
-
const baseUrl =
|
|
1073
|
-
|
|
1074
|
-
const result =
|
|
1074
|
+
const baseUrl = _chunkMLABYI4Mjs.resolveConfig.call(void 0, ).baseUrl;
|
|
1075
|
+
_chunkWOCHZCUJjs.recordCliTrace.call(void 0, { phase: "cli.tool_execute_compatibility_start" });
|
|
1076
|
+
const result = _chunkY6SP3JMIjs.runToolExecuteStage.call(void 0,
|
|
1075
1077
|
"SDK compatibility",
|
|
1076
|
-
() =>
|
|
1078
|
+
() => _chunk2B5B5KAWjs.checkSdkCompatibility.call(void 0, baseUrl, {
|
|
1077
1079
|
command: "tools execute",
|
|
1078
|
-
skillsVersion:
|
|
1080
|
+
skillsVersion: _chunkMLABYI4Mjs.readSdkSkillsLocalVersion.call(void 0, baseUrl),
|
|
1079
1081
|
persistCache: false,
|
|
1080
1082
|
timeoutMs: TOOL_EXECUTE_PREFLIGHT_TIMEOUT_MS,
|
|
1081
1083
|
catalog: {
|
|
@@ -1089,7 +1091,7 @@ function beginDeferredToolExecuteCompatibility(toolId, cliInvocationId) {
|
|
|
1089
1091
|
})
|
|
1090
1092
|
).then(
|
|
1091
1093
|
(compatibility) => {
|
|
1092
|
-
|
|
1094
|
+
_chunkWOCHZCUJjs.recordCliTrace.call(void 0, {
|
|
1093
1095
|
phase: "cli.tool_execute_compatibility_ready",
|
|
1094
1096
|
ms: performance.now() - startedAt,
|
|
1095
1097
|
ok: compatibility.error === null,
|
|
@@ -1098,7 +1100,7 @@ function beginDeferredToolExecuteCompatibility(toolId, cliInvocationId) {
|
|
|
1098
1100
|
return compatibility;
|
|
1099
1101
|
},
|
|
1100
1102
|
(error) => {
|
|
1101
|
-
|
|
1103
|
+
_chunkWOCHZCUJjs.recordCliTrace.call(void 0, {
|
|
1102
1104
|
phase: "cli.tool_execute_compatibility_ready",
|
|
1103
1105
|
ms: performance.now() - startedAt,
|
|
1104
1106
|
ok: false
|
|
@@ -1113,7 +1115,7 @@ async function getTool(toolId, options = {}, compatibilityMetadata) {
|
|
|
1113
1115
|
console.error("Usage: deepline tools describe <toolId> [--json]");
|
|
1114
1116
|
return 1;
|
|
1115
1117
|
}
|
|
1116
|
-
const client = new (0,
|
|
1118
|
+
const client = new (0, _chunkJLGP5XAJjs.DeeplineClient)();
|
|
1117
1119
|
let tool;
|
|
1118
1120
|
try {
|
|
1119
1121
|
tool = await _asyncNullishCoalesce(compatibilityMetadata, async () => ( await client.getTool(toolId)));
|
|
@@ -1127,11 +1129,13 @@ async function getTool(toolId, options = {}, compatibilityMetadata) {
|
|
|
1127
1129
|
}
|
|
1128
1130
|
throw error;
|
|
1129
1131
|
}
|
|
1132
|
+
const resolvedToolId = typeof tool.toolId === "string" && tool.toolId ? tool.toolId : toolId;
|
|
1130
1133
|
let inferenceQuote = null;
|
|
1131
1134
|
if (options.estimatePayload) {
|
|
1132
|
-
|
|
1135
|
+
const quoteToolId = resolvedToolId;
|
|
1136
|
+
if (quoteToolId !== "deeplineagent" && quoteToolId !== "ai_inference" && quoteToolId !== "ai_evaluate") {
|
|
1133
1137
|
console.error(
|
|
1134
|
-
"--estimate-payload is only supported for
|
|
1138
|
+
"--estimate-payload is only supported for ai_decision, deeplineagent, and ai_inference."
|
|
1135
1139
|
);
|
|
1136
1140
|
return 2;
|
|
1137
1141
|
}
|
|
@@ -1142,10 +1146,13 @@ async function getTool(toolId, options = {}, compatibilityMetadata) {
|
|
|
1142
1146
|
if (options.model && estimatePayload.model === void 0) {
|
|
1143
1147
|
estimatePayload.model = options.model;
|
|
1144
1148
|
}
|
|
1145
|
-
inferenceQuote = await client.quoteInferenceTool(
|
|
1149
|
+
inferenceQuote = await client.quoteInferenceTool(
|
|
1150
|
+
quoteToolId,
|
|
1151
|
+
estimatePayload
|
|
1152
|
+
);
|
|
1146
1153
|
}
|
|
1147
|
-
const modelDescription = options.model && (
|
|
1148
|
-
if (options.model && !modelDescription &&
|
|
1154
|
+
const modelDescription = options.model && (resolvedToolId === "deeplineagent" || resolvedToolId === "ai_inference") ? await client.describeModel(options.model) : null;
|
|
1155
|
+
if (options.model && !modelDescription && resolvedToolId !== "ai_evaluate") {
|
|
1149
1156
|
console.error(
|
|
1150
1157
|
"--model is only supported for deeplineagent and ai_inference."
|
|
1151
1158
|
);
|
|
@@ -1167,12 +1174,12 @@ async function getTool(toolId, options = {}, compatibilityMetadata) {
|
|
|
1167
1174
|
const lines = toolPricingOnlyLines(tool, toolId);
|
|
1168
1175
|
if (inferenceQuote)
|
|
1169
1176
|
lines.push(...inferenceQuoteSummaryLines(inferenceQuote));
|
|
1170
|
-
|
|
1177
|
+
_chunkXLIHTJVMjs.printCommandEnvelope.call(void 0,
|
|
1171
1178
|
{
|
|
1172
1179
|
toolId: String(tool.toolId || toolId),
|
|
1173
|
-
cost:
|
|
1180
|
+
cost: _chunkHVI55MTKjs.Capability.fromCatalogEntry(tool).describe().customerCost(),
|
|
1174
1181
|
...modelDescription ? { modelOptions: modelDescription } : {},
|
|
1175
|
-
...
|
|
1182
|
+
..._chunkHVI55MTKjs.isMonitorTypeTool.call(void 0, tool) ? { pricing: _chunkHVI55MTKjs.recordField.call(void 0, tool, "pricing") } : {},
|
|
1176
1183
|
...inferenceQuote ? { inferenceQuote } : {}
|
|
1177
1184
|
},
|
|
1178
1185
|
{
|
|
@@ -1183,14 +1190,14 @@ async function getTool(toolId, options = {}, compatibilityMetadata) {
|
|
|
1183
1190
|
);
|
|
1184
1191
|
return 0;
|
|
1185
1192
|
}
|
|
1186
|
-
if ((options.schemaOnly || options.examplesOnly || options.gettersOnly) && !
|
|
1187
|
-
const contract =
|
|
1193
|
+
if ((options.schemaOnly || options.examplesOnly || options.gettersOnly) && !_chunkHVI55MTKjs.isMonitorTypeTool.call(void 0, tool) && !_chunkHVI55MTKjs.isMonitorVariantIndex.call(void 0, tool) && !_chunkHVI55MTKjs.isPlayLikeTool.call(void 0, tool) && (options.json || options.contractJson)) {
|
|
1194
|
+
const contract = _chunkHVI55MTKjs.toolContractJsonForDescribe.call(void 0,
|
|
1188
1195
|
tool,
|
|
1189
1196
|
toolId,
|
|
1190
1197
|
void 0,
|
|
1191
1198
|
seedToolListScript
|
|
1192
1199
|
);
|
|
1193
|
-
|
|
1200
|
+
_chunkXLIHTJVMjs.printCompactJson.call(void 0, {
|
|
1194
1201
|
toolId: contract.toolId,
|
|
1195
1202
|
...options.schemaOnly ? {
|
|
1196
1203
|
inputSchema: contract.inputSchema,
|
|
@@ -1213,8 +1220,8 @@ async function getTool(toolId, options = {}, compatibilityMetadata) {
|
|
|
1213
1220
|
return 0;
|
|
1214
1221
|
}
|
|
1215
1222
|
if (options.contractJson) {
|
|
1216
|
-
|
|
1217
|
-
...
|
|
1223
|
+
_chunkXLIHTJVMjs.printCompactJson.call(void 0, {
|
|
1224
|
+
..._chunkHVI55MTKjs.toolContractJsonForDescribe.call(void 0,
|
|
1218
1225
|
tool,
|
|
1219
1226
|
toolId,
|
|
1220
1227
|
void 0,
|
|
@@ -1227,8 +1234,8 @@ async function getTool(toolId, options = {}, compatibilityMetadata) {
|
|
|
1227
1234
|
}
|
|
1228
1235
|
const emitJson = options.json === true;
|
|
1229
1236
|
if (emitJson) {
|
|
1230
|
-
|
|
1231
|
-
...
|
|
1237
|
+
_chunkXLIHTJVMjs.printCompactJson.call(void 0, {
|
|
1238
|
+
..._chunkHVI55MTKjs.toolMetadataJsonForDescribe.call(void 0, tool, toolId, seedToolListScript),
|
|
1232
1239
|
...modelDescription ? { modelOptions: modelDescription } : {},
|
|
1233
1240
|
...inferenceQuote ? { inferenceQuote } : {}
|
|
1234
1241
|
});
|
|
@@ -1253,7 +1260,7 @@ async function getTool(toolId, options = {}, compatibilityMetadata) {
|
|
|
1253
1260
|
printCompactToolContract(tool, toolId);
|
|
1254
1261
|
if (modelDescription) {
|
|
1255
1262
|
process.stdout.write(`
|
|
1256
|
-
${
|
|
1263
|
+
${_chunkHVI55MTKjs.formatModelDescription.call(void 0, modelDescription)}`);
|
|
1257
1264
|
}
|
|
1258
1265
|
if (inferenceQuote) printInferenceQuoteSummary(inferenceQuote);
|
|
1259
1266
|
return 0;
|
|
@@ -1261,7 +1268,7 @@ ${_chunkUPMRIVZBjs.formatModelDescription.call(void 0, modelDescription)}`);
|
|
|
1261
1268
|
printCompactToolContract(tool, toolId);
|
|
1262
1269
|
if (modelDescription) {
|
|
1263
1270
|
process.stdout.write(`
|
|
1264
|
-
${
|
|
1271
|
+
${_chunkHVI55MTKjs.formatModelDescription.call(void 0, modelDescription)}`);
|
|
1265
1272
|
}
|
|
1266
1273
|
if (inferenceQuote) printInferenceQuoteSummary(inferenceQuote);
|
|
1267
1274
|
return 0;
|
|
@@ -1278,10 +1285,10 @@ function printInferenceQuoteSummary(quote) {
|
|
|
1278
1285
|
for (const line of inferenceQuoteSummaryLines(quote)) console.log(line);
|
|
1279
1286
|
}
|
|
1280
1287
|
function printMonitorTypeFilters(tool) {
|
|
1281
|
-
const schema =
|
|
1282
|
-
const properties =
|
|
1288
|
+
const schema = _chunkHVI55MTKjs.recordField.call(void 0, tool, "payload_schema", "payloadSchema");
|
|
1289
|
+
const properties = _chunkHVI55MTKjs.recordField.call(void 0, schema, "properties");
|
|
1283
1290
|
const required = new Set(
|
|
1284
|
-
|
|
1291
|
+
_chunkHVI55MTKjs.arrayField.call(void 0, schema, "required").filter(
|
|
1285
1292
|
(v) => typeof v === "string"
|
|
1286
1293
|
)
|
|
1287
1294
|
);
|
|
@@ -1292,24 +1299,24 @@ function printMonitorTypeFilters(tool) {
|
|
|
1292
1299
|
}
|
|
1293
1300
|
console.log("Deploy filters (set in the monitor payload):");
|
|
1294
1301
|
for (const name of names) {
|
|
1295
|
-
const field =
|
|
1302
|
+
const field = _chunkHVI55MTKjs.isRecord.call(void 0, properties[name]) ? properties[name] : {};
|
|
1296
1303
|
const star = required.has(name) ? "*" : "";
|
|
1297
|
-
const enumVals =
|
|
1304
|
+
const enumVals = _chunkHVI55MTKjs.arrayField.call(void 0, field, "enum").filter(
|
|
1298
1305
|
(v) => typeof v === "string"
|
|
1299
1306
|
);
|
|
1300
|
-
const type = enumVals.length ? `one of [${enumVals.join(", ")}]` :
|
|
1301
|
-
const desc =
|
|
1307
|
+
const type = enumVals.length ? `one of [${enumVals.join(", ")}]` : _chunkHVI55MTKjs.stringField.call(void 0, field, "type") || "string";
|
|
1308
|
+
const desc = _chunkHVI55MTKjs.stringField.call(void 0, field, "description");
|
|
1302
1309
|
console.log(`- ${name}${star}: ${type}${desc ? ` - ${desc}` : ""}`);
|
|
1303
1310
|
}
|
|
1304
1311
|
}
|
|
1305
1312
|
function printMonitorTypeFilterExamples(tool) {
|
|
1306
|
-
const documentation =
|
|
1307
|
-
const fields =
|
|
1313
|
+
const documentation = _chunkHVI55MTKjs.recordField.call(void 0, tool, "documentation");
|
|
1314
|
+
const fields = _chunkHVI55MTKjs.recordField.call(void 0, documentation, "fields");
|
|
1308
1315
|
const examples = Object.entries(fields).flatMap(([name, rawField]) => {
|
|
1309
|
-
const grammar =
|
|
1310
|
-
const example =
|
|
1316
|
+
const grammar = _chunkHVI55MTKjs.recordField.call(void 0, _chunkHVI55MTKjs.isRecord.call(void 0, rawField) ? rawField : {}, "grammar");
|
|
1317
|
+
const example = _chunkHVI55MTKjs.stringField.call(void 0, grammar, "example");
|
|
1311
1318
|
const values = [
|
|
1312
|
-
...
|
|
1319
|
+
..._chunkHVI55MTKjs.arrayField.call(void 0, grammar, "examples").filter(
|
|
1313
1320
|
(value) => typeof value === "string" && Boolean(value)
|
|
1314
1321
|
),
|
|
1315
1322
|
...example ? [example] : []
|
|
@@ -1324,21 +1331,21 @@ function printMonitorTypeFilterExamples(tool) {
|
|
|
1324
1331
|
}
|
|
1325
1332
|
}
|
|
1326
1333
|
function printMonitorTypeStreams(tool) {
|
|
1327
|
-
const streams =
|
|
1328
|
-
|
|
1334
|
+
const streams = _chunkHVI55MTKjs.arrayField.call(void 0, tool, "streams", "output_streams").filter(
|
|
1335
|
+
_chunkHVI55MTKjs.isRecord
|
|
1329
1336
|
);
|
|
1330
1337
|
if (!streams.length) return;
|
|
1331
1338
|
console.log("");
|
|
1332
1339
|
console.log("Filter columns (a play's sqlListeners.where, per stream):");
|
|
1333
1340
|
for (const stream of streams) {
|
|
1334
|
-
const name =
|
|
1335
|
-
const cols =
|
|
1341
|
+
const name = _chunkHVI55MTKjs.stringField.call(void 0, stream, "stream");
|
|
1342
|
+
const cols = _chunkHVI55MTKjs.arrayField.call(void 0, stream, "columns").filter(_chunkHVI55MTKjs.isRecord).map((col) => _chunkHVI55MTKjs.stringField.call(void 0, col, "name")).filter(Boolean);
|
|
1336
1343
|
console.log(`- ${name}: ${cols.join(", ")}`);
|
|
1337
1344
|
}
|
|
1338
1345
|
}
|
|
1339
1346
|
function monitorTypePricingLines(tool) {
|
|
1340
|
-
const pricing =
|
|
1341
|
-
const byType =
|
|
1347
|
+
const pricing = _chunkHVI55MTKjs.recordField.call(void 0, tool, "pricing");
|
|
1348
|
+
const byType = _chunkHVI55MTKjs.recordField.call(void 0,
|
|
1342
1349
|
pricing,
|
|
1343
1350
|
"pricing_by_radar_type",
|
|
1344
1351
|
"pricingByRadarType"
|
|
@@ -1349,9 +1356,9 @@ function monitorTypePricingLines(tool) {
|
|
|
1349
1356
|
}
|
|
1350
1357
|
const lines = ["Pricing (Deepline credits per accepted event):"];
|
|
1351
1358
|
for (const key of keys) {
|
|
1352
|
-
const entry =
|
|
1359
|
+
const entry = _chunkHVI55MTKjs.isRecord.call(void 0, byType[key]) ? byType[key] : {};
|
|
1353
1360
|
const credits = numberField(entry, "deepline_credits", "deeplineCredits");
|
|
1354
|
-
const display =
|
|
1361
|
+
const display = _chunkHVI55MTKjs.stringField.call(void 0, entry, "display");
|
|
1355
1362
|
const shown = display || (credits !== null ? `${formatDecimal(credits)} credits/event` : "not listed");
|
|
1356
1363
|
lines.push(`- ${key}: ${shown}`);
|
|
1357
1364
|
}
|
|
@@ -1361,20 +1368,20 @@ function printMonitorTypePricing(tool) {
|
|
|
1361
1368
|
for (const line of monitorTypePricingLines(tool)) console.log(line);
|
|
1362
1369
|
}
|
|
1363
1370
|
function printMonitorTypeDeploy(tool) {
|
|
1364
|
-
const deploy =
|
|
1365
|
-
const toolId =
|
|
1366
|
-
const example =
|
|
1371
|
+
const deploy = _chunkHVI55MTKjs.recordField.call(void 0, tool, "deploy");
|
|
1372
|
+
const toolId = _chunkHVI55MTKjs.stringField.call(void 0, tool, "toolId");
|
|
1373
|
+
const example = _chunkHVI55MTKjs.stringField.call(void 0, deploy, "example") || `deepline monitors deploy '{"key":"...","tool":"${toolId}","payload":{...}}'`;
|
|
1367
1374
|
console.log("Deploy (a monitor type is deployed, not executed):");
|
|
1368
1375
|
console.log(` ${example}`);
|
|
1369
1376
|
}
|
|
1370
1377
|
function printMonitorTypeContract(tool, requestedToolId) {
|
|
1371
|
-
const toolId =
|
|
1378
|
+
const toolId = _chunkHVI55MTKjs.stringField.call(void 0, tool, "toolId") || requestedToolId;
|
|
1372
1379
|
console.log(toolId);
|
|
1373
|
-
const displayName =
|
|
1380
|
+
const displayName = _chunkHVI55MTKjs.stringField.call(void 0, tool, "displayName");
|
|
1374
1381
|
if (displayName) console.log(`Best for: ${displayName}`);
|
|
1375
|
-
const description =
|
|
1382
|
+
const description = _chunkHVI55MTKjs.stringField.call(void 0, tool, "description");
|
|
1376
1383
|
if (description) console.log(`Description: ${description}`);
|
|
1377
|
-
const categories =
|
|
1384
|
+
const categories = _chunkHVI55MTKjs.arrayField.call(void 0, tool, "categories").filter(
|
|
1378
1385
|
(v) => typeof v === "string"
|
|
1379
1386
|
);
|
|
1380
1387
|
if (categories.length) console.log(`Tags: ${categories.join(", ")}`);
|
|
@@ -1394,31 +1401,31 @@ function printMonitorTypeContract(tool, requestedToolId) {
|
|
|
1394
1401
|
console.log(`More: deepline describe ${toolId}`);
|
|
1395
1402
|
}
|
|
1396
1403
|
function toolGuidanceLines(guidance) {
|
|
1397
|
-
const record =
|
|
1398
|
-
const toolGuidance =
|
|
1399
|
-
const providerGuidance =
|
|
1404
|
+
const record = _chunkHVI55MTKjs.isRecord.call(void 0, guidance) ? guidance : {};
|
|
1405
|
+
const toolGuidance = _chunkHVI55MTKjs.stringField.call(void 0, record, "tool");
|
|
1406
|
+
const providerGuidance = _chunkHVI55MTKjs.stringField.call(void 0, record, "provider");
|
|
1400
1407
|
return [
|
|
1401
1408
|
...toolGuidance ? [`- This tool: ${toolGuidance}`] : [],
|
|
1402
1409
|
...providerGuidance ? [`- Provider: ${providerGuidance}`] : []
|
|
1403
1410
|
];
|
|
1404
1411
|
}
|
|
1405
1412
|
function printCompactToolContract(tool, requestedToolId) {
|
|
1406
|
-
if (
|
|
1413
|
+
if (_chunkHVI55MTKjs.isMonitorTypeTool.call(void 0, tool)) {
|
|
1407
1414
|
printMonitorTypeContract(tool, requestedToolId);
|
|
1408
1415
|
return;
|
|
1409
1416
|
}
|
|
1410
|
-
const contract =
|
|
1417
|
+
const contract = _chunkHVI55MTKjs.toolContractJsonForDescribe.call(void 0,
|
|
1411
1418
|
tool,
|
|
1412
1419
|
requestedToolId,
|
|
1413
1420
|
void 0,
|
|
1414
1421
|
seedToolListScript
|
|
1415
1422
|
);
|
|
1416
|
-
const cost =
|
|
1417
|
-
const getters =
|
|
1423
|
+
const cost = _chunkHVI55MTKjs.isRecord.call(void 0, contract.cost) ? contract.cost : {};
|
|
1424
|
+
const getters = _chunkHVI55MTKjs.isRecord.call(void 0, contract.getters) ? contract.getters : {};
|
|
1418
1425
|
const listGetters = Array.isArray(getters.extractedLists) ? getters.extractedLists : [];
|
|
1419
1426
|
const valueGetters = Array.isArray(getters.extractedValues) ? getters.extractedValues : [];
|
|
1420
|
-
const inputFields =
|
|
1421
|
-
|
|
1427
|
+
const inputFields = _chunkHVI55MTKjs.recursiveToolInputFieldsForDisplay.call(void 0,
|
|
1428
|
+
_chunkHVI55MTKjs.recordField.call(void 0, contract, "inputSchema")
|
|
1422
1429
|
);
|
|
1423
1430
|
console.log(String(contract.toolId));
|
|
1424
1431
|
if (contract.displayName) console.log(`Best for: ${contract.displayName}`);
|
|
@@ -1435,9 +1442,9 @@ function printCompactToolContract(tool, requestedToolId) {
|
|
|
1435
1442
|
printToolOutputArrayShape(contract);
|
|
1436
1443
|
printToolExecutionHints(contract);
|
|
1437
1444
|
if (contract.deprecated === true) {
|
|
1438
|
-
const deprecation =
|
|
1439
|
-
const message =
|
|
1440
|
-
const replacementToolId =
|
|
1445
|
+
const deprecation = _chunkHVI55MTKjs.isRecord.call(void 0, contract.deprecation) ? contract.deprecation : {};
|
|
1446
|
+
const message = _chunkHVI55MTKjs.stringField.call(void 0, deprecation, "message");
|
|
1447
|
+
const replacementToolId = _chunkHVI55MTKjs.stringField.call(void 0,
|
|
1441
1448
|
deprecation,
|
|
1442
1449
|
"replacementToolId",
|
|
1443
1450
|
"replacement_tool_id"
|
|
@@ -1460,12 +1467,12 @@ function printCompactToolContract(tool, requestedToolId) {
|
|
|
1460
1467
|
console.log("");
|
|
1461
1468
|
console.log("Inputs:");
|
|
1462
1469
|
for (const field of inputFields) {
|
|
1463
|
-
if (!
|
|
1464
|
-
const name =
|
|
1470
|
+
if (!_chunkHVI55MTKjs.isRecord.call(void 0, field)) continue;
|
|
1471
|
+
const name = _chunkHVI55MTKjs.stringField.call(void 0, field, "name");
|
|
1465
1472
|
if (!name) continue;
|
|
1466
1473
|
const required = field.required ? "*" : "";
|
|
1467
|
-
const type =
|
|
1468
|
-
const description =
|
|
1474
|
+
const type = _chunkHVI55MTKjs.stringField.call(void 0, field, "type") || "unknown";
|
|
1475
|
+
const description = _chunkHVI55MTKjs.stringField.call(void 0, field, "description");
|
|
1469
1476
|
const enumValues = Array.isArray(field.enum) ? field.enum : [];
|
|
1470
1477
|
const enumSuffix = enumValues.length ? ` enum=${enumValues.map(String).join("|")}` : "";
|
|
1471
1478
|
const itemBoundsSuffix = arrayItemBoundsSuffix(field);
|
|
@@ -1480,8 +1487,8 @@ function printCompactToolContract(tool, requestedToolId) {
|
|
|
1480
1487
|
}
|
|
1481
1488
|
console.log("");
|
|
1482
1489
|
printToolExamplesOnly(tool, requestedToolId);
|
|
1483
|
-
const starterScript =
|
|
1484
|
-
const starterPath =
|
|
1490
|
+
const starterScript = _chunkHVI55MTKjs.isRecord.call(void 0, contract.starterScript) ? contract.starterScript : {};
|
|
1491
|
+
const starterPath = _chunkHVI55MTKjs.stringField.call(void 0, starterScript, "path");
|
|
1485
1492
|
if (starterPath) {
|
|
1486
1493
|
console.log("");
|
|
1487
1494
|
console.log(`Starter script: ${starterPath}`);
|
|
@@ -1492,16 +1499,16 @@ function printCompactToolContract(tool, requestedToolId) {
|
|
|
1492
1499
|
console.log("Getters:");
|
|
1493
1500
|
if (listGetters.length) console.log(listGetterHeading());
|
|
1494
1501
|
for (const entry of listGetters) {
|
|
1495
|
-
if (
|
|
1502
|
+
if (_chunkHVI55MTKjs.isRecord.call(void 0, entry))
|
|
1496
1503
|
console.log(
|
|
1497
|
-
`- ${
|
|
1504
|
+
`- ${_chunkHVI55MTKjs.stringField.call(void 0, entry, "name")}: ${_chunkHVI55MTKjs.playResultExpression.call(void 0, entry)}`
|
|
1498
1505
|
);
|
|
1499
1506
|
}
|
|
1500
1507
|
if (valueGetters.length) console.log("Values:");
|
|
1501
1508
|
for (const entry of valueGetters) {
|
|
1502
|
-
if (
|
|
1509
|
+
if (_chunkHVI55MTKjs.isRecord.call(void 0, entry))
|
|
1503
1510
|
console.log(
|
|
1504
|
-
`- ${
|
|
1511
|
+
`- ${_chunkHVI55MTKjs.stringField.call(void 0, entry, "name")}: ${_chunkHVI55MTKjs.playResultExpression.call(void 0, entry)}`
|
|
1505
1512
|
);
|
|
1506
1513
|
}
|
|
1507
1514
|
}
|
|
@@ -1512,22 +1519,22 @@ function printCompactToolContract(tool, requestedToolId) {
|
|
|
1512
1519
|
console.log(`More: deepline describe ${contract.toolId}`);
|
|
1513
1520
|
}
|
|
1514
1521
|
function toolPricingOnlyLines(tool, requestedToolId, options = {}) {
|
|
1515
|
-
if (
|
|
1522
|
+
if (_chunkHVI55MTKjs.isMonitorTypeTool.call(void 0, tool)) {
|
|
1516
1523
|
return monitorTypePricingLines(tool);
|
|
1517
1524
|
}
|
|
1518
1525
|
const toolId = String(tool.toolId || requestedToolId);
|
|
1519
|
-
const cost =
|
|
1520
|
-
const pricingModel =
|
|
1521
|
-
const billing =
|
|
1522
|
-
const explicitUnit =
|
|
1526
|
+
const cost = _chunkHVI55MTKjs.Capability.fromCatalogEntry(tool).describe().customerCost();
|
|
1527
|
+
const pricingModel = _chunkHVI55MTKjs.stringField.call(void 0, cost, "pricingModel") || "unknown";
|
|
1528
|
+
const billing = _chunkHVI55MTKjs.stringField.call(void 0, cost, "billingSourceLabel") || _chunkHVI55MTKjs.stringField.call(void 0, cost, "billingSource") || _chunkHVI55MTKjs.stringField.call(void 0, cost, "billingMode") || "unknown";
|
|
1529
|
+
const explicitUnit = _chunkHVI55MTKjs.stringField.call(void 0, cost, "unit");
|
|
1523
1530
|
const unit = explicitUnit || (pricingModel === "per_page" ? "page" : pricingModel === "per_result" ? "result" : pricingModel === "fixed" ? "call" : pricingModel.replace(/^per_/, "") || "unit");
|
|
1524
1531
|
const credits = numberField(cost, "deeplineCreditsPerPricingUnit");
|
|
1525
1532
|
const usd = numberField(cost, "deeplineUsdPerPricingUnit");
|
|
1526
|
-
const displayText =
|
|
1527
|
-
const summary =
|
|
1533
|
+
const displayText = _chunkHVI55MTKjs.stringField.call(void 0, cost, "displayText");
|
|
1534
|
+
const summary = _chunkHVI55MTKjs.stringField.call(void 0, cost, "summary");
|
|
1528
1535
|
const price = displayText || summary || (credits !== null ? `${formatDecimal(credits)} Deepline credits${usd !== null ? ` / ${formatUsd(usd)}` : ""} per ${unit}` : "pricing unavailable");
|
|
1529
1536
|
const reference = cost.observedReference;
|
|
1530
|
-
const observedMax =
|
|
1537
|
+
const observedMax = _chunkHVI55MTKjs.observedMaxText.call(void 0, cost);
|
|
1531
1538
|
return [
|
|
1532
1539
|
`${_nullishCoalesce(options.heading, () => ( `Pricing: ${toolId}`))}: ${price}`,
|
|
1533
1540
|
...observedMax ? [` ${observedMax}`] : [],
|
|
@@ -1544,19 +1551,19 @@ function printToolPricingOnly(tool, requestedToolId, options = {}) {
|
|
|
1544
1551
|
console.log(line);
|
|
1545
1552
|
}
|
|
1546
1553
|
function printToolSchemaOnly(tool, requestedToolId) {
|
|
1547
|
-
if (
|
|
1554
|
+
if (_chunkHVI55MTKjs.isMonitorTypeTool.call(void 0, tool)) {
|
|
1548
1555
|
printMonitorTypeFilters(tool);
|
|
1549
1556
|
printMonitorTypeStreams(tool);
|
|
1550
1557
|
return;
|
|
1551
1558
|
}
|
|
1552
|
-
const contract =
|
|
1559
|
+
const contract = _chunkHVI55MTKjs.toolContractJsonForDescribe.call(void 0,
|
|
1553
1560
|
tool,
|
|
1554
1561
|
requestedToolId,
|
|
1555
1562
|
void 0,
|
|
1556
1563
|
seedToolListScript
|
|
1557
1564
|
);
|
|
1558
|
-
const inputFields =
|
|
1559
|
-
|
|
1565
|
+
const inputFields = _chunkHVI55MTKjs.recursiveToolInputFieldsForDisplay.call(void 0,
|
|
1566
|
+
_chunkHVI55MTKjs.recordField.call(void 0, contract, "inputSchema")
|
|
1560
1567
|
);
|
|
1561
1568
|
console.log(`Schema: ${contract.toolId}`);
|
|
1562
1569
|
if (!inputFields.length) {
|
|
@@ -1583,27 +1590,37 @@ function printToolSchemaOnly(tool, requestedToolId) {
|
|
|
1583
1590
|
}
|
|
1584
1591
|
printToolOutputArrayShape(contract);
|
|
1585
1592
|
const declaredSchema = declaredToolJsonSchema(
|
|
1586
|
-
|
|
1593
|
+
_chunkHVI55MTKjs.recordField.call(void 0, contract, "inputSchema")
|
|
1587
1594
|
);
|
|
1588
1595
|
if (declaredSchema) {
|
|
1589
1596
|
console.log("Declared input JSON Schema:");
|
|
1590
1597
|
console.log(JSON.stringify(declaredSchema, null, 2));
|
|
1591
1598
|
}
|
|
1592
|
-
if (
|
|
1599
|
+
if (_chunkHVI55MTKjs.isRecord.call(void 0, contract.responseSchema)) {
|
|
1593
1600
|
console.log("Deepline execution response JSON Schema:");
|
|
1594
1601
|
console.log(JSON.stringify(contract.responseSchema, null, 2));
|
|
1595
1602
|
}
|
|
1596
1603
|
}
|
|
1597
1604
|
function printToolExamplesOnly(tool, requestedToolId) {
|
|
1598
|
-
if (
|
|
1605
|
+
if (_chunkHVI55MTKjs.isMonitorTypeTool.call(void 0, tool)) {
|
|
1599
1606
|
printMonitorTypeDeploy(tool);
|
|
1600
1607
|
return;
|
|
1601
1608
|
}
|
|
1602
|
-
if (
|
|
1609
|
+
if (_chunkHVI55MTKjs.isMonitorVariantIndex.call(void 0, tool)) {
|
|
1610
|
+
console.log(
|
|
1611
|
+
`${requestedToolId} is deployed as one monitor type per radar type. Describe one for its example:`
|
|
1612
|
+
);
|
|
1613
|
+
for (const variant of _chunkHVI55MTKjs.arrayField.call(void 0, tool, "variants").filter(_chunkHVI55MTKjs.isRecord)) {
|
|
1614
|
+
const describeCommand = _chunkHVI55MTKjs.stringField.call(void 0, variant, "describeCommand");
|
|
1615
|
+
if (describeCommand) console.log(` ${describeCommand}`);
|
|
1616
|
+
}
|
|
1617
|
+
return;
|
|
1618
|
+
}
|
|
1619
|
+
if (_chunkHVI55MTKjs.isPlayLikeTool.call(void 0, tool)) {
|
|
1603
1620
|
printPlayLikeToolUsage(tool, requestedToolId);
|
|
1604
1621
|
return;
|
|
1605
1622
|
}
|
|
1606
|
-
const contract =
|
|
1623
|
+
const contract = _chunkHVI55MTKjs.toolContractJsonForDescribe.call(void 0,
|
|
1607
1624
|
tool,
|
|
1608
1625
|
requestedToolId,
|
|
1609
1626
|
void 0,
|
|
@@ -1611,9 +1628,9 @@ function printToolExamplesOnly(tool, requestedToolId) {
|
|
|
1611
1628
|
);
|
|
1612
1629
|
const toolId = String(contract.toolId);
|
|
1613
1630
|
const inputFields = Array.isArray(contract.inputFields) ? contract.inputFields : [];
|
|
1614
|
-
const examples =
|
|
1631
|
+
const examples = _chunkHVI55MTKjs.arrayField.call(void 0, tool, "examples").filter(_chunkHVI55MTKjs.isRecord);
|
|
1615
1632
|
const firstExample = examples[0];
|
|
1616
|
-
const sampleInput = firstExample &&
|
|
1633
|
+
const sampleInput = firstExample && _chunkHVI55MTKjs.isRecord.call(void 0, firstExample.input) ? firstExample.input : _nullishCoalesce(samplePayload(_chunkHVI55MTKjs.recordField.call(void 0, tool, "samples"), "request"), () => ( _chunkHVI55MTKjs.samplePayloadForInputFields.call(void 0, inputFields)));
|
|
1617
1634
|
console.log("Example input payload:");
|
|
1618
1635
|
console.log(JSON.stringify(sampleInput, null, 2));
|
|
1619
1636
|
console.log(`Use in a play:`);
|
|
@@ -1627,32 +1644,32 @@ function printToolExamplesOnly(tool, requestedToolId) {
|
|
|
1627
1644
|
);
|
|
1628
1645
|
console.log("});");
|
|
1629
1646
|
console.log("const response = result.toolResponse.rawV2;");
|
|
1630
|
-
const getters =
|
|
1647
|
+
const getters = _chunkHVI55MTKjs.isRecord.call(void 0, contract.getters) ? contract.getters : {};
|
|
1631
1648
|
const valueGetters = Array.isArray(getters.extractedValues) ? getters.extractedValues : [];
|
|
1632
1649
|
const listGetters = Array.isArray(getters.extractedLists) ? getters.extractedLists : [];
|
|
1633
|
-
const firstGetter = valueGetters.find(
|
|
1650
|
+
const firstGetter = valueGetters.find(_chunkHVI55MTKjs.isRecord);
|
|
1634
1651
|
if (firstGetter) {
|
|
1635
|
-
const name =
|
|
1636
|
-
const expression =
|
|
1652
|
+
const name = _chunkHVI55MTKjs.stringField.call(void 0, firstGetter, "name") || "value";
|
|
1653
|
+
const expression = _chunkHVI55MTKjs.stringField.call(void 0, firstGetter, "expression");
|
|
1637
1654
|
if (expression)
|
|
1638
1655
|
console.log(
|
|
1639
1656
|
`const ${safeIdentifier(name)} = ${expression.replace(/^toolExecutionResult\./, "result.")};`
|
|
1640
1657
|
);
|
|
1641
1658
|
}
|
|
1642
1659
|
const arrayNames = new Set(
|
|
1643
|
-
|
|
1644
|
-
|
|
1660
|
+
_chunkHVI55MTKjs.recursiveToolInputFieldsForDisplay.call(void 0,
|
|
1661
|
+
_chunkHVI55MTKjs.recordField.call(void 0, tool, "outputSchema", "output_schema")
|
|
1645
1662
|
).filter((field) => String(field.type).split("|").includes("array")).map((field) => String(field.name).split(".").at(-1))
|
|
1646
1663
|
);
|
|
1647
1664
|
const firstList = _nullishCoalesce(listGetters.find(
|
|
1648
|
-
(entry) =>
|
|
1649
|
-
), () => ( listGetters.find(
|
|
1650
|
-
if (
|
|
1651
|
-
const name = safeIdentifier(
|
|
1665
|
+
(entry) => _chunkHVI55MTKjs.isRecord.call(void 0, entry) && arrayNames.has(_chunkHVI55MTKjs.stringField.call(void 0, entry, "name"))
|
|
1666
|
+
), () => ( listGetters.find(_chunkHVI55MTKjs.isRecord)));
|
|
1667
|
+
if (_chunkHVI55MTKjs.isRecord.call(void 0, firstList)) {
|
|
1668
|
+
const name = safeIdentifier(_chunkHVI55MTKjs.stringField.call(void 0, firstList, "name") || "list");
|
|
1652
1669
|
if (_chunkJ33TSWO5js.playToolListGetterMode.call(void 0, ) === "array") {
|
|
1653
|
-
console.log(`const ${name}_rows = ${
|
|
1670
|
+
console.log(`const ${name}_rows = ${_chunkHVI55MTKjs.playResultExpression.call(void 0, firstList)};`);
|
|
1654
1671
|
} else {
|
|
1655
|
-
console.log(`const ${name}_ds = ${
|
|
1672
|
+
console.log(`const ${name}_ds = ${_chunkHVI55MTKjs.playResultExpression.call(void 0, firstList)};`);
|
|
1656
1673
|
console.log(
|
|
1657
1674
|
"// Complete small list from this response; throws above the memory cap."
|
|
1658
1675
|
);
|
|
@@ -1662,7 +1679,7 @@ function printToolExamplesOnly(tool, requestedToolId) {
|
|
|
1662
1679
|
console.log("```");
|
|
1663
1680
|
if (firstList) printListGetterConsumption();
|
|
1664
1681
|
for (const example of examples) {
|
|
1665
|
-
const description =
|
|
1682
|
+
const description = _chunkHVI55MTKjs.stringField.call(void 0, example, "description");
|
|
1666
1683
|
if (description) console.log(description);
|
|
1667
1684
|
console.log("Example Deepline execution response:");
|
|
1668
1685
|
console.log(JSON.stringify(example.response, null, 2));
|
|
@@ -1677,14 +1694,14 @@ function printToolExamplesOnly(tool, requestedToolId) {
|
|
|
1677
1694
|
}
|
|
1678
1695
|
function printPlayLikeToolUsage(tool, requestedToolId) {
|
|
1679
1696
|
const toolId = String(tool.toolId || requestedToolId);
|
|
1680
|
-
const inputFields =
|
|
1681
|
-
|
|
1697
|
+
const inputFields = _chunkHVI55MTKjs.toolInputFieldsForDisplay.call(void 0,
|
|
1698
|
+
_chunkHVI55MTKjs.recordField.call(void 0, tool, "inputSchema", "input_schema")
|
|
1682
1699
|
);
|
|
1683
|
-
const sampleInput =
|
|
1684
|
-
const playReference =
|
|
1700
|
+
const sampleInput = _chunkHVI55MTKjs.samplePayloadForInputFields.call(void 0, inputFields);
|
|
1701
|
+
const playReference = _chunkHVI55MTKjs.playReferenceForTool.call(void 0, tool);
|
|
1685
1702
|
console.log("Run as a play:");
|
|
1686
1703
|
console.log(
|
|
1687
|
-
|
|
1704
|
+
_chunkHVI55MTKjs.playRunCommandForTool.call(void 0,
|
|
1688
1705
|
tool,
|
|
1689
1706
|
toolId,
|
|
1690
1707
|
Object.keys(sampleInput).length ? sampleInput : void 0
|
|
@@ -1695,13 +1712,13 @@ function printPlayLikeToolUsage(tool, requestedToolId) {
|
|
|
1695
1712
|
}
|
|
1696
1713
|
}
|
|
1697
1714
|
function printToolGettersOnly(tool, requestedToolId) {
|
|
1698
|
-
const contract =
|
|
1715
|
+
const contract = _chunkHVI55MTKjs.toolContractJsonForDescribe.call(void 0,
|
|
1699
1716
|
tool,
|
|
1700
1717
|
requestedToolId,
|
|
1701
1718
|
void 0,
|
|
1702
1719
|
seedToolListScript
|
|
1703
1720
|
);
|
|
1704
|
-
const getters =
|
|
1721
|
+
const getters = _chunkHVI55MTKjs.isRecord.call(void 0, contract.getters) ? contract.getters : {};
|
|
1705
1722
|
const listGetters = Array.isArray(getters.extractedLists) ? getters.extractedLists : [];
|
|
1706
1723
|
const valueGetters = Array.isArray(getters.extractedValues) ? getters.extractedValues : [];
|
|
1707
1724
|
console.log(`Getters: ${contract.toolId}`);
|
|
@@ -1712,9 +1729,9 @@ function printToolGettersOnly(tool, requestedToolId) {
|
|
|
1712
1729
|
if (listGetters.length) {
|
|
1713
1730
|
console.log(listGetterHeading());
|
|
1714
1731
|
for (const entry of listGetters) {
|
|
1715
|
-
if (
|
|
1732
|
+
if (_chunkHVI55MTKjs.isRecord.call(void 0, entry))
|
|
1716
1733
|
console.log(
|
|
1717
|
-
`- ${
|
|
1734
|
+
`- ${_chunkHVI55MTKjs.stringField.call(void 0, entry, "name")}: ${_chunkHVI55MTKjs.playResultExpression.call(void 0, entry)}`
|
|
1718
1735
|
);
|
|
1719
1736
|
}
|
|
1720
1737
|
printListGetterConsumption();
|
|
@@ -1722,9 +1739,9 @@ function printToolGettersOnly(tool, requestedToolId) {
|
|
|
1722
1739
|
if (valueGetters.length) {
|
|
1723
1740
|
console.log("Values:");
|
|
1724
1741
|
for (const entry of valueGetters) {
|
|
1725
|
-
if (
|
|
1742
|
+
if (_chunkHVI55MTKjs.isRecord.call(void 0, entry))
|
|
1726
1743
|
console.log(
|
|
1727
|
-
`- ${
|
|
1744
|
+
`- ${_chunkHVI55MTKjs.stringField.call(void 0, entry, "name")}: ${_chunkHVI55MTKjs.playResultExpression.call(void 0, entry)}`
|
|
1728
1745
|
);
|
|
1729
1746
|
}
|
|
1730
1747
|
}
|
|
@@ -1762,22 +1779,22 @@ function listedToolDescription(tool) {
|
|
|
1762
1779
|
}
|
|
1763
1780
|
function formatListedToolCost(tool) {
|
|
1764
1781
|
const record = tool;
|
|
1765
|
-
if (
|
|
1782
|
+
if (_chunkHVI55MTKjs.stringField.call(void 0, record, "billingSource", "billing_source") === "free") {
|
|
1766
1783
|
return "Cost: Free";
|
|
1767
1784
|
}
|
|
1768
|
-
const pricing =
|
|
1769
|
-
const displayText =
|
|
1785
|
+
const pricing = _chunkHVI55MTKjs.recordField.call(void 0, record, "pricing");
|
|
1786
|
+
const displayText = _chunkHVI55MTKjs.stringField.call(void 0, pricing, "displayText", "display_text");
|
|
1770
1787
|
return displayText ? `Cost: ${displayText}` : "";
|
|
1771
1788
|
}
|
|
1772
1789
|
function printToolOutputArrayShape(tool) {
|
|
1773
|
-
const outputFields =
|
|
1774
|
-
|
|
1790
|
+
const outputFields = _chunkHVI55MTKjs.toolOutputFieldsForDisplay.call(void 0,
|
|
1791
|
+
_chunkHVI55MTKjs.recordField.call(void 0, _chunkHVI55MTKjs.isRecord.call(void 0, tool) ? tool : {}, "outputSchema", "output_schema")
|
|
1775
1792
|
);
|
|
1776
1793
|
if (outputFields.length === 0) return;
|
|
1777
1794
|
console.log(" Output array shape (declared schema):");
|
|
1778
1795
|
for (const field of outputFields.slice(0, 60)) {
|
|
1779
1796
|
const name = String(field.name);
|
|
1780
|
-
const type =
|
|
1797
|
+
const type = _chunkHVI55MTKjs.stringField.call(void 0, field, "type") || "unknown";
|
|
1781
1798
|
const itemBounds = arrayItemBoundsSuffix(field);
|
|
1782
1799
|
console.log(` - ${name}: ${type}${itemBounds}`);
|
|
1783
1800
|
}
|
|
@@ -1786,14 +1803,14 @@ function printToolOutputArrayShape(tool) {
|
|
|
1786
1803
|
}
|
|
1787
1804
|
}
|
|
1788
1805
|
function declaredToolJsonSchema(inputSchema) {
|
|
1789
|
-
if (
|
|
1806
|
+
if (_chunkHVI55MTKjs.isRecord.call(void 0, inputSchema.jsonSchema)) {
|
|
1790
1807
|
return inputSchema.jsonSchema;
|
|
1791
1808
|
}
|
|
1792
1809
|
return Array.isArray(inputSchema.fields) ? null : inputSchema;
|
|
1793
1810
|
}
|
|
1794
1811
|
function arrayItemBoundsSuffix(field) {
|
|
1795
|
-
const itemSchema =
|
|
1796
|
-
const itemType = itemSchema ? typeof itemSchema.type === "string" ? itemSchema.type :
|
|
1812
|
+
const itemSchema = _chunkHVI55MTKjs.isRecord.call(void 0, field.items) ? field.items : null;
|
|
1813
|
+
const itemType = itemSchema ? typeof itemSchema.type === "string" ? itemSchema.type : _chunkHVI55MTKjs.isRecord.call(void 0, itemSchema.properties) ? "object" : "unknown" : null;
|
|
1797
1814
|
const itemEnum = Array.isArray(_optionalChain([itemSchema, 'optionalAccess', _14 => _14.enum])) ? ` enum=${itemSchema.enum.map(String).join("|")}` : "";
|
|
1798
1815
|
const itemTypeSuffix = itemType && itemType !== "unknown" ? ` items=${itemType}${itemEnum}` : "";
|
|
1799
1816
|
const minItems = typeof field.minItems === "number" && Number.isFinite(field.minItems) ? field.minItems : null;
|
|
@@ -1806,21 +1823,21 @@ function arrayItemBoundsSuffix(field) {
|
|
|
1806
1823
|
return itemTypeSuffix;
|
|
1807
1824
|
}
|
|
1808
1825
|
function printToolExecutionHints(value) {
|
|
1809
|
-
const batchCapabilityRecord =
|
|
1810
|
-
|
|
1826
|
+
const batchCapabilityRecord = _chunkHVI55MTKjs.recordField.call(void 0,
|
|
1827
|
+
_chunkHVI55MTKjs.isRecord.call(void 0, value) ? value : {},
|
|
1811
1828
|
"batchCapability",
|
|
1812
1829
|
"batch_capability"
|
|
1813
1830
|
);
|
|
1814
1831
|
const batchCapability = Object.keys(batchCapabilityRecord).length > 0 ? batchCapabilityRecord : null;
|
|
1815
|
-
const executionMetadata =
|
|
1816
|
-
|
|
1832
|
+
const executionMetadata = _chunkHVI55MTKjs.recordField.call(void 0,
|
|
1833
|
+
_chunkHVI55MTKjs.isRecord.call(void 0, value) ? value : {},
|
|
1817
1834
|
"executionMetadata",
|
|
1818
1835
|
"execution_metadata"
|
|
1819
1836
|
);
|
|
1820
1837
|
if (batchCapability) {
|
|
1821
|
-
const status =
|
|
1822
|
-
const surface =
|
|
1823
|
-
const operation =
|
|
1838
|
+
const status = _chunkHVI55MTKjs.stringField.call(void 0, batchCapability, "status") || "unknown";
|
|
1839
|
+
const surface = _chunkHVI55MTKjs.stringField.call(void 0, batchCapability, "surface");
|
|
1840
|
+
const operation = _chunkHVI55MTKjs.stringField.call(void 0,
|
|
1824
1841
|
batchCapability,
|
|
1825
1842
|
"batchOperation",
|
|
1826
1843
|
"batch_operation"
|
|
@@ -1830,7 +1847,7 @@ function printToolExecutionHints(value) {
|
|
|
1830
1847
|
"maxBatchSize",
|
|
1831
1848
|
"max_batch_size"
|
|
1832
1849
|
);
|
|
1833
|
-
const notes =
|
|
1850
|
+
const notes = _chunkHVI55MTKjs.stringField.call(void 0, batchCapability, "notes");
|
|
1834
1851
|
console.log("");
|
|
1835
1852
|
console.log("Batching:");
|
|
1836
1853
|
console.log(`- Catalog status: ${status}${surface ? ` (${surface})` : ""}`);
|
|
@@ -1849,11 +1866,11 @@ function printToolExecutionHints(value) {
|
|
|
1849
1866
|
}
|
|
1850
1867
|
if (notes) console.log(`- Details: ${notes}`);
|
|
1851
1868
|
}
|
|
1852
|
-
const configuredRateLimits =
|
|
1869
|
+
const configuredRateLimits = _chunkHVI55MTKjs.arrayField.call(void 0,
|
|
1853
1870
|
executionMetadata,
|
|
1854
1871
|
"configuredRateLimits",
|
|
1855
1872
|
"configured_rate_limits"
|
|
1856
|
-
).filter(
|
|
1873
|
+
).filter(_chunkHVI55MTKjs.isRecord);
|
|
1857
1874
|
if (configuredRateLimits.length > 0) {
|
|
1858
1875
|
console.log("");
|
|
1859
1876
|
console.log(
|
|
@@ -1863,7 +1880,7 @@ function printToolExecutionHints(value) {
|
|
|
1863
1880
|
const requests = numberField(limit, "requestsPerWindow");
|
|
1864
1881
|
const windowMs = numberField(limit, "windowMs");
|
|
1865
1882
|
if (requests === null || windowMs === null) continue;
|
|
1866
|
-
const usage =
|
|
1883
|
+
const usage = _chunkHVI55MTKjs.stringField.call(void 0, limit, "usage") || "unknown";
|
|
1867
1884
|
const usageText = usage === "queue_hint" ? "queue hint" : usage === "enforced" ? "Deepline enforced" : usage === "queue_hint_and_enforced" ? "queue hint and Deepline enforced" : usage === "disabled" ? "disabled" : usage;
|
|
1868
1885
|
const explicitMaxConcurrency = numberField(
|
|
1869
1886
|
limit,
|
|
@@ -1872,11 +1889,11 @@ function printToolExecutionHints(value) {
|
|
|
1872
1889
|
);
|
|
1873
1890
|
const concurrencyText = explicitMaxConcurrency === null ? "no explicit concurrency limit" : `explicit concurrency limit ${explicitMaxConcurrency}`;
|
|
1874
1891
|
console.log(
|
|
1875
|
-
`- ${requests} requests per ${formatRateWindow(windowMs)}${
|
|
1892
|
+
`- ${requests} requests per ${formatRateWindow(windowMs)}${_chunkTFEXSHPMjs.rateLimitQualifier.call(void 0, limit)} (${usageText}; ${concurrencyText})`
|
|
1876
1893
|
);
|
|
1877
1894
|
}
|
|
1878
1895
|
}
|
|
1879
|
-
const queueHint =
|
|
1896
|
+
const queueHint = _chunkHVI55MTKjs.recordField.call(void 0, executionMetadata, "queueHint", "queue_hint");
|
|
1880
1897
|
const requestsPerSecondHint = numberField(
|
|
1881
1898
|
queueHint,
|
|
1882
1899
|
"requestsPerSecondHint",
|
|
@@ -1902,25 +1919,25 @@ function formatRateWindow(windowMs) {
|
|
|
1902
1919
|
}
|
|
1903
1920
|
function samplePayload(samples, key) {
|
|
1904
1921
|
const entry = samples[key];
|
|
1905
|
-
if (!
|
|
1922
|
+
if (!_chunkHVI55MTKjs.isRecord.call(void 0, entry)) return void 0;
|
|
1906
1923
|
return Object.prototype.hasOwnProperty.call(entry, "payload") ? entry.payload : entry;
|
|
1907
1924
|
}
|
|
1908
1925
|
function commandEnvelopeFromRawResponse(rawResponse) {
|
|
1909
|
-
return
|
|
1926
|
+
return _chunkHVI55MTKjs.isRecord.call(void 0, rawResponse) ? { ...rawResponse } : { status: "completed", result: rawResponse };
|
|
1910
1927
|
}
|
|
1911
1928
|
function toolExecuteExitCode(envelope) {
|
|
1912
1929
|
return envelope.status === "failed" || envelope.ok === false ? 1 : 0;
|
|
1913
1930
|
}
|
|
1914
1931
|
function extractToolExecutionWarningMessages(rawResponse) {
|
|
1915
|
-
if (!
|
|
1932
|
+
if (!_chunkHVI55MTKjs.isRecord.call(void 0, rawResponse)) return [];
|
|
1916
1933
|
const candidates = [
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
|
|
1934
|
+
_chunkHVI55MTKjs.recordField.call(void 0, _chunkHVI55MTKjs.recordField.call(void 0, rawResponse, "toolResponse"), "meta"),
|
|
1935
|
+
_chunkHVI55MTKjs.recordField.call(void 0,
|
|
1936
|
+
_chunkHVI55MTKjs.recordField.call(void 0, _chunkHVI55MTKjs.recordField.call(void 0, rawResponse, "toolResponse"), "raw"),
|
|
1920
1937
|
"meta"
|
|
1921
1938
|
),
|
|
1922
|
-
|
|
1923
|
-
|
|
1939
|
+
_chunkHVI55MTKjs.recordField.call(void 0, rawResponse, "meta"),
|
|
1940
|
+
_chunkHVI55MTKjs.recordField.call(void 0, _chunkHVI55MTKjs.recordField.call(void 0, rawResponse, "result"), "meta")
|
|
1924
1941
|
];
|
|
1925
1942
|
const messages = [];
|
|
1926
1943
|
for (const candidate of candidates) {
|
|
@@ -1929,8 +1946,8 @@ function extractToolExecutionWarningMessages(rawResponse) {
|
|
|
1929
1946
|
for (const warning of warnings) {
|
|
1930
1947
|
if (typeof warning === "string" && warning.trim()) {
|
|
1931
1948
|
messages.push(warning.trim());
|
|
1932
|
-
} else if (
|
|
1933
|
-
const message =
|
|
1949
|
+
} else if (_chunkHVI55MTKjs.isRecord.call(void 0, warning)) {
|
|
1950
|
+
const message = _chunkHVI55MTKjs.stringField.call(void 0, warning, "message");
|
|
1934
1951
|
if (message) messages.push(message);
|
|
1935
1952
|
}
|
|
1936
1953
|
}
|
|
@@ -1938,20 +1955,20 @@ function extractToolExecutionWarningMessages(rawResponse) {
|
|
|
1938
1955
|
return [...new Set(messages)];
|
|
1939
1956
|
}
|
|
1940
1957
|
function apifySyncRecoveryNext(rawResponse) {
|
|
1941
|
-
if (!
|
|
1942
|
-
const toolResponse =
|
|
1943
|
-
const raw =
|
|
1958
|
+
if (!_chunkHVI55MTKjs.isRecord.call(void 0, rawResponse) || rawResponse.status !== "running") return null;
|
|
1959
|
+
const toolResponse = _chunkHVI55MTKjs.recordField.call(void 0, rawResponse, "toolResponse");
|
|
1960
|
+
const raw = _chunkHVI55MTKjs.recordField.call(void 0, toolResponse, "raw");
|
|
1944
1961
|
if (raw.state !== "awaiting_apify") return null;
|
|
1945
|
-
const next =
|
|
1946
|
-
const getActorRun =
|
|
1947
|
-
const getActorRunTool =
|
|
1948
|
-
const getActorRunPayload =
|
|
1962
|
+
const next = _chunkHVI55MTKjs.recordField.call(void 0, raw, "next");
|
|
1963
|
+
const getActorRun = _chunkHVI55MTKjs.recordField.call(void 0, next, "getActorRun");
|
|
1964
|
+
const getActorRunTool = _chunkHVI55MTKjs.stringField.call(void 0, getActorRun, "tool");
|
|
1965
|
+
const getActorRunPayload = _chunkHVI55MTKjs.recordField.call(void 0, getActorRun, "payload");
|
|
1949
1966
|
if (!getActorRunTool || Object.keys(getActorRunPayload).length === 0) {
|
|
1950
1967
|
return null;
|
|
1951
1968
|
}
|
|
1952
|
-
const getDatasetItems =
|
|
1953
|
-
const getDatasetItemsTool =
|
|
1954
|
-
const getDatasetItemsPayload =
|
|
1969
|
+
const getDatasetItems = _chunkHVI55MTKjs.recordField.call(void 0, next, "getDatasetItems");
|
|
1970
|
+
const getDatasetItemsTool = _chunkHVI55MTKjs.stringField.call(void 0, getDatasetItems, "tool");
|
|
1971
|
+
const getDatasetItemsPayload = _chunkHVI55MTKjs.recordField.call(void 0, getDatasetItems, "payload");
|
|
1955
1972
|
return {
|
|
1956
1973
|
getActorRun: `deepline run ${getActorRunTool} --input ${_chunkAID3OYVJjs.shellQuote.call(void 0, JSON.stringify(getActorRunPayload))}`,
|
|
1957
1974
|
...getDatasetItemsTool && Object.keys(getDatasetItemsPayload).length > 0 ? {
|
|
@@ -1961,7 +1978,7 @@ function apifySyncRecoveryNext(rawResponse) {
|
|
|
1961
1978
|
}
|
|
1962
1979
|
function listExtractorPathsFromUsageGuidance(tool) {
|
|
1963
1980
|
const toolExecutionResult = _optionalChain([tool, 'access', _16 => _16.usageGuidance, 'optionalAccess', _17 => _17.toolExecutionResult]);
|
|
1964
|
-
const extractedLists = Array.isArray(_optionalChain([toolExecutionResult, 'optionalAccess', _18 => _18.extractedLists])) ? toolExecutionResult.extractedLists :
|
|
1981
|
+
const extractedLists = Array.isArray(_optionalChain([toolExecutionResult, 'optionalAccess', _18 => _18.extractedLists])) ? toolExecutionResult.extractedLists : _chunkHVI55MTKjs.isRecord.call(void 0, _optionalChain([toolExecutionResult, 'optionalAccess', _19 => _19.extractedLists])) ? Object.values(toolExecutionResult.extractedLists) : [];
|
|
1965
1982
|
return extractedLists.flatMap((entry) => {
|
|
1966
1983
|
const paths = _nullishCoalesce(_optionalChain([entry, 'access', _20 => _20.details, 'optionalAccess', _21 => _21.candidatePaths]), () => ( _optionalChain([entry, 'access', _22 => _22.details, 'optionalAccess', _23 => _23.rawToolOutputPaths])));
|
|
1967
1984
|
if (!Array.isArray(paths)) return [];
|
|
@@ -2046,7 +2063,7 @@ function parseJsonObjectArgument(raw, flagName) {
|
|
|
2046
2063
|
}
|
|
2047
2064
|
throw invalidJsonError(flagName, message);
|
|
2048
2065
|
}
|
|
2049
|
-
if (!
|
|
2066
|
+
if (!_chunkHVI55MTKjs.isRecord.call(void 0, parsed)) {
|
|
2050
2067
|
throw invalidJsonError(flagName, "expected an object.");
|
|
2051
2068
|
}
|
|
2052
2069
|
return parsed;
|
|
@@ -2090,7 +2107,7 @@ function parseExecuteOptions(toolId, options, output) {
|
|
|
2090
2107
|
outputFormat = normalizeOutputFormat(options.outputFormat);
|
|
2091
2108
|
}
|
|
2092
2109
|
if (options.idempotencyKey !== void 0) {
|
|
2093
|
-
|
|
2110
|
+
_chunkCACFJODGjs.validateExecutionIdempotencyKey.call(void 0, options.idempotencyKey);
|
|
2094
2111
|
}
|
|
2095
2112
|
if (options.connection !== void 0 && (options.recover || options.idempotencyKey !== void 0)) {
|
|
2096
2113
|
throw new Error(
|
|
@@ -2225,7 +2242,7 @@ function buildToolExecuteBaseEnvelope(input) {
|
|
|
2225
2242
|
kind: summaryEntries.length > 0 ? "object" : "raw",
|
|
2226
2243
|
summary: input.summary
|
|
2227
2244
|
};
|
|
2228
|
-
const envelopeHasCanonicalOutput =
|
|
2245
|
+
const envelopeHasCanonicalOutput = _chunkHVI55MTKjs.isRecord.call(void 0, envelope.toolResponse) && Object.prototype.hasOwnProperty.call(envelope.toolResponse, "raw");
|
|
2229
2246
|
const envelopeHasDeclaredOutput = Object.prototype.hasOwnProperty.call(
|
|
2230
2247
|
envelope,
|
|
2231
2248
|
"output"
|
|
@@ -2253,7 +2270,7 @@ function buildToolExecuteBaseEnvelope(input) {
|
|
|
2253
2270
|
return {
|
|
2254
2271
|
...envelope,
|
|
2255
2272
|
...input.idempotencyKey ? { idempotency_key: input.idempotencyKey } : {},
|
|
2256
|
-
...
|
|
2273
|
+
..._chunkHVI55MTKjs.isRecord.call(void 0, input.rawResponse) && _chunkHVI55MTKjs.isRecord.call(void 0, input.rawResponse.executionRecovery) ? { execution_recovery: input.rawResponse.executionRecovery } : {},
|
|
2257
2274
|
...envelopeHasCanonicalOutput || envelopeHasDeclaredOutput ? { output_preview: outputPreview } : { output: outputPreview },
|
|
2258
2275
|
...summaryEntries.length > 0 ? { summary: input.summary } : {},
|
|
2259
2276
|
...warningMessages.length > 0 ? { warnings: warningMessages } : {},
|
|
@@ -2314,7 +2331,7 @@ function buildToolExecuteRowArtifactEnvelope(input) {
|
|
|
2314
2331
|
void _render;
|
|
2315
2332
|
void _next;
|
|
2316
2333
|
void _local;
|
|
2317
|
-
const billingLookup =
|
|
2334
|
+
const billingLookup = _chunkHVI55MTKjs.isRecord.call(void 0, input.baseEnvelope.next) && typeof input.baseEnvelope.next.billing === "string" ? input.baseEnvelope.next.billing : null;
|
|
2318
2335
|
const inspection = toolExecutionInspection(input);
|
|
2319
2336
|
return {
|
|
2320
2337
|
...base,
|
|
@@ -2410,8 +2427,8 @@ function printToolExecutionWarnings(toolId, params, metadata) {
|
|
|
2410
2427
|
}
|
|
2411
2428
|
}
|
|
2412
2429
|
function assertExecutableToolMetadata(toolId, metadata) {
|
|
2413
|
-
if (
|
|
2414
|
-
throw new (0,
|
|
2430
|
+
if (_chunkHVI55MTKjs.isPlayLikeTool.call(void 0, metadata)) {
|
|
2431
|
+
throw new (0, _chunkLFQJW4S2js.DeeplineError)(
|
|
2415
2432
|
playLikeToolExecuteErrorMessage(
|
|
2416
2433
|
toolId,
|
|
2417
2434
|
metadata
|
|
@@ -2428,7 +2445,7 @@ function valueAt(value, path) {
|
|
|
2428
2445
|
for (const [index, part] of parts.entries()) {
|
|
2429
2446
|
const each = part === "*" || part.endsWith("[*]");
|
|
2430
2447
|
if (part !== "*") {
|
|
2431
|
-
at =
|
|
2448
|
+
at = _chunkHVI55MTKjs.isRecord.call(void 0, at) ? at[each ? part.slice(0, -3) : part] : void 0;
|
|
2432
2449
|
}
|
|
2433
2450
|
if (!each) continue;
|
|
2434
2451
|
if (!Array.isArray(at)) return void 0;
|
|
@@ -2444,7 +2461,7 @@ function declaredOutputs(metadata, envelope, data) {
|
|
|
2444
2461
|
const getters = ["extractedValues", "extractedLists"].flatMap(
|
|
2445
2462
|
(kind) => {
|
|
2446
2463
|
const group = _optionalChain([result, 'optionalAccess', _28 => _28[kind]]);
|
|
2447
|
-
return Array.isArray(group) ? group :
|
|
2464
|
+
return Array.isArray(group) ? group : _chunkHVI55MTKjs.isRecord.call(void 0, group) ? Object.entries(group).map(([name, getter]) => ({
|
|
2448
2465
|
name,
|
|
2449
2466
|
...getter
|
|
2450
2467
|
})) : [];
|
|
@@ -2469,13 +2486,13 @@ function declaredOutputs(metadata, envelope, data) {
|
|
|
2469
2486
|
}
|
|
2470
2487
|
function writeToolReceipt(input) {
|
|
2471
2488
|
const { response, metadata } = input;
|
|
2472
|
-
const envelope =
|
|
2489
|
+
const envelope = _chunkHVI55MTKjs.isRecord.call(void 0, response) ? response : {};
|
|
2473
2490
|
const jobId = typeof envelope.job_id === "string" ? envelope.job_id : null;
|
|
2474
|
-
const toolResponse =
|
|
2491
|
+
const toolResponse = _chunkHVI55MTKjs.recordField.call(void 0, envelope, "toolResponse");
|
|
2475
2492
|
const data = Object.hasOwn(toolResponse, "rawV2") ? toolResponse.rawV2 : Object.hasOwn(toolResponse, "raw") ? toolResponse.raw : Object.hasOwn(envelope, "output") ? envelope.output : Object.hasOwn(envelope, "result") ? envelope.result : response;
|
|
2476
2493
|
const status = typeof envelope.status === "string" ? envelope.status : "completed";
|
|
2477
|
-
const charged =
|
|
2478
|
-
|
|
2494
|
+
const charged = _chunkHVI55MTKjs.recordField.call(void 0, envelope, "billing").credits_charged;
|
|
2495
|
+
_chunkDP2VH7COjs.writeExecutionOutput.call(void 0,
|
|
2479
2496
|
{
|
|
2480
2497
|
id: _nullishCoalesce(input.key, () => ( jobId)),
|
|
2481
2498
|
status,
|
|
@@ -2506,8 +2523,8 @@ async function executeToolForReceipt(input) {
|
|
|
2506
2523
|
let retryKey = null;
|
|
2507
2524
|
let received = false;
|
|
2508
2525
|
try {
|
|
2509
|
-
const cliInvocationId = _nullishCoalesce(
|
|
2510
|
-
const client = new (0,
|
|
2526
|
+
const cliInvocationId = _nullishCoalesce(_chunkY6SP3JMIjs.getToolExecuteInvocationId.call(void 0, ), () => ( _chunkY6SP3JMIjs.beginToolExecuteCommand.call(void 0, )));
|
|
2527
|
+
const client = new (0, _chunkJLGP5XAJjs.DeeplineClient)();
|
|
2511
2528
|
const metadata = assertExecutableToolMetadata(
|
|
2512
2529
|
toolId,
|
|
2513
2530
|
await _asyncNullishCoalesce(input.metadata, async () => ( await client.getTool(toolId, { cliInvocationId })))
|
|
@@ -2523,14 +2540,24 @@ async function executeToolForReceipt(input) {
|
|
|
2523
2540
|
});
|
|
2524
2541
|
key = _nullishCoalesce(recovery.idempotencyKey, () => ( null));
|
|
2525
2542
|
retryKey = recovery;
|
|
2526
|
-
const
|
|
2543
|
+
const warnings = [];
|
|
2544
|
+
const call = (idempotencyKey) => client.executeTool(toolId, params, {
|
|
2527
2545
|
responseIntent,
|
|
2528
2546
|
...input.timeoutMs !== void 0 ? { timeout: input.timeoutMs } : {},
|
|
2529
2547
|
..._optionalChain([metadata, 'access', _35 => _35.executionMetadata, 'optionalAccess', _36 => _36.retrySafeTransientHttp]) === true ? { maxRetries: 2, retryApiErrors: true } : {},
|
|
2530
|
-
...
|
|
2531
|
-
searchRef:
|
|
2548
|
+
...idempotencyKey ? { idempotencyKey } : {},
|
|
2549
|
+
searchRef: _chunkSBH4CKPNjs.recentSearchRef.call(void 0, toolId),
|
|
2532
2550
|
cliInvocationId,
|
|
2533
|
-
onResponseReceived:
|
|
2551
|
+
onResponseReceived: _chunkDP2VH7COjs.recordApiResponse
|
|
2552
|
+
});
|
|
2553
|
+
const response = await call(key).catch((error) => {
|
|
2554
|
+
if (!key || !refusedRetryKey(error)) throw error;
|
|
2555
|
+
recovery.discard();
|
|
2556
|
+
key = null;
|
|
2557
|
+
const warning = `${toolId} cannot be resumed with a retry key, so this call runs without one. If it is interrupted, running it again calls the provider again.`;
|
|
2558
|
+
warnings.push(warning);
|
|
2559
|
+
console.error(warning);
|
|
2560
|
+
return call(null);
|
|
2534
2561
|
}).catch((error) => {
|
|
2535
2562
|
const guidance = toolGuidanceLines(metadata.guidance);
|
|
2536
2563
|
if (guidance.length)
|
|
@@ -2543,9 +2570,13 @@ async function executeToolForReceipt(input) {
|
|
|
2543
2570
|
metadata,
|
|
2544
2571
|
response,
|
|
2545
2572
|
output,
|
|
2546
|
-
warnings:
|
|
2547
|
-
|
|
2548
|
-
|
|
2573
|
+
warnings: [
|
|
2574
|
+
...warnings,
|
|
2575
|
+
// Only a call that still carries its saved key was replayed.
|
|
2576
|
+
...recovery.resumed && key ? [
|
|
2577
|
+
"Resumed an interrupted call with its saved retry key; it was not charged again. --fresh calls the provider again."
|
|
2578
|
+
] : []
|
|
2579
|
+
]
|
|
2549
2580
|
});
|
|
2550
2581
|
await recovery.acknowledgeDelivery();
|
|
2551
2582
|
return code;
|
|
@@ -2553,11 +2584,11 @@ async function executeToolForReceipt(input) {
|
|
|
2553
2584
|
if (received) throw error;
|
|
2554
2585
|
const outcomeKnown = answeredWithFailure(error);
|
|
2555
2586
|
if (outcomeKnown) _optionalChain([retryKey, 'optionalAccess', _37 => _37.discard, 'call', _38 => _38()]);
|
|
2556
|
-
|
|
2587
|
+
_chunkDP2VH7COjs.writeExecutionOutput.call(void 0,
|
|
2557
2588
|
{
|
|
2558
2589
|
id: outcomeKnown ? null : key,
|
|
2559
2590
|
status: "failed",
|
|
2560
|
-
error:
|
|
2591
|
+
error: _chunkXLIHTJVMjs.errorToJsonPayload.call(void 0, error).error,
|
|
2561
2592
|
...key && !outcomeKnown ? {
|
|
2562
2593
|
next: {
|
|
2563
2594
|
retry: "Run the same command again: it picks up this call without paying twice."
|
|
@@ -2569,16 +2600,31 @@ async function executeToolForReceipt(input) {
|
|
|
2569
2600
|
return 1;
|
|
2570
2601
|
}
|
|
2571
2602
|
}
|
|
2603
|
+
function refusedRetryKey(error) {
|
|
2604
|
+
return error instanceof _chunkLFQJW4S2js.DeeplineError && error.statusCode === 422 && error.code === "IDEMPOTENCY_NOT_SUPPORTED" && // The server's own answer to the keyed POST carries its response body.
|
|
2605
|
+
// The SDK raises the same code locally when a recovery read finds no
|
|
2606
|
+
// support after a POST that may have been dispatched; that one must keep
|
|
2607
|
+
// its key and report an unknown outcome, never call again.
|
|
2608
|
+
serverBodyHasCode(_optionalChain([error, 'access', _39 => _39.details, 'optionalAccess', _40 => _40.response]), "IDEMPOTENCY_NOT_SUPPORTED");
|
|
2609
|
+
}
|
|
2610
|
+
function serverBodyHasCode(body, code) {
|
|
2611
|
+
if (!body || typeof body !== "object") return false;
|
|
2612
|
+
const record = body;
|
|
2613
|
+
if (record.code === code) return true;
|
|
2614
|
+
return serverBodyHasCode(record.error, code);
|
|
2615
|
+
}
|
|
2572
2616
|
function answeredWithFailure(error) {
|
|
2573
|
-
return error instanceof
|
|
2574
|
-
error.statusCode !== 408 && error.code !== "EXECUTION_OUTCOME_UNKNOWN"
|
|
2617
|
+
return error instanceof _chunkLFQJW4S2js.DeeplineError && typeof error.statusCode === "number" && error.statusCode < 500 && // A request timeout says nothing about whether the call went through.
|
|
2618
|
+
error.statusCode !== 408 && error.code !== "EXECUTION_OUTCOME_UNKNOWN" && // The SDK's own "no recovery support" after a keyed POST is not the
|
|
2619
|
+
// server's answer: that POST may have run, so its key must survive.
|
|
2620
|
+
!(error.code === "IDEMPOTENCY_NOT_SUPPORTED" && !serverBodyHasCode(_optionalChain([error, 'access', _41 => _41.details, 'optionalAccess', _42 => _42.response]), "IDEMPOTENCY_NOT_SUPPORTED"));
|
|
2575
2621
|
}
|
|
2576
2622
|
async function getToolExecutionReceipt(key, output) {
|
|
2577
|
-
const client = new (0,
|
|
2623
|
+
const client = new (0, _chunkJLGP5XAJjs.DeeplineClient)();
|
|
2578
2624
|
const execution = await client.executions.getByKey(key);
|
|
2579
2625
|
output.label = `${execution.toolId} (tool)`;
|
|
2580
2626
|
if (execution.response === void 0) {
|
|
2581
|
-
|
|
2627
|
+
_chunkDP2VH7COjs.writeExecutionOutput.call(void 0,
|
|
2582
2628
|
{
|
|
2583
2629
|
id: key,
|
|
2584
2630
|
status: execution.executionRecovery.state,
|
|
@@ -2607,19 +2653,19 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2607
2653
|
parsed = parseExecuteOptions(toolId, options, output);
|
|
2608
2654
|
} catch (error) {
|
|
2609
2655
|
if (wantsJson) {
|
|
2610
|
-
|
|
2656
|
+
_chunkXLIHTJVMjs.printJsonError.call(void 0, error);
|
|
2611
2657
|
} else {
|
|
2612
2658
|
console.error(error instanceof Error ? error.message : String(error));
|
|
2613
2659
|
}
|
|
2614
|
-
return error instanceof
|
|
2660
|
+
return error instanceof _chunkLFQJW4S2js.DeeplineError && error.code === "IDEMPOTENCY_KEY_INVALID" ? 2 : 1;
|
|
2615
2661
|
}
|
|
2616
|
-
const cliInvocationId = _nullishCoalesce(
|
|
2662
|
+
const cliInvocationId = _nullishCoalesce(_chunkY6SP3JMIjs.getToolExecuteInvocationId.call(void 0, ), () => ( _chunkY6SP3JMIjs.beginToolExecuteCommand.call(void 0, )));
|
|
2617
2663
|
const deferredCompatibility = deferCompatibility ? beginDeferredToolExecuteCompatibility(toolId, cliInvocationId) : void 0;
|
|
2618
|
-
const tracing =
|
|
2664
|
+
const tracing = _chunkWOCHZCUJjs.isCliTraceEnabled.call(void 0, );
|
|
2619
2665
|
const clientStartedAt = tracing ? performance.now() : void 0;
|
|
2620
|
-
const client = new (0,
|
|
2666
|
+
const client = new (0, _chunkJLGP5XAJjs.DeeplineClient)();
|
|
2621
2667
|
if (clientStartedAt !== void 0) {
|
|
2622
|
-
|
|
2668
|
+
_chunkWOCHZCUJjs.recordCliTrace.call(void 0, {
|
|
2623
2669
|
phase: "cli.tool_execute_client_setup",
|
|
2624
2670
|
ms: performance.now() - clientStartedAt
|
|
2625
2671
|
});
|
|
@@ -2628,18 +2674,18 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2628
2674
|
const readMetadata = async () => {
|
|
2629
2675
|
if (metadata) return assertExecutableToolMetadata(parsed.toolId, metadata);
|
|
2630
2676
|
try {
|
|
2631
|
-
metadata = await
|
|
2677
|
+
metadata = await _chunkY6SP3JMIjs.runToolExecuteStage.call(void 0,
|
|
2632
2678
|
"tool metadata lookup",
|
|
2633
2679
|
() => client.getTool(parsed.toolId, { cliInvocationId })
|
|
2634
2680
|
);
|
|
2635
2681
|
} catch (error) {
|
|
2636
2682
|
if (isMissingToolMetadataError(error)) {
|
|
2637
|
-
const play = await
|
|
2683
|
+
const play = await _chunkY6SP3JMIjs.runToolExecuteStage.call(void 0,
|
|
2638
2684
|
"play alias lookup",
|
|
2639
2685
|
() => findPlayForToolId(client, parsed.toolId, cliInvocationId)
|
|
2640
2686
|
);
|
|
2641
2687
|
if (play) {
|
|
2642
|
-
throw new (0,
|
|
2688
|
+
throw new (0, _chunkLFQJW4S2js.DeeplineError)(
|
|
2643
2689
|
playAliasToolErrorMessage(parsed.toolId, play),
|
|
2644
2690
|
400,
|
|
2645
2691
|
"PLAY_ALIAS_USED_AS_TOOL"
|
|
@@ -2662,20 +2708,20 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2662
2708
|
try {
|
|
2663
2709
|
assertExecutableToolMetadata(parsed.toolId, metadata);
|
|
2664
2710
|
} catch (error) {
|
|
2665
|
-
if (error instanceof
|
|
2666
|
-
if (wantsJson)
|
|
2711
|
+
if (error instanceof _chunkLFQJW4S2js.DeeplineError && error.code === "PLAY_ALIAS_USED_AS_TOOL") {
|
|
2712
|
+
if (wantsJson) _chunkXLIHTJVMjs.printJsonError.call(void 0, error);
|
|
2667
2713
|
else console.error(error.message);
|
|
2668
2714
|
return 2;
|
|
2669
2715
|
}
|
|
2670
2716
|
throw error;
|
|
2671
2717
|
}
|
|
2672
2718
|
}
|
|
2673
|
-
if (!metadata && _optionalChain([preflightCompatibility, 'optionalAccess',
|
|
2719
|
+
if (!metadata && _optionalChain([preflightCompatibility, 'optionalAccess', _43 => _43.response, 'optionalAccess', _44 => _44.update_required]) !== true && !_optionalChain([preflightCompatibility, 'optionalAccess', _45 => _45.error])) {
|
|
2674
2720
|
try {
|
|
2675
2721
|
metadata = await readMetadata();
|
|
2676
2722
|
} catch (error) {
|
|
2677
|
-
if (error instanceof
|
|
2678
|
-
if (wantsJson)
|
|
2723
|
+
if (error instanceof _chunkLFQJW4S2js.DeeplineError && error.code === "PLAY_ALIAS_USED_AS_TOOL") {
|
|
2724
|
+
if (wantsJson) _chunkXLIHTJVMjs.printJsonError.call(void 0, error);
|
|
2679
2725
|
else console.error(error.message);
|
|
2680
2726
|
return 2;
|
|
2681
2727
|
}
|
|
@@ -2690,8 +2736,8 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2690
2736
|
try {
|
|
2691
2737
|
metadata = await readMetadata();
|
|
2692
2738
|
} catch (error) {
|
|
2693
|
-
if (error instanceof
|
|
2694
|
-
if (wantsJson)
|
|
2739
|
+
if (error instanceof _chunkLFQJW4S2js.DeeplineError && error.code === "PLAY_ALIAS_USED_AS_TOOL") {
|
|
2740
|
+
if (wantsJson) _chunkXLIHTJVMjs.printJsonError.call(void 0, error);
|
|
2695
2741
|
else console.error(error.message);
|
|
2696
2742
|
return 2;
|
|
2697
2743
|
}
|
|
@@ -2718,11 +2764,11 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2718
2764
|
...parsed.connection !== void 0 ? { connection: parsed.connection } : {},
|
|
2719
2765
|
...idempotencyKey ? { idempotencyKey } : {},
|
|
2720
2766
|
...parsed.recoveryTimeoutMs !== void 0 ? { recoveryTimeoutMs: parsed.recoveryTimeoutMs } : {},
|
|
2721
|
-
searchRef:
|
|
2767
|
+
searchRef: _chunkSBH4CKPNjs.recentSearchRef.call(void 0, parsed.toolId),
|
|
2722
2768
|
cliInvocationId,
|
|
2723
|
-
onResponseReceived:
|
|
2769
|
+
onResponseReceived: _chunkDP2VH7COjs.recordApiResponse,
|
|
2724
2770
|
...tracing ? {
|
|
2725
|
-
onServerTiming: (serverTiming) =>
|
|
2771
|
+
onServerTiming: (serverTiming) => _chunkWOCHZCUJjs.recordCliTrace.call(void 0, {
|
|
2726
2772
|
phase: "tool_execute_server_timing",
|
|
2727
2773
|
cliInvocationId,
|
|
2728
2774
|
serverTiming,
|
|
@@ -2733,51 +2779,51 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2733
2779
|
let rawResponse;
|
|
2734
2780
|
let successfulCompatibilityResponse;
|
|
2735
2781
|
try {
|
|
2736
|
-
const executeResult = await
|
|
2782
|
+
const executeResult = await _chunkY6SP3JMIjs.runToolExecuteStage.call(void 0,
|
|
2737
2783
|
"execute request",
|
|
2738
2784
|
async () => {
|
|
2739
2785
|
try {
|
|
2740
2786
|
if (tracing) {
|
|
2741
2787
|
submissionStartedAt = performance.now();
|
|
2742
|
-
|
|
2788
|
+
_chunkWOCHZCUJjs.recordCliTrace.call(void 0, { phase: "cli.tool_execute_request_start" });
|
|
2743
2789
|
}
|
|
2744
2790
|
return await client.executeTool(parsed.toolId, parsed.params, {
|
|
2745
2791
|
...executeOptions,
|
|
2746
2792
|
atomicToolOnly: true,
|
|
2747
|
-
..._optionalChain([metadata, 'optionalAccess',
|
|
2793
|
+
..._optionalChain([metadata, 'optionalAccess', _46 => _46.executionMetadata, 'optionalAccess', _47 => _47.retrySafeAmbiguousDelivery]) === true ? { retryAmbiguousDelivery: true } : {}
|
|
2748
2794
|
});
|
|
2749
2795
|
} catch (error) {
|
|
2750
|
-
if (parsed.connection !== void 0 || !(error instanceof
|
|
2796
|
+
if (parsed.connection !== void 0 || !(error instanceof _chunkLFQJW4S2js.DeeplineError) || error.code !== "ATOMIC_TOOL_EXECUTE_UNSUPPORTED")
|
|
2751
2797
|
throw error;
|
|
2752
|
-
const baseUrl =
|
|
2798
|
+
const baseUrl = _chunkMLABYI4Mjs.resolveConfig.call(void 0, ).baseUrl;
|
|
2753
2799
|
if (maintenancePolicy !== "off") {
|
|
2754
|
-
|
|
2800
|
+
_chunk2B5B5KAWjs.flushDeferredSkillsSyncNotices.call(void 0, baseUrl);
|
|
2755
2801
|
}
|
|
2756
|
-
const
|
|
2802
|
+
const preflight = deferredCompatibility ? await deferredCompatibility.result.catch(() => null) : null;
|
|
2803
|
+
const compatibilityResponse = _optionalChain([preflight, 'optionalAccess', _48 => _48.live]) === true ? preflight.response : await _chunkY6SP3JMIjs.runToolExecuteStage.call(void 0,
|
|
2757
2804
|
"SDK compatibility",
|
|
2758
|
-
() =>
|
|
2805
|
+
() => _chunk2B5B5KAWjs.requireSdkCompatibility.call(void 0, baseUrl, {
|
|
2759
2806
|
command: "tools execute",
|
|
2760
|
-
skillsVersion:
|
|
2807
|
+
skillsVersion: _chunkMLABYI4Mjs.readSdkSkillsLocalVersion.call(void 0, baseUrl),
|
|
2761
2808
|
persistCache: maintenancePolicy !== "off"
|
|
2762
2809
|
})
|
|
2763
2810
|
);
|
|
2764
|
-
|
|
2765
|
-
|
|
2766
|
-
|
|
2767
|
-
compatibility.response,
|
|
2811
|
+
metadata = _nullishCoalesce(_optionalChain([deferredCompatibility, 'optionalAccess', _49 => _49.readMetadata, 'call', _50 => _50()]), () => ( metadata));
|
|
2812
|
+
if (maintenancePolicy !== "off" && await _chunkY6SP3JMIjs.maybeAutoUpdateAndRelaunch.call(void 0,
|
|
2813
|
+
compatibilityResponse,
|
|
2768
2814
|
baseUrl,
|
|
2769
2815
|
maintenancePolicy
|
|
2770
2816
|
)) {
|
|
2771
2817
|
return void 0;
|
|
2772
2818
|
}
|
|
2773
|
-
|
|
2819
|
+
_chunk2B5B5KAWjs.enforceSdkCompatibilityResponse.call(void 0, compatibilityResponse, {
|
|
2774
2820
|
quietAdvisory: wantsJson
|
|
2775
2821
|
});
|
|
2776
2822
|
if (maintenancePolicy !== "off") {
|
|
2777
|
-
await
|
|
2823
|
+
await _chunkY6SP3JMIjs.runToolExecuteStage.call(void 0,
|
|
2778
2824
|
"agent skills sync",
|
|
2779
|
-
() =>
|
|
2780
|
-
update: _optionalChain([
|
|
2825
|
+
() => _chunk2B5B5KAWjs.syncSdkSkillsIfNeeded.call(void 0, baseUrl, {
|
|
2826
|
+
update: _optionalChain([compatibilityResponse, 'optionalAccess', _51 => _51.skills]),
|
|
2781
2827
|
mode: "detached"
|
|
2782
2828
|
})
|
|
2783
2829
|
);
|
|
@@ -2785,11 +2831,11 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2785
2831
|
const legacyMetadata = await readMetadata();
|
|
2786
2832
|
if (tracing) {
|
|
2787
2833
|
submissionStartedAt = performance.now();
|
|
2788
|
-
|
|
2834
|
+
_chunkWOCHZCUJjs.recordCliTrace.call(void 0, { phase: "cli.tool_execute_request_start" });
|
|
2789
2835
|
}
|
|
2790
2836
|
return client.executeTool(parsed.toolId, parsed.params, {
|
|
2791
2837
|
...executeOptions,
|
|
2792
|
-
..._optionalChain([legacyMetadata, 'access',
|
|
2838
|
+
..._optionalChain([legacyMetadata, 'access', _52 => _52.executionMetadata, 'optionalAccess', _53 => _53.retrySafeTransientHttp]) === true ? { maxRetries: 2, retryApiErrors: true } : {}
|
|
2793
2839
|
});
|
|
2794
2840
|
}
|
|
2795
2841
|
}
|
|
@@ -2806,10 +2852,10 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2806
2852
|
compatibilityReadFailed = true;
|
|
2807
2853
|
}
|
|
2808
2854
|
metadata = _nullishCoalesce(deferredCompatibility.readMetadata(), () => ( metadata));
|
|
2809
|
-
const updateRequiredBeforeExecution = error instanceof
|
|
2855
|
+
const updateRequiredBeforeExecution = error instanceof _chunkLFQJW4S2js.DeeplineError && error.code === "SDK_UPDATE_REQUIRED";
|
|
2810
2856
|
if (updateRequiredBeforeExecution && maintenancePolicy !== "off" && compatibility && !compatibility.error) {
|
|
2811
|
-
const baseUrl =
|
|
2812
|
-
if (await
|
|
2857
|
+
const baseUrl = _chunkMLABYI4Mjs.resolveConfig.call(void 0, ).baseUrl;
|
|
2858
|
+
if (await _chunkY6SP3JMIjs.maybeAutoUpdateAndRelaunch.call(void 0,
|
|
2813
2859
|
compatibility.response,
|
|
2814
2860
|
baseUrl,
|
|
2815
2861
|
maintenancePolicy
|
|
@@ -2818,29 +2864,29 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2818
2864
|
}
|
|
2819
2865
|
}
|
|
2820
2866
|
}
|
|
2821
|
-
if (error instanceof
|
|
2867
|
+
if (error instanceof _chunkLFQJW4S2js.DeeplineError && error.code === "SDK_UPDATE_REQUIRED")
|
|
2822
2868
|
throw error;
|
|
2823
2869
|
let failure = error;
|
|
2824
|
-
if (!(failure instanceof
|
|
2825
|
-
const warningPreflightWasAvailable = !deferredCompatibility || !compatibilityReadFailed && !_optionalChain([compatibility, 'optionalAccess',
|
|
2870
|
+
if (!(failure instanceof _chunkLFQJW4S2js.DeeplineError) || failure.code !== "PLAY_ALIAS_USED_AS_TOOL") {
|
|
2871
|
+
const warningPreflightWasAvailable = !deferredCompatibility || !compatibilityReadFailed && !_optionalChain([compatibility, 'optionalAccess', _54 => _54.error]);
|
|
2826
2872
|
if (metadata || warningPreflightWasAvailable) {
|
|
2827
2873
|
try {
|
|
2828
2874
|
await readMetadata();
|
|
2829
2875
|
} catch (diagnosticError) {
|
|
2830
|
-
if (diagnosticError instanceof
|
|
2876
|
+
if (diagnosticError instanceof _chunkLFQJW4S2js.DeeplineError && diagnosticError.code === "PLAY_ALIAS_USED_AS_TOOL")
|
|
2831
2877
|
failure = diagnosticError;
|
|
2832
2878
|
}
|
|
2833
2879
|
}
|
|
2834
2880
|
}
|
|
2835
|
-
if (failure instanceof
|
|
2836
|
-
if (wantsJson)
|
|
2881
|
+
if (failure instanceof _chunkLFQJW4S2js.DeeplineError && failure.code === "PLAY_ALIAS_USED_AS_TOOL") {
|
|
2882
|
+
if (wantsJson) _chunkXLIHTJVMjs.printJsonError.call(void 0, failure);
|
|
2837
2883
|
else console.error(failure.message);
|
|
2838
2884
|
return 2;
|
|
2839
2885
|
}
|
|
2840
|
-
const guidanceLines = toolGuidanceLines(_optionalChain([metadata, 'optionalAccess',
|
|
2886
|
+
const guidanceLines = toolGuidanceLines(_optionalChain([metadata, 'optionalAccess', _55 => _55.guidance]));
|
|
2841
2887
|
if (guidanceLines.length > 0) {
|
|
2842
2888
|
if (wantsJson && failure instanceof Error) {
|
|
2843
|
-
Object.assign(failure, { guidance: _optionalChain([metadata, 'optionalAccess',
|
|
2889
|
+
Object.assign(failure, { guidance: _optionalChain([metadata, 'optionalAccess', _56 => _56.guidance]) });
|
|
2844
2890
|
} else {
|
|
2845
2891
|
console.error(
|
|
2846
2892
|
[`Guidance for ${parsed.toolId}:`, ...guidanceLines].join("\n")
|
|
@@ -2856,17 +2902,17 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2856
2902
|
} catch (e4) {
|
|
2857
2903
|
}
|
|
2858
2904
|
metadata = _nullishCoalesce(deferredCompatibility.readMetadata(), () => ( metadata));
|
|
2859
|
-
const compatibilityResponse = _optionalChain([compatibility, 'optionalAccess',
|
|
2905
|
+
const compatibilityResponse = _optionalChain([compatibility, 'optionalAccess', _57 => _57.response]);
|
|
2860
2906
|
successfulCompatibilityResponse = _nullishCoalesce(compatibilityResponse, () => ( void 0));
|
|
2861
|
-
const autoUpdate = _optionalChain([compatibilityResponse, 'optionalAccess',
|
|
2862
|
-
if (maintenancePolicy !== "off" && compatibilityResponse && _optionalChain([autoUpdate, 'optionalAccess',
|
|
2863
|
-
await
|
|
2907
|
+
const autoUpdate = _optionalChain([compatibilityResponse, 'optionalAccess', _58 => _58.auto_update]);
|
|
2908
|
+
if (maintenancePolicy !== "off" && compatibilityResponse && _optionalChain([autoUpdate, 'optionalAccess', _59 => _59.should_auto_update]) && !autoUpdate.required && autoUpdate.reason !== "rollback_forced") {
|
|
2909
|
+
await _chunkY6SP3JMIjs.maybeAutoUpdateAndRelaunch.call(void 0,
|
|
2864
2910
|
compatibilityResponse,
|
|
2865
|
-
|
|
2911
|
+
_chunkMLABYI4Mjs.resolveConfig.call(void 0, ).baseUrl,
|
|
2866
2912
|
maintenancePolicy
|
|
2867
2913
|
);
|
|
2868
2914
|
}
|
|
2869
|
-
if (!metadata && !_optionalChain([compatibility, 'optionalAccess',
|
|
2915
|
+
if (!metadata && !_optionalChain([compatibility, 'optionalAccess', _60 => _60.error])) {
|
|
2870
2916
|
try {
|
|
2871
2917
|
metadata = await readMetadata();
|
|
2872
2918
|
} catch (e5) {
|
|
@@ -2880,8 +2926,8 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2880
2926
|
);
|
|
2881
2927
|
}
|
|
2882
2928
|
}
|
|
2883
|
-
const responseMetadata =
|
|
2884
|
-
|
|
2929
|
+
const responseMetadata = _chunkHVI55MTKjs.recordField.call(void 0,
|
|
2930
|
+
_chunkHVI55MTKjs.recordField.call(void 0, rawResponse, "_metadata"),
|
|
2885
2931
|
"tool"
|
|
2886
2932
|
);
|
|
2887
2933
|
const listOutputPaths = responseMetadata.listOutputPaths;
|
|
@@ -2893,11 +2939,11 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2893
2939
|
await readMetadata()
|
|
2894
2940
|
);
|
|
2895
2941
|
}
|
|
2896
|
-
if (
|
|
2942
|
+
if (_chunkHVI55MTKjs.isRecord.call(void 0, rawResponse)) {
|
|
2897
2943
|
const { _metadata, ...execution } = rawResponse;
|
|
2898
2944
|
rawResponse = execution;
|
|
2899
2945
|
}
|
|
2900
|
-
const { listConversion, summary, baseEnvelope } = await
|
|
2946
|
+
const { listConversion, summary, baseEnvelope } = await _chunkY6SP3JMIjs.runToolExecuteStage.call(void 0,
|
|
2901
2947
|
"result formatting",
|
|
2902
2948
|
async () => {
|
|
2903
2949
|
const listConversion2 = _chunkHGFFYVXNjs.tryConvertToList.call(void 0, rawResponse, {
|
|
@@ -2917,7 +2963,7 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2917
2963
|
rawResponse,
|
|
2918
2964
|
listConversion: listConversion2,
|
|
2919
2965
|
summary: summary2,
|
|
2920
|
-
guidance: _optionalChain([metadata, 'optionalAccess',
|
|
2966
|
+
guidance: _optionalChain([metadata, 'optionalAccess', _61 => _61.guidance]),
|
|
2921
2967
|
listExpected: listExtractorPaths.length > 0
|
|
2922
2968
|
});
|
|
2923
2969
|
return { listConversion: listConversion2, summary: summary2, baseEnvelope: baseEnvelope2 };
|
|
@@ -2932,9 +2978,9 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2932
2978
|
}
|
|
2933
2979
|
skillsSyncAttempted = true;
|
|
2934
2980
|
try {
|
|
2935
|
-
await
|
|
2981
|
+
await _chunkY6SP3JMIjs.runToolExecuteStage.call(void 0,
|
|
2936
2982
|
"agent skills sync",
|
|
2937
|
-
() =>
|
|
2983
|
+
() => _chunk2B5B5KAWjs.syncSdkSkillsIfNeeded.call(void 0, _chunkMLABYI4Mjs.resolveConfig.call(void 0, ).baseUrl, {
|
|
2938
2984
|
update: deliveredCompatibilityResponse.skills,
|
|
2939
2985
|
mode: "detached"
|
|
2940
2986
|
})
|
|
@@ -2945,15 +2991,15 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2945
2991
|
);
|
|
2946
2992
|
}
|
|
2947
2993
|
};
|
|
2948
|
-
const printDeliveredEnvelope = (envelope, options2 = {}) =>
|
|
2994
|
+
const printDeliveredEnvelope = (envelope, options2 = {}) => _chunkXLIHTJVMjs.printCommandEnvelope.call(void 0, envelope, {
|
|
2949
2995
|
...options2,
|
|
2950
2996
|
json: _nullishCoalesce(options2.json, () => ( wantsJson))
|
|
2951
2997
|
});
|
|
2952
2998
|
const printDeliveredJsonEnvelope = async (envelope, options2 = {}) => {
|
|
2953
2999
|
await syncSkillsForDeliveredOutput();
|
|
2954
|
-
|
|
3000
|
+
_chunkXLIHTJVMjs.printCommandEnvelope.call(void 0, envelope, { ...options2, json: true });
|
|
2955
3001
|
};
|
|
2956
|
-
const delivered = await
|
|
3002
|
+
const delivered = await _chunkY6SP3JMIjs.runToolExecuteStage.call(void 0, "output delivery", async () => {
|
|
2957
3003
|
if (!parsed.outPath && (parsed.outputFormat === "json" || parsed.outputFormat === "auto" && wantsJson)) {
|
|
2958
3004
|
await printDeliveredJsonEnvelope(baseEnvelope);
|
|
2959
3005
|
return true;
|
|
@@ -2966,7 +3012,7 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2966
3012
|
await printDeliveredJsonEnvelope({
|
|
2967
3013
|
...baseEnvelope,
|
|
2968
3014
|
local: {
|
|
2969
|
-
...
|
|
3015
|
+
..._chunkHVI55MTKjs.isRecord.call(void 0, baseEnvelope.local) ? baseEnvelope.local : {},
|
|
2970
3016
|
payload_file: jsonPath
|
|
2971
3017
|
}
|
|
2972
3018
|
});
|
|
@@ -2982,7 +3028,7 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2982
3028
|
`${parsed.toolId} did not expose row-shaped output to write as CSV. ${inspection.inspectDescription} Run: ${inspection.inspect}`
|
|
2983
3029
|
);
|
|
2984
3030
|
if (wantsJson) {
|
|
2985
|
-
|
|
3031
|
+
_chunkXLIHTJVMjs.printJsonError.call(void 0, error);
|
|
2986
3032
|
} else {
|
|
2987
3033
|
console.error(error.message);
|
|
2988
3034
|
}
|
|
@@ -3077,14 +3123,14 @@ inspect: ${inspection.inspect}
|
|
|
3077
3123
|
return true;
|
|
3078
3124
|
});
|
|
3079
3125
|
if (delivered) {
|
|
3080
|
-
await
|
|
3126
|
+
await _chunkY6SP3JMIjs.runToolExecuteStage.call(void 0,
|
|
3081
3127
|
"acknowledge delivery",
|
|
3082
3128
|
() => recovery.acknowledgeDelivery()
|
|
3083
3129
|
);
|
|
3084
3130
|
}
|
|
3085
3131
|
if (delivered && deliveredCompatibilityResponse && deliveredCompatibilityResponse.update_required !== true) {
|
|
3086
|
-
|
|
3087
|
-
quietAdvisory: wantsJson || maintenancePolicy === "off" || _optionalChain([deliveredCompatibilityResponse, 'access',
|
|
3132
|
+
_chunk2B5B5KAWjs.enforceSdkCompatibilityResponse.call(void 0, deliveredCompatibilityResponse, {
|
|
3133
|
+
quietAdvisory: wantsJson || maintenancePolicy === "off" || _optionalChain([deliveredCompatibilityResponse, 'access', _62 => _62.auto_update, 'optionalAccess', _63 => _63.should_auto_update]) === true
|
|
3088
3134
|
});
|
|
3089
3135
|
}
|
|
3090
3136
|
if (delivered && !skillsSyncAttempted) await syncSkillsForDeliveredOutput();
|