deepline 0.3.466 → 0.3.467
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/client-core.ts +41 -2
- package/dist/bundling-sources/sdk/src/release.ts +1 -1
- package/dist/bundling-sources/shared_libs/integration-contracts/billing-entitlements.ts +17 -0
- package/dist/bundling-sources/shared_libs/play-runtime/tool-result.ts +325 -44
- package/dist/bundling-sources/shared_libs/plays/field-catalog.ts +15 -0
- package/dist/bundling-sources/shared_libs/plays/tool-result-types.ts +51 -6
- package/dist/bundling-sources/shared_libs/product-notifications/billing-sales.ts +37 -1
- package/dist/cli/{auth-HYIPYSKK.mjs → auth-7H62VDZD.mjs} +5 -5
- package/dist/cli/auth-EXW5E3DI.js +41 -0
- package/dist/cli/{billing-5S6SGBUP.mjs → billing-6TM3ZXDR.mjs} +44 -6
- package/dist/cli/{billing-NG62QGPT.js → billing-N5BNGGYN.js} +115 -77
- package/dist/cli/{chunk-7YDN6AEK.mjs → chunk-3RGWTKK3.mjs} +10 -0
- package/dist/cli/{chunk-A7MWUG5H.js → chunk-3ZGSR6X7.js} +1 -1
- package/dist/cli/{chunk-7IWYO475.js → chunk-42AW4SQR.js} +21 -21
- package/dist/cli/{chunk-7QITO7XO.mjs → chunk-4LTQYDZG.mjs} +4 -4
- package/dist/cli/{chunk-SQFBLBYC.mjs → chunk-5RXKAXFD.mjs} +2 -2
- package/dist/cli/{chunk-WKOWXTDR.mjs → chunk-6UZ4MRWN.mjs} +2 -2
- package/dist/cli/{chunk-RGRSUMN6.js → chunk-7Y53LJLE.js} +5 -5
- package/dist/cli/{chunk-B7BNWOG6.js → chunk-7ZZWOJTM.js} +3 -3
- package/dist/cli/{chunk-EOKUL6XS.js → chunk-AD5BZUAP.js} +5 -5
- package/dist/cli/{chunk-YHPUJI7G.mjs → chunk-AU4BWQTT.mjs} +5 -5
- package/dist/cli/{chunk-IEQPOBTK.mjs → chunk-AUVEQ3JX.mjs} +1 -1
- package/dist/cli/{chunk-QWMXP2IP.mjs → chunk-C4GBOGTW.mjs} +2 -2
- package/dist/cli/{chunk-3DVJ2IPG.js → chunk-C6EGT3LO.js} +183 -173
- package/dist/cli/{chunk-W4XWGNW4.mjs → chunk-CER3XHT3.mjs} +3 -3
- package/dist/cli/{chunk-VSEKVRAP.mjs → chunk-DCDTCG2D.mjs} +2 -2
- package/dist/cli/{chunk-R2SQN2CD.js → chunk-FFOAOQ77.js} +6 -6
- package/dist/cli/{chunk-6R36QIG4.mjs → chunk-FP3DH46P.mjs} +4 -4
- package/dist/cli/{chunk-RCMT6AZ5.mjs → chunk-FQIGRZ52.mjs} +1 -1
- package/dist/cli/{chunk-4QJ63YHC.js → chunk-FRY76AFK.js} +8 -8
- package/dist/cli/{chunk-VVCMP45C.js → chunk-FS55YDCW.js} +3 -3
- package/dist/cli/{chunk-HOFXQYRF.js → chunk-FVA6XLRA.js} +7 -7
- package/dist/cli/{chunk-OGCAGZXO.mjs → chunk-FVYAEBGO.mjs} +23 -2
- package/dist/cli/{chunk-RSXOGXGX.mjs → chunk-G35HNL6P.mjs} +1 -1
- package/dist/cli/{chunk-MTH7WIE3.js → chunk-H3QDLCRT.js} +53 -53
- package/dist/cli/{chunk-HIMV32ZX.js → chunk-HNP5V5BN.js} +23 -2
- package/dist/cli/{chunk-UHAKSLL2.mjs → chunk-HTXQUA3V.mjs} +11 -1
- package/dist/cli/{chunk-QTTYIPFY.mjs → chunk-I3LWDZRN.mjs} +1 -1
- package/dist/cli/{chunk-22BKA2QL.js → chunk-KMYCHMZF.js} +26 -26
- package/dist/cli/{chunk-F6H74EFB.mjs → chunk-KUCUHRLC.mjs} +2 -2
- package/dist/cli/{chunk-LDEJ4NUP.js → chunk-LAMHSZ74.js} +13 -13
- package/dist/cli/{chunk-CMXFOZVG.js → chunk-LKVOV7PX.js} +258 -258
- package/dist/cli/{chunk-OB5NON4G.js → chunk-MGUQGKHE.js} +8 -8
- package/dist/cli/{chunk-JLE5UYZV.mjs → chunk-MRBDFPJ7.mjs} +2 -2
- package/dist/cli/{chunk-JLZKF7EY.js → chunk-NPZBE64X.js} +11 -1
- package/dist/cli/{chunk-NJ6KQLMO.mjs → chunk-NU64F53H.mjs} +11 -11
- package/dist/cli/{chunk-V27TVT7P.mjs → chunk-OSKGEBE7.mjs} +1 -1
- package/dist/cli/{chunk-H5MYPDO2.mjs → chunk-R5ZJICJA.mjs} +1 -1
- package/dist/cli/{chunk-6CYRIFZ3.mjs → chunk-RH6DVPGW.mjs} +2 -2
- package/dist/cli/{chunk-NQH7E3F2.js → chunk-SHGBHP6J.js} +3 -3
- package/dist/cli/{chunk-5EUJKY3G.mjs → chunk-SYLR33PS.mjs} +3 -3
- package/dist/cli/{chunk-L3U44YVO.js → chunk-T5GRG37B.js} +5 -5
- package/dist/cli/{chunk-FWHRCZET.mjs → chunk-TNAXVJEG.mjs} +5 -5
- package/dist/cli/{chunk-6P4OYABU.js → chunk-V6OMS7E2.js} +6 -6
- package/dist/cli/{chunk-QMHBWFU5.mjs → chunk-VGWH3BFC.mjs} +1 -1
- package/dist/cli/{chunk-5BEKJUOK.js → chunk-VOPKDTJT.js} +2 -2
- package/dist/cli/{chunk-ZBWKWMSH.js → chunk-WBYC7AYC.js} +16 -16
- package/dist/cli/{chunk-RRCVAVM7.js → chunk-WGMNXDRZ.js} +2 -2
- package/dist/cli/{chunk-46YQQOTC.mjs → chunk-WISHPL5Q.mjs} +5 -5
- package/dist/cli/{chunk-QZKSG7XZ.js → chunk-WS2BY2ST.js} +36 -36
- package/dist/cli/{chunk-PEUWKPY4.js → chunk-WTVTCSPY.js} +4 -4
- package/dist/cli/{chunk-MUQAKLBP.mjs → chunk-X3RAGNNZ.mjs} +1 -1
- package/dist/cli/{chunk-I2TCWIW2.mjs → chunk-XSX6TJUA.mjs} +1 -1
- package/dist/cli/{chunk-NYNNNOJW.js → chunk-YIJS7ET7.js} +51 -51
- package/dist/cli/{chunk-SWUSDFG2.js → chunk-ZTA4JIAB.js} +9 -9
- package/dist/cli/command-docs.js +2 -2
- package/dist/cli/command-docs.mjs +1 -1
- package/dist/cli/{csv-ZGZX2IIP.mjs → csv-435JAJ45.mjs} +4 -4
- package/dist/cli/{csv-AD2DLLLL.js → csv-BPZ4VLR6.js} +13 -13
- package/dist/cli/{db-NBY4LHAY.js → db-EBR2UQK3.js} +27 -27
- package/dist/cli/{db-LUFEKPEK.mjs → db-IEUTNOOC.mjs} +6 -6
- package/dist/cli/describe-EPT52IUE.js +48 -0
- package/dist/cli/{describe-MLXMC47U.mjs → describe-GM233O75.mjs} +20 -20
- package/dist/cli/describe-core.d.mts +3 -3
- package/dist/cli/describe-core.d.ts +3 -3
- package/dist/cli/describe-core.js +4 -4
- package/dist/cli/describe-core.mjs +3 -3
- package/dist/cli/{executions-HDJMKNBR.js → executions-5SWPQTLB.js} +8 -8
- package/dist/cli/{executions-JKVWM3P4.mjs → executions-LDPBVSKZ.mjs} +6 -6
- package/dist/cli/{feedback-7E5Z4ZO5.mjs → feedback-JB7BBF64.mjs} +4 -4
- package/dist/cli/{feedback-VXMP7HDF.js → feedback-YFW5KT36.js} +8 -8
- package/dist/cli/git-7L7LKOKW.js +25 -0
- package/dist/cli/{git-UFMRAGMY.mjs → git-MCGUPO2W.mjs} +5 -5
- package/dist/cli/index.js +139 -139
- package/dist/cli/index.mjs +41 -41
- package/dist/cli/{legacy-noops-BDULCVGD.mjs → legacy-noops-EHNXHQL7.mjs} +5 -5
- package/dist/cli/{legacy-noops-4QKREY4K.js → legacy-noops-LMGSIBWM.js} +8 -8
- package/dist/cli/{monitors-S6TDJYCK.mjs → monitors-355EWLGN.mjs} +7 -7
- package/dist/cli/{monitors-LNNSTELC.js → monitors-VRQ32EAA.js} +91 -91
- package/dist/cli/{org-EEEMWKQ2.mjs → org-MJ6XMAI4.mjs} +51 -10
- package/dist/cli/{org-OWM3IGOK.js → org-W3YZN65W.js} +113 -72
- package/dist/cli/{pages-ZYYMQUDX.mjs → pages-62QNUXV2.mjs} +6 -6
- package/dist/cli/{pages-7JF6AKDI.js → pages-JPK6UVMV.js} +17 -17
- package/dist/cli/{play-5Z3E7KL6.mjs → play-CKBPES6Q.mjs} +18 -18
- package/dist/cli/{play-WLAFXAHR.js → play-WPPJQBBS.js} +305 -305
- package/dist/cli/{providers-TTDFQQU2.js → providers-DH5JJ5HN.js} +9 -9
- package/dist/cli/{providers-JUT7IYD3.mjs → providers-LLPKHVXL.mjs} +6 -6
- package/dist/cli/{quickstart-P4TL4NWJ.mjs → quickstart-K5HVPO2L.mjs} +4 -4
- package/dist/cli/{quickstart-OZYEGICI.js → quickstart-NNEF37EG.js} +6 -6
- package/dist/cli/{run-BYGE4LUB.js → run-N2KY2VNQ.js} +40 -40
- package/dist/cli/{run-CM6OZUBR.mjs → run-SKIZFJ5O.mjs} +25 -25
- package/dist/cli/{search-RZRJ73YL.mjs → search-2WXJ3GID.mjs} +7 -7
- package/dist/cli/search-HO7ARG3H.js +32 -0
- package/dist/cli/{secrets-XLTN3SCL.js → secrets-5YVX7LK7.js} +15 -15
- package/dist/cli/{secrets-DHI6ZMKE.mjs → secrets-6GEQ75OU.mjs} +6 -6
- package/dist/cli/{sessions-MZD5WZBT.mjs → sessions-GOPZ3YRN.mjs} +5 -5
- package/dist/cli/{sessions-6NCQQXVK.js → sessions-H3QES7C2.js} +6 -6
- package/dist/cli/{settings-JJH72W5V.js → settings-62SU5ROV.js} +78 -78
- package/dist/cli/{settings-S6GQ4XFZ.mjs → settings-IP47HYC6.mjs} +11 -11
- package/dist/cli/{setup-ZJ4G54XN.mjs → setup-LCKXUSW5.mjs} +9 -9
- package/dist/cli/{setup-3BIOG6N2.js → setup-YCCU7TU4.js} +44 -44
- package/dist/cli/{skills-FBH4REPB.mjs → skills-3QAQI6X7.mjs} +7 -7
- package/dist/cli/skills-UVAIKQNC.js +31 -0
- package/dist/cli/{tools-J6YGZTD5.mjs → tools-HKD4G6HA.mjs} +18 -18
- package/dist/cli/tools-KAIUUBTD.js +55 -0
- package/dist/cli/{update-6CSRALIQ.mjs → update-2VYSBSDD.mjs} +9 -9
- package/dist/cli/update-Q3AMECAG.js +33 -0
- package/dist/cli/{workflow-3ATSB7HQ.mjs → workflow-EFRGY6JD.mjs} +7 -7
- package/dist/cli/{workflow-2ETKYSJV.js → workflow-MMWGUSGY.js} +17 -17
- package/dist/{client-BClp2yrq.d.ts → client-BOEAXwJj.d.ts} +1 -1
- package/dist/{client-ADFHNtFM.d.mts → client-DL0koOaP.d.mts} +1 -1
- package/dist/{client-core-BFU73Ttw.d.ts → client-core-BX_8khUY.d.ts} +23 -1
- package/dist/{client-core-DWLmmJWo.d.mts → client-core-CowyuxKu.d.mts} +23 -1
- package/dist/{compiler-manifest-Cs17yO-H.d.ts → compiler-manifest-D5dARg3M.d.mts} +64 -10
- package/dist/{compiler-manifest-Cs17yO-H.d.mts → compiler-manifest-D5dARg3M.d.ts} +64 -10
- package/dist/{errors-Dee-QpVS.d.ts → errors-BtHHzWL8.d.ts} +1 -1
- package/dist/{errors-qNfvQuRB.d.mts → errors-BveMVPwA.d.mts} +1 -1
- package/dist/{index-BTqNNXmC.d.mts → index-BboApDGD.d.mts} +1 -1
- package/dist/{index-DXTh1Lxe.d.ts → index-C6sovoYP.d.ts} +1 -1
- package/dist/index.d.mts +7 -7
- package/dist/index.d.ts +7 -7
- package/dist/index.js +277 -76
- package/dist/index.mjs +239 -38
- package/dist/install-integrity.json +114 -114
- 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 +1 -1
- package/dist/release.d.ts +1 -1
- 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-Y3UTWD3W.js +0 -41
- package/dist/cli/describe-Z66CQESH.js +0 -48
- package/dist/cli/git-NNSJKW3V.js +0 -25
- package/dist/cli/search-RIG4LTCS.js +0 -32
- package/dist/cli/skills-ODISCL7S.js +0 -31
- package/dist/cli/tools-IHBHDI4P.js +0 -55
- package/dist/cli/update-5O3HDR5O.js +0 -33
|
@@ -11,20 +11,20 @@
|
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _chunkH3QDLCRTjs = require('./chunk-H3QDLCRT.js');
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
var
|
|
17
|
+
var _chunkFVA6XLRAjs = require('./chunk-FVA6XLRA.js');
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
|
|
22
22
|
|
|
23
|
-
var
|
|
23
|
+
var _chunkSHGBHP6Jjs = require('./chunk-SHGBHP6J.js');
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
|
|
27
|
-
var
|
|
27
|
+
var _chunkWTVTCSPYjs = require('./chunk-WTVTCSPY.js');
|
|
28
28
|
|
|
29
29
|
// src/cli/commands/skills.ts
|
|
30
30
|
var _child_process = require('child_process');
|
|
@@ -77,7 +77,7 @@ function inferActiveSkillsScope(entrypoint = _nullishCoalesce(process.argv[1], (
|
|
|
77
77
|
return /[\\/]\.deepline[\\/]runtime[\\/]/.test(entrypoint) ? "local" : "global";
|
|
78
78
|
}
|
|
79
79
|
function resolveLocalRoot() {
|
|
80
|
-
const target =
|
|
80
|
+
const target = _chunkSHGBHP6Jjs.resolveProjectPinTarget.call(void 0, );
|
|
81
81
|
if (!target.ok) {
|
|
82
82
|
throw new Error(
|
|
83
83
|
`Cowork project folder is ambiguous. Candidate folders: ${target.candidates.join(
|
|
@@ -88,7 +88,7 @@ function resolveLocalRoot() {
|
|
|
88
88
|
return target.dir;
|
|
89
89
|
}
|
|
90
90
|
function detectSkillsAgents(input) {
|
|
91
|
-
const runtime = _nullishCoalesce(input.runtime, () => (
|
|
91
|
+
const runtime = _nullishCoalesce(input.runtime, () => ( _chunkWTVTCSPYjs.detectAgentRuntime.call(void 0, )));
|
|
92
92
|
const knownAgent = RUNTIME_TO_SKILLS_AGENT[runtime];
|
|
93
93
|
if (knownAgent) return [knownAgent];
|
|
94
94
|
const roots = [
|
|
@@ -103,11 +103,11 @@ function detectSkillsAgents(input) {
|
|
|
103
103
|
return detected.length > 0 ? detected : ["*"];
|
|
104
104
|
}
|
|
105
105
|
function skillsStatePathForScope(baseUrl, scope, root) {
|
|
106
|
-
return scope === "local" && root ? _path.join.call(void 0, root, ".deepline", "setup", "skills.json") : _path.join.call(void 0,
|
|
106
|
+
return scope === "local" && root ? _path.join.call(void 0, root, ".deepline", "setup", "skills.json") : _path.join.call(void 0, _chunkSHGBHP6Jjs.sdkCliStateDirPath.call(void 0, baseUrl), "skills-install.json");
|
|
107
107
|
}
|
|
108
108
|
function buildSkillsPlan(input) {
|
|
109
109
|
const scopeArgs = input.scope === "global" ? ["--global"] : [];
|
|
110
|
-
const legacyNames = [...
|
|
110
|
+
const legacyNames = [..._chunkH3QDLCRTjs.LEGACY_SKILL_NAMES_TO_REMOVE].sort(
|
|
111
111
|
(a, b) => a.localeCompare(b)
|
|
112
112
|
);
|
|
113
113
|
return {
|
|
@@ -121,7 +121,7 @@ function buildSkillsPlan(input) {
|
|
|
121
121
|
args: [
|
|
122
122
|
"exec",
|
|
123
123
|
"--yes",
|
|
124
|
-
`--package=${
|
|
124
|
+
`--package=${_chunkH3QDLCRTjs.SKILLS_NPX_PACKAGE}`,
|
|
125
125
|
"--",
|
|
126
126
|
"skills",
|
|
127
127
|
"remove",
|
|
@@ -137,11 +137,11 @@ function buildSkillsPlan(input) {
|
|
|
137
137
|
args: [
|
|
138
138
|
"exec",
|
|
139
139
|
"--yes",
|
|
140
|
-
`--package=${
|
|
140
|
+
`--package=${_chunkH3QDLCRTjs.SKILLS_NPX_PACKAGE}`,
|
|
141
141
|
"--",
|
|
142
142
|
"skills",
|
|
143
143
|
"add",
|
|
144
|
-
|
|
144
|
+
_chunkH3QDLCRTjs.skillsSourceUrl.call(void 0, input.baseUrl),
|
|
145
145
|
"--agent",
|
|
146
146
|
...input.agents,
|
|
147
147
|
...scopeArgs,
|
|
@@ -178,7 +178,7 @@ function readSkillsInstallState(path) {
|
|
|
178
178
|
}
|
|
179
179
|
function runProcess(command, args, cwd) {
|
|
180
180
|
return new Promise((resolve, reject) => {
|
|
181
|
-
const plan =
|
|
181
|
+
const plan = _chunkH3QDLCRTjs.resolveShellSpawn.call(void 0,
|
|
182
182
|
command,
|
|
183
183
|
args,
|
|
184
184
|
process.platform,
|
|
@@ -200,7 +200,7 @@ function runProcess(command, args, cwd) {
|
|
|
200
200
|
child.kill("SIGTERM");
|
|
201
201
|
reject(
|
|
202
202
|
new Error(
|
|
203
|
-
`${
|
|
203
|
+
`${_chunkH3QDLCRTjs.SKILLS_NPX_PACKAGE} timed out after ${SKILLS_PROCESS_TIMEOUT_MS}ms.`
|
|
204
204
|
)
|
|
205
205
|
);
|
|
206
206
|
}, SKILLS_PROCESS_TIMEOUT_MS);
|
|
@@ -211,7 +211,7 @@ function runProcess(command, args, cwd) {
|
|
|
211
211
|
child.once("close", (code) => {
|
|
212
212
|
clearTimeout(timeout);
|
|
213
213
|
if (code && stderr.trim()) {
|
|
214
|
-
process.stderr.write(`${
|
|
214
|
+
process.stderr.write(`${_chunkH3QDLCRTjs.SKILLS_NPX_PACKAGE} exited ${code}.
|
|
215
215
|
`);
|
|
216
216
|
}
|
|
217
217
|
resolve(_nullishCoalesce(code, () => ( 1)));
|
|
@@ -225,7 +225,7 @@ async function runSkillsCommand(options, dependencies = {}) {
|
|
|
225
225
|
scope = normalizeScope(options.scope);
|
|
226
226
|
root = scope === "local" ? resolveLocalRoot() : null;
|
|
227
227
|
} catch (error) {
|
|
228
|
-
|
|
228
|
+
_chunkFVA6XLRAjs.printCommandEnvelope.call(void 0,
|
|
229
229
|
{
|
|
230
230
|
ok: false,
|
|
231
231
|
status: "failed",
|
|
@@ -237,22 +237,22 @@ async function runSkillsCommand(options, dependencies = {}) {
|
|
|
237
237
|
);
|
|
238
238
|
return 2;
|
|
239
239
|
}
|
|
240
|
-
const baseUrl =
|
|
240
|
+
const baseUrl = _chunkSHGBHP6Jjs.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, "");
|
|
241
241
|
const catalog = {
|
|
242
|
-
skillNames: [...
|
|
243
|
-
version:
|
|
242
|
+
skillNames: [..._chunkH3QDLCRTjs.DEFAULT_SDK_SKILL_NAMES],
|
|
243
|
+
version: _chunkWTVTCSPYjs.SDK_VERSION
|
|
244
244
|
};
|
|
245
245
|
const agents = options.agent ? [options.agent] : detectSkillsAgents({ scope, root });
|
|
246
246
|
const plan = buildSkillsPlan({ baseUrl, scope, root, agents, ...catalog });
|
|
247
247
|
if (options.dryRun) {
|
|
248
|
-
|
|
248
|
+
_chunkFVA6XLRAjs.printCommandEnvelope.call(void 0,
|
|
249
249
|
{ ok: true, status: "planned", dryRun: true, ...plan },
|
|
250
250
|
{ json: options.json }
|
|
251
251
|
);
|
|
252
252
|
return 0;
|
|
253
253
|
}
|
|
254
|
-
if (isSkillsPlanCurrent(plan, readSkillsInstallState(plan.statePath)) && !
|
|
255
|
-
|
|
254
|
+
if (isSkillsPlanCurrent(plan, readSkillsInstallState(plan.statePath)) && !_chunkH3QDLCRTjs.hasFailedAutomaticSkillsSync.call(void 0, baseUrl, agents)) {
|
|
255
|
+
_chunkFVA6XLRAjs.printCommandEnvelope.call(void 0,
|
|
256
256
|
{
|
|
257
257
|
ok: true,
|
|
258
258
|
status: "current",
|
|
@@ -284,10 +284,10 @@ async function runSkillsCommand(options, dependencies = {}) {
|
|
|
284
284
|
}
|
|
285
285
|
if (scope === "local" && root) {
|
|
286
286
|
const managedNames = [
|
|
287
|
-
.../* @__PURE__ */ new Set([...plan.skillNames, ...
|
|
287
|
+
.../* @__PURE__ */ new Set([...plan.skillNames, ..._chunkH3QDLCRTjs.LEGACY_SKILL_NAMES_TO_REMOVE])
|
|
288
288
|
];
|
|
289
289
|
const agentRoots = workspaceSkillRootsForAgents(plan.agents);
|
|
290
|
-
|
|
290
|
+
_chunkSHGBHP6Jjs.ensureProjectPrivatePathsIgnored.call(void 0, root, [
|
|
291
291
|
".deepline/",
|
|
292
292
|
...agentRoots.flatMap(
|
|
293
293
|
(agentRoot) => managedNames.map((name) => `${agentRoot}/skills/${name}/`)
|
|
@@ -296,7 +296,7 @@ async function runSkillsCommand(options, dependencies = {}) {
|
|
|
296
296
|
}
|
|
297
297
|
let lease;
|
|
298
298
|
try {
|
|
299
|
-
lease = scope === "global" ? await
|
|
299
|
+
lease = scope === "global" ? await _chunkH3QDLCRTjs.acquireSkillsInstallLease.call(void 0, baseUrl, agents, plan.version, {
|
|
300
300
|
waitMs: _nullishCoalesce(dependencies.installLeaseWaitMs, () => ( SKILLS_INSTALL_LEASE_WAIT_MS)),
|
|
301
301
|
onWait: () => process.stderr.write(
|
|
302
302
|
"Waiting for a background Deepline skills refresh to finish...\n"
|
|
@@ -304,8 +304,8 @@ async function runSkillsCommand(options, dependencies = {}) {
|
|
|
304
304
|
}) : { release: () => {
|
|
305
305
|
} };
|
|
306
306
|
} catch (error) {
|
|
307
|
-
if (!(error instanceof
|
|
308
|
-
|
|
307
|
+
if (!(error instanceof _chunkH3QDLCRTjs.SkillsStateUnavailableError)) throw error;
|
|
308
|
+
_chunkFVA6XLRAjs.printCommandEnvelope.call(void 0,
|
|
309
309
|
{
|
|
310
310
|
ok: false,
|
|
311
311
|
status: "failed",
|
|
@@ -321,7 +321,7 @@ async function runSkillsCommand(options, dependencies = {}) {
|
|
|
321
321
|
return 5;
|
|
322
322
|
}
|
|
323
323
|
if (!lease) {
|
|
324
|
-
|
|
324
|
+
_chunkFVA6XLRAjs.printCommandEnvelope.call(void 0,
|
|
325
325
|
{
|
|
326
326
|
ok: false,
|
|
327
327
|
status: "failed",
|
|
@@ -330,7 +330,7 @@ async function runSkillsCommand(options, dependencies = {}) {
|
|
|
330
330
|
scope,
|
|
331
331
|
agents,
|
|
332
332
|
message: "A background Deepline skills refresh is still running for these agents.",
|
|
333
|
-
next: `Retry in a moment: deepline skills --scope ${scope}. If no refresh is running, remove ${
|
|
333
|
+
next: `Retry in a moment: deepline skills --scope ${scope}. If no refresh is running, remove ${_chunkH3QDLCRTjs.skillsInstallLeasePath.call(void 0, baseUrl, agents)}`
|
|
334
334
|
},
|
|
335
335
|
{ json: options.json }
|
|
336
336
|
);
|
|
@@ -367,7 +367,7 @@ async function runSkillsInstallWithLease(input) {
|
|
|
367
367
|
throw new Error("Could not install the current Deepline skills.");
|
|
368
368
|
}
|
|
369
369
|
} catch (error) {
|
|
370
|
-
|
|
370
|
+
_chunkFVA6XLRAjs.printCommandEnvelope.call(void 0,
|
|
371
371
|
{
|
|
372
372
|
ok: false,
|
|
373
373
|
status: "failed",
|
|
@@ -406,7 +406,7 @@ async function runSkillsInstallWithLease(input) {
|
|
|
406
406
|
{
|
|
407
407
|
schemaVersion: 1,
|
|
408
408
|
installedAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
409
|
-
cliVersion:
|
|
409
|
+
cliVersion: _chunkWTVTCSPYjs.SDK_VERSION,
|
|
410
410
|
scope,
|
|
411
411
|
agents,
|
|
412
412
|
skillsVersion: plan.version,
|
|
@@ -419,9 +419,9 @@ async function runSkillsInstallWithLease(input) {
|
|
|
419
419
|
"utf8"
|
|
420
420
|
);
|
|
421
421
|
if (scope === "global") {
|
|
422
|
-
|
|
422
|
+
_chunkH3QDLCRTjs.clearFailedAutomaticSkillsSync.call(void 0, baseUrl, agents);
|
|
423
423
|
}
|
|
424
|
-
|
|
424
|
+
_chunkFVA6XLRAjs.printCommandEnvelope.call(void 0,
|
|
425
425
|
{
|
|
426
426
|
ok: true,
|
|
427
427
|
status: "complete",
|
|
@@ -452,7 +452,7 @@ function registerSkillsCommand(program) {
|
|
|
452
452
|
"after",
|
|
453
453
|
`
|
|
454
454
|
Notes:
|
|
455
|
-
This command reinstalls current Deepline-managed skills using ${
|
|
455
|
+
This command reinstalls current Deepline-managed skills using ${_chunkH3QDLCRTjs.SKILLS_NPX_PACKAGE},
|
|
456
456
|
then removes legacy Deepline skill names. Local scope writes into the resolved
|
|
457
457
|
persistent project.
|
|
458
458
|
|
|
@@ -464,13 +464,13 @@ Examples:
|
|
|
464
464
|
).action(async (options) => {
|
|
465
465
|
process.exitCode = await runSkillsCommand(options);
|
|
466
466
|
});
|
|
467
|
-
program.command(
|
|
467
|
+
program.command(_chunkH3QDLCRTjs.SKILLS_AUTO_SYNC_COMMAND, { hidden: true }).description("Refresh Deepline agent skills in the background.").option(
|
|
468
468
|
"--claim <token>",
|
|
469
469
|
"Owner token of the leases this child was started for."
|
|
470
470
|
).action(async (options) => {
|
|
471
471
|
const claim = _optionalChain([options, 'access', _ => _.claim, 'optionalAccess', _2 => _2.trim, 'call', _3 => _3()]);
|
|
472
472
|
if (!claim) {
|
|
473
|
-
|
|
473
|
+
_chunkFVA6XLRAjs.printCommandEnvelope.call(void 0,
|
|
474
474
|
{
|
|
475
475
|
ok: false,
|
|
476
476
|
status: "failed",
|
|
@@ -483,7 +483,7 @@ Examples:
|
|
|
483
483
|
process.exitCode = 2;
|
|
484
484
|
return;
|
|
485
485
|
}
|
|
486
|
-
await
|
|
486
|
+
await _chunkH3QDLCRTjs.syncSdkSkillsIfNeeded.call(void 0, _chunkSHGBHP6Jjs.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, ""), {
|
|
487
487
|
mode: "inline",
|
|
488
488
|
notices: "defer",
|
|
489
489
|
claim
|
|
@@ -16,12 +16,12 @@ var _chunkXNYIZMNQjs = require('./chunk-XNYIZMNQ.js');
|
|
|
16
16
|
var _chunkDIAWYWT5js = require('./chunk-DIAWYWT5.js');
|
|
17
17
|
|
|
18
18
|
|
|
19
|
-
var
|
|
19
|
+
var _chunk3ZGSR6X7js = require('./chunk-3ZGSR6X7.js');
|
|
20
20
|
|
|
21
21
|
// src/version.ts
|
|
22
|
-
var SDK_VERSION =
|
|
23
|
-
var SDK_API_MAJOR =
|
|
24
|
-
var SDK_API_CONTRACT = _nullishCoalesce(
|
|
22
|
+
var SDK_VERSION = _chunk3ZGSR6X7js.SDK_RELEASE.version;
|
|
23
|
+
var SDK_API_MAJOR = _chunk3ZGSR6X7js.SDK_RELEASE.contracts.api.currentMajor;
|
|
24
|
+
var SDK_API_CONTRACT = _nullishCoalesce(_chunk3ZGSR6X7js.SDK_RELEASE.contracts.api.legacyWireIds[0], () => ( `api-v${SDK_API_MAJOR}`));
|
|
25
25
|
|
|
26
26
|
// src/agent-runtime.ts
|
|
27
27
|
var _os = require('os');
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _chunkFVA6XLRAjs = require('./chunk-FVA6XLRA.js');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
@@ -22,12 +22,12 @@ var _chunkHOFXQYRFjs = require('./chunk-HOFXQYRF.js');
|
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
|
|
25
|
-
var
|
|
25
|
+
var _chunkSHGBHP6Jjs = require('./chunk-SHGBHP6J.js');
|
|
26
26
|
|
|
27
27
|
|
|
28
28
|
|
|
29
29
|
|
|
30
|
-
var
|
|
30
|
+
var _chunkWTVTCSPYjs = require('./chunk-WTVTCSPY.js');
|
|
31
31
|
|
|
32
32
|
// src/cli/commands/auth.ts
|
|
33
33
|
|
|
@@ -54,7 +54,7 @@ function statusBannerLine(value) {
|
|
|
54
54
|
return `Service notice: ${banner.message}`;
|
|
55
55
|
}
|
|
56
56
|
function envFilePath(baseUrl) {
|
|
57
|
-
return
|
|
57
|
+
return _chunkSHGBHP6Jjs.hostEnvFilePath.call(void 0, baseUrl);
|
|
58
58
|
}
|
|
59
59
|
function normalizeAuthScope(value) {
|
|
60
60
|
if (!value || value === "global") return "global";
|
|
@@ -67,7 +67,7 @@ function parseAuthScope(args) {
|
|
|
67
67
|
}
|
|
68
68
|
function pendingClaimPath(baseUrl, scope) {
|
|
69
69
|
if (scope === "folder") {
|
|
70
|
-
const target =
|
|
70
|
+
const target = _chunkSHGBHP6Jjs.resolveProjectPinTarget.call(void 0, );
|
|
71
71
|
if (!target.ok) {
|
|
72
72
|
throw new Error(
|
|
73
73
|
`Cowork project folder is ambiguous. Candidate folders: ${target.candidates.join(
|
|
@@ -77,10 +77,10 @@ function pendingClaimPath(baseUrl, scope) {
|
|
|
77
77
|
}
|
|
78
78
|
return _path.join.call(void 0, target.dir, ".deepline", "setup", "pending-auth.json");
|
|
79
79
|
}
|
|
80
|
-
return `${
|
|
80
|
+
return `${_chunkSHGBHP6Jjs.hostConfigDirPath.call(void 0, baseUrl)}/pending-auth.json`;
|
|
81
81
|
}
|
|
82
82
|
function legacyPendingClaimTokenPath(baseUrl) {
|
|
83
|
-
return `${
|
|
83
|
+
return `${_chunkSHGBHP6Jjs.hostConfigDirPath.call(void 0, baseUrl)}/pending-claim-token`;
|
|
84
84
|
}
|
|
85
85
|
function savePendingClaim(baseUrl, claim) {
|
|
86
86
|
const filePath = pendingClaimPath(baseUrl, claim.scope);
|
|
@@ -182,21 +182,21 @@ function parseRegisterWaitMode(args) {
|
|
|
182
182
|
function shouldWaitForRegisterClaim(mode) {
|
|
183
183
|
if (mode === "yes") return true;
|
|
184
184
|
if (mode === "no") return false;
|
|
185
|
-
return
|
|
185
|
+
return _chunkWTVTCSPYjs.detectAgentRuntime.call(void 0, ) !== "claude_cowork";
|
|
186
186
|
}
|
|
187
187
|
function saveEnvValues(values, baseUrl, scope) {
|
|
188
188
|
const filtered = {
|
|
189
|
-
...values[
|
|
190
|
-
...values[
|
|
191
|
-
...values[
|
|
192
|
-
...Object.prototype.hasOwnProperty.call(values,
|
|
189
|
+
...values[_chunkSHGBHP6Jjs.HOST_URL_ENV] ? { [_chunkSHGBHP6Jjs.HOST_URL_ENV]: values[_chunkSHGBHP6Jjs.HOST_URL_ENV] } : {},
|
|
190
|
+
...values[_chunkSHGBHP6Jjs.API_KEY_ENV] ? { [_chunkSHGBHP6Jjs.API_KEY_ENV]: values[_chunkSHGBHP6Jjs.API_KEY_ENV] } : {},
|
|
191
|
+
...values[_chunkSHGBHP6Jjs.ACTIVE_ORG_ID_ENV] ? { [_chunkSHGBHP6Jjs.ACTIVE_ORG_ID_ENV]: values[_chunkSHGBHP6Jjs.ACTIVE_ORG_ID_ENV] } : {},
|
|
192
|
+
...Object.prototype.hasOwnProperty.call(values, _chunkSHGBHP6Jjs.ACTIVE_ORG_NAME_ENV) ? { [_chunkSHGBHP6Jjs.ACTIVE_ORG_NAME_ENV]: values[_chunkSHGBHP6Jjs.ACTIVE_ORG_NAME_ENV] } : {},
|
|
193
193
|
// An explicit empty list must reach the store: it clears a stale line.
|
|
194
|
-
...Object.prototype.hasOwnProperty.call(values,
|
|
194
|
+
...Object.prototype.hasOwnProperty.call(values, _chunkSHGBHP6Jjs.FEATURES_ENV) ? { [_chunkSHGBHP6Jjs.FEATURES_ENV]: values[_chunkSHGBHP6Jjs.FEATURES_ENV] } : {}
|
|
195
195
|
};
|
|
196
196
|
if (scope === "folder") {
|
|
197
|
-
|
|
197
|
+
_chunkSHGBHP6Jjs.saveProjectDeeplineEnvValues.call(void 0, filtered);
|
|
198
198
|
} else {
|
|
199
|
-
|
|
199
|
+
_chunkSHGBHP6Jjs.saveHostEnvValues.call(void 0, baseUrl, filtered);
|
|
200
200
|
}
|
|
201
201
|
}
|
|
202
202
|
function activeOrgEnvValues(data) {
|
|
@@ -204,21 +204,21 @@ function activeOrgEnvValues(data) {
|
|
|
204
204
|
if (!orgId) return {};
|
|
205
205
|
const orgName = typeof data.org_name === "string" ? data.org_name.trim() : "";
|
|
206
206
|
return {
|
|
207
|
-
[
|
|
208
|
-
[
|
|
209
|
-
...
|
|
207
|
+
[_chunkSHGBHP6Jjs.ACTIVE_ORG_ID_ENV]: orgId,
|
|
208
|
+
[_chunkSHGBHP6Jjs.ACTIVE_ORG_NAME_ENV]: orgName,
|
|
209
|
+
..._chunkSHGBHP6Jjs.featureEnvValues.call(void 0, data)
|
|
210
210
|
};
|
|
211
211
|
}
|
|
212
212
|
async function httpJson(method, url, apiKey, body, timeoutMs = AUTH_HTTP_TIMEOUT_MS) {
|
|
213
213
|
const headers = {
|
|
214
214
|
"Content-Type": "application/json",
|
|
215
|
-
"User-Agent": `deepline-ts-sdk/${
|
|
215
|
+
"User-Agent": `deepline-ts-sdk/${_chunkWTVTCSPYjs.SDK_VERSION}`,
|
|
216
216
|
"X-Deepline-Client-Family": "sdk",
|
|
217
217
|
"X-Deepline-CLI-Family": "sdk",
|
|
218
|
-
"X-Deepline-Agent-Runtime":
|
|
219
|
-
"X-Deepline-CLI-Version":
|
|
220
|
-
"X-Deepline-SDK-Version":
|
|
221
|
-
"X-Deepline-API-Contract":
|
|
218
|
+
"X-Deepline-Agent-Runtime": _chunkWTVTCSPYjs.detectAgentRuntime.call(void 0, ),
|
|
219
|
+
"X-Deepline-CLI-Version": _chunkWTVTCSPYjs.SDK_VERSION,
|
|
220
|
+
"X-Deepline-SDK-Version": _chunkWTVTCSPYjs.SDK_VERSION,
|
|
221
|
+
"X-Deepline-API-Contract": _chunkWTVTCSPYjs.SDK_API_CONTRACT
|
|
222
222
|
};
|
|
223
223
|
if (apiKey) headers["Authorization"] = `Bearer ${apiKey}`;
|
|
224
224
|
const bypassToken = _optionalChain([process, 'access', _7 => _7.env, 'access', _8 => _8.VERCEL_PROTECTION_BYPASS_TOKEN, 'optionalAccess', _9 => _9.trim, 'call', _10 => _10()]);
|
|
@@ -264,7 +264,7 @@ async function readStatusBanner(baseUrl) {
|
|
|
264
264
|
return _optionalChain([response, 'optionalAccess', _11 => _11.status]) === 200 ? _nullishCoalesce(response.data.banner, () => ( null)) : null;
|
|
265
265
|
}
|
|
266
266
|
async function reportSetupCompleted(input) {
|
|
267
|
-
const apiKey = input.authScope === "folder" ?
|
|
267
|
+
const apiKey = input.authScope === "folder" ? _chunkSHGBHP6Jjs.resolveProjectApiKeyForBaseUrl.call(void 0, input.baseUrl) : _chunkSHGBHP6Jjs.resolveGlobalApiKeyForBaseUrl.call(void 0, input.baseUrl);
|
|
268
268
|
if (!apiKey) return;
|
|
269
269
|
try {
|
|
270
270
|
await httpJson(
|
|
@@ -361,7 +361,7 @@ async function printClaimSuccessBanner(baseUrl, apiKey, statusData) {
|
|
|
361
361
|
}
|
|
362
362
|
}
|
|
363
363
|
async function handleRegister(args) {
|
|
364
|
-
const baseUrl =
|
|
364
|
+
const baseUrl = _chunkSHGBHP6Jjs.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, "");
|
|
365
365
|
let orgName = "";
|
|
366
366
|
let orgId = "";
|
|
367
367
|
let agentName = "";
|
|
@@ -416,19 +416,19 @@ async function handleRegister(args) {
|
|
|
416
416
|
});
|
|
417
417
|
saveEnvValues(
|
|
418
418
|
{
|
|
419
|
-
[
|
|
419
|
+
[_chunkSHGBHP6Jjs.HOST_URL_ENV]: baseUrl
|
|
420
420
|
},
|
|
421
421
|
baseUrl,
|
|
422
422
|
authScope
|
|
423
423
|
);
|
|
424
424
|
}
|
|
425
425
|
if (claimUrl) {
|
|
426
|
-
const shouldOpen = waitMode !== "no" &&
|
|
426
|
+
const shouldOpen = waitMode !== "no" && _chunkWTVTCSPYjs.detectAgentRuntime.call(void 0, ) !== "claude_cowork";
|
|
427
427
|
console.log(
|
|
428
428
|
shouldOpen ? " Opening approval page in your browser." : " Open this approval page in your browser:"
|
|
429
429
|
);
|
|
430
430
|
console.log(` ${claimUrl}`);
|
|
431
|
-
if (shouldOpen)
|
|
431
|
+
if (shouldOpen) _chunkFVA6XLRAjs.openInBrowser.call(void 0, claimUrl);
|
|
432
432
|
}
|
|
433
433
|
if (data.cli_message) {
|
|
434
434
|
console.log(String(data.cli_message));
|
|
@@ -471,8 +471,8 @@ async function handleRegister(args) {
|
|
|
471
471
|
if (apiKey) {
|
|
472
472
|
saveEnvValues(
|
|
473
473
|
{
|
|
474
|
-
[
|
|
475
|
-
[
|
|
474
|
+
[_chunkSHGBHP6Jjs.HOST_URL_ENV]: baseUrl,
|
|
475
|
+
[_chunkSHGBHP6Jjs.API_KEY_ENV]: apiKey,
|
|
476
476
|
...activeOrgEnvValues(statusData)
|
|
477
477
|
},
|
|
478
478
|
baseUrl,
|
|
@@ -494,7 +494,7 @@ async function handleRegister(args) {
|
|
|
494
494
|
}
|
|
495
495
|
}
|
|
496
496
|
async function handleWait(args) {
|
|
497
|
-
const baseUrl =
|
|
497
|
+
const baseUrl = _chunkSHGBHP6Jjs.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, "");
|
|
498
498
|
let timeoutSeconds = 300;
|
|
499
499
|
let requestedScope;
|
|
500
500
|
if (args.includes("--auth-scope")) {
|
|
@@ -518,7 +518,7 @@ async function handleWait(args) {
|
|
|
518
518
|
const authScope = resumed.scope;
|
|
519
519
|
const claimToken = _nullishCoalesce(_optionalChain([pendingClaim, 'optionalAccess', _12 => _12.claimToken]), () => ( ""));
|
|
520
520
|
if (!pendingClaim) {
|
|
521
|
-
const scopedApiKey = authScope === "folder" ?
|
|
521
|
+
const scopedApiKey = authScope === "folder" ? _chunkSHGBHP6Jjs.resolveProjectApiKeyForBaseUrl.call(void 0, baseUrl) : _chunkSHGBHP6Jjs.resolveGlobalApiKeyForBaseUrl.call(void 0, baseUrl);
|
|
522
522
|
if (scopedApiKey) {
|
|
523
523
|
console.log("Already connected.");
|
|
524
524
|
return EXIT_OK;
|
|
@@ -561,8 +561,8 @@ async function handleWait(args) {
|
|
|
561
561
|
if (apiKey) {
|
|
562
562
|
saveEnvValues(
|
|
563
563
|
{
|
|
564
|
-
[
|
|
565
|
-
[
|
|
564
|
+
[_chunkSHGBHP6Jjs.HOST_URL_ENV]: baseUrl,
|
|
565
|
+
[_chunkSHGBHP6Jjs.API_KEY_ENV]: apiKey,
|
|
566
566
|
...activeOrgEnvValues(data)
|
|
567
567
|
},
|
|
568
568
|
baseUrl,
|
|
@@ -586,8 +586,8 @@ async function handleWait(args) {
|
|
|
586
586
|
return EXIT_AUTH;
|
|
587
587
|
}
|
|
588
588
|
async function authStatusLine(timeoutMs = 3e3) {
|
|
589
|
-
const baseUrl =
|
|
590
|
-
const apiKey =
|
|
589
|
+
const baseUrl = _chunkSHGBHP6Jjs.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, "");
|
|
590
|
+
const apiKey = _chunkSHGBHP6Jjs.resolveApiKeyForBaseUrl.call(void 0, baseUrl);
|
|
591
591
|
if (!apiKey) return `Auth: not connected (${baseUrl})`;
|
|
592
592
|
try {
|
|
593
593
|
const { status, data } = await httpJson(
|
|
@@ -610,9 +610,9 @@ async function authStatusLine(timeoutMs = 3e3) {
|
|
|
610
610
|
}
|
|
611
611
|
}
|
|
612
612
|
async function handleStatus(args) {
|
|
613
|
-
const baseUrl =
|
|
613
|
+
const baseUrl = _chunkSHGBHP6Jjs.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, "");
|
|
614
614
|
const reveal = args.includes("--reveal");
|
|
615
|
-
const jsonOutput =
|
|
615
|
+
const jsonOutput = _chunkFVA6XLRAjs.argsWantJson.call(void 0, args);
|
|
616
616
|
const hasExplicitAuthScope = args.includes("--auth-scope");
|
|
617
617
|
let authScope = null;
|
|
618
618
|
if (hasExplicitAuthScope) {
|
|
@@ -653,14 +653,14 @@ async function handleStatus(args) {
|
|
|
653
653
|
};
|
|
654
654
|
hostLines.push(`Host: ${baseUrl} (unreachable)`);
|
|
655
655
|
}
|
|
656
|
-
const apiKey = authScope === "folder" ?
|
|
656
|
+
const apiKey = authScope === "folder" ? _chunkSHGBHP6Jjs.resolveProjectApiKeyForBaseUrl.call(void 0, baseUrl) : authScope === "global" ? _chunkSHGBHP6Jjs.resolveGlobalApiKeyForBaseUrl.call(void 0, baseUrl) : _chunkSHGBHP6Jjs.resolveApiKeyForBaseUrl.call(void 0, baseUrl);
|
|
657
657
|
if (!apiKey) {
|
|
658
658
|
const { claim: pendingClaim } = resolvePendingAuthClaimForResume(
|
|
659
659
|
baseUrl,
|
|
660
660
|
_nullishCoalesce(authScope, () => ( void 0))
|
|
661
661
|
);
|
|
662
662
|
if (pendingClaim) {
|
|
663
|
-
|
|
663
|
+
_chunkFVA6XLRAjs.printCommandEnvelope.call(void 0,
|
|
664
664
|
{
|
|
665
665
|
..._nullishCoalesce(hostStatusPayload, () => ( { host: baseUrl })),
|
|
666
666
|
status: "pending",
|
|
@@ -681,7 +681,7 @@ async function handleStatus(args) {
|
|
|
681
681
|
);
|
|
682
682
|
return EXIT_OK;
|
|
683
683
|
}
|
|
684
|
-
|
|
684
|
+
_chunkFVA6XLRAjs.printCommandEnvelope.call(void 0,
|
|
685
685
|
{
|
|
686
686
|
..._nullishCoalesce(hostStatusPayload, () => ( { host: baseUrl })),
|
|
687
687
|
status: "not connected",
|
|
@@ -714,7 +714,7 @@ async function handleStatus(args) {
|
|
|
714
714
|
}
|
|
715
715
|
);
|
|
716
716
|
if (status === 401 || status === 403) {
|
|
717
|
-
|
|
717
|
+
_chunkFVA6XLRAjs.printCommandEnvelope.call(void 0,
|
|
718
718
|
{
|
|
719
719
|
..._nullishCoalesce(hostStatusPayload, () => ( { host: baseUrl })),
|
|
720
720
|
status: "unauthorized",
|
|
@@ -741,7 +741,7 @@ async function handleStatus(args) {
|
|
|
741
741
|
console.error(`Auth status error (status ${status}).`);
|
|
742
742
|
return EXIT_SERVER;
|
|
743
743
|
}
|
|
744
|
-
const resolvedAuthScope = _nullishCoalesce(authScope, () => ( (
|
|
744
|
+
const resolvedAuthScope = _nullishCoalesce(authScope, () => ( (_chunkSHGBHP6Jjs.getResolvedProjectAuthSource.call(void 0, baseUrl, apiKey) ? "folder" : "global")));
|
|
745
745
|
clearSatisfiedPendingClaim(
|
|
746
746
|
baseUrl,
|
|
747
747
|
resolvedAuthScope,
|
|
@@ -769,28 +769,28 @@ async function handleStatus(args) {
|
|
|
769
769
|
if (apiKeyResp) {
|
|
770
770
|
saveEnvValues(
|
|
771
771
|
{
|
|
772
|
-
[
|
|
773
|
-
[
|
|
772
|
+
[_chunkSHGBHP6Jjs.HOST_URL_ENV]: baseUrl,
|
|
773
|
+
[_chunkSHGBHP6Jjs.API_KEY_ENV]: apiKeyResp,
|
|
774
774
|
...activeOrgEnvValues(data)
|
|
775
775
|
},
|
|
776
776
|
baseUrl,
|
|
777
777
|
resolvedAuthScope
|
|
778
778
|
);
|
|
779
779
|
if (resolvedAuthScope === "folder") {
|
|
780
|
-
const target =
|
|
780
|
+
const target = _chunkSHGBHP6Jjs.resolveProjectPinTarget.call(void 0, );
|
|
781
781
|
savedApiKeyPath = target.ok ? _path.join.call(void 0, target.dir, ".env.deepline") : null;
|
|
782
782
|
} else {
|
|
783
783
|
savedApiKeyPath = envFilePath(baseUrl);
|
|
784
784
|
}
|
|
785
785
|
}
|
|
786
|
-
} else if (resolvedAuthScope === "folder" ||
|
|
787
|
-
saveEnvValues(
|
|
786
|
+
} else if (resolvedAuthScope === "folder" || _chunkSHGBHP6Jjs.storedHostApiKey.call(void 0, baseUrl) === apiKey) {
|
|
787
|
+
saveEnvValues(_chunkSHGBHP6Jjs.featureEnvValues.call(void 0, data), baseUrl, resolvedAuthScope);
|
|
788
788
|
}
|
|
789
|
-
|
|
789
|
+
_chunkFVA6XLRAjs.printCommandEnvelope.call(void 0,
|
|
790
790
|
{
|
|
791
791
|
...payload,
|
|
792
|
-
...
|
|
793
|
-
command_context:
|
|
792
|
+
..._chunkWTVTCSPYjs.detectAgentRuntime.call(void 0, ) !== "unknown" ? {
|
|
793
|
+
command_context: _chunkSHGBHP6Jjs.resolveCliCommandContext.call(void 0,
|
|
794
794
|
{ baseUrl, apiKey },
|
|
795
795
|
resolvedAuthScope
|
|
796
796
|
)
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
var _chunkVLEVVDWGjs = require('./chunk-VLEVVDWG.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkC6EGT3LOjs = require('./chunk-C6EGT3LO.js');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
var _chunkJKVRBCZLjs = require('./chunk-JKVRBCZL.js');
|
|
@@ -11,7 +11,7 @@ var _chunkJKVRBCZLjs = require('./chunk-JKVRBCZL.js');
|
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _chunkFVA6XLRAjs = require('./chunk-FVA6XLRA.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 = _chunkFVA6XLRAjs.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 ? _chunkFVA6XLRAjs.argsWantJson.call(void 0, args) : watch ? args.includes("--json") : _chunkFVA6XLRAjs.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 = _chunkC6EGT3LOjs.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 : _chunkC6EGT3LOjs.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 : _chunkFVA6XLRAjs.parseJsonFields.call(void 0,
|
|
990
|
+
[...fullJson ? ["--full"] : [], ..._chunkFVA6XLRAjs.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 || _chunkFVA6XLRAjs.argsWantJson.call(void 0, []) : explicitJson;
|
|
996
996
|
const verboseLogs = Boolean(
|
|
997
997
|
debugAlias || logLevel === "debug" || debugMapLatency
|
|
998
998
|
);
|