deepline 0.3.501 → 0.3.503
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 +26 -0
- package/dist/bundling-sources/sdk/src/index.ts +1 -0
- package/dist/bundling-sources/sdk/src/release.ts +1 -1
- package/dist/bundling-sources/sdk/src/types.ts +9 -0
- package/dist/bundling-sources/shared_libs/monitors/starter-templates.ts +0 -8
- package/dist/bundling-sources/shared_libs/observability/dlq.ts +174 -0
- package/dist/bundling-sources/shared_libs/observability/queue-health.ts +9 -0
- package/dist/bundling-sources/shared_libs/observability/queue-item-connectors.ts +1 -0
- package/dist/bundling-sources/shared_libs/observability/scheduled-jobs.json +20 -2
- package/dist/bundling-sources/shared_libs/play-runtime/activity-observation.ts +20 -0
- package/dist/bundling-sources/shared_libs/play-runtime/app-runtime-api.ts +62 -2
- package/dist/bundling-sources/shared_libs/play-runtime/context.ts +667 -62
- package/dist/bundling-sources/shared_libs/play-runtime/ctx-types.ts +55 -0
- package/dist/bundling-sources/shared_libs/play-runtime/deployment/vercel-fly-rollback-alignment.ts +29 -14
- package/dist/bundling-sources/shared_libs/play-runtime/durable-receipt-execution.ts +20 -2
- package/dist/bundling-sources/shared_libs/play-runtime/durable-runs-rollout.ts +46 -0
- package/dist/bundling-sources/shared_libs/play-runtime/execution-gateway-invocation-fence.ts +80 -4
- package/dist/bundling-sources/shared_libs/play-runtime/fixture-egress-fetch.ts +95 -0
- package/dist/bundling-sources/shared_libs/play-runtime/freshness-receipt-execution.ts +292 -45
- package/dist/bundling-sources/shared_libs/play-runtime/internal-bootstrap-token.ts +15 -0
- package/dist/bundling-sources/shared_libs/play-runtime/launch-identity.ts +3 -0
- package/dist/bundling-sources/shared_libs/play-runtime/play-http-request.ts +7 -3
- package/dist/bundling-sources/shared_libs/play-runtime/play-runtime-semantics.ts +31 -1
- package/dist/bundling-sources/shared_libs/play-runtime/post-code-recovery-policy.ts +231 -0
- package/dist/bundling-sources/shared_libs/play-runtime/prebuilt-result-quality.ts +264 -0
- package/dist/bundling-sources/shared_libs/play-runtime/protocol.ts +9 -0
- package/dist/bundling-sources/shared_libs/play-runtime/run-ending-event.ts +55 -0
- package/dist/bundling-sources/shared_libs/play-runtime/run-ledger.ts +126 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runner-app/index.ts +70 -1
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-launch-transport.ts +2 -9
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-lifecycle.ts +51 -19
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/local-process.ts +9 -4
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/modal.ts +2 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/runtime-sandbox-reconciliation.ts +2 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-actions.ts +12 -1
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-authority.ts +3 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-gateway-oidc.ts +30 -8
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-incident-drills.ts +42 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-operation-contract.ts +7 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-receipt-store-adapter.ts +26 -1
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backend.ts +13 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-deadline-reconciliation.ts +53 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-runtime-worker.ts +631 -19
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/durable-run-inventory.ts +719 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/durable-run-sql.ts +206 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/latest-cache-result.ts +83 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres.ts +1453 -160
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/receipt-gateway.ts +61 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-event-search.ts +29 -8
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-queue-health.ts +27 -2
- package/dist/bundling-sources/shared_libs/play-runtime/test-runtime-seams.ts +45 -0
- package/dist/bundling-sources/shared_libs/play-runtime/tool-cache-policy.ts +18 -0
- package/dist/bundling-sources/shared_libs/play-runtime/tool-execute-retry-policy.ts +129 -14
- package/dist/bundling-sources/shared_libs/play-runtime/workflow-executor-auth.ts +2 -0
- package/dist/bundling-sources/shared_libs/plays/authoring-contract.ts +10 -1
- package/dist/bundling-sources/shared_libs/product-notifications/slack-delivery.ts +2 -0
- package/dist/cli/{auth-6ECHXOI4.mjs → auth-IC4WLSE3.mjs} +5 -5
- package/dist/cli/auth-ZCMSXZO4.js +43 -0
- package/dist/cli/{billing-75NZYRXA.mjs → billing-2VOV64SD.mjs} +6 -6
- package/dist/cli/{billing-QRR7O6BD.js → billing-LWQOII22.js} +79 -79
- package/dist/cli/{chunk-N2TJJNCW.js → chunk-2626LTU3.js} +291 -273
- package/dist/cli/{chunk-VL72UKNW.js → chunk-26RSSTCF.js} +26 -26
- package/dist/cli/{chunk-HDKXSHGA.js → chunk-2K2QBLYO.js} +53 -53
- package/dist/cli/{chunk-463ZOO2L.js → chunk-33JUK73X.js} +7 -7
- package/dist/cli/{chunk-KTOAJP4N.js → chunk-3CXHK4TW.js} +10 -10
- package/dist/cli/{chunk-YPTZJ7LO.js → chunk-4IIYSBEP.js} +70 -13
- package/dist/cli/{chunk-VTDAJZIJ.mjs → chunk-5GI6NKOE.mjs} +20 -1
- package/dist/cli/{chunk-TFFJ2PRN.mjs → chunk-5M5WSFRZ.mjs} +70 -13
- package/dist/cli/{chunk-5S7MLAI7.mjs → chunk-6XTE6C3W.mjs} +41 -23
- package/dist/cli/{chunk-7L6QNHUL.mjs → chunk-7HEDCIR3.mjs} +1 -1
- package/dist/cli/{chunk-C5R3UH5V.mjs → chunk-7MJYZ33I.mjs} +2 -6
- package/dist/cli/{chunk-TOE7LHEA.js → chunk-A2C6ONWA.js} +6 -6
- package/dist/cli/{chunk-QQ3JJYE2.js → chunk-AARF4SOW.js} +17 -13
- package/dist/cli/{chunk-APAHMCGR.js → chunk-B3X4YWQ6.js} +53 -53
- package/dist/cli/{chunk-J74N375S.mjs → chunk-BI2Q45SY.mjs} +4 -4
- package/dist/cli/{chunk-GBICEYUA.js → chunk-BN5VKY4X.js} +141 -20
- package/dist/cli/{chunk-UR7JOSLT.js → chunk-C5RQTTLP.js} +26 -7
- package/dist/cli/{chunk-ZUOKIBLJ.mjs → chunk-D27HP3HS.mjs} +2 -2
- package/dist/cli/{chunk-UJRN6YP6.mjs → chunk-DPI5OYVU.mjs} +10 -6
- package/dist/cli/{chunk-MSLXAVVK.mjs → chunk-EDMV4JT5.mjs} +2 -2
- package/dist/cli/{chunk-ZUQHQGC5.mjs → chunk-EQ3WMKFY.mjs} +5 -5
- package/dist/cli/{chunk-5X4AUFYW.js → chunk-F73PD2XD.js} +7 -7
- package/dist/cli/{chunk-O3DDVP7Z.mjs → chunk-FHJ54BHH.mjs} +2 -2
- package/dist/cli/{chunk-SV2TEZ2M.js → chunk-FIUTDSJX.js} +5 -4
- package/dist/cli/{chunk-W6JTHVPF.js → chunk-FVDTERO2.js} +21 -21
- package/dist/cli/{chunk-CJJ7JBM2.js → chunk-FZHOWPSN.js} +23 -21
- package/dist/cli/{chunk-WJUDAHIQ.mjs → chunk-GIHNEYBG.mjs} +1 -1
- package/dist/cli/{chunk-V5NHEYU7.mjs → chunk-GLZBFBJS.mjs} +5 -5
- package/dist/cli/{chunk-VVEMPC2I.js → chunk-HRTDCXHI.js} +2 -2
- package/dist/cli/{chunk-BOFCF4L7.js → chunk-HS63YBT5.js} +3 -3
- package/dist/cli/{chunk-4OXHLTCP.js → chunk-IIP46RVC.js} +1 -1
- package/dist/cli/{chunk-SAW3FBCA.mjs → chunk-ITJ7NB2D.mjs} +6 -0
- package/dist/cli/{chunk-NA3J3F2Z.mjs → chunk-J6RBOLK7.mjs} +1 -1
- package/dist/cli/{chunk-PXIF74UJ.mjs → chunk-JJVN7OIX.mjs} +4 -4
- package/dist/cli/{chunk-T7E3XEPG.mjs → chunk-JPDD4Y53.mjs} +10 -8
- package/dist/cli/{chunk-OKOXB3LY.mjs → chunk-K7NFFQFU.mjs} +2 -2
- package/dist/cli/{chunk-66XDYH5T.mjs → chunk-KGLVATEB.mjs} +2 -2
- package/dist/cli/{chunk-EHVFBD36.mjs → chunk-KPBBT6OS.mjs} +2 -1
- package/dist/cli/{chunk-MADTHS56.mjs → chunk-L3TZV625.mjs} +1 -1
- package/dist/cli/{chunk-FS7XYDOF.js → chunk-MJQOG4TZ.js} +16 -16
- package/dist/cli/{chunk-JO5FFSR7.js → chunk-NTLBZUHD.js} +6 -0
- package/dist/cli/{chunk-EKZQ5LQO.js → chunk-PVA3MWCO.js} +3 -3
- package/dist/cli/{chunk-PNF2ZU4R.js → chunk-QIEYEY6Z.js} +8 -8
- package/dist/cli/{chunk-KSHAFYYG.mjs → chunk-R2VZVHJP.mjs} +127 -6
- package/dist/cli/{chunk-XEBFJ2PH.js → chunk-RVOBFO7C.js} +41 -41
- package/dist/cli/{chunk-RU5ROUFO.js → chunk-TCQYWZFS.js} +5 -5
- package/dist/cli/{chunk-I42EOZKQ.js → chunk-TMQUMILM.js} +19 -23
- package/dist/cli/{chunk-EOO7OSS4.mjs → chunk-URZNSJE2.mjs} +4 -4
- package/dist/cli/{chunk-Z6AUOV7D.mjs → chunk-VC5B462T.mjs} +2 -2
- package/dist/cli/{chunk-EKF4DKUA.js → chunk-WHP3FJ7T.js} +5 -5
- package/dist/cli/{chunk-VD2374K7.mjs → chunk-WS274KID.mjs} +1 -1
- package/dist/cli/{chunk-T4U245E4.mjs → chunk-XYZZZLN6.mjs} +2 -2
- package/dist/cli/{chunk-J6SVNKRP.js → chunk-YXGPMTAK.js} +2 -2
- package/dist/cli/{chunk-RFV7PPLS.mjs → chunk-ZEQPCEV4.mjs} +3 -3
- package/dist/cli/command-docs.js +2 -2
- package/dist/cli/command-docs.mjs +1 -1
- package/dist/cli/{csv-RZJ4SOIL.mjs → csv-2TXOI3UE.mjs} +4 -4
- package/dist/cli/{csv-JXX2LXK5.js → csv-NEWCNOSZ.js} +13 -13
- package/dist/cli/{db-T2KJNONM.js → db-J3IJS4OG.js} +27 -27
- package/dist/cli/{db-MUTT2NWI.mjs → db-PX7EQEIG.mjs} +6 -6
- package/dist/cli/{describe-K3UMAAVO.mjs → describe-GQHGTZSL.mjs} +20 -21
- package/dist/cli/describe-LE7EZCL4.js +49 -0
- package/dist/cli/describe-core.d.mts +8 -4
- package/dist/cli/describe-core.d.ts +8 -4
- package/dist/cli/describe-core.js +4 -5
- package/dist/cli/describe-core.mjs +3 -4
- package/dist/cli/{executions-PHS4R2OX.mjs → executions-FFKK24RY.mjs} +6 -6
- package/dist/cli/{executions-7HSLDRHR.js → executions-RO3TJUXL.js} +8 -8
- package/dist/cli/{feedback-BJZRM637.js → feedback-XRR4HIS6.js} +8 -8
- package/dist/cli/{feedback-RWMDCIDF.mjs → feedback-ZTO56SRL.mjs} +4 -4
- package/dist/cli/git-26AH4XIO.js +25 -0
- package/dist/cli/{git-YW6VHYZG.mjs → git-FIPBVFYZ.mjs} +5 -5
- package/dist/cli/index.js +142 -142
- package/dist/cli/index.mjs +42 -42
- package/dist/cli/{legacy-noops-5UBSUPGG.mjs → legacy-noops-AMD2NWHF.mjs} +5 -5
- package/dist/cli/{legacy-noops-2WUV2XD7.js → legacy-noops-MTBBGM27.js} +8 -8
- package/dist/cli/{monitors-HWOQO3OK.mjs → monitors-24LDKDJX.mjs} +7 -7
- package/dist/cli/{monitors-YZZRKSTG.js → monitors-42PIGLBF.js} +95 -95
- package/dist/cli/{org-NCXT6RB4.mjs → org-4B7SCFRL.mjs} +6 -6
- package/dist/cli/{org-JY7HLHBA.js → org-GQMCA3MN.js} +72 -72
- package/dist/cli/{pages-QJO53QAT.mjs → pages-PD5EGL2R.mjs} +6 -6
- package/dist/cli/{pages-6ZOHXL6X.js → pages-RL2M62GJ.js} +18 -18
- package/dist/cli/{play-SQRS7JN3.mjs → play-5V54VTUR.mjs} +132 -26
- package/dist/cli/{play-TAYGSR35.js → play-FST6ZAHW.js} +447 -341
- package/dist/cli/{providers-4Q5LOIQ5.js → providers-HBUUPN7J.js} +9 -9
- package/dist/cli/{providers-3IR3N5DT.mjs → providers-N5YVCKPL.mjs} +6 -6
- package/dist/cli/{quickstart-ITNUZENY.js → quickstart-4QIQNSHG.js} +6 -6
- package/dist/cli/{quickstart-KCZCYO6B.mjs → quickstart-NJDDVTQR.mjs} +4 -4
- package/dist/cli/{run-YQ57LMKN.js → run-FGOKCG4J.js} +44 -45
- package/dist/cli/{run-JCWRWDSK.mjs → run-JHI5MTHD.mjs} +25 -26
- package/dist/cli/search-CTKSEVSO.js +32 -0
- package/dist/cli/{search-FUM27HQP.mjs → search-EWIZBIY2.mjs} +7 -7
- package/dist/cli/{search-output-EWEYT34M.mjs → search-output-NAK3MWBH.mjs} +53 -75
- package/dist/cli/{search-output-XAMWKRJH.js → search-output-TMQTRC2W.js} +58 -80
- package/dist/cli/{secrets-2IRRRZBL.js → secrets-5TSUEOJB.js} +15 -15
- package/dist/cli/{secrets-YTI4IAKR.mjs → secrets-ONQVW5SR.mjs} +6 -6
- package/dist/cli/{sessions-EFS4KUPF.mjs → sessions-B7F5O3ZR.mjs} +5 -5
- package/dist/cli/{sessions-HWTRDXBQ.js → sessions-BSGE5EET.js} +6 -6
- package/dist/cli/{settings-FRVEIOKR.js → settings-47LARBRU.js} +78 -78
- package/dist/cli/{settings-NTOO42DY.mjs → settings-SGGFQV5R.mjs} +11 -11
- package/dist/cli/{setup-PAVQPALX.mjs → setup-ATGNXQUK.mjs} +9 -9
- package/dist/cli/{setup-6ZIOAE2V.js → setup-BNFZFXO6.js} +49 -49
- package/dist/cli/skills-6RD25MVM.js +36 -0
- package/dist/cli/{skills-3O3XTPUM.mjs → skills-CIMBRM5R.mjs} +7 -7
- package/dist/cli/{tools-7QSB65UL.mjs → tools-DTDXAULX.mjs} +18 -19
- package/dist/cli/tools-TDZH4XHS.js +56 -0
- package/dist/cli/{update-T6CYS5ZT.mjs → update-EOIJBJCO.mjs} +9 -9
- package/dist/cli/update-Y32VT4VL.js +34 -0
- package/dist/cli/{workflow-OMSXZ73T.mjs → workflow-IWXUJPWY.mjs} +7 -7
- package/dist/cli/{workflow-4KMJBMGX.js → workflow-V5VKPICQ.js} +17 -17
- package/dist/{client-Bn8FwKGO.d.ts → client-CIwenMFS.d.ts} +1 -1
- package/dist/{client-CfNRmjLK.d.mts → client-DYAfJpaN.d.mts} +1 -1
- package/dist/{client-core-B91EV0WS.d.ts → client-core-CRjtyMAI.d.ts} +25 -2
- package/dist/{client-core-BG8Cgrmk.d.mts → client-core-DlzP8vEs.d.mts} +25 -2
- package/dist/{compiler-manifest-DlXDyndN.d.ts → compiler-manifest-DaJrA2KV.d.mts} +1 -1
- package/dist/{compiler-manifest-DlXDyndN.d.mts → compiler-manifest-DaJrA2KV.d.ts} +1 -1
- package/dist/{errors-BtriA2ld.d.mts → errors-BKnSYueU.d.mts} +1 -1
- package/dist/{errors-DmcLykM7.d.ts → errors-KLga4bLr.d.ts} +1 -1
- package/dist/{index-DI0sR_fX.d.mts → index-C-8AFpWy.d.mts} +1 -1
- package/dist/{index--Jw-slHY.d.ts → index-C5nAZ-VS.d.ts} +1 -1
- package/dist/index.d.mts +7 -7
- package/dist/index.d.ts +7 -7
- package/dist/index.js +9 -9
- package/dist/index.mjs +6 -6
- package/dist/install-integrity.json +124 -118
- 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 +8 -1
- 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/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 +5 -5
- package/dist/server.mjs +3 -3
- package/package.json +1 -1
- package/dist/cli/auth-VP7PMXKQ.js +0 -43
- package/dist/cli/chunk-XK5DMLZE.js +0 -111
- package/dist/cli/chunk-XRDXNAAY.mjs +0 -111
- package/dist/cli/describe-SEXUJLE4.js +0 -50
- package/dist/cli/git-VNS7UQWN.js +0 -25
- package/dist/cli/search-I425FRTK.js +0 -32
- package/dist/cli/skills-6ZNMO2PR.js +0 -36
- package/dist/cli/tools-DPV2JES6.js +0 -57
- package/dist/cli/update-Q5GUDEAW.js +0 -34
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _chunk3CXHK4TWjs = require('./chunk-3CXHK4TW.js');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
var
|
|
9
|
+
var _chunk33JUK73Xjs = require('./chunk-33JUK73X.js');
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
|
|
@@ -25,17 +25,15 @@ var _chunk463ZOO2Ljs = require('./chunk-463ZOO2L.js');
|
|
|
25
25
|
|
|
26
26
|
|
|
27
27
|
|
|
28
|
-
var _chunkGBICEYUAjs = require('./chunk-GBICEYUA.js');
|
|
29
28
|
|
|
30
29
|
|
|
31
|
-
var
|
|
30
|
+
var _chunkBN5VKY4Xjs = require('./chunk-BN5VKY4X.js');
|
|
32
31
|
|
|
33
32
|
|
|
34
|
-
var
|
|
35
|
-
|
|
33
|
+
var _chunkNTLBZUHDjs = require('./chunk-NTLBZUHD.js');
|
|
36
34
|
|
|
37
35
|
|
|
38
|
-
var
|
|
36
|
+
var _chunkAID3OYVJjs = require('./chunk-AID3OYVJ.js');
|
|
39
37
|
|
|
40
38
|
|
|
41
39
|
var _chunkJ33TSWO5js = require('./chunk-J33TSWO5.js');
|
|
@@ -48,10 +46,10 @@ var _chunkJ33TSWO5js = require('./chunk-J33TSWO5.js');
|
|
|
48
46
|
var _chunkHGFFYVXNjs = require('./chunk-HGFFYVXN.js');
|
|
49
47
|
|
|
50
48
|
|
|
51
|
-
var
|
|
49
|
+
var _chunkTCQYWZFSjs = require('./chunk-TCQYWZFS.js');
|
|
52
50
|
|
|
53
51
|
|
|
54
|
-
var
|
|
52
|
+
var _chunkC5RQTTLPjs = require('./chunk-C5RQTTLP.js');
|
|
55
53
|
|
|
56
54
|
|
|
57
55
|
var _chunkWSGXBROEjs = require('./chunk-WSGXBROE.js');
|
|
@@ -61,18 +59,18 @@ var _chunkWSGXBROEjs = require('./chunk-WSGXBROE.js');
|
|
|
61
59
|
|
|
62
60
|
|
|
63
61
|
|
|
64
|
-
var
|
|
62
|
+
var _chunkFVDTERO2js = require('./chunk-FVDTERO2.js');
|
|
65
63
|
|
|
66
64
|
|
|
67
65
|
|
|
68
66
|
|
|
69
|
-
var
|
|
67
|
+
var _chunkYXGPMTAKjs = require('./chunk-YXGPMTAK.js');
|
|
70
68
|
|
|
71
69
|
|
|
72
70
|
|
|
73
71
|
|
|
74
72
|
|
|
75
|
-
var
|
|
73
|
+
var _chunkB3X4YWQ6js = require('./chunk-B3X4YWQ6.js');
|
|
76
74
|
|
|
77
75
|
|
|
78
76
|
|
|
@@ -80,12 +78,12 @@ var _chunkAPAHMCGRjs = require('./chunk-APAHMCGR.js');
|
|
|
80
78
|
|
|
81
79
|
|
|
82
80
|
|
|
83
|
-
var
|
|
81
|
+
var _chunkF73PD2XDjs = require('./chunk-F73PD2XD.js');
|
|
84
82
|
|
|
85
83
|
|
|
86
84
|
|
|
87
85
|
|
|
88
|
-
var
|
|
86
|
+
var _chunkHS63YBT5js = require('./chunk-HS63YBT5.js');
|
|
89
87
|
|
|
90
88
|
|
|
91
89
|
var _chunkDIAWYWT5js = require('./chunk-DIAWYWT5.js');
|
|
@@ -191,10 +189,10 @@ var ToolCallRecovery = class _ToolCallRecovery {
|
|
|
191
189
|
}
|
|
192
190
|
};
|
|
193
191
|
function pendingToolExecutionPath(input) {
|
|
194
|
-
const config =
|
|
192
|
+
const config = _chunkHS63YBT5js.resolveConfig.call(void 0, );
|
|
195
193
|
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(_chunkWSGXBROEjs.stableStringify.call(void 0, input.params)).update("\0").update(input.responseIntent).digest("hex");
|
|
196
194
|
return _path.join.call(void 0,
|
|
197
|
-
|
|
195
|
+
_chunkHS63YBT5js.sdkCliStateDirPath.call(void 0, config.baseUrl),
|
|
198
196
|
`${PENDING_PREFIX}${fingerprint}.json`
|
|
199
197
|
);
|
|
200
198
|
}
|
|
@@ -346,13 +344,13 @@ var TOOL_COMMAND_TEMPLATES = {
|
|
|
346
344
|
execute: "deepline run <toolId> --input '{...}'"
|
|
347
345
|
};
|
|
348
346
|
function toListedTool(tool) {
|
|
349
|
-
if (
|
|
347
|
+
if (_chunkBN5VKY4Xjs.isPlayLikeTool.call(void 0, tool)) {
|
|
350
348
|
return {
|
|
351
349
|
...tool,
|
|
352
350
|
description: listedToolDescription(tool),
|
|
353
351
|
id: tool.toolId,
|
|
354
352
|
type: "play",
|
|
355
|
-
executeCommand:
|
|
353
|
+
executeCommand: _chunkBN5VKY4Xjs.playRunCommandForTool.call(void 0, tool, tool.toolId)
|
|
356
354
|
};
|
|
357
355
|
}
|
|
358
356
|
return {
|
|
@@ -434,16 +432,16 @@ function firstSentence(text) {
|
|
|
434
432
|
return (match ? match[0] : clean).trim();
|
|
435
433
|
}
|
|
436
434
|
function requiredInputIds(tool) {
|
|
437
|
-
const inputSchema =
|
|
435
|
+
const inputSchema = _chunkBN5VKY4Xjs.recordField.call(void 0,
|
|
438
436
|
tool,
|
|
439
437
|
"inputSchema",
|
|
440
438
|
"input_schema"
|
|
441
439
|
);
|
|
442
|
-
return
|
|
440
|
+
return _chunkBN5VKY4Xjs.toolInputFieldsForDisplay.call(void 0, inputSchema).filter((field) => field.required === true).map((field) => String(_nullishCoalesce(field.name, () => ( "")))).filter(Boolean);
|
|
443
441
|
}
|
|
444
442
|
function notConnectedSuffix(tool) {
|
|
445
443
|
const record = tool;
|
|
446
|
-
const status =
|
|
444
|
+
const status = _chunkBN5VKY4Xjs.stringField.call(void 0, record, "credentialStatus", "credential_status");
|
|
447
445
|
const connected = record.connected;
|
|
448
446
|
const message = toolConnectionStatusMessage({
|
|
449
447
|
connected: connected === false ? false : void 0,
|
|
@@ -452,18 +450,18 @@ function notConnectedSuffix(tool) {
|
|
|
452
450
|
return message ? ` - \u26A0 ${message}` : "";
|
|
453
451
|
}
|
|
454
452
|
function shortPricingHint(tool) {
|
|
455
|
-
const pricing =
|
|
453
|
+
const pricing = _chunkBN5VKY4Xjs.recordField.call(void 0,
|
|
456
454
|
tool,
|
|
457
455
|
"pricing"
|
|
458
456
|
);
|
|
459
457
|
const credits = numberField(pricing, "creditsPerUnit", "credits_per_unit");
|
|
460
|
-
const unit =
|
|
458
|
+
const unit = _chunkBN5VKY4Xjs.stringField.call(void 0, pricing, "unit");
|
|
461
459
|
if (credits !== null) {
|
|
462
460
|
return `${formatDecimal(credits)} cr/${unit || "unit"}`;
|
|
463
461
|
}
|
|
464
|
-
const summary =
|
|
462
|
+
const summary = _chunkBN5VKY4Xjs.stringField.call(void 0, pricing, "summary");
|
|
465
463
|
if (summary) return summary;
|
|
466
|
-
const displayText =
|
|
464
|
+
const displayText = _chunkBN5VKY4Xjs.stringField.call(void 0, pricing, "displayText", "display_text");
|
|
467
465
|
return displayText || null;
|
|
468
466
|
}
|
|
469
467
|
function aggregateCategorySummaries(tools) {
|
|
@@ -507,13 +505,13 @@ function categoryEnumerationRender(summaries) {
|
|
|
507
505
|
};
|
|
508
506
|
}
|
|
509
507
|
async function listToolCategories(emitJson, compact) {
|
|
510
|
-
const client = new (0,
|
|
508
|
+
const client = new (0, _chunkTCQYWZFSjs.DeeplineClient)();
|
|
511
509
|
if (!emitJson) {
|
|
512
510
|
const summaries2 = (await client.listToolCategories()).map((category) => ({
|
|
513
511
|
...category,
|
|
514
512
|
description: describeToolCategory(category.name)
|
|
515
513
|
}));
|
|
516
|
-
|
|
514
|
+
_chunkF73PD2XDjs.printCommandEnvelope.call(void 0,
|
|
517
515
|
{ categories: summaries2, render: categoryEnumerationRender(summaries2) },
|
|
518
516
|
{ json: false }
|
|
519
517
|
);
|
|
@@ -523,7 +521,7 @@ async function listToolCategories(emitJson, compact) {
|
|
|
523
521
|
const items = rawTools.map(toListedTool);
|
|
524
522
|
const summaries = aggregateCategorySummaries(rawTools);
|
|
525
523
|
const outputItems = compact ? items.map(compactTool) : items;
|
|
526
|
-
|
|
524
|
+
_chunkF73PD2XDjs.printCommandEnvelope.call(void 0,
|
|
527
525
|
{
|
|
528
526
|
tools: outputItems,
|
|
529
527
|
count: outputItems.length,
|
|
@@ -542,7 +540,7 @@ function unknownCategoryError(category, summaries, emitJson) {
|
|
|
542
540
|
const known = summaries.map((item) => item.name);
|
|
543
541
|
const message = `Unknown tool category "${category}". Run \`deepline tools list\` to browse categories.`;
|
|
544
542
|
if (emitJson) {
|
|
545
|
-
|
|
543
|
+
_chunkF73PD2XDjs.printJson.call(void 0, {
|
|
546
544
|
ok: false,
|
|
547
545
|
exitCode: 4,
|
|
548
546
|
code: "TOOL_CATEGORY_NOT_FOUND",
|
|
@@ -556,13 +554,13 @@ function unknownCategoryError(category, summaries, emitJson) {
|
|
|
556
554
|
const render = categoryEnumerationRender(summaries);
|
|
557
555
|
console.error(message);
|
|
558
556
|
console.error("");
|
|
559
|
-
console.error(
|
|
557
|
+
console.error(_chunkF73PD2XDjs.renderCommandEnvelopeText.call(void 0, { render }).trimEnd());
|
|
560
558
|
console.error("");
|
|
561
559
|
console.error(`Valid categories: ${known.join(", ")}`);
|
|
562
560
|
return 4;
|
|
563
561
|
}
|
|
564
562
|
async function listToolsInCategory(category, emitJson) {
|
|
565
|
-
const client = new (0,
|
|
563
|
+
const client = new (0, _chunkTCQYWZFSjs.DeeplineClient)();
|
|
566
564
|
const { tools: rawTools, categories } = await client.listToolsInCategory(category);
|
|
567
565
|
const summaries = categories.map((item) => ({
|
|
568
566
|
...item,
|
|
@@ -598,7 +596,7 @@ async function listToolsInCategory(category, emitJson) {
|
|
|
598
596
|
}
|
|
599
597
|
]
|
|
600
598
|
};
|
|
601
|
-
|
|
599
|
+
_chunkF73PD2XDjs.printCommandEnvelope.call(void 0,
|
|
602
600
|
{
|
|
603
601
|
category,
|
|
604
602
|
total: rows.length,
|
|
@@ -611,7 +609,7 @@ async function listToolsInCategory(category, emitJson) {
|
|
|
611
609
|
return 0;
|
|
612
610
|
}
|
|
613
611
|
async function listToolsForCategoryFilter(requestedCategories, emitJson, compact) {
|
|
614
|
-
const client = new (0,
|
|
612
|
+
const client = new (0, _chunkTCQYWZFSjs.DeeplineClient)();
|
|
615
613
|
const items = (await client.listTools({
|
|
616
614
|
categories: requestedCategories.join(","),
|
|
617
615
|
compact
|
|
@@ -640,7 +638,7 @@ async function listToolsForCategoryFilter(requestedCategories, emitJson, compact
|
|
|
640
638
|
]
|
|
641
639
|
};
|
|
642
640
|
const outputItems = compact ? items.map(compactTool) : items;
|
|
643
|
-
|
|
641
|
+
_chunkF73PD2XDjs.printCommandEnvelope.call(void 0,
|
|
644
642
|
{
|
|
645
643
|
tools: outputItems,
|
|
646
644
|
count: outputItems.length,
|
|
@@ -659,13 +657,13 @@ async function listTools(category, options = {}) {
|
|
|
659
657
|
const positional = _nullishCoalesce(_optionalChain([category, 'optionalAccess', _10 => _10.trim, 'call', _11 => _11()]), () => ( ""));
|
|
660
658
|
const flagCategories = (_nullishCoalesce(options.categories, () => ( ""))).split(",").map((item) => item.trim()).filter(Boolean);
|
|
661
659
|
const compact = options.compact !== false;
|
|
662
|
-
const emitJson = options.json === true ||
|
|
660
|
+
const emitJson = options.json === true || _chunkF73PD2XDjs.shouldEmitJson.call(void 0, );
|
|
663
661
|
if (positional && flagCategories.length > 0) {
|
|
664
662
|
const flagIsSameSingle = flagCategories.length === 1 && flagCategories[0] === positional;
|
|
665
663
|
if (!flagIsSameSingle) {
|
|
666
664
|
const message = `Category "${positional}" and --categories ${flagCategories.join(",")} disagree. Pass one: deepline tools list ${positional}`;
|
|
667
665
|
if (emitJson) {
|
|
668
|
-
|
|
666
|
+
_chunkF73PD2XDjs.printJson.call(void 0, {
|
|
669
667
|
ok: false,
|
|
670
668
|
exitCode: 2,
|
|
671
669
|
code: "TOOL_LIST_CATEGORY_CONFLICT",
|
|
@@ -692,7 +690,7 @@ async function grepTools(queryInput, options = {}) {
|
|
|
692
690
|
console.error("Usage: deepline tools grep <query> [--json]");
|
|
693
691
|
return 1;
|
|
694
692
|
}
|
|
695
|
-
const client = new (0,
|
|
693
|
+
const client = new (0, _chunkTCQYWZFSjs.DeeplineClient)();
|
|
696
694
|
const requestedCategories = options.categories ? options.categories.split(",").map((item) => item.trim()).filter(Boolean) : [];
|
|
697
695
|
const mode = _nullishCoalesce(options.mode, () => ( "all"));
|
|
698
696
|
const jsonOutput = options.json === true;
|
|
@@ -716,7 +714,7 @@ async function grepTools(queryInput, options = {}) {
|
|
|
716
714
|
query,
|
|
717
715
|
mode
|
|
718
716
|
}) : null;
|
|
719
|
-
|
|
717
|
+
_chunkF73PD2XDjs.printCommandEnvelope.call(void 0,
|
|
720
718
|
{
|
|
721
719
|
tools: outputTools,
|
|
722
720
|
count: outputTools.length,
|
|
@@ -734,7 +732,7 @@ async function grepTools(queryInput, options = {}) {
|
|
|
734
732
|
} : {},
|
|
735
733
|
commandTemplates: TOOL_COMMAND_TEMPLATES
|
|
736
734
|
},
|
|
737
|
-
{ json: options.json ||
|
|
735
|
+
{ json: options.json || _chunkF73PD2XDjs.shouldEmitJson.call(void 0, ) }
|
|
738
736
|
);
|
|
739
737
|
return 0;
|
|
740
738
|
}
|
|
@@ -789,8 +787,8 @@ function printPlayAliasToolError(toolId, play) {
|
|
|
789
787
|
console.error(playAliasToolErrorMessage(toolId, play));
|
|
790
788
|
}
|
|
791
789
|
function playLikeToolExecuteErrorMessage(toolId, tool) {
|
|
792
|
-
const playReference = tool ?
|
|
793
|
-
const nextStep = playReference ? `Use: deepline run ${playReference} --input '{...}'` : `Find the maintained workflow with: ${
|
|
790
|
+
const playReference = tool ? _chunkBN5VKY4Xjs.playReferenceForTool.call(void 0, tool) : null;
|
|
791
|
+
const nextStep = playReference ? `Use: deepline run ${playReference} --input '{...}'` : `Find the maintained workflow with: ${_chunkBN5VKY4Xjs.playSearchCommandForToolId.call(void 0, toolId)}`;
|
|
794
792
|
return [
|
|
795
793
|
`${toolId} is a workflow/play entry, not an atomic provider tool.`,
|
|
796
794
|
nextStep,
|
|
@@ -819,6 +817,7 @@ Concepts:
|
|
|
819
817
|
Common commands:
|
|
820
818
|
deepline search "name and company domain -> work email" --type tools
|
|
821
819
|
deepline describe hunter_email_verifier
|
|
820
|
+
deepline tools connect hubspot --link
|
|
822
821
|
deepline run hunter_email_verifier --input '{"email":"a@b.com"}'
|
|
823
822
|
deepline billing usage --request-id <request-id>
|
|
824
823
|
|
|
@@ -830,22 +829,38 @@ Output:
|
|
|
830
829
|
`
|
|
831
830
|
);
|
|
832
831
|
tools.command("connect <provider>").description(
|
|
833
|
-
"
|
|
832
|
+
"Get a dashboard connection link or connect a provider with credentials or OAuth."
|
|
833
|
+
).addOption(
|
|
834
|
+
new (0, _commander.Option)("--link", "Print a shareable dashboard link").conflicts([
|
|
835
|
+
"credentialsFile",
|
|
836
|
+
"oauth",
|
|
837
|
+
"preset",
|
|
838
|
+
"scopes",
|
|
839
|
+
"optionalScopes"
|
|
840
|
+
])
|
|
834
841
|
).option(
|
|
835
842
|
"--credentials-file <path>",
|
|
836
843
|
"JSON object of credential field names and string values; keep this file private"
|
|
837
844
|
).option("--oauth", "Return an OAuth authorization URL").option("--preset <id>", "Server-defined access preset (HubSpot only)").option("--scopes <scopes>", "Comma-separated OAuth scopes").option(
|
|
838
845
|
"--optional-scopes <scopes>",
|
|
839
846
|
"Comma-separated optional OAuth scopes"
|
|
840
|
-
).option("--json", "
|
|
847
|
+
).option("--json", "Print JSON without credential values").action(
|
|
841
848
|
async (provider, options) => {
|
|
849
|
+
if (options.link) {
|
|
850
|
+
const link = await new (0, _chunkTCQYWZFSjs.DeeplineClient)().getIntegrationConnectLink(
|
|
851
|
+
provider
|
|
852
|
+
);
|
|
853
|
+
if (_chunkF73PD2XDjs.shouldEmitJson.call(void 0, options.json)) console.log(JSON.stringify(link));
|
|
854
|
+
else console.log(link.connect_url);
|
|
855
|
+
return;
|
|
856
|
+
}
|
|
842
857
|
if (options.oauth) {
|
|
843
858
|
if (options.credentialsFile)
|
|
844
859
|
throw new Error("Use --oauth or --credentials-file, not both.");
|
|
845
860
|
if (options.preset !== void 0 && (options.scopes !== void 0 || options.optionalScopes !== void 0))
|
|
846
861
|
throw new Error("Use --preset or individual scopes, not both.");
|
|
847
862
|
const splitScopes = (value) => value.split(",").map((scope) => scope.trim()).filter(Boolean);
|
|
848
|
-
const result2 = await new (0,
|
|
863
|
+
const result2 = await new (0, _chunkTCQYWZFSjs.DeeplineClient)().startIntegrationOAuth(
|
|
849
864
|
provider,
|
|
850
865
|
{
|
|
851
866
|
...options.preset !== void 0 ? { preset: options.preset } : {},
|
|
@@ -857,7 +872,7 @@ Output:
|
|
|
857
872
|
throw new Error(
|
|
858
873
|
"The API did not return an OAuth authorization URL."
|
|
859
874
|
);
|
|
860
|
-
if (
|
|
875
|
+
if (_chunkF73PD2XDjs.shouldEmitJson.call(void 0, options.json))
|
|
861
876
|
console.log(
|
|
862
877
|
JSON.stringify({ provider, redirect_url: result2.redirect_url })
|
|
863
878
|
);
|
|
@@ -866,7 +881,7 @@ Output:
|
|
|
866
881
|
}
|
|
867
882
|
if (!options.credentialsFile || options.preset !== void 0 || options.scopes !== void 0 || options.optionalScopes !== void 0)
|
|
868
883
|
throw new Error(
|
|
869
|
-
"Use --credentials-file to save credentials, or --oauth to request access."
|
|
884
|
+
"Use --link for a dashboard link, --credentials-file to save credentials, or --oauth to request access."
|
|
870
885
|
);
|
|
871
886
|
let credentials;
|
|
872
887
|
try {
|
|
@@ -883,7 +898,7 @@ Output:
|
|
|
883
898
|
"--credentials-file must contain a nonempty JSON object of string credential values."
|
|
884
899
|
);
|
|
885
900
|
}
|
|
886
|
-
const result = await new (0,
|
|
901
|
+
const result = await new (0, _chunkTCQYWZFSjs.DeeplineClient)().setIntegrationCredentials(
|
|
887
902
|
provider,
|
|
888
903
|
credentials
|
|
889
904
|
);
|
|
@@ -893,7 +908,7 @@ Output:
|
|
|
893
908
|
);
|
|
894
909
|
}
|
|
895
910
|
const confirmation = { provider, credential_saved: true };
|
|
896
|
-
if (
|
|
911
|
+
if (_chunkF73PD2XDjs.shouldEmitJson.call(void 0, options.json))
|
|
897
912
|
console.log(JSON.stringify(confirmation));
|
|
898
913
|
else
|
|
899
914
|
console.log(
|
|
@@ -933,7 +948,7 @@ Examples:
|
|
|
933
948
|
json: Boolean(options.json)
|
|
934
949
|
});
|
|
935
950
|
});
|
|
936
|
-
|
|
951
|
+
_chunk33JUK73Xjs.registerDeprecatedSearchCommand.call(void 0, tools, () => ["tools", "monitors"]);
|
|
937
952
|
tools.command("grep <query>").description(
|
|
938
953
|
"Regex grep over tool ids, descriptions, categories, and input fields."
|
|
939
954
|
).addHelpText(
|
|
@@ -968,7 +983,7 @@ Examples:
|
|
|
968
983
|
});
|
|
969
984
|
const addToolMetadataCommand = (command) => {
|
|
970
985
|
let compatibilityMetadata;
|
|
971
|
-
|
|
986
|
+
_chunkFVDTERO2js.registerCompatibilityCatalog.call(void 0, command, () => ({
|
|
972
987
|
toolId: command.args[0],
|
|
973
988
|
acceptMetadata: (metadata) => {
|
|
974
989
|
compatibilityMetadata = metadata;
|
|
@@ -1038,7 +1053,7 @@ Examples:
|
|
|
1038
1053
|
process.exitCode = await narrowView();
|
|
1039
1054
|
return;
|
|
1040
1055
|
}
|
|
1041
|
-
const { describeAnything } = await Promise.resolve().then(() => _interopRequireWildcard(require("./describe-
|
|
1056
|
+
const { describeAnything } = await Promise.resolve().then(() => _interopRequireWildcard(require("./describe-LE7EZCL4.js")));
|
|
1042
1057
|
process.exitCode = await describeAnything(
|
|
1043
1058
|
toolId,
|
|
1044
1059
|
{
|
|
@@ -1053,7 +1068,7 @@ Examples:
|
|
|
1053
1068
|
});
|
|
1054
1069
|
};
|
|
1055
1070
|
addToolMetadataCommand(
|
|
1056
|
-
|
|
1071
|
+
_chunk3CXHK4TWjs.addDescribeOptions.call(void 0,
|
|
1057
1072
|
tools.command("describe <toolId>", { hidden: true }).alias("get"),
|
|
1058
1073
|
{ json: false }
|
|
1059
1074
|
)
|
|
@@ -1122,7 +1137,7 @@ Examples:
|
|
|
1122
1137
|
options,
|
|
1123
1138
|
void 0,
|
|
1124
1139
|
true,
|
|
1125
|
-
|
|
1140
|
+
_chunkYXGPMTAKjs.resolveCliMaintenancePolicy.call(void 0, command.optsWithGlobals())
|
|
1126
1141
|
);
|
|
1127
1142
|
}
|
|
1128
1143
|
);
|
|
@@ -1130,13 +1145,13 @@ Examples:
|
|
|
1130
1145
|
function beginDeferredToolExecuteCompatibility(toolId, cliInvocationId) {
|
|
1131
1146
|
let metadata;
|
|
1132
1147
|
const startedAt = performance.now();
|
|
1133
|
-
const baseUrl =
|
|
1134
|
-
|
|
1135
|
-
const result =
|
|
1148
|
+
const baseUrl = _chunkHS63YBT5js.resolveConfig.call(void 0, ).baseUrl;
|
|
1149
|
+
_chunkYXGPMTAKjs.recordCliTrace.call(void 0, { phase: "cli.tool_execute_compatibility_start" });
|
|
1150
|
+
const result = _chunkFVDTERO2js.runToolExecuteStage.call(void 0,
|
|
1136
1151
|
"SDK compatibility",
|
|
1137
|
-
() =>
|
|
1152
|
+
() => _chunkB3X4YWQ6js.checkSdkCompatibility.call(void 0, baseUrl, {
|
|
1138
1153
|
command: "tools execute",
|
|
1139
|
-
skillsVersion:
|
|
1154
|
+
skillsVersion: _chunkHS63YBT5js.readSdkSkillsLocalVersion.call(void 0, baseUrl),
|
|
1140
1155
|
persistCache: false,
|
|
1141
1156
|
timeoutMs: TOOL_EXECUTE_PREFLIGHT_TIMEOUT_MS,
|
|
1142
1157
|
catalog: {
|
|
@@ -1150,7 +1165,7 @@ function beginDeferredToolExecuteCompatibility(toolId, cliInvocationId) {
|
|
|
1150
1165
|
})
|
|
1151
1166
|
).then(
|
|
1152
1167
|
(compatibility) => {
|
|
1153
|
-
|
|
1168
|
+
_chunkYXGPMTAKjs.recordCliTrace.call(void 0, {
|
|
1154
1169
|
phase: "cli.tool_execute_compatibility_ready",
|
|
1155
1170
|
ms: performance.now() - startedAt,
|
|
1156
1171
|
ok: compatibility.error === null,
|
|
@@ -1159,7 +1174,7 @@ function beginDeferredToolExecuteCompatibility(toolId, cliInvocationId) {
|
|
|
1159
1174
|
return compatibility;
|
|
1160
1175
|
},
|
|
1161
1176
|
(error) => {
|
|
1162
|
-
|
|
1177
|
+
_chunkYXGPMTAKjs.recordCliTrace.call(void 0, {
|
|
1163
1178
|
phase: "cli.tool_execute_compatibility_ready",
|
|
1164
1179
|
ms: performance.now() - startedAt,
|
|
1165
1180
|
ok: false
|
|
@@ -1174,7 +1189,7 @@ async function getTool(toolId, options = {}, compatibilityMetadata) {
|
|
|
1174
1189
|
console.error("Usage: deepline tools describe <toolId> [--json]");
|
|
1175
1190
|
return 1;
|
|
1176
1191
|
}
|
|
1177
|
-
const client = new (0,
|
|
1192
|
+
const client = new (0, _chunkTCQYWZFSjs.DeeplineClient)();
|
|
1178
1193
|
let tool;
|
|
1179
1194
|
try {
|
|
1180
1195
|
tool = await _asyncNullishCoalesce(compatibilityMetadata, async () => ( await client.getTool(toolId)));
|
|
@@ -1228,12 +1243,12 @@ async function getTool(toolId, options = {}, compatibilityMetadata) {
|
|
|
1228
1243
|
const lines = toolPricingOnlyLines(tool, toolId);
|
|
1229
1244
|
if (inferenceQuote)
|
|
1230
1245
|
lines.push(...inferenceQuoteSummaryLines(inferenceQuote));
|
|
1231
|
-
|
|
1246
|
+
_chunkF73PD2XDjs.printCommandEnvelope.call(void 0,
|
|
1232
1247
|
{
|
|
1233
1248
|
toolId: String(tool.toolId || toolId),
|
|
1234
|
-
cost:
|
|
1249
|
+
cost: _chunkBN5VKY4Xjs.Capability.fromCatalogEntry(tool).describe().customerCost(),
|
|
1235
1250
|
...modelDescription ? { modelOptions: modelDescription } : {},
|
|
1236
|
-
...
|
|
1251
|
+
..._chunkBN5VKY4Xjs.isMonitorTypeTool.call(void 0, tool) ? { pricing: _chunkBN5VKY4Xjs.recordField.call(void 0, tool, "pricing") } : {},
|
|
1237
1252
|
...inferenceQuote ? { inferenceQuote } : {}
|
|
1238
1253
|
},
|
|
1239
1254
|
{
|
|
@@ -1244,14 +1259,14 @@ async function getTool(toolId, options = {}, compatibilityMetadata) {
|
|
|
1244
1259
|
);
|
|
1245
1260
|
return 0;
|
|
1246
1261
|
}
|
|
1247
|
-
if ((options.schemaOnly || options.examplesOnly || options.gettersOnly) && !
|
|
1248
|
-
const contract =
|
|
1262
|
+
if ((options.schemaOnly || options.examplesOnly || options.gettersOnly) && !_chunkBN5VKY4Xjs.isMonitorTypeTool.call(void 0, tool) && !_chunkBN5VKY4Xjs.isPlayLikeTool.call(void 0, tool) && (options.json || options.contractJson)) {
|
|
1263
|
+
const contract = _chunkBN5VKY4Xjs.toolContractJsonForDescribe.call(void 0,
|
|
1249
1264
|
tool,
|
|
1250
1265
|
toolId,
|
|
1251
1266
|
void 0,
|
|
1252
1267
|
seedToolListScript
|
|
1253
1268
|
);
|
|
1254
|
-
|
|
1269
|
+
_chunkF73PD2XDjs.printCompactJson.call(void 0, {
|
|
1255
1270
|
toolId: contract.toolId,
|
|
1256
1271
|
...options.schemaOnly ? {
|
|
1257
1272
|
inputSchema: contract.inputSchema,
|
|
@@ -1274,8 +1289,8 @@ async function getTool(toolId, options = {}, compatibilityMetadata) {
|
|
|
1274
1289
|
return 0;
|
|
1275
1290
|
}
|
|
1276
1291
|
if (options.contractJson) {
|
|
1277
|
-
|
|
1278
|
-
...
|
|
1292
|
+
_chunkF73PD2XDjs.printCompactJson.call(void 0, {
|
|
1293
|
+
..._chunkBN5VKY4Xjs.toolContractJsonForDescribe.call(void 0,
|
|
1279
1294
|
tool,
|
|
1280
1295
|
toolId,
|
|
1281
1296
|
void 0,
|
|
@@ -1288,8 +1303,8 @@ async function getTool(toolId, options = {}, compatibilityMetadata) {
|
|
|
1288
1303
|
}
|
|
1289
1304
|
const emitJson = options.json === true;
|
|
1290
1305
|
if (emitJson) {
|
|
1291
|
-
|
|
1292
|
-
...
|
|
1306
|
+
_chunkF73PD2XDjs.printCompactJson.call(void 0, {
|
|
1307
|
+
..._chunkBN5VKY4Xjs.toolMetadataJsonForDescribe.call(void 0, tool, toolId, seedToolListScript),
|
|
1293
1308
|
...modelDescription ? { modelOptions: modelDescription } : {},
|
|
1294
1309
|
...inferenceQuote ? { inferenceQuote } : {}
|
|
1295
1310
|
});
|
|
@@ -1314,7 +1329,7 @@ async function getTool(toolId, options = {}, compatibilityMetadata) {
|
|
|
1314
1329
|
printCompactToolContract(tool, toolId);
|
|
1315
1330
|
if (modelDescription) {
|
|
1316
1331
|
process.stdout.write(`
|
|
1317
|
-
${
|
|
1332
|
+
${_chunkBN5VKY4Xjs.formatModelDescription.call(void 0, modelDescription)}`);
|
|
1318
1333
|
}
|
|
1319
1334
|
if (inferenceQuote) printInferenceQuoteSummary(inferenceQuote);
|
|
1320
1335
|
return 0;
|
|
@@ -1322,7 +1337,7 @@ ${_chunkGBICEYUAjs.formatModelDescription.call(void 0, modelDescription)}`);
|
|
|
1322
1337
|
printCompactToolContract(tool, toolId);
|
|
1323
1338
|
if (modelDescription) {
|
|
1324
1339
|
process.stdout.write(`
|
|
1325
|
-
${
|
|
1340
|
+
${_chunkBN5VKY4Xjs.formatModelDescription.call(void 0, modelDescription)}`);
|
|
1326
1341
|
}
|
|
1327
1342
|
if (inferenceQuote) printInferenceQuoteSummary(inferenceQuote);
|
|
1328
1343
|
return 0;
|
|
@@ -1339,10 +1354,10 @@ function printInferenceQuoteSummary(quote) {
|
|
|
1339
1354
|
for (const line of inferenceQuoteSummaryLines(quote)) console.log(line);
|
|
1340
1355
|
}
|
|
1341
1356
|
function printMonitorTypeFilters(tool) {
|
|
1342
|
-
const schema =
|
|
1343
|
-
const properties =
|
|
1357
|
+
const schema = _chunkBN5VKY4Xjs.recordField.call(void 0, tool, "payload_schema", "payloadSchema");
|
|
1358
|
+
const properties = _chunkBN5VKY4Xjs.recordField.call(void 0, schema, "properties");
|
|
1344
1359
|
const required = new Set(
|
|
1345
|
-
|
|
1360
|
+
_chunkBN5VKY4Xjs.arrayField.call(void 0, schema, "required").filter(
|
|
1346
1361
|
(v) => typeof v === "string"
|
|
1347
1362
|
)
|
|
1348
1363
|
);
|
|
@@ -1353,24 +1368,24 @@ function printMonitorTypeFilters(tool) {
|
|
|
1353
1368
|
}
|
|
1354
1369
|
console.log("Deploy filters (set in the monitor payload):");
|
|
1355
1370
|
for (const name of names) {
|
|
1356
|
-
const field =
|
|
1371
|
+
const field = _chunkBN5VKY4Xjs.isRecord.call(void 0, properties[name]) ? properties[name] : {};
|
|
1357
1372
|
const star = required.has(name) ? "*" : "";
|
|
1358
|
-
const enumVals =
|
|
1373
|
+
const enumVals = _chunkBN5VKY4Xjs.arrayField.call(void 0, field, "enum").filter(
|
|
1359
1374
|
(v) => typeof v === "string"
|
|
1360
1375
|
);
|
|
1361
|
-
const type = enumVals.length ? `one of [${enumVals.join(", ")}]` :
|
|
1362
|
-
const desc =
|
|
1376
|
+
const type = enumVals.length ? `one of [${enumVals.join(", ")}]` : _chunkBN5VKY4Xjs.stringField.call(void 0, field, "type") || "string";
|
|
1377
|
+
const desc = _chunkBN5VKY4Xjs.stringField.call(void 0, field, "description");
|
|
1363
1378
|
console.log(`- ${name}${star}: ${type}${desc ? ` - ${desc}` : ""}`);
|
|
1364
1379
|
}
|
|
1365
1380
|
}
|
|
1366
1381
|
function printMonitorTypeFilterExamples(tool) {
|
|
1367
|
-
const documentation =
|
|
1368
|
-
const fields =
|
|
1382
|
+
const documentation = _chunkBN5VKY4Xjs.recordField.call(void 0, tool, "documentation");
|
|
1383
|
+
const fields = _chunkBN5VKY4Xjs.recordField.call(void 0, documentation, "fields");
|
|
1369
1384
|
const examples = Object.entries(fields).flatMap(([name, rawField]) => {
|
|
1370
|
-
const grammar =
|
|
1371
|
-
const example =
|
|
1385
|
+
const grammar = _chunkBN5VKY4Xjs.recordField.call(void 0, _chunkBN5VKY4Xjs.isRecord.call(void 0, rawField) ? rawField : {}, "grammar");
|
|
1386
|
+
const example = _chunkBN5VKY4Xjs.stringField.call(void 0, grammar, "example");
|
|
1372
1387
|
const values = [
|
|
1373
|
-
...
|
|
1388
|
+
..._chunkBN5VKY4Xjs.arrayField.call(void 0, grammar, "examples").filter(
|
|
1374
1389
|
(value) => typeof value === "string" && Boolean(value)
|
|
1375
1390
|
),
|
|
1376
1391
|
...example ? [example] : []
|
|
@@ -1385,21 +1400,21 @@ function printMonitorTypeFilterExamples(tool) {
|
|
|
1385
1400
|
}
|
|
1386
1401
|
}
|
|
1387
1402
|
function printMonitorTypeStreams(tool) {
|
|
1388
|
-
const streams =
|
|
1389
|
-
|
|
1403
|
+
const streams = _chunkBN5VKY4Xjs.arrayField.call(void 0, tool, "streams", "output_streams").filter(
|
|
1404
|
+
_chunkBN5VKY4Xjs.isRecord
|
|
1390
1405
|
);
|
|
1391
1406
|
if (!streams.length) return;
|
|
1392
1407
|
console.log("");
|
|
1393
1408
|
console.log("Filter columns (a play's sqlListeners.where, per stream):");
|
|
1394
1409
|
for (const stream of streams) {
|
|
1395
|
-
const name =
|
|
1396
|
-
const cols =
|
|
1410
|
+
const name = _chunkBN5VKY4Xjs.stringField.call(void 0, stream, "stream");
|
|
1411
|
+
const cols = _chunkBN5VKY4Xjs.arrayField.call(void 0, stream, "columns").filter(_chunkBN5VKY4Xjs.isRecord).map((col) => _chunkBN5VKY4Xjs.stringField.call(void 0, col, "name")).filter(Boolean);
|
|
1397
1412
|
console.log(`- ${name}: ${cols.join(", ")}`);
|
|
1398
1413
|
}
|
|
1399
1414
|
}
|
|
1400
1415
|
function monitorTypePricingLines(tool) {
|
|
1401
|
-
const pricing =
|
|
1402
|
-
const byType =
|
|
1416
|
+
const pricing = _chunkBN5VKY4Xjs.recordField.call(void 0, tool, "pricing");
|
|
1417
|
+
const byType = _chunkBN5VKY4Xjs.recordField.call(void 0,
|
|
1403
1418
|
pricing,
|
|
1404
1419
|
"pricing_by_radar_type",
|
|
1405
1420
|
"pricingByRadarType"
|
|
@@ -1410,9 +1425,9 @@ function monitorTypePricingLines(tool) {
|
|
|
1410
1425
|
}
|
|
1411
1426
|
const lines = ["Pricing (Deepline credits per accepted event):"];
|
|
1412
1427
|
for (const key of keys) {
|
|
1413
|
-
const entry =
|
|
1428
|
+
const entry = _chunkBN5VKY4Xjs.isRecord.call(void 0, byType[key]) ? byType[key] : {};
|
|
1414
1429
|
const credits = numberField(entry, "deepline_credits", "deeplineCredits");
|
|
1415
|
-
const display =
|
|
1430
|
+
const display = _chunkBN5VKY4Xjs.stringField.call(void 0, entry, "display");
|
|
1416
1431
|
const shown = display || (credits !== null ? `${formatDecimal(credits)} credits/event` : "not listed");
|
|
1417
1432
|
lines.push(`- ${key}: ${shown}`);
|
|
1418
1433
|
}
|
|
@@ -1422,20 +1437,20 @@ function printMonitorTypePricing(tool) {
|
|
|
1422
1437
|
for (const line of monitorTypePricingLines(tool)) console.log(line);
|
|
1423
1438
|
}
|
|
1424
1439
|
function printMonitorTypeDeploy(tool) {
|
|
1425
|
-
const deploy =
|
|
1426
|
-
const toolId =
|
|
1427
|
-
const example =
|
|
1440
|
+
const deploy = _chunkBN5VKY4Xjs.recordField.call(void 0, tool, "deploy");
|
|
1441
|
+
const toolId = _chunkBN5VKY4Xjs.stringField.call(void 0, tool, "toolId");
|
|
1442
|
+
const example = _chunkBN5VKY4Xjs.stringField.call(void 0, deploy, "example") || `deepline monitors deploy '{"key":"...","tool":"${toolId}","payload":{...}}'`;
|
|
1428
1443
|
console.log("Deploy (a monitor type is deployed, not executed):");
|
|
1429
1444
|
console.log(` ${example}`);
|
|
1430
1445
|
}
|
|
1431
1446
|
function printMonitorTypeContract(tool, requestedToolId) {
|
|
1432
|
-
const toolId =
|
|
1447
|
+
const toolId = _chunkBN5VKY4Xjs.stringField.call(void 0, tool, "toolId") || requestedToolId;
|
|
1433
1448
|
console.log(toolId);
|
|
1434
|
-
const displayName =
|
|
1449
|
+
const displayName = _chunkBN5VKY4Xjs.stringField.call(void 0, tool, "displayName");
|
|
1435
1450
|
if (displayName) console.log(`Best for: ${displayName}`);
|
|
1436
|
-
const description =
|
|
1451
|
+
const description = _chunkBN5VKY4Xjs.stringField.call(void 0, tool, "description");
|
|
1437
1452
|
if (description) console.log(`Description: ${description}`);
|
|
1438
|
-
const categories =
|
|
1453
|
+
const categories = _chunkBN5VKY4Xjs.arrayField.call(void 0, tool, "categories").filter(
|
|
1439
1454
|
(v) => typeof v === "string"
|
|
1440
1455
|
);
|
|
1441
1456
|
if (categories.length) console.log(`Tags: ${categories.join(", ")}`);
|
|
@@ -1455,31 +1470,31 @@ function printMonitorTypeContract(tool, requestedToolId) {
|
|
|
1455
1470
|
console.log(`More: deepline describe ${toolId}`);
|
|
1456
1471
|
}
|
|
1457
1472
|
function toolGuidanceLines(guidance) {
|
|
1458
|
-
const record =
|
|
1459
|
-
const toolGuidance =
|
|
1460
|
-
const providerGuidance =
|
|
1473
|
+
const record = _chunkBN5VKY4Xjs.isRecord.call(void 0, guidance) ? guidance : {};
|
|
1474
|
+
const toolGuidance = _chunkBN5VKY4Xjs.stringField.call(void 0, record, "tool");
|
|
1475
|
+
const providerGuidance = _chunkBN5VKY4Xjs.stringField.call(void 0, record, "provider");
|
|
1461
1476
|
return [
|
|
1462
1477
|
...toolGuidance ? [`- This tool: ${toolGuidance}`] : [],
|
|
1463
1478
|
...providerGuidance ? [`- Provider: ${providerGuidance}`] : []
|
|
1464
1479
|
];
|
|
1465
1480
|
}
|
|
1466
1481
|
function printCompactToolContract(tool, requestedToolId) {
|
|
1467
|
-
if (
|
|
1482
|
+
if (_chunkBN5VKY4Xjs.isMonitorTypeTool.call(void 0, tool)) {
|
|
1468
1483
|
printMonitorTypeContract(tool, requestedToolId);
|
|
1469
1484
|
return;
|
|
1470
1485
|
}
|
|
1471
|
-
const contract =
|
|
1486
|
+
const contract = _chunkBN5VKY4Xjs.toolContractJsonForDescribe.call(void 0,
|
|
1472
1487
|
tool,
|
|
1473
1488
|
requestedToolId,
|
|
1474
1489
|
void 0,
|
|
1475
1490
|
seedToolListScript
|
|
1476
1491
|
);
|
|
1477
|
-
const cost =
|
|
1478
|
-
const getters =
|
|
1492
|
+
const cost = _chunkBN5VKY4Xjs.isRecord.call(void 0, contract.cost) ? contract.cost : {};
|
|
1493
|
+
const getters = _chunkBN5VKY4Xjs.isRecord.call(void 0, contract.getters) ? contract.getters : {};
|
|
1479
1494
|
const listGetters = Array.isArray(getters.extractedLists) ? getters.extractedLists : [];
|
|
1480
1495
|
const valueGetters = Array.isArray(getters.extractedValues) ? getters.extractedValues : [];
|
|
1481
|
-
const inputFields =
|
|
1482
|
-
|
|
1496
|
+
const inputFields = _chunkBN5VKY4Xjs.recursiveToolInputFieldsForDisplay.call(void 0,
|
|
1497
|
+
_chunkBN5VKY4Xjs.recordField.call(void 0, contract, "inputSchema")
|
|
1483
1498
|
);
|
|
1484
1499
|
console.log(String(contract.toolId));
|
|
1485
1500
|
if (contract.displayName) console.log(`Best for: ${contract.displayName}`);
|
|
@@ -1496,9 +1511,9 @@ function printCompactToolContract(tool, requestedToolId) {
|
|
|
1496
1511
|
printToolOutputArrayShape(contract);
|
|
1497
1512
|
printToolExecutionHints(contract);
|
|
1498
1513
|
if (contract.deprecated === true) {
|
|
1499
|
-
const deprecation =
|
|
1500
|
-
const message =
|
|
1501
|
-
const replacementToolId =
|
|
1514
|
+
const deprecation = _chunkBN5VKY4Xjs.isRecord.call(void 0, contract.deprecation) ? contract.deprecation : {};
|
|
1515
|
+
const message = _chunkBN5VKY4Xjs.stringField.call(void 0, deprecation, "message");
|
|
1516
|
+
const replacementToolId = _chunkBN5VKY4Xjs.stringField.call(void 0,
|
|
1502
1517
|
deprecation,
|
|
1503
1518
|
"replacementToolId",
|
|
1504
1519
|
"replacement_tool_id"
|
|
@@ -1521,12 +1536,12 @@ function printCompactToolContract(tool, requestedToolId) {
|
|
|
1521
1536
|
console.log("");
|
|
1522
1537
|
console.log("Inputs:");
|
|
1523
1538
|
for (const field of inputFields) {
|
|
1524
|
-
if (!
|
|
1525
|
-
const name =
|
|
1539
|
+
if (!_chunkBN5VKY4Xjs.isRecord.call(void 0, field)) continue;
|
|
1540
|
+
const name = _chunkBN5VKY4Xjs.stringField.call(void 0, field, "name");
|
|
1526
1541
|
if (!name) continue;
|
|
1527
1542
|
const required = field.required ? "*" : "";
|
|
1528
|
-
const type =
|
|
1529
|
-
const description =
|
|
1543
|
+
const type = _chunkBN5VKY4Xjs.stringField.call(void 0, field, "type") || "unknown";
|
|
1544
|
+
const description = _chunkBN5VKY4Xjs.stringField.call(void 0, field, "description");
|
|
1530
1545
|
const enumValues = Array.isArray(field.enum) ? field.enum : [];
|
|
1531
1546
|
const enumSuffix = enumValues.length ? ` enum=${enumValues.map(String).join("|")}` : "";
|
|
1532
1547
|
const itemBoundsSuffix = arrayItemBoundsSuffix(field);
|
|
@@ -1541,8 +1556,8 @@ function printCompactToolContract(tool, requestedToolId) {
|
|
|
1541
1556
|
}
|
|
1542
1557
|
console.log("");
|
|
1543
1558
|
printToolExamplesOnly(tool, requestedToolId);
|
|
1544
|
-
const starterScript =
|
|
1545
|
-
const starterPath =
|
|
1559
|
+
const starterScript = _chunkBN5VKY4Xjs.isRecord.call(void 0, contract.starterScript) ? contract.starterScript : {};
|
|
1560
|
+
const starterPath = _chunkBN5VKY4Xjs.stringField.call(void 0, starterScript, "path");
|
|
1546
1561
|
if (starterPath) {
|
|
1547
1562
|
console.log("");
|
|
1548
1563
|
console.log(`Starter script: ${starterPath}`);
|
|
@@ -1553,16 +1568,16 @@ function printCompactToolContract(tool, requestedToolId) {
|
|
|
1553
1568
|
console.log("Getters:");
|
|
1554
1569
|
if (listGetters.length) console.log(listGetterHeading());
|
|
1555
1570
|
for (const entry of listGetters) {
|
|
1556
|
-
if (
|
|
1571
|
+
if (_chunkBN5VKY4Xjs.isRecord.call(void 0, entry))
|
|
1557
1572
|
console.log(
|
|
1558
|
-
`- ${
|
|
1573
|
+
`- ${_chunkBN5VKY4Xjs.stringField.call(void 0, entry, "name")}: ${_chunkBN5VKY4Xjs.playResultExpression.call(void 0, entry)}`
|
|
1559
1574
|
);
|
|
1560
1575
|
}
|
|
1561
1576
|
if (valueGetters.length) console.log("Values:");
|
|
1562
1577
|
for (const entry of valueGetters) {
|
|
1563
|
-
if (
|
|
1578
|
+
if (_chunkBN5VKY4Xjs.isRecord.call(void 0, entry))
|
|
1564
1579
|
console.log(
|
|
1565
|
-
`- ${
|
|
1580
|
+
`- ${_chunkBN5VKY4Xjs.stringField.call(void 0, entry, "name")}: ${_chunkBN5VKY4Xjs.playResultExpression.call(void 0, entry)}`
|
|
1566
1581
|
);
|
|
1567
1582
|
}
|
|
1568
1583
|
}
|
|
@@ -1573,27 +1588,30 @@ function printCompactToolContract(tool, requestedToolId) {
|
|
|
1573
1588
|
console.log(`More: deepline describe ${contract.toolId}`);
|
|
1574
1589
|
}
|
|
1575
1590
|
function toolPricingOnlyLines(tool, requestedToolId, options = {}) {
|
|
1576
|
-
if (
|
|
1591
|
+
if (_chunkBN5VKY4Xjs.isMonitorTypeTool.call(void 0, tool)) {
|
|
1577
1592
|
return monitorTypePricingLines(tool);
|
|
1578
1593
|
}
|
|
1579
1594
|
const toolId = String(tool.toolId || requestedToolId);
|
|
1580
|
-
const cost =
|
|
1581
|
-
const pricingModel =
|
|
1582
|
-
const billing =
|
|
1583
|
-
const explicitUnit =
|
|
1595
|
+
const cost = _chunkBN5VKY4Xjs.Capability.fromCatalogEntry(tool).describe().customerCost();
|
|
1596
|
+
const pricingModel = _chunkBN5VKY4Xjs.stringField.call(void 0, cost, "pricingModel") || "unknown";
|
|
1597
|
+
const billing = _chunkBN5VKY4Xjs.stringField.call(void 0, cost, "billingSourceLabel") || _chunkBN5VKY4Xjs.stringField.call(void 0, cost, "billingSource") || _chunkBN5VKY4Xjs.stringField.call(void 0, cost, "billingMode") || "unknown";
|
|
1598
|
+
const explicitUnit = _chunkBN5VKY4Xjs.stringField.call(void 0, cost, "unit");
|
|
1584
1599
|
const unit = explicitUnit || (pricingModel === "per_page" ? "page" : pricingModel === "per_result" ? "result" : pricingModel === "fixed" ? "call" : pricingModel.replace(/^per_/, "") || "unit");
|
|
1585
1600
|
const credits = numberField(cost, "deeplineCreditsPerPricingUnit");
|
|
1586
1601
|
const usd = numberField(cost, "deeplineUsdPerPricingUnit");
|
|
1587
|
-
const displayText =
|
|
1588
|
-
const summary =
|
|
1602
|
+
const displayText = _chunkBN5VKY4Xjs.stringField.call(void 0, cost, "displayText");
|
|
1603
|
+
const summary = _chunkBN5VKY4Xjs.stringField.call(void 0, cost, "summary");
|
|
1589
1604
|
const price = displayText || summary || (credits !== null ? `${formatDecimal(credits)} Deepline credits${usd !== null ? ` / ${formatUsd(usd)}` : ""} per ${unit}` : "pricing unavailable");
|
|
1605
|
+
const reference = cost.observedReference;
|
|
1606
|
+
const observedMax = _chunkBN5VKY4Xjs.observedMaxText.call(void 0, cost);
|
|
1590
1607
|
return [
|
|
1591
1608
|
`${_nullishCoalesce(options.heading, () => ( `Pricing: ${toolId}`))}: ${price}`,
|
|
1592
|
-
...
|
|
1593
|
-
...
|
|
1594
|
-
|
|
1595
|
-
...(_nullishCoalesce(cost.details, () => ( []))).map((detail) => ` ${detail}`)
|
|
1609
|
+
...observedMax ? [` ${observedMax}`] : [],
|
|
1610
|
+
...reference ? [
|
|
1611
|
+
` Observed reference from ${reference.sampleSize} call(s) on ${reference.observedAt}. ${reference.inputMode} Not a quote.`
|
|
1596
1612
|
] : [],
|
|
1613
|
+
...summary && summary !== price ? [` ${summary}`] : [],
|
|
1614
|
+
...(_nullishCoalesce(cost.details, () => ( []))).filter((detail) => detail !== price && detail !== summary).map((detail) => ` ${detail}`),
|
|
1597
1615
|
`Billing: ${billing}`
|
|
1598
1616
|
];
|
|
1599
1617
|
}
|
|
@@ -1602,19 +1620,19 @@ function printToolPricingOnly(tool, requestedToolId, options = {}) {
|
|
|
1602
1620
|
console.log(line);
|
|
1603
1621
|
}
|
|
1604
1622
|
function printToolSchemaOnly(tool, requestedToolId) {
|
|
1605
|
-
if (
|
|
1623
|
+
if (_chunkBN5VKY4Xjs.isMonitorTypeTool.call(void 0, tool)) {
|
|
1606
1624
|
printMonitorTypeFilters(tool);
|
|
1607
1625
|
printMonitorTypeStreams(tool);
|
|
1608
1626
|
return;
|
|
1609
1627
|
}
|
|
1610
|
-
const contract =
|
|
1628
|
+
const contract = _chunkBN5VKY4Xjs.toolContractJsonForDescribe.call(void 0,
|
|
1611
1629
|
tool,
|
|
1612
1630
|
requestedToolId,
|
|
1613
1631
|
void 0,
|
|
1614
1632
|
seedToolListScript
|
|
1615
1633
|
);
|
|
1616
|
-
const inputFields =
|
|
1617
|
-
|
|
1634
|
+
const inputFields = _chunkBN5VKY4Xjs.recursiveToolInputFieldsForDisplay.call(void 0,
|
|
1635
|
+
_chunkBN5VKY4Xjs.recordField.call(void 0, contract, "inputSchema")
|
|
1618
1636
|
);
|
|
1619
1637
|
console.log(`Schema: ${contract.toolId}`);
|
|
1620
1638
|
if (!inputFields.length) {
|
|
@@ -1641,27 +1659,27 @@ function printToolSchemaOnly(tool, requestedToolId) {
|
|
|
1641
1659
|
}
|
|
1642
1660
|
printToolOutputArrayShape(contract);
|
|
1643
1661
|
const declaredSchema = declaredToolJsonSchema(
|
|
1644
|
-
|
|
1662
|
+
_chunkBN5VKY4Xjs.recordField.call(void 0, contract, "inputSchema")
|
|
1645
1663
|
);
|
|
1646
1664
|
if (declaredSchema) {
|
|
1647
1665
|
console.log("Declared input JSON Schema:");
|
|
1648
1666
|
console.log(JSON.stringify(declaredSchema, null, 2));
|
|
1649
1667
|
}
|
|
1650
|
-
if (
|
|
1668
|
+
if (_chunkBN5VKY4Xjs.isRecord.call(void 0, contract.responseSchema)) {
|
|
1651
1669
|
console.log("Deepline execution response JSON Schema:");
|
|
1652
1670
|
console.log(JSON.stringify(contract.responseSchema, null, 2));
|
|
1653
1671
|
}
|
|
1654
1672
|
}
|
|
1655
1673
|
function printToolExamplesOnly(tool, requestedToolId) {
|
|
1656
|
-
if (
|
|
1674
|
+
if (_chunkBN5VKY4Xjs.isMonitorTypeTool.call(void 0, tool)) {
|
|
1657
1675
|
printMonitorTypeDeploy(tool);
|
|
1658
1676
|
return;
|
|
1659
1677
|
}
|
|
1660
|
-
if (
|
|
1678
|
+
if (_chunkBN5VKY4Xjs.isPlayLikeTool.call(void 0, tool)) {
|
|
1661
1679
|
printPlayLikeToolUsage(tool, requestedToolId);
|
|
1662
1680
|
return;
|
|
1663
1681
|
}
|
|
1664
|
-
const contract =
|
|
1682
|
+
const contract = _chunkBN5VKY4Xjs.toolContractJsonForDescribe.call(void 0,
|
|
1665
1683
|
tool,
|
|
1666
1684
|
requestedToolId,
|
|
1667
1685
|
void 0,
|
|
@@ -1669,9 +1687,9 @@ function printToolExamplesOnly(tool, requestedToolId) {
|
|
|
1669
1687
|
);
|
|
1670
1688
|
const toolId = String(contract.toolId);
|
|
1671
1689
|
const inputFields = Array.isArray(contract.inputFields) ? contract.inputFields : [];
|
|
1672
|
-
const examples =
|
|
1690
|
+
const examples = _chunkBN5VKY4Xjs.arrayField.call(void 0, tool, "examples").filter(_chunkBN5VKY4Xjs.isRecord);
|
|
1673
1691
|
const firstExample = examples[0];
|
|
1674
|
-
const sampleInput = firstExample &&
|
|
1692
|
+
const sampleInput = firstExample && _chunkBN5VKY4Xjs.isRecord.call(void 0, firstExample.input) ? firstExample.input : _nullishCoalesce(samplePayload(_chunkBN5VKY4Xjs.recordField.call(void 0, tool, "samples"), "request"), () => ( _chunkBN5VKY4Xjs.samplePayloadForInputFields.call(void 0, inputFields)));
|
|
1675
1693
|
console.log("Example input payload:");
|
|
1676
1694
|
console.log(JSON.stringify(sampleInput, null, 2));
|
|
1677
1695
|
console.log(`Use in a play:`);
|
|
@@ -1685,32 +1703,32 @@ function printToolExamplesOnly(tool, requestedToolId) {
|
|
|
1685
1703
|
);
|
|
1686
1704
|
console.log("});");
|
|
1687
1705
|
console.log("const response = result.toolResponse.rawV2;");
|
|
1688
|
-
const getters =
|
|
1706
|
+
const getters = _chunkBN5VKY4Xjs.isRecord.call(void 0, contract.getters) ? contract.getters : {};
|
|
1689
1707
|
const valueGetters = Array.isArray(getters.extractedValues) ? getters.extractedValues : [];
|
|
1690
1708
|
const listGetters = Array.isArray(getters.extractedLists) ? getters.extractedLists : [];
|
|
1691
|
-
const firstGetter = valueGetters.find(
|
|
1709
|
+
const firstGetter = valueGetters.find(_chunkBN5VKY4Xjs.isRecord);
|
|
1692
1710
|
if (firstGetter) {
|
|
1693
|
-
const name =
|
|
1694
|
-
const expression =
|
|
1711
|
+
const name = _chunkBN5VKY4Xjs.stringField.call(void 0, firstGetter, "name") || "value";
|
|
1712
|
+
const expression = _chunkBN5VKY4Xjs.stringField.call(void 0, firstGetter, "expression");
|
|
1695
1713
|
if (expression)
|
|
1696
1714
|
console.log(
|
|
1697
1715
|
`const ${safeIdentifier(name)} = ${expression.replace(/^toolExecutionResult\./, "result.")};`
|
|
1698
1716
|
);
|
|
1699
1717
|
}
|
|
1700
1718
|
const arrayNames = new Set(
|
|
1701
|
-
|
|
1702
|
-
|
|
1719
|
+
_chunkBN5VKY4Xjs.recursiveToolInputFieldsForDisplay.call(void 0,
|
|
1720
|
+
_chunkBN5VKY4Xjs.recordField.call(void 0, tool, "outputSchema", "output_schema")
|
|
1703
1721
|
).filter((field) => String(field.type).split("|").includes("array")).map((field) => String(field.name).split(".").at(-1))
|
|
1704
1722
|
);
|
|
1705
1723
|
const firstList = _nullishCoalesce(listGetters.find(
|
|
1706
|
-
(entry) =>
|
|
1707
|
-
), () => ( listGetters.find(
|
|
1708
|
-
if (
|
|
1709
|
-
const name = safeIdentifier(
|
|
1724
|
+
(entry) => _chunkBN5VKY4Xjs.isRecord.call(void 0, entry) && arrayNames.has(_chunkBN5VKY4Xjs.stringField.call(void 0, entry, "name"))
|
|
1725
|
+
), () => ( listGetters.find(_chunkBN5VKY4Xjs.isRecord)));
|
|
1726
|
+
if (_chunkBN5VKY4Xjs.isRecord.call(void 0, firstList)) {
|
|
1727
|
+
const name = safeIdentifier(_chunkBN5VKY4Xjs.stringField.call(void 0, firstList, "name") || "list");
|
|
1710
1728
|
if (_chunkJ33TSWO5js.playToolListGetterMode.call(void 0, ) === "array") {
|
|
1711
|
-
console.log(`const ${name}_rows = ${
|
|
1729
|
+
console.log(`const ${name}_rows = ${_chunkBN5VKY4Xjs.playResultExpression.call(void 0, firstList)};`);
|
|
1712
1730
|
} else {
|
|
1713
|
-
console.log(`const ${name}_ds = ${
|
|
1731
|
+
console.log(`const ${name}_ds = ${_chunkBN5VKY4Xjs.playResultExpression.call(void 0, firstList)};`);
|
|
1714
1732
|
console.log(
|
|
1715
1733
|
"// Complete small list from this response; throws above the memory cap."
|
|
1716
1734
|
);
|
|
@@ -1720,7 +1738,7 @@ function printToolExamplesOnly(tool, requestedToolId) {
|
|
|
1720
1738
|
console.log("```");
|
|
1721
1739
|
if (firstList) printListGetterConsumption();
|
|
1722
1740
|
for (const example of examples) {
|
|
1723
|
-
const description =
|
|
1741
|
+
const description = _chunkBN5VKY4Xjs.stringField.call(void 0, example, "description");
|
|
1724
1742
|
if (description) console.log(description);
|
|
1725
1743
|
console.log("Example Deepline execution response:");
|
|
1726
1744
|
console.log(JSON.stringify(example.response, null, 2));
|
|
@@ -1735,14 +1753,14 @@ function printToolExamplesOnly(tool, requestedToolId) {
|
|
|
1735
1753
|
}
|
|
1736
1754
|
function printPlayLikeToolUsage(tool, requestedToolId) {
|
|
1737
1755
|
const toolId = String(tool.toolId || requestedToolId);
|
|
1738
|
-
const inputFields =
|
|
1739
|
-
|
|
1756
|
+
const inputFields = _chunkBN5VKY4Xjs.toolInputFieldsForDisplay.call(void 0,
|
|
1757
|
+
_chunkBN5VKY4Xjs.recordField.call(void 0, tool, "inputSchema", "input_schema")
|
|
1740
1758
|
);
|
|
1741
|
-
const sampleInput =
|
|
1742
|
-
const playReference =
|
|
1759
|
+
const sampleInput = _chunkBN5VKY4Xjs.samplePayloadForInputFields.call(void 0, inputFields);
|
|
1760
|
+
const playReference = _chunkBN5VKY4Xjs.playReferenceForTool.call(void 0, tool);
|
|
1743
1761
|
console.log("Run as a play:");
|
|
1744
1762
|
console.log(
|
|
1745
|
-
|
|
1763
|
+
_chunkBN5VKY4Xjs.playRunCommandForTool.call(void 0,
|
|
1746
1764
|
tool,
|
|
1747
1765
|
toolId,
|
|
1748
1766
|
Object.keys(sampleInput).length ? sampleInput : void 0
|
|
@@ -1753,13 +1771,13 @@ function printPlayLikeToolUsage(tool, requestedToolId) {
|
|
|
1753
1771
|
}
|
|
1754
1772
|
}
|
|
1755
1773
|
function printToolGettersOnly(tool, requestedToolId) {
|
|
1756
|
-
const contract =
|
|
1774
|
+
const contract = _chunkBN5VKY4Xjs.toolContractJsonForDescribe.call(void 0,
|
|
1757
1775
|
tool,
|
|
1758
1776
|
requestedToolId,
|
|
1759
1777
|
void 0,
|
|
1760
1778
|
seedToolListScript
|
|
1761
1779
|
);
|
|
1762
|
-
const getters =
|
|
1780
|
+
const getters = _chunkBN5VKY4Xjs.isRecord.call(void 0, contract.getters) ? contract.getters : {};
|
|
1763
1781
|
const listGetters = Array.isArray(getters.extractedLists) ? getters.extractedLists : [];
|
|
1764
1782
|
const valueGetters = Array.isArray(getters.extractedValues) ? getters.extractedValues : [];
|
|
1765
1783
|
console.log(`Getters: ${contract.toolId}`);
|
|
@@ -1770,9 +1788,9 @@ function printToolGettersOnly(tool, requestedToolId) {
|
|
|
1770
1788
|
if (listGetters.length) {
|
|
1771
1789
|
console.log(listGetterHeading());
|
|
1772
1790
|
for (const entry of listGetters) {
|
|
1773
|
-
if (
|
|
1791
|
+
if (_chunkBN5VKY4Xjs.isRecord.call(void 0, entry))
|
|
1774
1792
|
console.log(
|
|
1775
|
-
`- ${
|
|
1793
|
+
`- ${_chunkBN5VKY4Xjs.stringField.call(void 0, entry, "name")}: ${_chunkBN5VKY4Xjs.playResultExpression.call(void 0, entry)}`
|
|
1776
1794
|
);
|
|
1777
1795
|
}
|
|
1778
1796
|
printListGetterConsumption();
|
|
@@ -1780,9 +1798,9 @@ function printToolGettersOnly(tool, requestedToolId) {
|
|
|
1780
1798
|
if (valueGetters.length) {
|
|
1781
1799
|
console.log("Values:");
|
|
1782
1800
|
for (const entry of valueGetters) {
|
|
1783
|
-
if (
|
|
1801
|
+
if (_chunkBN5VKY4Xjs.isRecord.call(void 0, entry))
|
|
1784
1802
|
console.log(
|
|
1785
|
-
`- ${
|
|
1803
|
+
`- ${_chunkBN5VKY4Xjs.stringField.call(void 0, entry, "name")}: ${_chunkBN5VKY4Xjs.playResultExpression.call(void 0, entry)}`
|
|
1786
1804
|
);
|
|
1787
1805
|
}
|
|
1788
1806
|
}
|
|
@@ -1820,22 +1838,22 @@ function listedToolDescription(tool) {
|
|
|
1820
1838
|
}
|
|
1821
1839
|
function formatListedToolCost(tool) {
|
|
1822
1840
|
const record = tool;
|
|
1823
|
-
if (
|
|
1841
|
+
if (_chunkBN5VKY4Xjs.stringField.call(void 0, record, "billingSource", "billing_source") === "free") {
|
|
1824
1842
|
return "Cost: Free";
|
|
1825
1843
|
}
|
|
1826
|
-
const pricing =
|
|
1827
|
-
const displayText =
|
|
1844
|
+
const pricing = _chunkBN5VKY4Xjs.recordField.call(void 0, record, "pricing");
|
|
1845
|
+
const displayText = _chunkBN5VKY4Xjs.stringField.call(void 0, pricing, "displayText", "display_text");
|
|
1828
1846
|
return displayText ? `Cost: ${displayText}` : "";
|
|
1829
1847
|
}
|
|
1830
1848
|
function printToolOutputArrayShape(tool) {
|
|
1831
|
-
const outputFields =
|
|
1832
|
-
|
|
1849
|
+
const outputFields = _chunkBN5VKY4Xjs.toolOutputFieldsForDisplay.call(void 0,
|
|
1850
|
+
_chunkBN5VKY4Xjs.recordField.call(void 0, _chunkBN5VKY4Xjs.isRecord.call(void 0, tool) ? tool : {}, "outputSchema", "output_schema")
|
|
1833
1851
|
);
|
|
1834
1852
|
if (outputFields.length === 0) return;
|
|
1835
1853
|
console.log(" Output array shape (declared schema):");
|
|
1836
1854
|
for (const field of outputFields.slice(0, 60)) {
|
|
1837
1855
|
const name = String(field.name);
|
|
1838
|
-
const type =
|
|
1856
|
+
const type = _chunkBN5VKY4Xjs.stringField.call(void 0, field, "type") || "unknown";
|
|
1839
1857
|
const itemBounds = arrayItemBoundsSuffix(field);
|
|
1840
1858
|
console.log(` - ${name}: ${type}${itemBounds}`);
|
|
1841
1859
|
}
|
|
@@ -1844,14 +1862,14 @@ function printToolOutputArrayShape(tool) {
|
|
|
1844
1862
|
}
|
|
1845
1863
|
}
|
|
1846
1864
|
function declaredToolJsonSchema(inputSchema) {
|
|
1847
|
-
if (
|
|
1865
|
+
if (_chunkBN5VKY4Xjs.isRecord.call(void 0, inputSchema.jsonSchema)) {
|
|
1848
1866
|
return inputSchema.jsonSchema;
|
|
1849
1867
|
}
|
|
1850
1868
|
return Array.isArray(inputSchema.fields) ? null : inputSchema;
|
|
1851
1869
|
}
|
|
1852
1870
|
function arrayItemBoundsSuffix(field) {
|
|
1853
|
-
const itemSchema =
|
|
1854
|
-
const itemType = itemSchema ? typeof itemSchema.type === "string" ? itemSchema.type :
|
|
1871
|
+
const itemSchema = _chunkBN5VKY4Xjs.isRecord.call(void 0, field.items) ? field.items : null;
|
|
1872
|
+
const itemType = itemSchema ? typeof itemSchema.type === "string" ? itemSchema.type : _chunkBN5VKY4Xjs.isRecord.call(void 0, itemSchema.properties) ? "object" : "unknown" : null;
|
|
1855
1873
|
const itemEnum = Array.isArray(_optionalChain([itemSchema, 'optionalAccess', _14 => _14.enum])) ? ` enum=${itemSchema.enum.map(String).join("|")}` : "";
|
|
1856
1874
|
const itemTypeSuffix = itemType && itemType !== "unknown" ? ` items=${itemType}${itemEnum}` : "";
|
|
1857
1875
|
const minItems = typeof field.minItems === "number" && Number.isFinite(field.minItems) ? field.minItems : null;
|
|
@@ -1864,21 +1882,21 @@ function arrayItemBoundsSuffix(field) {
|
|
|
1864
1882
|
return itemTypeSuffix;
|
|
1865
1883
|
}
|
|
1866
1884
|
function printToolExecutionHints(value) {
|
|
1867
|
-
const batchCapabilityRecord =
|
|
1868
|
-
|
|
1885
|
+
const batchCapabilityRecord = _chunkBN5VKY4Xjs.recordField.call(void 0,
|
|
1886
|
+
_chunkBN5VKY4Xjs.isRecord.call(void 0, value) ? value : {},
|
|
1869
1887
|
"batchCapability",
|
|
1870
1888
|
"batch_capability"
|
|
1871
1889
|
);
|
|
1872
1890
|
const batchCapability = Object.keys(batchCapabilityRecord).length > 0 ? batchCapabilityRecord : null;
|
|
1873
|
-
const executionMetadata =
|
|
1874
|
-
|
|
1891
|
+
const executionMetadata = _chunkBN5VKY4Xjs.recordField.call(void 0,
|
|
1892
|
+
_chunkBN5VKY4Xjs.isRecord.call(void 0, value) ? value : {},
|
|
1875
1893
|
"executionMetadata",
|
|
1876
1894
|
"execution_metadata"
|
|
1877
1895
|
);
|
|
1878
1896
|
if (batchCapability) {
|
|
1879
|
-
const status =
|
|
1880
|
-
const surface =
|
|
1881
|
-
const operation =
|
|
1897
|
+
const status = _chunkBN5VKY4Xjs.stringField.call(void 0, batchCapability, "status") || "unknown";
|
|
1898
|
+
const surface = _chunkBN5VKY4Xjs.stringField.call(void 0, batchCapability, "surface");
|
|
1899
|
+
const operation = _chunkBN5VKY4Xjs.stringField.call(void 0,
|
|
1882
1900
|
batchCapability,
|
|
1883
1901
|
"batchOperation",
|
|
1884
1902
|
"batch_operation"
|
|
@@ -1888,7 +1906,7 @@ function printToolExecutionHints(value) {
|
|
|
1888
1906
|
"maxBatchSize",
|
|
1889
1907
|
"max_batch_size"
|
|
1890
1908
|
);
|
|
1891
|
-
const notes =
|
|
1909
|
+
const notes = _chunkBN5VKY4Xjs.stringField.call(void 0, batchCapability, "notes");
|
|
1892
1910
|
console.log("");
|
|
1893
1911
|
console.log("Batching:");
|
|
1894
1912
|
console.log(`- Catalog status: ${status}${surface ? ` (${surface})` : ""}`);
|
|
@@ -1907,11 +1925,11 @@ function printToolExecutionHints(value) {
|
|
|
1907
1925
|
}
|
|
1908
1926
|
if (notes) console.log(`- Details: ${notes}`);
|
|
1909
1927
|
}
|
|
1910
|
-
const configuredRateLimits =
|
|
1928
|
+
const configuredRateLimits = _chunkBN5VKY4Xjs.arrayField.call(void 0,
|
|
1911
1929
|
executionMetadata,
|
|
1912
1930
|
"configuredRateLimits",
|
|
1913
1931
|
"configured_rate_limits"
|
|
1914
|
-
).filter(
|
|
1932
|
+
).filter(_chunkBN5VKY4Xjs.isRecord);
|
|
1915
1933
|
if (configuredRateLimits.length > 0) {
|
|
1916
1934
|
console.log("");
|
|
1917
1935
|
console.log(
|
|
@@ -1921,7 +1939,7 @@ function printToolExecutionHints(value) {
|
|
|
1921
1939
|
const requests = numberField(limit, "requestsPerWindow");
|
|
1922
1940
|
const windowMs = numberField(limit, "windowMs");
|
|
1923
1941
|
if (requests === null || windowMs === null) continue;
|
|
1924
|
-
const usage =
|
|
1942
|
+
const usage = _chunkBN5VKY4Xjs.stringField.call(void 0, limit, "usage") || "unknown";
|
|
1925
1943
|
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;
|
|
1926
1944
|
const explicitMaxConcurrency = numberField(
|
|
1927
1945
|
limit,
|
|
@@ -1930,11 +1948,11 @@ function printToolExecutionHints(value) {
|
|
|
1930
1948
|
);
|
|
1931
1949
|
const concurrencyText = explicitMaxConcurrency === null ? "no explicit concurrency limit" : `explicit concurrency limit ${explicitMaxConcurrency}`;
|
|
1932
1950
|
console.log(
|
|
1933
|
-
`- ${requests} requests per ${formatRateWindow(windowMs)}${
|
|
1951
|
+
`- ${requests} requests per ${formatRateWindow(windowMs)}${_chunkNTLBZUHDjs.rateLimitQualifier.call(void 0, limit)} (${usageText}; ${concurrencyText})`
|
|
1934
1952
|
);
|
|
1935
1953
|
}
|
|
1936
1954
|
}
|
|
1937
|
-
const queueHint =
|
|
1955
|
+
const queueHint = _chunkBN5VKY4Xjs.recordField.call(void 0, executionMetadata, "queueHint", "queue_hint");
|
|
1938
1956
|
const requestsPerSecondHint = numberField(
|
|
1939
1957
|
queueHint,
|
|
1940
1958
|
"requestsPerSecondHint",
|
|
@@ -1960,25 +1978,25 @@ function formatRateWindow(windowMs) {
|
|
|
1960
1978
|
}
|
|
1961
1979
|
function samplePayload(samples, key) {
|
|
1962
1980
|
const entry = samples[key];
|
|
1963
|
-
if (!
|
|
1981
|
+
if (!_chunkBN5VKY4Xjs.isRecord.call(void 0, entry)) return void 0;
|
|
1964
1982
|
return Object.prototype.hasOwnProperty.call(entry, "payload") ? entry.payload : entry;
|
|
1965
1983
|
}
|
|
1966
1984
|
function commandEnvelopeFromRawResponse(rawResponse) {
|
|
1967
|
-
return
|
|
1985
|
+
return _chunkBN5VKY4Xjs.isRecord.call(void 0, rawResponse) ? { ...rawResponse } : { status: "completed", result: rawResponse };
|
|
1968
1986
|
}
|
|
1969
1987
|
function toolExecuteExitCode(envelope) {
|
|
1970
1988
|
return envelope.status === "failed" || envelope.ok === false ? 1 : 0;
|
|
1971
1989
|
}
|
|
1972
1990
|
function extractToolExecutionWarningMessages(rawResponse) {
|
|
1973
|
-
if (!
|
|
1991
|
+
if (!_chunkBN5VKY4Xjs.isRecord.call(void 0, rawResponse)) return [];
|
|
1974
1992
|
const candidates = [
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
1993
|
+
_chunkBN5VKY4Xjs.recordField.call(void 0, _chunkBN5VKY4Xjs.recordField.call(void 0, rawResponse, "toolResponse"), "meta"),
|
|
1994
|
+
_chunkBN5VKY4Xjs.recordField.call(void 0,
|
|
1995
|
+
_chunkBN5VKY4Xjs.recordField.call(void 0, _chunkBN5VKY4Xjs.recordField.call(void 0, rawResponse, "toolResponse"), "raw"),
|
|
1978
1996
|
"meta"
|
|
1979
1997
|
),
|
|
1980
|
-
|
|
1981
|
-
|
|
1998
|
+
_chunkBN5VKY4Xjs.recordField.call(void 0, rawResponse, "meta"),
|
|
1999
|
+
_chunkBN5VKY4Xjs.recordField.call(void 0, _chunkBN5VKY4Xjs.recordField.call(void 0, rawResponse, "result"), "meta")
|
|
1982
2000
|
];
|
|
1983
2001
|
const messages = [];
|
|
1984
2002
|
for (const candidate of candidates) {
|
|
@@ -1987,8 +2005,8 @@ function extractToolExecutionWarningMessages(rawResponse) {
|
|
|
1987
2005
|
for (const warning of warnings) {
|
|
1988
2006
|
if (typeof warning === "string" && warning.trim()) {
|
|
1989
2007
|
messages.push(warning.trim());
|
|
1990
|
-
} else if (
|
|
1991
|
-
const message =
|
|
2008
|
+
} else if (_chunkBN5VKY4Xjs.isRecord.call(void 0, warning)) {
|
|
2009
|
+
const message = _chunkBN5VKY4Xjs.stringField.call(void 0, warning, "message");
|
|
1992
2010
|
if (message) messages.push(message);
|
|
1993
2011
|
}
|
|
1994
2012
|
}
|
|
@@ -1996,20 +2014,20 @@ function extractToolExecutionWarningMessages(rawResponse) {
|
|
|
1996
2014
|
return [...new Set(messages)];
|
|
1997
2015
|
}
|
|
1998
2016
|
function apifySyncRecoveryNext(rawResponse) {
|
|
1999
|
-
if (!
|
|
2000
|
-
const toolResponse =
|
|
2001
|
-
const raw =
|
|
2017
|
+
if (!_chunkBN5VKY4Xjs.isRecord.call(void 0, rawResponse) || rawResponse.status !== "running") return null;
|
|
2018
|
+
const toolResponse = _chunkBN5VKY4Xjs.recordField.call(void 0, rawResponse, "toolResponse");
|
|
2019
|
+
const raw = _chunkBN5VKY4Xjs.recordField.call(void 0, toolResponse, "raw");
|
|
2002
2020
|
if (raw.state !== "awaiting_apify") return null;
|
|
2003
|
-
const next =
|
|
2004
|
-
const getActorRun =
|
|
2005
|
-
const getActorRunTool =
|
|
2006
|
-
const getActorRunPayload =
|
|
2021
|
+
const next = _chunkBN5VKY4Xjs.recordField.call(void 0, raw, "next");
|
|
2022
|
+
const getActorRun = _chunkBN5VKY4Xjs.recordField.call(void 0, next, "getActorRun");
|
|
2023
|
+
const getActorRunTool = _chunkBN5VKY4Xjs.stringField.call(void 0, getActorRun, "tool");
|
|
2024
|
+
const getActorRunPayload = _chunkBN5VKY4Xjs.recordField.call(void 0, getActorRun, "payload");
|
|
2007
2025
|
if (!getActorRunTool || Object.keys(getActorRunPayload).length === 0) {
|
|
2008
2026
|
return null;
|
|
2009
2027
|
}
|
|
2010
|
-
const getDatasetItems =
|
|
2011
|
-
const getDatasetItemsTool =
|
|
2012
|
-
const getDatasetItemsPayload =
|
|
2028
|
+
const getDatasetItems = _chunkBN5VKY4Xjs.recordField.call(void 0, next, "getDatasetItems");
|
|
2029
|
+
const getDatasetItemsTool = _chunkBN5VKY4Xjs.stringField.call(void 0, getDatasetItems, "tool");
|
|
2030
|
+
const getDatasetItemsPayload = _chunkBN5VKY4Xjs.recordField.call(void 0, getDatasetItems, "payload");
|
|
2013
2031
|
return {
|
|
2014
2032
|
getActorRun: `deepline run ${getActorRunTool} --input ${_chunkAID3OYVJjs.shellQuote.call(void 0, JSON.stringify(getActorRunPayload))}`,
|
|
2015
2033
|
...getDatasetItemsTool && Object.keys(getDatasetItemsPayload).length > 0 ? {
|
|
@@ -2019,7 +2037,7 @@ function apifySyncRecoveryNext(rawResponse) {
|
|
|
2019
2037
|
}
|
|
2020
2038
|
function listExtractorPathsFromUsageGuidance(tool) {
|
|
2021
2039
|
const toolExecutionResult = _optionalChain([tool, 'access', _16 => _16.usageGuidance, 'optionalAccess', _17 => _17.toolExecutionResult]);
|
|
2022
|
-
const extractedLists = Array.isArray(_optionalChain([toolExecutionResult, 'optionalAccess', _18 => _18.extractedLists])) ? toolExecutionResult.extractedLists :
|
|
2040
|
+
const extractedLists = Array.isArray(_optionalChain([toolExecutionResult, 'optionalAccess', _18 => _18.extractedLists])) ? toolExecutionResult.extractedLists : _chunkBN5VKY4Xjs.isRecord.call(void 0, _optionalChain([toolExecutionResult, 'optionalAccess', _19 => _19.extractedLists])) ? Object.values(toolExecutionResult.extractedLists) : [];
|
|
2023
2041
|
return extractedLists.flatMap((entry) => {
|
|
2024
2042
|
const paths = _nullishCoalesce(_optionalChain([entry, 'access', _20 => _20.details, 'optionalAccess', _21 => _21.candidatePaths]), () => ( _optionalChain([entry, 'access', _22 => _22.details, 'optionalAccess', _23 => _23.rawToolOutputPaths])));
|
|
2025
2043
|
if (!Array.isArray(paths)) return [];
|
|
@@ -2104,7 +2122,7 @@ function parseJsonObjectArgument(raw, flagName) {
|
|
|
2104
2122
|
}
|
|
2105
2123
|
throw invalidJsonError(flagName, message);
|
|
2106
2124
|
}
|
|
2107
|
-
if (!
|
|
2125
|
+
if (!_chunkBN5VKY4Xjs.isRecord.call(void 0, parsed)) {
|
|
2108
2126
|
throw invalidJsonError(flagName, "expected an object.");
|
|
2109
2127
|
}
|
|
2110
2128
|
return parsed;
|
|
@@ -2148,7 +2166,7 @@ function parseExecuteOptions(toolId, options, output) {
|
|
|
2148
2166
|
outputFormat = normalizeOutputFormat(options.outputFormat);
|
|
2149
2167
|
}
|
|
2150
2168
|
if (options.idempotencyKey !== void 0) {
|
|
2151
|
-
|
|
2169
|
+
_chunkC5RQTTLPjs.validateExecutionIdempotencyKey.call(void 0, options.idempotencyKey);
|
|
2152
2170
|
}
|
|
2153
2171
|
if (options.recoveryTimeoutMs !== void 0) {
|
|
2154
2172
|
const parsed = Number(options.recoveryTimeoutMs);
|
|
@@ -2277,7 +2295,7 @@ function buildToolExecuteBaseEnvelope(input) {
|
|
|
2277
2295
|
kind: summaryEntries.length > 0 ? "object" : "raw",
|
|
2278
2296
|
summary: input.summary
|
|
2279
2297
|
};
|
|
2280
|
-
const envelopeHasCanonicalOutput =
|
|
2298
|
+
const envelopeHasCanonicalOutput = _chunkBN5VKY4Xjs.isRecord.call(void 0, envelope.toolResponse) && Object.prototype.hasOwnProperty.call(envelope.toolResponse, "raw");
|
|
2281
2299
|
const envelopeHasDeclaredOutput = Object.prototype.hasOwnProperty.call(
|
|
2282
2300
|
envelope,
|
|
2283
2301
|
"output"
|
|
@@ -2305,7 +2323,7 @@ function buildToolExecuteBaseEnvelope(input) {
|
|
|
2305
2323
|
return {
|
|
2306
2324
|
...envelope,
|
|
2307
2325
|
...input.idempotencyKey ? { idempotency_key: input.idempotencyKey } : {},
|
|
2308
|
-
...
|
|
2326
|
+
..._chunkBN5VKY4Xjs.isRecord.call(void 0, input.rawResponse) && _chunkBN5VKY4Xjs.isRecord.call(void 0, input.rawResponse.executionRecovery) ? { execution_recovery: input.rawResponse.executionRecovery } : {},
|
|
2309
2327
|
...envelopeHasCanonicalOutput || envelopeHasDeclaredOutput ? { output_preview: outputPreview } : { output: outputPreview },
|
|
2310
2328
|
...summaryEntries.length > 0 ? { summary: input.summary } : {},
|
|
2311
2329
|
...warningMessages.length > 0 ? { warnings: warningMessages } : {},
|
|
@@ -2366,7 +2384,7 @@ function buildToolExecuteRowArtifactEnvelope(input) {
|
|
|
2366
2384
|
void _render;
|
|
2367
2385
|
void _next;
|
|
2368
2386
|
void _local;
|
|
2369
|
-
const billingLookup =
|
|
2387
|
+
const billingLookup = _chunkBN5VKY4Xjs.isRecord.call(void 0, input.baseEnvelope.next) && typeof input.baseEnvelope.next.billing === "string" ? input.baseEnvelope.next.billing : null;
|
|
2370
2388
|
const inspection = toolExecutionInspection(input);
|
|
2371
2389
|
return {
|
|
2372
2390
|
...base,
|
|
@@ -2462,7 +2480,7 @@ function printToolExecutionWarnings(toolId, params, metadata) {
|
|
|
2462
2480
|
}
|
|
2463
2481
|
}
|
|
2464
2482
|
function assertExecutableToolMetadata(toolId, metadata) {
|
|
2465
|
-
if (
|
|
2483
|
+
if (_chunkBN5VKY4Xjs.isPlayLikeTool.call(void 0, metadata)) {
|
|
2466
2484
|
throw new (0, _chunkDIAWYWT5js.DeeplineError)(
|
|
2467
2485
|
playLikeToolExecuteErrorMessage(
|
|
2468
2486
|
toolId,
|
|
@@ -2480,7 +2498,7 @@ function valueAt(value, path) {
|
|
|
2480
2498
|
for (const [index, part] of parts.entries()) {
|
|
2481
2499
|
const each = part === "*" || part.endsWith("[*]");
|
|
2482
2500
|
if (part !== "*") {
|
|
2483
|
-
at =
|
|
2501
|
+
at = _chunkBN5VKY4Xjs.isRecord.call(void 0, at) ? at[each ? part.slice(0, -3) : part] : void 0;
|
|
2484
2502
|
}
|
|
2485
2503
|
if (!each) continue;
|
|
2486
2504
|
if (!Array.isArray(at)) return void 0;
|
|
@@ -2496,7 +2514,7 @@ function declaredOutputs(metadata, envelope, data) {
|
|
|
2496
2514
|
const getters = ["extractedValues", "extractedLists"].flatMap(
|
|
2497
2515
|
(kind) => {
|
|
2498
2516
|
const group = _optionalChain([result, 'optionalAccess', _28 => _28[kind]]);
|
|
2499
|
-
return Array.isArray(group) ? group :
|
|
2517
|
+
return Array.isArray(group) ? group : _chunkBN5VKY4Xjs.isRecord.call(void 0, group) ? Object.entries(group).map(([name, getter]) => ({
|
|
2500
2518
|
name,
|
|
2501
2519
|
...getter
|
|
2502
2520
|
})) : [];
|
|
@@ -2521,13 +2539,13 @@ function declaredOutputs(metadata, envelope, data) {
|
|
|
2521
2539
|
}
|
|
2522
2540
|
function writeToolReceipt(input) {
|
|
2523
2541
|
const { response, metadata } = input;
|
|
2524
|
-
const envelope =
|
|
2542
|
+
const envelope = _chunkBN5VKY4Xjs.isRecord.call(void 0, response) ? response : {};
|
|
2525
2543
|
const jobId = typeof envelope.job_id === "string" ? envelope.job_id : null;
|
|
2526
|
-
const toolResponse =
|
|
2544
|
+
const toolResponse = _chunkBN5VKY4Xjs.recordField.call(void 0, envelope, "toolResponse");
|
|
2527
2545
|
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;
|
|
2528
2546
|
const status = typeof envelope.status === "string" ? envelope.status : "completed";
|
|
2529
|
-
const charged =
|
|
2530
|
-
|
|
2547
|
+
const charged = _chunkBN5VKY4Xjs.recordField.call(void 0, envelope, "billing").credits_charged;
|
|
2548
|
+
_chunk3CXHK4TWjs.writeExecutionOutput.call(void 0,
|
|
2531
2549
|
{
|
|
2532
2550
|
id: _nullishCoalesce(input.key, () => ( jobId)),
|
|
2533
2551
|
status,
|
|
@@ -2558,8 +2576,8 @@ async function executeToolForReceipt(input) {
|
|
|
2558
2576
|
let retryKey = null;
|
|
2559
2577
|
let received = false;
|
|
2560
2578
|
try {
|
|
2561
|
-
const cliInvocationId = _nullishCoalesce(
|
|
2562
|
-
const client = new (0,
|
|
2579
|
+
const cliInvocationId = _nullishCoalesce(_chunkFVDTERO2js.getToolExecuteInvocationId.call(void 0, ), () => ( _chunkFVDTERO2js.beginToolExecuteCommand.call(void 0, )));
|
|
2580
|
+
const client = new (0, _chunkTCQYWZFSjs.DeeplineClient)();
|
|
2563
2581
|
const metadata = assertExecutableToolMetadata(
|
|
2564
2582
|
toolId,
|
|
2565
2583
|
await _asyncNullishCoalesce(input.metadata, async () => ( await client.getTool(toolId, { cliInvocationId })))
|
|
@@ -2580,9 +2598,9 @@ async function executeToolForReceipt(input) {
|
|
|
2580
2598
|
...input.timeoutMs !== void 0 ? { timeout: input.timeoutMs } : {},
|
|
2581
2599
|
..._optionalChain([metadata, 'access', _35 => _35.executionMetadata, 'optionalAccess', _36 => _36.retrySafeTransientHttp]) === true ? { maxRetries: 2, retryApiErrors: true } : {},
|
|
2582
2600
|
...key ? { idempotencyKey: key } : {},
|
|
2583
|
-
searchRef:
|
|
2601
|
+
searchRef: _chunk33JUK73Xjs.recentSearchRef.call(void 0, ),
|
|
2584
2602
|
cliInvocationId,
|
|
2585
|
-
onResponseReceived:
|
|
2603
|
+
onResponseReceived: _chunk3CXHK4TWjs.recordApiResponse
|
|
2586
2604
|
}).catch((error) => {
|
|
2587
2605
|
const guidance = toolGuidanceLines(metadata.guidance);
|
|
2588
2606
|
if (guidance.length)
|
|
@@ -2605,7 +2623,7 @@ async function executeToolForReceipt(input) {
|
|
|
2605
2623
|
if (received) throw error;
|
|
2606
2624
|
const outcomeKnown = answeredWithFailure(error);
|
|
2607
2625
|
if (outcomeKnown) _optionalChain([retryKey, 'optionalAccess', _37 => _37.discard, 'call', _38 => _38()]);
|
|
2608
|
-
|
|
2626
|
+
_chunk3CXHK4TWjs.writeExecutionOutput.call(void 0,
|
|
2609
2627
|
{
|
|
2610
2628
|
id: outcomeKnown ? null : key,
|
|
2611
2629
|
status: "failed",
|
|
@@ -2629,11 +2647,11 @@ function answeredWithFailure(error) {
|
|
|
2629
2647
|
error.statusCode !== 408 && error.code !== "EXECUTION_OUTCOME_UNKNOWN";
|
|
2630
2648
|
}
|
|
2631
2649
|
async function getToolExecutionReceipt(key, output) {
|
|
2632
|
-
const client = new (0,
|
|
2650
|
+
const client = new (0, _chunkTCQYWZFSjs.DeeplineClient)();
|
|
2633
2651
|
const execution = await client.executions.getByKey(key);
|
|
2634
2652
|
output.label = `${execution.toolId} (tool)`;
|
|
2635
2653
|
if (execution.response === void 0) {
|
|
2636
|
-
|
|
2654
|
+
_chunk3CXHK4TWjs.writeExecutionOutput.call(void 0,
|
|
2637
2655
|
{
|
|
2638
2656
|
id: key,
|
|
2639
2657
|
status: execution.executionRecovery.state,
|
|
@@ -2662,19 +2680,19 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2662
2680
|
parsed = parseExecuteOptions(toolId, options, output);
|
|
2663
2681
|
} catch (error) {
|
|
2664
2682
|
if (wantsJson) {
|
|
2665
|
-
|
|
2683
|
+
_chunkF73PD2XDjs.printJsonError.call(void 0, error);
|
|
2666
2684
|
} else {
|
|
2667
2685
|
console.error(error instanceof Error ? error.message : String(error));
|
|
2668
2686
|
}
|
|
2669
2687
|
return error instanceof _chunkDIAWYWT5js.DeeplineError && error.code === "IDEMPOTENCY_KEY_INVALID" ? 2 : 1;
|
|
2670
2688
|
}
|
|
2671
|
-
const cliInvocationId = _nullishCoalesce(
|
|
2689
|
+
const cliInvocationId = _nullishCoalesce(_chunkFVDTERO2js.getToolExecuteInvocationId.call(void 0, ), () => ( _chunkFVDTERO2js.beginToolExecuteCommand.call(void 0, )));
|
|
2672
2690
|
const deferredCompatibility = deferCompatibility ? beginDeferredToolExecuteCompatibility(toolId, cliInvocationId) : void 0;
|
|
2673
|
-
const tracing =
|
|
2691
|
+
const tracing = _chunkYXGPMTAKjs.isCliTraceEnabled.call(void 0, );
|
|
2674
2692
|
const clientStartedAt = tracing ? performance.now() : void 0;
|
|
2675
|
-
const client = new (0,
|
|
2693
|
+
const client = new (0, _chunkTCQYWZFSjs.DeeplineClient)();
|
|
2676
2694
|
if (clientStartedAt !== void 0) {
|
|
2677
|
-
|
|
2695
|
+
_chunkYXGPMTAKjs.recordCliTrace.call(void 0, {
|
|
2678
2696
|
phase: "cli.tool_execute_client_setup",
|
|
2679
2697
|
ms: performance.now() - clientStartedAt
|
|
2680
2698
|
});
|
|
@@ -2683,13 +2701,13 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2683
2701
|
const readMetadata = async () => {
|
|
2684
2702
|
if (metadata) return assertExecutableToolMetadata(parsed.toolId, metadata);
|
|
2685
2703
|
try {
|
|
2686
|
-
metadata = await
|
|
2704
|
+
metadata = await _chunkFVDTERO2js.runToolExecuteStage.call(void 0,
|
|
2687
2705
|
"tool metadata lookup",
|
|
2688
2706
|
() => client.getTool(parsed.toolId, { cliInvocationId })
|
|
2689
2707
|
);
|
|
2690
2708
|
} catch (error) {
|
|
2691
2709
|
if (isMissingToolMetadataError(error)) {
|
|
2692
|
-
const play = await
|
|
2710
|
+
const play = await _chunkFVDTERO2js.runToolExecuteStage.call(void 0,
|
|
2693
2711
|
"play alias lookup",
|
|
2694
2712
|
() => findPlayForToolId(client, parsed.toolId, cliInvocationId)
|
|
2695
2713
|
);
|
|
@@ -2718,7 +2736,7 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2718
2736
|
assertExecutableToolMetadata(parsed.toolId, metadata);
|
|
2719
2737
|
} catch (error) {
|
|
2720
2738
|
if (error instanceof _chunkDIAWYWT5js.DeeplineError && error.code === "PLAY_ALIAS_USED_AS_TOOL") {
|
|
2721
|
-
if (wantsJson)
|
|
2739
|
+
if (wantsJson) _chunkF73PD2XDjs.printJsonError.call(void 0, error);
|
|
2722
2740
|
else console.error(error.message);
|
|
2723
2741
|
return 2;
|
|
2724
2742
|
}
|
|
@@ -2730,7 +2748,7 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2730
2748
|
metadata = await readMetadata();
|
|
2731
2749
|
} catch (error) {
|
|
2732
2750
|
if (error instanceof _chunkDIAWYWT5js.DeeplineError && error.code === "PLAY_ALIAS_USED_AS_TOOL") {
|
|
2733
|
-
if (wantsJson)
|
|
2751
|
+
if (wantsJson) _chunkF73PD2XDjs.printJsonError.call(void 0, error);
|
|
2734
2752
|
else console.error(error.message);
|
|
2735
2753
|
return 2;
|
|
2736
2754
|
}
|
|
@@ -2746,7 +2764,7 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2746
2764
|
metadata = await readMetadata();
|
|
2747
2765
|
} catch (error) {
|
|
2748
2766
|
if (error instanceof _chunkDIAWYWT5js.DeeplineError && error.code === "PLAY_ALIAS_USED_AS_TOOL") {
|
|
2749
|
-
if (wantsJson)
|
|
2767
|
+
if (wantsJson) _chunkF73PD2XDjs.printJsonError.call(void 0, error);
|
|
2750
2768
|
else console.error(error.message);
|
|
2751
2769
|
return 2;
|
|
2752
2770
|
}
|
|
@@ -2772,11 +2790,11 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2772
2790
|
responseIntent,
|
|
2773
2791
|
...idempotencyKey ? { idempotencyKey } : {},
|
|
2774
2792
|
...parsed.recoveryTimeoutMs !== void 0 ? { recoveryTimeoutMs: parsed.recoveryTimeoutMs } : {},
|
|
2775
|
-
searchRef:
|
|
2793
|
+
searchRef: _chunk33JUK73Xjs.recentSearchRef.call(void 0, ),
|
|
2776
2794
|
cliInvocationId,
|
|
2777
|
-
onResponseReceived:
|
|
2795
|
+
onResponseReceived: _chunk3CXHK4TWjs.recordApiResponse,
|
|
2778
2796
|
...tracing ? {
|
|
2779
|
-
onServerTiming: (serverTiming) =>
|
|
2797
|
+
onServerTiming: (serverTiming) => _chunkYXGPMTAKjs.recordCliTrace.call(void 0, {
|
|
2780
2798
|
phase: "tool_execute_server_timing",
|
|
2781
2799
|
cliInvocationId,
|
|
2782
2800
|
serverTiming,
|
|
@@ -2787,13 +2805,13 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2787
2805
|
let rawResponse;
|
|
2788
2806
|
let successfulCompatibilityResponse;
|
|
2789
2807
|
try {
|
|
2790
|
-
const executeResult = await
|
|
2808
|
+
const executeResult = await _chunkFVDTERO2js.runToolExecuteStage.call(void 0,
|
|
2791
2809
|
"execute request",
|
|
2792
2810
|
async () => {
|
|
2793
2811
|
try {
|
|
2794
2812
|
if (tracing) {
|
|
2795
2813
|
submissionStartedAt = performance.now();
|
|
2796
|
-
|
|
2814
|
+
_chunkYXGPMTAKjs.recordCliTrace.call(void 0, { phase: "cli.tool_execute_request_start" });
|
|
2797
2815
|
}
|
|
2798
2816
|
return await client.executeTool(parsed.toolId, parsed.params, {
|
|
2799
2817
|
...executeOptions,
|
|
@@ -2803,34 +2821,34 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2803
2821
|
} catch (error) {
|
|
2804
2822
|
if (!(error instanceof _chunkDIAWYWT5js.DeeplineError) || error.code !== "ATOMIC_TOOL_EXECUTE_UNSUPPORTED")
|
|
2805
2823
|
throw error;
|
|
2806
|
-
const baseUrl =
|
|
2824
|
+
const baseUrl = _chunkHS63YBT5js.resolveConfig.call(void 0, ).baseUrl;
|
|
2807
2825
|
if (maintenancePolicy !== "off") {
|
|
2808
|
-
|
|
2826
|
+
_chunkB3X4YWQ6js.flushDeferredSkillsSyncNotices.call(void 0, baseUrl);
|
|
2809
2827
|
}
|
|
2810
|
-
const compatibility = deferredCompatibility ? await deferredCompatibility.result : await
|
|
2828
|
+
const compatibility = deferredCompatibility ? await deferredCompatibility.result : await _chunkFVDTERO2js.runToolExecuteStage.call(void 0,
|
|
2811
2829
|
"SDK compatibility",
|
|
2812
|
-
() =>
|
|
2830
|
+
() => _chunkB3X4YWQ6js.checkSdkCompatibility.call(void 0, baseUrl, {
|
|
2813
2831
|
command: "tools execute",
|
|
2814
|
-
skillsVersion:
|
|
2832
|
+
skillsVersion: _chunkHS63YBT5js.readSdkSkillsLocalVersion.call(void 0, baseUrl),
|
|
2815
2833
|
persistCache: maintenancePolicy !== "off"
|
|
2816
2834
|
})
|
|
2817
2835
|
);
|
|
2818
2836
|
if (compatibility.error) throw compatibility.error;
|
|
2819
2837
|
metadata = _nullishCoalesce(_optionalChain([deferredCompatibility, 'optionalAccess', _44 => _44.readMetadata, 'call', _45 => _45()]), () => ( metadata));
|
|
2820
|
-
if (maintenancePolicy !== "off" && await
|
|
2838
|
+
if (maintenancePolicy !== "off" && await _chunkFVDTERO2js.maybeAutoUpdateAndRelaunch.call(void 0,
|
|
2821
2839
|
compatibility.response,
|
|
2822
2840
|
baseUrl,
|
|
2823
2841
|
maintenancePolicy
|
|
2824
2842
|
)) {
|
|
2825
2843
|
return void 0;
|
|
2826
2844
|
}
|
|
2827
|
-
|
|
2845
|
+
_chunkB3X4YWQ6js.enforceSdkCompatibilityResponse.call(void 0, compatibility.response, {
|
|
2828
2846
|
quietAdvisory: wantsJson
|
|
2829
2847
|
});
|
|
2830
2848
|
if (maintenancePolicy !== "off") {
|
|
2831
|
-
await
|
|
2849
|
+
await _chunkFVDTERO2js.runToolExecuteStage.call(void 0,
|
|
2832
2850
|
"agent skills sync",
|
|
2833
|
-
() =>
|
|
2851
|
+
() => _chunkB3X4YWQ6js.syncSdkSkillsIfNeeded.call(void 0, baseUrl, {
|
|
2834
2852
|
update: _optionalChain([compatibility, 'access', _46 => _46.response, 'optionalAccess', _47 => _47.skills]),
|
|
2835
2853
|
mode: "detached"
|
|
2836
2854
|
})
|
|
@@ -2839,7 +2857,7 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2839
2857
|
const legacyMetadata = await readMetadata();
|
|
2840
2858
|
if (tracing) {
|
|
2841
2859
|
submissionStartedAt = performance.now();
|
|
2842
|
-
|
|
2860
|
+
_chunkYXGPMTAKjs.recordCliTrace.call(void 0, { phase: "cli.tool_execute_request_start" });
|
|
2843
2861
|
}
|
|
2844
2862
|
return client.executeTool(parsed.toolId, parsed.params, {
|
|
2845
2863
|
...executeOptions,
|
|
@@ -2862,8 +2880,8 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2862
2880
|
metadata = _nullishCoalesce(deferredCompatibility.readMetadata(), () => ( metadata));
|
|
2863
2881
|
const updateRequiredBeforeExecution = error instanceof _chunkDIAWYWT5js.DeeplineError && error.code === "SDK_UPDATE_REQUIRED";
|
|
2864
2882
|
if (updateRequiredBeforeExecution && maintenancePolicy !== "off" && compatibility && !compatibility.error) {
|
|
2865
|
-
const baseUrl =
|
|
2866
|
-
if (await
|
|
2883
|
+
const baseUrl = _chunkHS63YBT5js.resolveConfig.call(void 0, ).baseUrl;
|
|
2884
|
+
if (await _chunkFVDTERO2js.maybeAutoUpdateAndRelaunch.call(void 0,
|
|
2867
2885
|
compatibility.response,
|
|
2868
2886
|
baseUrl,
|
|
2869
2887
|
maintenancePolicy
|
|
@@ -2887,7 +2905,7 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2887
2905
|
}
|
|
2888
2906
|
}
|
|
2889
2907
|
if (failure instanceof _chunkDIAWYWT5js.DeeplineError && failure.code === "PLAY_ALIAS_USED_AS_TOOL") {
|
|
2890
|
-
if (wantsJson)
|
|
2908
|
+
if (wantsJson) _chunkF73PD2XDjs.printJsonError.call(void 0, failure);
|
|
2891
2909
|
else console.error(failure.message);
|
|
2892
2910
|
return 2;
|
|
2893
2911
|
}
|
|
@@ -2914,9 +2932,9 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2914
2932
|
successfulCompatibilityResponse = _nullishCoalesce(compatibilityResponse, () => ( void 0));
|
|
2915
2933
|
const autoUpdate = _optionalChain([compatibilityResponse, 'optionalAccess', _54 => _54.auto_update]);
|
|
2916
2934
|
if (maintenancePolicy !== "off" && compatibilityResponse && _optionalChain([autoUpdate, 'optionalAccess', _55 => _55.should_auto_update]) && !autoUpdate.required && autoUpdate.reason !== "rollback_forced") {
|
|
2917
|
-
await
|
|
2935
|
+
await _chunkFVDTERO2js.maybeAutoUpdateAndRelaunch.call(void 0,
|
|
2918
2936
|
compatibilityResponse,
|
|
2919
|
-
|
|
2937
|
+
_chunkHS63YBT5js.resolveConfig.call(void 0, ).baseUrl,
|
|
2920
2938
|
maintenancePolicy
|
|
2921
2939
|
);
|
|
2922
2940
|
}
|
|
@@ -2934,8 +2952,8 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2934
2952
|
);
|
|
2935
2953
|
}
|
|
2936
2954
|
}
|
|
2937
|
-
const responseMetadata =
|
|
2938
|
-
|
|
2955
|
+
const responseMetadata = _chunkBN5VKY4Xjs.recordField.call(void 0,
|
|
2956
|
+
_chunkBN5VKY4Xjs.recordField.call(void 0, rawResponse, "_metadata"),
|
|
2939
2957
|
"tool"
|
|
2940
2958
|
);
|
|
2941
2959
|
const listOutputPaths = responseMetadata.listOutputPaths;
|
|
@@ -2947,11 +2965,11 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2947
2965
|
await readMetadata()
|
|
2948
2966
|
);
|
|
2949
2967
|
}
|
|
2950
|
-
if (
|
|
2968
|
+
if (_chunkBN5VKY4Xjs.isRecord.call(void 0, rawResponse)) {
|
|
2951
2969
|
const { _metadata, ...execution } = rawResponse;
|
|
2952
2970
|
rawResponse = execution;
|
|
2953
2971
|
}
|
|
2954
|
-
const { listConversion, summary, baseEnvelope } = await
|
|
2972
|
+
const { listConversion, summary, baseEnvelope } = await _chunkFVDTERO2js.runToolExecuteStage.call(void 0,
|
|
2955
2973
|
"result formatting",
|
|
2956
2974
|
async () => {
|
|
2957
2975
|
const listConversion2 = _chunkHGFFYVXNjs.tryConvertToList.call(void 0, rawResponse, {
|
|
@@ -2986,9 +3004,9 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2986
3004
|
}
|
|
2987
3005
|
skillsSyncAttempted = true;
|
|
2988
3006
|
try {
|
|
2989
|
-
await
|
|
3007
|
+
await _chunkFVDTERO2js.runToolExecuteStage.call(void 0,
|
|
2990
3008
|
"agent skills sync",
|
|
2991
|
-
() =>
|
|
3009
|
+
() => _chunkB3X4YWQ6js.syncSdkSkillsIfNeeded.call(void 0, _chunkHS63YBT5js.resolveConfig.call(void 0, ).baseUrl, {
|
|
2992
3010
|
update: deliveredCompatibilityResponse.skills,
|
|
2993
3011
|
mode: "detached"
|
|
2994
3012
|
})
|
|
@@ -2999,15 +3017,15 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
2999
3017
|
);
|
|
3000
3018
|
}
|
|
3001
3019
|
};
|
|
3002
|
-
const printDeliveredEnvelope = (envelope, options2 = {}) =>
|
|
3020
|
+
const printDeliveredEnvelope = (envelope, options2 = {}) => _chunkF73PD2XDjs.printCommandEnvelope.call(void 0, envelope, {
|
|
3003
3021
|
...options2,
|
|
3004
3022
|
json: _nullishCoalesce(options2.json, () => ( wantsJson))
|
|
3005
3023
|
});
|
|
3006
3024
|
const printDeliveredJsonEnvelope = async (envelope, options2 = {}) => {
|
|
3007
3025
|
await syncSkillsForDeliveredOutput();
|
|
3008
|
-
|
|
3026
|
+
_chunkF73PD2XDjs.printCommandEnvelope.call(void 0, envelope, { ...options2, json: true });
|
|
3009
3027
|
};
|
|
3010
|
-
const delivered = await
|
|
3028
|
+
const delivered = await _chunkFVDTERO2js.runToolExecuteStage.call(void 0, "output delivery", async () => {
|
|
3011
3029
|
if (!parsed.outPath && (parsed.outputFormat === "json" || parsed.outputFormat === "auto" && wantsJson)) {
|
|
3012
3030
|
await printDeliveredJsonEnvelope(baseEnvelope);
|
|
3013
3031
|
return true;
|
|
@@ -3020,7 +3038,7 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
3020
3038
|
await printDeliveredJsonEnvelope({
|
|
3021
3039
|
...baseEnvelope,
|
|
3022
3040
|
local: {
|
|
3023
|
-
...
|
|
3041
|
+
..._chunkBN5VKY4Xjs.isRecord.call(void 0, baseEnvelope.local) ? baseEnvelope.local : {},
|
|
3024
3042
|
payload_file: jsonPath
|
|
3025
3043
|
}
|
|
3026
3044
|
});
|
|
@@ -3036,7 +3054,7 @@ async function executeTool(toolId, options, compatibilityMetadata, deferCompatib
|
|
|
3036
3054
|
`${parsed.toolId} did not expose row-shaped output to write as CSV. ${inspection.inspectDescription} Run: ${inspection.inspect}`
|
|
3037
3055
|
);
|
|
3038
3056
|
if (wantsJson) {
|
|
3039
|
-
|
|
3057
|
+
_chunkF73PD2XDjs.printJsonError.call(void 0, error);
|
|
3040
3058
|
} else {
|
|
3041
3059
|
console.error(error.message);
|
|
3042
3060
|
}
|
|
@@ -3131,13 +3149,13 @@ inspect: ${inspection.inspect}
|
|
|
3131
3149
|
return true;
|
|
3132
3150
|
});
|
|
3133
3151
|
if (delivered) {
|
|
3134
|
-
await
|
|
3152
|
+
await _chunkFVDTERO2js.runToolExecuteStage.call(void 0,
|
|
3135
3153
|
"acknowledge delivery",
|
|
3136
3154
|
() => recovery.acknowledgeDelivery()
|
|
3137
3155
|
);
|
|
3138
3156
|
}
|
|
3139
3157
|
if (delivered && deliveredCompatibilityResponse && deliveredCompatibilityResponse.update_required !== true) {
|
|
3140
|
-
|
|
3158
|
+
_chunkB3X4YWQ6js.enforceSdkCompatibilityResponse.call(void 0, deliveredCompatibilityResponse, {
|
|
3141
3159
|
quietAdvisory: wantsJson || maintenancePolicy === "off" || _optionalChain([deliveredCompatibilityResponse, 'access', _58 => _58.auto_update, 'optionalAccess', _59 => _59.should_auto_update]) === true
|
|
3142
3160
|
});
|
|
3143
3161
|
}
|