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
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkXNYIZMNQjs = require('./chunk-XNYIZMNQ.js');
|
|
5
5
|
|
|
6
6
|
|
|
7
|
+
var _chunkLFQJW4S2js = require('./chunk-LFQJW4S2.js');
|
|
7
8
|
|
|
8
|
-
var _chunkXNYIZMNQjs = require('./chunk-XNYIZMNQ.js');
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
var
|
|
11
|
+
var _chunkCFJFUVX2js = require('./chunk-CFJFUVX2.js');
|
|
12
12
|
|
|
13
13
|
// ../play-data-plane/column-names.ts
|
|
14
14
|
var POSTGRES_IDENTIFIER_MAX_BYTES = 63;
|
|
@@ -164,7 +164,7 @@ async function awaitWithAbort(value, signal) {
|
|
|
164
164
|
removeAbortListener();
|
|
165
165
|
}
|
|
166
166
|
}
|
|
167
|
-
var CliPlayAdmissionUnsupportedError = class extends
|
|
167
|
+
var CliPlayAdmissionUnsupportedError = class extends _chunkLFQJW4S2js.DeeplineError {
|
|
168
168
|
constructor(status) {
|
|
169
169
|
super(
|
|
170
170
|
"This server does not support CLI Play admission.",
|
|
@@ -173,7 +173,7 @@ var CliPlayAdmissionUnsupportedError = class extends _chunkBBTKAASQjs.DeeplineEr
|
|
|
173
173
|
);
|
|
174
174
|
}
|
|
175
175
|
};
|
|
176
|
-
var CliPlayAdmissionCallerIntentV2UnsupportedError = class extends
|
|
176
|
+
var CliPlayAdmissionCallerIntentV2UnsupportedError = class extends _chunkLFQJW4S2js.DeeplineError {
|
|
177
177
|
constructor(status) {
|
|
178
178
|
super(
|
|
179
179
|
"This server does not support versioned CLI Play admission.",
|
|
@@ -231,7 +231,7 @@ async function preparePlayRunAdmission(http, request, onSubmission, options) {
|
|
|
231
231
|
};
|
|
232
232
|
const callerIntentV2 = _optionalChain([options, 'optionalAccess', _15 => _15.callerIntentV2]) === true;
|
|
233
233
|
if (callerIntentV2 && (onSubmission || request.maxTotalCredits !== void 0)) {
|
|
234
|
-
throw new (0,
|
|
234
|
+
throw new (0, _chunkLFQJW4S2js.DeeplineError)(
|
|
235
235
|
"Versioned CLI Play admission requires a new, unjournaled run without a strict total budget.",
|
|
236
236
|
409,
|
|
237
237
|
"CLI_PLAY_CALLER_INTENT_V2_INELIGIBLE"
|
|
@@ -242,14 +242,14 @@ async function preparePlayRunAdmission(http, request, onSubmission, options) {
|
|
|
242
242
|
const supportsCallerIntent = callerIntentV2 || _optionalChain([capability, 'optionalAccess', _16 => _16.admissionContract]) === "caller-intent-v1";
|
|
243
243
|
assertAdmissionActive();
|
|
244
244
|
if (supportsCallerIntent && !callerIntentV2 && (!_optionalChain([capability, 'optionalAccess', _17 => _17.orgId]) || request.admissionOrgId && request.admissionOrgId !== capability.orgId)) {
|
|
245
|
-
throw new (0,
|
|
246
|
-
"The admission
|
|
245
|
+
throw new (0, _chunkLFQJW4S2js.DeeplineError)(
|
|
246
|
+
"The admission org could not be pinned to this request; execution was not submitted.",
|
|
247
247
|
409,
|
|
248
248
|
"PLAY_RUN_ADMISSION_TENANT_CONFLICT"
|
|
249
249
|
);
|
|
250
250
|
}
|
|
251
251
|
if (request.workflowId && !supportsCallerIntent) {
|
|
252
|
-
throw new (0,
|
|
252
|
+
throw new (0, _chunkLFQJW4S2js.DeeplineError)(
|
|
253
253
|
"This server has not enabled caller-owned admission recovery. Do not retry an ambiguous start.",
|
|
254
254
|
409,
|
|
255
255
|
"PLAY_RUN_ADMISSION_RECOVERY_UNSUPPORTED"
|
|
@@ -257,20 +257,20 @@ async function preparePlayRunAdmission(http, request, onSubmission, options) {
|
|
|
257
257
|
}
|
|
258
258
|
if (request.maxTotalCredits !== void 0 && _optionalChain([capability, 'optionalAccess', _18 => _18.strictTotalBudget]) === "unbounded-v1") {
|
|
259
259
|
if (request.maxTotalCredits === 0) {
|
|
260
|
-
throw new (0,
|
|
260
|
+
throw new (0, _chunkLFQJW4S2js.DeeplineError)(
|
|
261
261
|
"A zero-credit total budget cannot admit a Play: sandbox compute is billed even when provider tools are free.",
|
|
262
262
|
422,
|
|
263
263
|
"PLAY_TOTAL_BUDGET_COMPUTE_REQUIRED"
|
|
264
264
|
);
|
|
265
265
|
}
|
|
266
|
-
throw new (0,
|
|
266
|
+
throw new (0, _chunkLFQJW4S2js.DeeplineError)(
|
|
267
267
|
"A strict total Play budget cannot currently be admitted: provider operations, Customer DB compute, and additional sandbox sessions do not have a finite admitted upper bound.",
|
|
268
268
|
422,
|
|
269
269
|
"PLAY_TOTAL_BUDGET_UNBOUNDED"
|
|
270
270
|
);
|
|
271
271
|
}
|
|
272
272
|
if (request.maxTotalCredits !== void 0 && _optionalChain([capability, 'optionalAccess', _19 => _19.strictTotalBudget]) !== "fail-closed-v1") {
|
|
273
|
-
throw new (0,
|
|
273
|
+
throw new (0, _chunkLFQJW4S2js.DeeplineError)(
|
|
274
274
|
"This server cannot honor a strict total Play budget. Execution was not submitted.",
|
|
275
275
|
409,
|
|
276
276
|
"PLAY_TOTAL_BUDGET_UNSUPPORTED"
|
|
@@ -284,10 +284,10 @@ async function preparePlayRunAdmission(http, request, onSubmission, options) {
|
|
|
284
284
|
})
|
|
285
285
|
)
|
|
286
286
|
);
|
|
287
|
-
const workflowId = supportsCallerIntent ? _nullishCoalesce(request.workflowId, () => (
|
|
287
|
+
const workflowId = supportsCallerIntent ? _nullishCoalesce(request.workflowId, () => ( _chunkCFJFUVX2js.buildCallerPlayWorkflowId.call(void 0, _nullishCoalesce(request.name, () => ( "play")), wireBody))) : void 0;
|
|
288
288
|
const submittedBody = workflowId ? { workflowId, ...wireBody } : wireBody;
|
|
289
|
-
if (workflowId && !
|
|
290
|
-
throw new (0,
|
|
289
|
+
if (workflowId && !_chunkCFJFUVX2js.callerPlayWorkflowIdMatchesRequest.call(void 0, workflowId, submittedBody)) {
|
|
290
|
+
throw new (0, _chunkLFQJW4S2js.DeeplineError)(
|
|
291
291
|
"workflowId must be the caller run ID of this same immutable request.",
|
|
292
292
|
400,
|
|
293
293
|
"PLAY_RUN_START_INTENT_CONFLICT"
|
|
@@ -295,7 +295,7 @@ async function preparePlayRunAdmission(http, request, onSubmission, options) {
|
|
|
295
295
|
}
|
|
296
296
|
if (onSubmission) {
|
|
297
297
|
if (!workflowId || !_optionalChain([capability, 'optionalAccess', _20 => _20.orgId])) {
|
|
298
|
-
throw new (0,
|
|
298
|
+
throw new (0, _chunkLFQJW4S2js.DeeplineError)(
|
|
299
299
|
"This server cannot persist a recoverable submission intent. Execution was not submitted.",
|
|
300
300
|
409,
|
|
301
301
|
"PLAY_RUN_ADMISSION_RECOVERY_UNSUPPORTED"
|
|
@@ -319,14 +319,14 @@ async function readPlayRunAdmissionCapability(http, options) {
|
|
|
319
319
|
options
|
|
320
320
|
);
|
|
321
321
|
} catch (error) {
|
|
322
|
-
if (!(error instanceof
|
|
322
|
+
if (!(error instanceof _chunkLFQJW4S2js.DeeplineError) || ![404, 405].includes(_nullishCoalesce(error.statusCode, () => ( 0)))) {
|
|
323
323
|
throw error;
|
|
324
324
|
}
|
|
325
325
|
}
|
|
326
326
|
if (capability && !["caller-intent-v1", "unsupported"].includes(
|
|
327
327
|
_nullishCoalesce(capability.admissionContract, () => ( ""))
|
|
328
328
|
)) {
|
|
329
|
-
throw new (0,
|
|
329
|
+
throw new (0, _chunkLFQJW4S2js.DeeplineError)(
|
|
330
330
|
"The server admission capability response is unknown; execution was not submitted.",
|
|
331
331
|
503,
|
|
332
332
|
"PLAY_RUN_ADMISSION_CAPABILITY_UNKNOWN"
|
|
@@ -379,22 +379,22 @@ async function submitPreparedPlayRunAdmission(http, submittedBody, workflowId, s
|
|
|
379
379
|
}
|
|
380
380
|
);
|
|
381
381
|
} catch (error) {
|
|
382
|
-
if (_optionalChain([options, 'optionalAccess', _27 => _27.callerIntentV2]) && !callerIntentV2Supported && error instanceof
|
|
382
|
+
if (_optionalChain([options, 'optionalAccess', _27 => _27.callerIntentV2]) && !callerIntentV2Supported && error instanceof _chunkLFQJW4S2js.DeeplineError && (error.statusCode === 404 || error.statusCode === 405)) {
|
|
383
383
|
throw new CliPlayAdmissionCallerIntentV2UnsupportedError(
|
|
384
384
|
error.statusCode
|
|
385
385
|
);
|
|
386
386
|
}
|
|
387
|
-
if (_optionalChain([options, 'optionalAccess', _28 => _28.cliAdmission]) && !cliAdmissionSupported && error instanceof
|
|
387
|
+
if (_optionalChain([options, 'optionalAccess', _28 => _28.cliAdmission]) && !cliAdmissionSupported && error instanceof _chunkLFQJW4S2js.DeeplineError && (error.statusCode === 404 || error.statusCode === 405)) {
|
|
388
388
|
throw new CliPlayAdmissionUnsupportedError(error.statusCode);
|
|
389
389
|
}
|
|
390
|
-
if (error instanceof
|
|
390
|
+
if (error instanceof _chunkLFQJW4S2js.DeeplineError && ["NETWORK_TIMEOUT", "NETWORK_ERROR", "FETCH_FAILED"].includes(
|
|
391
391
|
_nullishCoalesce(error.code, () => ( ""))
|
|
392
392
|
) || error instanceof TypeError || error instanceof Error && ["AbortError", "TimeoutError"].includes(error.name)) {
|
|
393
393
|
const originalMessage = error instanceof Error ? error.message : "Transport failed";
|
|
394
|
-
const failure = new (0,
|
|
394
|
+
const failure = new (0, _chunkLFQJW4S2js.DeeplineError)(
|
|
395
395
|
workflowId ? `${originalMessage} Admission outcome is unknown for ${workflowId}. Inspect this run before retrying; reuse this workflowId for the same immutable request.` : `${originalMessage} Admission outcome is unknown. This server did not prove caller-owned recovery support; inspect existing runs before starting again.`,
|
|
396
|
-
error instanceof
|
|
397
|
-
error instanceof
|
|
396
|
+
error instanceof _chunkLFQJW4S2js.DeeplineError ? error.statusCode : void 0,
|
|
397
|
+
error instanceof _chunkLFQJW4S2js.DeeplineError ? error.code : "NETWORK_ERROR",
|
|
398
398
|
{
|
|
399
399
|
...workflowId ? { runId: workflowId, workflowId } : {},
|
|
400
400
|
admissionState: "unknown",
|
|
@@ -410,7 +410,7 @@ async function submitPreparedPlayRunAdmission(http, submittedBody, workflowId, s
|
|
|
410
410
|
throw error;
|
|
411
411
|
}
|
|
412
412
|
if (_optionalChain([options, 'optionalAccess', _29 => _29.callerIntentV2]) && !callerIntentV2Supported) {
|
|
413
|
-
throw new (0,
|
|
413
|
+
throw new (0, _chunkLFQJW4S2js.DeeplineError)(
|
|
414
414
|
"The versioned CLI Play admission response did not prove its contract. Inspect this run before submitting again.",
|
|
415
415
|
void 0,
|
|
416
416
|
"PLAY_RUN_ADMISSION_CONTRACT_UNKNOWN",
|
|
@@ -423,7 +423,7 @@ async function submitPreparedPlayRunAdmission(http, submittedBody, workflowId, s
|
|
|
423
423
|
}
|
|
424
424
|
const started = normalizePlayRunStart(response);
|
|
425
425
|
if (_optionalChain([options, 'optionalAccess', _30 => _30.cliAdmission]) && (!started.workflowId || started.workflowId === "pending")) {
|
|
426
|
-
throw new (0,
|
|
426
|
+
throw new (0, _chunkLFQJW4S2js.DeeplineError)(
|
|
427
427
|
"Play admission returned no run id. Check recent runs before submitting again.",
|
|
428
428
|
void 0,
|
|
429
429
|
"PLAY_START_MISSING_RUN_ID"
|
|
@@ -578,10 +578,10 @@ function stagedUploadIdentity(logicalPath, contentHash) {
|
|
|
578
578
|
return `${contentHash}:${logicalPath}`;
|
|
579
579
|
}
|
|
580
580
|
function isStagedUploadMintUnsupported(error) {
|
|
581
|
-
return error instanceof
|
|
581
|
+
return error instanceof _chunkLFQJW4S2js.DeeplineError && error.statusCode === 404;
|
|
582
582
|
}
|
|
583
583
|
function isStagedUploadDirectEgressDenied(error) {
|
|
584
|
-
return error instanceof
|
|
584
|
+
return error instanceof _chunkLFQJW4S2js.DeeplineError && error.code === "STAGED_FILE_UPLOAD_EGRESS_DENIED";
|
|
585
585
|
}
|
|
586
586
|
function formatMegabytes(bytes) {
|
|
587
587
|
return `${(bytes / (1024 * 1024)).toFixed(1)} MB`;
|
|
@@ -612,7 +612,7 @@ async function uploadStagedFileToPresignedUrl(input) {
|
|
|
612
612
|
}
|
|
613
613
|
const text = await response.text().catch(() => "");
|
|
614
614
|
const egressDenied = response.status === 403 && _optionalChain([response, 'access', _35 => _35.headers, 'access', _36 => _36.get, 'call', _37 => _37("x-deny-reason"), 'optionalAccess', _38 => _38.trim, 'call', _39 => _39(), 'access', _40 => _40.toLowerCase, 'call', _41 => _41()]) === "host_not_allowed";
|
|
615
|
-
lastError = new (0,
|
|
615
|
+
lastError = new (0, _chunkLFQJW4S2js.DeeplineError)(
|
|
616
616
|
`Direct storage upload of ${input.logicalPath} failed: ${response.status} ${text.slice(0, 200)}`,
|
|
617
617
|
response.status,
|
|
618
618
|
egressDenied ? "STAGED_FILE_UPLOAD_EGRESS_DENIED" : "STAGED_FILE_UPLOAD_FAILED",
|
|
@@ -622,7 +622,7 @@ async function uploadStagedFileToPresignedUrl(input) {
|
|
|
622
622
|
break;
|
|
623
623
|
}
|
|
624
624
|
} catch (error) {
|
|
625
|
-
lastError = error instanceof TypeError ? new (0,
|
|
625
|
+
lastError = error instanceof TypeError ? new (0, _chunkLFQJW4S2js.DeeplineError)(
|
|
626
626
|
`Direct storage upload of ${input.logicalPath} could not reach the storage endpoint: ${error.message}`,
|
|
627
627
|
void 0,
|
|
628
628
|
"STAGED_FILE_UPLOAD_EGRESS_DENIED",
|
|
@@ -633,7 +633,7 @@ async function uploadStagedFileToPresignedUrl(input) {
|
|
|
633
633
|
await sleep(250 * attempt);
|
|
634
634
|
}
|
|
635
635
|
}
|
|
636
|
-
throw lastError instanceof Error ? lastError : new (0,
|
|
636
|
+
throw lastError instanceof Error ? lastError : new (0, _chunkLFQJW4S2js.DeeplineError)(
|
|
637
637
|
`Direct storage upload of ${input.logicalPath} failed.`,
|
|
638
638
|
void 0,
|
|
639
639
|
"STAGED_FILE_UPLOAD_FAILED",
|
|
@@ -648,7 +648,7 @@ async function stagePlayFilesViaMultipart(http, files, reason = "mint-unsupporte
|
|
|
648
648
|
for (const file of files) {
|
|
649
649
|
if (file.bytes > STAGE_LEGACY_MULTIPART_MAX_BYTES) {
|
|
650
650
|
const reasonMessage = reason === "direct-egress-denied" ? "direct storage is blocked by this environment's network egress policy" : "the connected Deepline server does not support direct-to-storage uploads";
|
|
651
|
-
throw new (0,
|
|
651
|
+
throw new (0, _chunkLFQJW4S2js.DeeplineError)(
|
|
652
652
|
`Cannot stage ${file.logicalPath} (${formatMegabytes(file.bytes)}): ${reasonMessage}, and this file exceeds the ~4.5MB request-body limit the legacy upload path is subject to.`,
|
|
653
653
|
413,
|
|
654
654
|
"STAGED_FILE_TOO_LARGE_FOR_LEGACY_UPLOAD",
|
|
@@ -722,7 +722,7 @@ async function stagePlayFiles(http, files) {
|
|
|
722
722
|
stagedUploadIdentity(file.logicalPath, file.contentHash)
|
|
723
723
|
);
|
|
724
724
|
if (!upload) {
|
|
725
|
-
throw new (0,
|
|
725
|
+
throw new (0, _chunkLFQJW4S2js.DeeplineError)(
|
|
726
726
|
`The staging server did not return an upload target for ${file.logicalPath}.`,
|
|
727
727
|
void 0,
|
|
728
728
|
"STAGED_FILE_MINT_INCOMPLETE"
|
|
@@ -758,7 +758,7 @@ async function stagePlayFiles(http, files) {
|
|
|
758
758
|
"direct-egress-denied"
|
|
759
759
|
);
|
|
760
760
|
if (!ref) {
|
|
761
|
-
throw new (0,
|
|
761
|
+
throw new (0, _chunkLFQJW4S2js.DeeplineError)(
|
|
762
762
|
`The staging server did not return an upload target for ${result.fallbackFile.logicalPath}.`,
|
|
763
763
|
void 0,
|
|
764
764
|
"STAGED_FILE_MINT_INCOMPLETE"
|
|
@@ -826,7 +826,7 @@ function createSessionPlayRunHttp(fetchImpl = (...args) => fetch(...args)) {
|
|
|
826
826
|
} catch (e) {
|
|
827
827
|
}
|
|
828
828
|
if (!response.ok) {
|
|
829
|
-
throw new (0,
|
|
829
|
+
throw new (0, _chunkLFQJW4S2js.DeeplineError)(
|
|
830
830
|
_chunkXNYIZMNQjs.apiErrorMessage.call(void 0, parsed, response.status),
|
|
831
831
|
response.status,
|
|
832
832
|
_chunkXNYIZMNQjs.apiErrorCodeFromResponse.call(void 0, parsed),
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkAGLR6QVNjs = require('./chunk-AGLR6QVN.js');
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunk6VLFQZK6js = require('./chunk-6VLFQZK6.js');
|
|
8
8
|
|
|
9
9
|
// src/config.ts
|
|
10
10
|
|
|
@@ -23,9 +23,21 @@ var API_KEY_ENV = "DEEPLINE_API_KEY";
|
|
|
23
23
|
var ACTIVE_ORG_ID_ENV = "DEEPLINE_ACTIVE_ORG_ID";
|
|
24
24
|
var ACTIVE_ORG_NAME_ENV = "DEEPLINE_ACTIVE_ORG_NAME";
|
|
25
25
|
var FEATURES_ENV = "DEEPLINE_FEATURES";
|
|
26
|
+
var WORKSPACE_ID_ENV = "DEEPLINE_WORKSPACE_ID";
|
|
26
27
|
var PROD_URL = "https://code.deepline.com";
|
|
27
28
|
var DEFAULT_TIMEOUT = 6e4;
|
|
28
29
|
var DEFAULT_MAX_RETRIES = 3;
|
|
30
|
+
var TRANSIENT_HTTP_STATUSES = /* @__PURE__ */ new Set([
|
|
31
|
+
408,
|
|
32
|
+
425,
|
|
33
|
+
429,
|
|
34
|
+
502,
|
|
35
|
+
503,
|
|
36
|
+
504
|
|
37
|
+
]);
|
|
38
|
+
function defaultRetryBackoffMs(retry) {
|
|
39
|
+
return Math.min(1e3 * 2 ** (retry - 1), 3e4);
|
|
40
|
+
}
|
|
29
41
|
var PROJECT_DEEPLINE_ENV_FILE = ".env.deepline";
|
|
30
42
|
var COWORK_IGNORED_WORKSPACE_DIRS = /* @__PURE__ */ new Set([
|
|
31
43
|
".auto-memory",
|
|
@@ -48,7 +60,8 @@ var CLI_ENV_ALLOWED_KEYS = /* @__PURE__ */ new Set([
|
|
|
48
60
|
API_KEY_ENV,
|
|
49
61
|
ACTIVE_ORG_ID_ENV,
|
|
50
62
|
ACTIVE_ORG_NAME_ENV,
|
|
51
|
-
FEATURES_ENV
|
|
63
|
+
FEATURES_ENV,
|
|
64
|
+
WORKSPACE_ID_ENV
|
|
52
65
|
]);
|
|
53
66
|
function featureEnvValues(data) {
|
|
54
67
|
if (!Array.isArray(data.features)) return {};
|
|
@@ -281,6 +294,10 @@ function mergePersistedEnvValues(existing, values) {
|
|
|
281
294
|
delete merged[ACTIVE_ORG_ID_ENV];
|
|
282
295
|
delete merged[ACTIVE_ORG_NAME_ENV];
|
|
283
296
|
delete merged[FEATURES_ENV];
|
|
297
|
+
delete merged[WORKSPACE_ID_ENV];
|
|
298
|
+
}
|
|
299
|
+
if (values[WORKSPACE_ID_ENV] === void 0 && values[ACTIVE_ORG_ID_ENV] !== void 0 && values[ACTIVE_ORG_ID_ENV] !== existing[ACTIVE_ORG_ID_ENV]) {
|
|
300
|
+
delete merged[WORKSPACE_ID_ENV];
|
|
284
301
|
}
|
|
285
302
|
if (values[FEATURES_ENV] === "") {
|
|
286
303
|
delete merged[FEATURES_ENV];
|
|
@@ -382,36 +399,79 @@ function resolveBaseUrlOnly(options) {
|
|
|
382
399
|
_optionalChain([options, 'optionalAccess', _36 => _36.baseUrl, 'optionalAccess', _37 => _37.trim, 'call', _38 => _38()]) || autoDetectBaseUrl()
|
|
383
400
|
);
|
|
384
401
|
if (!baseUrl) {
|
|
385
|
-
throw new (0,
|
|
402
|
+
throw new (0, _chunk6VLFQZK6js.ConfigError)(
|
|
386
403
|
`Invalid ${HOST_URL_ENV}. Expected an http(s) URL such as https://code.deepline.com.`
|
|
387
404
|
);
|
|
388
405
|
}
|
|
389
406
|
return baseUrl;
|
|
390
407
|
}
|
|
408
|
+
function resolveCredentialEnvFile(config, startDir = process.cwd()) {
|
|
409
|
+
const apiKey = config.apiKey.trim();
|
|
410
|
+
if (!apiKey || _optionalChain([process, 'access', _39 => _39.env, 'access', _40 => _40[API_KEY_ENV], 'optionalAccess', _41 => _41.trim, 'call', _42 => _42()])) return null;
|
|
411
|
+
const folder = getResolvedProjectAuthSource(config.baseUrl, apiKey, startDir);
|
|
412
|
+
if (folder) {
|
|
413
|
+
return { scope: "folder", filePath: folder.filePath, env: folder.env };
|
|
414
|
+
}
|
|
415
|
+
const filePath = sdkCliEnvFilePath(config.baseUrl);
|
|
416
|
+
const env = parseEnvFile(filePath);
|
|
417
|
+
return (_nullishCoalesce(env[API_KEY_ENV], () => ( ""))).trim() === apiKey ? { scope: "global", filePath, env } : null;
|
|
418
|
+
}
|
|
419
|
+
function resolveCliWorkspace(config, explicitWorkspace) {
|
|
420
|
+
const option = _optionalChain([explicitWorkspace, 'optionalAccess', _43 => _43.trim, 'call', _44 => _44()]);
|
|
421
|
+
if (option) return { workspaceId: option, source: "option" };
|
|
422
|
+
const env = _optionalChain([process, 'access', _45 => _45.env, 'access', _46 => _46[WORKSPACE_ID_ENV], 'optionalAccess', _47 => _47.trim, 'call', _48 => _48()]);
|
|
423
|
+
if (env) return { workspaceId: env, source: "env" };
|
|
424
|
+
const saved = _optionalChain([resolveCredentialEnvFile, 'call', _49 => _49(config), 'optionalAccess', _50 => _50.env, 'access', _51 => _51[WORKSPACE_ID_ENV], 'optionalAccess', _52 => _52.trim, 'call', _53 => _53()]);
|
|
425
|
+
if (saved) return { workspaceId: saved, source: "saved" };
|
|
426
|
+
return { workspaceId: null, source: "default" };
|
|
427
|
+
}
|
|
428
|
+
function saveCliWorkspace(config, workspaceId) {
|
|
429
|
+
const target = resolveCredentialEnvFile(config);
|
|
430
|
+
if (!target) {
|
|
431
|
+
throw new (0, _chunk6VLFQZK6js.ConfigError)(
|
|
432
|
+
`${API_KEY_ENV} comes from the environment, so there is no saved auth to add a workspace to. Set ${WORKSPACE_ID_ENV} for that invocation instead.`
|
|
433
|
+
);
|
|
434
|
+
}
|
|
435
|
+
const values = { [WORKSPACE_ID_ENV]: _nullishCoalesce(workspaceId, () => ( "")) };
|
|
436
|
+
if (target.scope === "folder") {
|
|
437
|
+
mergeProjectEnvFile(target.filePath, values);
|
|
438
|
+
} else {
|
|
439
|
+
saveHostEnvValues(config.baseUrl, values);
|
|
440
|
+
}
|
|
441
|
+
return { scope: target.scope, filePath: target.filePath };
|
|
442
|
+
}
|
|
443
|
+
function workspaceConfig(baseUrl, apiKey, explicitWorkspace) {
|
|
444
|
+
const { workspaceId } = resolveCliWorkspace(
|
|
445
|
+
{ baseUrl, apiKey },
|
|
446
|
+
explicitWorkspace
|
|
447
|
+
);
|
|
448
|
+
return workspaceId ? { workspace: workspaceId } : {};
|
|
449
|
+
}
|
|
391
450
|
function resolveConfig(options) {
|
|
392
451
|
const baseUrl = normalizeBaseUrl(
|
|
393
|
-
_optionalChain([options, 'optionalAccess',
|
|
452
|
+
_optionalChain([options, 'optionalAccess', _54 => _54.baseUrl, 'optionalAccess', _55 => _55.trim, 'call', _56 => _56()]) || autoDetectBaseUrl()
|
|
394
453
|
);
|
|
395
454
|
if (!baseUrl) {
|
|
396
|
-
throw new (0,
|
|
455
|
+
throw new (0, _chunk6VLFQZK6js.ConfigError)(
|
|
397
456
|
`Invalid ${HOST_URL_ENV}. Expected an http(s) URL such as https://code.deepline.com.`
|
|
398
457
|
);
|
|
399
458
|
}
|
|
400
|
-
const apiKey = resolveApiKeyForBaseUrl(baseUrl, _optionalChain([options, 'optionalAccess',
|
|
459
|
+
const apiKey = resolveApiKeyForBaseUrl(baseUrl, _optionalChain([options, 'optionalAccess', _57 => _57.apiKey]));
|
|
401
460
|
if (!apiKey) {
|
|
402
|
-
throw new (0,
|
|
461
|
+
throw new (0, _chunk6VLFQZK6js.ConfigError)(
|
|
403
462
|
`No API key found. Set ${API_KEY_ENV}, add it to .env.deepline, or run: deepline auth register`
|
|
404
463
|
);
|
|
405
464
|
}
|
|
406
465
|
return {
|
|
407
466
|
apiKey,
|
|
408
467
|
baseUrl,
|
|
409
|
-
timeout: _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
410
|
-
maxRetries: _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
468
|
+
timeout: _nullishCoalesce(_optionalChain([options, 'optionalAccess', _58 => _58.timeout]), () => ( DEFAULT_TIMEOUT)),
|
|
469
|
+
maxRetries: _nullishCoalesce(_optionalChain([options, 'optionalAccess', _59 => _59.maxRetries]), () => ( DEFAULT_MAX_RETRIES)),
|
|
470
|
+
...workspaceConfig(baseUrl, apiKey, _optionalChain([options, 'optionalAccess', _60 => _60.workspace])),
|
|
411
471
|
// Pass through untouched: the transport owns case-insensitive merging so
|
|
412
472
|
// there is exactly one place that decides which header wins.
|
|
413
|
-
..._optionalChain([options, 'optionalAccess',
|
|
414
|
-
..._optionalChain([options, 'optionalAccess',
|
|
473
|
+
..._optionalChain([options, 'optionalAccess', _61 => _61.headers]) ? { headers: { ...options.headers } } : {},
|
|
474
|
+
..._optionalChain([options, 'optionalAccess', _62 => _62.environment]) ? { environment: options.environment } : {}
|
|
415
475
|
};
|
|
416
476
|
}
|
|
417
477
|
function mergeProjectEnvFile(filePath, values) {
|
|
@@ -481,7 +541,7 @@ function findNearestGitCommonDir(startDir) {
|
|
|
481
541
|
const match = _fs.readFileSync.call(void 0, candidate, "utf8").match(
|
|
482
542
|
/^gitdir:\s*(.+)$/m
|
|
483
543
|
);
|
|
484
|
-
const rawGitDir = _optionalChain([match, 'optionalAccess',
|
|
544
|
+
const rawGitDir = _optionalChain([match, 'optionalAccess', _63 => _63[1], 'optionalAccess', _64 => _64.trim, 'call', _65 => _65()]);
|
|
485
545
|
if (rawGitDir) {
|
|
486
546
|
const gitDir = _path.isAbsolute.call(void 0, rawGitDir) ? rawGitDir : _path.resolve.call(void 0, _path.dirname.call(void 0, candidate), rawGitDir);
|
|
487
547
|
const commonDirPath = _path.join.call(void 0, gitDir, "commondir");
|
|
@@ -502,7 +562,7 @@ function findNearestGitCommonDir(startDir) {
|
|
|
502
562
|
function saveProjectDeeplineEnvValues(values, startDir = process.cwd()) {
|
|
503
563
|
const target = resolveProjectPinTarget(startDir);
|
|
504
564
|
if (!target.ok) {
|
|
505
|
-
throw new (0,
|
|
565
|
+
throw new (0, _chunk6VLFQZK6js.ConfigError)(
|
|
506
566
|
`Cowork project folder is ambiguous. Candidate folders: ${target.candidates.join(
|
|
507
567
|
", "
|
|
508
568
|
)}. Set CLAUDE_PROJECT_DIR or cd into the intended project folder before running this command.`
|
|
@@ -553,7 +613,7 @@ function findNearestProjectMarkerDir(startDir) {
|
|
|
553
613
|
}
|
|
554
614
|
}
|
|
555
615
|
function resolveCliAuthProvenance(config, startDir = process.cwd()) {
|
|
556
|
-
const envApiKey = _optionalChain([process, 'access',
|
|
616
|
+
const envApiKey = _optionalChain([process, 'access', _66 => _66.env, 'access', _67 => _67[API_KEY_ENV], 'optionalAccess', _68 => _68.trim, 'call', _69 => _69()]);
|
|
557
617
|
const folderAuth = getResolvedProjectAuthSource(
|
|
558
618
|
config.baseUrl,
|
|
559
619
|
config.apiKey,
|
|
@@ -583,13 +643,13 @@ function resolveCliAuthProvenance(config, startDir = process.cwd()) {
|
|
|
583
643
|
return {
|
|
584
644
|
scope: envApiKey ? "env" : folderAuth ? "folder" : "global",
|
|
585
645
|
project,
|
|
586
|
-
folderAuthPath: _nullishCoalesce(_optionalChain([folderAuth, 'optionalAccess',
|
|
646
|
+
folderAuthPath: _nullishCoalesce(_optionalChain([folderAuth, 'optionalAccess', _70 => _70.filePath]), () => ( null))
|
|
587
647
|
};
|
|
588
648
|
}
|
|
589
649
|
function activeOrganizationFromEnv(env) {
|
|
590
|
-
const orgId = _optionalChain([env, 'access',
|
|
650
|
+
const orgId = _optionalChain([env, 'access', _71 => _71[ACTIVE_ORG_ID_ENV], 'optionalAccess', _72 => _72.trim, 'call', _73 => _73()]);
|
|
591
651
|
if (!orgId) return null;
|
|
592
|
-
const orgName = _optionalChain([env, 'access',
|
|
652
|
+
const orgName = _optionalChain([env, 'access', _74 => _74[ACTIVE_ORG_NAME_ENV], 'optionalAccess', _75 => _75.trim, 'call', _76 => _76()]) || null;
|
|
593
653
|
return { org_id: orgId, org_name: orgName };
|
|
594
654
|
}
|
|
595
655
|
function resolveCliCommandContext(inputConfig, requestedScope) {
|
|
@@ -607,7 +667,7 @@ function resolveCliCommandContext(inputConfig, requestedScope) {
|
|
|
607
667
|
}
|
|
608
668
|
const contextForScope = (scope) => {
|
|
609
669
|
if (scope === "env") {
|
|
610
|
-
const processApiKey = _optionalChain([process, 'access',
|
|
670
|
+
const processApiKey = _optionalChain([process, 'access', _77 => _77.env, 'access', _78 => _78[API_KEY_ENV], 'optionalAccess', _79 => _79.trim, 'call', _80 => _80()]);
|
|
611
671
|
return processApiKey && processApiKey === config.apiKey ? {
|
|
612
672
|
active_organization: activeOrganizationFromEnv(process.env),
|
|
613
673
|
auth_scope: "env",
|
|
@@ -656,11 +716,11 @@ function resolveCliCommandContext(inputConfig, requestedScope) {
|
|
|
656
716
|
|
|
657
717
|
|
|
658
718
|
function activePluginSkillsDir() {
|
|
659
|
-
const pluginMode = _optionalChain([process, 'access',
|
|
719
|
+
const pluginMode = _optionalChain([process, 'access', _81 => _81.env, 'access', _82 => _82.DEEPLINE_PLUGIN_MODE, 'optionalAccess', _83 => _83.trim, 'call', _84 => _84(), 'access', _85 => _85.toLowerCase, 'call', _86 => _86()]);
|
|
660
720
|
if (pluginMode !== "true" && pluginMode !== "1" && pluginMode !== "yes" && pluginMode !== "on") {
|
|
661
721
|
return "";
|
|
662
722
|
}
|
|
663
|
-
const dir = _nullishCoalesce(_optionalChain([process, 'access',
|
|
723
|
+
const dir = _nullishCoalesce(_optionalChain([process, 'access', _87 => _87.env, 'access', _88 => _88.DEEPLINE_PLUGIN_SKILLS_DIR, 'optionalAccess', _89 => _89.trim, 'call', _90 => _90()]), () => ( ""));
|
|
664
724
|
return dir && _fs.existsSync.call(void 0, dir) ? dir : "";
|
|
665
725
|
}
|
|
666
726
|
function hasActivePluginSkills() {
|
|
@@ -711,7 +771,7 @@ function readSkillsVersionFile(path) {
|
|
|
711
771
|
}
|
|
712
772
|
}
|
|
713
773
|
function resolveAutoSyncSkillAgents() {
|
|
714
|
-
switch (
|
|
774
|
+
switch (_chunkAGLR6QVNjs.detectAgentRuntime.call(void 0, )) {
|
|
715
775
|
case "codex":
|
|
716
776
|
return ["codex"];
|
|
717
777
|
case "claude_code":
|
|
@@ -781,7 +841,7 @@ function writeSdkSkillsLocalVersion(baseUrl, version, agents) {
|
|
|
781
841
|
}
|
|
782
842
|
|
|
783
843
|
// src/http.ts
|
|
784
|
-
var HttpClient2 = class extends
|
|
844
|
+
var HttpClient2 = class extends _chunkAGLR6QVNjs.HttpClient {
|
|
785
845
|
constructor(config) {
|
|
786
846
|
super(config, readSdkSkillsLocalVersion);
|
|
787
847
|
}
|
|
@@ -824,4 +884,10 @@ var HttpClient2 = class extends _chunkPACD5DGCjs.HttpClient {
|
|
|
824
884
|
|
|
825
885
|
|
|
826
886
|
|
|
827
|
-
|
|
887
|
+
|
|
888
|
+
|
|
889
|
+
|
|
890
|
+
|
|
891
|
+
|
|
892
|
+
|
|
893
|
+
exports.HOST_URL_ENV = HOST_URL_ENV; exports.API_KEY_ENV = API_KEY_ENV; exports.ACTIVE_ORG_ID_ENV = ACTIVE_ORG_ID_ENV; exports.ACTIVE_ORG_NAME_ENV = ACTIVE_ORG_NAME_ENV; exports.FEATURES_ENV = FEATURES_ENV; exports.PROD_URL = PROD_URL; exports.DEFAULT_TIMEOUT = DEFAULT_TIMEOUT; exports.DEFAULT_MAX_RETRIES = DEFAULT_MAX_RETRIES; exports.TRANSIENT_HTTP_STATUSES = TRANSIENT_HTTP_STATUSES; exports.defaultRetryBackoffMs = defaultRetryBackoffMs; exports.featureEnvValues = featureEnvValues; exports.storedHostApiKey = storedHostApiKey; exports.storedHostFeatures = storedHostFeatures; exports.cliFeatureEnabled = cliFeatureEnabled; exports.baseUrlSlug = baseUrlSlug; exports.sdkCliStateDirPath = sdkCliStateDirPath; exports.hostConfigDirPath = hostConfigDirPath; exports.hostEnvFilePath = hostEnvFilePath; exports.saveHostEnvValues = saveHostEnvValues; exports.autoDetectBaseUrl = autoDetectBaseUrl; exports.resolveApiKeyForBaseUrl = resolveApiKeyForBaseUrl; exports.resolveProjectApiKeyForBaseUrl = resolveProjectApiKeyForBaseUrl; exports.resolveGlobalApiKeyForBaseUrl = resolveGlobalApiKeyForBaseUrl; exports.getResolvedProjectAuthSource = getResolvedProjectAuthSource; exports.resolveBaseUrlOnly = resolveBaseUrlOnly; exports.resolveCliWorkspace = resolveCliWorkspace; exports.saveCliWorkspace = saveCliWorkspace; exports.resolveConfig = resolveConfig; exports.ensureProjectPrivatePathsIgnored = ensureProjectPrivatePathsIgnored; exports.saveProjectDeeplineEnvValues = saveProjectDeeplineEnvValues; exports.resolveProjectPinTarget = resolveProjectPinTarget; exports.getActiveProjectAuthSource = getActiveProjectAuthSource; exports.resolveCliAuthProvenance = resolveCliAuthProvenance; exports.resolveCliCommandContext = resolveCliCommandContext; exports.hasActivePluginSkills = hasActivePluginSkills; exports.KNOWN_SKILL_AGENTS = KNOWN_SKILL_AGENTS; exports.DEFAULT_SKILL_AGENTS = DEFAULT_SKILL_AGENTS; exports.skillsAgentPathSegment = skillsAgentPathSegment; exports.resolveAutoSyncSkillAgents = resolveAutoSyncSkillAgents; exports.readSdkSkillsLocalVersion = readSdkSkillsLocalVersion; exports.writeSdkSkillsLocalVersion = writeSdkSkillsLocalVersion; exports.HttpClient = HttpClient2;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DeeplineClient
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-QI5S5HWB.mjs";
|
|
4
4
|
import {
|
|
5
5
|
printCommandEnvelope
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-AGICYWGN.mjs";
|
|
7
7
|
|
|
8
8
|
// src/cli/commands/integration-commands.ts
|
|
9
9
|
import { Option } from "commander";
|
|
@@ -24,7 +24,7 @@ function printIntegrationResult(value, json, lines, nextCursor) {
|
|
|
24
24
|
}
|
|
25
25
|
function registerIntegrationBalanceCommand(parent, hidden = false) {
|
|
26
26
|
return parent.command("balance <provider>", { hidden }).description(
|
|
27
|
-
"Read a fresh balance using this
|
|
27
|
+
"Read a fresh balance using this org\u2019s own provider connection (LeadMagic)."
|
|
28
28
|
).option("--json", "Print the balance and observation timestamp as JSON").action(async (provider, options) => {
|
|
29
29
|
const balance = await new DeeplineClient().getIntegrationBalance(
|
|
30
30
|
provider
|
|
@@ -35,9 +35,7 @@ function registerIntegrationBalanceCommand(parent, hidden = false) {
|
|
|
35
35
|
});
|
|
36
36
|
}
|
|
37
37
|
function registerWorkspaceConnectionListCommand(parent, name = "workspace-connections", hidden = false) {
|
|
38
|
-
return parent.command(name, { hidden }).description(
|
|
39
|
-
"List named workspace authorizations and their connection status."
|
|
40
|
-
).option("--json", "Print connection summaries as JSON").option("--inventory", "List workspace connections across credential types").option("--provider <provider>", "List connections for one provider").option(
|
|
38
|
+
return parent.command(name, { hidden }).description("List named org authorizations and their connection status.").option("--json", "Print connection summaries as JSON").option("--inventory", "List org connections across credential types").option("--provider <provider>", "List connections for one provider").option(
|
|
41
39
|
"--members",
|
|
42
40
|
"List teammates\u2019 personal connections for this provider"
|
|
43
41
|
).option("--cursor <cursor>", "Read the next page of members").action(
|
|
@@ -77,15 +75,13 @@ function registerWorkspaceConnectionListCommand(parent, name = "workspace-connec
|
|
|
77
75
|
options.json,
|
|
78
76
|
connections.length ? connections.map(
|
|
79
77
|
(row) => `${row.provider} ${row.status} ${row.name ? row.name + " " : ""}${row.label}`
|
|
80
|
-
) : ["No
|
|
78
|
+
) : ["No org connections."]
|
|
81
79
|
);
|
|
82
80
|
}
|
|
83
81
|
);
|
|
84
82
|
}
|
|
85
83
|
function registerLegacyHubSpotMembersCommand(parent, hidden = false) {
|
|
86
|
-
return parent.command("hubspot-members", { hidden }).description(
|
|
87
|
-
"List personal HubSpot connection status for workspace members."
|
|
88
|
-
).option("--cursor <cursor>", "Read the next roster page").option("--json", "Print the roster page as JSON").action(async (options) => {
|
|
84
|
+
return parent.command("hubspot-members", { hidden }).description("List personal HubSpot connection status for org members.").option("--cursor <cursor>", "Read the next roster page").option("--json", "Print the roster page as JSON").action(async (options) => {
|
|
89
85
|
const page = await new DeeplineClient().listPersonalHubSpotMembers(
|
|
90
86
|
options.cursor
|
|
91
87
|
);
|
|
@@ -96,13 +92,13 @@ function registerLegacyHubSpotMembersCommand(parent, hidden = false) {
|
|
|
96
92
|
printIntegrationResult(
|
|
97
93
|
page,
|
|
98
94
|
options.json,
|
|
99
|
-
rows.length ? rows : ["No
|
|
95
|
+
rows.length ? rows : ["No org members on this page."],
|
|
100
96
|
page.nextCursor
|
|
101
97
|
);
|
|
102
98
|
});
|
|
103
99
|
}
|
|
104
100
|
function registerLegacyWorkspaceConnectionCommand(parent, hidden = false) {
|
|
105
|
-
return parent.command("workspace-connection <provider> <action>", { hidden }).description("Manage a shared
|
|
101
|
+
return parent.command("workspace-connection <provider> <action>", { hidden }).description("Manage a shared org account.").option("--json", "Print the result as JSON").option("--name <name>", "Name of an org connection").option("--auto-name", "Assign a name when connecting an org account").action(
|
|
106
102
|
async (provider, action, options) => {
|
|
107
103
|
if (provider !== "hubspot" && provider !== "google_calendar_availability")
|
|
108
104
|
throw new Error("Choose hubspot or google_calendar_availability.");
|
|
@@ -126,7 +122,7 @@ function registerLegacyWorkspaceConnectionCommand(parent, hidden = false) {
|
|
|
126
122
|
authorizationVersion: row?.authorizationVersion
|
|
127
123
|
});
|
|
128
124
|
printIntegrationResult(result, options.json, [
|
|
129
|
-
result.url ?? (action === "remove" ? "
|
|
125
|
+
result.url ?? (action === "remove" ? "Org connection removed." : "Org connection disconnected.")
|
|
130
126
|
]);
|
|
131
127
|
}
|
|
132
128
|
);
|
|
@@ -134,12 +130,12 @@ function registerLegacyWorkspaceConnectionCommand(parent, hidden = false) {
|
|
|
134
130
|
function registerLegacyCalendarDelegationCommand(parent, hidden = false) {
|
|
135
131
|
return parent.command("calendar-delegation <action>", { hidden }).description(
|
|
136
132
|
"Manage Google Workspace approval. Named-team settings are deprecated."
|
|
137
|
-
).option("--name <name>", "Select a named availability connection").option("--domain <domain>", "Select a Google Workspace by domain").option("--label <label>", "Display name for a named connection").option("--everyone", "Include all eligible current and future members").option("--cursor <cursor>", "Read the next page of
|
|
133
|
+
).option("--name <name>", "Select a named availability connection").option("--domain <domain>", "Select a Google Workspace by domain").option("--label <label>", "Display name for a named connection").option("--everyone", "Include all eligible current and future members").option("--cursor <cursor>", "Read the next page of org members").option("--revision <revision>", "Current connection revision from status").option("--connection-id <id>", "Connection ID from status for edits").option(
|
|
138
134
|
"--grant-revision <revision>",
|
|
139
|
-
"Workspace approval revision from list"
|
|
140
|
-
).option("--members <memberIds...>", "
|
|
135
|
+
"Google Workspace approval revision from list"
|
|
136
|
+
).option("--members <memberIds...>", "Org member IDs to approve").option(
|
|
141
137
|
"--verification-email <email>",
|
|
142
|
-
"Verify Workspace approval with a work email"
|
|
138
|
+
"Verify Google Workspace approval with a work email"
|
|
143
139
|
).option(
|
|
144
140
|
"--dry-run",
|
|
145
141
|
"Print the proposed change without contacting Google or saving it"
|
|
@@ -151,7 +147,7 @@ function registerLegacyCalendarDelegationCommand(parent, hidden = false) {
|
|
|
151
147
|
const approvals = inventory.approvals?.length ? inventory.approvals.map(
|
|
152
148
|
(approval) => `${approval.domain} ${approval.enabled ? "approved" : "paused"} revision ${approval.revision}`
|
|
153
149
|
) : [
|
|
154
|
-
`Workspace approval ${inventory.grantEnabled ? "connected" : "disconnected"} \xB7 revision ${inventory.grantRevision}`
|
|
150
|
+
`Google Workspace approval ${inventory.grantEnabled ? "connected" : "disconnected"} \xB7 revision ${inventory.grantRevision}`
|
|
155
151
|
];
|
|
156
152
|
printIntegrationResult(inventory, options.json, [
|
|
157
153
|
...approvals,
|
|
@@ -204,12 +200,12 @@ function registerLegacyCalendarDelegationCommand(parent, hidden = false) {
|
|
|
204
200
|
);
|
|
205
201
|
if (options.cursor || (action === "enable" || action === "enable-workspace" ? !(options.members?.length || action === "enable-workspace" && options.verificationEmail) : options.members || options.verificationEmail) || options.members && options.verificationEmail)
|
|
206
202
|
throw new Error(
|
|
207
|
-
"Use --verification-email for Workspace approval or --members for legacy settings. Use --cursor only with status."
|
|
203
|
+
"Use --verification-email for Google Workspace approval or --members for legacy settings. Use --cursor only with status."
|
|
208
204
|
);
|
|
209
205
|
const grantRevision = Number(options.grantRevision);
|
|
210
206
|
if ((workspaceAction || options.name) && (options.grantRevision === void 0 || !/^\d+$/.test(options.grantRevision) || !Number.isSafeInteger(grantRevision)))
|
|
211
207
|
throw new Error(
|
|
212
|
-
"Pass --grant-revision with the current
|
|
208
|
+
"Pass --grant-revision with the current Google Workspace approval revision."
|
|
213
209
|
);
|
|
214
210
|
let change;
|
|
215
211
|
if (workspaceAction) {
|
|
@@ -428,7 +424,7 @@ function registerIntegrationConnectCommand(parent, defaultLink = false, hidden =
|
|
|
428
424
|
}
|
|
429
425
|
const confirmation = { provider, credential_saved: true };
|
|
430
426
|
printIntegrationResult(confirmation, options.json, [
|
|
431
|
-
`Credentials saved for ${provider} in the active
|
|
427
|
+
`Credentials saved for ${provider} in the active org.`
|
|
432
428
|
]);
|
|
433
429
|
}
|
|
434
430
|
);
|