deepline 0.3.327 → 0.3.329
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/index.ts +1 -0
- package/dist/bundling-sources/sdk/src/play.ts +55 -45
- package/dist/bundling-sources/sdk/src/release.ts +1 -1
- package/dist/bundling-sources/sdk/src/types.ts +16 -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/play-runtime/context.ts +31 -15
- package/dist/bundling-sources/shared_libs/play-runtime/play-runtime-semantics.ts +22 -4
- package/dist/bundling-sources/shared_libs/play-runtime/runner-app/index.ts +29 -11
- package/dist/bundling-sources/shared_libs/play-runtime/tool-result.ts +145 -19
- package/dist/bundling-sources/shared_libs/plays/authoring-contract.ts +37 -10
- package/dist/bundling-sources/shared_libs/plays/dataset.ts +3 -0
- package/dist/bundling-sources/shared_libs/plays/tool-result-types.ts +59 -10
- package/dist/bundling-sources/shared_libs/security/secret-redaction.ts +4 -0
- package/dist/cli/{auth-EBBDOKNV.mjs → auth-MFFVOITR.mjs} +4 -4
- package/dist/cli/auth-W2MQM6GQ.js +31 -0
- package/dist/cli/{billing-IM2QUFX4.mjs → billing-LRBHWLIQ.mjs} +30 -16
- package/dist/cli/{billing-6AAB7WPJ.js → billing-V4Y4OVQ7.js} +96 -82
- package/dist/cli/{chunk-D6GD5AVN.mjs → chunk-3RZJ3GEG.mjs} +135 -5
- package/dist/cli/{chunk-MOP6D7Z5.js → chunk-4FLEXYUC.js} +141 -11
- package/dist/cli/{chunk-DSDX6EUW.js → chunk-75ZOTF3K.js} +15 -15
- package/dist/cli/{chunk-ZOFARJWH.mjs → chunk-7T6DX5RK.mjs} +21 -14
- package/dist/cli/{chunk-3MXRNPBN.js → chunk-AD23W4S5.js} +1 -1
- package/dist/cli/{chunk-F45425TB.mjs → chunk-EROOAI5G.mjs} +1 -1
- package/dist/cli/{chunk-REP2MYBI.mjs → chunk-ERU2OR6F.mjs} +2 -2
- package/dist/cli/{chunk-YIY74KUF.mjs → chunk-EV4QJE4J.mjs} +1 -1
- package/dist/cli/{chunk-CCRQ2VGJ.mjs → chunk-FK7PW6BP.mjs} +1 -1
- package/dist/cli/{chunk-2HKPAZVJ.js → chunk-FKKNYKDY.js} +14 -3
- package/dist/cli/{chunk-G5774EFF.mjs → chunk-GCNER3HV.mjs} +1 -1
- package/dist/cli/{chunk-4ZARCCPT.js → chunk-GY2EEO2Y.js} +9 -9
- package/dist/cli/{chunk-HOWQKN6J.mjs → chunk-HI7TAWFS.mjs} +79 -26
- package/dist/cli/{chunk-RSEVBSFE.mjs → chunk-HVPRQGF4.mjs} +1 -1
- package/dist/cli/{chunk-CISKBOXD.js → chunk-J2E5R2VH.js} +60 -60
- package/dist/cli/{chunk-7RCJDAJX.js → chunk-KHZQFFOQ.js} +2 -2
- package/dist/cli/{chunk-DVV4FPS7.mjs → chunk-MFQQINUY.mjs} +2 -2
- package/dist/cli/{chunk-DCAU6PND.mjs → chunk-MO2XSC5I.mjs} +4 -4
- package/dist/cli/{chunk-KP7W5NO6.mjs → chunk-NTVTZAVZ.mjs} +13 -2
- package/dist/cli/{chunk-HZZJR2GV.js → chunk-OUTIWGKY.js} +26 -26
- package/dist/cli/{chunk-QZAP5VOS.mjs → chunk-OZGU7P2S.mjs} +1 -1
- package/dist/cli/{chunk-A5SKM3GL.mjs → chunk-SJV5MTOJ.mjs} +1 -1
- package/dist/cli/{chunk-UROXKPND.js → chunk-U2N4CYT7.js} +6 -6
- package/dist/cli/{chunk-4TO56P22.js → chunk-U4CTHVN7.js} +255 -248
- package/dist/cli/{chunk-AGH6YP2T.js → chunk-UQV5M6HN.js} +3 -3
- package/dist/cli/{chunk-DM3SHV6U.js → chunk-VDIHLKGG.js} +4 -4
- package/dist/cli/{chunk-77RAV5XX.js → chunk-VLDLJZ75.js} +48 -48
- package/dist/cli/{chunk-NWIJLTRL.js → chunk-XRYKLK56.js} +119 -66
- package/dist/cli/{chunk-3ITDKXNC.mjs → chunk-YNSCELIJ.mjs} +2 -2
- package/dist/cli/{chunk-TAGHNT5P.js → chunk-ZXGUYTIT.js} +6 -6
- package/dist/cli/client-5AIFBLKQ.js +20 -0
- package/dist/cli/{client-JCMSACT4.mjs → client-BNLD775D.mjs} +3 -3
- package/dist/cli/{csv-NPMWVM5D.mjs → csv-7MVQECWG.mjs} +3 -3
- package/dist/cli/{csv-OILKDKUX.js → csv-ZT6ZRQ3Z.js} +12 -12
- package/dist/cli/{db-AZUAOWPQ.mjs → db-ABLWLMX5.mjs} +4 -4
- package/dist/cli/{db-MNDRYYEX.js → db-C4BMZXJK.js} +29 -29
- package/dist/cli/{describe-KJWOHMKC.mjs → describe-XWOWAR32.mjs} +10 -10
- package/dist/cli/{describe-QENLDLM2.js → describe-YALVN4WH.js} +17 -17
- package/dist/cli/{executions-QZNQWF6F.mjs → executions-7IZVKQ3O.mjs} +4 -4
- package/dist/cli/{executions-P36UHBPG.js → executions-U4TNRP26.js} +6 -6
- package/dist/cli/{feedback-RQ6HSZSG.mjs → feedback-GO5XPEKY.mjs} +3 -3
- package/dist/cli/{feedback-K4UGTLFD.js → feedback-NWMRT5W4.js} +6 -6
- package/dist/cli/{git-PBRMCBMI.mjs → git-R53WS4WA.mjs} +4 -4
- package/dist/cli/git-YWRLAOBY.js +23 -0
- package/dist/cli/index.js +95 -80
- package/dist/cli/index.mjs +54 -39
- package/dist/cli/{legacy-noops-G7GWJ5UC.mjs → legacy-noops-6QAZW7WJ.mjs} +4 -4
- package/dist/cli/{legacy-noops-X74FM35Q.js → legacy-noops-NJWM53DE.js} +7 -7
- package/dist/cli/{monitors-VKURX3YM.js → monitors-2I2MYAPS.js} +85 -85
- package/dist/cli/{monitors-KL2MCR57.mjs → monitors-2N4BRU5M.mjs} +4 -4
- package/dist/cli/{org-DT53KTNW.mjs → org-D3RHK2Q7.mjs} +4 -4
- package/dist/cli/{org-ZYXJDC44.js → org-XVNAE2JV.js} +60 -60
- package/dist/cli/{play-WIJGQYTB.mjs → play-L7MYJZ65.mjs} +9 -9
- package/dist/cli/play-OYRHI7G3.js +153 -0
- package/dist/cli/{providers-GRTW4TXX.js → providers-5BTDAZHN.js} +7 -7
- package/dist/cli/{providers-GYGKGS2J.mjs → providers-YM4E7WZD.mjs} +4 -4
- package/dist/cli/{quickstart-WB26543C.js → quickstart-5A3FHAH3.js} +5 -5
- package/dist/cli/{quickstart-XF3M2M2S.mjs → quickstart-ARPLJOLH.mjs} +3 -3
- package/dist/cli/{search-ANJLTOF2.mjs → search-KKJEVV27.mjs} +5 -5
- package/dist/cli/search-VE3O3ZEM.js +26 -0
- package/dist/cli/{secrets-D6UR5CTW.mjs → secrets-DGRJ4DO5.mjs} +4 -4
- package/dist/cli/{secrets-5KBUGMTK.js → secrets-DVPVCSZD.js} +13 -13
- package/dist/cli/{sessions-S7N4JEWK.mjs → sessions-56EHXLZD.mjs} +4 -4
- package/dist/cli/{sessions-46PXFULL.js → sessions-VG4ATQ5Y.js} +5 -5
- package/dist/cli/{settings-V6U3SRTH.mjs → settings-4U5XG7QI.mjs} +7 -7
- package/dist/cli/{settings-KMNBITSU.js → settings-BLOTIW2G.js} +74 -74
- package/dist/cli/{setup-4K5FY6AU.js → setup-L7AMAXCH.js} +41 -41
- package/dist/cli/{setup-OGITSLTN.mjs → setup-RHJAHPOR.mjs} +6 -6
- package/dist/cli/skills-QB4OQGGP.js +28 -0
- package/dist/cli/{skills-AXWAYPBY.mjs → skills-VU55YFCI.mjs} +4 -4
- package/dist/cli/tools-2CPFYNK7.js +40 -0
- package/dist/cli/{tools-LJCY6B23.mjs → tools-JS3YIDOH.mjs} +7 -6
- package/dist/cli/{update-DDR5XIUB.mjs → update-EHI5QUXM.mjs} +6 -6
- package/dist/cli/update-WXP24GU5.js +28 -0
- package/dist/cli/{workflow-PRNCVANQ.mjs → workflow-BITLTLRF.mjs} +5 -5
- package/dist/cli/{workflow-7CTCDWL3.js → workflow-NE4SYRAT.js} +15 -15
- package/dist/{client-wiWPZhnI.d.mts → client-D5XOQKsA.d.mts} +20 -1
- package/dist/{client-DHq8dJ56.d.ts → client-l-IoLh8Z.d.ts} +20 -1
- package/dist/{compiler-manifest-9TkZ_ykI.d.mts → compiler-manifest-82q4jtfQ.d.mts} +44 -17
- package/dist/{compiler-manifest-9TkZ_ykI.d.ts → compiler-manifest-82q4jtfQ.d.ts} +44 -17
- package/dist/{index-B-5_Xhud.d.mts → index-BPbW2XHF.d.mts} +1 -1
- package/dist/{index-ykksoEyR.d.ts → index-k0rquHIm.d.ts} +1 -1
- package/dist/index.d.mts +14 -8
- package/dist/index.d.ts +14 -8
- package/dist/index.js +194 -69
- package/dist/index.mjs +162 -37
- package/dist/install-integrity.json +84 -84
- 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 +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/package.json +2 -1
- package/dist/cli/auth-67YOPQ6M.js +0 -31
- package/dist/cli/client-7LZCG4VD.js +0 -20
- package/dist/cli/git-RPFH3NJ2.js +0 -23
- package/dist/cli/play-BUQV47E2.js +0 -153
- package/dist/cli/search-CR2GZLCM.js +0 -26
- package/dist/cli/skills-4FP2MZKL.js +0 -28
- package/dist/cli/tools-7YZPH6WC.js +0 -39
- package/dist/cli/update-3VUOW6AP.js +0 -28
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); var _class;// ../plays/authoring-contract.ts
|
|
2
2
|
var _typebox = require('@sinclair/typebox');
|
|
3
3
|
var _value = require('@sinclair/typebox/value');
|
|
4
|
-
var PLAY_AUTHORING_CONTRACT_EDITION =
|
|
4
|
+
var PLAY_AUTHORING_CONTRACT_EDITION = 10;
|
|
5
5
|
var SUPPORTED_PLAY_AUTHORING_CONTRACT_EDITIONS = [
|
|
6
6
|
1,
|
|
7
7
|
2,
|
|
@@ -11,7 +11,8 @@ var SUPPORTED_PLAY_AUTHORING_CONTRACT_EDITIONS = [
|
|
|
11
11
|
6,
|
|
12
12
|
7,
|
|
13
13
|
8,
|
|
14
|
-
9
|
|
14
|
+
9,
|
|
15
|
+
10
|
|
15
16
|
];
|
|
16
17
|
var PLAY_AUTHORING_CONTRACT_CHANGELOG_DETAILS = [
|
|
17
18
|
{
|
|
@@ -67,8 +68,17 @@ var PLAY_AUTHORING_CONTRACT_CHANGELOG_DETAILS = [
|
|
|
67
68
|
compatibilityOwner: "Plays Runtime",
|
|
68
69
|
newWritesEnd: null,
|
|
69
70
|
readerRemoval: null
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
changed: "List getters return ordinary arrays from the complete resident tool response. Lazy database datasets require an explicit dataset read; incomplete historical previews fail rather than masquerade as complete arrays. Editions 1\u20139 retain dataset-valued getters; stored tool receipts are unchanged.",
|
|
74
|
+
compatibilityOwner: "Plays Runtime",
|
|
75
|
+
newWritesEnd: null,
|
|
76
|
+
readerRemoval: null
|
|
70
77
|
}
|
|
71
78
|
];
|
|
79
|
+
function playToolListGetterMode(edition = PLAY_AUTHORING_CONTRACT_EDITION) {
|
|
80
|
+
return edition >= 10 ? "array" : "dataset";
|
|
81
|
+
}
|
|
72
82
|
var PLAY_AUTHORING_CONTRACT_CHANGELOG = SUPPORTED_PLAY_AUTHORING_CONTRACT_EDITIONS.map((edition, index) => ({
|
|
73
83
|
edition,
|
|
74
84
|
...PLAY_AUTHORING_CONTRACT_CHANGELOG_DETAILS[index]
|
|
@@ -1637,4 +1647,5 @@ var PLAY_AUTHORING_CLOUD_TYPE_DECLARATIONS = [
|
|
|
1637
1647
|
|
|
1638
1648
|
|
|
1639
1649
|
|
|
1640
|
-
|
|
1650
|
+
|
|
1651
|
+
exports.PLAY_AUTHORING_CONTRACT_EDITION = PLAY_AUTHORING_CONTRACT_EDITION; exports.playToolListGetterMode = playToolListGetterMode; exports.CtxFetchHttpError = CtxFetchHttpError;
|
|
@@ -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.329",
|
|
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 @@ var _chunkLA46MMTLjs = require('./chunk-LA46MMTL.js');
|
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
|
|
18
|
-
var
|
|
18
|
+
var _chunkVDIHLKGGjs = require('./chunk-VDIHLKGG.js');
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
|
|
@@ -146,7 +146,7 @@ async function queryCustomerDatabase(http, input) {
|
|
|
146
146
|
if (error instanceof _chunk7P5AA3SNjs.DeeplineError && (_optionalChain([error, 'access', _2 => _2.code, 'optionalAccess', _3 => _3.startsWith, 'call', _4 => _4("NETWORK_")]) || // Older API readers return PostgreSQL errors as HTTP 400, including
|
|
147
147
|
// lost connections and explicitly unknown transaction resolution.
|
|
148
148
|
/^08[A-Z0-9]{3}$/.test(_nullishCoalesce(error.code, () => ( ""))) || ["57P01", "57P02", "57P03"].includes(_nullishCoalesce(error.code, () => ( ""))) || error.statusCode === 408 || (_nullishCoalesce(error.statusCode, () => ( 0))) >= 500)) {
|
|
149
|
-
throw new (0,
|
|
149
|
+
throw new (0, _chunkVDIHLKGGjs.CustomerDbQueryOutcomeUnknownError)(
|
|
150
150
|
error,
|
|
151
151
|
plan.request.body.operation_key
|
|
152
152
|
);
|
|
@@ -154,7 +154,7 @@ async function queryCustomerDatabase(http, input) {
|
|
|
154
154
|
throw error;
|
|
155
155
|
}
|
|
156
156
|
if (!result || typeof result !== "object" || Array.isArray(result) || typeof result.command !== "string" || !Array.isArray(result.columns) || !Array.isArray(result.rows) || typeof result.truncated !== "boolean" || result.row_count !== null && (!Number.isSafeInteger(result.row_count) || result.row_count < 0) || !Number.isSafeInteger(result.row_count_returned) || result.row_count_returned < 0) {
|
|
157
|
-
throw new (0,
|
|
157
|
+
throw new (0, _chunkVDIHLKGGjs.CustomerDbQueryOutcomeUnknownError)(
|
|
158
158
|
new (0, _chunk7P5AA3SNjs.DeeplineError)(
|
|
159
159
|
"The SQL response did not contain a valid result.",
|
|
160
160
|
200,
|
|
@@ -165,7 +165,7 @@ async function queryCustomerDatabase(http, input) {
|
|
|
165
165
|
}
|
|
166
166
|
const operation = result.operation;
|
|
167
167
|
if (input.operationKey !== void 0 && (!operation || operation.operation_key !== input.operationKey || !Number.isSafeInteger(operation.completed_at_ms) || operation.completed_at_ms < 0 || !["executed", "operation_recovery"].includes(operation.source))) {
|
|
168
|
-
throw new (0,
|
|
168
|
+
throw new (0, _chunkVDIHLKGGjs.CustomerDbQueryOutcomeUnknownError)(
|
|
169
169
|
new (0, _chunk7P5AA3SNjs.DeeplineError)(
|
|
170
170
|
"The server did not confirm the original atomic SQL operation.",
|
|
171
171
|
200,
|
|
@@ -2854,8 +2854,8 @@ function runtimeSelectionHeaders(runtime) {
|
|
|
2854
2854
|
}
|
|
2855
2855
|
const receivers = _optionalChain([process, 'access', _102 => _102.env, 'access', _103 => _103.DEEPLINE_RUNTIME_RETAINED_PIPELINE_RECEIVERS, 'optionalAccess', _104 => _104.trim, 'call', _105 => _105()]);
|
|
2856
2856
|
return {
|
|
2857
|
-
[
|
|
2858
|
-
...receivers ? { [
|
|
2857
|
+
[_chunkVDIHLKGGjs.RUNTIME_ENVIRONMENT_TOKEN_HEADER]: token,
|
|
2858
|
+
...receivers ? { [_chunkVDIHLKGGjs.RETAINED_PIPELINE_RECEIVERS_HEADER]: receivers } : {}
|
|
2859
2859
|
};
|
|
2860
2860
|
}
|
|
2861
2861
|
function isolatedCiRuntimeEventReadHeaders() {
|
|
@@ -2871,7 +2871,7 @@ function isolatedCiRuntimeEventReadHeaders() {
|
|
|
2871
2871
|
"RUNTIME_EVENT_INTERNAL_TOKEN_REQUIRED"
|
|
2872
2872
|
);
|
|
2873
2873
|
}
|
|
2874
|
-
return { [
|
|
2874
|
+
return { [_chunkVDIHLKGGjs.COORDINATOR_INTERNAL_TOKEN_HEADER]: token };
|
|
2875
2875
|
}
|
|
2876
2876
|
function normalizeTestPolicyOverrides(value, source) {
|
|
2877
2877
|
if (value && typeof value === "object" && !Array.isArray(value)) {
|
|
@@ -3172,8 +3172,8 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
3172
3172
|
* @throws {@link ConfigError} if no API key can be resolved from any source.
|
|
3173
3173
|
*/
|
|
3174
3174
|
constructor(options) {
|
|
3175
|
-
this.config =
|
|
3176
|
-
this.http = new (0,
|
|
3175
|
+
this.config = _chunkVDIHLKGGjs.resolveConfig.call(void 0, options);
|
|
3176
|
+
this.http = new (0, _chunkVDIHLKGGjs.HttpClient)(this.config);
|
|
3177
3177
|
this.toolCalls = new ToolCalls(
|
|
3178
3178
|
this.http,
|
|
3179
3179
|
this.config.timeout,
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
import {
|
|
11
11
|
recentSearchRef,
|
|
12
12
|
registerDeprecatedSearchCommand
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-3RZJ3GEG.mjs";
|
|
14
14
|
import {
|
|
15
15
|
extractSummaryFields,
|
|
16
16
|
projectRowOutput,
|
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
import {
|
|
23
23
|
DeeplineClient,
|
|
24
24
|
validateExecutionIdempotencyKey
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-OZGU7P2S.mjs";
|
|
26
26
|
import {
|
|
27
27
|
beginToolExecuteCommand,
|
|
28
28
|
getToolExecuteInvocationId,
|
|
@@ -36,11 +36,14 @@ import {
|
|
|
36
36
|
printJsonError,
|
|
37
37
|
renderCommandEnvelopeText,
|
|
38
38
|
shouldEmitJson
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-EROOAI5G.mjs";
|
|
40
40
|
import {
|
|
41
41
|
resolveConfig,
|
|
42
42
|
sdkCliStateDirPath
|
|
43
|
-
} from "./chunk-
|
|
43
|
+
} from "./chunk-FK7PW6BP.mjs";
|
|
44
|
+
import {
|
|
45
|
+
playToolListGetterMode
|
|
46
|
+
} from "./chunk-NTVTZAVZ.mjs";
|
|
44
47
|
import {
|
|
45
48
|
DeeplineError
|
|
46
49
|
} from "./chunk-NXGCO4JB.mjs";
|
|
@@ -302,7 +305,19 @@ var CapabilityDescription = class _CapabilityDescription {
|
|
|
302
305
|
billingSource,
|
|
303
306
|
billingSourceLabel,
|
|
304
307
|
deeplineCreditsPerPricingUnit: isFree ? 0 : canonicalCredits,
|
|
305
|
-
deeplineUsdPerPricingUnit: isFree ? 0 : canonicalUsd
|
|
308
|
+
deeplineUsdPerPricingUnit: isFree ? 0 : canonicalUsd,
|
|
309
|
+
...pricing.estimatedRange && !isFree && billingSource !== "own_provider_credentials" ? {
|
|
310
|
+
estimatedRange: pricing.estimatedRange,
|
|
311
|
+
details: Array.isArray(pricing.details) ? pricing.details.filter(
|
|
312
|
+
(value) => typeof value === "string"
|
|
313
|
+
) : []
|
|
314
|
+
} : {},
|
|
315
|
+
...pricing.observedReference && !isFree && billingSource !== "own_provider_credentials" ? {
|
|
316
|
+
observedReference: pricing.observedReference,
|
|
317
|
+
details: Array.isArray(pricing.details) ? pricing.details.filter(
|
|
318
|
+
(value) => typeof value === "string"
|
|
319
|
+
) : []
|
|
320
|
+
} : {}
|
|
306
321
|
};
|
|
307
322
|
}
|
|
308
323
|
};
|
|
@@ -959,6 +974,7 @@ Notes:
|
|
|
959
974
|
preserve the nesting shown in the tool's example. Schemas and examples are
|
|
960
975
|
separate describe fields.
|
|
961
976
|
get is accepted as a compatibility alias for describe.
|
|
977
|
+
Text by default, including when piped; pass --json for structured output.
|
|
962
978
|
|
|
963
979
|
Examples:
|
|
964
980
|
deepline tools describe hunter_email_verifier
|
|
@@ -971,7 +987,7 @@ Examples:
|
|
|
971
987
|
deepline tools describe ai_evaluate --estimate-payload @payload.json --json
|
|
972
988
|
deepline tools execute hunter_email_verifier --input '{"email":"a@b.com"}'
|
|
973
989
|
`
|
|
974
|
-
).option("--json", "Emit JSON output
|
|
990
|
+
).option("--json", "Emit JSON output").option(
|
|
975
991
|
"--model <model>",
|
|
976
992
|
"For language tools, include AI Gateway metadata; for ai_evaluate, set the quote payload model"
|
|
977
993
|
).option(
|
|
@@ -1013,7 +1029,7 @@ Examples:
|
|
|
1013
1029
|
process.exitCode = await narrowView();
|
|
1014
1030
|
return;
|
|
1015
1031
|
}
|
|
1016
|
-
const { describeAnything } = await import("./describe-
|
|
1032
|
+
const { describeAnything } = await import("./describe-XWOWAR32.mjs");
|
|
1017
1033
|
process.exitCode = await describeAnything(
|
|
1018
1034
|
toolId,
|
|
1019
1035
|
{ ...options, kinds: ["tools", "monitors"], fetchedTool: metadata },
|
|
@@ -1230,14 +1246,6 @@ ${formatModelDescription(modelDescription)}`);
|
|
|
1230
1246
|
if (inferenceQuote) printInferenceQuoteSummary(inferenceQuote);
|
|
1231
1247
|
return 0;
|
|
1232
1248
|
}
|
|
1233
|
-
if (shouldEmitJson()) {
|
|
1234
|
-
printCompactJson({
|
|
1235
|
-
...toolContractJsonForDescribe(tool, toolId),
|
|
1236
|
-
...modelDescription ? { modelOptions: modelDescription } : {},
|
|
1237
|
-
...inferenceQuote ? { inferenceQuote } : {}
|
|
1238
|
-
});
|
|
1239
|
-
return 0;
|
|
1240
|
-
}
|
|
1241
1249
|
printCompactToolContract(tool, toolId);
|
|
1242
1250
|
if (modelDescription) {
|
|
1243
1251
|
process.stdout.write(`
|
|
@@ -1257,7 +1265,7 @@ function inferenceQuoteSummaryLines(_quote) {
|
|
|
1257
1265
|
function printInferenceQuoteSummary(quote) {
|
|
1258
1266
|
for (const line of inferenceQuoteSummaryLines(quote)) console.log(line);
|
|
1259
1267
|
}
|
|
1260
|
-
function toolContractJsonForDescribe(tool, requestedToolId) {
|
|
1268
|
+
function toolContractJsonForDescribe(tool, requestedToolId, authoringContractEdition) {
|
|
1261
1269
|
const toolId = String(tool.toolId || requestedToolId);
|
|
1262
1270
|
const inputFields = toolInputFieldsForDisplay(
|
|
1263
1271
|
recordField(tool, "inputSchema", "input_schema")
|
|
@@ -1276,7 +1284,11 @@ function toolContractJsonForDescribe(tool, requestedToolId) {
|
|
|
1276
1284
|
);
|
|
1277
1285
|
const extractedLists = extractionContractEntries(
|
|
1278
1286
|
arrayField2(toolExecutionResult, "extractedLists", "extracted_lists")
|
|
1279
|
-
)
|
|
1287
|
+
).map((entry) => ({
|
|
1288
|
+
...entry,
|
|
1289
|
+
returnType: playToolListGetterMode(authoringContractEdition) === "array" ? "Array" : "PlayDataset",
|
|
1290
|
+
rowsExpression: playToolListGetterMode(authoringContractEdition) === "array" ? entry.expression : `await ${entry.expression}.materialize()`
|
|
1291
|
+
}));
|
|
1280
1292
|
const extractedValues = extractionContractEntries(
|
|
1281
1293
|
arrayField2(toolExecutionResult, "extractedValues", "extracted_values")
|
|
1282
1294
|
);
|
|
@@ -1685,7 +1697,7 @@ function printCompactToolContract(tool, requestedToolId) {
|
|
|
1685
1697
|
if (listGetters.length || valueGetters.length) {
|
|
1686
1698
|
console.log("");
|
|
1687
1699
|
console.log("Getters:");
|
|
1688
|
-
if (listGetters.length) console.log(
|
|
1700
|
+
if (listGetters.length) console.log(listGetterHeading());
|
|
1689
1701
|
for (const entry of listGetters) {
|
|
1690
1702
|
if (isRecord(entry))
|
|
1691
1703
|
console.log(
|
|
@@ -1723,6 +1735,10 @@ function toolPricingOnlyLines(tool, requestedToolId, options = {}) {
|
|
|
1723
1735
|
const price = displayText || summary || (credits !== null ? `${formatDecimal(credits)} Deepline credits${usd !== null ? ` / ${formatUsd(usd)}` : ""} per ${unit}` : "pricing unavailable");
|
|
1724
1736
|
return [
|
|
1725
1737
|
`${options.heading ?? `Pricing: ${toolId}`}: ${price}`,
|
|
1738
|
+
...cost.observedReference || cost.estimatedRange ? [
|
|
1739
|
+
...summary ? [` ${summary}`] : [],
|
|
1740
|
+
...(cost.details ?? []).map((detail) => ` ${detail}`)
|
|
1741
|
+
] : [],
|
|
1726
1742
|
`Billing: ${billing}`
|
|
1727
1743
|
];
|
|
1728
1744
|
}
|
|
@@ -1807,7 +1823,7 @@ function printToolExamplesOnly(tool, requestedToolId) {
|
|
|
1807
1823
|
const getters = isRecord(contract.getters) ? contract.getters : {};
|
|
1808
1824
|
const valueGetters = Array.isArray(getters.extractedValues) ? getters.extractedValues : [];
|
|
1809
1825
|
const listGetters = Array.isArray(getters.extractedLists) ? getters.extractedLists : [];
|
|
1810
|
-
const firstGetter =
|
|
1826
|
+
const firstGetter = valueGetters.find(isRecord);
|
|
1811
1827
|
if (firstGetter) {
|
|
1812
1828
|
const name = stringField2(firstGetter, "name") || "value";
|
|
1813
1829
|
const expression = stringField2(firstGetter, "expression");
|
|
@@ -1816,7 +1832,28 @@ function printToolExamplesOnly(tool, requestedToolId) {
|
|
|
1816
1832
|
`const ${safeIdentifier(name)} = ${expression.replace(/^toolExecutionResult\./, "result.")};`
|
|
1817
1833
|
);
|
|
1818
1834
|
}
|
|
1835
|
+
const arrayNames = new Set(
|
|
1836
|
+
recursiveToolInputFieldsForDisplay(
|
|
1837
|
+
recordField(tool, "outputSchema", "output_schema")
|
|
1838
|
+
).filter((field) => String(field.type).split("|").includes("array")).map((field) => String(field.name).split(".").at(-1))
|
|
1839
|
+
);
|
|
1840
|
+
const firstList = listGetters.find(
|
|
1841
|
+
(entry) => isRecord(entry) && arrayNames.has(stringField2(entry, "name"))
|
|
1842
|
+
) ?? listGetters.find(isRecord);
|
|
1843
|
+
if (isRecord(firstList)) {
|
|
1844
|
+
const name = safeIdentifier(stringField2(firstList, "name") || "list");
|
|
1845
|
+
if (playToolListGetterMode() === "array") {
|
|
1846
|
+
console.log(`const ${name}_rows = ${playResultExpression(firstList)};`);
|
|
1847
|
+
} else {
|
|
1848
|
+
console.log(`const ${name}_ds = ${playResultExpression(firstList)};`);
|
|
1849
|
+
console.log(
|
|
1850
|
+
"// Complete small list from this response; throws above the memory cap."
|
|
1851
|
+
);
|
|
1852
|
+
console.log(`const ${name}_rows = await ${name}_ds.materialize();`);
|
|
1853
|
+
}
|
|
1854
|
+
}
|
|
1819
1855
|
console.log("```");
|
|
1856
|
+
if (firstList) printListGetterConsumption();
|
|
1820
1857
|
for (const example of examples) {
|
|
1821
1858
|
const description = stringField2(example, "description");
|
|
1822
1859
|
if (description) console.log(description);
|
|
@@ -1863,13 +1900,14 @@ function printToolGettersOnly(tool, requestedToolId) {
|
|
|
1863
1900
|
return;
|
|
1864
1901
|
}
|
|
1865
1902
|
if (listGetters.length) {
|
|
1866
|
-
console.log(
|
|
1903
|
+
console.log(listGetterHeading());
|
|
1867
1904
|
for (const entry of listGetters) {
|
|
1868
1905
|
if (isRecord(entry))
|
|
1869
1906
|
console.log(
|
|
1870
1907
|
`- ${stringField2(entry, "name")}: ${playResultExpression(entry)}`
|
|
1871
1908
|
);
|
|
1872
1909
|
}
|
|
1910
|
+
printListGetterConsumption();
|
|
1873
1911
|
}
|
|
1874
1912
|
if (valueGetters.length) {
|
|
1875
1913
|
console.log("Values:");
|
|
@@ -1881,6 +1919,20 @@ function printToolGettersOnly(tool, requestedToolId) {
|
|
|
1881
1919
|
}
|
|
1882
1920
|
}
|
|
1883
1921
|
}
|
|
1922
|
+
function printListGetterConsumption() {
|
|
1923
|
+
if (playToolListGetterMode() === "array") {
|
|
1924
|
+
console.log(
|
|
1925
|
+
"Use the ordinary array directly, or pass it to ctx.dataset to persist row work. No provider pagination is fetched. Lazy or incomplete lists throw; use readList for an explicit dataset read. A missing getter is not an empty list."
|
|
1926
|
+
);
|
|
1927
|
+
return;
|
|
1928
|
+
}
|
|
1929
|
+
console.log(
|
|
1930
|
+
"Pass the handle to ctx.dataset, use first() for one row, or for await...of to stream rows. materialize() loads the complete current list within the memory cap; materialize(n) and peek(n) return only a prefix. None fetch additional provider pagination. A missing getter is not an empty list."
|
|
1931
|
+
);
|
|
1932
|
+
}
|
|
1933
|
+
function listGetterHeading() {
|
|
1934
|
+
return playToolListGetterMode() === "array" ? "Lists (ordinary JavaScript arrays):" : "Lists (PlayDataset, not a JavaScript array):";
|
|
1935
|
+
}
|
|
1884
1936
|
function sampleValueForField(field) {
|
|
1885
1937
|
const name = stringField2(field, "name").toLowerCase();
|
|
1886
1938
|
const type = stringField2(field, "type").toLowerCase();
|
|
@@ -2010,15 +2062,16 @@ function usageGuidanceWithAccessDefaults(usageGuidance) {
|
|
|
2010
2062
|
},
|
|
2011
2063
|
access: {
|
|
2012
2064
|
...existingAccess,
|
|
2013
|
-
extractedLists: {
|
|
2014
|
-
expression: "toolExecutionResult.extractedLists.<name>.get()",
|
|
2015
|
-
meaning: "Declared Deepline list extractors only."
|
|
2016
|
-
},
|
|
2017
2065
|
extractedValues: {
|
|
2018
2066
|
expression: "toolExecutionResult.extractedValues.<name>.get()",
|
|
2019
2067
|
meaning: "Declared Deepline scalar or normalized object extractors only."
|
|
2020
2068
|
},
|
|
2021
2069
|
...existingAccess,
|
|
2070
|
+
extractedLists: {
|
|
2071
|
+
...recordField(existingAccess, "extractedLists"),
|
|
2072
|
+
expression: "toolExecutionResult.extractedLists.<name>.get()",
|
|
2073
|
+
meaning: playToolListGetterMode() === "array" ? "Returns an ordinary array from this response. Use array methods directly or pass it to ctx.dataset to persist row work. Lazy or incomplete lists throw; use readList for an explicit dataset read. It does not fetch provider pages." : "Returns a PlayDataset, not a JavaScript array. Pass the handle to ctx.dataset, use first(), async iteration, or await handle.materialize() for the complete current list within the memory cap. materialize(n) and peek(n) return a prefix; none fetch additional provider pages. A missing getter is not an empty list."
|
|
2074
|
+
},
|
|
2022
2075
|
rawToolResponse: {
|
|
2023
2076
|
expression: "toolExecutionResult.toolResponse.rawV2",
|
|
2024
2077
|
meaning: "Complete tool response with its original nesting. Read tool-specific fields here; use declared getters for extracted values and lists."
|
|
@@ -2658,8 +2711,8 @@ export default definePlay(${JSON.stringify(playName)}, async (ctx) => {
|
|
|
2658
2711
|
const rows = list.get();
|
|
2659
2712
|
// ${sampleRows}
|
|
2660
2713
|
// columns: ${columns}
|
|
2661
|
-
// extractedLists.<name>.get() returns a dataset handle for row-shaped list outputs.
|
|
2662
|
-
// Pass it to ctx.dataset; use rows.peek/count/materialize only for deliberate bounded inspection.
|
|
2714
|
+
// ${playToolListGetterMode() === "array" ? "extractedLists.<name>.get() returns an ordinary array from this response." : "extractedLists.<name>.get() returns a dataset handle for row-shaped list outputs."}
|
|
2715
|
+
// ${playToolListGetterMode() === "array" ? "Use array methods directly; pass rows to ctx.dataset to persist row work." : "Pass it to ctx.dataset; use rows.peek/count/materialize only for deliberate bounded inspection."}
|
|
2663
2716
|
// .withColumn('email_waterfall', (row, rowCtx) => rowCtx.runPlay('name_domain_email', 'name-and-domain-to-email', { first_name: String(row.first_name ?? ''), last_name: String(row.last_name ?? ''), domain: String(row.domain ?? '') }, { description: 'Resolve email.' }))
|
|
2664
2717
|
// .withColumn('phone_waterfall', (row, rowCtx) => rowCtx.runPlay('contact_phone', 'contact-to-phone', { first_name: String(row.first_name ?? ''), last_name: String(row.last_name ?? ''), email: String(row.email ?? '') }, { description: 'Resolve phone.' }))
|
|
2665
2718
|
// ctx.dataset is idempotent for completed rows during same-run recovery. New runs follow each call's freshness.
|