deepline 0.3.329 → 0.3.330
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/billing-idempotency.ts +24 -0
- package/dist/bundling-sources/sdk/src/client.ts +22 -22
- package/dist/bundling-sources/sdk/src/release.ts +1 -1
- package/dist/cli/{auth-MFFVOITR.mjs → auth-A4XQ3KMW.mjs} +4 -4
- package/dist/cli/auth-XJJYQESF.js +31 -0
- package/dist/cli/{billing-LRBHWLIQ.mjs → billing-634WZLKG.mjs} +36 -14
- package/dist/cli/{billing-V4Y4OVQ7.js → billing-WLHXYC5Z.js} +101 -79
- package/dist/cli/{chunk-MO2XSC5I.mjs → chunk-3QZ22IZO.mjs} +4 -4
- package/dist/cli/{chunk-4FLEXYUC.js → chunk-46IVSO6O.js} +8 -8
- package/dist/cli/{chunk-HI7TAWFS.mjs → chunk-56RM5AQF.mjs} +5 -5
- package/dist/cli/{chunk-ERU2OR6F.mjs → chunk-5W636CDP.mjs} +2 -2
- package/dist/cli/{chunk-U4CTHVN7.js → chunk-63W4744F.js} +533 -532
- package/dist/cli/{chunk-YNSCELIJ.mjs → chunk-6VBXS43D.mjs} +2 -2
- package/dist/cli/{chunk-EROOAI5G.mjs → chunk-7DGZCMXQ.mjs} +1 -1
- package/dist/cli/{chunk-OUTIWGKY.js → chunk-7FWHOKNS.js} +26 -26
- package/dist/cli/{chunk-VLDLJZ75.js → chunk-FLIABSY6.js} +48 -48
- package/dist/cli/{chunk-VDIHLKGG.js → chunk-GHHLLEZK.js} +4 -4
- package/dist/cli/{chunk-J2E5R2VH.js → chunk-GKZZ32EV.js} +60 -60
- package/dist/cli/{chunk-75ZOTF3K.js → chunk-GS7GA7PI.js} +15 -15
- package/dist/cli/{chunk-OZGU7P2S.mjs → chunk-GTBS6LQH.mjs} +38 -22
- package/dist/cli/{chunk-XRYKLK56.js → chunk-LNDGT7NV.js} +45 -45
- package/dist/cli/{chunk-MFQQINUY.mjs → chunk-LQ5DD2UF.mjs} +2 -2
- package/dist/cli/{chunk-FK7PW6BP.mjs → chunk-MBI3BVSQ.mjs} +1 -1
- package/dist/cli/{chunk-KHZQFFOQ.js → chunk-O2L46S3I.js} +2 -2
- package/dist/cli/{chunk-SJV5MTOJ.mjs → chunk-PH2N6GC7.mjs} +1 -1
- package/dist/cli/{chunk-7T6DX5RK.mjs → chunk-SDSS4OTO.mjs} +62 -61
- package/dist/cli/{chunk-GCNER3HV.mjs → chunk-SZCUJ4AL.mjs} +1 -1
- package/dist/cli/{chunk-3RZJ3GEG.mjs → chunk-VFC6CZLF.mjs} +3 -3
- package/dist/cli/{chunk-U2N4CYT7.js → chunk-WHKTRZ3J.js} +6 -6
- package/dist/cli/{chunk-AD23W4S5.js → chunk-XUNMVZOW.js} +1 -1
- package/dist/cli/{chunk-ZXGUYTIT.js → chunk-YFP4UH2Y.js} +6 -6
- package/dist/cli/{chunk-GY2EEO2Y.js → chunk-YGFQ7YSM.js} +51 -35
- package/dist/cli/{chunk-HVPRQGF4.mjs → chunk-ZYPFCBW5.mjs} +1 -1
- package/dist/cli/client-3CREIHGC.js +20 -0
- package/dist/cli/{client-BNLD775D.mjs → client-WYFGEJOX.mjs} +3 -3
- package/dist/cli/{csv-7MVQECWG.mjs → csv-BDZSDXLU.mjs} +3 -3
- package/dist/cli/{csv-ZT6ZRQ3Z.js → csv-THMQDXCJ.js} +12 -12
- package/dist/cli/{db-C4BMZXJK.js → db-5BQJOZG7.js} +29 -29
- package/dist/cli/{db-ABLWLMX5.mjs → db-R2LTNLFM.mjs} +4 -4
- package/dist/cli/{describe-YALVN4WH.js → describe-F4G5H3SC.js} +15 -15
- package/dist/cli/{describe-XWOWAR32.mjs → describe-WECII7FS.mjs} +8 -8
- package/dist/cli/{executions-U4TNRP26.js → executions-HJRVD4M6.js} +6 -6
- package/dist/cli/{executions-7IZVKQ3O.mjs → executions-HPRIRB73.mjs} +4 -4
- package/dist/cli/{feedback-GO5XPEKY.mjs → feedback-5VVW5WW7.mjs} +3 -3
- package/dist/cli/{feedback-NWMRT5W4.js → feedback-GHGDH43D.js} +6 -6
- package/dist/cli/{git-R53WS4WA.mjs → git-BBXML2UJ.mjs} +4 -4
- package/dist/cli/git-NNEBLRVP.js +23 -0
- package/dist/cli/index.js +79 -79
- package/dist/cli/index.mjs +31 -31
- package/dist/cli/{legacy-noops-6QAZW7WJ.mjs → legacy-noops-IALOUAGL.mjs} +4 -4
- package/dist/cli/{legacy-noops-NJWM53DE.js → legacy-noops-VNZZ3VVT.js} +7 -7
- package/dist/cli/{monitors-2I2MYAPS.js → monitors-MLP6IA2R.js} +85 -85
- package/dist/cli/{monitors-2N4BRU5M.mjs → monitors-VDEB2FKS.mjs} +4 -4
- package/dist/cli/{org-XVNAE2JV.js → org-N6ADDGEV.js} +60 -60
- package/dist/cli/{org-D3RHK2Q7.mjs → org-SDSSKY42.mjs} +4 -4
- package/dist/cli/play-UTIPBVDQ.js +153 -0
- package/dist/cli/{play-L7MYJZ65.mjs → play-VSTVY6PM.mjs} +7 -7
- package/dist/cli/{providers-5BTDAZHN.js → providers-TJ42O6NN.js} +7 -7
- package/dist/cli/{providers-YM4E7WZD.mjs → providers-UKC7KD3W.mjs} +4 -4
- package/dist/cli/{quickstart-5A3FHAH3.js → quickstart-7S7NMCMX.js} +5 -5
- package/dist/cli/{quickstart-ARPLJOLH.mjs → quickstart-WSKATNHJ.mjs} +3 -3
- package/dist/cli/{search-KKJEVV27.mjs → search-6OS6VVCJ.mjs} +5 -5
- package/dist/cli/search-Y6UGKL5C.js +26 -0
- package/dist/cli/{secrets-DVPVCSZD.js → secrets-GWLYB2KD.js} +13 -13
- package/dist/cli/{secrets-DGRJ4DO5.mjs → secrets-QTTR5R5M.mjs} +4 -4
- package/dist/cli/{sessions-56EHXLZD.mjs → sessions-Q7MY5YYI.mjs} +4 -4
- package/dist/cli/{sessions-VG4ATQ5Y.js → sessions-SUURWTVX.js} +5 -5
- package/dist/cli/{settings-4U5XG7QI.mjs → settings-3D5YDD2B.mjs} +7 -7
- package/dist/cli/{settings-BLOTIW2G.js → settings-W4DYMYFA.js} +74 -74
- package/dist/cli/{setup-RHJAHPOR.mjs → setup-5F5OGYKW.mjs} +6 -6
- package/dist/cli/{setup-L7AMAXCH.js → setup-NIUADTDP.js} +41 -41
- package/dist/cli/skills-SHUL5UT7.js +28 -0
- package/dist/cli/{skills-VU55YFCI.mjs → skills-TV3ORUIG.mjs} +4 -4
- package/dist/cli/tools-GNIVV4OF.js +40 -0
- package/dist/cli/{tools-JS3YIDOH.mjs → tools-YSZWAFKO.mjs} +6 -6
- package/dist/cli/{update-EHI5QUXM.mjs → update-FJAMLGLT.mjs} +6 -6
- package/dist/cli/update-U3XGY6IT.js +28 -0
- package/dist/cli/{workflow-NE4SYRAT.js → workflow-C6ZCM5S4.js} +15 -15
- package/dist/cli/{workflow-BITLTLRF.mjs → workflow-HDHBYC7S.mjs} +5 -5
- package/dist/index.js +6 -6
- package/dist/index.mjs +3 -3
- package/dist/install-integrity.json +75 -74
- 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/package.json +1 -1
- package/dist/cli/auth-W2MQM6GQ.js +0 -31
- package/dist/cli/client-5AIFBLKQ.js +0 -20
- package/dist/cli/git-YWRLAOBY.js +0 -23
- package/dist/cli/play-OYRHI7G3.js +0 -153
- package/dist/cli/search-VE3O3ZEM.js +0 -26
- package/dist/cli/skills-QB4OQGGP.js +0 -28
- package/dist/cli/tools-2CPFYNK7.js +0 -40
- package/dist/cli/update-WXP24GU5.js +0 -28
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
RETAINED_PIPELINE_RECEIVERS_HEADER,
|
|
16
16
|
RUNTIME_ENVIRONMENT_TOKEN_HEADER,
|
|
17
17
|
resolveConfig
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-MBI3BVSQ.mjs";
|
|
19
19
|
import {
|
|
20
20
|
PLAY_RUNTIME_BACKENDS,
|
|
21
21
|
RAW_V2_TOOL_RESPONSE_CONTRACT,
|
|
@@ -82,6 +82,27 @@ function playInputExampleArgs(schema) {
|
|
|
82
82
|
return " --input '@<input.json>'";
|
|
83
83
|
}
|
|
84
84
|
|
|
85
|
+
// src/billing-idempotency.ts
|
|
86
|
+
function requireBillingIdempotencyKey(value) {
|
|
87
|
+
const normalized = value.trim();
|
|
88
|
+
let valid = normalized.length > 0 && normalized.length <= 200 && normalized === value;
|
|
89
|
+
if (valid) {
|
|
90
|
+
try {
|
|
91
|
+
valid = new Headers({ "Idempotency-Key": value }).get("Idempotency-Key") === value;
|
|
92
|
+
} catch {
|
|
93
|
+
valid = false;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
if (!valid) {
|
|
97
|
+
throw new DeeplineError(
|
|
98
|
+
"Billing idempotencyKey must contain 1\u2013200 characters with no leading or trailing whitespace and be valid HTTP header text.",
|
|
99
|
+
void 0,
|
|
100
|
+
"INVALID_BILLING_IDEMPOTENCY_KEY"
|
|
101
|
+
);
|
|
102
|
+
}
|
|
103
|
+
return value;
|
|
104
|
+
}
|
|
105
|
+
|
|
85
106
|
// src/db/query.ts
|
|
86
107
|
function planCustomerDbQuery(input) {
|
|
87
108
|
if (typeof input.sql !== "string" || !input.sql.trim())
|
|
@@ -3007,17 +3028,6 @@ var MONITOR_JOB_RECONCILIATION_STATES = [
|
|
|
3007
3028
|
"partial",
|
|
3008
3029
|
"mismatched"
|
|
3009
3030
|
];
|
|
3010
|
-
function requireTargetBillingIdempotencyKey(value) {
|
|
3011
|
-
const normalized = value.trim();
|
|
3012
|
-
if (normalized.length === 0 || normalized.length > 200 || normalized !== value) {
|
|
3013
|
-
throw new DeeplineError(
|
|
3014
|
-
"Billing idempotencyKey must contain 1\u2013200 characters with no leading or trailing whitespace.",
|
|
3015
|
-
void 0,
|
|
3016
|
-
"INVALID_BILLING_IDEMPOTENCY_KEY"
|
|
3017
|
-
);
|
|
3018
|
-
}
|
|
3019
|
-
return normalized;
|
|
3020
|
-
}
|
|
3021
3031
|
function isRecord2(value) {
|
|
3022
3032
|
return Boolean(value && typeof value === "object" && !Array.isArray(value));
|
|
3023
3033
|
}
|
|
@@ -3236,7 +3246,7 @@ var DeeplineClient = class _DeeplineClient {
|
|
|
3236
3246
|
"/api/v2/billing/auto-recharge/trigger",
|
|
3237
3247
|
{},
|
|
3238
3248
|
{
|
|
3239
|
-
"Idempotency-Key":
|
|
3249
|
+
"Idempotency-Key": requireBillingIdempotencyKey(
|
|
3240
3250
|
options2?.idempotencyKey ?? globalThis.crypto.randomUUID()
|
|
3241
3251
|
)
|
|
3242
3252
|
}
|
|
@@ -5671,13 +5681,14 @@ var DeeplineClient = class _DeeplineClient {
|
|
|
5671
5681
|
* requires confirmation.
|
|
5672
5682
|
*/
|
|
5673
5683
|
async topUpBillingBalance(options) {
|
|
5684
|
+
const idempotencyKey = options.idempotencyKey === void 0 ? void 0 : requireBillingIdempotencyKey(options.idempotencyKey);
|
|
5674
5685
|
return this.http.post(
|
|
5675
5686
|
"/api/v2/billing/top-up",
|
|
5676
5687
|
{
|
|
5677
5688
|
credits: options.credits,
|
|
5678
|
-
...
|
|
5689
|
+
...idempotencyKey !== void 0 ? { idempotency_key: idempotencyKey } : {}
|
|
5679
5690
|
},
|
|
5680
|
-
void 0,
|
|
5691
|
+
idempotencyKey === void 0 ? void 0 : { "Idempotency-Key": idempotencyKey },
|
|
5681
5692
|
// The idempotency key makes a retry at the product layer safe, but the
|
|
5682
5693
|
// CLI should not hide ambiguous local delivery failures behind implicit
|
|
5683
5694
|
// transport retries for a payment mutation.
|
|
@@ -5690,13 +5701,17 @@ var DeeplineClient = class _DeeplineClient {
|
|
|
5690
5701
|
* `client.billing.topUpWithReceipt(...)`.
|
|
5691
5702
|
*/
|
|
5692
5703
|
async topUpBillingBalanceWithReceipt(options) {
|
|
5704
|
+
const idempotencyKey = options.idempotencyKey === void 0 ? void 0 : requireBillingIdempotencyKey(options.idempotencyKey);
|
|
5693
5705
|
return this.http.post(
|
|
5694
5706
|
"/api/v2/billing/top-up",
|
|
5695
5707
|
{
|
|
5696
5708
|
credits: options.credits,
|
|
5697
|
-
...
|
|
5709
|
+
...idempotencyKey !== void 0 ? { idempotency_key: idempotencyKey } : {}
|
|
5710
|
+
},
|
|
5711
|
+
{
|
|
5712
|
+
"x-deepline-top-up-receipt": "operation-v1",
|
|
5713
|
+
...idempotencyKey !== void 0 ? { "Idempotency-Key": idempotencyKey } : {}
|
|
5698
5714
|
},
|
|
5699
|
-
{ "x-deepline-top-up-receipt": "operation-v1" },
|
|
5700
5715
|
{ maxRetries: 0, exactUrlOnly: true }
|
|
5701
5716
|
);
|
|
5702
5717
|
}
|
|
@@ -5761,7 +5776,7 @@ var DeeplineClient = class _DeeplineClient {
|
|
|
5761
5776
|
}
|
|
5762
5777
|
/** Update automatic recharge and return the server-verified configuration. */
|
|
5763
5778
|
async updateTargetAutoRecharge(options) {
|
|
5764
|
-
const idempotencyKey =
|
|
5779
|
+
const idempotencyKey = requireBillingIdempotencyKey(
|
|
5765
5780
|
options.idempotencyKey
|
|
5766
5781
|
);
|
|
5767
5782
|
const response = await this.http.put(
|
|
@@ -5782,7 +5797,7 @@ var DeeplineClient = class _DeeplineClient {
|
|
|
5782
5797
|
* flow. The caller supplies an idempotency key for safe retries.
|
|
5783
5798
|
*/
|
|
5784
5799
|
async purchaseTargetBillingCredits(options) {
|
|
5785
|
-
const idempotencyKey =
|
|
5800
|
+
const idempotencyKey = requireBillingIdempotencyKey(
|
|
5786
5801
|
options.idempotencyKey
|
|
5787
5802
|
);
|
|
5788
5803
|
return this.http.post(
|
|
@@ -5801,7 +5816,7 @@ var DeeplineClient = class _DeeplineClient {
|
|
|
5801
5816
|
"INVALID_BILLING_IDEMPOTENCY_KEY"
|
|
5802
5817
|
);
|
|
5803
5818
|
}
|
|
5804
|
-
const idempotencyKey =
|
|
5819
|
+
const idempotencyKey = requireBillingIdempotencyKey(
|
|
5805
5820
|
options.idempotencyKey
|
|
5806
5821
|
);
|
|
5807
5822
|
if (!Number.isSafeInteger(options.credits) || options.credits <= 0) {
|
|
@@ -5830,7 +5845,7 @@ var DeeplineClient = class _DeeplineClient {
|
|
|
5830
5845
|
* commercial operation.
|
|
5831
5846
|
*/
|
|
5832
5847
|
async transitionTargetBillingPlan(options) {
|
|
5833
|
-
const idempotencyKey =
|
|
5848
|
+
const idempotencyKey = requireBillingIdempotencyKey(
|
|
5834
5849
|
options.idempotencyKey
|
|
5835
5850
|
);
|
|
5836
5851
|
return this.http.post(
|
|
@@ -5854,7 +5869,7 @@ var DeeplineClient = class _DeeplineClient {
|
|
|
5854
5869
|
}
|
|
5855
5870
|
/** Create an additional workspace through the durable PAYG workflow. */
|
|
5856
5871
|
async createWorkspace(options) {
|
|
5857
|
-
const idempotencyKey =
|
|
5872
|
+
const idempotencyKey = requireBillingIdempotencyKey(
|
|
5858
5873
|
options.idempotencyKey
|
|
5859
5874
|
);
|
|
5860
5875
|
const response = await this.http.post(
|
|
@@ -6472,6 +6487,7 @@ export {
|
|
|
6472
6487
|
CSV_HEADER_MATCHING_NOTE,
|
|
6473
6488
|
iterateCursorPages,
|
|
6474
6489
|
playInputExampleArgs,
|
|
6490
|
+
requireBillingIdempotencyKey,
|
|
6475
6491
|
planCustomerDbQuery,
|
|
6476
6492
|
validateExecutionIdempotencyKey,
|
|
6477
6493
|
PRODUCT_NOTIFICATION_EVENT_CATALOG,
|
|
@@ -10,7 +10,7 @@ var _chunkAID3OYVJjs = require('./chunk-AID3OYVJ.js');
|
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
var
|
|
13
|
+
var _chunk46IVSO6Ojs = require('./chunk-46IVSO6O.js');
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
|
|
@@ -22,7 +22,7 @@ var _chunkNXDRDJ4Kjs = require('./chunk-NXDRDJ4K.js');
|
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
|
|
25
|
-
var
|
|
25
|
+
var _chunkYGFQ7YSMjs = require('./chunk-YGFQ7YSM.js');
|
|
26
26
|
|
|
27
27
|
|
|
28
28
|
|
|
@@ -36,11 +36,11 @@ var _chunkQJBJZVG6js = require('./chunk-QJBJZVG6.js');
|
|
|
36
36
|
|
|
37
37
|
|
|
38
38
|
|
|
39
|
-
var
|
|
39
|
+
var _chunkWHKTRZ3Jjs = require('./chunk-WHKTRZ3J.js');
|
|
40
40
|
|
|
41
41
|
|
|
42
42
|
|
|
43
|
-
var
|
|
43
|
+
var _chunkGHHLLEZKjs = require('./chunk-GHHLLEZK.js');
|
|
44
44
|
|
|
45
45
|
|
|
46
46
|
var _chunkFKKNYKDYjs = require('./chunk-FKKNYKDY.js');
|
|
@@ -88,10 +88,10 @@ var ToolCallRecovery = class _ToolCallRecovery {
|
|
|
88
88
|
}
|
|
89
89
|
};
|
|
90
90
|
function pendingToolExecutionPath(input) {
|
|
91
|
-
const config =
|
|
91
|
+
const config = _chunkGHHLLEZKjs.resolveConfig.call(void 0, );
|
|
92
92
|
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(_chunkNXDRDJ4Kjs.stableStringify.call(void 0, input.params)).update("\0").update(input.responseIntent).digest("hex");
|
|
93
93
|
return _path.join.call(void 0,
|
|
94
|
-
|
|
94
|
+
_chunkGHHLLEZKjs.sdkCliStateDirPath.call(void 0, config.baseUrl),
|
|
95
95
|
`pending-tool-execution-${fingerprint}.json`
|
|
96
96
|
);
|
|
97
97
|
}
|
|
@@ -535,12 +535,12 @@ function categoryEnumerationRender(summaries) {
|
|
|
535
535
|
};
|
|
536
536
|
}
|
|
537
537
|
async function listToolCategories(emitJson, compact) {
|
|
538
|
-
const client = new (0,
|
|
538
|
+
const client = new (0, _chunkYGFQ7YSMjs.DeeplineClient)();
|
|
539
539
|
const rawTools = await client.listTools({ compact });
|
|
540
540
|
const items = rawTools.map(toListedTool);
|
|
541
541
|
const summaries = aggregateCategorySummaries(rawTools);
|
|
542
542
|
const outputItems = compact ? items.map(compactTool) : items;
|
|
543
|
-
|
|
543
|
+
_chunkWHKTRZ3Jjs.printCommandEnvelope.call(void 0,
|
|
544
544
|
{
|
|
545
545
|
tools: outputItems,
|
|
546
546
|
count: outputItems.length,
|
|
@@ -559,7 +559,7 @@ function unknownCategoryError(category, summaries, emitJson) {
|
|
|
559
559
|
const known = summaries.map((item) => item.name);
|
|
560
560
|
const message = `Unknown tool category "${category}". Run \`deepline tools list\` to browse categories.`;
|
|
561
561
|
if (emitJson) {
|
|
562
|
-
|
|
562
|
+
_chunkWHKTRZ3Jjs.printJson.call(void 0, {
|
|
563
563
|
ok: false,
|
|
564
564
|
exitCode: 4,
|
|
565
565
|
code: "TOOL_CATEGORY_NOT_FOUND",
|
|
@@ -573,13 +573,13 @@ function unknownCategoryError(category, summaries, emitJson) {
|
|
|
573
573
|
const render = categoryEnumerationRender(summaries);
|
|
574
574
|
console.error(message);
|
|
575
575
|
console.error("");
|
|
576
|
-
console.error(
|
|
576
|
+
console.error(_chunkWHKTRZ3Jjs.renderCommandEnvelopeText.call(void 0, { render }).trimEnd());
|
|
577
577
|
console.error("");
|
|
578
578
|
console.error(`Valid categories: ${known.join(", ")}`);
|
|
579
579
|
return 4;
|
|
580
580
|
}
|
|
581
581
|
async function listToolsInCategory(category, emitJson) {
|
|
582
|
-
const client = new (0,
|
|
582
|
+
const client = new (0, _chunkYGFQ7YSMjs.DeeplineClient)();
|
|
583
583
|
const rawTools = await client.listTools({
|
|
584
584
|
categories: category,
|
|
585
585
|
compact: false
|
|
@@ -616,7 +616,7 @@ async function listToolsInCategory(category, emitJson) {
|
|
|
616
616
|
}
|
|
617
617
|
]
|
|
618
618
|
};
|
|
619
|
-
|
|
619
|
+
_chunkWHKTRZ3Jjs.printCommandEnvelope.call(void 0,
|
|
620
620
|
{
|
|
621
621
|
category,
|
|
622
622
|
total: rows.length,
|
|
@@ -629,7 +629,7 @@ async function listToolsInCategory(category, emitJson) {
|
|
|
629
629
|
return 0;
|
|
630
630
|
}
|
|
631
631
|
async function listToolsForCategoryFilter(requestedCategories, emitJson, compact) {
|
|
632
|
-
const client = new (0,
|
|
632
|
+
const client = new (0, _chunkYGFQ7YSMjs.DeeplineClient)();
|
|
633
633
|
const items = (await client.listTools({
|
|
634
634
|
categories: requestedCategories.join(","),
|
|
635
635
|
compact
|
|
@@ -658,7 +658,7 @@ async function listToolsForCategoryFilter(requestedCategories, emitJson, compact
|
|
|
658
658
|
]
|
|
659
659
|
};
|
|
660
660
|
const outputItems = compact ? items.map(compactTool) : items;
|
|
661
|
-
|
|
661
|
+
_chunkWHKTRZ3Jjs.printCommandEnvelope.call(void 0,
|
|
662
662
|
{
|
|
663
663
|
tools: outputItems,
|
|
664
664
|
count: outputItems.length,
|
|
@@ -677,13 +677,13 @@ async function listTools(category, options = {}) {
|
|
|
677
677
|
const positional = _nullishCoalesce(_optionalChain([category, 'optionalAccess', _9 => _9.trim, 'call', _10 => _10()]), () => ( ""));
|
|
678
678
|
const flagCategories = (_nullishCoalesce(options.categories, () => ( ""))).split(",").map((item) => item.trim()).filter(Boolean);
|
|
679
679
|
const compact = options.compact !== false;
|
|
680
|
-
const emitJson = options.json === true ||
|
|
680
|
+
const emitJson = options.json === true || _chunkWHKTRZ3Jjs.shouldEmitJson.call(void 0, );
|
|
681
681
|
if (positional && flagCategories.length > 0) {
|
|
682
682
|
const flagIsSameSingle = flagCategories.length === 1 && flagCategories[0] === positional;
|
|
683
683
|
if (!flagIsSameSingle) {
|
|
684
684
|
const message = `Category "${positional}" and --categories ${flagCategories.join(",")} disagree. Pass one: deepline tools list ${positional}`;
|
|
685
685
|
if (emitJson) {
|
|
686
|
-
|
|
686
|
+
_chunkWHKTRZ3Jjs.printJson.call(void 0, {
|
|
687
687
|
ok: false,
|
|
688
688
|
exitCode: 2,
|
|
689
689
|
code: "TOOL_LIST_CATEGORY_CONFLICT",
|
|
@@ -710,7 +710,7 @@ async function grepTools(queryInput, options = {}) {
|
|
|
710
710
|
console.error("Usage: deepline tools grep <query> [--json]");
|
|
711
711
|
return 1;
|
|
712
712
|
}
|
|
713
|
-
const client = new (0,
|
|
713
|
+
const client = new (0, _chunkYGFQ7YSMjs.DeeplineClient)();
|
|
714
714
|
const requestedCategories = options.categories ? options.categories.split(",").map((item) => item.trim()).filter(Boolean) : [];
|
|
715
715
|
const mode = _nullishCoalesce(options.mode, () => ( "all"));
|
|
716
716
|
const jsonOutput = options.json === true;
|
|
@@ -753,7 +753,7 @@ async function grepTools(queryInput, options = {}) {
|
|
|
753
753
|
query,
|
|
754
754
|
mode
|
|
755
755
|
}) : null;
|
|
756
|
-
|
|
756
|
+
_chunkWHKTRZ3Jjs.printCommandEnvelope.call(void 0,
|
|
757
757
|
{
|
|
758
758
|
tools: outputTools,
|
|
759
759
|
count: outputTools.length,
|
|
@@ -771,7 +771,7 @@ async function grepTools(queryInput, options = {}) {
|
|
|
771
771
|
} : {},
|
|
772
772
|
commandTemplates: TOOL_COMMAND_TEMPLATES
|
|
773
773
|
},
|
|
774
|
-
{ json: options.json ||
|
|
774
|
+
{ json: options.json || _chunkWHKTRZ3Jjs.shouldEmitJson.call(void 0, ) }
|
|
775
775
|
);
|
|
776
776
|
return 0;
|
|
777
777
|
}
|
|
@@ -927,7 +927,7 @@ Examples:
|
|
|
927
927
|
json: Boolean(options.json)
|
|
928
928
|
});
|
|
929
929
|
});
|
|
930
|
-
|
|
930
|
+
_chunk46IVSO6Ojs.registerDeprecatedSearchCommand.call(void 0, tools, () => ["tools", "monitors"]);
|
|
931
931
|
tools.command("grep <query>").description(
|
|
932
932
|
"Literal grep over tool ids, descriptions, categories, and input fields."
|
|
933
933
|
).addHelpText(
|
|
@@ -1029,7 +1029,7 @@ Examples:
|
|
|
1029
1029
|
process.exitCode = await narrowView();
|
|
1030
1030
|
return;
|
|
1031
1031
|
}
|
|
1032
|
-
const { describeAnything } = await Promise.resolve().then(() => _interopRequireWildcard(require("./describe-
|
|
1032
|
+
const { describeAnything } = await Promise.resolve().then(() => _interopRequireWildcard(require("./describe-F4G5H3SC.js")));
|
|
1033
1033
|
process.exitCode = await describeAnything(
|
|
1034
1034
|
toolId,
|
|
1035
1035
|
{ ...options, kinds: ["tools", "monitors"], fetchedTool: metadata },
|
|
@@ -1111,7 +1111,7 @@ async function getTool(toolId, options = {}, compatibilityMetadata) {
|
|
|
1111
1111
|
console.error("Usage: deepline tools describe <toolId> [--json]");
|
|
1112
1112
|
return 1;
|
|
1113
1113
|
}
|
|
1114
|
-
const client = new (0,
|
|
1114
|
+
const client = new (0, _chunkYGFQ7YSMjs.DeeplineClient)();
|
|
1115
1115
|
let tool;
|
|
1116
1116
|
try {
|
|
1117
1117
|
tool = await _asyncNullishCoalesce(compatibilityMetadata, async () => ( await client.getTool(toolId)));
|
|
@@ -1165,7 +1165,7 @@ async function getTool(toolId, options = {}, compatibilityMetadata) {
|
|
|
1165
1165
|
const lines = toolPricingOnlyLines(tool, toolId);
|
|
1166
1166
|
if (inferenceQuote)
|
|
1167
1167
|
lines.push(...inferenceQuoteSummaryLines(inferenceQuote));
|
|
1168
|
-
|
|
1168
|
+
_chunkWHKTRZ3Jjs.printCommandEnvelope.call(void 0,
|
|
1169
1169
|
{
|
|
1170
1170
|
toolId: String(tool.toolId || toolId),
|
|
1171
1171
|
cost: Capability.fromCatalogEntry(tool).describe().customerCost(),
|
|
@@ -1183,7 +1183,7 @@ async function getTool(toolId, options = {}, compatibilityMetadata) {
|
|
|
1183
1183
|
}
|
|
1184
1184
|
if ((options.schemaOnly || options.examplesOnly || options.gettersOnly) && !isMonitorTypeTool(tool) && !isPlayLikeTool(tool) && (options.json || options.contractJson)) {
|
|
1185
1185
|
const contract = toolContractJsonForDescribe(tool, toolId);
|
|
1186
|
-
|
|
1186
|
+
_chunkWHKTRZ3Jjs.printCompactJson.call(void 0, {
|
|
1187
1187
|
toolId: contract.toolId,
|
|
1188
1188
|
...options.schemaOnly ? {
|
|
1189
1189
|
inputSchema: contract.inputSchema,
|
|
@@ -1206,7 +1206,7 @@ async function getTool(toolId, options = {}, compatibilityMetadata) {
|
|
|
1206
1206
|
return 0;
|
|
1207
1207
|
}
|
|
1208
1208
|
if (options.contractJson) {
|
|
1209
|
-
|
|
1209
|
+
_chunkWHKTRZ3Jjs.printCompactJson.call(void 0, {
|
|
1210
1210
|
...toolContractJsonForDescribe(tool, toolId),
|
|
1211
1211
|
...modelDescription ? { modelOptions: modelDescription } : {},
|
|
1212
1212
|
...inferenceQuote ? { inferenceQuote } : {}
|
|
@@ -1215,7 +1215,7 @@ async function getTool(toolId, options = {}, compatibilityMetadata) {
|
|
|
1215
1215
|
}
|
|
1216
1216
|
const emitJson = options.json === true;
|
|
1217
1217
|
if (emitJson) {
|
|
1218
|
-
|
|
1218
|
+
_chunkWHKTRZ3Jjs.printCompactJson.call(void 0, {
|
|
1219
1219
|
...toolMetadataJsonForDescribe(tool, toolId),
|
|
1220
1220
|
...modelDescription ? { modelOptions: modelDescription } : {},
|
|
1221
1221
|
...inferenceQuote ? { inferenceQuote } : {}
|
|
@@ -2626,7 +2626,7 @@ function parseExecuteOptions(toolId, options, output) {
|
|
|
2626
2626
|
outputFormat = normalizeOutputFormat(options.outputFormat);
|
|
2627
2627
|
}
|
|
2628
2628
|
if (options.idempotencyKey !== void 0) {
|
|
2629
|
-
|
|
2629
|
+
_chunkYGFQ7YSMjs.validateExecutionIdempotencyKey.call(void 0, options.idempotencyKey);
|
|
2630
2630
|
}
|
|
2631
2631
|
if (options.recoveryTimeoutMs !== void 0) {
|
|
2632
2632
|
const parsed = Number(options.recoveryTimeoutMs);
|
|
@@ -2937,20 +2937,20 @@ function buildToolExecuteRowArtifactEnvelope(input) {
|
|
|
2937
2937
|
}
|
|
2938
2938
|
async function executeTool(toolId, options) {
|
|
2939
2939
|
const output = toolExecuteJsonOption(options.json);
|
|
2940
|
-
const wantsJson =
|
|
2940
|
+
const wantsJson = _chunkWHKTRZ3Jjs.shouldEmitJson.call(void 0, output.requested);
|
|
2941
2941
|
let parsed;
|
|
2942
2942
|
try {
|
|
2943
2943
|
parsed = parseExecuteOptions(toolId, options, output);
|
|
2944
2944
|
} catch (error) {
|
|
2945
2945
|
if (wantsJson) {
|
|
2946
|
-
|
|
2946
|
+
_chunkWHKTRZ3Jjs.printJsonError.call(void 0, error);
|
|
2947
2947
|
} else {
|
|
2948
2948
|
console.error(error instanceof Error ? error.message : String(error));
|
|
2949
2949
|
}
|
|
2950
2950
|
return error instanceof _chunk7P5AA3SNjs.DeeplineError && error.code === "IDEMPOTENCY_KEY_INVALID" ? 2 : 1;
|
|
2951
2951
|
}
|
|
2952
2952
|
const cliInvocationId = _nullishCoalesce(_chunkQJBJZVG6js.getToolExecuteInvocationId.call(void 0, ), () => ( _chunkQJBJZVG6js.beginToolExecuteCommand.call(void 0, )));
|
|
2953
|
-
const client = new (0,
|
|
2953
|
+
const client = new (0, _chunkYGFQ7YSMjs.DeeplineClient)();
|
|
2954
2954
|
let metadata;
|
|
2955
2955
|
try {
|
|
2956
2956
|
metadata = await _chunkQJBJZVG6js.runToolExecuteStage.call(void 0,
|
|
@@ -2965,7 +2965,7 @@ async function executeTool(toolId, options) {
|
|
|
2965
2965
|
);
|
|
2966
2966
|
if (play) {
|
|
2967
2967
|
if (wantsJson) {
|
|
2968
|
-
|
|
2968
|
+
_chunkWHKTRZ3Jjs.printJsonError.call(void 0,
|
|
2969
2969
|
new Error(playAliasToolErrorMessage(parsed.toolId, play))
|
|
2970
2970
|
);
|
|
2971
2971
|
} else {
|
|
@@ -2978,7 +2978,7 @@ async function executeTool(toolId, options) {
|
|
|
2978
2978
|
}
|
|
2979
2979
|
if (isPlayLikeTool(metadata)) {
|
|
2980
2980
|
if (wantsJson) {
|
|
2981
|
-
|
|
2981
|
+
_chunkWHKTRZ3Jjs.printJsonError.call(void 0,
|
|
2982
2982
|
new Error(
|
|
2983
2983
|
playLikeToolExecuteErrorMessage(
|
|
2984
2984
|
parsed.toolId,
|
|
@@ -3014,7 +3014,7 @@ async function executeTool(toolId, options) {
|
|
|
3014
3014
|
responseIntent,
|
|
3015
3015
|
...idempotencyKey ? { idempotencyKey } : {},
|
|
3016
3016
|
...parsed.recoveryTimeoutMs !== void 0 ? { recoveryTimeoutMs: parsed.recoveryTimeoutMs } : {},
|
|
3017
|
-
searchRef:
|
|
3017
|
+
searchRef: _chunk46IVSO6Ojs.recentSearchRef.call(void 0, ),
|
|
3018
3018
|
cliInvocationId
|
|
3019
3019
|
}).catch((error) => {
|
|
3020
3020
|
const guidanceLines = toolGuidanceLines(metadata.guidance);
|
|
@@ -3053,8 +3053,8 @@ async function executeTool(toolId, options) {
|
|
|
3053
3053
|
);
|
|
3054
3054
|
const executeExitCode = toolExecuteExitCode(baseEnvelope);
|
|
3055
3055
|
const delivered = await _chunkQJBJZVG6js.runToolExecuteStage.call(void 0, "output delivery", () => {
|
|
3056
|
-
if (!parsed.outPath && (parsed.outputFormat === "json" || parsed.outputFormat === "auto" &&
|
|
3057
|
-
|
|
3056
|
+
if (!parsed.outPath && (parsed.outputFormat === "json" || parsed.outputFormat === "auto" && _chunkWHKTRZ3Jjs.shouldEmitJson.call(void 0, ))) {
|
|
3057
|
+
_chunkWHKTRZ3Jjs.printCommandEnvelope.call(void 0, baseEnvelope, { json: true });
|
|
3058
3058
|
return true;
|
|
3059
3059
|
}
|
|
3060
3060
|
if (parsed.outputFormat === "json_file") {
|
|
@@ -3062,7 +3062,7 @@ async function executeTool(toolId, options) {
|
|
|
3062
3062
|
rawResponse,
|
|
3063
3063
|
`payload_${parsed.toolId}`
|
|
3064
3064
|
);
|
|
3065
|
-
|
|
3065
|
+
_chunkWHKTRZ3Jjs.printCommandEnvelope.call(void 0,
|
|
3066
3066
|
{
|
|
3067
3067
|
...baseEnvelope,
|
|
3068
3068
|
local: {
|
|
@@ -3084,7 +3084,7 @@ async function executeTool(toolId, options) {
|
|
|
3084
3084
|
`${parsed.toolId} did not expose row-shaped output to write as CSV. ${inspection.inspectDescription} Run: ${inspection.inspect}`
|
|
3085
3085
|
);
|
|
3086
3086
|
if (wantsJson) {
|
|
3087
|
-
|
|
3087
|
+
_chunkWHKTRZ3Jjs.printJsonError.call(void 0, error);
|
|
3088
3088
|
} else {
|
|
3089
3089
|
console.error(error.message);
|
|
3090
3090
|
}
|
|
@@ -3095,18 +3095,18 @@ async function executeTool(toolId, options) {
|
|
|
3095
3095
|
rawResponse,
|
|
3096
3096
|
`payload_${parsed.toolId}`
|
|
3097
3097
|
);
|
|
3098
|
-
|
|
3098
|
+
_chunkWHKTRZ3Jjs.printCommandEnvelope.call(void 0,
|
|
3099
3099
|
{
|
|
3100
3100
|
...baseEnvelope,
|
|
3101
3101
|
local: {
|
|
3102
3102
|
payload_file: jsonPath
|
|
3103
3103
|
}
|
|
3104
3104
|
},
|
|
3105
|
-
{ json: parsed.outputFormat === "csv_file" ||
|
|
3105
|
+
{ json: parsed.outputFormat === "csv_file" || _chunkWHKTRZ3Jjs.shouldEmitJson.call(void 0, ) }
|
|
3106
3106
|
);
|
|
3107
3107
|
return true;
|
|
3108
3108
|
}
|
|
3109
|
-
|
|
3109
|
+
_chunkWHKTRZ3Jjs.printCommandEnvelope.call(void 0, baseEnvelope, { json: false });
|
|
3110
3110
|
return true;
|
|
3111
3111
|
}
|
|
3112
3112
|
const rowOutput = _chunkNXDRDJ4Kjs.projectRowOutput.call(void 0, listConversion);
|
|
@@ -3130,7 +3130,7 @@ async function executeTool(toolId, options) {
|
|
|
3130
3130
|
seededScript
|
|
3131
3131
|
});
|
|
3132
3132
|
if (parsed.outputFormat === "csv_file") {
|
|
3133
|
-
|
|
3133
|
+
_chunkWHKTRZ3Jjs.printCommandEnvelope.call(void 0, materializedEnvelope, { json: true });
|
|
3134
3134
|
return true;
|
|
3135
3135
|
}
|
|
3136
3136
|
if (parsed.outPath) {
|
|
@@ -3138,7 +3138,7 @@ async function executeTool(toolId, options) {
|
|
|
3138
3138
|
toolId: parsed.toolId,
|
|
3139
3139
|
idempotencyKey
|
|
3140
3140
|
});
|
|
3141
|
-
|
|
3141
|
+
_chunkWHKTRZ3Jjs.printCommandEnvelope.call(void 0, materializedEnvelope, {
|
|
3142
3142
|
json: wantsJson,
|
|
3143
3143
|
text: `Wrote ${csv.rowCount} row(s) to ${csv.path}
|
|
3144
3144
|
inspect: ${inspection.inspect}
|
|
@@ -3147,7 +3147,7 @@ inspect: ${inspection.inspect}
|
|
|
3147
3147
|
return true;
|
|
3148
3148
|
}
|
|
3149
3149
|
if (parsed.noPreview) {
|
|
3150
|
-
|
|
3150
|
+
_chunkWHKTRZ3Jjs.printCommandEnvelope.call(void 0,
|
|
3151
3151
|
{
|
|
3152
3152
|
...materializedEnvelope,
|
|
3153
3153
|
local: {
|
|
@@ -3155,12 +3155,12 @@ inspect: ${inspection.inspect}
|
|
|
3155
3155
|
output_path: csv.path
|
|
3156
3156
|
}
|
|
3157
3157
|
},
|
|
3158
|
-
{ json:
|
|
3158
|
+
{ json: _chunkWHKTRZ3Jjs.shouldEmitJson.call(void 0, ), text: `${csv.path}
|
|
3159
3159
|
` }
|
|
3160
3160
|
);
|
|
3161
3161
|
return true;
|
|
3162
3162
|
}
|
|
3163
|
-
|
|
3163
|
+
_chunkWHKTRZ3Jjs.printCommandEnvelope.call(void 0, materializedEnvelope, { json: false });
|
|
3164
3164
|
return true;
|
|
3165
3165
|
});
|
|
3166
3166
|
if (delivered) {
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
argsWantJson,
|
|
3
3
|
openInBrowser,
|
|
4
4
|
printCommandEnvelope
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-7DGZCMXQ.mjs";
|
|
6
6
|
import {
|
|
7
7
|
ACTIVE_ORG_ID_ENV,
|
|
8
8
|
ACTIVE_ORG_NAME_ENV,
|
|
@@ -25,7 +25,7 @@ import {
|
|
|
25
25
|
saveHostEnvValues,
|
|
26
26
|
saveProjectDeeplineEnvValues,
|
|
27
27
|
storedHostApiKey
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-MBI3BVSQ.mjs";
|
|
29
29
|
|
|
30
30
|
// src/cli/commands/auth.ts
|
|
31
31
|
import {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkGKZZ32EVjs = require('./chunk-GKZZ32EV.js');
|
|
4
4
|
|
|
5
5
|
// src/cli/npm-script-policy.ts
|
|
6
6
|
var _child_process = require('child_process');
|
|
@@ -13,7 +13,7 @@ function npmSupportsAllowScripts(version) {
|
|
|
13
13
|
}
|
|
14
14
|
function readNpmVersion(env) {
|
|
15
15
|
try {
|
|
16
|
-
const plan =
|
|
16
|
+
const plan = _chunkGKZZ32EVjs.resolveShellSpawn.call(void 0, "npm", ["--version"], process.platform, env);
|
|
17
17
|
const result = _child_process.spawnSync.call(void 0, plan.command, plan.args, {
|
|
18
18
|
encoding: "utf8",
|
|
19
19
|
env,
|