deepline 0.3.442 → 0.3.444
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 +1 -1
- package/dist/bundling-sources/sdk/src/types.ts +4 -0
- package/dist/bundling-sources/shared_libs/play-runtime/app-runtime-api.ts +27 -6
- package/dist/bundling-sources/shared_libs/play-runtime/gateway-postgres-admission.ts +153 -31
- package/dist/bundling-sources/shared_libs/play-runtime/governor/app-runtime-rate-state-backend.ts +32 -0
- package/dist/bundling-sources/shared_libs/product-notifications/catalog.ts +34 -21
- package/dist/bundling-sources/shared_libs/product-notifications/default-policy.ts +1 -1
- package/dist/bundling-sources/shared_libs/product-notifications/events.ts +11 -0
- package/dist/cli/auth-KWVGTCBU.js +40 -0
- package/dist/cli/{auth-CUZJMTNS.mjs → auth-XTFEJXCK.mjs} +4 -4
- package/dist/cli/{billing-W2U5VKFI.js → billing-37ATIT7G.js} +73 -73
- package/dist/cli/{billing-SWH3WAMC.mjs → billing-3RZZWNAR.mjs} +4 -4
- package/dist/cli/{chunk-L3JU24MF.js → chunk-2Y3YBOS4.js} +11 -8
- package/dist/cli/{chunk-D7IDBZDR.js → chunk-53HWKCD3.js} +8 -8
- package/dist/cli/{chunk-SZUU2WTZ.js → chunk-7J4VZRO5.js} +1 -1
- package/dist/cli/{chunk-RWK35AB3.js → chunk-7VAQZERC.js} +6 -6
- package/dist/cli/{chunk-L2FWEP4G.mjs → chunk-A5LNESLL.mjs} +4 -4
- package/dist/cli/{chunk-7BH4ZOWE.js → chunk-AFFH22ER.js} +2 -2
- package/dist/cli/{chunk-P4GMPKMW.mjs → chunk-AJ54W32A.mjs} +1 -1
- package/dist/cli/{chunk-KKTRHDLN.mjs → chunk-C4CG252T.mjs} +3 -3
- package/dist/cli/{chunk-AR5YQQF5.mjs → chunk-CGVTZKKZ.mjs} +2 -2
- package/dist/cli/{chunk-2GNX6SCO.mjs → chunk-CO3S56DX.mjs} +7 -2
- package/dist/cli/{chunk-NBFXQCWM.js → chunk-EPK465ZH.js} +8 -8
- package/dist/cli/{chunk-KPKU53YO.mjs → chunk-FKAHVFPJ.mjs} +1 -1
- package/dist/cli/{chunk-D5IOUCJS.js → chunk-FS7TP7F2.js} +52 -52
- package/dist/cli/{chunk-ODWSTSRJ.mjs → chunk-GYLEMRHP.mjs} +5 -5
- package/dist/cli/{chunk-6YWIRIOI.mjs → chunk-HPBZAYSS.mjs} +2 -2
- package/dist/cli/{chunk-DM6Q634K.js → chunk-HTAXXY66.js} +7 -2
- package/dist/cli/{chunk-SKXQZUMX.mjs → chunk-HU6PIQDF.mjs} +2 -2
- package/dist/cli/{chunk-5ZQEDZDQ.mjs → chunk-J6NVL526.mjs} +1 -1
- package/dist/cli/{chunk-GEHYAQSI.mjs → chunk-JD7GAMDF.mjs} +2 -2
- package/dist/cli/{chunk-C4WXHMKN.js → chunk-JMARKXIB.js} +2 -2
- package/dist/cli/{chunk-GEQOPXOS.js → chunk-KNAKCMGJ.js} +17 -17
- package/dist/cli/{chunk-VUYUI35Q.js → chunk-LRNYRGCN.js} +20 -11
- package/dist/cli/{chunk-O765GAOA.mjs → chunk-LS32ZMEI.mjs} +15 -11
- package/dist/cli/{chunk-WY4W6PRD.mjs → chunk-LUGZDR4E.mjs} +3 -3
- package/dist/cli/{chunk-TP4TMEML.mjs → chunk-MBCQHTXT.mjs} +4 -1
- package/dist/cli/{chunk-77DW6WSO.js → chunk-OCYDAMHG.js} +249 -245
- package/dist/cli/{chunk-LCT6MTYQ.js → chunk-OTHCIRIC.js} +50 -50
- package/dist/cli/{chunk-RR2LZVRA.js → chunk-OZT66JBQ.js} +35 -35
- package/dist/cli/{chunk-GXOQRZXG.js → chunk-PP66EATA.js} +2 -2
- package/dist/cli/{chunk-R2QWSSAG.js → chunk-QFXPA2E4.js} +7 -7
- package/dist/cli/{chunk-SOCWFREM.js → chunk-QR3SSTAE.js} +10 -10
- package/dist/cli/{chunk-HYJKJJUM.js → chunk-RNM7JYV6.js} +20 -20
- package/dist/cli/{chunk-VLQWLPQU.mjs → chunk-RVM54NYN.mjs} +1 -1
- package/dist/cli/{chunk-SMM2EKDC.mjs → chunk-VAQYDKRH.mjs} +1 -1
- package/dist/cli/{chunk-7ICMVQL5.mjs → chunk-VHVZVLV7.mjs} +1 -1
- package/dist/cli/{chunk-YGMUSZLV.mjs → chunk-VJUFRXFU.mjs} +3 -3
- package/dist/cli/{chunk-2JHQ24IT.js → chunk-VVJWB47B.js} +16 -16
- package/dist/cli/{chunk-MLJBCS3E.mjs → chunk-W25OALCJ.mjs} +10 -1
- package/dist/cli/{chunk-LXTSVUZN.mjs → chunk-WQPJQEDE.mjs} +1 -1
- package/dist/cli/{chunk-K2DHO3IM.js → chunk-WYWZZZ2Q.js} +26 -26
- package/dist/cli/{chunk-DUUY2JKP.mjs → chunk-X4YO4AXG.mjs} +2 -2
- package/dist/cli/{chunk-2GVUZA6C.js → chunk-YIFQGY5A.js} +4 -4
- package/dist/cli/command-docs.js +2 -2
- package/dist/cli/command-docs.mjs +1 -1
- package/dist/cli/{csv-C5Z4OZQN.js → csv-EIJQ6RT5.js} +12 -12
- package/dist/cli/{csv-HSR32EPA.mjs → csv-HA2HOVSY.mjs} +3 -3
- package/dist/cli/{db-AK4ZYYRP.js → db-V3QK6J3D.js} +25 -25
- package/dist/cli/{db-JJGI4J5I.mjs → db-X4YIZUGS.mjs} +4 -4
- package/dist/cli/{describe-JVSD6F2G.js → describe-AM3JLWNF.js} +24 -24
- package/dist/cli/{describe-C35MTKF4.mjs → describe-MSL3BOWA.mjs} +16 -16
- package/dist/cli/describe-core.d.mts +1 -1
- package/dist/cli/describe-core.d.ts +1 -1
- package/dist/cli/describe-core.js +4 -4
- package/dist/cli/describe-core.mjs +3 -3
- package/dist/cli/{executions-ZECDB4NA.mjs → executions-EGH4NDY5.mjs} +4 -4
- package/dist/cli/{executions-ZEA7O4PX.js → executions-QFQVDHSS.js} +6 -6
- package/dist/cli/{feedback-WQC4SX75.js → feedback-77DLEOWO.js} +7 -7
- package/dist/cli/{feedback-W7UL4V47.mjs → feedback-RQLOXTWK.mjs} +3 -3
- package/dist/cli/git-OIDNWUNY.js +24 -0
- package/dist/cli/{git-QBB7LEAV.mjs → git-ZRSKT7ML.mjs} +4 -4
- package/dist/cli/index.js +135 -135
- package/dist/cli/index.mjs +37 -37
- package/dist/cli/{legacy-noops-E5NFHPKQ.mjs → legacy-noops-QNQCSKJV.mjs} +4 -4
- package/dist/cli/{legacy-noops-2QPJTEF4.js → legacy-noops-Y3ZMVJSZ.js} +7 -7
- package/dist/cli/{monitors-MWBA46VZ.js → monitors-4RY75IKZ.js} +84 -84
- package/dist/cli/{monitors-E56RLT6N.mjs → monitors-VEFE3ZSZ.mjs} +4 -4
- package/dist/cli/{org-KE2DDK5A.mjs → org-X6ZD3GOS.mjs} +4 -4
- package/dist/cli/{org-HGIWXACI.js → org-YOT76AE4.js} +66 -66
- package/dist/cli/{play-WO5UXBZM.js → play-7XEA7F7Y.js} +296 -296
- package/dist/cli/{play-LGTF4IYG.mjs → play-AXDXVYTK.mjs} +12 -12
- package/dist/cli/{providers-AIJPT54M.js → providers-CS3UWBH5.js} +7 -7
- package/dist/cli/{providers-77KQS23B.mjs → providers-JKYTNJDM.mjs} +4 -4
- package/dist/cli/{quickstart-EFMHLU4T.mjs → quickstart-BHATVOX5.mjs} +3 -3
- package/dist/cli/{quickstart-CZQFBJVH.js → quickstart-R2PI3T74.js} +5 -5
- package/dist/cli/{search-U5KEPKNV.mjs → search-46CJMKQ7.mjs} +5 -5
- package/dist/cli/search-CNDIFIZG.js +30 -0
- package/dist/cli/{secrets-JYHZIRO4.mjs → secrets-I2VZ75XW.mjs} +4 -4
- package/dist/cli/{secrets-CBBR73U4.js → secrets-NCBNWNNK.js} +13 -13
- package/dist/cli/{sessions-XA2EZDXD.js → sessions-SFZPFEXX.js} +5 -5
- package/dist/cli/{sessions-T74U74J7.mjs → sessions-UCMJTFYV.mjs} +4 -4
- package/dist/cli/{settings-C45BH4CU.mjs → settings-AJ2FOCRS.mjs} +8 -8
- package/dist/cli/{settings-ND4437UB.js → settings-N6CUAM55.js} +75 -75
- package/dist/cli/{setup-FQ7JS4HM.js → setup-DB34HKIL.js} +42 -42
- package/dist/cli/{setup-QDH6FAEZ.mjs → setup-LRWULRUP.mjs} +7 -7
- package/dist/cli/skills-Y7CEDG56.js +29 -0
- package/dist/cli/{skills-ZFSBA754.mjs → skills-Z5TF33TE.mjs} +5 -5
- package/dist/cli/{tools-OVGOFORB.mjs → tools-MOWM5ABI.mjs} +15 -15
- package/dist/cli/tools-RQWYUW3K.js +44 -0
- package/dist/cli/{update-BNU7VX5M.mjs → update-4LXOHDJU.mjs} +7 -7
- package/dist/cli/update-XKRUZQSS.js +31 -0
- package/dist/cli/{workflow-FX6GLQ3H.mjs → workflow-IWVOD4N3.mjs} +5 -5
- package/dist/cli/{workflow-JSSXWU3T.js → workflow-RS57FL5I.js} +15 -15
- package/dist/{client-BqQ7Rb11.d.ts → client-CBitBZpr.d.ts} +15 -3
- package/dist/{client-BCmnJaL9.d.mts → client-CTUbBRgg.d.mts} +15 -3
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +6 -6
- package/dist/index.mjs +3 -3
- package/dist/install-integrity.json +90 -90
- package/dist/plays/play-description.d.mts +1 -1
- package/dist/plays/play-description.d.ts +1 -1
- package/dist/plays/run-request.d.mts +1 -1
- package/dist/plays/run-request.d.ts +1 -1
- 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 +1 -1
- package/dist/cli/auth-HAO2GLGH.js +0 -40
- package/dist/cli/git-E7CXCBZZ.js +0 -24
- package/dist/cli/search-XMNR7CYI.js +0 -30
- package/dist/cli/skills-CSA2YFW6.js +0 -29
- package/dist/cli/tools-GUALRDI7.js +0 -44
- package/dist/cli/update-K4WJSWDB.js +0 -31
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _chunk2Y3YBOS4js = require('./chunk-2Y3YBOS4.js');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
@@ -25,7 +25,7 @@ var _chunkL3JU24MFjs = require('./chunk-L3JU24MF.js');
|
|
|
25
25
|
|
|
26
26
|
|
|
27
27
|
|
|
28
|
-
var
|
|
28
|
+
var _chunkYIFQGY5Ajs = require('./chunk-YIFQGY5A.js');
|
|
29
29
|
|
|
30
30
|
// src/cli/commands/auth.ts
|
|
31
31
|
|
|
@@ -52,7 +52,7 @@ function statusBannerLine(value) {
|
|
|
52
52
|
return `Service notice: ${banner.message}`;
|
|
53
53
|
}
|
|
54
54
|
function envFilePath(baseUrl) {
|
|
55
|
-
return
|
|
55
|
+
return _chunkYIFQGY5Ajs.hostEnvFilePath.call(void 0, baseUrl);
|
|
56
56
|
}
|
|
57
57
|
function normalizeAuthScope(value) {
|
|
58
58
|
if (!value || value === "global") return "global";
|
|
@@ -65,7 +65,7 @@ function parseAuthScope(args) {
|
|
|
65
65
|
}
|
|
66
66
|
function pendingClaimPath(baseUrl, scope) {
|
|
67
67
|
if (scope === "folder") {
|
|
68
|
-
const target =
|
|
68
|
+
const target = _chunkYIFQGY5Ajs.resolveProjectPinTarget.call(void 0, );
|
|
69
69
|
if (!target.ok) {
|
|
70
70
|
throw new Error(
|
|
71
71
|
`Cowork project folder is ambiguous. Candidate folders: ${target.candidates.join(
|
|
@@ -75,10 +75,10 @@ function pendingClaimPath(baseUrl, scope) {
|
|
|
75
75
|
}
|
|
76
76
|
return _path.join.call(void 0, target.dir, ".deepline", "setup", "pending-auth.json");
|
|
77
77
|
}
|
|
78
|
-
return `${
|
|
78
|
+
return `${_chunkYIFQGY5Ajs.hostConfigDirPath.call(void 0, baseUrl)}/pending-auth.json`;
|
|
79
79
|
}
|
|
80
80
|
function legacyPendingClaimTokenPath(baseUrl) {
|
|
81
|
-
return `${
|
|
81
|
+
return `${_chunkYIFQGY5Ajs.hostConfigDirPath.call(void 0, baseUrl)}/pending-claim-token`;
|
|
82
82
|
}
|
|
83
83
|
function savePendingClaim(baseUrl, claim) {
|
|
84
84
|
const filePath = pendingClaimPath(baseUrl, claim.scope);
|
|
@@ -180,21 +180,21 @@ function parseRegisterWaitMode(args) {
|
|
|
180
180
|
function shouldWaitForRegisterClaim(mode) {
|
|
181
181
|
if (mode === "yes") return true;
|
|
182
182
|
if (mode === "no") return false;
|
|
183
|
-
return
|
|
183
|
+
return _chunkYIFQGY5Ajs.detectAgentRuntime.call(void 0, ) !== "claude_cowork";
|
|
184
184
|
}
|
|
185
185
|
function saveEnvValues(values, baseUrl, scope) {
|
|
186
186
|
const filtered = {
|
|
187
|
-
...values[
|
|
188
|
-
...values[
|
|
189
|
-
...values[
|
|
190
|
-
...Object.prototype.hasOwnProperty.call(values,
|
|
187
|
+
...values[_chunkYIFQGY5Ajs.HOST_URL_ENV] ? { [_chunkYIFQGY5Ajs.HOST_URL_ENV]: values[_chunkYIFQGY5Ajs.HOST_URL_ENV] } : {},
|
|
188
|
+
...values[_chunkYIFQGY5Ajs.API_KEY_ENV] ? { [_chunkYIFQGY5Ajs.API_KEY_ENV]: values[_chunkYIFQGY5Ajs.API_KEY_ENV] } : {},
|
|
189
|
+
...values[_chunkYIFQGY5Ajs.ACTIVE_ORG_ID_ENV] ? { [_chunkYIFQGY5Ajs.ACTIVE_ORG_ID_ENV]: values[_chunkYIFQGY5Ajs.ACTIVE_ORG_ID_ENV] } : {},
|
|
190
|
+
...Object.prototype.hasOwnProperty.call(values, _chunkYIFQGY5Ajs.ACTIVE_ORG_NAME_ENV) ? { [_chunkYIFQGY5Ajs.ACTIVE_ORG_NAME_ENV]: values[_chunkYIFQGY5Ajs.ACTIVE_ORG_NAME_ENV] } : {},
|
|
191
191
|
// An explicit empty list must reach the store: it clears a stale line.
|
|
192
|
-
...Object.prototype.hasOwnProperty.call(values,
|
|
192
|
+
...Object.prototype.hasOwnProperty.call(values, _chunkYIFQGY5Ajs.FEATURES_ENV) ? { [_chunkYIFQGY5Ajs.FEATURES_ENV]: values[_chunkYIFQGY5Ajs.FEATURES_ENV] } : {}
|
|
193
193
|
};
|
|
194
194
|
if (scope === "folder") {
|
|
195
|
-
|
|
195
|
+
_chunkYIFQGY5Ajs.saveProjectDeeplineEnvValues.call(void 0, filtered);
|
|
196
196
|
} else {
|
|
197
|
-
|
|
197
|
+
_chunkYIFQGY5Ajs.saveHostEnvValues.call(void 0, baseUrl, filtered);
|
|
198
198
|
}
|
|
199
199
|
}
|
|
200
200
|
function activeOrgEnvValues(data) {
|
|
@@ -202,21 +202,21 @@ function activeOrgEnvValues(data) {
|
|
|
202
202
|
if (!orgId) return {};
|
|
203
203
|
const orgName = typeof data.org_name === "string" ? data.org_name.trim() : "";
|
|
204
204
|
return {
|
|
205
|
-
[
|
|
206
|
-
[
|
|
207
|
-
...
|
|
205
|
+
[_chunkYIFQGY5Ajs.ACTIVE_ORG_ID_ENV]: orgId,
|
|
206
|
+
[_chunkYIFQGY5Ajs.ACTIVE_ORG_NAME_ENV]: orgName,
|
|
207
|
+
..._chunkYIFQGY5Ajs.featureEnvValues.call(void 0, data)
|
|
208
208
|
};
|
|
209
209
|
}
|
|
210
210
|
async function httpJson(method, url, apiKey, body, timeoutMs = AUTH_HTTP_TIMEOUT_MS) {
|
|
211
211
|
const headers = {
|
|
212
212
|
"Content-Type": "application/json",
|
|
213
|
-
"User-Agent": `deepline-ts-sdk/${
|
|
213
|
+
"User-Agent": `deepline-ts-sdk/${_chunkYIFQGY5Ajs.SDK_VERSION}`,
|
|
214
214
|
"X-Deepline-Client-Family": "sdk",
|
|
215
215
|
"X-Deepline-CLI-Family": "sdk",
|
|
216
|
-
"X-Deepline-Agent-Runtime":
|
|
217
|
-
"X-Deepline-CLI-Version":
|
|
218
|
-
"X-Deepline-SDK-Version":
|
|
219
|
-
"X-Deepline-API-Contract":
|
|
216
|
+
"X-Deepline-Agent-Runtime": _chunkYIFQGY5Ajs.detectAgentRuntime.call(void 0, ),
|
|
217
|
+
"X-Deepline-CLI-Version": _chunkYIFQGY5Ajs.SDK_VERSION,
|
|
218
|
+
"X-Deepline-SDK-Version": _chunkYIFQGY5Ajs.SDK_VERSION,
|
|
219
|
+
"X-Deepline-API-Contract": _chunkYIFQGY5Ajs.SDK_API_CONTRACT
|
|
220
220
|
};
|
|
221
221
|
if (apiKey) headers["Authorization"] = `Bearer ${apiKey}`;
|
|
222
222
|
const bypassToken = _optionalChain([process, 'access', _7 => _7.env, 'access', _8 => _8.VERCEL_PROTECTION_BYPASS_TOKEN, 'optionalAccess', _9 => _9.trim, 'call', _10 => _10()]);
|
|
@@ -262,7 +262,7 @@ async function readStatusBanner(baseUrl) {
|
|
|
262
262
|
return _optionalChain([response, 'optionalAccess', _11 => _11.status]) === 200 ? _nullishCoalesce(response.data.banner, () => ( null)) : null;
|
|
263
263
|
}
|
|
264
264
|
async function reportSetupCompleted(input) {
|
|
265
|
-
const apiKey = input.authScope === "folder" ?
|
|
265
|
+
const apiKey = input.authScope === "folder" ? _chunkYIFQGY5Ajs.resolveProjectApiKeyForBaseUrl.call(void 0, input.baseUrl) : _chunkYIFQGY5Ajs.resolveGlobalApiKeyForBaseUrl.call(void 0, input.baseUrl);
|
|
266
266
|
if (!apiKey) return;
|
|
267
267
|
try {
|
|
268
268
|
await httpJson(
|
|
@@ -359,7 +359,7 @@ async function printClaimSuccessBanner(baseUrl, apiKey, statusData) {
|
|
|
359
359
|
}
|
|
360
360
|
}
|
|
361
361
|
async function handleRegister(args) {
|
|
362
|
-
const baseUrl =
|
|
362
|
+
const baseUrl = _chunkYIFQGY5Ajs.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, "");
|
|
363
363
|
let orgName = "";
|
|
364
364
|
let orgId = "";
|
|
365
365
|
let agentName = "";
|
|
@@ -414,19 +414,19 @@ async function handleRegister(args) {
|
|
|
414
414
|
});
|
|
415
415
|
saveEnvValues(
|
|
416
416
|
{
|
|
417
|
-
[
|
|
417
|
+
[_chunkYIFQGY5Ajs.HOST_URL_ENV]: baseUrl
|
|
418
418
|
},
|
|
419
419
|
baseUrl,
|
|
420
420
|
authScope
|
|
421
421
|
);
|
|
422
422
|
}
|
|
423
423
|
if (claimUrl) {
|
|
424
|
-
const shouldOpen = waitMode !== "no" &&
|
|
424
|
+
const shouldOpen = waitMode !== "no" && _chunkYIFQGY5Ajs.detectAgentRuntime.call(void 0, ) !== "claude_cowork";
|
|
425
425
|
console.log(
|
|
426
426
|
shouldOpen ? " Opening approval page in your browser." : " Open this approval page in your browser:"
|
|
427
427
|
);
|
|
428
428
|
console.log(` ${claimUrl}`);
|
|
429
|
-
if (shouldOpen)
|
|
429
|
+
if (shouldOpen) _chunk2Y3YBOS4js.openInBrowser.call(void 0, claimUrl);
|
|
430
430
|
}
|
|
431
431
|
if (data.cli_message) {
|
|
432
432
|
console.log(String(data.cli_message));
|
|
@@ -469,8 +469,8 @@ async function handleRegister(args) {
|
|
|
469
469
|
if (apiKey) {
|
|
470
470
|
saveEnvValues(
|
|
471
471
|
{
|
|
472
|
-
[
|
|
473
|
-
[
|
|
472
|
+
[_chunkYIFQGY5Ajs.HOST_URL_ENV]: baseUrl,
|
|
473
|
+
[_chunkYIFQGY5Ajs.API_KEY_ENV]: apiKey,
|
|
474
474
|
...activeOrgEnvValues(statusData)
|
|
475
475
|
},
|
|
476
476
|
baseUrl,
|
|
@@ -492,7 +492,7 @@ async function handleRegister(args) {
|
|
|
492
492
|
}
|
|
493
493
|
}
|
|
494
494
|
async function handleWait(args) {
|
|
495
|
-
const baseUrl =
|
|
495
|
+
const baseUrl = _chunkYIFQGY5Ajs.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, "");
|
|
496
496
|
let timeoutSeconds = 300;
|
|
497
497
|
let requestedScope;
|
|
498
498
|
if (args.includes("--auth-scope")) {
|
|
@@ -516,7 +516,7 @@ async function handleWait(args) {
|
|
|
516
516
|
const authScope = resumed.scope;
|
|
517
517
|
const claimToken = _nullishCoalesce(_optionalChain([pendingClaim, 'optionalAccess', _12 => _12.claimToken]), () => ( ""));
|
|
518
518
|
if (!pendingClaim) {
|
|
519
|
-
const scopedApiKey = authScope === "folder" ?
|
|
519
|
+
const scopedApiKey = authScope === "folder" ? _chunkYIFQGY5Ajs.resolveProjectApiKeyForBaseUrl.call(void 0, baseUrl) : _chunkYIFQGY5Ajs.resolveGlobalApiKeyForBaseUrl.call(void 0, baseUrl);
|
|
520
520
|
if (scopedApiKey) {
|
|
521
521
|
console.log("Already connected.");
|
|
522
522
|
return EXIT_OK;
|
|
@@ -559,8 +559,8 @@ async function handleWait(args) {
|
|
|
559
559
|
if (apiKey) {
|
|
560
560
|
saveEnvValues(
|
|
561
561
|
{
|
|
562
|
-
[
|
|
563
|
-
[
|
|
562
|
+
[_chunkYIFQGY5Ajs.HOST_URL_ENV]: baseUrl,
|
|
563
|
+
[_chunkYIFQGY5Ajs.API_KEY_ENV]: apiKey,
|
|
564
564
|
...activeOrgEnvValues(data)
|
|
565
565
|
},
|
|
566
566
|
baseUrl,
|
|
@@ -584,8 +584,8 @@ async function handleWait(args) {
|
|
|
584
584
|
return EXIT_AUTH;
|
|
585
585
|
}
|
|
586
586
|
async function authStatusLine(timeoutMs = 3e3) {
|
|
587
|
-
const baseUrl =
|
|
588
|
-
const apiKey =
|
|
587
|
+
const baseUrl = _chunkYIFQGY5Ajs.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, "");
|
|
588
|
+
const apiKey = _chunkYIFQGY5Ajs.resolveApiKeyForBaseUrl.call(void 0, baseUrl);
|
|
589
589
|
if (!apiKey) return `Auth: not connected (${baseUrl})`;
|
|
590
590
|
try {
|
|
591
591
|
const { status, data } = await httpJson(
|
|
@@ -608,9 +608,9 @@ async function authStatusLine(timeoutMs = 3e3) {
|
|
|
608
608
|
}
|
|
609
609
|
}
|
|
610
610
|
async function handleStatus(args) {
|
|
611
|
-
const baseUrl =
|
|
611
|
+
const baseUrl = _chunkYIFQGY5Ajs.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, "");
|
|
612
612
|
const reveal = args.includes("--reveal");
|
|
613
|
-
const jsonOutput =
|
|
613
|
+
const jsonOutput = _chunk2Y3YBOS4js.argsWantJson.call(void 0, args);
|
|
614
614
|
const hasExplicitAuthScope = args.includes("--auth-scope");
|
|
615
615
|
let authScope = null;
|
|
616
616
|
if (hasExplicitAuthScope) {
|
|
@@ -651,14 +651,14 @@ async function handleStatus(args) {
|
|
|
651
651
|
};
|
|
652
652
|
hostLines.push(`Host: ${baseUrl} (unreachable)`);
|
|
653
653
|
}
|
|
654
|
-
const apiKey = authScope === "folder" ?
|
|
654
|
+
const apiKey = authScope === "folder" ? _chunkYIFQGY5Ajs.resolveProjectApiKeyForBaseUrl.call(void 0, baseUrl) : authScope === "global" ? _chunkYIFQGY5Ajs.resolveGlobalApiKeyForBaseUrl.call(void 0, baseUrl) : _chunkYIFQGY5Ajs.resolveApiKeyForBaseUrl.call(void 0, baseUrl);
|
|
655
655
|
if (!apiKey) {
|
|
656
656
|
const { claim: pendingClaim } = resolvePendingAuthClaimForResume(
|
|
657
657
|
baseUrl,
|
|
658
658
|
_nullishCoalesce(authScope, () => ( void 0))
|
|
659
659
|
);
|
|
660
660
|
if (pendingClaim) {
|
|
661
|
-
|
|
661
|
+
_chunk2Y3YBOS4js.printCommandEnvelope.call(void 0,
|
|
662
662
|
{
|
|
663
663
|
..._nullishCoalesce(hostStatusPayload, () => ( { host: baseUrl })),
|
|
664
664
|
status: "pending",
|
|
@@ -679,7 +679,7 @@ async function handleStatus(args) {
|
|
|
679
679
|
);
|
|
680
680
|
return EXIT_OK;
|
|
681
681
|
}
|
|
682
|
-
|
|
682
|
+
_chunk2Y3YBOS4js.printCommandEnvelope.call(void 0,
|
|
683
683
|
{
|
|
684
684
|
..._nullishCoalesce(hostStatusPayload, () => ( { host: baseUrl })),
|
|
685
685
|
status: "not connected",
|
|
@@ -712,7 +712,7 @@ async function handleStatus(args) {
|
|
|
712
712
|
}
|
|
713
713
|
);
|
|
714
714
|
if (status === 401 || status === 403) {
|
|
715
|
-
|
|
715
|
+
_chunk2Y3YBOS4js.printCommandEnvelope.call(void 0,
|
|
716
716
|
{
|
|
717
717
|
..._nullishCoalesce(hostStatusPayload, () => ( { host: baseUrl })),
|
|
718
718
|
status: "unauthorized",
|
|
@@ -739,7 +739,7 @@ async function handleStatus(args) {
|
|
|
739
739
|
console.error(`Auth status error (status ${status}).`);
|
|
740
740
|
return EXIT_SERVER;
|
|
741
741
|
}
|
|
742
|
-
const resolvedAuthScope = _nullishCoalesce(authScope, () => ( (
|
|
742
|
+
const resolvedAuthScope = _nullishCoalesce(authScope, () => ( (_chunkYIFQGY5Ajs.getResolvedProjectAuthSource.call(void 0, baseUrl, apiKey) ? "folder" : "global")));
|
|
743
743
|
clearSatisfiedPendingClaim(
|
|
744
744
|
baseUrl,
|
|
745
745
|
resolvedAuthScope,
|
|
@@ -767,28 +767,28 @@ async function handleStatus(args) {
|
|
|
767
767
|
if (apiKeyResp) {
|
|
768
768
|
saveEnvValues(
|
|
769
769
|
{
|
|
770
|
-
[
|
|
771
|
-
[
|
|
770
|
+
[_chunkYIFQGY5Ajs.HOST_URL_ENV]: baseUrl,
|
|
771
|
+
[_chunkYIFQGY5Ajs.API_KEY_ENV]: apiKeyResp,
|
|
772
772
|
...activeOrgEnvValues(data)
|
|
773
773
|
},
|
|
774
774
|
baseUrl,
|
|
775
775
|
resolvedAuthScope
|
|
776
776
|
);
|
|
777
777
|
if (resolvedAuthScope === "folder") {
|
|
778
|
-
const target =
|
|
778
|
+
const target = _chunkYIFQGY5Ajs.resolveProjectPinTarget.call(void 0, );
|
|
779
779
|
savedApiKeyPath = target.ok ? _path.join.call(void 0, target.dir, ".env.deepline") : null;
|
|
780
780
|
} else {
|
|
781
781
|
savedApiKeyPath = envFilePath(baseUrl);
|
|
782
782
|
}
|
|
783
783
|
}
|
|
784
|
-
} else if (resolvedAuthScope === "folder" ||
|
|
785
|
-
saveEnvValues(
|
|
784
|
+
} else if (resolvedAuthScope === "folder" || _chunkYIFQGY5Ajs.storedHostApiKey.call(void 0, baseUrl) === apiKey) {
|
|
785
|
+
saveEnvValues(_chunkYIFQGY5Ajs.featureEnvValues.call(void 0, data), baseUrl, resolvedAuthScope);
|
|
786
786
|
}
|
|
787
|
-
|
|
787
|
+
_chunk2Y3YBOS4js.printCommandEnvelope.call(void 0,
|
|
788
788
|
{
|
|
789
789
|
...payload,
|
|
790
|
-
...
|
|
791
|
-
command_context:
|
|
790
|
+
..._chunkYIFQGY5Ajs.detectAgentRuntime.call(void 0, ) !== "unknown" ? {
|
|
791
|
+
command_context: _chunkYIFQGY5Ajs.resolveCliCommandContext.call(void 0,
|
|
792
792
|
{ baseUrl, apiKey },
|
|
793
793
|
resolvedAuthScope
|
|
794
794
|
)
|
|
@@ -11,10 +11,10 @@
|
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _chunkFS7TP7F2js = require('./chunk-FS7TP7F2.js');
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
var
|
|
17
|
+
var _chunk2Y3YBOS4js = require('./chunk-2Y3YBOS4.js');
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
|
|
@@ -22,7 +22,7 @@ var _chunkL3JU24MFjs = require('./chunk-L3JU24MF.js');
|
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
|
|
25
|
-
var
|
|
25
|
+
var _chunkYIFQGY5Ajs = require('./chunk-YIFQGY5A.js');
|
|
26
26
|
|
|
27
27
|
// src/cli/commands/skills.ts
|
|
28
28
|
var _child_process = require('child_process');
|
|
@@ -75,7 +75,7 @@ function inferActiveSkillsScope(entrypoint = _nullishCoalesce(process.argv[1], (
|
|
|
75
75
|
return /[\\/]\.deepline[\\/]runtime[\\/]/.test(entrypoint) ? "local" : "global";
|
|
76
76
|
}
|
|
77
77
|
function resolveLocalRoot() {
|
|
78
|
-
const target =
|
|
78
|
+
const target = _chunkYIFQGY5Ajs.resolveProjectPinTarget.call(void 0, );
|
|
79
79
|
if (!target.ok) {
|
|
80
80
|
throw new Error(
|
|
81
81
|
`Cowork project folder is ambiguous. Candidate folders: ${target.candidates.join(
|
|
@@ -86,7 +86,7 @@ function resolveLocalRoot() {
|
|
|
86
86
|
return target.dir;
|
|
87
87
|
}
|
|
88
88
|
function detectSkillsAgents(input) {
|
|
89
|
-
const runtime = _nullishCoalesce(input.runtime, () => (
|
|
89
|
+
const runtime = _nullishCoalesce(input.runtime, () => ( _chunkYIFQGY5Ajs.detectAgentRuntime.call(void 0, )));
|
|
90
90
|
const knownAgent = RUNTIME_TO_SKILLS_AGENT[runtime];
|
|
91
91
|
if (knownAgent) return [knownAgent];
|
|
92
92
|
const roots = [
|
|
@@ -101,11 +101,11 @@ function detectSkillsAgents(input) {
|
|
|
101
101
|
return detected.length > 0 ? detected : ["*"];
|
|
102
102
|
}
|
|
103
103
|
function skillsStatePathForScope(baseUrl, scope, root) {
|
|
104
|
-
return scope === "local" && root ? _path.join.call(void 0, root, ".deepline", "setup", "skills.json") : _path.join.call(void 0,
|
|
104
|
+
return scope === "local" && root ? _path.join.call(void 0, root, ".deepline", "setup", "skills.json") : _path.join.call(void 0, _chunkYIFQGY5Ajs.sdkCliStateDirPath.call(void 0, baseUrl), "skills-install.json");
|
|
105
105
|
}
|
|
106
106
|
function buildSkillsPlan(input) {
|
|
107
107
|
const scopeArgs = input.scope === "global" ? ["--global"] : [];
|
|
108
|
-
const legacyNames = [...
|
|
108
|
+
const legacyNames = [..._chunkFS7TP7F2js.LEGACY_SKILL_NAMES_TO_REMOVE].sort(
|
|
109
109
|
(a, b) => a.localeCompare(b)
|
|
110
110
|
);
|
|
111
111
|
return {
|
|
@@ -119,7 +119,7 @@ function buildSkillsPlan(input) {
|
|
|
119
119
|
args: [
|
|
120
120
|
"exec",
|
|
121
121
|
"--yes",
|
|
122
|
-
`--package=${
|
|
122
|
+
`--package=${_chunkFS7TP7F2js.SKILLS_NPX_PACKAGE}`,
|
|
123
123
|
"--",
|
|
124
124
|
"skills",
|
|
125
125
|
"remove",
|
|
@@ -135,11 +135,11 @@ function buildSkillsPlan(input) {
|
|
|
135
135
|
args: [
|
|
136
136
|
"exec",
|
|
137
137
|
"--yes",
|
|
138
|
-
`--package=${
|
|
138
|
+
`--package=${_chunkFS7TP7F2js.SKILLS_NPX_PACKAGE}`,
|
|
139
139
|
"--",
|
|
140
140
|
"skills",
|
|
141
141
|
"add",
|
|
142
|
-
|
|
142
|
+
_chunkFS7TP7F2js.skillsSourceUrl.call(void 0, input.baseUrl),
|
|
143
143
|
"--agent",
|
|
144
144
|
...input.agents,
|
|
145
145
|
...scopeArgs,
|
|
@@ -176,7 +176,7 @@ function readSkillsInstallState(path) {
|
|
|
176
176
|
}
|
|
177
177
|
function runProcess(command, args, cwd) {
|
|
178
178
|
return new Promise((resolve, reject) => {
|
|
179
|
-
const plan =
|
|
179
|
+
const plan = _chunkFS7TP7F2js.resolveShellSpawn.call(void 0,
|
|
180
180
|
command,
|
|
181
181
|
args,
|
|
182
182
|
process.platform,
|
|
@@ -198,7 +198,7 @@ function runProcess(command, args, cwd) {
|
|
|
198
198
|
child.kill("SIGTERM");
|
|
199
199
|
reject(
|
|
200
200
|
new Error(
|
|
201
|
-
`${
|
|
201
|
+
`${_chunkFS7TP7F2js.SKILLS_NPX_PACKAGE} timed out after ${SKILLS_PROCESS_TIMEOUT_MS}ms.`
|
|
202
202
|
)
|
|
203
203
|
);
|
|
204
204
|
}, SKILLS_PROCESS_TIMEOUT_MS);
|
|
@@ -209,7 +209,7 @@ function runProcess(command, args, cwd) {
|
|
|
209
209
|
child.once("close", (code) => {
|
|
210
210
|
clearTimeout(timeout);
|
|
211
211
|
if (code && stderr.trim()) {
|
|
212
|
-
process.stderr.write(`${
|
|
212
|
+
process.stderr.write(`${_chunkFS7TP7F2js.SKILLS_NPX_PACKAGE} exited ${code}.
|
|
213
213
|
`);
|
|
214
214
|
}
|
|
215
215
|
resolve(_nullishCoalesce(code, () => ( 1)));
|
|
@@ -223,7 +223,7 @@ async function runSkillsCommand(options, dependencies = {}) {
|
|
|
223
223
|
scope = normalizeScope(options.scope);
|
|
224
224
|
root = scope === "local" ? resolveLocalRoot() : null;
|
|
225
225
|
} catch (error) {
|
|
226
|
-
|
|
226
|
+
_chunk2Y3YBOS4js.printCommandEnvelope.call(void 0,
|
|
227
227
|
{
|
|
228
228
|
ok: false,
|
|
229
229
|
status: "failed",
|
|
@@ -235,22 +235,22 @@ async function runSkillsCommand(options, dependencies = {}) {
|
|
|
235
235
|
);
|
|
236
236
|
return 2;
|
|
237
237
|
}
|
|
238
|
-
const baseUrl =
|
|
238
|
+
const baseUrl = _chunkYIFQGY5Ajs.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, "");
|
|
239
239
|
const catalog = {
|
|
240
|
-
skillNames: [...
|
|
241
|
-
version:
|
|
240
|
+
skillNames: [..._chunkFS7TP7F2js.DEFAULT_SDK_SKILL_NAMES],
|
|
241
|
+
version: _chunkYIFQGY5Ajs.SDK_VERSION
|
|
242
242
|
};
|
|
243
243
|
const agents = options.agent ? [options.agent] : detectSkillsAgents({ scope, root });
|
|
244
244
|
const plan = buildSkillsPlan({ baseUrl, scope, root, agents, ...catalog });
|
|
245
245
|
if (options.dryRun) {
|
|
246
|
-
|
|
246
|
+
_chunk2Y3YBOS4js.printCommandEnvelope.call(void 0,
|
|
247
247
|
{ ok: true, status: "planned", dryRun: true, ...plan },
|
|
248
248
|
{ json: options.json }
|
|
249
249
|
);
|
|
250
250
|
return 0;
|
|
251
251
|
}
|
|
252
|
-
if (isSkillsPlanCurrent(plan, readSkillsInstallState(plan.statePath)) && !
|
|
253
|
-
|
|
252
|
+
if (isSkillsPlanCurrent(plan, readSkillsInstallState(plan.statePath)) && !_chunkFS7TP7F2js.hasFailedAutomaticSkillsSync.call(void 0, baseUrl, agents)) {
|
|
253
|
+
_chunk2Y3YBOS4js.printCommandEnvelope.call(void 0,
|
|
254
254
|
{
|
|
255
255
|
ok: true,
|
|
256
256
|
status: "current",
|
|
@@ -282,10 +282,10 @@ async function runSkillsCommand(options, dependencies = {}) {
|
|
|
282
282
|
}
|
|
283
283
|
if (scope === "local" && root) {
|
|
284
284
|
const managedNames = [
|
|
285
|
-
.../* @__PURE__ */ new Set([...plan.skillNames, ...
|
|
285
|
+
.../* @__PURE__ */ new Set([...plan.skillNames, ..._chunkFS7TP7F2js.LEGACY_SKILL_NAMES_TO_REMOVE])
|
|
286
286
|
];
|
|
287
287
|
const agentRoots = workspaceSkillRootsForAgents(plan.agents);
|
|
288
|
-
|
|
288
|
+
_chunkYIFQGY5Ajs.ensureProjectPrivatePathsIgnored.call(void 0, root, [
|
|
289
289
|
".deepline/",
|
|
290
290
|
...agentRoots.flatMap(
|
|
291
291
|
(agentRoot) => managedNames.map((name) => `${agentRoot}/skills/${name}/`)
|
|
@@ -294,7 +294,7 @@ async function runSkillsCommand(options, dependencies = {}) {
|
|
|
294
294
|
}
|
|
295
295
|
let lease;
|
|
296
296
|
try {
|
|
297
|
-
lease = scope === "global" ? await
|
|
297
|
+
lease = scope === "global" ? await _chunkFS7TP7F2js.acquireSkillsInstallLease.call(void 0, baseUrl, agents, plan.version, {
|
|
298
298
|
waitMs: _nullishCoalesce(dependencies.installLeaseWaitMs, () => ( SKILLS_INSTALL_LEASE_WAIT_MS)),
|
|
299
299
|
onWait: () => process.stderr.write(
|
|
300
300
|
"Waiting for a background Deepline skills refresh to finish...\n"
|
|
@@ -302,8 +302,8 @@ async function runSkillsCommand(options, dependencies = {}) {
|
|
|
302
302
|
}) : { release: () => {
|
|
303
303
|
} };
|
|
304
304
|
} catch (error) {
|
|
305
|
-
if (!(error instanceof
|
|
306
|
-
|
|
305
|
+
if (!(error instanceof _chunkFS7TP7F2js.SkillsStateUnavailableError)) throw error;
|
|
306
|
+
_chunk2Y3YBOS4js.printCommandEnvelope.call(void 0,
|
|
307
307
|
{
|
|
308
308
|
ok: false,
|
|
309
309
|
status: "failed",
|
|
@@ -319,7 +319,7 @@ async function runSkillsCommand(options, dependencies = {}) {
|
|
|
319
319
|
return 5;
|
|
320
320
|
}
|
|
321
321
|
if (!lease) {
|
|
322
|
-
|
|
322
|
+
_chunk2Y3YBOS4js.printCommandEnvelope.call(void 0,
|
|
323
323
|
{
|
|
324
324
|
ok: false,
|
|
325
325
|
status: "failed",
|
|
@@ -328,7 +328,7 @@ async function runSkillsCommand(options, dependencies = {}) {
|
|
|
328
328
|
scope,
|
|
329
329
|
agents,
|
|
330
330
|
message: "A background Deepline skills refresh is still running for these agents.",
|
|
331
|
-
next: `Retry in a moment: deepline skills --scope ${scope}. If no refresh is running, remove ${
|
|
331
|
+
next: `Retry in a moment: deepline skills --scope ${scope}. If no refresh is running, remove ${_chunkFS7TP7F2js.skillsInstallLeasePath.call(void 0, baseUrl, agents)}`
|
|
332
332
|
},
|
|
333
333
|
{ json: options.json }
|
|
334
334
|
);
|
|
@@ -365,7 +365,7 @@ async function runSkillsInstallWithLease(input) {
|
|
|
365
365
|
throw new Error("Could not install the current Deepline skills.");
|
|
366
366
|
}
|
|
367
367
|
} catch (error) {
|
|
368
|
-
|
|
368
|
+
_chunk2Y3YBOS4js.printCommandEnvelope.call(void 0,
|
|
369
369
|
{
|
|
370
370
|
ok: false,
|
|
371
371
|
status: "failed",
|
|
@@ -404,7 +404,7 @@ async function runSkillsInstallWithLease(input) {
|
|
|
404
404
|
{
|
|
405
405
|
schemaVersion: 1,
|
|
406
406
|
installedAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
407
|
-
cliVersion:
|
|
407
|
+
cliVersion: _chunkYIFQGY5Ajs.SDK_VERSION,
|
|
408
408
|
scope,
|
|
409
409
|
agents,
|
|
410
410
|
skillsVersion: plan.version,
|
|
@@ -417,9 +417,9 @@ async function runSkillsInstallWithLease(input) {
|
|
|
417
417
|
"utf8"
|
|
418
418
|
);
|
|
419
419
|
if (scope === "global") {
|
|
420
|
-
|
|
420
|
+
_chunkFS7TP7F2js.clearFailedAutomaticSkillsSync.call(void 0, baseUrl, agents);
|
|
421
421
|
}
|
|
422
|
-
|
|
422
|
+
_chunk2Y3YBOS4js.printCommandEnvelope.call(void 0,
|
|
423
423
|
{
|
|
424
424
|
ok: true,
|
|
425
425
|
status: "complete",
|
|
@@ -450,7 +450,7 @@ function registerSkillsCommand(program) {
|
|
|
450
450
|
"after",
|
|
451
451
|
`
|
|
452
452
|
Notes:
|
|
453
|
-
This command reinstalls current Deepline-managed skills using ${
|
|
453
|
+
This command reinstalls current Deepline-managed skills using ${_chunkFS7TP7F2js.SKILLS_NPX_PACKAGE},
|
|
454
454
|
then removes legacy Deepline skill names. Local scope writes into the resolved
|
|
455
455
|
persistent project.
|
|
456
456
|
|
|
@@ -462,13 +462,13 @@ Examples:
|
|
|
462
462
|
).action(async (options) => {
|
|
463
463
|
process.exitCode = await runSkillsCommand(options);
|
|
464
464
|
});
|
|
465
|
-
program.command(
|
|
465
|
+
program.command(_chunkFS7TP7F2js.SKILLS_AUTO_SYNC_COMMAND, { hidden: true }).description("Refresh Deepline agent skills in the background.").option(
|
|
466
466
|
"--claim <token>",
|
|
467
467
|
"Owner token of the leases this child was started for."
|
|
468
468
|
).action(async (options) => {
|
|
469
469
|
const claim = _optionalChain([options, 'access', _ => _.claim, 'optionalAccess', _2 => _2.trim, 'call', _3 => _3()]);
|
|
470
470
|
if (!claim) {
|
|
471
|
-
|
|
471
|
+
_chunk2Y3YBOS4js.printCommandEnvelope.call(void 0,
|
|
472
472
|
{
|
|
473
473
|
ok: false,
|
|
474
474
|
status: "failed",
|
|
@@ -481,7 +481,7 @@ Examples:
|
|
|
481
481
|
process.exitCode = 2;
|
|
482
482
|
return;
|
|
483
483
|
}
|
|
484
|
-
await
|
|
484
|
+
await _chunkFS7TP7F2js.syncSdkSkillsIfNeeded.call(void 0, _chunkYIFQGY5Ajs.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, ""), {
|
|
485
485
|
mode: "inline",
|
|
486
486
|
notices: "defer",
|
|
487
487
|
claim
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkLRNYRGCNjs = require('./chunk-LRNYRGCN.js');
|
|
4
4
|
|
|
5
5
|
// src/cli/describe-options.ts
|
|
6
6
|
function addDescribeOptions(command, options = {}) {
|
|
@@ -18,7 +18,7 @@ function addDescribeOptions(command, options = {}) {
|
|
|
18
18
|
"Show only the in-play example, and explain how it takes inputs and returns outputs"
|
|
19
19
|
).option("--no-example", "Hide the run examples").option(
|
|
20
20
|
"--full-schema",
|
|
21
|
-
`Print every field: a long schema unfolded (over ${
|
|
21
|
+
`Print every field: a long schema unfolded (over ${_chunkLRNYRGCNjs.SCHEMA_LINE_LIMIT} lines), list rows, and a tool's raw response`
|
|
22
22
|
).option(
|
|
23
23
|
"--fields <names>",
|
|
24
24
|
"Show only these fields, comma-separated, plus every required input"
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _chunkLRNYRGCNjs = require('./chunk-LRNYRGCN.js');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
@@ -346,7 +346,7 @@ function extractorValueType(name) {
|
|
|
346
346
|
}
|
|
347
347
|
const named = NAMED_VALUE_SHAPES[definition.valueKind];
|
|
348
348
|
if (!named) return { type: "string" };
|
|
349
|
-
const { type, fields } =
|
|
349
|
+
const { type, fields } = _chunkLRNYRGCNjs.schemaField.call(void 0, name, named.schema, true);
|
|
350
350
|
return { type, ...fields ? { fields } : {}, shape: named.shape };
|
|
351
351
|
}
|
|
352
352
|
function jsonSchemaOf(wrapper) {
|
|
@@ -383,7 +383,7 @@ function describedTool(tool, requestedToolId) {
|
|
|
383
383
|
description,
|
|
384
384
|
cost: stringField(recordField(tool, "pricing"), "displayText") || void 0,
|
|
385
385
|
guidance: [],
|
|
386
|
-
inputs:
|
|
386
|
+
inputs: _chunkLRNYRGCNjs.schemaFields.call(void 0,
|
|
387
387
|
recordField(tool, "payload_schema", "payloadSchema")
|
|
388
388
|
),
|
|
389
389
|
outputs: [],
|
|
@@ -419,7 +419,7 @@ function describedTool(tool, requestedToolId) {
|
|
|
419
419
|
(path) => path.replace(/^toolResponse\.raw\./, "")
|
|
420
420
|
);
|
|
421
421
|
const node = roots.flatMap((root) => paths.map((path) => schemaNodeAt(root, path))).find(isRecord);
|
|
422
|
-
const { fields, ...typed } =
|
|
422
|
+
const { fields, ...typed } = _chunkLRNYRGCNjs.schemaField.call(void 0, name, node, true);
|
|
423
423
|
const valueType = stringField(_nullishCoalesce(details.get(name), () => ( {})), "valueType");
|
|
424
424
|
const deepline = kind === "extractedValues" ? extractorValueType(name) : void 0;
|
|
425
425
|
const known = typed.type !== "unknown" ? void 0 : kind === "extractedLists" ? { type: "object[]" } : deepline;
|
|
@@ -477,12 +477,12 @@ function describedTool(tool, requestedToolId) {
|
|
|
477
477
|
(line) => typeof line === "string" && /[a-z0-9]/i.test(line)
|
|
478
478
|
)
|
|
479
479
|
],
|
|
480
|
-
rateLimit:
|
|
480
|
+
rateLimit: _chunkLRNYRGCNjs.rateLimitSummary.call(void 0,
|
|
481
481
|
recordField(contract, "executionMetadata").configuredRateLimits
|
|
482
482
|
),
|
|
483
|
-
inputs:
|
|
483
|
+
inputs: _chunkLRNYRGCNjs.schemaFields.call(void 0, jsonSchemaOf(recordField(contract, "inputSchema"))),
|
|
484
484
|
outputs: [...lists, ...values].map(({ field }) => field),
|
|
485
|
-
rawResponse:
|
|
485
|
+
rawResponse: _chunkLRNYRGCNjs.schemaFields.call(void 0, outputSchema),
|
|
486
486
|
runner: playReference ? { via: "play", reference: playReference } : { via: "tool", toolId: String(contract.toolId) }
|
|
487
487
|
};
|
|
488
488
|
}
|