deepline 0.3.493 → 0.3.495
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 +12 -0
- 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/execution-capabilities.ts +8 -3
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-authority.ts +2 -2
- 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-B2YUNFQ6.mjs} +5 -5
- package/dist/cli/auth-GAOWVOK4.js +43 -0
- package/dist/cli/{billing-FSB4BBBO.js → billing-2Q7TMNRE.js} +79 -79
- package/dist/cli/{billing-SBWQCC7B.mjs → billing-5TR7ZBZM.mjs} +6 -6
- package/dist/cli/{chunk-3RGWTKK3.mjs → chunk-2GEYN3H4.mjs} +89 -3
- package/dist/cli/{chunk-IRDYBMA7.mjs → chunk-2HCZHIMT.mjs} +21 -0
- package/dist/cli/{chunk-WCZFCOMZ.js → chunk-5OKQPDYJ.js} +11 -10
- package/dist/cli/{chunk-DYP27IWC.mjs → chunk-7LLUJQM5.mjs} +4 -4
- package/dist/cli/{chunk-IJOHWGPF.js → chunk-7OGADAAA.js} +6 -6
- package/dist/cli/{chunk-2BRTYIAH.mjs → chunk-7YNZRALI.mjs} +3 -3
- package/dist/cli/{chunk-MLEUOTEQ.js → chunk-ACVT5LPN.js} +53 -53
- package/dist/cli/{chunk-IOMEJKGK.js → chunk-B3ROCZ5Y.js} +2 -2
- package/dist/cli/{chunk-NPZBE64X.js → chunk-BLMB4N63.js} +89 -3
- package/dist/cli/{chunk-KGDDQMI7.mjs → chunk-C5R3UH5V.mjs} +28 -1
- package/dist/cli/{chunk-QTPS5RLG.js → chunk-CAWE3MS2.js} +45 -13
- package/dist/cli/{chunk-NALJJTPS.mjs → chunk-CKLJAQIV.mjs} +5 -5
- package/dist/cli/{chunk-NPNAEPY4.js → chunk-CTFR52JC.js} +26 -26
- package/dist/cli/{chunk-KKSKYZO4.mjs → chunk-DFK5IJMT.mjs} +2 -2
- package/dist/cli/{chunk-4NIGNT7X.mjs → chunk-FC4JGTFC.mjs} +1 -1
- package/dist/cli/{chunk-TNQOR6XQ.mjs → chunk-FLJSK32S.mjs} +1 -1
- package/dist/cli/{chunk-TIFRRLZT.js → chunk-GBICEYUA.js} +6 -6
- package/dist/cli/{chunk-ZQH4TXM2.mjs → chunk-H5L2Q2GI.mjs} +2 -2
- package/dist/cli/{chunk-Y3NN2UAF.mjs → chunk-HJ5LYO6U.mjs} +2 -2
- package/dist/cli/{chunk-C2MRDPA5.js → chunk-I42EOZKQ.js} +32 -5
- package/dist/cli/{chunk-3QGUWB6E.mjs → chunk-I66IWCY4.mjs} +8 -7
- package/dist/cli/{chunk-VFHIYWMC.mjs → chunk-JRBQC6L4.mjs} +2 -2
- package/dist/cli/{chunk-67ZG7XZV.mjs → chunk-KG2FUYWB.mjs} +2 -2
- package/dist/cli/{chunk-5WOPBX3H.mjs → chunk-KSHAFYYG.mjs} +1 -1
- package/dist/cli/{chunk-SXD2EYAH.mjs → chunk-L5ZXEYTQ.mjs} +37 -5
- package/dist/cli/{chunk-KCDZWS2B.js → chunk-LQKZG5RN.js} +231 -231
- package/dist/cli/{chunk-2I7VN65H.js → chunk-MAMEKGLI.js} +7 -7
- package/dist/cli/{chunk-2IHGVAGT.mjs → chunk-MG3WST3Z.mjs} +2 -2
- package/dist/cli/{chunk-DWJ4RXSA.js → chunk-N3T3L3WW.js} +21 -0
- package/dist/cli/{chunk-5DIZ2G74.mjs → chunk-OFBDI5S3.mjs} +2 -2
- package/dist/cli/{chunk-UCMY2SO2.js → chunk-PEIOQKTA.js} +3 -3
- package/dist/cli/{chunk-NWIDPT7H.js → chunk-PHO53W67.js} +4 -4
- package/dist/cli/{chunk-E5ILCMKQ.mjs → chunk-RBBOUPME.mjs} +1 -1
- package/dist/cli/{chunk-HLM2UFQ5.mjs → chunk-S2QARJLX.mjs} +1 -1
- package/dist/cli/{chunk-GSC35TPZ.mjs → chunk-SC5GHGFD.mjs} +2 -2
- package/dist/cli/{chunk-ZVW7EWTC.mjs → chunk-SR6VS5PG.mjs} +184 -184
- package/dist/cli/{chunk-EFO5GVYS.js → chunk-T4PGA6UD.js} +2 -2
- package/dist/cli/{chunk-AGTXL6LZ.js → chunk-TCNILHMS.js} +5 -5
- package/dist/cli/{chunk-ZVXB7OU7.mjs → chunk-TFMV3NKL.mjs} +1 -1
- package/dist/cli/{chunk-4IJFQV3O.mjs → chunk-TMO7W4P2.mjs} +1 -1
- package/dist/cli/{chunk-WTFI7BVH.mjs → chunk-TSKVPEVZ.mjs} +8 -1
- package/dist/cli/{chunk-HTUSTPP4.js → chunk-TUAEM76Y.js} +14 -7
- package/dist/cli/{chunk-EYG336YV.js → chunk-UDFO2MWA.js} +41 -41
- package/dist/cli/{chunk-2NGIBJM2.js → chunk-UKGOZOTT.js} +8 -8
- package/dist/cli/{chunk-7HABWOMB.js → chunk-UMFZQREB.js} +259 -259
- package/dist/cli/{chunk-XLE7KXE7.js → chunk-WVL5HGUG.js} +2 -2
- package/dist/cli/{chunk-XQX476QK.js → chunk-XAOLMEN5.js} +9 -9
- package/dist/cli/{chunk-AWMCZAUR.js → chunk-XKYQR3QK.js} +3 -3
- package/dist/cli/{chunk-IJJ6D5WL.mjs → chunk-XR6RCBB3.mjs} +11 -11
- package/dist/cli/{chunk-IOBPR2VO.js → chunk-XX6PRYFI.js} +16 -16
- package/dist/cli/{chunk-LGTZYI5B.js → chunk-Y2DUGUUU.js} +21 -21
- package/dist/cli/{chunk-2H4OFVR5.js → chunk-Z33PZUWG.js} +5 -5
- package/dist/cli/{chunk-EBAS3UT2.mjs → chunk-ZB6UYG5I.mjs} +5 -5
- package/dist/cli/{chunk-JO2JZUBR.js → chunk-ZBQBH4IT.js} +3 -3
- package/dist/cli/command-docs.js +2 -2
- package/dist/cli/command-docs.mjs +1 -1
- package/dist/cli/{csv-XR22YQXT.mjs → csv-5UQXKWLE.mjs} +4 -4
- package/dist/cli/{csv-DKYZE2KM.js → csv-DZQ77T67.js} +13 -13
- package/dist/cli/{db-EOKG36YN.mjs → db-F62BVFTP.mjs} +6 -6
- package/dist/cli/{db-RNYRTCMV.js → db-JIPLUHA6.js} +27 -27
- package/dist/cli/describe-BA4RAZ7J.js +50 -0
- package/dist/cli/{describe-ICFXOQBW.mjs → describe-J7KYHONJ.mjs} +20 -20
- 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-XB4F2KZD.mjs} +6 -6
- package/dist/cli/{executions-OBWPSWH7.js → executions-XQ4FNJ27.js} +8 -8
- package/dist/cli/{feedback-6EQRVBKF.mjs → feedback-5CR4CJ6W.mjs} +4 -4
- package/dist/cli/{feedback-6GPEUBLF.js → feedback-Q6JRCMDV.js} +8 -8
- package/dist/cli/git-EAO432S2.js +25 -0
- package/dist/cli/{git-CVQ24DTR.mjs → git-P5WBBUT3.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-EJAB6III.js} +8 -8
- package/dist/cli/{legacy-noops-QULJZYNH.mjs → legacy-noops-H5JJVYZ2.mjs} +5 -5
- package/dist/cli/{monitors-OJ4CMREE.js → monitors-7DOGM7RO.js} +91 -91
- package/dist/cli/{monitors-AFT5YJPZ.mjs → monitors-QPFAT2J5.mjs} +7 -7
- package/dist/cli/{org-WHKNXANG.mjs → org-BH7ATDIJ.mjs} +6 -6
- package/dist/cli/{org-RKT52CSL.js → org-QOBB4IN3.js} +72 -72
- package/dist/cli/{pages-EEAQFGVD.mjs → pages-PJH2TXZQ.mjs} +20 -6
- package/dist/cli/{pages-SOE3R667.js → pages-PLTE54KM.js} +32 -18
- package/dist/cli/{play-LXFWHUBP.mjs → play-ULTJ3LPA.mjs} +17 -17
- package/dist/cli/{play-OTJJ4E4T.js → play-XZAPTF3T.js} +314 -314
- package/dist/cli/{providers-U3CPKTMM.mjs → providers-6NUTRVE4.mjs} +6 -6
- package/dist/cli/{providers-RU4HIAT3.js → providers-SKXLW7M3.js} +9 -9
- package/dist/cli/{quickstart-75AO2AJC.mjs → quickstart-5HMJMXVT.mjs} +4 -4
- package/dist/cli/{quickstart-N72IVA2Y.js → quickstart-JFCIIGII.js} +6 -6
- package/dist/cli/{run-IGWFL6WH.mjs → run-2BJZPY4K.mjs} +25 -25
- package/dist/cli/{run-MMYES3IW.js → run-BRAXLCBC.js} +40 -40
- package/dist/cli/search-4MU2G6HV.js +32 -0
- package/dist/cli/{search-FIYESBLZ.mjs → search-IDXSB2CV.mjs} +7 -7
- package/dist/cli/{search-output-3I5KSW36.mjs → search-output-AATMH4QG.mjs} +4 -4
- package/dist/cli/{search-output-2FXN4ZWD.js → search-output-CJ4TNYF7.js} +6 -6
- package/dist/cli/{secrets-HCZQ6JNP.js → secrets-6SMKTBFT.js} +15 -15
- package/dist/cli/{secrets-O7IUQ3VT.mjs → secrets-UQNEJSNG.mjs} +6 -6
- package/dist/cli/{sessions-KY7A3EZO.mjs → sessions-MHTUVPSR.mjs} +5 -5
- package/dist/cli/{sessions-5AYTT4IW.js → sessions-W3KU4Q4X.js} +6 -6
- package/dist/cli/{settings-P4VFYWJK.js → settings-BA52NEU5.js} +78 -78
- package/dist/cli/{settings-WSMRR2GS.mjs → settings-KNYJ6GXK.mjs} +11 -11
- package/dist/cli/{setup-J7CA3EJL.js → setup-D5HCJAVU.js} +49 -49
- package/dist/cli/{setup-YTVKVQC7.mjs → setup-TLTZ2YCO.mjs} +9 -9
- package/dist/cli/{skills-W5WY764N.mjs → skills-DPLM4EGS.mjs} +7 -7
- package/dist/cli/skills-SVUWVXCE.js +36 -0
- package/dist/cli/{tools-YECI6N3N.mjs → tools-I4ZOJV23.mjs} +18 -18
- package/dist/cli/tools-RJSP76HX.js +57 -0
- package/dist/cli/{update-BIFBIEII.mjs → update-VIFS7IK5.mjs} +9 -9
- package/dist/cli/update-YT6JPIC6.js +34 -0
- package/dist/cli/{workflow-D2TUFFH6.js → workflow-7REPOHXM.js} +17 -17
- package/dist/cli/{workflow-XZVDNARC.mjs → workflow-TAQBNDV7.mjs} +7 -7
- package/dist/{client-CNzJ1LTF.d.mts → client-BDT_LwuM.d.mts} +1 -1
- package/dist/{client-BDB_VbE4.d.ts → client-CKVH6tmp.d.ts} +1 -1
- package/dist/{client-core-CSv3DlPD.d.mts → client-core-CEixe_C0.d.mts} +10 -5
- package/dist/{client-core-xEa9x3pl.d.ts → client-core-RS-d-vtY.d.ts} +10 -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
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _chunkMAMEKGLIjs = require('./chunk-MAMEKGLI.js');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
@@ -22,14 +22,14 @@ var _chunk2I7VN65Hjs = require('./chunk-2I7VN65H.js');
|
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
|
|
25
|
-
var
|
|
25
|
+
var _chunkZBQBH4ITjs = require('./chunk-ZBQBH4IT.js');
|
|
26
26
|
|
|
27
27
|
|
|
28
28
|
|
|
29
29
|
|
|
30
30
|
|
|
31
31
|
|
|
32
|
-
var
|
|
32
|
+
var _chunkPHO53W67js = require('./chunk-PHO53W67.js');
|
|
33
33
|
|
|
34
34
|
|
|
35
35
|
var _chunkDIAWYWT5js = require('./chunk-DIAWYWT5.js');
|
|
@@ -60,7 +60,7 @@ function statusBannerLine(value) {
|
|
|
60
60
|
return `Service notice: ${banner.message}`;
|
|
61
61
|
}
|
|
62
62
|
function envFilePath(baseUrl) {
|
|
63
|
-
return
|
|
63
|
+
return _chunkZBQBH4ITjs.hostEnvFilePath.call(void 0, baseUrl);
|
|
64
64
|
}
|
|
65
65
|
function normalizeAuthScope(value) {
|
|
66
66
|
if (!value || value === "global") return "global";
|
|
@@ -73,7 +73,7 @@ function parseAuthScope(args) {
|
|
|
73
73
|
}
|
|
74
74
|
function pendingClaimPath(baseUrl, scope) {
|
|
75
75
|
if (scope === "folder") {
|
|
76
|
-
const target =
|
|
76
|
+
const target = _chunkZBQBH4ITjs.resolveProjectPinTarget.call(void 0, );
|
|
77
77
|
if (!target.ok) {
|
|
78
78
|
throw new Error(
|
|
79
79
|
`Cowork project folder is ambiguous. Candidate folders: ${target.candidates.join(
|
|
@@ -83,10 +83,10 @@ function pendingClaimPath(baseUrl, scope) {
|
|
|
83
83
|
}
|
|
84
84
|
return _path.join.call(void 0, target.dir, ".deepline", "setup", "pending-auth.json");
|
|
85
85
|
}
|
|
86
|
-
return `${
|
|
86
|
+
return `${_chunkZBQBH4ITjs.hostConfigDirPath.call(void 0, baseUrl)}/pending-auth.json`;
|
|
87
87
|
}
|
|
88
88
|
function legacyPendingClaimTokenPath(baseUrl) {
|
|
89
|
-
return `${
|
|
89
|
+
return `${_chunkZBQBH4ITjs.hostConfigDirPath.call(void 0, baseUrl)}/pending-claim-token`;
|
|
90
90
|
}
|
|
91
91
|
function savePendingClaim(baseUrl, claim) {
|
|
92
92
|
const filePath = pendingClaimPath(baseUrl, claim.scope);
|
|
@@ -190,21 +190,21 @@ function parseRegisterWaitMode(args) {
|
|
|
190
190
|
function shouldWaitForRegisterClaim(mode) {
|
|
191
191
|
if (mode === "yes") return true;
|
|
192
192
|
if (mode === "no") return false;
|
|
193
|
-
return
|
|
193
|
+
return _chunkPHO53W67js.detectAgentRuntime.call(void 0, ) !== "claude_cowork";
|
|
194
194
|
}
|
|
195
195
|
function saveEnvValues(values, baseUrl, scope) {
|
|
196
196
|
const filtered = {
|
|
197
|
-
...values[
|
|
198
|
-
...values[
|
|
199
|
-
...values[
|
|
200
|
-
...Object.prototype.hasOwnProperty.call(values,
|
|
197
|
+
...values[_chunkZBQBH4ITjs.HOST_URL_ENV] ? { [_chunkZBQBH4ITjs.HOST_URL_ENV]: values[_chunkZBQBH4ITjs.HOST_URL_ENV] } : {},
|
|
198
|
+
...values[_chunkZBQBH4ITjs.API_KEY_ENV] ? { [_chunkZBQBH4ITjs.API_KEY_ENV]: values[_chunkZBQBH4ITjs.API_KEY_ENV] } : {},
|
|
199
|
+
...values[_chunkZBQBH4ITjs.ACTIVE_ORG_ID_ENV] ? { [_chunkZBQBH4ITjs.ACTIVE_ORG_ID_ENV]: values[_chunkZBQBH4ITjs.ACTIVE_ORG_ID_ENV] } : {},
|
|
200
|
+
...Object.prototype.hasOwnProperty.call(values, _chunkZBQBH4ITjs.ACTIVE_ORG_NAME_ENV) ? { [_chunkZBQBH4ITjs.ACTIVE_ORG_NAME_ENV]: values[_chunkZBQBH4ITjs.ACTIVE_ORG_NAME_ENV] } : {},
|
|
201
201
|
// An explicit empty list must reach the store: it clears a stale line.
|
|
202
|
-
...Object.prototype.hasOwnProperty.call(values,
|
|
202
|
+
...Object.prototype.hasOwnProperty.call(values, _chunkZBQBH4ITjs.FEATURES_ENV) ? { [_chunkZBQBH4ITjs.FEATURES_ENV]: values[_chunkZBQBH4ITjs.FEATURES_ENV] } : {}
|
|
203
203
|
};
|
|
204
204
|
if (scope === "folder") {
|
|
205
|
-
|
|
205
|
+
_chunkZBQBH4ITjs.saveProjectDeeplineEnvValues.call(void 0, filtered);
|
|
206
206
|
} else {
|
|
207
|
-
|
|
207
|
+
_chunkZBQBH4ITjs.saveHostEnvValues.call(void 0, baseUrl, filtered);
|
|
208
208
|
}
|
|
209
209
|
}
|
|
210
210
|
function activeOrgEnvValues(data) {
|
|
@@ -212,21 +212,21 @@ function activeOrgEnvValues(data) {
|
|
|
212
212
|
if (!orgId) return {};
|
|
213
213
|
const orgName = typeof data.org_name === "string" ? data.org_name.trim() : "";
|
|
214
214
|
return {
|
|
215
|
-
[
|
|
216
|
-
[
|
|
217
|
-
...
|
|
215
|
+
[_chunkZBQBH4ITjs.ACTIVE_ORG_ID_ENV]: orgId,
|
|
216
|
+
[_chunkZBQBH4ITjs.ACTIVE_ORG_NAME_ENV]: orgName,
|
|
217
|
+
..._chunkZBQBH4ITjs.featureEnvValues.call(void 0, data)
|
|
218
218
|
};
|
|
219
219
|
}
|
|
220
220
|
async function httpJson(method, url, apiKey, body, timeoutMs = AUTH_HTTP_TIMEOUT_MS) {
|
|
221
221
|
const headers = {
|
|
222
222
|
"Content-Type": "application/json",
|
|
223
|
-
"User-Agent": `deepline-ts-sdk/${
|
|
223
|
+
"User-Agent": `deepline-ts-sdk/${_chunkPHO53W67js.SDK_VERSION}`,
|
|
224
224
|
"X-Deepline-Client-Family": "sdk",
|
|
225
225
|
"X-Deepline-CLI-Family": "sdk",
|
|
226
|
-
"X-Deepline-Agent-Runtime":
|
|
227
|
-
"X-Deepline-CLI-Version":
|
|
228
|
-
"X-Deepline-SDK-Version":
|
|
229
|
-
"X-Deepline-API-Contract":
|
|
226
|
+
"X-Deepline-Agent-Runtime": _chunkPHO53W67js.detectAgentRuntime.call(void 0, ),
|
|
227
|
+
"X-Deepline-CLI-Version": _chunkPHO53W67js.SDK_VERSION,
|
|
228
|
+
"X-Deepline-SDK-Version": _chunkPHO53W67js.SDK_VERSION,
|
|
229
|
+
"X-Deepline-API-Contract": _chunkPHO53W67js.SDK_API_CONTRACT
|
|
230
230
|
};
|
|
231
231
|
if (apiKey) headers["Authorization"] = `Bearer ${apiKey}`;
|
|
232
232
|
const bypassToken = _optionalChain([process, 'access', _7 => _7.env, 'access', _8 => _8.VERCEL_PROTECTION_BYPASS_TOKEN, 'optionalAccess', _9 => _9.trim, 'call', _10 => _10()]);
|
|
@@ -265,10 +265,10 @@ async function httpJson(method, url, apiKey, body, timeoutMs = AUTH_HTTP_TIMEOUT
|
|
|
265
265
|
if (failure.name === "AbortError" || failure.name === "TimeoutError") {
|
|
266
266
|
throw failure;
|
|
267
267
|
}
|
|
268
|
-
const causeCode =
|
|
268
|
+
const causeCode = _chunkPHO53W67js.networkCauseCode.call(void 0, failure);
|
|
269
269
|
throw Object.assign(
|
|
270
270
|
new (0, _chunkDIAWYWT5js.DeeplineError)(
|
|
271
|
-
|
|
271
|
+
_chunkPHO53W67js.connectionFailureMessage.call(void 0, new URL(url).origin, failure),
|
|
272
272
|
void 0,
|
|
273
273
|
"NETWORK_ERROR",
|
|
274
274
|
causeCode ? { causeCode } : void 0
|
|
@@ -285,7 +285,7 @@ async function readStatusBanner(baseUrl) {
|
|
|
285
285
|
return _optionalChain([response, 'optionalAccess', _11 => _11.status]) === 200 ? _nullishCoalesce(response.data.banner, () => ( null)) : null;
|
|
286
286
|
}
|
|
287
287
|
async function reportSetupCompleted(input) {
|
|
288
|
-
const apiKey = input.authScope === "folder" ?
|
|
288
|
+
const apiKey = input.authScope === "folder" ? _chunkZBQBH4ITjs.resolveProjectApiKeyForBaseUrl.call(void 0, input.baseUrl) : _chunkZBQBH4ITjs.resolveGlobalApiKeyForBaseUrl.call(void 0, input.baseUrl);
|
|
289
289
|
if (!apiKey) return;
|
|
290
290
|
try {
|
|
291
291
|
await httpJson(
|
|
@@ -414,7 +414,7 @@ function endClaimPollOnRefusal(status, data, baseUrl, authScope) {
|
|
|
414
414
|
return EXIT_SERVER;
|
|
415
415
|
}
|
|
416
416
|
async function handleRegister(args, options) {
|
|
417
|
-
const baseUrl =
|
|
417
|
+
const baseUrl = _chunkZBQBH4ITjs.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, "");
|
|
418
418
|
let orgName = "";
|
|
419
419
|
let orgId = "";
|
|
420
420
|
let agentName = "";
|
|
@@ -473,19 +473,19 @@ async function handleRegister(args, options) {
|
|
|
473
473
|
savePendingClaim(baseUrl, pendingClaim);
|
|
474
474
|
saveEnvValues(
|
|
475
475
|
{
|
|
476
|
-
[
|
|
476
|
+
[_chunkZBQBH4ITjs.HOST_URL_ENV]: baseUrl
|
|
477
477
|
},
|
|
478
478
|
baseUrl,
|
|
479
479
|
authScope
|
|
480
480
|
);
|
|
481
481
|
}
|
|
482
482
|
if (claimUrl) {
|
|
483
|
-
const shouldOpen = waitMode !== "no" &&
|
|
483
|
+
const shouldOpen = waitMode !== "no" && _chunkPHO53W67js.detectAgentRuntime.call(void 0, ) !== "claude_cowork";
|
|
484
484
|
console.log(
|
|
485
485
|
shouldOpen ? " Opening approval page in your browser." : " Open this approval page in your browser:"
|
|
486
486
|
);
|
|
487
487
|
console.log(` ${claimUrl}`);
|
|
488
|
-
if (shouldOpen)
|
|
488
|
+
if (shouldOpen) _chunkMAMEKGLIjs.openInBrowser.call(void 0, claimUrl);
|
|
489
489
|
if (claimToken && pendingClaim.approvalLinkReporting && !_optionalChain([options, 'optionalAccess', _16 => _16.deferApprovalLinkReport])) {
|
|
490
490
|
await reportApprovalLinkShown(
|
|
491
491
|
baseUrl,
|
|
@@ -534,8 +534,8 @@ async function handleRegister(args, options) {
|
|
|
534
534
|
if (apiKey) {
|
|
535
535
|
saveEnvValues(
|
|
536
536
|
{
|
|
537
|
-
[
|
|
538
|
-
[
|
|
537
|
+
[_chunkZBQBH4ITjs.HOST_URL_ENV]: baseUrl,
|
|
538
|
+
[_chunkZBQBH4ITjs.API_KEY_ENV]: apiKey,
|
|
539
539
|
...activeOrgEnvValues(statusData)
|
|
540
540
|
},
|
|
541
541
|
baseUrl,
|
|
@@ -557,7 +557,7 @@ async function handleRegister(args, options) {
|
|
|
557
557
|
}
|
|
558
558
|
}
|
|
559
559
|
async function handleWait(args) {
|
|
560
|
-
const baseUrl =
|
|
560
|
+
const baseUrl = _chunkZBQBH4ITjs.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, "");
|
|
561
561
|
let timeoutSeconds = 300;
|
|
562
562
|
let requestedScope;
|
|
563
563
|
if (args.includes("--auth-scope")) {
|
|
@@ -581,7 +581,7 @@ async function handleWait(args) {
|
|
|
581
581
|
const authScope = resumed.scope;
|
|
582
582
|
const claimToken = _nullishCoalesce(_optionalChain([pendingClaim, 'optionalAccess', _17 => _17.claimToken]), () => ( ""));
|
|
583
583
|
if (!pendingClaim) {
|
|
584
|
-
const scopedApiKey = authScope === "folder" ?
|
|
584
|
+
const scopedApiKey = authScope === "folder" ? _chunkZBQBH4ITjs.resolveProjectApiKeyForBaseUrl.call(void 0, baseUrl) : _chunkZBQBH4ITjs.resolveGlobalApiKeyForBaseUrl.call(void 0, baseUrl);
|
|
585
585
|
if (scopedApiKey) {
|
|
586
586
|
console.log("Already connected.");
|
|
587
587
|
return EXIT_OK;
|
|
@@ -623,8 +623,8 @@ async function handleWait(args) {
|
|
|
623
623
|
if (apiKey) {
|
|
624
624
|
saveEnvValues(
|
|
625
625
|
{
|
|
626
|
-
[
|
|
627
|
-
[
|
|
626
|
+
[_chunkZBQBH4ITjs.HOST_URL_ENV]: baseUrl,
|
|
627
|
+
[_chunkZBQBH4ITjs.API_KEY_ENV]: apiKey,
|
|
628
628
|
...activeOrgEnvValues(data)
|
|
629
629
|
},
|
|
630
630
|
baseUrl,
|
|
@@ -648,8 +648,8 @@ async function handleWait(args) {
|
|
|
648
648
|
return EXIT_AUTH;
|
|
649
649
|
}
|
|
650
650
|
async function authStatusLine(timeoutMs = 3e3) {
|
|
651
|
-
const baseUrl =
|
|
652
|
-
const apiKey =
|
|
651
|
+
const baseUrl = _chunkZBQBH4ITjs.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, "");
|
|
652
|
+
const apiKey = _chunkZBQBH4ITjs.resolveApiKeyForBaseUrl.call(void 0, baseUrl);
|
|
653
653
|
if (!apiKey) return `Auth: not connected (${baseUrl})`;
|
|
654
654
|
try {
|
|
655
655
|
const { status, data } = await httpJson(
|
|
@@ -672,9 +672,9 @@ async function authStatusLine(timeoutMs = 3e3) {
|
|
|
672
672
|
}
|
|
673
673
|
}
|
|
674
674
|
async function handleStatus(args) {
|
|
675
|
-
const baseUrl =
|
|
675
|
+
const baseUrl = _chunkZBQBH4ITjs.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, "");
|
|
676
676
|
const reveal = args.includes("--reveal");
|
|
677
|
-
const jsonOutput =
|
|
677
|
+
const jsonOutput = _chunkMAMEKGLIjs.argsWantJson.call(void 0, args);
|
|
678
678
|
const hasExplicitAuthScope = args.includes("--auth-scope");
|
|
679
679
|
let authScope = null;
|
|
680
680
|
if (hasExplicitAuthScope) {
|
|
@@ -715,14 +715,14 @@ async function handleStatus(args) {
|
|
|
715
715
|
};
|
|
716
716
|
hostLines.push(`Host: ${baseUrl} (unreachable)`);
|
|
717
717
|
}
|
|
718
|
-
const apiKey = authScope === "folder" ?
|
|
718
|
+
const apiKey = authScope === "folder" ? _chunkZBQBH4ITjs.resolveProjectApiKeyForBaseUrl.call(void 0, baseUrl) : authScope === "global" ? _chunkZBQBH4ITjs.resolveGlobalApiKeyForBaseUrl.call(void 0, baseUrl) : _chunkZBQBH4ITjs.resolveApiKeyForBaseUrl.call(void 0, baseUrl);
|
|
719
719
|
if (!apiKey) {
|
|
720
720
|
const { claim: pendingClaim } = resolvePendingAuthClaimForResume(
|
|
721
721
|
baseUrl,
|
|
722
722
|
_nullishCoalesce(authScope, () => ( void 0))
|
|
723
723
|
);
|
|
724
724
|
if (pendingClaim) {
|
|
725
|
-
|
|
725
|
+
_chunkMAMEKGLIjs.printCommandEnvelope.call(void 0,
|
|
726
726
|
{
|
|
727
727
|
..._nullishCoalesce(hostStatusPayload, () => ( { host: baseUrl })),
|
|
728
728
|
status: "pending",
|
|
@@ -743,7 +743,7 @@ async function handleStatus(args) {
|
|
|
743
743
|
);
|
|
744
744
|
return EXIT_OK;
|
|
745
745
|
}
|
|
746
|
-
|
|
746
|
+
_chunkMAMEKGLIjs.printCommandEnvelope.call(void 0,
|
|
747
747
|
{
|
|
748
748
|
..._nullishCoalesce(hostStatusPayload, () => ( { host: baseUrl })),
|
|
749
749
|
status: "not connected",
|
|
@@ -776,7 +776,7 @@ async function handleStatus(args) {
|
|
|
776
776
|
}
|
|
777
777
|
);
|
|
778
778
|
if (status === 401 || status === 403) {
|
|
779
|
-
|
|
779
|
+
_chunkMAMEKGLIjs.printCommandEnvelope.call(void 0,
|
|
780
780
|
{
|
|
781
781
|
..._nullishCoalesce(hostStatusPayload, () => ( { host: baseUrl })),
|
|
782
782
|
status: "unauthorized",
|
|
@@ -803,7 +803,7 @@ async function handleStatus(args) {
|
|
|
803
803
|
console.error(`Auth status error (status ${status}).`);
|
|
804
804
|
return EXIT_SERVER;
|
|
805
805
|
}
|
|
806
|
-
const resolvedAuthScope = _nullishCoalesce(authScope, () => ( (
|
|
806
|
+
const resolvedAuthScope = _nullishCoalesce(authScope, () => ( (_chunkZBQBH4ITjs.getResolvedProjectAuthSource.call(void 0, baseUrl, apiKey) ? "folder" : "global")));
|
|
807
807
|
clearSatisfiedPendingClaim(
|
|
808
808
|
baseUrl,
|
|
809
809
|
resolvedAuthScope,
|
|
@@ -831,28 +831,28 @@ async function handleStatus(args) {
|
|
|
831
831
|
if (apiKeyResp) {
|
|
832
832
|
saveEnvValues(
|
|
833
833
|
{
|
|
834
|
-
[
|
|
835
|
-
[
|
|
834
|
+
[_chunkZBQBH4ITjs.HOST_URL_ENV]: baseUrl,
|
|
835
|
+
[_chunkZBQBH4ITjs.API_KEY_ENV]: apiKeyResp,
|
|
836
836
|
...activeOrgEnvValues(data)
|
|
837
837
|
},
|
|
838
838
|
baseUrl,
|
|
839
839
|
resolvedAuthScope
|
|
840
840
|
);
|
|
841
841
|
if (resolvedAuthScope === "folder") {
|
|
842
|
-
const target =
|
|
842
|
+
const target = _chunkZBQBH4ITjs.resolveProjectPinTarget.call(void 0, );
|
|
843
843
|
savedApiKeyPath = target.ok ? _path.join.call(void 0, target.dir, ".env.deepline") : null;
|
|
844
844
|
} else {
|
|
845
845
|
savedApiKeyPath = envFilePath(baseUrl);
|
|
846
846
|
}
|
|
847
847
|
}
|
|
848
|
-
} else if (resolvedAuthScope === "folder" ||
|
|
849
|
-
saveEnvValues(
|
|
848
|
+
} else if (resolvedAuthScope === "folder" || _chunkZBQBH4ITjs.storedHostApiKey.call(void 0, baseUrl) === apiKey) {
|
|
849
|
+
saveEnvValues(_chunkZBQBH4ITjs.featureEnvValues.call(void 0, data), baseUrl, resolvedAuthScope);
|
|
850
850
|
}
|
|
851
|
-
|
|
851
|
+
_chunkMAMEKGLIjs.printCommandEnvelope.call(void 0,
|
|
852
852
|
{
|
|
853
853
|
...payload,
|
|
854
|
-
...
|
|
855
|
-
command_context:
|
|
854
|
+
..._chunkPHO53W67js.detectAgentRuntime.call(void 0, ) !== "unknown" ? {
|
|
855
|
+
command_context: _chunkZBQBH4ITjs.resolveCliCommandContext.call(void 0,
|
|
856
856
|
{ baseUrl, apiKey },
|
|
857
857
|
resolvedAuthScope
|
|
858
858
|
)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkMAMEKGLIjs = require('./chunk-MAMEKGLI.js');
|
|
4
4
|
|
|
5
5
|
// src/cli/maintenance-policy.ts
|
|
6
6
|
var _commander = require('commander');
|
|
@@ -33,7 +33,7 @@ function recordCliTrace(event) {
|
|
|
33
33
|
sinceStartMs: now - cliTraceStartedAt,
|
|
34
34
|
...event
|
|
35
35
|
};
|
|
36
|
-
|
|
36
|
+
_chunkMAMEKGLIjs.writeRawStderr.call(void 0, `[cli-trace] ${JSON.stringify(payload)}
|
|
37
37
|
`);
|
|
38
38
|
}
|
|
39
39
|
async function traceCliSpan(phase, fields, run) {
|
|
@@ -276,6 +276,21 @@ function buildEmailStatus({
|
|
|
276
276
|
|
|
277
277
|
// ../plays/field-catalog.ts
|
|
278
278
|
var value = (description) => ({ type: "string", description });
|
|
279
|
+
var count = (description) => ({ type: "number", description });
|
|
280
|
+
var date = (description) => ({
|
|
281
|
+
type: "string",
|
|
282
|
+
description: `${description} An ISO 8601 date.`
|
|
283
|
+
});
|
|
284
|
+
var LOCATION = {
|
|
285
|
+
description: "Where it is. Without a kind, a location in some form.",
|
|
286
|
+
leaves: { value: value("The location.") },
|
|
287
|
+
kinds: {
|
|
288
|
+
country: "The country.",
|
|
289
|
+
region: "The state, province or region.",
|
|
290
|
+
city: "The city.",
|
|
291
|
+
address: "The full street address."
|
|
292
|
+
}
|
|
293
|
+
};
|
|
279
294
|
var SOURCE = {
|
|
280
295
|
type: "string",
|
|
281
296
|
description: "The provider or step that found it."
|
|
@@ -303,6 +318,10 @@ var FIELD_CATALOG = {
|
|
|
303
318
|
type: "EmailStatus",
|
|
304
319
|
description: "The validation verdict and its signals."
|
|
305
320
|
},
|
|
321
|
+
available: {
|
|
322
|
+
type: "boolean",
|
|
323
|
+
description: "Whether the provider has an address it could reveal, without the address itself."
|
|
324
|
+
},
|
|
306
325
|
source: SOURCE
|
|
307
326
|
},
|
|
308
327
|
kinds: {
|
|
@@ -322,6 +341,10 @@ var FIELD_CATALOG = {
|
|
|
322
341
|
type: '"valid" | "invalid" | "unknown"',
|
|
323
342
|
description: "The validation verdict."
|
|
324
343
|
},
|
|
344
|
+
available: {
|
|
345
|
+
type: "boolean",
|
|
346
|
+
description: "Whether the provider has a number it could reveal, without the number itself."
|
|
347
|
+
},
|
|
325
348
|
line_type: value("Mobile, landline, VoIP and so on."),
|
|
326
349
|
carrier: value("The carrier serving the number."),
|
|
327
350
|
source: SOURCE
|
|
@@ -358,9 +381,17 @@ var FIELD_CATALOG = {
|
|
|
358
381
|
change_status: {
|
|
359
382
|
type: "JobChangeStatus",
|
|
360
383
|
description: "The job-change verdict alone."
|
|
361
|
-
}
|
|
384
|
+
},
|
|
385
|
+
seniority: value("How senior the role is, such as director or VP."),
|
|
386
|
+
department: value("The department or function, such as sales."),
|
|
387
|
+
started_at: date("When they started the role.")
|
|
362
388
|
}
|
|
363
389
|
},
|
|
390
|
+
location: LOCATION,
|
|
391
|
+
skills: {
|
|
392
|
+
description: "Skills the person lists. Usually several: read `.values`.",
|
|
393
|
+
leaves: { value: value("One skill.") }
|
|
394
|
+
},
|
|
364
395
|
record: {
|
|
365
396
|
description: "A provider's own record of the person.",
|
|
366
397
|
leaves: { id: value("The provider's id for the person.") }
|
|
@@ -382,7 +413,10 @@ var FIELD_CATALOG = {
|
|
|
382
413
|
},
|
|
383
414
|
linkedin: {
|
|
384
415
|
description: "The company's LinkedIn page.",
|
|
385
|
-
leaves: {
|
|
416
|
+
leaves: {
|
|
417
|
+
url: value("The page URL."),
|
|
418
|
+
id: value("LinkedIn's numeric id or public identifier for the page.")
|
|
419
|
+
}
|
|
386
420
|
},
|
|
387
421
|
phone: {
|
|
388
422
|
description: "A phone number for the company.",
|
|
@@ -392,6 +426,40 @@ var FIELD_CATALOG = {
|
|
|
392
426
|
description: "The industry the company is in.",
|
|
393
427
|
leaves: { value: value("The industry.") }
|
|
394
428
|
},
|
|
429
|
+
description: {
|
|
430
|
+
description: "What the company does, in its own or a provider's words.",
|
|
431
|
+
leaves: { value: value("The description.") }
|
|
432
|
+
},
|
|
433
|
+
location: LOCATION,
|
|
434
|
+
headcount: {
|
|
435
|
+
description: "How many people work there. Without a kind, a count in some form.",
|
|
436
|
+
leaves: { value: value("The headcount.") },
|
|
437
|
+
kinds: {
|
|
438
|
+
exact: "A single number of employees.",
|
|
439
|
+
range: "A range such as 51-200."
|
|
440
|
+
}
|
|
441
|
+
},
|
|
442
|
+
funding: {
|
|
443
|
+
description: "Money the company has raised.",
|
|
444
|
+
groups: {
|
|
445
|
+
total: {
|
|
446
|
+
description: "Everything raised to date.",
|
|
447
|
+
leaves: { value: count("The total, in US dollars.") }
|
|
448
|
+
},
|
|
449
|
+
last_round: {
|
|
450
|
+
description: "The most recent funding round.",
|
|
451
|
+
leaves: {
|
|
452
|
+
type: value("The round type, such as Series A."),
|
|
453
|
+
amount: count("The amount raised, in US dollars."),
|
|
454
|
+
date: date("When it was announced.")
|
|
455
|
+
}
|
|
456
|
+
}
|
|
457
|
+
}
|
|
458
|
+
},
|
|
459
|
+
technologies: {
|
|
460
|
+
description: "Technologies the company uses. Usually several: read `.values`.",
|
|
461
|
+
leaves: { value: value("One technology.") }
|
|
462
|
+
},
|
|
395
463
|
record: {
|
|
396
464
|
description: "A provider's own record of the company.",
|
|
397
465
|
leaves: { id: value("The provider's id for the company.") }
|
|
@@ -400,10 +468,16 @@ var FIELD_CATALOG = {
|
|
|
400
468
|
job: {
|
|
401
469
|
posting: {
|
|
402
470
|
description: "A job posting.",
|
|
471
|
+
leaves: { url: value("The posting's page.") },
|
|
403
472
|
groups: {
|
|
404
473
|
title: {
|
|
405
474
|
description: "The posting's title. Not a person's job title.",
|
|
406
475
|
leaves: { value: value("The title.") }
|
|
476
|
+
},
|
|
477
|
+
location: LOCATION,
|
|
478
|
+
posted_at: {
|
|
479
|
+
description: "When the posting was published.",
|
|
480
|
+
leaves: { value: date("The date.") }
|
|
407
481
|
}
|
|
408
482
|
}
|
|
409
483
|
}
|
|
@@ -419,6 +493,10 @@ var FIELD_CATALOG = {
|
|
|
419
493
|
}
|
|
420
494
|
},
|
|
421
495
|
post: {
|
|
496
|
+
url: {
|
|
497
|
+
description: "A social or business post's own page.",
|
|
498
|
+
leaves: { value: value("The URL.") }
|
|
499
|
+
},
|
|
422
500
|
title: {
|
|
423
501
|
description: "A social or business post's title.",
|
|
424
502
|
leaves: { value: value("The title.") }
|
|
@@ -437,6 +515,10 @@ var FIELD_CATALOG = {
|
|
|
437
515
|
title: {
|
|
438
516
|
description: "A web page's title.",
|
|
439
517
|
leaves: { value: value("The title.") }
|
|
518
|
+
},
|
|
519
|
+
url: {
|
|
520
|
+
description: "A web page's address, when it is not a known profile.",
|
|
521
|
+
leaves: { value: value("The URL.") }
|
|
440
522
|
}
|
|
441
523
|
},
|
|
442
524
|
// Some entity's value, when a tool cannot say whether it is a person's or a
|
|
@@ -551,8 +633,12 @@ function fieldOfName(name, declared) {
|
|
|
551
633
|
if (declared === void 0) {
|
|
552
634
|
return meanings.length === 1 ? meanings[0] : void 0;
|
|
553
635
|
}
|
|
636
|
+
if (!isSharedName(name)) return isFieldId(declared) ? declared : void 0;
|
|
554
637
|
return isOtherThing(declared) || meanings.some((meaning) => relatedFields(declared, meaning)) ? declared : void 0;
|
|
555
638
|
}
|
|
639
|
+
function isSharedName(name) {
|
|
640
|
+
return Object.hasOwn(EXTRACTOR_TARGET_FIELDS, name);
|
|
641
|
+
}
|
|
556
642
|
function nameMeanings(name) {
|
|
557
643
|
return _nullishCoalesce(EXTRACTOR_TARGET_FIELDS[name], () => ( []));
|
|
558
644
|
}
|
|
@@ -590,7 +676,7 @@ function resolveFieldName(name, bindings, outputs = []) {
|
|
|
590
676
|
if (isFieldId(name)) return viaId(name);
|
|
591
677
|
const own = bindings.find((binding) => binding.name === name);
|
|
592
678
|
if (own) {
|
|
593
|
-
return nameMeanings(name).some((id) => relatedFields(own.id, id)) ? byId.get(own.id) : void 0;
|
|
679
|
+
return !isSharedName(name) || nameMeanings(name).some((id) => relatedFields(own.id, id)) ? byId.get(own.id) : void 0;
|
|
594
680
|
}
|
|
595
681
|
if (outputs.includes(name)) return void 0;
|
|
596
682
|
const found = nameMeanings(name).flatMap((id) => {
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
formatModelDescription,
|
|
4
4
|
publicToolSchemas,
|
|
5
5
|
toolMetadataJsonForDescribe
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-KSHAFYYG.mjs";
|
|
7
7
|
import {
|
|
8
8
|
buildPlayDashboardUrl,
|
|
9
9
|
byokLines,
|
|
@@ -82,6 +82,13 @@ async function describeFeature(tool, feature, value, dependencies) {
|
|
|
82
82
|
}
|
|
83
83
|
|
|
84
84
|
// src/cli/describe-core.ts
|
|
85
|
+
var DOCS_URL = "https://deepline.com/docs";
|
|
86
|
+
var SKILLS_URL = "https://code.deepline.com/.well-known/skills";
|
|
87
|
+
function docUrl(path) {
|
|
88
|
+
if (!path.startsWith("skills/")) return `${DOCS_URL}/${path}`;
|
|
89
|
+
const skillPath = path.slice("skills/".length);
|
|
90
|
+
return skillPath.includes("/") ? `${SKILLS_URL}/${skillPath}.md` : `${SKILLS_URL}/${skillPath}/SKILL.md`;
|
|
91
|
+
}
|
|
85
92
|
var FILTER_OF = {
|
|
86
93
|
tool: "tools",
|
|
87
94
|
monitor_type: "monitors",
|
|
@@ -102,6 +109,16 @@ async function found(lookup) {
|
|
|
102
109
|
function describeLookupsFor(client) {
|
|
103
110
|
return {
|
|
104
111
|
play: (reference) => found(client.describePlay(reference)),
|
|
112
|
+
doc: async (url) => {
|
|
113
|
+
const markdownUrl = url.endsWith(".md") ? url : `${url}.md`;
|
|
114
|
+
const response = await fetch(markdownUrl);
|
|
115
|
+
if (response.status === 404) return null;
|
|
116
|
+
if (!response.ok)
|
|
117
|
+
throw new Error(
|
|
118
|
+
`Could not read ${markdownUrl}: HTTP ${response.status}`
|
|
119
|
+
);
|
|
120
|
+
return response.text();
|
|
121
|
+
},
|
|
105
122
|
tool: (name) => found(client.getTool(name)),
|
|
106
123
|
describeModel: (model) => client.describeModel(model),
|
|
107
124
|
baseUrl: client.baseUrl
|
|
@@ -168,6 +185,16 @@ async function findNamed(reference, options, lookups) {
|
|
|
168
185
|
return { chosen, shadowed };
|
|
169
186
|
}
|
|
170
187
|
async function describeName(name, options, lookups) {
|
|
188
|
+
if (name.startsWith("docs/") && !options.kinds) {
|
|
189
|
+
const url = docUrl(name.slice("docs/".length));
|
|
190
|
+
const markdown = await lookups.doc(url);
|
|
191
|
+
if (markdown === null) return { status: "missing" };
|
|
192
|
+
return {
|
|
193
|
+
status: "described",
|
|
194
|
+
envelope: { kind: "doc", id: name, url, markdown },
|
|
195
|
+
lines: [`${name} [doc]`, url, "", markdown]
|
|
196
|
+
};
|
|
197
|
+
}
|
|
171
198
|
const { chosen, shadowed } = await findNamed(name, options, lookups);
|
|
172
199
|
if (!chosen) return { status: "missing" };
|
|
173
200
|
const { described, record } = chosen;
|