deepline 0.1.180 → 0.1.182
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/apps/play-runner-workers/src/entry.ts +241 -4
- package/dist/bundling-sources/apps/play-runner-workers/src/runtime/output-datasets.ts +124 -12
- package/dist/bundling-sources/sdk/src/client.ts +7 -5
- package/dist/bundling-sources/sdk/src/play.ts +200 -26
- package/dist/bundling-sources/sdk/src/release.ts +2 -2
- package/dist/bundling-sources/shared_libs/play-runtime/context.ts +263 -44
- package/dist/bundling-sources/shared_libs/play-runtime/ctx-types.ts +1 -0
- package/dist/bundling-sources/shared_libs/play-runtime/query-result-dataset.ts +120 -0
- package/dist/bundling-sources/shared_libs/play-runtime/tool-result.ts +139 -17
- package/dist/cli/index.js +12 -9
- package/dist/cli/index.mjs +12 -9
- package/dist/index.d.mts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +213 -28
- package/dist/index.mjs +213 -28
- package/package.json +1 -1
|
@@ -52,7 +52,12 @@ type PathSegment = string | number | '*';
|
|
|
52
52
|
|
|
53
53
|
const SERIALIZED_TOOL_EXECUTE_RESULT_KIND = 'deepline.tool_execute_result.v1';
|
|
54
54
|
const SERIALIZED_TOOL_RESULT_LIST_PREVIEW_LIMIT = 5;
|
|
55
|
+
const LIVE_TOOL_RESULT_LIST_DATASET_REGISTRY_LIMIT = 256;
|
|
55
56
|
const SERIALIZED_TOOL_LIST_ROWS = Symbol('deepline.serialized_tool_list_rows');
|
|
57
|
+
const liveToolResultListDatasets = new Map<
|
|
58
|
+
string,
|
|
59
|
+
PlayDataset<Record<string, unknown>>
|
|
60
|
+
>();
|
|
56
61
|
|
|
57
62
|
const TARGET_FALLBACK_KEYS: Record<string, readonly RegExp[]> = {
|
|
58
63
|
email: [/^email$/i, /^address$/i, /email/i],
|
|
@@ -1169,6 +1174,9 @@ export function readList(
|
|
|
1169
1174
|
if (selector) {
|
|
1170
1175
|
const paths = Array.isArray(selector) ? selector : [selector];
|
|
1171
1176
|
const declaredList = findDeclaredListAccessor(result, paths);
|
|
1177
|
+
if (declaredList && preservedSerializedListRows(result)) {
|
|
1178
|
+
return declaredList.get();
|
|
1179
|
+
}
|
|
1172
1180
|
const found = findFirstTargetByPath(resultRootOf(result), paths)?.value;
|
|
1173
1181
|
const rows = normalizeRows(found);
|
|
1174
1182
|
if (rows) {
|
|
@@ -1186,6 +1194,55 @@ export function readList(
|
|
|
1186
1194
|
return Object.values(result.extractedLists)[0]?.get() ?? [];
|
|
1187
1195
|
}
|
|
1188
1196
|
|
|
1197
|
+
export function attachToolResultListDataset<T extends Record<string, unknown>>(
|
|
1198
|
+
result: ToolExecuteResult,
|
|
1199
|
+
input: {
|
|
1200
|
+
name: string;
|
|
1201
|
+
path: string;
|
|
1202
|
+
dataset: PlayDataset<T>;
|
|
1203
|
+
count: number;
|
|
1204
|
+
keys?: Record<string, string>;
|
|
1205
|
+
},
|
|
1206
|
+
): ToolExecuteResult {
|
|
1207
|
+
const existing = result._metadata.lists[input.name];
|
|
1208
|
+
result._metadata.lists[input.name] = {
|
|
1209
|
+
path: input.path,
|
|
1210
|
+
count: input.count,
|
|
1211
|
+
keys: input.keys ?? existing?.keys ?? {},
|
|
1212
|
+
};
|
|
1213
|
+
const accessor = {
|
|
1214
|
+
path: input.path,
|
|
1215
|
+
count: input.count,
|
|
1216
|
+
keys: result._metadata.lists[input.name].keys,
|
|
1217
|
+
} as ToolResultListAccessor<T>;
|
|
1218
|
+
Object.defineProperty(accessor, 'get', {
|
|
1219
|
+
value() {
|
|
1220
|
+
return input.dataset;
|
|
1221
|
+
},
|
|
1222
|
+
enumerable: false,
|
|
1223
|
+
});
|
|
1224
|
+
result.extractedLists[input.name] = accessor;
|
|
1225
|
+
const serialized = input.dataset.toJSON();
|
|
1226
|
+
let root: unknown = { toolResponse: { raw: result.toolResponse.raw } };
|
|
1227
|
+
const candidates = [...candidateResultPaths(input.path)].filter(
|
|
1228
|
+
(candidate, index, all) => all.indexOf(candidate) === index,
|
|
1229
|
+
);
|
|
1230
|
+
for (const candidate of candidates) {
|
|
1231
|
+
if (!Array.isArray(getAtPath(root, candidate))) continue;
|
|
1232
|
+
root = replaceAtPath(root, candidate, serialized.preview);
|
|
1233
|
+
break;
|
|
1234
|
+
}
|
|
1235
|
+
if (
|
|
1236
|
+
isRecord(root) &&
|
|
1237
|
+
isRecord(root.toolResponse) &&
|
|
1238
|
+
Object.prototype.hasOwnProperty.call(root.toolResponse, 'raw')
|
|
1239
|
+
) {
|
|
1240
|
+
result.toolResponse.raw = root.toolResponse.raw;
|
|
1241
|
+
result.toolOutput.raw = root.toolResponse.raw;
|
|
1242
|
+
}
|
|
1243
|
+
return result;
|
|
1244
|
+
}
|
|
1245
|
+
|
|
1189
1246
|
function normalizeListPathForMatch(path: string): string {
|
|
1190
1247
|
return path.replace(/\[(?:\*|\d+)\]$/g, '');
|
|
1191
1248
|
}
|
|
@@ -1237,10 +1294,12 @@ function serializedListDatasetsFromResult(
|
|
|
1237
1294
|
): Record<string, SerializedPlayDataset<Record<string, unknown>>> | undefined {
|
|
1238
1295
|
const entries = Object.entries(value.extractedLists).flatMap(
|
|
1239
1296
|
([name, accessor]) => {
|
|
1240
|
-
const
|
|
1297
|
+
const dataset = accessor.get();
|
|
1298
|
+
const serialized = dataset.toJSON();
|
|
1241
1299
|
if (!isSerializedPlayDataset<Record<string, unknown>>(serialized)) {
|
|
1242
1300
|
return [];
|
|
1243
1301
|
}
|
|
1302
|
+
rememberLiveToolResultListDataset(serialized.datasetId, dataset);
|
|
1244
1303
|
return [
|
|
1245
1304
|
[
|
|
1246
1305
|
name,
|
|
@@ -1255,6 +1314,32 @@ function serializedListDatasetsFromResult(
|
|
|
1255
1314
|
return entries.length > 0 ? Object.fromEntries(entries) : undefined;
|
|
1256
1315
|
}
|
|
1257
1316
|
|
|
1317
|
+
function rememberLiveToolResultListDataset(
|
|
1318
|
+
datasetId: string,
|
|
1319
|
+
dataset: PlayDataset<Record<string, unknown>>,
|
|
1320
|
+
): void {
|
|
1321
|
+
if (!datasetId) return;
|
|
1322
|
+
liveToolResultListDatasets.delete(datasetId);
|
|
1323
|
+
liveToolResultListDatasets.set(datasetId, dataset);
|
|
1324
|
+
while (
|
|
1325
|
+
liveToolResultListDatasets.size > LIVE_TOOL_RESULT_LIST_DATASET_REGISTRY_LIMIT
|
|
1326
|
+
) {
|
|
1327
|
+
const oldest = liveToolResultListDatasets.keys().next().value;
|
|
1328
|
+
if (typeof oldest !== 'string') break;
|
|
1329
|
+
liveToolResultListDatasets.delete(oldest);
|
|
1330
|
+
}
|
|
1331
|
+
}
|
|
1332
|
+
|
|
1333
|
+
function readLiveToolResultListDataset(
|
|
1334
|
+
serialized: SerializedPlayDataset<Record<string, unknown>>,
|
|
1335
|
+
): PlayDataset<Record<string, unknown>> | null {
|
|
1336
|
+
const dataset = liveToolResultListDatasets.get(serialized.datasetId);
|
|
1337
|
+
if (!dataset) return null;
|
|
1338
|
+
const current = dataset.toJSON();
|
|
1339
|
+
if (current.count !== serialized.count) return null;
|
|
1340
|
+
return dataset;
|
|
1341
|
+
}
|
|
1342
|
+
|
|
1258
1343
|
function serializedListRowsFromRaw(input: {
|
|
1259
1344
|
raw: unknown;
|
|
1260
1345
|
metadata: ToolResultMetadataInput;
|
|
@@ -1273,11 +1358,13 @@ function serializedListRowsFromRaw(input: {
|
|
|
1273
1358
|
function preservedSerializedListRows(
|
|
1274
1359
|
value: ToolExecuteResult,
|
|
1275
1360
|
): Record<string, Array<Record<string, unknown>>> | undefined {
|
|
1276
|
-
const rows = (
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1361
|
+
const rows = (
|
|
1362
|
+
value as ToolExecuteResult & {
|
|
1363
|
+
[SERIALIZED_TOOL_LIST_ROWS]?:
|
|
1364
|
+
| Record<string, Array<Record<string, unknown>>>
|
|
1365
|
+
| undefined;
|
|
1366
|
+
}
|
|
1367
|
+
)[SERIALIZED_TOOL_LIST_ROWS];
|
|
1281
1368
|
return rows && Object.keys(rows).length > 0 ? rows : undefined;
|
|
1282
1369
|
}
|
|
1283
1370
|
|
|
@@ -1301,10 +1388,7 @@ function serializedListRowsFromResult(input: {
|
|
|
1301
1388
|
const entries = [...names].flatMap((name) => {
|
|
1302
1389
|
const dataset = input.listDatasets?.[name];
|
|
1303
1390
|
const preservedRows = preserved?.[name];
|
|
1304
|
-
if (
|
|
1305
|
-
preservedRows &&
|
|
1306
|
-
(!dataset || preservedRows.length >= dataset.count)
|
|
1307
|
-
) {
|
|
1391
|
+
if (preservedRows && (!dataset || preservedRows.length >= dataset.count)) {
|
|
1308
1392
|
return [[name, preservedRows]] as const;
|
|
1309
1393
|
}
|
|
1310
1394
|
const rows = rawRows?.[name];
|
|
@@ -1352,6 +1436,41 @@ function serializedRawWithListPreviews(input: {
|
|
|
1352
1436
|
: input.raw;
|
|
1353
1437
|
}
|
|
1354
1438
|
|
|
1439
|
+
function rawWithSerializedListRows(input: {
|
|
1440
|
+
raw: unknown;
|
|
1441
|
+
lists: Record<string, ToolResultListMetadata>;
|
|
1442
|
+
listDatasets:
|
|
1443
|
+
| Record<string, SerializedPlayDataset<Record<string, unknown>>>
|
|
1444
|
+
| undefined;
|
|
1445
|
+
listRows: Record<string, Array<Record<string, unknown>>> | undefined;
|
|
1446
|
+
}): unknown {
|
|
1447
|
+
if (!input.listRows || Object.keys(input.listRows).length === 0) {
|
|
1448
|
+
return input.raw;
|
|
1449
|
+
}
|
|
1450
|
+
|
|
1451
|
+
let root: unknown = { toolResponse: { raw: input.raw } };
|
|
1452
|
+
for (const [name, rows] of Object.entries(input.listRows)) {
|
|
1453
|
+
const sourcePath =
|
|
1454
|
+
input.listDatasets?.[name]?.sourceLabel ??
|
|
1455
|
+
input.lists[name]?.path ??
|
|
1456
|
+
name;
|
|
1457
|
+
const candidates = [...candidateResultPaths(sourcePath)].filter(
|
|
1458
|
+
(candidate, index, all) => all.indexOf(candidate) === index,
|
|
1459
|
+
);
|
|
1460
|
+
for (const candidate of candidates) {
|
|
1461
|
+
if (!Array.isArray(getAtPath(root, candidate))) continue;
|
|
1462
|
+
root = replaceAtPath(root, candidate, rows);
|
|
1463
|
+
break;
|
|
1464
|
+
}
|
|
1465
|
+
}
|
|
1466
|
+
|
|
1467
|
+
return isRecord(root) &&
|
|
1468
|
+
isRecord(root.toolResponse) &&
|
|
1469
|
+
Object.prototype.hasOwnProperty.call(root.toolResponse, 'raw')
|
|
1470
|
+
? root.toolResponse.raw
|
|
1471
|
+
: input.raw;
|
|
1472
|
+
}
|
|
1473
|
+
|
|
1355
1474
|
function createDatasetFromSerializedToolList(
|
|
1356
1475
|
serialized: SerializedPlayDataset<Record<string, unknown>>,
|
|
1357
1476
|
rows?: Array<Record<string, unknown>>,
|
|
@@ -1411,6 +1530,12 @@ function applySerializedListDatasets(
|
|
|
1411
1530
|
): ToolExecuteResult {
|
|
1412
1531
|
if (!listDatasets) return result;
|
|
1413
1532
|
if (listRows && Object.keys(listRows).length > 0) {
|
|
1533
|
+
result.toolResponse.raw = rawWithSerializedListRows({
|
|
1534
|
+
raw: result.toolResponse.raw,
|
|
1535
|
+
lists: result._metadata.lists,
|
|
1536
|
+
listDatasets,
|
|
1537
|
+
listRows,
|
|
1538
|
+
});
|
|
1414
1539
|
Object.defineProperty(result, SERIALIZED_TOOL_LIST_ROWS, {
|
|
1415
1540
|
value: listRows,
|
|
1416
1541
|
enumerable: false,
|
|
@@ -1422,10 +1547,9 @@ function applySerializedListDatasets(
|
|
|
1422
1547
|
if (!isSerializedPlayDataset<Record<string, unknown>>(serialized)) {
|
|
1423
1548
|
continue;
|
|
1424
1549
|
}
|
|
1425
|
-
const dataset =
|
|
1426
|
-
serialized
|
|
1427
|
-
listRows?.[name]
|
|
1428
|
-
);
|
|
1550
|
+
const dataset =
|
|
1551
|
+
readLiveToolResultListDataset(serialized) ??
|
|
1552
|
+
createDatasetFromSerializedToolList(serialized, listRows?.[name]);
|
|
1429
1553
|
const existingMetadata = result._metadata.lists[name];
|
|
1430
1554
|
result._metadata.lists[name] = {
|
|
1431
1555
|
path: serialized.sourceLabel ?? existingMetadata?.path ?? name,
|
|
@@ -1528,9 +1652,7 @@ export function deserializeToolExecuteResult(
|
|
|
1528
1652
|
jobId: value.job_id,
|
|
1529
1653
|
result: {
|
|
1530
1654
|
data: value.toolResponse.raw,
|
|
1531
|
-
...(value.toolResponse.meta
|
|
1532
|
-
? { meta: value.toolResponse.meta }
|
|
1533
|
-
: {}),
|
|
1655
|
+
...(value.toolResponse.meta ? { meta: value.toolResponse.meta } : {}),
|
|
1534
1656
|
},
|
|
1535
1657
|
metadata: value.metadata,
|
|
1536
1658
|
execution: value.execution,
|
package/dist/cli/index.js
CHANGED
|
@@ -623,10 +623,10 @@ var SDK_RELEASE = {
|
|
|
623
623
|
// 0.1.154 removes the short-lived generated enrich StepOptions recompute
|
|
624
624
|
// fields shipped in 0.1.153.
|
|
625
625
|
// 0.1.175 ships loud `deepline enrich` empty-waterfall reporting.
|
|
626
|
-
version: "0.1.
|
|
626
|
+
version: "0.1.182",
|
|
627
627
|
apiContract: "2026-06-dataset-handle-results-hard-cutover",
|
|
628
628
|
supportPolicy: {
|
|
629
|
-
latest: "0.1.
|
|
629
|
+
latest: "0.1.182",
|
|
630
630
|
minimumSupported: "0.1.53",
|
|
631
631
|
deprecatedBelow: "0.1.53",
|
|
632
632
|
commandMinimumSupported: [
|
|
@@ -2742,11 +2742,14 @@ var DeeplineClient = class {
|
|
|
2742
2742
|
const headers = {
|
|
2743
2743
|
[EXECUTE_RESPONSE_CONTRACT_HEADER]: V2_EXECUTE_RESPONSE_CONTRACT,
|
|
2744
2744
|
...options?.includeToolMetadata ? { [INCLUDE_TOOL_METADATA_HEADER]: "true" } : {},
|
|
2745
|
-
|
|
2745
|
+
[EXECUTE_RESPONSE_INTENT_HEADER]: options?.responseIntent ?? "raw"
|
|
2746
2746
|
};
|
|
2747
2747
|
return this.http.post(
|
|
2748
2748
|
`/api/v2/integrations/${encodeURIComponent(toolId)}/execute`,
|
|
2749
|
-
{
|
|
2749
|
+
{
|
|
2750
|
+
payload: input2,
|
|
2751
|
+
...options?.metadata ? { metadata: options.metadata } : {}
|
|
2752
|
+
},
|
|
2750
2753
|
headers,
|
|
2751
2754
|
{
|
|
2752
2755
|
forbiddenAsApiError: true,
|
|
@@ -7331,7 +7334,7 @@ async function fetchCsvRenderHealth(url) {
|
|
|
7331
7334
|
}
|
|
7332
7335
|
}
|
|
7333
7336
|
async function waitForRenderHealth(url, state) {
|
|
7334
|
-
const deadline = Date.now() +
|
|
7337
|
+
const deadline = Date.now() + 15e3;
|
|
7335
7338
|
while (Date.now() < deadline) {
|
|
7336
7339
|
if (isOwnedCsvRenderHealth(await fetchCsvRenderHealth(url), state)) {
|
|
7337
7340
|
return true;
|
|
@@ -9745,7 +9748,7 @@ async function traceCliSpan(phase, fields, run) {
|
|
|
9745
9748
|
}
|
|
9746
9749
|
|
|
9747
9750
|
// src/cli/play-check-hints.ts
|
|
9748
|
-
var EXTRACTED_GETTER_ERROR_HINT = "Deepline hint: extractedValues/extractedLists .get() only works for declared Deepline getters listed by `deepline tools describe <tool> --json`. Use `toolExecutionResult.toolResponse.raw` for provider/tool-specific fields.";
|
|
9751
|
+
var EXTRACTED_GETTER_ERROR_HINT = "Deepline hint: extractedValues/extractedLists .get() only works for declared Deepline getters listed by `deepline tools describe <tool> --json`. Use `toolExecutionResult.toolResponse.raw` for provider/tool-specific scalar fields, and `toolExecutionResult.extractedLists.<name>.get()` for declared row/list outputs.";
|
|
9749
9752
|
var DATASET_API_HINT = "Deepline hint: PlayDataset is lazy and durable. Use `.peek(n)` for a small preview or `.materialize()` when you intentionally need rows in memory; do not use `.rows`, `.toArray()`, or array methods directly on the dataset handle.";
|
|
9750
9753
|
var ROW_PROPERTY_HINT = "Deepline hint: this row type only contains fields produced by the CSV/schema and previous map steps. Check source column casing and the exact output field names from earlier steps before scaling.";
|
|
9751
9754
|
var TOOLS_EXECUTE_SIGNATURE_HINT = "Deepline hint: ctx.tools.execute requires a request object: `ctx.tools.execute({ id, tool, input, description })`. The stable `id` is required for logs, metadata, and receipt attachment; provider-call reuse is based on play, tool, semantic input, auth scope, provider action version, and cache policy.";
|
|
@@ -24026,7 +24029,7 @@ function toolMetadataJsonForDescribe(tool, requestedToolId) {
|
|
|
24026
24029
|
runtimeOutputHelp: {
|
|
24027
24030
|
contract: "tools describe shows declared schema and Deepline getters; it is not an observed provider response.",
|
|
24028
24031
|
getterScope: "extractedValues/extractedLists .get() only works for declared Deepline getters listed in usageGuidance.toolExecutionResult.",
|
|
24029
|
-
rawToolResponse: "Use toolExecutionResult.toolResponse.raw for provider/tool-specific fields, fields in outputSchema that are not declared getters, and debugging.",
|
|
24032
|
+
rawToolResponse: "Use toolExecutionResult.toolResponse.raw for provider/tool-specific scalar fields, fields in outputSchema that are not declared getters, and debugging. For declared row/list outputs, use extractedLists.<name>.get(); raw row arrays may be inline previews.",
|
|
24030
24033
|
invalidGetterHint: "If TypeScript says an extractedValues/extractedLists property does not exist, that field is not a declared Deepline getter.",
|
|
24031
24034
|
observeActualShape: observedOutputCommand,
|
|
24032
24035
|
observedOutput: observedOutputCommand,
|
|
@@ -24052,9 +24055,9 @@ function usageGuidanceWithAccessDefaults(usageGuidance) {
|
|
|
24052
24055
|
},
|
|
24053
24056
|
rawToolResponse: {
|
|
24054
24057
|
expression: "toolExecutionResult.toolResponse.raw",
|
|
24055
|
-
meaning: "Raw tool response for provider/tool-specific fields and debugging."
|
|
24058
|
+
meaning: "Raw tool response for provider/tool-specific scalar fields and bounded debugging. Declared row/list outputs should use extractedLists.<name>.get(); raw row arrays may be inline previews."
|
|
24056
24059
|
},
|
|
24057
|
-
invalidGetterHint: "If TypeScript says an extractedValues/extractedLists property does not exist, that field is not a declared Deepline getter; use toolResponse.raw for provider/tool-specific fields.",
|
|
24060
|
+
invalidGetterHint: "If TypeScript says an extractedValues/extractedLists property does not exist, that field is not a declared Deepline getter; use toolResponse.raw for provider/tool-specific scalar fields, and extractedLists.<name>.get() for declared row/list outputs.",
|
|
24058
24061
|
...existingAccess
|
|
24059
24062
|
}
|
|
24060
24063
|
};
|
package/dist/cli/index.mjs
CHANGED
|
@@ -608,10 +608,10 @@ var SDK_RELEASE = {
|
|
|
608
608
|
// 0.1.154 removes the short-lived generated enrich StepOptions recompute
|
|
609
609
|
// fields shipped in 0.1.153.
|
|
610
610
|
// 0.1.175 ships loud `deepline enrich` empty-waterfall reporting.
|
|
611
|
-
version: "0.1.
|
|
611
|
+
version: "0.1.182",
|
|
612
612
|
apiContract: "2026-06-dataset-handle-results-hard-cutover",
|
|
613
613
|
supportPolicy: {
|
|
614
|
-
latest: "0.1.
|
|
614
|
+
latest: "0.1.182",
|
|
615
615
|
minimumSupported: "0.1.53",
|
|
616
616
|
deprecatedBelow: "0.1.53",
|
|
617
617
|
commandMinimumSupported: [
|
|
@@ -2727,11 +2727,14 @@ var DeeplineClient = class {
|
|
|
2727
2727
|
const headers = {
|
|
2728
2728
|
[EXECUTE_RESPONSE_CONTRACT_HEADER]: V2_EXECUTE_RESPONSE_CONTRACT,
|
|
2729
2729
|
...options?.includeToolMetadata ? { [INCLUDE_TOOL_METADATA_HEADER]: "true" } : {},
|
|
2730
|
-
|
|
2730
|
+
[EXECUTE_RESPONSE_INTENT_HEADER]: options?.responseIntent ?? "raw"
|
|
2731
2731
|
};
|
|
2732
2732
|
return this.http.post(
|
|
2733
2733
|
`/api/v2/integrations/${encodeURIComponent(toolId)}/execute`,
|
|
2734
|
-
{
|
|
2734
|
+
{
|
|
2735
|
+
payload: input2,
|
|
2736
|
+
...options?.metadata ? { metadata: options.metadata } : {}
|
|
2737
|
+
},
|
|
2735
2738
|
headers,
|
|
2736
2739
|
{
|
|
2737
2740
|
forbiddenAsApiError: true,
|
|
@@ -7334,7 +7337,7 @@ async function fetchCsvRenderHealth(url) {
|
|
|
7334
7337
|
}
|
|
7335
7338
|
}
|
|
7336
7339
|
async function waitForRenderHealth(url, state) {
|
|
7337
|
-
const deadline = Date.now() +
|
|
7340
|
+
const deadline = Date.now() + 15e3;
|
|
7338
7341
|
while (Date.now() < deadline) {
|
|
7339
7342
|
if (isOwnedCsvRenderHealth(await fetchCsvRenderHealth(url), state)) {
|
|
7340
7343
|
return true;
|
|
@@ -9772,7 +9775,7 @@ async function traceCliSpan(phase, fields, run) {
|
|
|
9772
9775
|
}
|
|
9773
9776
|
|
|
9774
9777
|
// src/cli/play-check-hints.ts
|
|
9775
|
-
var EXTRACTED_GETTER_ERROR_HINT = "Deepline hint: extractedValues/extractedLists .get() only works for declared Deepline getters listed by `deepline tools describe <tool> --json`. Use `toolExecutionResult.toolResponse.raw` for provider/tool-specific fields.";
|
|
9778
|
+
var EXTRACTED_GETTER_ERROR_HINT = "Deepline hint: extractedValues/extractedLists .get() only works for declared Deepline getters listed by `deepline tools describe <tool> --json`. Use `toolExecutionResult.toolResponse.raw` for provider/tool-specific scalar fields, and `toolExecutionResult.extractedLists.<name>.get()` for declared row/list outputs.";
|
|
9776
9779
|
var DATASET_API_HINT = "Deepline hint: PlayDataset is lazy and durable. Use `.peek(n)` for a small preview or `.materialize()` when you intentionally need rows in memory; do not use `.rows`, `.toArray()`, or array methods directly on the dataset handle.";
|
|
9777
9780
|
var ROW_PROPERTY_HINT = "Deepline hint: this row type only contains fields produced by the CSV/schema and previous map steps. Check source column casing and the exact output field names from earlier steps before scaling.";
|
|
9778
9781
|
var TOOLS_EXECUTE_SIGNATURE_HINT = "Deepline hint: ctx.tools.execute requires a request object: `ctx.tools.execute({ id, tool, input, description })`. The stable `id` is required for logs, metadata, and receipt attachment; provider-call reuse is based on play, tool, semantic input, auth scope, provider action version, and cache policy.";
|
|
@@ -24072,7 +24075,7 @@ function toolMetadataJsonForDescribe(tool, requestedToolId) {
|
|
|
24072
24075
|
runtimeOutputHelp: {
|
|
24073
24076
|
contract: "tools describe shows declared schema and Deepline getters; it is not an observed provider response.",
|
|
24074
24077
|
getterScope: "extractedValues/extractedLists .get() only works for declared Deepline getters listed in usageGuidance.toolExecutionResult.",
|
|
24075
|
-
rawToolResponse: "Use toolExecutionResult.toolResponse.raw for provider/tool-specific fields, fields in outputSchema that are not declared getters, and debugging.",
|
|
24078
|
+
rawToolResponse: "Use toolExecutionResult.toolResponse.raw for provider/tool-specific scalar fields, fields in outputSchema that are not declared getters, and debugging. For declared row/list outputs, use extractedLists.<name>.get(); raw row arrays may be inline previews.",
|
|
24076
24079
|
invalidGetterHint: "If TypeScript says an extractedValues/extractedLists property does not exist, that field is not a declared Deepline getter.",
|
|
24077
24080
|
observeActualShape: observedOutputCommand,
|
|
24078
24081
|
observedOutput: observedOutputCommand,
|
|
@@ -24098,9 +24101,9 @@ function usageGuidanceWithAccessDefaults(usageGuidance) {
|
|
|
24098
24101
|
},
|
|
24099
24102
|
rawToolResponse: {
|
|
24100
24103
|
expression: "toolExecutionResult.toolResponse.raw",
|
|
24101
|
-
meaning: "Raw tool response for provider/tool-specific fields and debugging."
|
|
24104
|
+
meaning: "Raw tool response for provider/tool-specific scalar fields and bounded debugging. Declared row/list outputs should use extractedLists.<name>.get(); raw row arrays may be inline previews."
|
|
24102
24105
|
},
|
|
24103
|
-
invalidGetterHint: "If TypeScript says an extractedValues/extractedLists property does not exist, that field is not a declared Deepline getter; use toolResponse.raw for provider/tool-specific fields.",
|
|
24106
|
+
invalidGetterHint: "If TypeScript says an extractedValues/extractedLists property does not exist, that field is not a declared Deepline getter; use toolResponse.raw for provider/tool-specific scalar fields, and extractedLists.<name>.get() for declared row/list outputs.",
|
|
24104
24107
|
...existingAccess
|
|
24105
24108
|
}
|
|
24106
24109
|
};
|
package/dist/index.d.mts
CHANGED
|
@@ -1088,7 +1088,8 @@ type EnrichCompiledConfig = {
|
|
|
1088
1088
|
|
|
1089
1089
|
type ExecuteToolRawOptions = {
|
|
1090
1090
|
includeToolMetadata?: boolean;
|
|
1091
|
-
responseIntent?: 'raw' | 'row_artifact';
|
|
1091
|
+
responseIntent?: 'dataset' | 'raw' | 'row_artifact';
|
|
1092
|
+
metadata?: Record<string, unknown>;
|
|
1092
1093
|
timeout?: number;
|
|
1093
1094
|
maxRetries?: number;
|
|
1094
1095
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -1088,7 +1088,8 @@ type EnrichCompiledConfig = {
|
|
|
1088
1088
|
|
|
1089
1089
|
type ExecuteToolRawOptions = {
|
|
1090
1090
|
includeToolMetadata?: boolean;
|
|
1091
|
-
responseIntent?: 'raw' | 'row_artifact';
|
|
1091
|
+
responseIntent?: 'dataset' | 'raw' | 'row_artifact';
|
|
1092
|
+
metadata?: Record<string, unknown>;
|
|
1092
1093
|
timeout?: number;
|
|
1093
1094
|
maxRetries?: number;
|
|
1094
1095
|
};
|