deepline 0.3.493 → 0.3.494
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/release.ts +2 -2
- package/dist/bundling-sources/sdk/src/types.ts +5 -4
- package/dist/bundling-sources/shared_libs/play-runtime/tool-result.ts +15 -0
- package/dist/bundling-sources/shared_libs/plays/field-catalog.ts +101 -3
- package/dist/cli/{auth-3NAY3AST.mjs → auth-6X5YXMFN.mjs} +5 -5
- package/dist/cli/auth-RWLCLMDY.js +43 -0
- package/dist/cli/{billing-FSB4BBBO.js → billing-5F5PZB77.js} +79 -79
- package/dist/cli/{billing-SBWQCC7B.mjs → billing-IN74SDSC.mjs} +6 -6
- package/dist/cli/{chunk-3RGWTKK3.mjs → chunk-2GEYN3H4.mjs} +89 -3
- package/dist/cli/{chunk-MLEUOTEQ.js → chunk-3KVFOKPR.js} +53 -53
- package/dist/cli/{chunk-IOBPR2VO.js → chunk-4A5WXQJK.js} +16 -16
- package/dist/cli/{chunk-NALJJTPS.mjs → chunk-4RWH4LRQ.mjs} +5 -5
- package/dist/cli/{chunk-UCMY2SO2.js → chunk-4ZKZS43N.js} +3 -3
- package/dist/cli/{chunk-IJOHWGPF.js → chunk-5WYH2LAP.js} +6 -6
- package/dist/cli/{chunk-2BRTYIAH.mjs → chunk-65NMOP4T.mjs} +3 -3
- package/dist/cli/{chunk-VFHIYWMC.mjs → chunk-6DMLWM7L.mjs} +2 -2
- package/dist/cli/{chunk-3QGUWB6E.mjs → chunk-6XZR2642.mjs} +8 -7
- package/dist/cli/{chunk-XQX476QK.js → chunk-7B7A36XZ.js} +9 -9
- package/dist/cli/{chunk-DWJ4RXSA.js → chunk-AARXOBVD.js} +1 -0
- package/dist/cli/{chunk-ZVW7EWTC.mjs → chunk-BLHQRETG.mjs} +184 -184
- package/dist/cli/{chunk-NPZBE64X.js → chunk-BLMB4N63.js} +89 -3
- package/dist/cli/{chunk-LGTZYI5B.js → chunk-BNI653WN.js} +21 -21
- package/dist/cli/{chunk-2H4OFVR5.js → chunk-BU5Y7HOD.js} +5 -5
- package/dist/cli/{chunk-KGDDQMI7.mjs → chunk-C5R3UH5V.mjs} +28 -1
- package/dist/cli/{chunk-NPNAEPY4.js → chunk-CAWOSHEC.js} +26 -26
- package/dist/cli/{chunk-HTUSTPP4.js → chunk-CK5MA6S6.js} +7 -7
- package/dist/cli/{chunk-EBAS3UT2.mjs → chunk-DKKAJ3U2.mjs} +5 -5
- package/dist/cli/{chunk-4IJFQV3O.mjs → chunk-EG3OSUBO.mjs} +1 -1
- package/dist/cli/{chunk-TNQOR6XQ.mjs → chunk-FAT6CUZK.mjs} +1 -1
- package/dist/cli/{chunk-TIFRRLZT.js → chunk-GBICEYUA.js} +6 -6
- package/dist/cli/{chunk-XLE7KXE7.js → chunk-GDNQXLBM.js} +2 -2
- package/dist/cli/{chunk-AWMCZAUR.js → chunk-GLDBMKTV.js} +3 -3
- package/dist/cli/{chunk-GSC35TPZ.mjs → chunk-GNSGDIA4.mjs} +2 -2
- package/dist/cli/{chunk-7HABWOMB.js → chunk-GSCCDGGT.js} +259 -259
- package/dist/cli/{chunk-IRDYBMA7.mjs → chunk-H46X7YDU.mjs} +1 -0
- package/dist/cli/{chunk-NWIDPT7H.js → chunk-HINVMRGQ.js} +4 -4
- package/dist/cli/{chunk-C2MRDPA5.js → chunk-I42EOZKQ.js} +32 -5
- package/dist/cli/{chunk-HLM2UFQ5.mjs → chunk-IPWYDANJ.mjs} +1 -1
- package/dist/cli/{chunk-5DIZ2G74.mjs → chunk-IZJSX3SZ.mjs} +2 -2
- package/dist/cli/{chunk-WTFI7BVH.mjs → chunk-J2HOVZOE.mjs} +1 -1
- package/dist/cli/{chunk-IOMEJKGK.js → chunk-J3UHNUWI.js} +2 -2
- package/dist/cli/{chunk-4NIGNT7X.mjs → chunk-KR2XEI5T.mjs} +1 -1
- package/dist/cli/{chunk-5WOPBX3H.mjs → chunk-KSHAFYYG.mjs} +1 -1
- package/dist/cli/{chunk-DYP27IWC.mjs → chunk-KVCQL6SP.mjs} +4 -4
- package/dist/cli/{chunk-SXD2EYAH.mjs → chunk-L2P2XRPO.mjs} +37 -5
- package/dist/cli/{chunk-67ZG7XZV.mjs → chunk-L4QPBQUX.mjs} +2 -2
- package/dist/cli/{chunk-QTPS5RLG.js → chunk-L6KA4ENU.js} +45 -13
- package/dist/cli/{chunk-ZQH4TXM2.mjs → chunk-L6L57RSG.mjs} +2 -2
- package/dist/cli/{chunk-Y3NN2UAF.mjs → chunk-MWZNMWR2.mjs} +2 -2
- package/dist/cli/{chunk-2IHGVAGT.mjs → chunk-ODWTFVE4.mjs} +2 -2
- package/dist/cli/{chunk-KKSKYZO4.mjs → chunk-QOEI42IU.mjs} +2 -2
- package/dist/cli/{chunk-WCZFCOMZ.js → chunk-QSRWBOPV.js} +11 -10
- package/dist/cli/{chunk-E5ILCMKQ.mjs → chunk-RPFNIMUO.mjs} +1 -1
- package/dist/cli/{chunk-EFO5GVYS.js → chunk-S3XQH7DW.js} +2 -2
- package/dist/cli/{chunk-IJJ6D5WL.mjs → chunk-TLQXN4ZZ.mjs} +11 -11
- package/dist/cli/{chunk-KCDZWS2B.js → chunk-USWLB4KV.js} +231 -231
- package/dist/cli/{chunk-2NGIBJM2.js → chunk-VMPM2FKT.js} +8 -8
- package/dist/cli/{chunk-ZVXB7OU7.mjs → chunk-WCZBIE5L.mjs} +1 -1
- package/dist/cli/{chunk-EYG336YV.js → chunk-WP45PUPW.js} +41 -41
- package/dist/cli/{chunk-AGTXL6LZ.js → chunk-X6HIIHQO.js} +5 -5
- package/dist/cli/{chunk-JO2JZUBR.js → chunk-Y4GRL533.js} +3 -3
- package/dist/cli/{chunk-2I7VN65H.js → chunk-ZZD245Z2.js} +7 -7
- package/dist/cli/command-docs.js +2 -2
- package/dist/cli/command-docs.mjs +1 -1
- package/dist/cli/{csv-DKYZE2KM.js → csv-QD7JJGSP.js} +13 -13
- package/dist/cli/{csv-XR22YQXT.mjs → csv-UBW4ID5D.mjs} +4 -4
- package/dist/cli/{db-RNYRTCMV.js → db-AARR3WYD.js} +27 -27
- package/dist/cli/{db-EOKG36YN.mjs → db-QFDXKIVD.mjs} +6 -6
- package/dist/cli/{describe-ICFXOQBW.mjs → describe-OBVIAC2H.mjs} +20 -20
- package/dist/cli/describe-RYJ6HDYD.js +50 -0
- package/dist/cli/describe-core.d.mts +5 -11
- package/dist/cli/describe-core.d.ts +5 -11
- package/dist/cli/describe-core.js +4 -4
- package/dist/cli/describe-core.mjs +3 -3
- package/dist/cli/{executions-3RAOACNS.mjs → executions-IZYUDYTZ.mjs} +6 -6
- package/dist/cli/{executions-OBWPSWH7.js → executions-KXY7KMZY.js} +8 -8
- package/dist/cli/{feedback-6GPEUBLF.js → feedback-3334HBPD.js} +8 -8
- package/dist/cli/{feedback-6EQRVBKF.mjs → feedback-IVCVBERN.mjs} +4 -4
- package/dist/cli/git-4VLYFHNU.js +25 -0
- package/dist/cli/{git-CVQ24DTR.mjs → git-JHNVET5A.mjs} +5 -5
- package/dist/cli/index.js +141 -141
- package/dist/cli/index.mjs +41 -41
- package/dist/cli/{legacy-noops-XPOATG5V.js → legacy-noops-DBA32JCV.js} +8 -8
- package/dist/cli/{legacy-noops-QULJZYNH.mjs → legacy-noops-WGVBUOCC.mjs} +5 -5
- package/dist/cli/{monitors-OJ4CMREE.js → monitors-GHWZ5AZS.js} +91 -91
- package/dist/cli/{monitors-AFT5YJPZ.mjs → monitors-ZGANC7JY.mjs} +7 -7
- package/dist/cli/{org-WHKNXANG.mjs → org-CUS42N2T.mjs} +6 -6
- package/dist/cli/{org-RKT52CSL.js → org-S7JWP264.js} +72 -72
- package/dist/cli/{pages-EEAQFGVD.mjs → pages-IH56T6L6.mjs} +6 -6
- package/dist/cli/{pages-SOE3R667.js → pages-QXRZDEJW.js} +17 -17
- package/dist/cli/{play-OTJJ4E4T.js → play-4C5PYS62.js} +314 -314
- package/dist/cli/{play-LXFWHUBP.mjs → play-Z65ZFOQH.mjs} +17 -17
- package/dist/cli/{providers-U3CPKTMM.mjs → providers-FSZSJX4Z.mjs} +6 -6
- package/dist/cli/{providers-RU4HIAT3.js → providers-XYQGYF3O.js} +9 -9
- package/dist/cli/{quickstart-75AO2AJC.mjs → quickstart-DHWVE32I.mjs} +4 -4
- package/dist/cli/{quickstart-N72IVA2Y.js → quickstart-ZA25RJT3.js} +6 -6
- package/dist/cli/{run-MMYES3IW.js → run-5MP6LEHM.js} +40 -40
- package/dist/cli/{run-IGWFL6WH.mjs → run-WRPPEPLG.mjs} +25 -25
- package/dist/cli/search-4SQFVNTB.js +32 -0
- package/dist/cli/{search-FIYESBLZ.mjs → search-A6NVJPKX.mjs} +7 -7
- package/dist/cli/{search-output-3I5KSW36.mjs → search-output-PAOUMVXY.mjs} +4 -4
- package/dist/cli/{search-output-2FXN4ZWD.js → search-output-YA6TXWGO.js} +6 -6
- package/dist/cli/{secrets-HCZQ6JNP.js → secrets-AZYOGH3I.js} +15 -15
- package/dist/cli/{secrets-O7IUQ3VT.mjs → secrets-ZGF7JOBI.mjs} +6 -6
- package/dist/cli/{sessions-5AYTT4IW.js → sessions-GCIN5VXT.js} +6 -6
- package/dist/cli/{sessions-KY7A3EZO.mjs → sessions-RNEAXZPV.mjs} +5 -5
- package/dist/cli/{settings-P4VFYWJK.js → settings-LMEZNLBB.js} +78 -78
- package/dist/cli/{settings-WSMRR2GS.mjs → settings-NO5KXQJF.mjs} +11 -11
- package/dist/cli/{setup-YTVKVQC7.mjs → setup-GCYB4IFS.mjs} +9 -9
- package/dist/cli/{setup-J7CA3EJL.js → setup-XKTZPYYH.js} +49 -49
- package/dist/cli/{skills-W5WY764N.mjs → skills-TY4HHIKH.mjs} +7 -7
- package/dist/cli/skills-V4APQA2I.js +36 -0
- package/dist/cli/tools-HKQLQ7HT.js +57 -0
- package/dist/cli/{tools-YECI6N3N.mjs → tools-RDTHHYJ3.mjs} +18 -18
- package/dist/cli/{update-BIFBIEII.mjs → update-BRLLTTCS.mjs} +9 -9
- package/dist/cli/update-Z4MUAHWM.js +34 -0
- package/dist/cli/{workflow-XZVDNARC.mjs → workflow-F72EVZWM.mjs} +7 -7
- package/dist/cli/{workflow-D2TUFFH6.js → workflow-YHA4WE3K.js} +17 -17
- package/dist/{client-BDB_VbE4.d.ts → client-97yTcdLl.d.ts} +1 -1
- package/dist/{client-CNzJ1LTF.d.mts → client-CFo9qalW.d.mts} +1 -1
- package/dist/{client-core-xEa9x3pl.d.ts → client-core-BRZrY13B.d.ts} +5 -5
- package/dist/{client-core-CSv3DlPD.d.mts → client-core-Dl6xgfLq.d.mts} +5 -5
- package/dist/{compiler-manifest-BFTwq1HI.d.ts → compiler-manifest-CPEF48NM.d.mts} +91 -0
- package/dist/{compiler-manifest-BFTwq1HI.d.mts → compiler-manifest-CPEF48NM.d.ts} +91 -0
- package/dist/{errors-c3pMsylw.d.ts → errors-B-PJXveg.d.ts} +1 -1
- package/dist/{errors-w31ybrQM.d.mts → errors-BWbPzqwo.d.mts} +1 -1
- package/dist/{index-DvNtxucX.d.mts → index-BJ8AA1F9.d.mts} +1 -1
- package/dist/{index-CQ-15-QL.d.ts → index-CvVxPpE8.d.ts} +1 -1
- package/dist/index.d.mts +7 -7
- package/dist/index.d.ts +7 -7
- package/dist/index.js +26 -18
- package/dist/index.mjs +15 -7
- package/dist/install-integrity.json +116 -116
- package/dist/plays/bundle-play-file.d.mts +3 -3
- package/dist/plays/bundle-play-file.d.ts +3 -3
- package/dist/plays/play-description.d.mts +2 -2
- package/dist/plays/play-description.d.ts +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 +2 -2
- package/dist/release.d.ts +2 -2
- package/dist/release.js +2 -2
- package/dist/release.mjs +1 -1
- package/dist/server.d.mts +4 -4
- package/dist/server.d.ts +4 -4
- package/dist/server.js +5 -5
- package/dist/server.mjs +3 -3
- package/package.json +1 -1
- package/dist/cli/auth-KYQLDI6V.js +0 -43
- package/dist/cli/describe-RS75I33X.js +0 -50
- package/dist/cli/git-DEFE4SSB.js +0 -25
- package/dist/cli/search-EQURI7SZ.js +0 -32
- package/dist/cli/skills-KKPEGLAR.js +0 -36
- package/dist/cli/tools-65Y4QTW6.js +0 -57
- package/dist/cli/update-WDG7VFOW.js +0 -34
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkJ3UHNUWIjs = require('./chunk-J3UHNUWI.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var _chunkUSWLB4KVjs = require('./chunk-USWLB4KV.js');
|
|
9
9
|
|
|
10
10
|
// src/cli/play-run-admission.ts
|
|
11
11
|
function usesInlinePlayAdmission(command, args) {
|
|
@@ -18,11 +18,11 @@ function usesCliPlayAdmission(command, args) {
|
|
|
18
18
|
}
|
|
19
19
|
async function checkPlayRunCompatibility(baseUrl, maintenancePolicy = "configured", signal) {
|
|
20
20
|
_optionalChain([signal, 'optionalAccess', _ => _.throwIfAborted, 'call', _2 => _2()]);
|
|
21
|
-
if (maintenancePolicy !== "off")
|
|
22
|
-
const compatibility = await
|
|
21
|
+
if (maintenancePolicy !== "off") _chunkUSWLB4KVjs.flushDeferredSkillsSyncNotices.call(void 0, baseUrl);
|
|
22
|
+
const compatibility = await _chunkJ3UHNUWIjs.traceCliSpan.call(void 0,
|
|
23
23
|
"cli.sdk_compatibility",
|
|
24
24
|
{ baseUrl, command: "plays run" },
|
|
25
|
-
() =>
|
|
25
|
+
() => _chunkUSWLB4KVjs.checkSdkCompatibility.call(void 0, baseUrl, {
|
|
26
26
|
command: "plays run",
|
|
27
27
|
persistCache: maintenancePolicy !== "off",
|
|
28
28
|
signal
|
|
@@ -30,7 +30,7 @@ async function checkPlayRunCompatibility(baseUrl, maintenancePolicy = "configure
|
|
|
30
30
|
);
|
|
31
31
|
_optionalChain([signal, 'optionalAccess', _3 => _3.throwIfAborted, 'call', _4 => _4()]);
|
|
32
32
|
if (compatibility.error) throw compatibility.error;
|
|
33
|
-
|
|
33
|
+
_chunkUSWLB4KVjs.enforceSdkCompatibilityResponse.call(void 0, compatibility.response, {
|
|
34
34
|
quietAdvisory: true
|
|
35
35
|
});
|
|
36
36
|
}
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
argsWantJson,
|
|
3
3
|
openInBrowser,
|
|
4
4
|
printCommandEnvelope
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-6DMLWM7L.mjs";
|
|
6
6
|
import {
|
|
7
7
|
ACTIVE_ORG_ID_ENV,
|
|
8
8
|
ACTIVE_ORG_NAME_ENV,
|
|
@@ -22,14 +22,14 @@ import {
|
|
|
22
22
|
saveHostEnvValues,
|
|
23
23
|
saveProjectDeeplineEnvValues,
|
|
24
24
|
storedHostApiKey
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-KR2XEI5T.mjs";
|
|
26
26
|
import {
|
|
27
27
|
SDK_API_CONTRACT,
|
|
28
28
|
SDK_VERSION,
|
|
29
29
|
connectionFailureMessage,
|
|
30
30
|
detectAgentRuntime,
|
|
31
31
|
networkCauseCode
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-FAT6CUZK.mjs";
|
|
33
33
|
import {
|
|
34
34
|
DeeplineError
|
|
35
35
|
} from "./chunk-HBL4PM5Q.mjs";
|
|
@@ -2,10 +2,10 @@ import {
|
|
|
2
2
|
HttpClient,
|
|
3
3
|
resolveCliCommandContext,
|
|
4
4
|
resolveConfig
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-KR2XEI5T.mjs";
|
|
6
6
|
import {
|
|
7
7
|
detectAgentRuntime
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-FAT6CUZK.mjs";
|
|
9
9
|
import {
|
|
10
10
|
DeeplineError,
|
|
11
11
|
serializeToolExecutionFailure
|
|
@@ -3,14 +3,14 @@ import {
|
|
|
3
3
|
} from "./chunk-5AEDYVB6.mjs";
|
|
4
4
|
import {
|
|
5
5
|
DeeplineClient
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-GNSGDIA4.mjs";
|
|
7
7
|
import {
|
|
8
8
|
printCommandEnvelope
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-6DMLWM7L.mjs";
|
|
10
10
|
import {
|
|
11
11
|
resolveConfig,
|
|
12
12
|
sdkCliStateDirPath
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-KR2XEI5T.mjs";
|
|
14
14
|
|
|
15
15
|
// src/cli/commands/search.ts
|
|
16
16
|
import { Option } from "commander";
|
|
@@ -48,7 +48,8 @@ var SEARCH_TYPES = [
|
|
|
48
48
|
"plays",
|
|
49
49
|
"monitors",
|
|
50
50
|
"prebuilts",
|
|
51
|
-
"custom"
|
|
51
|
+
"custom",
|
|
52
|
+
"docs"
|
|
52
53
|
];
|
|
53
54
|
var USAGE = 'Usage: deepline search "<task>" [--type <types>] [--json]';
|
|
54
55
|
function parseTypes(flag, raw) {
|
|
@@ -132,7 +133,7 @@ async function runSearch(queryInput, options, types, exclude = []) {
|
|
|
132
133
|
});
|
|
133
134
|
if (searchRef) rememberSearchRef(searchRef);
|
|
134
135
|
pointAtDescribe(result);
|
|
135
|
-
const { renderSearchResults } = await import("./search-output-
|
|
136
|
+
const { renderSearchResults } = await import("./search-output-PAOUMVXY.mjs");
|
|
136
137
|
printCommandEnvelope(result, {
|
|
137
138
|
json: options.json === true,
|
|
138
139
|
text: renderSearchResults(result, summaryWidth)
|
|
@@ -164,10 +165,10 @@ Examples:
|
|
|
164
165
|
function registerSearchCommand(program) {
|
|
165
166
|
addSearchOptions(
|
|
166
167
|
program.command("search [task]").description(
|
|
167
|
-
"Search tools, monitors, and
|
|
168
|
+
"Search tools, monitors, plays, and docs together, ranked by intent."
|
|
168
169
|
).option(
|
|
169
170
|
"--type <types>",
|
|
170
|
-
"Only these kinds, comma-separated: tools, plays, monitors",
|
|
171
|
+
"Only these kinds, comma-separated: tools, plays, monitors, docs",
|
|
171
172
|
appendCsv
|
|
172
173
|
).option(
|
|
173
174
|
"--exclude <types>",
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
var _chunkVLEVVDWGjs = require('./chunk-VLEVVDWG.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkCK5MA6S6js = require('./chunk-CK5MA6S6.js');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
var _chunkPKV5CD3Wjs = require('./chunk-PKV5CD3W.js');
|
|
@@ -11,7 +11,7 @@ var _chunkPKV5CD3Wjs = require('./chunk-PKV5CD3W.js');
|
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _chunkZZD245Z2js = require('./chunk-ZZD245Z2.js');
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
var _chunkDIAWYWT5js = require('./chunk-DIAWYWT5.js');
|
|
@@ -579,7 +579,7 @@ function parseInputFlagValue(raw) {
|
|
|
579
579
|
return raw;
|
|
580
580
|
}
|
|
581
581
|
function parsePlayRunOptions(args, initialInput = null) {
|
|
582
|
-
const selection =
|
|
582
|
+
const selection = _chunkZZD245Z2js.parseJsonFields.call(void 0, args, "run");
|
|
583
583
|
args = selection.args;
|
|
584
584
|
const usage = "Usage: deepline plays run <play-name> [--input '{...}'] [--run-id-file <path>] [--no-wait] [--tail-timeout-ms 30000] [--force] [--open] [--full] [--<input> value]\n deepline plays run <play-file.ts> [--input '{...}'] [--run-id-file <path>] [--no-wait] [--tail-timeout-ms 30000] [--force] [--open] [--full] [--<input> value]\n deepline plays run --file <play-file.ts> [--input '{...}'] [--profile <id>] [--run-id-file <path>] [--no-wait] [--tail-timeout-ms 30000] [--force] [--open] [--full] [--<input> value]\n deepline plays run --name <name> [--input '{...}'] [--profile <id>] [--live|--latest|--revision-id <id>] [--run-id-file <path>] [--no-wait] [--tail-timeout-ms 30000] [--force] [--open] [--json] [--full] [--<input> value]\n Runs use the Absurd CJS runtime.\n --header '<name>: <value>' may repeat; each is sent on every request for this run.\n Unknown --<input> value flags, such as --limit 5, are passed into play input.\nRun `deepline plays run --help` for idempotent call caching and deepline.dataset guidance.";
|
|
585
585
|
let filePath = null;
|
|
@@ -591,7 +591,7 @@ function parsePlayRunOptions(args, initialInput = null) {
|
|
|
591
591
|
let revisionSelector = null;
|
|
592
592
|
const watch = !args.includes("--no-wait");
|
|
593
593
|
const dryRun = args.includes("--dry-run");
|
|
594
|
-
let jsonOutput = dryRun ?
|
|
594
|
+
let jsonOutput = dryRun ? _chunkZZD245Z2js.argsWantJson.call(void 0, args) : watch ? args.includes("--json") : _chunkZZD245Z2js.argsWantJson.call(void 0, args);
|
|
595
595
|
const fullJson = args.includes("--full");
|
|
596
596
|
const force = args.includes("--force");
|
|
597
597
|
const forceToolRefresh = args.includes("--force-tool-refresh");
|
|
@@ -654,7 +654,7 @@ function parsePlayRunOptions(args, initialInput = null) {
|
|
|
654
654
|
"--log-level requires one of: debug, info, warn, error."
|
|
655
655
|
);
|
|
656
656
|
}
|
|
657
|
-
const parsed =
|
|
657
|
+
const parsed = _chunkCK5MA6S6js.parseLogLevel.call(void 0, value);
|
|
658
658
|
if (!parsed) {
|
|
659
659
|
throw new Error(
|
|
660
660
|
`Unsupported --log-level ${JSON.stringify(value)}. Use debug, info, warn, or error.`
|
|
@@ -972,7 +972,7 @@ function resolvePlayRunCliOptions(target, options, inputArgs = [], maintenancePo
|
|
|
972
972
|
const hasExplicitLogLevel = options.logLevel !== void 0 || inputArgs.some(
|
|
973
973
|
(arg) => arg === "--log-level" || arg.startsWith("--log-level=")
|
|
974
974
|
);
|
|
975
|
-
let logLevel = options.logLevel === void 0 ? base.logLevel :
|
|
975
|
+
let logLevel = options.logLevel === void 0 ? base.logLevel : _chunkCK5MA6S6js.parseLogLevel.call(void 0, options.logLevel);
|
|
976
976
|
if (!logLevel)
|
|
977
977
|
throw new Error("--log-level requires one of: debug, info, warn, error.");
|
|
978
978
|
const debugAlias = options.logs || options.debug === true || inputArgs.some(
|
|
@@ -986,13 +986,13 @@ function resolvePlayRunCliOptions(target, options, inputArgs = [], maintenancePo
|
|
|
986
986
|
if (debugAlias || debugMapLatency && logLevel === "info")
|
|
987
987
|
logLevel = "debug";
|
|
988
988
|
const fullJson = _nullishCoalesce(options.full, () => ( base.fullJson));
|
|
989
|
-
const jsonFields = options.json === void 0 ? base.jsonFields :
|
|
990
|
-
[...fullJson ? ["--full"] : [], ...
|
|
989
|
+
const jsonFields = options.json === void 0 ? base.jsonFields : _chunkZZD245Z2js.parseJsonFields.call(void 0,
|
|
990
|
+
[...fullJson ? ["--full"] : [], ..._chunkZZD245Z2js.jsonFieldArgs.call(void 0, options.json)],
|
|
991
991
|
"run"
|
|
992
992
|
).fields;
|
|
993
993
|
const watch = options.wait === false ? false : base.watch;
|
|
994
994
|
const explicitJson = options.json !== void 0 ? options.json !== false : base.jsonOutput;
|
|
995
|
-
const jsonOutput = dryRun || !watch ? explicitJson ||
|
|
995
|
+
const jsonOutput = dryRun || !watch ? explicitJson || _chunkZZD245Z2js.argsWantJson.call(void 0, []) : explicitJson;
|
|
996
996
|
const verboseLogs = Boolean(
|
|
997
997
|
debugAlias || logLevel === "debug" || debugMapLatency
|
|
998
998
|
);
|
|
@@ -388,6 +388,7 @@ Examples:
|
|
|
388
388
|
deepline search "50 company domains -> each one's lead investors"
|
|
389
389
|
deepline search "company domain -> contacts in sales leadership" --type plays
|
|
390
390
|
deepline search "upload a contact list as a Meta ads audience"
|
|
391
|
+
deepline search "how do webhooks trigger a play" --type docs
|
|
391
392
|
]]
|
|
392
393
|
[[mcp:
|
|
393
394
|
query "first name, last name and company domain -> verified work email"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getActiveCliProgress
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-RPFNIMUO.mjs";
|
|
4
4
|
import {
|
|
5
5
|
DEFAULT_SKILL_AGENTS,
|
|
6
6
|
KNOWN_SKILL_AGENTS,
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
sdkCliStateDirPath,
|
|
13
13
|
skillsAgentPathSegment,
|
|
14
14
|
writeSdkSkillsLocalVersion
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-KR2XEI5T.mjs";
|
|
16
16
|
import {
|
|
17
17
|
SDK_API_CONTRACT,
|
|
18
18
|
SDK_API_MAJOR,
|
|
@@ -20,13 +20,13 @@ import {
|
|
|
20
20
|
agentSessionIdFromEnvironment,
|
|
21
21
|
deploymentProtectionHeaders,
|
|
22
22
|
detectAgentRuntime
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-FAT6CUZK.mjs";
|
|
24
24
|
import {
|
|
25
25
|
DeeplineError
|
|
26
26
|
} from "./chunk-HBL4PM5Q.mjs";
|
|
27
27
|
import {
|
|
28
28
|
SDK_RELEASE
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-QOEI42IU.mjs";
|
|
30
30
|
|
|
31
31
|
// src/compat.ts
|
|
32
32
|
import { randomUUID } from "crypto";
|
|
@@ -294,181 +294,6 @@ function enforceSdkCompatibilityResponse(response, options = {}) {
|
|
|
294
294
|
}
|
|
295
295
|
}
|
|
296
296
|
|
|
297
|
-
// contracts/install-commands.json
|
|
298
|
-
var install_commands_default = {
|
|
299
|
-
skills: {
|
|
300
|
-
index_path: "/.well-known/skills/index.json",
|
|
301
|
-
default_agents: [
|
|
302
|
-
"codex",
|
|
303
|
-
"claude-code",
|
|
304
|
-
"cursor",
|
|
305
|
-
"gemini-cli",
|
|
306
|
-
"antigravity"
|
|
307
|
-
],
|
|
308
|
-
npx_binary: "npx",
|
|
309
|
-
npx_add_args_template: [
|
|
310
|
-
"--yes",
|
|
311
|
-
"skills@1.5.15",
|
|
312
|
-
"add",
|
|
313
|
-
"{skills_source_url}",
|
|
314
|
-
"--agent",
|
|
315
|
-
"{agents}",
|
|
316
|
-
"--global",
|
|
317
|
-
"--yes",
|
|
318
|
-
"--skill",
|
|
319
|
-
"{skill_name}",
|
|
320
|
-
"--full-depth"
|
|
321
|
-
]
|
|
322
|
-
},
|
|
323
|
-
cli: {
|
|
324
|
-
sdk_npm_global: "npm install -g deepline@latest"
|
|
325
|
-
}
|
|
326
|
-
};
|
|
327
|
-
|
|
328
|
-
// src/cli/install-commands.ts
|
|
329
|
-
var INSTALL_COMMANDS = install_commands_default;
|
|
330
|
-
var skillsNpxPackage = INSTALL_COMMANDS.skills.npx_add_args_template.find(
|
|
331
|
-
(arg) => /^skills@\d+\.\d+\.\d+$/.test(arg)
|
|
332
|
-
);
|
|
333
|
-
if (!skillsNpxPackage) {
|
|
334
|
-
throw new Error(
|
|
335
|
-
"shared_libs/cli/install-commands.json must pin an exact skills package version."
|
|
336
|
-
);
|
|
337
|
-
}
|
|
338
|
-
var SKILLS_NPX_PACKAGE = skillsNpxPackage;
|
|
339
|
-
var DEFAULT_V1_SKILL_NAMES = [
|
|
340
|
-
"deepline-org-chart",
|
|
341
|
-
"build-tam",
|
|
342
|
-
"clay-to-deepline",
|
|
343
|
-
"deepline-analytics",
|
|
344
|
-
"deepline-engine",
|
|
345
|
-
// Retired: its guidance lives in `feedback send --help` and `sessions send
|
|
346
|
-
// --help`. Kept as a stub because installed CLIs list it and refuse to
|
|
347
|
-
// sync any skill when the published index lacks a listed name. Move to
|
|
348
|
-
// LEGACY_SKILL_NAMES_TO_REMOVE once those CLIs are out of the field.
|
|
349
|
-
"deepline-feedback",
|
|
350
|
-
"deepline-gtm",
|
|
351
|
-
"deepline-start",
|
|
352
|
-
"deepline-plays",
|
|
353
|
-
"deepline-quickstart",
|
|
354
|
-
"deepline-research",
|
|
355
|
-
"deepline-scoring",
|
|
356
|
-
"find-qualified-titles",
|
|
357
|
-
// Retired recipe shortcut: lookup guidance is now one rule in `deepline-gtm`.
|
|
358
|
-
// Kept as a stub because installed CLIs list it and refuse to sync any skill
|
|
359
|
-
// when the published index lacks a listed name. Move to
|
|
360
|
-
// LEGACY_SKILL_NAMES_TO_REMOVE once those CLIs are out of the field.
|
|
361
|
-
"linkedin-url-lookup",
|
|
362
|
-
// Deprecated alias for `deepline-scoring`, kept installable so saved prompts
|
|
363
|
-
// and scripts using `/niche-signal-discovery` keep routing to the renamed
|
|
364
|
-
// skill. Move to LEGACY_SKILL_NAMES_TO_REMOVE once the window closes.
|
|
365
|
-
"niche-signal-discovery",
|
|
366
|
-
"portfolio-prospecting"
|
|
367
|
-
];
|
|
368
|
-
var DEFAULT_SDK_SKILL_NAMES = [...DEFAULT_V1_SKILL_NAMES];
|
|
369
|
-
var LEGACY_SKILL_NAMES_TO_REMOVE = [
|
|
370
|
-
"deepline-plays-feedback",
|
|
371
|
-
"deepline-plays-quickstart",
|
|
372
|
-
"workflow-hello-world"
|
|
373
|
-
];
|
|
374
|
-
function normalizeBaseUrl(baseUrl) {
|
|
375
|
-
return baseUrl.replace(/\/$/, "");
|
|
376
|
-
}
|
|
377
|
-
function renderTemplate(template, values) {
|
|
378
|
-
return template.replace(/\{([a-z_]+)\}/g, (match, key) => {
|
|
379
|
-
return values[key] ?? match;
|
|
380
|
-
});
|
|
381
|
-
}
|
|
382
|
-
function skillsIndexUrl(baseUrl) {
|
|
383
|
-
return `${normalizeBaseUrl(baseUrl)}${INSTALL_COMMANDS.skills.index_path}`;
|
|
384
|
-
}
|
|
385
|
-
function skillsSourceUrl(baseUrl) {
|
|
386
|
-
return normalizeBaseUrl(baseUrl);
|
|
387
|
-
}
|
|
388
|
-
function buildSkillsAddArgs(baseUrl, skillName, options = {}) {
|
|
389
|
-
const skillNames = Array.isArray(skillName) ? skillName : [skillName];
|
|
390
|
-
const [firstSkillName, ...extraSkillNames] = skillNames;
|
|
391
|
-
const agents = options.agents ?? DEFAULT_SKILL_AGENTS;
|
|
392
|
-
const values = {
|
|
393
|
-
skills_index_url: skillsIndexUrl(baseUrl),
|
|
394
|
-
skills_source_url: skillsSourceUrl(baseUrl),
|
|
395
|
-
agents: agents.join(" "),
|
|
396
|
-
skill_name: firstSkillName ?? ""
|
|
397
|
-
};
|
|
398
|
-
const rendered = INSTALL_COMMANDS.skills.npx_add_args_template.flatMap(
|
|
399
|
-
(arg, index) => {
|
|
400
|
-
const next = index === 0 && options.firstArg ? options.firstArg : arg;
|
|
401
|
-
const value = renderTemplate(next, values);
|
|
402
|
-
if (arg === "{agents}") {
|
|
403
|
-
return agents;
|
|
404
|
-
}
|
|
405
|
-
if (arg === "{skill_name}") {
|
|
406
|
-
return [
|
|
407
|
-
value,
|
|
408
|
-
...extraSkillNames.flatMap((name) => ["--skill", name])
|
|
409
|
-
];
|
|
410
|
-
}
|
|
411
|
-
return value;
|
|
412
|
-
}
|
|
413
|
-
);
|
|
414
|
-
return rendered;
|
|
415
|
-
}
|
|
416
|
-
|
|
417
|
-
// src/cli/windows-arg-escape.ts
|
|
418
|
-
import { statSync } from "fs";
|
|
419
|
-
import { win32 } from "path";
|
|
420
|
-
var CMD_META_CHARS = /([()\][%!^"`<>&|;, *?])/g;
|
|
421
|
-
function escapeCmdArgument(arg, forBatchFile = true) {
|
|
422
|
-
let escaped = arg.replace(/(\\*)"/g, '$1$1\\"');
|
|
423
|
-
escaped = escaped.replace(/(\\*)$/, "$1$1");
|
|
424
|
-
escaped = `"${escaped}"`;
|
|
425
|
-
escaped = escaped.replace(CMD_META_CHARS, "^$1");
|
|
426
|
-
return forBatchFile ? escaped.replace(CMD_META_CHARS, "^$1") : escaped;
|
|
427
|
-
}
|
|
428
|
-
function escapeCmdCommand(command) {
|
|
429
|
-
return command.replace(CMD_META_CHARS, "^$1");
|
|
430
|
-
}
|
|
431
|
-
function resolveShellSpawn(command, args, platform2 = process.platform, env = process.env, cwd = process.cwd()) {
|
|
432
|
-
if (platform2 !== "win32") {
|
|
433
|
-
return { command, args: [...args], shell: false };
|
|
434
|
-
}
|
|
435
|
-
const resolved = resolveWindowsExecutable(command, env, cwd);
|
|
436
|
-
const executable = resolved ?? command;
|
|
437
|
-
const batchFile = /\.(cmd|bat)$/i.test(executable) || !resolved && /^(npm|npx|pnpm)$/i.test(command);
|
|
438
|
-
if (!batchFile) {
|
|
439
|
-
if (/^bunx(?:\.exe)?$/i.test(win32.basename(executable))) {
|
|
440
|
-
const bun = resolveWindowsExecutable("bun", env, cwd);
|
|
441
|
-
if (bun && /\.exe$/i.test(bun)) {
|
|
442
|
-
return { command: bun, args: ["x", ...args], shell: false };
|
|
443
|
-
}
|
|
444
|
-
}
|
|
445
|
-
return { command: executable, args: [...args], shell: false };
|
|
446
|
-
}
|
|
447
|
-
return {
|
|
448
|
-
command: escapeCmdCommand(executable),
|
|
449
|
-
args: args.map((arg) => escapeCmdArgument(arg)),
|
|
450
|
-
shell: true
|
|
451
|
-
};
|
|
452
|
-
}
|
|
453
|
-
function resolveWindowsExecutable(command, env, cwd) {
|
|
454
|
-
const extensions = win32.extname(command) ? [""] : (env.PATHEXT ?? ".COM;.EXE;.BAT;.CMD").split(";").filter(Boolean);
|
|
455
|
-
const directories = /[\\/]/.test(command) ? [""] : [cwd, ...(env.PATH ?? "").split(";")];
|
|
456
|
-
for (const directory of directories) {
|
|
457
|
-
for (const extension of extensions) {
|
|
458
|
-
const candidate = directory ? win32.resolve(
|
|
459
|
-
cwd,
|
|
460
|
-
directory.replace(/^"|"$/g, ""),
|
|
461
|
-
command + extension
|
|
462
|
-
) : win32.resolve(cwd, command + extension);
|
|
463
|
-
try {
|
|
464
|
-
if (statSync(candidate).isFile()) return candidate;
|
|
465
|
-
} catch {
|
|
466
|
-
}
|
|
467
|
-
}
|
|
468
|
-
}
|
|
469
|
-
return void 0;
|
|
470
|
-
}
|
|
471
|
-
|
|
472
297
|
// src/cli/failure-reporting.ts
|
|
473
298
|
import { hostname, platform, release } from "os";
|
|
474
299
|
var FAILURE_REPORT_DISABLE_ENV = "DEEPLINE_DISABLE_FAILURE_REPORTING";
|
|
@@ -851,6 +676,181 @@ async function maybeReportSdkCliFailure(input) {
|
|
|
851
676
|
});
|
|
852
677
|
}
|
|
853
678
|
|
|
679
|
+
// contracts/install-commands.json
|
|
680
|
+
var install_commands_default = {
|
|
681
|
+
skills: {
|
|
682
|
+
index_path: "/.well-known/skills/index.json",
|
|
683
|
+
default_agents: [
|
|
684
|
+
"codex",
|
|
685
|
+
"claude-code",
|
|
686
|
+
"cursor",
|
|
687
|
+
"gemini-cli",
|
|
688
|
+
"antigravity"
|
|
689
|
+
],
|
|
690
|
+
npx_binary: "npx",
|
|
691
|
+
npx_add_args_template: [
|
|
692
|
+
"--yes",
|
|
693
|
+
"skills@1.5.15",
|
|
694
|
+
"add",
|
|
695
|
+
"{skills_source_url}",
|
|
696
|
+
"--agent",
|
|
697
|
+
"{agents}",
|
|
698
|
+
"--global",
|
|
699
|
+
"--yes",
|
|
700
|
+
"--skill",
|
|
701
|
+
"{skill_name}",
|
|
702
|
+
"--full-depth"
|
|
703
|
+
]
|
|
704
|
+
},
|
|
705
|
+
cli: {
|
|
706
|
+
sdk_npm_global: "npm install -g deepline@latest"
|
|
707
|
+
}
|
|
708
|
+
};
|
|
709
|
+
|
|
710
|
+
// src/cli/install-commands.ts
|
|
711
|
+
var INSTALL_COMMANDS = install_commands_default;
|
|
712
|
+
var skillsNpxPackage = INSTALL_COMMANDS.skills.npx_add_args_template.find(
|
|
713
|
+
(arg) => /^skills@\d+\.\d+\.\d+$/.test(arg)
|
|
714
|
+
);
|
|
715
|
+
if (!skillsNpxPackage) {
|
|
716
|
+
throw new Error(
|
|
717
|
+
"shared_libs/cli/install-commands.json must pin an exact skills package version."
|
|
718
|
+
);
|
|
719
|
+
}
|
|
720
|
+
var SKILLS_NPX_PACKAGE = skillsNpxPackage;
|
|
721
|
+
var DEFAULT_V1_SKILL_NAMES = [
|
|
722
|
+
"deepline-org-chart",
|
|
723
|
+
"build-tam",
|
|
724
|
+
"clay-to-deepline",
|
|
725
|
+
"deepline-analytics",
|
|
726
|
+
"deepline-engine",
|
|
727
|
+
// Retired: its guidance lives in `feedback send --help` and `sessions send
|
|
728
|
+
// --help`. Kept as a stub because installed CLIs list it and refuse to
|
|
729
|
+
// sync any skill when the published index lacks a listed name. Move to
|
|
730
|
+
// LEGACY_SKILL_NAMES_TO_REMOVE once those CLIs are out of the field.
|
|
731
|
+
"deepline-feedback",
|
|
732
|
+
"deepline-gtm",
|
|
733
|
+
"deepline-start",
|
|
734
|
+
"deepline-plays",
|
|
735
|
+
"deepline-quickstart",
|
|
736
|
+
"deepline-research",
|
|
737
|
+
"deepline-scoring",
|
|
738
|
+
"find-qualified-titles",
|
|
739
|
+
// Retired recipe shortcut: lookup guidance is now one rule in `deepline-gtm`.
|
|
740
|
+
// Kept as a stub because installed CLIs list it and refuse to sync any skill
|
|
741
|
+
// when the published index lacks a listed name. Move to
|
|
742
|
+
// LEGACY_SKILL_NAMES_TO_REMOVE once those CLIs are out of the field.
|
|
743
|
+
"linkedin-url-lookup",
|
|
744
|
+
// Deprecated alias for `deepline-scoring`, kept installable so saved prompts
|
|
745
|
+
// and scripts using `/niche-signal-discovery` keep routing to the renamed
|
|
746
|
+
// skill. Move to LEGACY_SKILL_NAMES_TO_REMOVE once the window closes.
|
|
747
|
+
"niche-signal-discovery",
|
|
748
|
+
"portfolio-prospecting"
|
|
749
|
+
];
|
|
750
|
+
var DEFAULT_SDK_SKILL_NAMES = [...DEFAULT_V1_SKILL_NAMES];
|
|
751
|
+
var LEGACY_SKILL_NAMES_TO_REMOVE = [
|
|
752
|
+
"deepline-plays-feedback",
|
|
753
|
+
"deepline-plays-quickstart",
|
|
754
|
+
"workflow-hello-world"
|
|
755
|
+
];
|
|
756
|
+
function normalizeBaseUrl(baseUrl) {
|
|
757
|
+
return baseUrl.replace(/\/$/, "");
|
|
758
|
+
}
|
|
759
|
+
function renderTemplate(template, values) {
|
|
760
|
+
return template.replace(/\{([a-z_]+)\}/g, (match, key) => {
|
|
761
|
+
return values[key] ?? match;
|
|
762
|
+
});
|
|
763
|
+
}
|
|
764
|
+
function skillsIndexUrl(baseUrl) {
|
|
765
|
+
return `${normalizeBaseUrl(baseUrl)}${INSTALL_COMMANDS.skills.index_path}`;
|
|
766
|
+
}
|
|
767
|
+
function skillsSourceUrl(baseUrl) {
|
|
768
|
+
return normalizeBaseUrl(baseUrl);
|
|
769
|
+
}
|
|
770
|
+
function buildSkillsAddArgs(baseUrl, skillName, options = {}) {
|
|
771
|
+
const skillNames = Array.isArray(skillName) ? skillName : [skillName];
|
|
772
|
+
const [firstSkillName, ...extraSkillNames] = skillNames;
|
|
773
|
+
const agents = options.agents ?? DEFAULT_SKILL_AGENTS;
|
|
774
|
+
const values = {
|
|
775
|
+
skills_index_url: skillsIndexUrl(baseUrl),
|
|
776
|
+
skills_source_url: skillsSourceUrl(baseUrl),
|
|
777
|
+
agents: agents.join(" "),
|
|
778
|
+
skill_name: firstSkillName ?? ""
|
|
779
|
+
};
|
|
780
|
+
const rendered = INSTALL_COMMANDS.skills.npx_add_args_template.flatMap(
|
|
781
|
+
(arg, index) => {
|
|
782
|
+
const next = index === 0 && options.firstArg ? options.firstArg : arg;
|
|
783
|
+
const value = renderTemplate(next, values);
|
|
784
|
+
if (arg === "{agents}") {
|
|
785
|
+
return agents;
|
|
786
|
+
}
|
|
787
|
+
if (arg === "{skill_name}") {
|
|
788
|
+
return [
|
|
789
|
+
value,
|
|
790
|
+
...extraSkillNames.flatMap((name) => ["--skill", name])
|
|
791
|
+
];
|
|
792
|
+
}
|
|
793
|
+
return value;
|
|
794
|
+
}
|
|
795
|
+
);
|
|
796
|
+
return rendered;
|
|
797
|
+
}
|
|
798
|
+
|
|
799
|
+
// src/cli/windows-arg-escape.ts
|
|
800
|
+
import { statSync } from "fs";
|
|
801
|
+
import { win32 } from "path";
|
|
802
|
+
var CMD_META_CHARS = /([()\][%!^"`<>&|;, *?])/g;
|
|
803
|
+
function escapeCmdArgument(arg, forBatchFile = true) {
|
|
804
|
+
let escaped = arg.replace(/(\\*)"/g, '$1$1\\"');
|
|
805
|
+
escaped = escaped.replace(/(\\*)$/, "$1$1");
|
|
806
|
+
escaped = `"${escaped}"`;
|
|
807
|
+
escaped = escaped.replace(CMD_META_CHARS, "^$1");
|
|
808
|
+
return forBatchFile ? escaped.replace(CMD_META_CHARS, "^$1") : escaped;
|
|
809
|
+
}
|
|
810
|
+
function escapeCmdCommand(command) {
|
|
811
|
+
return command.replace(CMD_META_CHARS, "^$1");
|
|
812
|
+
}
|
|
813
|
+
function resolveShellSpawn(command, args, platform2 = process.platform, env = process.env, cwd = process.cwd()) {
|
|
814
|
+
if (platform2 !== "win32") {
|
|
815
|
+
return { command, args: [...args], shell: false };
|
|
816
|
+
}
|
|
817
|
+
const resolved = resolveWindowsExecutable(command, env, cwd);
|
|
818
|
+
const executable = resolved ?? command;
|
|
819
|
+
const batchFile = /\.(cmd|bat)$/i.test(executable) || !resolved && /^(npm|npx|pnpm)$/i.test(command);
|
|
820
|
+
if (!batchFile) {
|
|
821
|
+
if (/^bunx(?:\.exe)?$/i.test(win32.basename(executable))) {
|
|
822
|
+
const bun = resolveWindowsExecutable("bun", env, cwd);
|
|
823
|
+
if (bun && /\.exe$/i.test(bun)) {
|
|
824
|
+
return { command: bun, args: ["x", ...args], shell: false };
|
|
825
|
+
}
|
|
826
|
+
}
|
|
827
|
+
return { command: executable, args: [...args], shell: false };
|
|
828
|
+
}
|
|
829
|
+
return {
|
|
830
|
+
command: escapeCmdCommand(executable),
|
|
831
|
+
args: args.map((arg) => escapeCmdArgument(arg)),
|
|
832
|
+
shell: true
|
|
833
|
+
};
|
|
834
|
+
}
|
|
835
|
+
function resolveWindowsExecutable(command, env, cwd) {
|
|
836
|
+
const extensions = win32.extname(command) ? [""] : (env.PATHEXT ?? ".COM;.EXE;.BAT;.CMD").split(";").filter(Boolean);
|
|
837
|
+
const directories = /[\\/]/.test(command) ? [""] : [cwd, ...(env.PATH ?? "").split(";")];
|
|
838
|
+
for (const directory of directories) {
|
|
839
|
+
for (const extension of extensions) {
|
|
840
|
+
const candidate = directory ? win32.resolve(
|
|
841
|
+
cwd,
|
|
842
|
+
directory.replace(/^"|"$/g, ""),
|
|
843
|
+
command + extension
|
|
844
|
+
) : win32.resolve(cwd, command + extension);
|
|
845
|
+
try {
|
|
846
|
+
if (statSync(candidate).isFile()) return candidate;
|
|
847
|
+
} catch {
|
|
848
|
+
}
|
|
849
|
+
}
|
|
850
|
+
}
|
|
851
|
+
return void 0;
|
|
852
|
+
}
|
|
853
|
+
|
|
854
854
|
// src/cli/skills-sync.ts
|
|
855
855
|
import { spawn, spawnSync } from "child_process";
|
|
856
856
|
import { createHash, randomUUID as randomUUID2 } from "crypto";
|
|
@@ -1950,17 +1950,17 @@ export {
|
|
|
1950
1950
|
checkSdkCompatibility,
|
|
1951
1951
|
isCiEnvironment,
|
|
1952
1952
|
enforceSdkCompatibilityResponse,
|
|
1953
|
-
SKILLS_NPX_PACKAGE,
|
|
1954
|
-
DEFAULT_SDK_SKILL_NAMES,
|
|
1955
|
-
LEGACY_SKILL_NAMES_TO_REMOVE,
|
|
1956
|
-
skillsSourceUrl,
|
|
1957
|
-
resolveShellSpawn,
|
|
1958
1953
|
isFailureReportingDisabled,
|
|
1959
1954
|
redactFailureText,
|
|
1960
1955
|
sanitizeCommand,
|
|
1961
1956
|
failureReportHeaders,
|
|
1962
1957
|
resolveSdkCliFailureExitCode,
|
|
1963
1958
|
maybeReportSdkCliFailure,
|
|
1959
|
+
SKILLS_NPX_PACKAGE,
|
|
1960
|
+
DEFAULT_SDK_SKILL_NAMES,
|
|
1961
|
+
LEGACY_SKILL_NAMES_TO_REMOVE,
|
|
1962
|
+
skillsSourceUrl,
|
|
1963
|
+
resolveShellSpawn,
|
|
1964
1964
|
SkillsStateUnavailableError,
|
|
1965
1965
|
acquireSkillsInstallLease,
|
|
1966
1966
|
skillsInstallLeasePath,
|