deepline 0.3.328 → 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/cli/{auth-ANHHABWT.mjs → auth-MFFVOITR.mjs} +4 -4
- package/dist/cli/auth-W2MQM6GQ.js +31 -0
- package/dist/cli/{billing-R6NYYO6G.mjs → billing-LRBHWLIQ.mjs} +4 -4
- package/dist/cli/{billing-GGVKLFE6.js → billing-V4Y4OVQ7.js} +70 -70
- package/dist/cli/{chunk-7MABE3ZK.mjs → chunk-3RZJ3GEG.mjs} +135 -5
- package/dist/cli/{chunk-UDIPEHNJ.js → chunk-4FLEXYUC.js} +141 -11
- package/dist/cli/{chunk-LJWC5HSO.js → chunk-75ZOTF3K.js} +15 -15
- package/dist/cli/{chunk-6ENR652E.mjs → chunk-7T6DX5RK.mjs} +21 -14
- package/dist/cli/{chunk-Y4LXIUHX.js → chunk-AD23W4S5.js} +1 -1
- package/dist/cli/{chunk-B2R66UTW.mjs → chunk-EROOAI5G.mjs} +1 -1
- package/dist/cli/{chunk-UM4ZE3P7.mjs → chunk-ERU2OR6F.mjs} +2 -2
- package/dist/cli/{chunk-YIY74KUF.mjs → chunk-EV4QJE4J.mjs} +1 -1
- package/dist/cli/{chunk-WWVE4HFN.mjs → chunk-FK7PW6BP.mjs} +1 -1
- package/dist/cli/{chunk-2HKPAZVJ.js → chunk-FKKNYKDY.js} +14 -3
- package/dist/cli/{chunk-YFCHBN3C.mjs → chunk-GCNER3HV.mjs} +1 -1
- package/dist/cli/{chunk-ITFUZEHE.js → chunk-GY2EEO2Y.js} +9 -9
- package/dist/cli/{chunk-GZV5F6CL.mjs → chunk-HI7TAWFS.mjs} +79 -26
- package/dist/cli/{chunk-AKKQ26RX.mjs → chunk-HVPRQGF4.mjs} +1 -1
- package/dist/cli/{chunk-ZFKUVDOM.js → chunk-J2E5R2VH.js} +60 -60
- package/dist/cli/{chunk-XVKQ6D4K.js → chunk-KHZQFFOQ.js} +2 -2
- package/dist/cli/{chunk-SMGNDW7O.mjs → chunk-MFQQINUY.mjs} +2 -2
- package/dist/cli/{chunk-ZND34HL7.mjs → chunk-MO2XSC5I.mjs} +4 -4
- package/dist/cli/{chunk-KP7W5NO6.mjs → chunk-NTVTZAVZ.mjs} +13 -2
- package/dist/cli/{chunk-7DDNACAQ.js → chunk-OUTIWGKY.js} +26 -26
- package/dist/cli/{chunk-7R6KQSFA.mjs → chunk-OZGU7P2S.mjs} +1 -1
- package/dist/cli/{chunk-BC7FMQ2G.mjs → chunk-SJV5MTOJ.mjs} +1 -1
- package/dist/cli/{chunk-DNMV2L7Q.js → chunk-U2N4CYT7.js} +6 -6
- package/dist/cli/{chunk-W6WV6UME.js → chunk-U4CTHVN7.js} +255 -248
- package/dist/cli/{chunk-AGH6YP2T.js → chunk-UQV5M6HN.js} +3 -3
- package/dist/cli/{chunk-O5GPNPOC.js → chunk-VDIHLKGG.js} +4 -4
- package/dist/cli/{chunk-DNYRAZSK.js → chunk-VLDLJZ75.js} +48 -48
- package/dist/cli/{chunk-2FPVWL4W.js → chunk-XRYKLK56.js} +119 -66
- package/dist/cli/{chunk-OOLIEDIJ.mjs → chunk-YNSCELIJ.mjs} +2 -2
- package/dist/cli/{chunk-LEEXRXQQ.js → chunk-ZXGUYTIT.js} +6 -6
- package/dist/cli/client-5AIFBLKQ.js +20 -0
- package/dist/cli/{client-ZABA5NMD.mjs → client-BNLD775D.mjs} +3 -3
- package/dist/cli/{csv-VECE3PWX.mjs → csv-7MVQECWG.mjs} +3 -3
- package/dist/cli/{csv-4ZK5ZJAJ.js → csv-ZT6ZRQ3Z.js} +12 -12
- package/dist/cli/{db-6VE4OEWW.mjs → db-ABLWLMX5.mjs} +4 -4
- package/dist/cli/{db-UJPCDBV7.js → db-C4BMZXJK.js} +29 -29
- package/dist/cli/{describe-W6X5G4JR.mjs → describe-XWOWAR32.mjs} +10 -10
- package/dist/cli/{describe-CFUZZ326.js → describe-YALVN4WH.js} +17 -17
- package/dist/cli/{executions-ZZWB75DF.mjs → executions-7IZVKQ3O.mjs} +4 -4
- package/dist/cli/{executions-AI4DTQQL.js → executions-U4TNRP26.js} +6 -6
- package/dist/cli/{feedback-IM5Z6T5K.mjs → feedback-GO5XPEKY.mjs} +3 -3
- package/dist/cli/{feedback-FYSNSYUU.js → feedback-NWMRT5W4.js} +6 -6
- package/dist/cli/{git-YNYTK3YW.mjs → git-R53WS4WA.mjs} +4 -4
- package/dist/cli/git-YWRLAOBY.js +23 -0
- package/dist/cli/index.js +79 -79
- package/dist/cli/index.mjs +31 -31
- package/dist/cli/{legacy-noops-4DTMYYUY.mjs → legacy-noops-6QAZW7WJ.mjs} +4 -4
- package/dist/cli/{legacy-noops-PHJE2XFK.js → legacy-noops-NJWM53DE.js} +7 -7
- package/dist/cli/{monitors-27JP76WE.js → monitors-2I2MYAPS.js} +85 -85
- package/dist/cli/{monitors-HUP4MVWJ.mjs → monitors-2N4BRU5M.mjs} +4 -4
- package/dist/cli/{org-L3B2RR4U.mjs → org-D3RHK2Q7.mjs} +4 -4
- package/dist/cli/{org-RHVDMUKN.js → org-XVNAE2JV.js} +60 -60
- package/dist/cli/{play-UXIJVYNF.mjs → play-L7MYJZ65.mjs} +9 -9
- package/dist/cli/play-OYRHI7G3.js +153 -0
- package/dist/cli/{providers-VL6VY56M.js → providers-5BTDAZHN.js} +7 -7
- package/dist/cli/{providers-FABWTNKR.mjs → providers-YM4E7WZD.mjs} +4 -4
- package/dist/cli/{quickstart-IIPZ6DSY.js → quickstart-5A3FHAH3.js} +5 -5
- package/dist/cli/{quickstart-OA54A4IE.mjs → quickstart-ARPLJOLH.mjs} +3 -3
- package/dist/cli/{search-YDK4V2EW.mjs → search-KKJEVV27.mjs} +5 -5
- package/dist/cli/search-VE3O3ZEM.js +26 -0
- package/dist/cli/{secrets-4MQF6RF6.mjs → secrets-DGRJ4DO5.mjs} +4 -4
- package/dist/cli/{secrets-JGU7ZRUW.js → secrets-DVPVCSZD.js} +13 -13
- package/dist/cli/{sessions-PTHOMSZ5.mjs → sessions-56EHXLZD.mjs} +4 -4
- package/dist/cli/{sessions-I7ZZYSYW.js → sessions-VG4ATQ5Y.js} +5 -5
- package/dist/cli/{settings-X4ENSGNK.mjs → settings-4U5XG7QI.mjs} +7 -7
- package/dist/cli/{settings-ZUUBKIG6.js → settings-BLOTIW2G.js} +74 -74
- package/dist/cli/{setup-6L576TQE.js → setup-L7AMAXCH.js} +41 -41
- package/dist/cli/{setup-4UM6FCZL.mjs → setup-RHJAHPOR.mjs} +6 -6
- package/dist/cli/skills-QB4OQGGP.js +28 -0
- package/dist/cli/{skills-U3BS5KUI.mjs → skills-VU55YFCI.mjs} +4 -4
- package/dist/cli/tools-2CPFYNK7.js +40 -0
- package/dist/cli/{tools-O4PX6UVB.mjs → tools-JS3YIDOH.mjs} +7 -6
- package/dist/cli/{update-OHWSK2WN.mjs → update-EHI5QUXM.mjs} +6 -6
- package/dist/cli/update-WXP24GU5.js +28 -0
- package/dist/cli/{workflow-RVMGBMLX.mjs → workflow-BITLTLRF.mjs} +5 -5
- package/dist/cli/{workflow-QWTZBLT3.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-EKRB4GMP.js +0 -31
- package/dist/cli/client-55BDB4LE.js +0 -20
- package/dist/cli/git-VWXH6LCP.js +0 -23
- package/dist/cli/play-UKH4VFPF.js +0 -153
- package/dist/cli/search-JD2VTR4A.js +0 -26
- package/dist/cli/skills-TLPNCERR.js +0 -28
- package/dist/cli/tools-26JTFFU4.js +0 -39
- package/dist/cli/update-35RRCU2G.js +0 -28
|
@@ -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.
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
var _chunkWJYPBHTEjs = require('./chunk-WJYPBHTE.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkU2N4CYT7js = require('./chunk-U2N4CYT7.js');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
@@ -22,7 +22,7 @@ var _chunkDNMV2L7Qjs = require('./chunk-DNMV2L7Q.js');
|
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
|
|
25
|
-
var
|
|
25
|
+
var _chunkVDIHLKGGjs = require('./chunk-VDIHLKGG.js');
|
|
26
26
|
|
|
27
27
|
|
|
28
28
|
var _chunk7P5AA3SNjs = require('./chunk-7P5AA3SN.js');
|
|
@@ -117,7 +117,7 @@ function skillsSourceUrl(baseUrl) {
|
|
|
117
117
|
function buildSkillsAddArgs(baseUrl, skillName, options = {}) {
|
|
118
118
|
const skillNames = Array.isArray(skillName) ? skillName : [skillName];
|
|
119
119
|
const [firstSkillName, ...extraSkillNames] = skillNames;
|
|
120
|
-
const agents = _nullishCoalesce(options.agents, () => (
|
|
120
|
+
const agents = _nullishCoalesce(options.agents, () => ( _chunkVDIHLKGGjs.DEFAULT_SKILL_AGENTS));
|
|
121
121
|
const values = {
|
|
122
122
|
skills_index_url: skillsIndexUrl(baseUrl),
|
|
123
123
|
skills_source_url: skillsSourceUrl(baseUrl),
|
|
@@ -193,7 +193,7 @@ function shouldSkipCompatibilityCheck() {
|
|
|
193
193
|
return value === "1" || value === "true" || value === "yes";
|
|
194
194
|
}
|
|
195
195
|
function sdkCompatibilityCachePath(baseUrl, homeDir = _os.homedir.call(void 0, )) {
|
|
196
|
-
return _path.join.call(void 0,
|
|
196
|
+
return _path.join.call(void 0, _chunkVDIHLKGGjs.sdkCliStateDirPath.call(void 0, baseUrl, homeDir), "compat-cache.json");
|
|
197
197
|
}
|
|
198
198
|
function legacySdkCompatibilityCachePath(homeDir = _os.homedir.call(void 0, )) {
|
|
199
199
|
return _path.join.call(void 0, homeDir, ".cache", "deepline", "sdk-compat-cache.json");
|
|
@@ -201,9 +201,9 @@ function legacySdkCompatibilityCachePath(homeDir = _os.homedir.call(void 0, )) {
|
|
|
201
201
|
function compatibilityCacheKey(baseUrl, command, skillsVersion) {
|
|
202
202
|
return JSON.stringify({
|
|
203
203
|
baseUrl: baseUrl.replace(/\/$/, ""),
|
|
204
|
-
version:
|
|
205
|
-
apiContract:
|
|
206
|
-
apiMajor:
|
|
204
|
+
version: _chunkVDIHLKGGjs.SDK_VERSION,
|
|
205
|
+
apiContract: _chunkVDIHLKGGjs.SDK_API_CONTRACT,
|
|
206
|
+
apiMajor: _chunkVDIHLKGGjs.SDK_API_MAJOR,
|
|
207
207
|
command: _optionalChain([command, 'optionalAccess', _7 => _7.trim, 'call', _8 => _8()]) || null,
|
|
208
208
|
skillsVersion: _nullishCoalesce(skillsVersion, () => ( null))
|
|
209
209
|
});
|
|
@@ -211,8 +211,8 @@ function compatibilityCacheKey(baseUrl, command, skillsVersion) {
|
|
|
211
211
|
function legacyCompatibilityCacheKey(baseUrl, command) {
|
|
212
212
|
return JSON.stringify({
|
|
213
213
|
baseUrl: baseUrl.replace(/\/$/, ""),
|
|
214
|
-
version:
|
|
215
|
-
apiContract:
|
|
214
|
+
version: _chunkVDIHLKGGjs.SDK_VERSION,
|
|
215
|
+
apiContract: _chunkVDIHLKGGjs.SDK_API_CONTRACT,
|
|
216
216
|
command: _optionalChain([command, 'optionalAccess', _9 => _9.trim, 'call', _10 => _10()]) || null
|
|
217
217
|
});
|
|
218
218
|
}
|
|
@@ -305,7 +305,7 @@ async function checkSdkCompatibility(baseUrl, options = {}) {
|
|
|
305
305
|
);
|
|
306
306
|
try {
|
|
307
307
|
const url = new URL("/api/v2/sdk/compat", baseUrl);
|
|
308
|
-
url.searchParams.set("version",
|
|
308
|
+
url.searchParams.set("version", _chunkVDIHLKGGjs.SDK_VERSION);
|
|
309
309
|
if (_optionalChain([options, 'access', _19 => _19.command, 'optionalAccess', _20 => _20.trim, 'call', _21 => _21()])) {
|
|
310
310
|
url.searchParams.set("command", options.command.trim());
|
|
311
311
|
}
|
|
@@ -318,13 +318,13 @@ async function checkSdkCompatibility(baseUrl, options = {}) {
|
|
|
318
318
|
const response = await fetch(url, {
|
|
319
319
|
method: "GET",
|
|
320
320
|
headers: {
|
|
321
|
-
...
|
|
322
|
-
"User-Agent": `deepline-ts-sdk/${
|
|
323
|
-
"X-Deepline-SDK-Version":
|
|
324
|
-
"X-Deepline-API-Major": String(
|
|
325
|
-
"X-Deepline-API-Contract":
|
|
321
|
+
..._chunkVDIHLKGGjs.deploymentProtectionHeaders.call(void 0, ),
|
|
322
|
+
"User-Agent": `deepline-ts-sdk/${_chunkVDIHLKGGjs.SDK_VERSION}`,
|
|
323
|
+
"X-Deepline-SDK-Version": _chunkVDIHLKGGjs.SDK_VERSION,
|
|
324
|
+
"X-Deepline-API-Major": String(_chunkVDIHLKGGjs.SDK_API_MAJOR),
|
|
325
|
+
"X-Deepline-API-Contract": _chunkVDIHLKGGjs.SDK_API_CONTRACT,
|
|
326
326
|
"X-Deepline-CLI-Update-Preferences": "1",
|
|
327
|
-
...options.catalog ? { Authorization: `Bearer ${
|
|
327
|
+
...options.catalog ? { Authorization: `Bearer ${_chunkVDIHLKGGjs.resolveApiKeyForBaseUrl.call(void 0, baseUrl)}` } : {}
|
|
328
328
|
},
|
|
329
329
|
signal: controller.signal
|
|
330
330
|
});
|
|
@@ -577,7 +577,7 @@ function buildEnvironmentContext() {
|
|
|
577
577
|
node_version: process.version,
|
|
578
578
|
runtime: "Node.js",
|
|
579
579
|
hostname: _os.hostname.call(void 0, ),
|
|
580
|
-
agent_runtime:
|
|
580
|
+
agent_runtime: _chunkVDIHLKGGjs.detectAgentRuntime.call(void 0, )
|
|
581
581
|
};
|
|
582
582
|
for (const key of ["CLAUDE_CODE_REMOTE", "DEEPLINE_PLUGIN_MODE"]) {
|
|
583
583
|
const normalized = _optionalChain([process, 'access', _32 => _32.env, 'access', _33 => _33[key], 'optionalAccess', _34 => _34.trim, 'call', _35 => _35()]);
|
|
@@ -601,12 +601,12 @@ function failureReportHeaders(apiKey) {
|
|
|
601
601
|
return {
|
|
602
602
|
Authorization: `Bearer ${apiKey}`,
|
|
603
603
|
"Content-Type": "application/json",
|
|
604
|
-
"User-Agent": `deepline-ts-sdk/${
|
|
604
|
+
"User-Agent": `deepline-ts-sdk/${_chunkVDIHLKGGjs.SDK_VERSION}`,
|
|
605
605
|
"X-Deepline-Client-Family": "sdk",
|
|
606
606
|
"X-Deepline-CLI-Family": "sdk",
|
|
607
|
-
"X-Deepline-Agent-Runtime":
|
|
608
|
-
"X-Deepline-CLI-Version":
|
|
609
|
-
"X-Deepline-SDK-Version":
|
|
607
|
+
"X-Deepline-Agent-Runtime": _chunkVDIHLKGGjs.detectAgentRuntime.call(void 0, ),
|
|
608
|
+
"X-Deepline-CLI-Version": _chunkVDIHLKGGjs.SDK_VERSION,
|
|
609
|
+
"X-Deepline-SDK-Version": _chunkVDIHLKGGjs.SDK_VERSION
|
|
610
610
|
};
|
|
611
611
|
}
|
|
612
612
|
async function postFailureReport(input) {
|
|
@@ -634,7 +634,7 @@ async function maybeReportAutomaticSkillsSyncFailure(input) {
|
|
|
634
634
|
if (isFailureReportingDisabled()) return false;
|
|
635
635
|
let apiKey = "";
|
|
636
636
|
try {
|
|
637
|
-
apiKey =
|
|
637
|
+
apiKey = _chunkVDIHLKGGjs.resolveApiKeyForBaseUrl.call(void 0, input.baseUrl);
|
|
638
638
|
} catch (e7) {
|
|
639
639
|
return false;
|
|
640
640
|
}
|
|
@@ -661,7 +661,7 @@ async function maybeReportAutomaticSkillsSyncFailure(input) {
|
|
|
661
661
|
failure_code: failureCode2,
|
|
662
662
|
failure_stage: failureStage,
|
|
663
663
|
error_body: "Automatic Deepline skills installation failed.",
|
|
664
|
-
cli_version:
|
|
664
|
+
cli_version: _chunkVDIHLKGGjs.SDK_VERSION,
|
|
665
665
|
context: {
|
|
666
666
|
environment: buildEnvironmentContext(),
|
|
667
667
|
skills_sync: {
|
|
@@ -781,7 +781,7 @@ function buildFailureReport(input) {
|
|
|
781
781
|
failure_kind: failureKind,
|
|
782
782
|
failure_code: code,
|
|
783
783
|
failure_stage: input.error === void 0 ? "command_exit" : "cli_main",
|
|
784
|
-
cli_version:
|
|
784
|
+
cli_version: _chunkVDIHLKGGjs.SDK_VERSION,
|
|
785
785
|
context: {
|
|
786
786
|
base_url: redactFailureText(input.baseUrl, 400),
|
|
787
787
|
command_summary: sanitizeCommand(input.argv),
|
|
@@ -801,8 +801,8 @@ async function maybeReportSdkCliFailure(input) {
|
|
|
801
801
|
if (isServerLoggedPlayRunStartFailure(input)) return false;
|
|
802
802
|
const exitCode = resolvedExitCode(input);
|
|
803
803
|
if (!shouldReport({ exitCode, error: input.error })) return false;
|
|
804
|
-
const baseUrl =
|
|
805
|
-
const apiKey =
|
|
804
|
+
const baseUrl = _chunkVDIHLKGGjs.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, "");
|
|
805
|
+
const apiKey = _chunkVDIHLKGGjs.resolveApiKeyForBaseUrl.call(void 0, baseUrl);
|
|
806
806
|
if (!apiKey) return false;
|
|
807
807
|
return postFailureReport({
|
|
808
808
|
baseUrl,
|
|
@@ -823,25 +823,25 @@ var CHECK_TIMEOUT_MS2 = 3e3;
|
|
|
823
823
|
var INSTALLER_PROBE_TIMEOUT_MS = 1e3;
|
|
824
824
|
var PUBLISHED_VERIFICATION_RETRY_MS = 5 * 6e4;
|
|
825
825
|
function shouldSkipSkillsSync() {
|
|
826
|
-
if (
|
|
826
|
+
if (_chunkVDIHLKGGjs.detectAgentRuntime.call(void 0, ) === "claude_cowork" || isCiEnvironment()) {
|
|
827
827
|
return true;
|
|
828
828
|
}
|
|
829
829
|
const value = _optionalChain([process, 'access', _56 => _56.env, 'access', _57 => _57.DEEPLINE_SKIP_SKILLS_SYNC, 'optionalAccess', _58 => _58.trim, 'call', _59 => _59(), 'access', _60 => _60.toLowerCase, 'call', _61 => _61()]);
|
|
830
830
|
return value === "1" || value === "true" || value === "yes" || value === "on";
|
|
831
831
|
}
|
|
832
832
|
function unavailableSkillsNoticePath(baseUrl) {
|
|
833
|
-
return _path.join.call(void 0,
|
|
833
|
+
return _path.join.call(void 0, _chunkVDIHLKGGjs.sdkCliStateDirPath.call(void 0, baseUrl), "skills-sync-unavailable-version");
|
|
834
834
|
}
|
|
835
835
|
var SKILLS_SYNC_IN_PROGRESS_TTL_MS = 10 * 60 * 1e3;
|
|
836
836
|
var SKILLS_SYNC_IN_PROGRESS_PID_CAP_MS = 6 * 60 * 60 * 1e3;
|
|
837
|
-
var agentLeaseSegment =
|
|
837
|
+
var agentLeaseSegment = _chunkVDIHLKGGjs.skillsAgentPathSegment;
|
|
838
838
|
function sortedLeaseAgents(agents) {
|
|
839
|
-
const expanded = agents.includes("*") ? [...agents, ...
|
|
839
|
+
const expanded = agents.includes("*") ? [...agents, ..._chunkVDIHLKGGjs.KNOWN_SKILL_AGENTS] : agents;
|
|
840
840
|
return [...new Set(expanded)].sort((a, b) => a.localeCompare(b));
|
|
841
841
|
}
|
|
842
842
|
function inProgressSkillsSyncPath(baseUrl, agent) {
|
|
843
843
|
return _path.join.call(void 0,
|
|
844
|
-
|
|
844
|
+
_chunkVDIHLKGGjs.sdkCliStateDirPath.call(void 0, baseUrl),
|
|
845
845
|
`skills-sync-in-progress-${agentLeaseSegment(agent)}`
|
|
846
846
|
);
|
|
847
847
|
}
|
|
@@ -1000,7 +1000,7 @@ var SkillsStateUnavailableError = class extends Error {
|
|
|
1000
1000
|
constructor(baseUrl, error) {
|
|
1001
1001
|
const detail = error instanceof Error ? error.message : String(error);
|
|
1002
1002
|
super(
|
|
1003
|
-
`Could not save skills state in ${
|
|
1003
|
+
`Could not save skills state in ${_chunkVDIHLKGGjs.sdkCliStateDirPath.call(void 0, baseUrl)}: ${detail}`
|
|
1004
1004
|
);
|
|
1005
1005
|
this.name = "SkillsStateUnavailableError";
|
|
1006
1006
|
}
|
|
@@ -1085,7 +1085,7 @@ function skillsInstallLeasePath(baseUrl, agents) {
|
|
|
1085
1085
|
}
|
|
1086
1086
|
function deferredSkillsNoticePath(baseUrl, agents) {
|
|
1087
1087
|
return _path.join.call(void 0,
|
|
1088
|
-
|
|
1088
|
+
_chunkVDIHLKGGjs.sdkCliStateDirPath.call(void 0, baseUrl),
|
|
1089
1089
|
`skills-sync-notice-${sortedLeaseAgents(agents).map(agentLeaseSegment).join("-")}`
|
|
1090
1090
|
);
|
|
1091
1091
|
}
|
|
@@ -1119,8 +1119,8 @@ function flushDeferredSkillsNotices(baseUrl, agents) {
|
|
|
1119
1119
|
if (text.trim()) writeSdkSkillsStatusLine(text.trimEnd());
|
|
1120
1120
|
}
|
|
1121
1121
|
function flushDeferredSkillsSyncNotices(baseUrl) {
|
|
1122
|
-
if (shouldSkipSkillsSync() ||
|
|
1123
|
-
const agents =
|
|
1122
|
+
if (shouldSkipSkillsSync() || _chunkVDIHLKGGjs.hasActivePluginSkills.call(void 0, )) return;
|
|
1123
|
+
const agents = _chunkVDIHLKGGjs.resolveAutoSyncSkillAgents.call(void 0, );
|
|
1124
1124
|
if (agents.length === 0) return;
|
|
1125
1125
|
flushDeferredSkillsNotices(baseUrl, agents);
|
|
1126
1126
|
}
|
|
@@ -1136,7 +1136,7 @@ function spawnDetachedSkillsSyncChild(argv, onSpawnError) {
|
|
|
1136
1136
|
}
|
|
1137
1137
|
function failedSkillsSyncPath(baseUrl, agents) {
|
|
1138
1138
|
return _path.join.call(void 0,
|
|
1139
|
-
|
|
1139
|
+
_chunkVDIHLKGGjs.sdkCliStateDirPath.call(void 0, baseUrl),
|
|
1140
1140
|
`skills-sync-failed-${sortedLeaseAgents(agents).map(agentLeaseSegment).join("-")}-version`
|
|
1141
1141
|
);
|
|
1142
1142
|
}
|
|
@@ -1165,7 +1165,7 @@ function writeUnavailableSkillsNotice(baseUrl, remoteVersion, skillNames, reason
|
|
|
1165
1165
|
if (hasMarkedSkillsSyncVersion(path, remoteVersion)) return;
|
|
1166
1166
|
writeMarkedSkillsSyncVersion(path, remoteVersion);
|
|
1167
1167
|
const probes = reason === "no-installer" ? _nullishCoalesce(knownProbes, () => ( probeInstallers())) : null;
|
|
1168
|
-
const manualCommand = _optionalChain([probes, 'optionalAccess', _65 => _65.npx]) === "missing" && probes.bunx !== "missing" ? `bunx ${buildBunxSkillsInstallArgs(baseUrl, skillNames,
|
|
1168
|
+
const manualCommand = _optionalChain([probes, 'optionalAccess', _65 => _65.npx]) === "missing" && probes.bunx !== "missing" ? `bunx ${buildBunxSkillsInstallArgs(baseUrl, skillNames, _chunkVDIHLKGGjs.DEFAULT_SKILL_AGENTS).map(shellQuote).join(" ")}` : `npx ${buildSkillsInstallArgs(baseUrl, skillNames).join(" ")}`;
|
|
1169
1169
|
const explanation = reason === "unsupported-agent" ? "the detected agent has no automatic skills sync target. Automatic sync was skipped." : _optionalChain([probes, 'optionalAccess', _66 => _66.bunx]) === "missing" && probes.npx === "missing" ? "neither `bunx` nor `npx` was found on PATH. Make one available." : `installer version check failed for ${Object.entries(_nullishCoalesce(probes, () => ( {}))).filter(([, result]) => result === "failed").map(([command]) => `\`${command}\``).join(" and ")}. Check those commands with --version.`;
|
|
1170
1170
|
notice(
|
|
1171
1171
|
`Deepline agent skills are out of date, but ${explanation} To install manually, run:
|
|
@@ -1253,7 +1253,7 @@ function buildSdkSkillNames(v1SkillNames2) {
|
|
|
1253
1253
|
return sortedUniqueSkillNames(v1SkillNames2);
|
|
1254
1254
|
}
|
|
1255
1255
|
function isDefaultAgentSet(agents) {
|
|
1256
|
-
return agents.length ===
|
|
1256
|
+
return agents.length === _chunkVDIHLKGGjs.DEFAULT_SKILL_AGENTS.length && agents.every((agent, index) => agent === _chunkVDIHLKGGjs.DEFAULT_SKILL_AGENTS[index]);
|
|
1257
1257
|
}
|
|
1258
1258
|
function safeSkillFilePath(value) {
|
|
1259
1259
|
if (typeof value !== "string" || !value) return false;
|
|
@@ -1450,7 +1450,7 @@ function probeInstallers(timeoutMs) {
|
|
|
1450
1450
|
}
|
|
1451
1451
|
function noInstallerProbePath(baseUrl) {
|
|
1452
1452
|
return _path.join.call(void 0,
|
|
1453
|
-
|
|
1453
|
+
_chunkVDIHLKGGjs.sdkCliStateDirPath.call(void 0, baseUrl),
|
|
1454
1454
|
"skills-sync-no-installer-unknown.json"
|
|
1455
1455
|
);
|
|
1456
1456
|
}
|
|
@@ -1529,7 +1529,7 @@ function temporarySkillsSyncSkipCommand() {
|
|
|
1529
1529
|
function resolveSkillsInstallSpawn(install, platform2 = process.platform) {
|
|
1530
1530
|
return resolveShellSpawn(install.command, install.args, platform2);
|
|
1531
1531
|
}
|
|
1532
|
-
function resolveSkillsInstallCommands(baseUrl, skillNames = DEFAULT_SDK_SKILL_NAMES, agents =
|
|
1532
|
+
function resolveSkillsInstallCommands(baseUrl, skillNames = DEFAULT_SDK_SKILL_NAMES, agents = _chunkVDIHLKGGjs.DEFAULT_SKILL_AGENTS, knownProbes) {
|
|
1533
1533
|
const commands = [];
|
|
1534
1534
|
const probes = _nullishCoalesce(knownProbes, () => ( probeInstallers()));
|
|
1535
1535
|
if (probes.bunx === "available") {
|
|
@@ -1681,11 +1681,11 @@ function writeSdkSkillsStatusLine(line) {
|
|
|
1681
1681
|
}
|
|
1682
1682
|
async function syncSdkSkillsIfNeeded(baseUrl, options = {}) {
|
|
1683
1683
|
if (shouldSkipSkillsSync()) return;
|
|
1684
|
-
const usingPluginSkills =
|
|
1684
|
+
const usingPluginSkills = _chunkVDIHLKGGjs.hasActivePluginSkills.call(void 0, );
|
|
1685
1685
|
if (usingPluginSkills) {
|
|
1686
1686
|
return;
|
|
1687
1687
|
}
|
|
1688
|
-
const agents =
|
|
1688
|
+
const agents = _chunkVDIHLKGGjs.resolveAutoSyncSkillAgents.call(void 0, );
|
|
1689
1689
|
if (options.mode === "detached" && agents.length > 0) {
|
|
1690
1690
|
flushDeferredSkillsNotices(baseUrl, agents);
|
|
1691
1691
|
}
|
|
@@ -1713,7 +1713,7 @@ async function syncSdkSkillsIfNeeded(baseUrl, options = {}) {
|
|
|
1713
1713
|
return;
|
|
1714
1714
|
}
|
|
1715
1715
|
try {
|
|
1716
|
-
const localVersion =
|
|
1716
|
+
const localVersion = _chunkVDIHLKGGjs.readSdkSkillsLocalVersion.call(void 0, baseUrl);
|
|
1717
1717
|
const update = options.update === void 0 ? claimedVersion ? { needsUpdate: true, remoteVersion: claimedVersion } : await fetchSkillsUpdate(baseUrl, localVersion) : options.update ? {
|
|
1718
1718
|
needsUpdate: options.update.needs_update,
|
|
1719
1719
|
remoteVersion: options.update.remote.version
|
|
@@ -1879,7 +1879,7 @@ async function runInlineSkillsSync(baseUrl, remoteVersion, agents, notices) {
|
|
|
1879
1879
|
}
|
|
1880
1880
|
}
|
|
1881
1881
|
runLegacySkillsCleanup(agents);
|
|
1882
|
-
if (!
|
|
1882
|
+
if (!_chunkVDIHLKGGjs.writeSdkSkillsLocalVersion.call(void 0, baseUrl, update.remoteVersion, agents)) {
|
|
1883
1883
|
notice(
|
|
1884
1884
|
"Deepline agent skills installed, but the local skills version could not be recorded. A later command will retry the refresh."
|
|
1885
1885
|
);
|
|
@@ -1938,7 +1938,7 @@ function inferActiveSkillsScope(entrypoint = _nullishCoalesce(process.argv[1], (
|
|
|
1938
1938
|
return /[\\/]\.deepline[\\/]runtime[\\/]/.test(entrypoint) ? "local" : "global";
|
|
1939
1939
|
}
|
|
1940
1940
|
function resolveLocalRoot() {
|
|
1941
|
-
const target =
|
|
1941
|
+
const target = _chunkVDIHLKGGjs.resolveProjectPinTarget.call(void 0, );
|
|
1942
1942
|
if (!target.ok) {
|
|
1943
1943
|
throw new Error(
|
|
1944
1944
|
`Cowork project folder is ambiguous. Candidate folders: ${target.candidates.join(
|
|
@@ -1949,7 +1949,7 @@ function resolveLocalRoot() {
|
|
|
1949
1949
|
return target.dir;
|
|
1950
1950
|
}
|
|
1951
1951
|
function detectSkillsAgents(input) {
|
|
1952
|
-
const runtime = _nullishCoalesce(input.runtime, () => (
|
|
1952
|
+
const runtime = _nullishCoalesce(input.runtime, () => ( _chunkVDIHLKGGjs.detectAgentRuntime.call(void 0, )));
|
|
1953
1953
|
const knownAgent = RUNTIME_TO_SKILLS_AGENT[runtime];
|
|
1954
1954
|
if (knownAgent) return [knownAgent];
|
|
1955
1955
|
const roots = [
|
|
@@ -1964,7 +1964,7 @@ function detectSkillsAgents(input) {
|
|
|
1964
1964
|
return detected.length > 0 ? detected : ["*"];
|
|
1965
1965
|
}
|
|
1966
1966
|
function skillsStatePathForScope(baseUrl, scope, root) {
|
|
1967
|
-
return scope === "local" && root ? _path.join.call(void 0, root, ".deepline", "setup", "skills.json") : _path.join.call(void 0,
|
|
1967
|
+
return scope === "local" && root ? _path.join.call(void 0, root, ".deepline", "setup", "skills.json") : _path.join.call(void 0, _chunkVDIHLKGGjs.sdkCliStateDirPath.call(void 0, baseUrl), "skills-install.json");
|
|
1968
1968
|
}
|
|
1969
1969
|
function buildSkillsPlan(input) {
|
|
1970
1970
|
const scopeArgs = input.scope === "global" ? ["--global"] : [];
|
|
@@ -2086,7 +2086,7 @@ async function runSkillsCommand(options, dependencies = {}) {
|
|
|
2086
2086
|
scope = normalizeScope(options.scope);
|
|
2087
2087
|
root = scope === "local" ? resolveLocalRoot() : null;
|
|
2088
2088
|
} catch (error) {
|
|
2089
|
-
|
|
2089
|
+
_chunkU2N4CYT7js.printCommandEnvelope.call(void 0,
|
|
2090
2090
|
{
|
|
2091
2091
|
ok: false,
|
|
2092
2092
|
status: "failed",
|
|
@@ -2098,22 +2098,22 @@ async function runSkillsCommand(options, dependencies = {}) {
|
|
|
2098
2098
|
);
|
|
2099
2099
|
return 2;
|
|
2100
2100
|
}
|
|
2101
|
-
const baseUrl =
|
|
2101
|
+
const baseUrl = _chunkVDIHLKGGjs.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, "");
|
|
2102
2102
|
const catalog = {
|
|
2103
2103
|
skillNames: [...DEFAULT_SDK_SKILL_NAMES],
|
|
2104
|
-
version:
|
|
2104
|
+
version: _chunkVDIHLKGGjs.SDK_VERSION
|
|
2105
2105
|
};
|
|
2106
2106
|
const agents = options.agent ? [options.agent] : detectSkillsAgents({ scope, root });
|
|
2107
2107
|
const plan = buildSkillsPlan({ baseUrl, scope, root, agents, ...catalog });
|
|
2108
2108
|
if (options.dryRun) {
|
|
2109
|
-
|
|
2109
|
+
_chunkU2N4CYT7js.printCommandEnvelope.call(void 0,
|
|
2110
2110
|
{ ok: true, status: "planned", dryRun: true, ...plan },
|
|
2111
2111
|
{ json: options.json }
|
|
2112
2112
|
);
|
|
2113
2113
|
return 0;
|
|
2114
2114
|
}
|
|
2115
2115
|
if (isSkillsPlanCurrent(plan, readSkillsInstallState(plan.statePath)) && !hasFailedAutomaticSkillsSync(baseUrl, agents)) {
|
|
2116
|
-
|
|
2116
|
+
_chunkU2N4CYT7js.printCommandEnvelope.call(void 0,
|
|
2117
2117
|
{
|
|
2118
2118
|
ok: true,
|
|
2119
2119
|
status: "current",
|
|
@@ -2148,7 +2148,7 @@ async function runSkillsCommand(options, dependencies = {}) {
|
|
|
2148
2148
|
.../* @__PURE__ */ new Set([...plan.skillNames, ...LEGACY_SKILL_NAMES_TO_REMOVE])
|
|
2149
2149
|
];
|
|
2150
2150
|
const agentRoots = workspaceSkillRootsForAgents(plan.agents);
|
|
2151
|
-
|
|
2151
|
+
_chunkVDIHLKGGjs.ensureProjectPrivatePathsIgnored.call(void 0, root, [
|
|
2152
2152
|
".deepline/",
|
|
2153
2153
|
...agentRoots.flatMap(
|
|
2154
2154
|
(agentRoot) => managedNames.map((name) => `${agentRoot}/skills/${name}/`)
|
|
@@ -2166,7 +2166,7 @@ async function runSkillsCommand(options, dependencies = {}) {
|
|
|
2166
2166
|
} };
|
|
2167
2167
|
} catch (error) {
|
|
2168
2168
|
if (!(error instanceof SkillsStateUnavailableError)) throw error;
|
|
2169
|
-
|
|
2169
|
+
_chunkU2N4CYT7js.printCommandEnvelope.call(void 0,
|
|
2170
2170
|
{
|
|
2171
2171
|
ok: false,
|
|
2172
2172
|
status: "failed",
|
|
@@ -2182,7 +2182,7 @@ async function runSkillsCommand(options, dependencies = {}) {
|
|
|
2182
2182
|
return 5;
|
|
2183
2183
|
}
|
|
2184
2184
|
if (!lease) {
|
|
2185
|
-
|
|
2185
|
+
_chunkU2N4CYT7js.printCommandEnvelope.call(void 0,
|
|
2186
2186
|
{
|
|
2187
2187
|
ok: false,
|
|
2188
2188
|
status: "failed",
|
|
@@ -2228,7 +2228,7 @@ async function runSkillsInstallWithLease(input) {
|
|
|
2228
2228
|
throw new Error("Could not install the current Deepline skills.");
|
|
2229
2229
|
}
|
|
2230
2230
|
} catch (error) {
|
|
2231
|
-
|
|
2231
|
+
_chunkU2N4CYT7js.printCommandEnvelope.call(void 0,
|
|
2232
2232
|
{
|
|
2233
2233
|
ok: false,
|
|
2234
2234
|
status: "failed",
|
|
@@ -2267,7 +2267,7 @@ async function runSkillsInstallWithLease(input) {
|
|
|
2267
2267
|
{
|
|
2268
2268
|
schemaVersion: 1,
|
|
2269
2269
|
installedAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
2270
|
-
cliVersion:
|
|
2270
|
+
cliVersion: _chunkVDIHLKGGjs.SDK_VERSION,
|
|
2271
2271
|
scope,
|
|
2272
2272
|
agents,
|
|
2273
2273
|
skillsVersion: plan.version,
|
|
@@ -2282,7 +2282,7 @@ async function runSkillsInstallWithLease(input) {
|
|
|
2282
2282
|
if (scope === "global") {
|
|
2283
2283
|
clearFailedAutomaticSkillsSync(baseUrl, agents);
|
|
2284
2284
|
}
|
|
2285
|
-
|
|
2285
|
+
_chunkU2N4CYT7js.printCommandEnvelope.call(void 0,
|
|
2286
2286
|
{
|
|
2287
2287
|
ok: true,
|
|
2288
2288
|
status: "complete",
|
|
@@ -2331,7 +2331,7 @@ Examples:
|
|
|
2331
2331
|
).action(async (options) => {
|
|
2332
2332
|
const claim = _optionalChain([options, 'access', _88 => _88.claim, 'optionalAccess', _89 => _89.trim, 'call', _90 => _90()]);
|
|
2333
2333
|
if (!claim) {
|
|
2334
|
-
|
|
2334
|
+
_chunkU2N4CYT7js.printCommandEnvelope.call(void 0,
|
|
2335
2335
|
{
|
|
2336
2336
|
ok: false,
|
|
2337
2337
|
status: "failed",
|
|
@@ -2344,7 +2344,7 @@ Examples:
|
|
|
2344
2344
|
process.exitCode = 2;
|
|
2345
2345
|
return;
|
|
2346
2346
|
}
|
|
2347
|
-
await syncSdkSkillsIfNeeded(
|
|
2347
|
+
await syncSdkSkillsIfNeeded(_chunkVDIHLKGGjs.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, ""), {
|
|
2348
2348
|
mode: "inline",
|
|
2349
2349
|
notices: "defer",
|
|
2350
2350
|
claim
|