deepline 0.3.345 → 0.3.347
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/http.ts +14 -0
- package/dist/bundling-sources/sdk/src/release.ts +1 -1
- package/dist/bundling-sources/sdk/src/tool-calls.ts +78 -17
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres.ts +40 -18
- package/dist/cli/auth-PSMCNXBC.js +31 -0
- package/dist/cli/{auth-YQSQYS2V.mjs → auth-RWP45MJX.mjs} +4 -4
- package/dist/cli/{billing-JRP2ZFMV.js → billing-F6RNSQWW.js} +71 -71
- package/dist/cli/{billing-HA75G3SK.mjs → billing-XPKHI4LF.mjs} +4 -4
- package/dist/cli/{chunk-5QPHJFNN.mjs → chunk-3JJLQQLW.mjs} +2 -2
- package/dist/cli/{chunk-4INBT3OR.js → chunk-3PRBUTJK.js} +240 -231
- package/dist/cli/{chunk-MO6QJPEB.js → chunk-5UJOJKPW.js} +33 -27
- package/dist/cli/{chunk-EEPFLZ7V.js → chunk-723POEH5.js} +279 -244
- package/dist/cli/{chunk-FDH572QX.js → chunk-AGV2VS4U.js} +55 -53
- package/dist/cli/{chunk-EWYAS4WD.mjs → chunk-AOKWJJLP.mjs} +1 -1
- package/dist/cli/{chunk-TAX3OOC6.mjs → chunk-AYR45POY.mjs} +51 -16
- package/dist/cli/{chunk-KXFPDFUO.js → chunk-BUXJSW26.js} +26 -26
- package/dist/cli/{chunk-IT6MAYZ3.js → chunk-EOS73ZCP.js} +8 -8
- package/dist/cli/{chunk-2OTDDG2J.js → chunk-GS2ZSOAQ.js} +2 -2
- package/dist/cli/{chunk-FBUWH67Y.js → chunk-GT7OCAWV.js} +48 -48
- package/dist/cli/{chunk-ITOJRSOU.js → chunk-JB4UKD3B.js} +6 -6
- package/dist/cli/{chunk-UJCHR3J3.js → chunk-L4TXOCCC.js} +1 -1
- package/dist/cli/{chunk-S3JKJL44.mjs → chunk-LH4VHCN5.mjs} +9 -7
- package/dist/cli/{chunk-WRTLSH6R.js → chunk-LPKV6IBM.js} +8 -8
- package/dist/cli/{chunk-DOPNLW2H.mjs → chunk-LTJOC47W.mjs} +16 -7
- package/dist/cli/{chunk-AFNEQ43J.js → chunk-MX53GIOB.js} +40 -1
- package/dist/cli/{chunk-AW2G44QA.mjs → chunk-NU5EU2SH.mjs} +4 -4
- package/dist/cli/{chunk-YGQ4AIK7.mjs → chunk-OS6CZRJE.mjs} +3 -3
- package/dist/cli/{chunk-JDSRPSES.mjs → chunk-PQGDU7B5.mjs} +7 -1
- package/dist/cli/{chunk-URPZWUVN.js → chunk-ROEN4NXY.js} +60 -60
- package/dist/cli/{chunk-NTIWTBEH.mjs → chunk-SFJEAK54.mjs} +1 -1
- package/dist/cli/{chunk-3XKBPPP7.mjs → chunk-U2GPF4SB.mjs} +2 -2
- package/dist/cli/{chunk-N3GUUSDO.mjs → chunk-VRYRVD3F.mjs} +1 -1
- package/dist/cli/{chunk-TDW3RU7S.js → chunk-WX7W76U7.js} +15 -15
- package/dist/cli/{chunk-GGRQBO3S.mjs → chunk-X32ZLEUU.mjs} +2 -2
- package/dist/cli/{chunk-MLO7ZGSH.mjs → chunk-Y6D2JYBR.mjs} +2 -2
- package/dist/cli/{chunk-JOA6IKDE.mjs → chunk-Z6B4UPM4.mjs} +39 -0
- package/dist/cli/{client-VKQGBPZ5.mjs → client-FZJ3RSO3.mjs} +3 -3
- package/dist/cli/client-J4QGSQ6Y.js +20 -0
- package/dist/cli/{csv-ZFMAI2HY.mjs → csv-HPBPBU3I.mjs} +3 -3
- package/dist/cli/{csv-UNP7KAXF.js → csv-QSMT5HZS.js} +12 -12
- package/dist/cli/{db-C5YWXRLY.mjs → db-2KAUAVVC.mjs} +4 -4
- package/dist/cli/{db-LDLXC2JQ.js → db-IKZKICP3.js} +29 -29
- package/dist/cli/{describe-UYNKJV6T.mjs → describe-EW4GZMUK.mjs} +9 -9
- package/dist/cli/{describe-FO62H2CB.js → describe-QM7Q5Y2H.js} +25 -25
- package/dist/cli/{executions-DIADSK2E.js → executions-5ICONLFX.js} +6 -6
- package/dist/cli/{executions-JYKV3GQJ.mjs → executions-U5WWUFEZ.mjs} +4 -4
- package/dist/cli/{feedback-YBO47O7G.js → feedback-N2KGAK4V.js} +7 -7
- package/dist/cli/{feedback-4UEJJFRL.mjs → feedback-ZBQPQPFG.mjs} +3 -3
- package/dist/cli/git-2N5LS25H.js +23 -0
- package/dist/cli/{git-A6DPLCMU.mjs → git-M5YEP57H.mjs} +4 -4
- package/dist/cli/index.js +79 -79
- package/dist/cli/index.mjs +31 -31
- package/dist/cli/{legacy-noops-HCAOJI7X.mjs → legacy-noops-GJUYBH2F.mjs} +4 -4
- package/dist/cli/{legacy-noops-F6TJLZV2.js → legacy-noops-IQIPPJF7.js} +7 -7
- package/dist/cli/{monitors-B5QFSFK7.js → monitors-DQUCHISX.js} +85 -85
- package/dist/cli/{monitors-XYP7XNCT.mjs → monitors-XJAJNMG4.mjs} +4 -4
- package/dist/cli/{org-O5VBVLSP.mjs → org-DFWDN4EJ.mjs} +4 -4
- package/dist/cli/{org-NMWNBQZI.js → org-G45CXUJV.js} +60 -60
- package/dist/cli/{play-Z2STHYQB.mjs → play-URTZW2Q4.mjs} +8 -8
- package/dist/cli/play-WWMUYKWS.js +153 -0
- package/dist/cli/{providers-WGIJLFBZ.mjs → providers-CCKMRCXU.mjs} +4 -4
- package/dist/cli/{providers-BAPO54GE.js → providers-IVUWWGFP.js} +7 -7
- package/dist/cli/{quickstart-LL6KUMJ5.mjs → quickstart-CRHIA3PZ.mjs} +3 -3
- package/dist/cli/{quickstart-JGRMJ6M4.js → quickstart-MMIVNRV4.js} +5 -5
- package/dist/cli/{search-P7BVN4OI.mjs → search-NDRDOINX.mjs} +5 -5
- package/dist/cli/search-YZL2QRIF.js +26 -0
- package/dist/cli/{secrets-QUBFPBE5.js → secrets-GQUBMJGM.js} +13 -13
- package/dist/cli/{secrets-5JHLILQD.mjs → secrets-SUC3KLLH.mjs} +4 -4
- package/dist/cli/{sessions-3BYS3WQZ.mjs → sessions-7CAU6JL5.mjs} +4 -4
- package/dist/cli/{sessions-TATDTEY6.js → sessions-AQCRVLHW.js} +5 -5
- package/dist/cli/{settings-SLFYXPRP.js → settings-4SDI73XW.js} +74 -74
- package/dist/cli/{settings-TXWQLO34.mjs → settings-LFFOFAU6.mjs} +7 -7
- package/dist/cli/{setup-XTAW2JS2.mjs → setup-BKCQOJBD.mjs} +6 -6
- package/dist/cli/{setup-A3CXCYRI.js → setup-FQ3E7U7G.js} +41 -41
- package/dist/cli/skills-7BPEGDIA.js +28 -0
- package/dist/cli/{skills-P323CMPH.mjs → skills-USGJ5MF7.mjs} +4 -4
- package/dist/cli/{tools-FMSH7Z7I.mjs → tools-5HTXLDZ4.mjs} +7 -7
- package/dist/cli/tools-5VEZ4QR4.js +40 -0
- package/dist/cli/{update-CGKRTVOD.mjs → update-F7TIJEIV.mjs} +6 -6
- package/dist/cli/update-YFPMWKI4.js +28 -0
- package/dist/cli/{workflow-2DVIYBLG.mjs → workflow-FXJ2D2MG.mjs} +5 -5
- package/dist/cli/{workflow-EFOSJKW7.js → workflow-J5JVOUIL.js} +15 -15
- package/dist/{client-BHReRdWK.d.mts → client-D20uyRYB.d.mts} +6 -0
- package/dist/{client-DW3zASj8.d.ts → client-rHyf5s_Y.d.ts} +6 -0
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +6 -6
- package/dist/index.mjs +3 -3
- package/dist/install-integrity.json +78 -78
- package/dist/plays/run-request.d.mts +1 -1
- package/dist/plays/run-request.d.ts +1 -1
- 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-4HCZZPZH.js +0 -31
- package/dist/cli/client-VOXK5Z4D.js +0 -20
- package/dist/cli/git-FPC5VIIK.js +0 -23
- package/dist/cli/play-D2SCAJXG.js +0 -153
- package/dist/cli/search-UNJN5P72.js +0 -26
- package/dist/cli/skills-ZOUUC72T.js +0 -28
- package/dist/cli/tools-O7TLYHFT.js +0 -40
- package/dist/cli/update-3LT6YSIP.js +0 -28
|
@@ -3,14 +3,15 @@
|
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
|
|
7
|
+
var _chunkMX53GIOBjs = require('./chunk-MX53GIOB.js');
|
|
7
8
|
|
|
8
9
|
|
|
9
10
|
var _chunkAID3OYVJjs = require('./chunk-AID3OYVJ.js');
|
|
10
11
|
|
|
11
12
|
|
|
12
13
|
|
|
13
|
-
var
|
|
14
|
+
var _chunkLPKV6IBMjs = require('./chunk-LPKV6IBM.js');
|
|
14
15
|
|
|
15
16
|
|
|
16
17
|
|
|
@@ -22,7 +23,7 @@ var _chunkNXDRDJ4Kjs = require('./chunk-NXDRDJ4K.js');
|
|
|
22
23
|
|
|
23
24
|
|
|
24
25
|
|
|
25
|
-
var
|
|
26
|
+
var _chunk723POEH5js = require('./chunk-723POEH5.js');
|
|
26
27
|
|
|
27
28
|
|
|
28
29
|
|
|
@@ -36,11 +37,11 @@ var _chunkQJBJZVG6js = require('./chunk-QJBJZVG6.js');
|
|
|
36
37
|
|
|
37
38
|
|
|
38
39
|
|
|
39
|
-
var
|
|
40
|
+
var _chunkJB4UKD3Bjs = require('./chunk-JB4UKD3B.js');
|
|
40
41
|
|
|
41
42
|
|
|
42
43
|
|
|
43
|
-
var
|
|
44
|
+
var _chunk5UJOJKPWjs = require('./chunk-5UJOJKPW.js');
|
|
44
45
|
|
|
45
46
|
|
|
46
47
|
var _chunkFKKNYKDYjs = require('./chunk-FKKNYKDY.js');
|
|
@@ -88,10 +89,10 @@ var ToolCallRecovery = class _ToolCallRecovery {
|
|
|
88
89
|
}
|
|
89
90
|
};
|
|
90
91
|
function pendingToolExecutionPath(input) {
|
|
91
|
-
const config =
|
|
92
|
+
const config = _chunk5UJOJKPWjs.resolveConfig.call(void 0, );
|
|
92
93
|
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
94
|
return _path.join.call(void 0,
|
|
94
|
-
|
|
95
|
+
_chunk5UJOJKPWjs.sdkCliStateDirPath.call(void 0, config.baseUrl),
|
|
95
96
|
`pending-tool-execution-${fingerprint}.json`
|
|
96
97
|
);
|
|
97
98
|
}
|
|
@@ -535,12 +536,12 @@ function categoryEnumerationRender(summaries) {
|
|
|
535
536
|
};
|
|
536
537
|
}
|
|
537
538
|
async function listToolCategories(emitJson, compact) {
|
|
538
|
-
const client = new (0,
|
|
539
|
+
const client = new (0, _chunk723POEH5js.DeeplineClient)();
|
|
539
540
|
const rawTools = await client.listTools({ compact });
|
|
540
541
|
const items = rawTools.map(toListedTool);
|
|
541
542
|
const summaries = aggregateCategorySummaries(rawTools);
|
|
542
543
|
const outputItems = compact ? items.map(compactTool) : items;
|
|
543
|
-
|
|
544
|
+
_chunkJB4UKD3Bjs.printCommandEnvelope.call(void 0,
|
|
544
545
|
{
|
|
545
546
|
tools: outputItems,
|
|
546
547
|
count: outputItems.length,
|
|
@@ -559,7 +560,7 @@ function unknownCategoryError(category, summaries, emitJson) {
|
|
|
559
560
|
const known = summaries.map((item) => item.name);
|
|
560
561
|
const message = `Unknown tool category "${category}". Run \`deepline tools list\` to browse categories.`;
|
|
561
562
|
if (emitJson) {
|
|
562
|
-
|
|
563
|
+
_chunkJB4UKD3Bjs.printJson.call(void 0, {
|
|
563
564
|
ok: false,
|
|
564
565
|
exitCode: 4,
|
|
565
566
|
code: "TOOL_CATEGORY_NOT_FOUND",
|
|
@@ -573,13 +574,13 @@ function unknownCategoryError(category, summaries, emitJson) {
|
|
|
573
574
|
const render = categoryEnumerationRender(summaries);
|
|
574
575
|
console.error(message);
|
|
575
576
|
console.error("");
|
|
576
|
-
console.error(
|
|
577
|
+
console.error(_chunkJB4UKD3Bjs.renderCommandEnvelopeText.call(void 0, { render }).trimEnd());
|
|
577
578
|
console.error("");
|
|
578
579
|
console.error(`Valid categories: ${known.join(", ")}`);
|
|
579
580
|
return 4;
|
|
580
581
|
}
|
|
581
582
|
async function listToolsInCategory(category, emitJson) {
|
|
582
|
-
const client = new (0,
|
|
583
|
+
const client = new (0, _chunk723POEH5js.DeeplineClient)();
|
|
583
584
|
const rawTools = await client.listTools({
|
|
584
585
|
categories: category,
|
|
585
586
|
compact: false
|
|
@@ -616,7 +617,7 @@ async function listToolsInCategory(category, emitJson) {
|
|
|
616
617
|
}
|
|
617
618
|
]
|
|
618
619
|
};
|
|
619
|
-
|
|
620
|
+
_chunkJB4UKD3Bjs.printCommandEnvelope.call(void 0,
|
|
620
621
|
{
|
|
621
622
|
category,
|
|
622
623
|
total: rows.length,
|
|
@@ -629,7 +630,7 @@ async function listToolsInCategory(category, emitJson) {
|
|
|
629
630
|
return 0;
|
|
630
631
|
}
|
|
631
632
|
async function listToolsForCategoryFilter(requestedCategories, emitJson, compact) {
|
|
632
|
-
const client = new (0,
|
|
633
|
+
const client = new (0, _chunk723POEH5js.DeeplineClient)();
|
|
633
634
|
const items = (await client.listTools({
|
|
634
635
|
categories: requestedCategories.join(","),
|
|
635
636
|
compact
|
|
@@ -658,7 +659,7 @@ async function listToolsForCategoryFilter(requestedCategories, emitJson, compact
|
|
|
658
659
|
]
|
|
659
660
|
};
|
|
660
661
|
const outputItems = compact ? items.map(compactTool) : items;
|
|
661
|
-
|
|
662
|
+
_chunkJB4UKD3Bjs.printCommandEnvelope.call(void 0,
|
|
662
663
|
{
|
|
663
664
|
tools: outputItems,
|
|
664
665
|
count: outputItems.length,
|
|
@@ -677,13 +678,13 @@ async function listTools(category, options = {}) {
|
|
|
677
678
|
const positional = _nullishCoalesce(_optionalChain([category, 'optionalAccess', _9 => _9.trim, 'call', _10 => _10()]), () => ( ""));
|
|
678
679
|
const flagCategories = (_nullishCoalesce(options.categories, () => ( ""))).split(",").map((item) => item.trim()).filter(Boolean);
|
|
679
680
|
const compact = options.compact !== false;
|
|
680
|
-
const emitJson = options.json === true ||
|
|
681
|
+
const emitJson = options.json === true || _chunkJB4UKD3Bjs.shouldEmitJson.call(void 0, );
|
|
681
682
|
if (positional && flagCategories.length > 0) {
|
|
682
683
|
const flagIsSameSingle = flagCategories.length === 1 && flagCategories[0] === positional;
|
|
683
684
|
if (!flagIsSameSingle) {
|
|
684
685
|
const message = `Category "${positional}" and --categories ${flagCategories.join(",")} disagree. Pass one: deepline tools list ${positional}`;
|
|
685
686
|
if (emitJson) {
|
|
686
|
-
|
|
687
|
+
_chunkJB4UKD3Bjs.printJson.call(void 0, {
|
|
687
688
|
ok: false,
|
|
688
689
|
exitCode: 2,
|
|
689
690
|
code: "TOOL_LIST_CATEGORY_CONFLICT",
|
|
@@ -710,7 +711,7 @@ async function grepTools(queryInput, options = {}) {
|
|
|
710
711
|
console.error("Usage: deepline tools grep <query> [--json]");
|
|
711
712
|
return 1;
|
|
712
713
|
}
|
|
713
|
-
const client = new (0,
|
|
714
|
+
const client = new (0, _chunk723POEH5js.DeeplineClient)();
|
|
714
715
|
const requestedCategories = options.categories ? options.categories.split(",").map((item) => item.trim()).filter(Boolean) : [];
|
|
715
716
|
const mode = _nullishCoalesce(options.mode, () => ( "all"));
|
|
716
717
|
const jsonOutput = options.json === true;
|
|
@@ -753,7 +754,7 @@ async function grepTools(queryInput, options = {}) {
|
|
|
753
754
|
query,
|
|
754
755
|
mode
|
|
755
756
|
}) : null;
|
|
756
|
-
|
|
757
|
+
_chunkJB4UKD3Bjs.printCommandEnvelope.call(void 0,
|
|
757
758
|
{
|
|
758
759
|
tools: outputTools,
|
|
759
760
|
count: outputTools.length,
|
|
@@ -771,7 +772,7 @@ async function grepTools(queryInput, options = {}) {
|
|
|
771
772
|
} : {},
|
|
772
773
|
commandTemplates: TOOL_COMMAND_TEMPLATES
|
|
773
774
|
},
|
|
774
|
-
{ json: options.json ||
|
|
775
|
+
{ json: options.json || _chunkJB4UKD3Bjs.shouldEmitJson.call(void 0, ) }
|
|
775
776
|
);
|
|
776
777
|
return 0;
|
|
777
778
|
}
|
|
@@ -927,7 +928,7 @@ Examples:
|
|
|
927
928
|
json: Boolean(options.json)
|
|
928
929
|
});
|
|
929
930
|
});
|
|
930
|
-
|
|
931
|
+
_chunkLPKV6IBMjs.registerDeprecatedSearchCommand.call(void 0, tools, () => ["tools", "monitors"]);
|
|
931
932
|
tools.command("grep <query>").description(
|
|
932
933
|
"Literal grep over tool ids, descriptions, categories, and input fields."
|
|
933
934
|
).addHelpText(
|
|
@@ -1029,7 +1030,7 @@ Examples:
|
|
|
1029
1030
|
process.exitCode = await narrowView();
|
|
1030
1031
|
return;
|
|
1031
1032
|
}
|
|
1032
|
-
const { describeAnything } = await Promise.resolve().then(() => _interopRequireWildcard(require("./describe-
|
|
1033
|
+
const { describeAnything } = await Promise.resolve().then(() => _interopRequireWildcard(require("./describe-QM7Q5Y2H.js")));
|
|
1033
1034
|
process.exitCode = await describeAnything(
|
|
1034
1035
|
toolId,
|
|
1035
1036
|
{ ...options, kinds: ["tools", "monitors"], fetchedTool: metadata },
|
|
@@ -1039,7 +1040,7 @@ Examples:
|
|
|
1039
1040
|
});
|
|
1040
1041
|
};
|
|
1041
1042
|
addToolMetadataCommand(
|
|
1042
|
-
|
|
1043
|
+
_chunkMX53GIOBjs.addDescribeOptions.call(void 0,
|
|
1043
1044
|
tools.command("describe <toolId>", { hidden: true }).alias("get"),
|
|
1044
1045
|
{ json: false }
|
|
1045
1046
|
)
|
|
@@ -1111,7 +1112,7 @@ async function getTool(toolId, options = {}, compatibilityMetadata) {
|
|
|
1111
1112
|
console.error("Usage: deepline tools describe <toolId> [--json]");
|
|
1112
1113
|
return 1;
|
|
1113
1114
|
}
|
|
1114
|
-
const client = new (0,
|
|
1115
|
+
const client = new (0, _chunk723POEH5js.DeeplineClient)();
|
|
1115
1116
|
let tool;
|
|
1116
1117
|
try {
|
|
1117
1118
|
tool = await _asyncNullishCoalesce(compatibilityMetadata, async () => ( await client.getTool(toolId)));
|
|
@@ -1165,7 +1166,7 @@ async function getTool(toolId, options = {}, compatibilityMetadata) {
|
|
|
1165
1166
|
const lines = toolPricingOnlyLines(tool, toolId);
|
|
1166
1167
|
if (inferenceQuote)
|
|
1167
1168
|
lines.push(...inferenceQuoteSummaryLines(inferenceQuote));
|
|
1168
|
-
|
|
1169
|
+
_chunkJB4UKD3Bjs.printCommandEnvelope.call(void 0,
|
|
1169
1170
|
{
|
|
1170
1171
|
toolId: String(tool.toolId || toolId),
|
|
1171
1172
|
cost: Capability.fromCatalogEntry(tool).describe().customerCost(),
|
|
@@ -1183,7 +1184,7 @@ async function getTool(toolId, options = {}, compatibilityMetadata) {
|
|
|
1183
1184
|
}
|
|
1184
1185
|
if ((options.schemaOnly || options.examplesOnly || options.gettersOnly) && !isMonitorTypeTool(tool) && !isPlayLikeTool(tool) && (options.json || options.contractJson)) {
|
|
1185
1186
|
const contract = toolContractJsonForDescribe(tool, toolId);
|
|
1186
|
-
|
|
1187
|
+
_chunkJB4UKD3Bjs.printCompactJson.call(void 0, {
|
|
1187
1188
|
toolId: contract.toolId,
|
|
1188
1189
|
...options.schemaOnly ? {
|
|
1189
1190
|
inputSchema: contract.inputSchema,
|
|
@@ -1206,7 +1207,7 @@ async function getTool(toolId, options = {}, compatibilityMetadata) {
|
|
|
1206
1207
|
return 0;
|
|
1207
1208
|
}
|
|
1208
1209
|
if (options.contractJson) {
|
|
1209
|
-
|
|
1210
|
+
_chunkJB4UKD3Bjs.printCompactJson.call(void 0, {
|
|
1210
1211
|
...toolContractJsonForDescribe(tool, toolId),
|
|
1211
1212
|
...modelDescription ? { modelOptions: modelDescription } : {},
|
|
1212
1213
|
...inferenceQuote ? { inferenceQuote } : {}
|
|
@@ -1215,7 +1216,7 @@ async function getTool(toolId, options = {}, compatibilityMetadata) {
|
|
|
1215
1216
|
}
|
|
1216
1217
|
const emitJson = options.json === true;
|
|
1217
1218
|
if (emitJson) {
|
|
1218
|
-
|
|
1219
|
+
_chunkJB4UKD3Bjs.printCompactJson.call(void 0, {
|
|
1219
1220
|
...toolMetadataJsonForDescribe(tool, toolId),
|
|
1220
1221
|
...modelDescription ? { modelOptions: modelDescription } : {},
|
|
1221
1222
|
...inferenceQuote ? { inferenceQuote } : {}
|
|
@@ -1527,7 +1528,7 @@ function describedTool(tool, requestedToolId) {
|
|
|
1527
1528
|
description,
|
|
1528
1529
|
cost: stringField2(recordField(tool, "pricing"), "displayText") || void 0,
|
|
1529
1530
|
guidance: [],
|
|
1530
|
-
inputs:
|
|
1531
|
+
inputs: _chunkMX53GIOBjs.schemaFields.call(void 0,
|
|
1531
1532
|
recordField(tool, "payload_schema", "payloadSchema")
|
|
1532
1533
|
),
|
|
1533
1534
|
outputs: [],
|
|
@@ -1559,7 +1560,7 @@ function describedTool(tool, requestedToolId) {
|
|
|
1559
1560
|
"rawToolOutputPaths"
|
|
1560
1561
|
).map((path) => String(path).replace(/^toolResponse\.raw\./, ""));
|
|
1561
1562
|
const node = roots.flatMap((root) => paths.map((path) => schemaNodeAt(root, path))).find(isRecord);
|
|
1562
|
-
const { fields, ...typed } =
|
|
1563
|
+
const { fields, ...typed } = _chunkMX53GIOBjs.schemaField.call(void 0, name, node, true);
|
|
1563
1564
|
const valueType = stringField2(_nullishCoalesce(details.get(name), () => ( {})), "valueType");
|
|
1564
1565
|
const field = {
|
|
1565
1566
|
...typed,
|
|
@@ -1594,12 +1595,12 @@ function describedTool(tool, requestedToolId) {
|
|
|
1594
1595
|
(line) => typeof line === "string" && /[a-z0-9]/i.test(line)
|
|
1595
1596
|
)
|
|
1596
1597
|
],
|
|
1597
|
-
rateLimit:
|
|
1598
|
+
rateLimit: _chunkMX53GIOBjs.rateLimitSummary.call(void 0,
|
|
1598
1599
|
recordField(contract, "executionMetadata").configuredRateLimits
|
|
1599
1600
|
),
|
|
1600
|
-
inputs:
|
|
1601
|
+
inputs: _chunkMX53GIOBjs.schemaFields.call(void 0, jsonSchemaOf(recordField(contract, "inputSchema"))),
|
|
1601
1602
|
outputs: [...lists, ...values].map(({ field }) => field),
|
|
1602
|
-
rawResponse:
|
|
1603
|
+
rawResponse: _chunkMX53GIOBjs.schemaFields.call(void 0, outputSchema),
|
|
1603
1604
|
runner: playReference ? { via: "play", reference: playReference } : { via: "tool", toolId: String(contract.toolId) }
|
|
1604
1605
|
};
|
|
1605
1606
|
}
|
|
@@ -2626,7 +2627,7 @@ function parseExecuteOptions(toolId, options, output) {
|
|
|
2626
2627
|
outputFormat = normalizeOutputFormat(options.outputFormat);
|
|
2627
2628
|
}
|
|
2628
2629
|
if (options.idempotencyKey !== void 0) {
|
|
2629
|
-
|
|
2630
|
+
_chunk723POEH5js.validateExecutionIdempotencyKey.call(void 0, options.idempotencyKey);
|
|
2630
2631
|
}
|
|
2631
2632
|
if (options.recoveryTimeoutMs !== void 0) {
|
|
2632
2633
|
const parsed = Number(options.recoveryTimeoutMs);
|
|
@@ -2937,20 +2938,20 @@ function buildToolExecuteRowArtifactEnvelope(input) {
|
|
|
2937
2938
|
}
|
|
2938
2939
|
async function executeTool(toolId, options) {
|
|
2939
2940
|
const output = toolExecuteJsonOption(options.json);
|
|
2940
|
-
const wantsJson =
|
|
2941
|
+
const wantsJson = _chunkJB4UKD3Bjs.shouldEmitJson.call(void 0, output.requested);
|
|
2941
2942
|
let parsed;
|
|
2942
2943
|
try {
|
|
2943
2944
|
parsed = parseExecuteOptions(toolId, options, output);
|
|
2944
2945
|
} catch (error) {
|
|
2945
2946
|
if (wantsJson) {
|
|
2946
|
-
|
|
2947
|
+
_chunkJB4UKD3Bjs.printJsonError.call(void 0, error);
|
|
2947
2948
|
} else {
|
|
2948
2949
|
console.error(error instanceof Error ? error.message : String(error));
|
|
2949
2950
|
}
|
|
2950
2951
|
return error instanceof _chunk7P5AA3SNjs.DeeplineError && error.code === "IDEMPOTENCY_KEY_INVALID" ? 2 : 1;
|
|
2951
2952
|
}
|
|
2952
2953
|
const cliInvocationId = _nullishCoalesce(_chunkQJBJZVG6js.getToolExecuteInvocationId.call(void 0, ), () => ( _chunkQJBJZVG6js.beginToolExecuteCommand.call(void 0, )));
|
|
2953
|
-
const client = new (0,
|
|
2954
|
+
const client = new (0, _chunk723POEH5js.DeeplineClient)();
|
|
2954
2955
|
let metadata;
|
|
2955
2956
|
try {
|
|
2956
2957
|
metadata = await _chunkQJBJZVG6js.runToolExecuteStage.call(void 0,
|
|
@@ -2965,7 +2966,7 @@ async function executeTool(toolId, options) {
|
|
|
2965
2966
|
);
|
|
2966
2967
|
if (play) {
|
|
2967
2968
|
if (wantsJson) {
|
|
2968
|
-
|
|
2969
|
+
_chunkJB4UKD3Bjs.printJsonError.call(void 0,
|
|
2969
2970
|
new Error(playAliasToolErrorMessage(parsed.toolId, play))
|
|
2970
2971
|
);
|
|
2971
2972
|
} else {
|
|
@@ -2978,7 +2979,7 @@ async function executeTool(toolId, options) {
|
|
|
2978
2979
|
}
|
|
2979
2980
|
if (isPlayLikeTool(metadata)) {
|
|
2980
2981
|
if (wantsJson) {
|
|
2981
|
-
|
|
2982
|
+
_chunkJB4UKD3Bjs.printJsonError.call(void 0,
|
|
2982
2983
|
new Error(
|
|
2983
2984
|
playLikeToolExecuteErrorMessage(
|
|
2984
2985
|
parsed.toolId,
|
|
@@ -3014,8 +3015,9 @@ async function executeTool(toolId, options) {
|
|
|
3014
3015
|
responseIntent,
|
|
3015
3016
|
...idempotencyKey ? { idempotencyKey } : {},
|
|
3016
3017
|
...parsed.recoveryTimeoutMs !== void 0 ? { recoveryTimeoutMs: parsed.recoveryTimeoutMs } : {},
|
|
3017
|
-
searchRef:
|
|
3018
|
-
cliInvocationId
|
|
3018
|
+
searchRef: _chunkLPKV6IBMjs.recentSearchRef.call(void 0, ),
|
|
3019
|
+
cliInvocationId,
|
|
3020
|
+
onResponseReceived: _chunkMX53GIOBjs.recordApiResponse
|
|
3019
3021
|
}).catch((error) => {
|
|
3020
3022
|
const guidanceLines = toolGuidanceLines(metadata.guidance);
|
|
3021
3023
|
if (guidanceLines.length > 0) {
|
|
@@ -3053,8 +3055,8 @@ async function executeTool(toolId, options) {
|
|
|
3053
3055
|
);
|
|
3054
3056
|
const executeExitCode = toolExecuteExitCode(baseEnvelope);
|
|
3055
3057
|
const delivered = await _chunkQJBJZVG6js.runToolExecuteStage.call(void 0, "output delivery", () => {
|
|
3056
|
-
if (!parsed.outPath && (parsed.outputFormat === "json" || parsed.outputFormat === "auto" &&
|
|
3057
|
-
|
|
3058
|
+
if (!parsed.outPath && (parsed.outputFormat === "json" || parsed.outputFormat === "auto" && _chunkJB4UKD3Bjs.shouldEmitJson.call(void 0, ))) {
|
|
3059
|
+
_chunkJB4UKD3Bjs.printCommandEnvelope.call(void 0, baseEnvelope, { json: true });
|
|
3058
3060
|
return true;
|
|
3059
3061
|
}
|
|
3060
3062
|
if (parsed.outputFormat === "json_file") {
|
|
@@ -3062,7 +3064,7 @@ async function executeTool(toolId, options) {
|
|
|
3062
3064
|
rawResponse,
|
|
3063
3065
|
`payload_${parsed.toolId}`
|
|
3064
3066
|
);
|
|
3065
|
-
|
|
3067
|
+
_chunkJB4UKD3Bjs.printCommandEnvelope.call(void 0,
|
|
3066
3068
|
{
|
|
3067
3069
|
...baseEnvelope,
|
|
3068
3070
|
local: {
|
|
@@ -3084,7 +3086,7 @@ async function executeTool(toolId, options) {
|
|
|
3084
3086
|
`${parsed.toolId} did not expose row-shaped output to write as CSV. ${inspection.inspectDescription} Run: ${inspection.inspect}`
|
|
3085
3087
|
);
|
|
3086
3088
|
if (wantsJson) {
|
|
3087
|
-
|
|
3089
|
+
_chunkJB4UKD3Bjs.printJsonError.call(void 0, error);
|
|
3088
3090
|
} else {
|
|
3089
3091
|
console.error(error.message);
|
|
3090
3092
|
}
|
|
@@ -3095,18 +3097,18 @@ async function executeTool(toolId, options) {
|
|
|
3095
3097
|
rawResponse,
|
|
3096
3098
|
`payload_${parsed.toolId}`
|
|
3097
3099
|
);
|
|
3098
|
-
|
|
3100
|
+
_chunkJB4UKD3Bjs.printCommandEnvelope.call(void 0,
|
|
3099
3101
|
{
|
|
3100
3102
|
...baseEnvelope,
|
|
3101
3103
|
local: {
|
|
3102
3104
|
payload_file: jsonPath
|
|
3103
3105
|
}
|
|
3104
3106
|
},
|
|
3105
|
-
{ json: parsed.outputFormat === "csv_file" ||
|
|
3107
|
+
{ json: parsed.outputFormat === "csv_file" || _chunkJB4UKD3Bjs.shouldEmitJson.call(void 0, ) }
|
|
3106
3108
|
);
|
|
3107
3109
|
return true;
|
|
3108
3110
|
}
|
|
3109
|
-
|
|
3111
|
+
_chunkJB4UKD3Bjs.printCommandEnvelope.call(void 0, baseEnvelope, { json: false });
|
|
3110
3112
|
return true;
|
|
3111
3113
|
}
|
|
3112
3114
|
const rowOutput = _chunkNXDRDJ4Kjs.projectRowOutput.call(void 0, listConversion);
|
|
@@ -3130,7 +3132,7 @@ async function executeTool(toolId, options) {
|
|
|
3130
3132
|
seededScript
|
|
3131
3133
|
});
|
|
3132
3134
|
if (parsed.outputFormat === "csv_file") {
|
|
3133
|
-
|
|
3135
|
+
_chunkJB4UKD3Bjs.printCommandEnvelope.call(void 0, materializedEnvelope, { json: true });
|
|
3134
3136
|
return true;
|
|
3135
3137
|
}
|
|
3136
3138
|
if (parsed.outPath) {
|
|
@@ -3138,7 +3140,7 @@ async function executeTool(toolId, options) {
|
|
|
3138
3140
|
toolId: parsed.toolId,
|
|
3139
3141
|
idempotencyKey
|
|
3140
3142
|
});
|
|
3141
|
-
|
|
3143
|
+
_chunkJB4UKD3Bjs.printCommandEnvelope.call(void 0, materializedEnvelope, {
|
|
3142
3144
|
json: wantsJson,
|
|
3143
3145
|
text: `Wrote ${csv.rowCount} row(s) to ${csv.path}
|
|
3144
3146
|
inspect: ${inspection.inspect}
|
|
@@ -3147,7 +3149,7 @@ inspect: ${inspection.inspect}
|
|
|
3147
3149
|
return true;
|
|
3148
3150
|
}
|
|
3149
3151
|
if (parsed.noPreview) {
|
|
3150
|
-
|
|
3152
|
+
_chunkJB4UKD3Bjs.printCommandEnvelope.call(void 0,
|
|
3151
3153
|
{
|
|
3152
3154
|
...materializedEnvelope,
|
|
3153
3155
|
local: {
|
|
@@ -3155,12 +3157,12 @@ inspect: ${inspection.inspect}
|
|
|
3155
3157
|
output_path: csv.path
|
|
3156
3158
|
}
|
|
3157
3159
|
},
|
|
3158
|
-
{ json:
|
|
3160
|
+
{ json: _chunkJB4UKD3Bjs.shouldEmitJson.call(void 0, ), text: `${csv.path}
|
|
3159
3161
|
` }
|
|
3160
3162
|
);
|
|
3161
3163
|
return true;
|
|
3162
3164
|
}
|
|
3163
|
-
|
|
3165
|
+
_chunkJB4UKD3Bjs.printCommandEnvelope.call(void 0, materializedEnvelope, { json: false });
|
|
3164
3166
|
return true;
|
|
3165
3167
|
});
|
|
3166
3168
|
if (delivered) {
|
|
@@ -49,7 +49,7 @@ var SDK_RELEASE = {
|
|
|
49
49
|
// getters keep their established compatibility behavior.
|
|
50
50
|
// 0.3.1 deprecated the legacy `deepline enrich` command in favor of Plays.
|
|
51
51
|
// 0.3.90 is the first deliberately versioned SDK release for API v3.
|
|
52
|
-
version: "0.3.
|
|
52
|
+
version: "0.3.347",
|
|
53
53
|
updateSummary: "Play grep now returns concise results with the matched fields and terms. Automatic CLI updates are enabled by default; use `deepline settings autoupdate off` to opt out, `deepline settings autoupdate on` to re-enable updates, or `deepline settings autoupdate pin <version>` to hold an exact release.",
|
|
54
54
|
packageCapabilities: {
|
|
55
55
|
updatePreferences: 1
|
|
@@ -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-PQGDU7B5.mjs";
|
|
19
19
|
import {
|
|
20
20
|
PLAY_RUNTIME_BACKENDS,
|
|
21
21
|
RAW_V2_TOOL_RESPONSE_CONTRACT,
|
|
@@ -477,22 +477,56 @@ var ToolCalls = class {
|
|
|
477
477
|
...options?.searchRef ? { "x-deepline-search-ref": options.searchRef } : {},
|
|
478
478
|
...options?.cliInvocationId !== void 0 ? { "x-deepline-cli-invocation-id": options.cliInvocationId } : {}
|
|
479
479
|
};
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
{
|
|
488
|
-
timeout: requestTimeoutMs,
|
|
489
|
-
maxRetries: idempotencyKey ? 0 : options?.maxRetries ?? 0,
|
|
490
|
-
retryApiErrors: options?.retryApiErrors === true,
|
|
491
|
-
exactUrlOnly: true,
|
|
492
|
-
toolId,
|
|
493
|
-
idempotencyKey
|
|
480
|
+
let lastResponse = null;
|
|
481
|
+
const observeTerminal = (failure) => {
|
|
482
|
+
if (!lastResponse) return;
|
|
483
|
+
if (failure) {
|
|
484
|
+
const { error } = failure;
|
|
485
|
+
if (isRecoverableExecutionAttemptError(error) || !(error instanceof DeeplineError) || error.statusCode === void 0 || error.statusCode !== lastResponse.httpStatus || error.code === "EXECUTION_OUTCOME_UNKNOWN")
|
|
486
|
+
return;
|
|
494
487
|
}
|
|
495
|
-
|
|
488
|
+
const body = lastResponse.body;
|
|
489
|
+
const recovery = getExecutionRecoveryState(body);
|
|
490
|
+
if (recovery === "running" || recovery === "outcome_unknown") return;
|
|
491
|
+
const state = isRecord(body) ? body.status : null;
|
|
492
|
+
const terminal = state === "completed" || state === "failed" || state === "cancelled" ? state : state === "canceled" ? "cancelled" : failure ? "failed" : null;
|
|
493
|
+
if (terminal)
|
|
494
|
+
options?.onResponseReceived?.({
|
|
495
|
+
receivedAtMs: lastResponse.receivedAtMs,
|
|
496
|
+
httpStatus: lastResponse.httpStatus,
|
|
497
|
+
state: terminal
|
|
498
|
+
});
|
|
499
|
+
};
|
|
500
|
+
const request = async (requestTimeoutMs) => {
|
|
501
|
+
lastResponse = null;
|
|
502
|
+
try {
|
|
503
|
+
return await this.http.post(
|
|
504
|
+
`/api/v2/integrations/${encodeURIComponent(toolId)}/execute`,
|
|
505
|
+
{
|
|
506
|
+
payload: inputSnapshot,
|
|
507
|
+
...metadataSnapshot ? { metadata: metadataSnapshot } : {}
|
|
508
|
+
},
|
|
509
|
+
headers,
|
|
510
|
+
{
|
|
511
|
+
timeout: requestTimeoutMs,
|
|
512
|
+
maxRetries: idempotencyKey ? 0 : options?.maxRetries ?? 0,
|
|
513
|
+
retryApiErrors: options?.retryApiErrors === true,
|
|
514
|
+
exactUrlOnly: true,
|
|
515
|
+
toolId,
|
|
516
|
+
idempotencyKey,
|
|
517
|
+
onResponse: () => {
|
|
518
|
+
lastResponse = null;
|
|
519
|
+
},
|
|
520
|
+
onResponseBody: (observation) => {
|
|
521
|
+
lastResponse = observation;
|
|
522
|
+
}
|
|
523
|
+
}
|
|
524
|
+
);
|
|
525
|
+
} catch (error) {
|
|
526
|
+
observeTerminal({ error });
|
|
527
|
+
throw error;
|
|
528
|
+
}
|
|
529
|
+
};
|
|
496
530
|
let response;
|
|
497
531
|
let recoveryDeadline = null;
|
|
498
532
|
const recoveryTimeoutMs = options?.recoveryTimeoutMs ?? DEFAULT_EXECUTION_RECOVERY_TIMEOUT_MS;
|
|
@@ -587,6 +621,7 @@ var ToolCalls = class {
|
|
|
587
621
|
});
|
|
588
622
|
}
|
|
589
623
|
}
|
|
624
|
+
observeTerminal();
|
|
590
625
|
const materialized = materializeToolExecutionResponse(response);
|
|
591
626
|
return idempotencyKey ? { ...materialized, idempotencyKey } : materialized;
|
|
592
627
|
}
|