deepline 0.3.566 → 0.3.568
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 +33 -0
- package/dist/bundling-sources/sdk/src/release.ts +1 -1
- package/dist/bundling-sources/shared_libs/monitors/provider-monitor-capability.ts +21 -0
- package/dist/bundling-sources/shared_libs/observability/scheduled-jobs.json +18 -0
- package/dist/cli/{auth-HSFDBHVB.mjs → auth-AV6JJ2Y6.mjs} +5 -5
- package/dist/cli/auth-IPONFGG7.js +44 -0
- package/dist/cli/{billing-NG5W2PDU.js → billing-3RUXM4OW.js} +102 -102
- package/dist/cli/{billing-6T7HH6DE.mjs → billing-3RVJZROW.mjs} +9 -9
- package/dist/cli/{chunk-H6BQIQEJ.js → chunk-2BWPNLYG.js} +9 -9
- package/dist/cli/{chunk-6F6DMBEJ.js → chunk-4PAGRUZA.js} +15 -15
- package/dist/cli/{chunk-FUTXULX5.mjs → chunk-4QGZUHDF.mjs} +5 -5
- package/dist/cli/{chunk-VRWMQUFO.js → chunk-5KDMJLQX.js} +5 -5
- package/dist/cli/{chunk-TVGGBQFG.js → chunk-5KHSPLPO.js} +20 -20
- package/dist/cli/{chunk-GY7MY2IJ.js → chunk-5NBR7V5U.js} +1 -1
- package/dist/cli/{chunk-AGDRIXF2.mjs → chunk-5SOJGKQM.mjs} +1 -1
- package/dist/cli/{chunk-L2P3672R.js → chunk-7X34FUYS.js} +7 -7
- package/dist/cli/{chunk-SR7IUISM.mjs → chunk-AAXGFMYQ.mjs} +19 -1
- package/dist/cli/{chunk-PRM3WYG7.js → chunk-ANRKUFUG.js} +100 -100
- package/dist/cli/{chunk-E44TMICV.mjs → chunk-BXNCAZ7G.mjs} +1 -1
- package/dist/cli/{chunk-FXSDDRVX.js → chunk-D2DYHEH7.js} +23 -23
- package/dist/cli/{chunk-CQX5MWHH.js → chunk-DIPM4GTS.js} +5 -5
- package/dist/cli/{chunk-EIYQIY3C.js → chunk-F62RQL3X.js} +3 -3
- package/dist/cli/{chunk-P7Q27COZ.mjs → chunk-FQIOTHEZ.mjs} +1 -1
- package/dist/cli/{chunk-KOMEYB7H.mjs → chunk-G7GN3RGE.mjs} +1 -0
- package/dist/cli/{chunk-TYKMBPNE.mjs → chunk-GLTA22I3.mjs} +65 -3
- package/dist/cli/{chunk-3PNU3FEI.mjs → chunk-GXSJTCCG.mjs} +4 -4
- package/dist/cli/{chunk-CXK6ZEOQ.js → chunk-H4BU2RRU.js} +26 -8
- package/dist/cli/{chunk-MEBKPVHE.mjs → chunk-HQX2P4NH.mjs} +1 -1
- package/dist/cli/{chunk-AHELFBG5.js → chunk-JIEUKZ7J.js} +2 -2
- package/dist/cli/{chunk-ILTX6ZAH.js → chunk-JJSKWDUI.js} +6 -6
- package/dist/cli/{chunk-OFEARTQO.mjs → chunk-JPSKSXNS.mjs} +2 -2
- package/dist/cli/{chunk-JSVNTY47.js → chunk-JRTB75JO.js} +75 -13
- package/dist/cli/{chunk-KCD4LM2D.mjs → chunk-JT7S45KT.mjs} +3 -3
- package/dist/cli/{chunk-MIS3V2C3.js → chunk-KKIDGS7O.js} +10 -10
- package/dist/cli/{chunk-QBX4UJMY.mjs → chunk-KMWH6VY2.mjs} +2 -2
- package/dist/cli/{chunk-Z5BLACQ3.js → chunk-LKXBFVYU.js} +53 -53
- package/dist/cli/{chunk-PLXQIHRM.mjs → chunk-LQTLFFUB.mjs} +2 -2
- package/dist/cli/{chunk-CSXMBYEW.mjs → chunk-M3IMARRH.mjs} +1 -1
- package/dist/cli/{chunk-L5N4DSH4.mjs → chunk-MOJOAX3X.mjs} +3 -3
- package/dist/cli/{chunk-ZYXQIOWE.js → chunk-O4FCX6BS.js} +3 -3
- package/dist/cli/{chunk-YJEBAR3C.js → chunk-OWSTUCIB.js} +5 -5
- package/dist/cli/{chunk-RUVYG5TT.js → chunk-PE2XN2VM.js} +2 -2
- package/dist/cli/{chunk-7GLVIFDO.js → chunk-PPQHQ4J2.js} +48 -48
- package/dist/cli/{chunk-KKC7U4UJ.mjs → chunk-QVERY22Q.mjs} +2 -2
- package/dist/cli/{chunk-ARUXRZR4.mjs → chunk-RH3WIX2W.mjs} +2 -2
- package/dist/cli/{chunk-KXGUMGCU.js → chunk-RJJNXV36.js} +20 -20
- package/dist/cli/{chunk-5J6VEC75.js → chunk-RUAEON5J.js} +4 -4
- package/dist/cli/{chunk-OL3WYX7L.js → chunk-RZMU7ISG.js} +26 -26
- package/dist/cli/{chunk-FPKKYS7V.mjs → chunk-S2HGTJET.mjs} +5 -5
- package/dist/cli/{chunk-K3DEHKV7.mjs → chunk-SHO6BOXN.mjs} +11 -11
- package/dist/cli/{chunk-LAQNXNVR.mjs → chunk-SONHOBIK.mjs} +2 -2
- package/dist/cli/{chunk-AIF7ZHCF.mjs → chunk-TM3Z7JXT.mjs} +1 -1
- package/dist/cli/{chunk-AD47OWTE.mjs → chunk-TSNVG3T5.mjs} +1 -1
- package/dist/cli/{chunk-UF5MVM6L.js → chunk-UPUBCTSS.js} +2 -2
- package/dist/cli/{chunk-YFP7YZUU.mjs → chunk-V5WFPMUC.mjs} +4 -4
- package/dist/cli/{chunk-VHRYJACF.mjs → chunk-VEPXXRHO.mjs} +2 -2
- package/dist/cli/{chunk-KDPGBC5U.mjs → chunk-VIMSKO7W.mjs} +5 -5
- package/dist/cli/{chunk-BILFWD6F.mjs → chunk-VVGHZ7S6.mjs} +1 -1
- package/dist/cli/{chunk-RIV2AZLY.mjs → chunk-VW2EUXY2.mjs} +5 -5
- package/dist/cli/{chunk-K5QLALHC.js → chunk-WYXXJA5J.js} +41 -41
- package/dist/cli/{chunk-T3RKLPPS.js → chunk-Y4Q4LQRX.js} +13 -13
- package/dist/cli/{chunk-OEVCKW2M.js → chunk-ZVJ2YNAH.js} +1 -0
- package/dist/cli/command-docs.js +2 -2
- package/dist/cli/command-docs.mjs +1 -1
- package/dist/cli/concurrent-runs-help-66WCD2Y4.js +22 -0
- package/dist/cli/{concurrent-runs-help-TNMN4C74.mjs → concurrent-runs-help-SJ27PPHV.mjs} +6 -6
- package/dist/cli/{csv-77H4JMDW.js → csv-BGXZKS5R.js} +13 -13
- package/dist/cli/{csv-KAZRKSLV.mjs → csv-ZN4QI6PJ.mjs} +4 -4
- package/dist/cli/{db-MM6R2466.js → db-KTAZ5FBG.js} +27 -27
- package/dist/cli/{db-XQQAVLWO.mjs → db-SVBVPMWN.mjs} +6 -6
- package/dist/cli/{describe-P5N56GPA.mjs → describe-4CGCRK24.mjs} +18 -18
- package/dist/cli/describe-M3MOFAVN.js +50 -0
- package/dist/cli/describe-core.d.mts +2 -2
- package/dist/cli/describe-core.d.ts +2 -2
- package/dist/cli/{executions-EGPCT2OK.js → executions-75DO2GBS.js} +8 -8
- package/dist/cli/{executions-EGEQZV5V.mjs → executions-YL5CTGWP.mjs} +6 -6
- package/dist/cli/{feedback-ALMW7OR5.js → feedback-2SMUBQZR.js} +14 -14
- package/dist/cli/{feedback-IWUJAF6O.mjs → feedback-VEA3XJM3.mjs} +6 -6
- package/dist/cli/{git-4CQQWLZP.mjs → git-BEYEHMCX.mjs} +5 -5
- package/dist/cli/git-XDS5BHBG.js +26 -0
- package/dist/cli/index.js +147 -147
- package/dist/cli/index.mjs +46 -46
- package/dist/cli/{integrations-Y7W5L7DW.js → integrations-PIXZBU2N.js} +29 -29
- package/dist/cli/{integrations-LS73NWU7.mjs → integrations-RXWE6WUZ.mjs} +7 -7
- package/dist/cli/{legacy-noops-V45TJGK3.mjs → legacy-noops-PJHP4GRU.mjs} +6 -6
- package/dist/cli/{legacy-noops-WXGSAZ6O.js → legacy-noops-XHVEYEJN.js} +9 -9
- package/dist/cli/{mcp-3QRLMKFF.js → mcp-276ZFIUM.js} +24 -24
- package/dist/cli/{mcp-4IHB3LCG.mjs → mcp-SUOIVUOM.mjs} +4 -4
- package/dist/cli/{monitors-K46XW6QH.mjs → monitors-AVGNLV7V.mjs} +7 -7
- package/dist/cli/{monitors-4I2QDCOV.js → monitors-DGBB7X4G.js} +100 -100
- package/dist/cli/{org-CBJY5DO5.js → org-U5275K5D.js} +121 -121
- package/dist/cli/{org-H3GYWKFC.mjs → org-WKP2BZJQ.mjs} +6 -6
- package/dist/cli/{outcomes-AE6ZPY6O.mjs → outcomes-H3RAH5ES.mjs} +6 -6
- package/dist/cli/{outcomes-KHZ3S3SG.js → outcomes-LSCS6QE5.js} +14 -14
- package/dist/cli/{play-YQS3OI2Q.mjs → play-7MSJU3LP.mjs} +19 -19
- package/dist/cli/{play-SY2PCUMD.js → play-GNT7SITC.js} +324 -324
- package/dist/cli/{providers-IT2YALZM.js → providers-KTEG2ZNS.js} +9 -9
- package/dist/cli/{providers-WJBBSM76.mjs → providers-YDKHHCO4.mjs} +6 -6
- package/dist/cli/{quickstart-TYMROAQG.mjs → quickstart-F6IH43NP.mjs} +4 -4
- package/dist/cli/{quickstart-VMLHHXFD.js → quickstart-T2NJMACU.js} +6 -6
- package/dist/cli/{run-TSOLGWTK.mjs → run-AJB4MQGO.mjs} +23 -23
- package/dist/cli/{run-GQOWNUD2.js → run-MIRJIW45.js} +44 -44
- package/dist/cli/{search-MJAL37NP.mjs → search-V6YPFL6J.mjs} +7 -7
- package/dist/cli/search-YPZ575MY.js +32 -0
- package/dist/cli/{search-output-IKVGU3MZ.mjs → search-output-4VDZLO42.mjs} +4 -4
- package/dist/cli/{search-output-AUVP4ZLR.js → search-output-GGCIICSW.js} +6 -6
- package/dist/cli/{secrets-NO6ZD2OZ.js → secrets-L2VDRZDZ.js} +15 -15
- package/dist/cli/{secrets-4KYGVJJJ.mjs → secrets-XUENPM5D.mjs} +6 -6
- package/dist/cli/sessions-GJLSOVLW.js +23 -0
- package/dist/cli/{sessions-S2O24LRW.mjs → sessions-W7LHEE35.mjs} +6 -6
- package/dist/cli/{settings-NSZNSX67.mjs → settings-IVFOUU7V.mjs} +12 -12
- package/dist/cli/{settings-O5BELZRA.js → settings-NB6Y53VR.js} +85 -85
- package/dist/cli/{setup-IGJKIVJ7.js → setup-2F42I4HW.js} +49 -49
- package/dist/cli/{setup-3VTTPHKI.mjs → setup-QUL7OO6A.mjs} +9 -9
- package/dist/cli/skills-2KAEOH2N.js +37 -0
- package/dist/cli/{skills-JMSX77S3.mjs → skills-SL3DNAH6.mjs} +7 -7
- package/dist/cli/{tools-MITGT2JM.mjs → tools-TD5EJ2UD.mjs} +17 -17
- package/dist/cli/tools-W6223Q4W.js +57 -0
- package/dist/cli/update-IZBYF422.js +37 -0
- package/dist/cli/{update-YXASQQWE.mjs → update-Z53GM6PX.mjs} +9 -9
- package/dist/cli/{views-Y5CA3JWP.js → views-VAQGFKXN.js} +21 -21
- package/dist/cli/{views-7ZMS2B55.mjs → views-ZB6AOING.mjs} +6 -6
- package/dist/cli/{workflow-GBXWHYDL.mjs → workflow-OKDLEK3G.mjs} +7 -7
- package/dist/cli/{workflow-U7KXZLKI.js → workflow-PSIQ5HVP.js} +17 -17
- package/dist/{client-vUZGmXT9.d.ts → client-B8_eh5F-.d.ts} +1 -1
- package/dist/{client-B5cSKEi4.d.mts → client-D5mo-R-t.d.mts} +1 -1
- package/dist/{client-core-BP19BoBb.d.mts → client-core-BPu-brbA.d.mts} +19 -0
- package/dist/{client-core-Deqov12F.d.ts → client-core-Br12Asu-.d.ts} +19 -0
- package/dist/index.d.mts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +9 -9
- package/dist/index.mjs +6 -6
- package/dist/install-integrity.json +118 -118
- 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/dist/server.d.mts +2 -2
- package/dist/server.d.ts +2 -2
- package/dist/server.js +5 -5
- package/dist/server.mjs +3 -3
- package/package.json +1 -1
- package/dist/cli/auth-RGFZEMFX.js +0 -44
- package/dist/cli/concurrent-runs-help-3QVRXAZG.js +0 -22
- package/dist/cli/describe-H43UIBVP.js +0 -50
- package/dist/cli/git-UYYH53Q6.js +0 -26
- package/dist/cli/search-B23QXBNF.js +0 -32
- package/dist/cli/sessions-DJLG57FC.js +0 -23
- package/dist/cli/skills-76W4VCHP.js +0 -37
- package/dist/cli/tools-OS32SFJD.js +0 -57
- package/dist/cli/update-UGLA7TLH.js +0 -37
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunk5KDMJLQXjs = require('./chunk-5KDMJLQX.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunk5KHSPLPOjs = require('./chunk-5KHSPLPO.js');
|
|
7
7
|
|
|
8
8
|
// src/cli/commands/integration-commands.ts
|
|
9
9
|
var _commander = require('commander');
|
|
10
10
|
var _fs = require('fs');
|
|
11
11
|
var _path = require('path');
|
|
12
12
|
function printIntegrationResult(value, json, lines, nextCursor) {
|
|
13
|
-
|
|
13
|
+
_chunk5KHSPLPOjs.printCommandEnvelope.call(void 0,
|
|
14
14
|
{},
|
|
15
15
|
{
|
|
16
16
|
json: json || void 0,
|
|
@@ -26,7 +26,7 @@ function registerIntegrationBalanceCommand(parent, hidden = false) {
|
|
|
26
26
|
return parent.command("balance <provider>", { hidden }).description(
|
|
27
27
|
"Read a fresh balance using this org\u2019s own provider connection (LeadMagic)."
|
|
28
28
|
).option("--json", "Print the balance and observation timestamp as JSON").action(async (provider, options) => {
|
|
29
|
-
const balance = await new (0,
|
|
29
|
+
const balance = await new (0, _chunk5KDMJLQXjs.DeeplineClient)().getIntegrationBalance(
|
|
30
30
|
provider
|
|
31
31
|
);
|
|
32
32
|
printIntegrationResult(balance, options.json, [
|
|
@@ -40,7 +40,7 @@ function registerWorkspaceConnectionListCommand(parent, name = "workspace-connec
|
|
|
40
40
|
"List teammates\u2019 personal connections for this provider"
|
|
41
41
|
).option("--cursor <cursor>", "Read the next page of members").action(
|
|
42
42
|
async (options) => {
|
|
43
|
-
const client = new (0,
|
|
43
|
+
const client = new (0, _chunk5KDMJLQXjs.DeeplineClient)();
|
|
44
44
|
if (name === "list" && options.cursor && !options.members)
|
|
45
45
|
throw new Error(
|
|
46
46
|
"Use --cursor with --members to continue a member page."
|
|
@@ -82,7 +82,7 @@ function registerWorkspaceConnectionListCommand(parent, name = "workspace-connec
|
|
|
82
82
|
}
|
|
83
83
|
function registerLegacyHubSpotMembersCommand(parent, hidden = false) {
|
|
84
84
|
return parent.command("hubspot-members", { hidden }).description("List personal HubSpot connection status for org members.").option("--cursor <cursor>", "Read the next roster page").option("--json", "Print the roster page as JSON").action(async (options) => {
|
|
85
|
-
const page = await new (0,
|
|
85
|
+
const page = await new (0, _chunk5KDMJLQXjs.DeeplineClient)().listPersonalHubSpotMembers(
|
|
86
86
|
options.cursor
|
|
87
87
|
);
|
|
88
88
|
const rows = page.members.map((member) => {
|
|
@@ -108,7 +108,7 @@ function registerLegacyWorkspaceConnectionCommand(parent, hidden = false) {
|
|
|
108
108
|
);
|
|
109
109
|
if (options.autoName && (action !== "connect" || options.name !== void 0))
|
|
110
110
|
throw new Error("Use --auto-name with connect and omit --name.");
|
|
111
|
-
const client = new (0,
|
|
111
|
+
const client = new (0, _chunk5KDMJLQXjs.DeeplineClient)();
|
|
112
112
|
const { connections } = action === "connect" ? { connections: [] } : options.name ? await client.listWorkspaceConnectionInventory(provider) : await client.listWorkspaceIntegrationConnections();
|
|
113
113
|
const row = connections.find(
|
|
114
114
|
(connection) => connection.provider === provider && (!("type" in connection) || connection.type === "oauth") && (options.name === void 0 || "name" in connection && connection.name === options.name)
|
|
@@ -141,7 +141,7 @@ function registerLegacyCalendarDelegationCommand(parent, hidden = false) {
|
|
|
141
141
|
"Print the proposed change without contacting Google or saving it"
|
|
142
142
|
).option("--json", "Print the result as JSON").action(
|
|
143
143
|
async (action, options) => {
|
|
144
|
-
const client = new (0,
|
|
144
|
+
const client = new (0, _chunk5KDMJLQXjs.DeeplineClient)();
|
|
145
145
|
if (action === "list") {
|
|
146
146
|
const inventory = await client.listCalendarAvailabilityConnections();
|
|
147
147
|
const approvals = _optionalChain([inventory, 'access', _3 => _3.approvals, 'optionalAccess', _4 => _4.length]) ? inventory.approvals.map(
|
|
@@ -291,7 +291,7 @@ function registerLegacyCalendarDelegationCommand(parent, hidden = false) {
|
|
|
291
291
|
}
|
|
292
292
|
function registerLegacyAvailabilityCalendarsCommand(parent, hidden = false) {
|
|
293
293
|
return parent.command("availability-calendars", { hidden }).description("Calendar discovery compatibility command for the pilot.").option("--cursor <cursor>", "Legacy calendar page cursor").option("--json", "Print the response as JSON").action(async (options) => {
|
|
294
|
-
const page = await new (0,
|
|
294
|
+
const page = await new (0, _chunk5KDMJLQXjs.DeeplineClient)().listAvailabilityCalendars(
|
|
295
295
|
options.cursor
|
|
296
296
|
);
|
|
297
297
|
printIntegrationResult(page, options.json, [
|
|
@@ -312,8 +312,20 @@ function registerIntegrationConnectCommand(parent, defaultLink = false, hidden =
|
|
|
312
312
|
"preset",
|
|
313
313
|
"scopes",
|
|
314
314
|
"optionalScopes",
|
|
315
|
-
"expectedConnectionId"
|
|
315
|
+
"expectedConnectionId",
|
|
316
|
+
"managed"
|
|
316
317
|
])
|
|
318
|
+
).addOption(
|
|
319
|
+
new (0, _commander.Option)(
|
|
320
|
+
"--managed",
|
|
321
|
+
"Connect with a Deepline-managed key instead of your own (Lusha)"
|
|
322
|
+
).conflicts(["credentialsFile", "oauth"])
|
|
323
|
+
).option(
|
|
324
|
+
"--accept-terms <version>",
|
|
325
|
+
"With --managed: accept this version of the provider's terms"
|
|
326
|
+
).option("--company-domain <domain>", "With --managed: company domain").option("--company-legal-name <name>", "With --managed: company legal name").option(
|
|
327
|
+
"--company-country <code>",
|
|
328
|
+
"With --managed: two-letter ISO country code"
|
|
317
329
|
).option(
|
|
318
330
|
"--credentials-file <path>",
|
|
319
331
|
"JSON object of credential field names and string values; keep this file private"
|
|
@@ -325,6 +337,56 @@ function registerIntegrationConnectCommand(parent, defaultLink = false, hidden =
|
|
|
325
337
|
"Print the proposed setup without saving credentials or starting OAuth"
|
|
326
338
|
).option("--json", "Print JSON without credential values").action(
|
|
327
339
|
async (provider, options) => {
|
|
340
|
+
const managedOnlyOptionSet = options.acceptTerms !== void 0 || options.companyDomain !== void 0 || options.companyLegalName !== void 0 || options.companyCountry !== void 0;
|
|
341
|
+
if (managedOnlyOptionSet && !options.managed) {
|
|
342
|
+
throw new Error(
|
|
343
|
+
"--accept-terms and --company-* options require --managed."
|
|
344
|
+
);
|
|
345
|
+
}
|
|
346
|
+
if (options.managed) {
|
|
347
|
+
if (!options.companyDomain || !options.companyLegalName || !options.companyCountry) {
|
|
348
|
+
throw new Error(
|
|
349
|
+
"--managed requires --company-domain, --company-legal-name and --company-country."
|
|
350
|
+
);
|
|
351
|
+
}
|
|
352
|
+
if (options.dryRun) {
|
|
353
|
+
printSetupPlan(
|
|
354
|
+
{
|
|
355
|
+
provider,
|
|
356
|
+
action: "connect_managed",
|
|
357
|
+
terms_version: _nullishCoalesce(options.acceptTerms, () => ( "not accepted")),
|
|
358
|
+
company_domain: options.companyDomain
|
|
359
|
+
},
|
|
360
|
+
options.json
|
|
361
|
+
);
|
|
362
|
+
return;
|
|
363
|
+
}
|
|
364
|
+
const result2 = await new (0, _chunk5KDMJLQXjs.DeeplineClient)().connectManagedIntegration(
|
|
365
|
+
provider,
|
|
366
|
+
{
|
|
367
|
+
termsVersion: options.acceptTerms,
|
|
368
|
+
company: {
|
|
369
|
+
domain: options.companyDomain,
|
|
370
|
+
legalName: options.companyLegalName,
|
|
371
|
+
country: options.companyCountry
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
);
|
|
375
|
+
if (!result2.ok || result2.credential_saved !== true) {
|
|
376
|
+
throw new Error(
|
|
377
|
+
"The API did not confirm the managed connection. Inspect the integration before retrying."
|
|
378
|
+
);
|
|
379
|
+
}
|
|
380
|
+
const confirmation2 = {
|
|
381
|
+
provider,
|
|
382
|
+
credential_saved: true,
|
|
383
|
+
credential_mode: "partner_managed"
|
|
384
|
+
};
|
|
385
|
+
printIntegrationResult(confirmation2, options.json, [
|
|
386
|
+
`${provider} is connected in the active workspace with a Deepline-managed key. Usage is billed in Deepline credits.`
|
|
387
|
+
]);
|
|
388
|
+
return;
|
|
389
|
+
}
|
|
328
390
|
if (options.expectedConnectionId !== void 0 && (!options.expectedConnectionId.trim() || provider !== "google_calendar_availability" || !options.credentialsFile || options.oauth)) {
|
|
329
391
|
throw new Error(
|
|
330
392
|
"--expected-connection-id requires Calendar availability and a credentials file."
|
|
@@ -335,7 +397,7 @@ function registerIntegrationConnectCommand(parent, defaultLink = false, hidden =
|
|
|
335
397
|
printSetupPlan({ provider, action: "connect_link" }, options.json);
|
|
336
398
|
return;
|
|
337
399
|
}
|
|
338
|
-
const link = await new (0,
|
|
400
|
+
const link = await new (0, _chunk5KDMJLQXjs.DeeplineClient)().getIntegrationConnectLink(
|
|
339
401
|
provider
|
|
340
402
|
);
|
|
341
403
|
printIntegrationResult(link, options.json, [link.connect_url]);
|
|
@@ -362,7 +424,7 @@ function registerIntegrationConnectCommand(parent, defaultLink = false, hidden =
|
|
|
362
424
|
);
|
|
363
425
|
return;
|
|
364
426
|
}
|
|
365
|
-
const result2 = await new (0,
|
|
427
|
+
const result2 = await new (0, _chunk5KDMJLQXjs.DeeplineClient)().startIntegrationOAuth(
|
|
366
428
|
provider,
|
|
367
429
|
{
|
|
368
430
|
...options.preset !== void 0 ? { preset: options.preset } : {},
|
|
@@ -412,7 +474,7 @@ function registerIntegrationConnectCommand(parent, defaultLink = false, hidden =
|
|
|
412
474
|
"--credentials-file must contain a nonempty JSON object of string credential values."
|
|
413
475
|
);
|
|
414
476
|
}
|
|
415
|
-
const result = await new (0,
|
|
477
|
+
const result = await new (0, _chunk5KDMJLQXjs.DeeplineClient)().setIntegrationCredentials(
|
|
416
478
|
provider,
|
|
417
479
|
credentials,
|
|
418
480
|
{ expectedConnectionId: options.expectedConnectionId }
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
rejectRestrictedFeedback
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-TM3Z7JXT.mjs";
|
|
4
4
|
import {
|
|
5
5
|
getAuthedHttpClient,
|
|
6
6
|
printCommandEnvelope
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-SONHOBIK.mjs";
|
|
8
8
|
import {
|
|
9
9
|
agentSessionIdFromEnvironment,
|
|
10
10
|
claudeProjectsRoots,
|
|
11
11
|
coworkTranscriptFromEnvironment
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-5SOJGKQM.mjs";
|
|
13
13
|
|
|
14
14
|
// src/cli/commands/sessions.ts
|
|
15
15
|
import {
|
|
@@ -3,16 +3,16 @@
|
|
|
3
3
|
var _chunkD3BCSAN7js = require('./chunk-D3BCSAN7.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunk5KDMJLQXjs = require('./chunk-5KDMJLQX.js');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
var
|
|
11
|
+
var _chunk5KHSPLPOjs = require('./chunk-5KHSPLPO.js');
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
var
|
|
15
|
+
var _chunkO4FCX6BSjs = require('./chunk-O4FCX6BS.js');
|
|
16
16
|
|
|
17
17
|
// src/cli/commands/search.ts
|
|
18
18
|
var _commander = require('commander');
|
|
@@ -22,7 +22,7 @@ var _fs = require('fs');
|
|
|
22
22
|
var _path = require('path');
|
|
23
23
|
var SEARCH_REF_TTL_MS = 15 * 6e4;
|
|
24
24
|
function lastSearchPath() {
|
|
25
|
-
return _path.join.call(void 0,
|
|
25
|
+
return _path.join.call(void 0, _chunkO4FCX6BSjs.sdkCliStateDirPath.call(void 0, _chunkO4FCX6BSjs.resolveConfig.call(void 0, ).baseUrl), "last-search.json");
|
|
26
26
|
}
|
|
27
27
|
function rememberSearchRef(searchRef) {
|
|
28
28
|
writeSearchRefs({ searchRef });
|
|
@@ -132,9 +132,9 @@ async function runSearch(queryInputs, options, types, exclude = []) {
|
|
|
132
132
|
console.error("--summary-width must be an integer of at least 2.");
|
|
133
133
|
return 1;
|
|
134
134
|
}
|
|
135
|
-
const client = new (0,
|
|
135
|
+
const client = new (0, _chunk5KDMJLQXjs.DeeplineClient)();
|
|
136
136
|
const json = options.json === true;
|
|
137
|
-
const renderer = json ? void 0 : await Promise.resolve().then(() => _interopRequireWildcard(require("./search-output-
|
|
137
|
+
const renderer = json ? void 0 : await Promise.resolve().then(() => _interopRequireWildcard(require("./search-output-GGCIICSW.js")));
|
|
138
138
|
const searches = [];
|
|
139
139
|
const chunks = [];
|
|
140
140
|
const refs = /* @__PURE__ */ new Map();
|
|
@@ -157,7 +157,7 @@ async function runSearch(queryInputs, options, types, exclude = []) {
|
|
|
157
157
|
const text = _optionalChain([renderer, 'optionalAccess', _12 => _12.renderSearchResults, 'call', _13 => _13(result, summaryWidth)]);
|
|
158
158
|
if (!multiple) {
|
|
159
159
|
if (searchRef) rememberSearchRef(searchRef);
|
|
160
|
-
|
|
160
|
+
_chunk5KHSPLPOjs.printCommandEnvelope.call(void 0, result, { json, text });
|
|
161
161
|
return 0;
|
|
162
162
|
}
|
|
163
163
|
searches.push({ ...result, query });
|
|
@@ -171,8 +171,8 @@ ${text}`);
|
|
|
171
171
|
}
|
|
172
172
|
} catch (error) {
|
|
173
173
|
if (!multiple) throw error;
|
|
174
|
-
const payload =
|
|
175
|
-
const queryExitCode = _nullishCoalesce(payload.exitCode, () => (
|
|
174
|
+
const payload = _chunk5KHSPLPOjs.errorToJsonPayload.call(void 0, error);
|
|
175
|
+
const queryExitCode = _nullishCoalesce(payload.exitCode, () => ( _chunk5KHSPLPOjs.resolveSdkCliFailureExitCode.call(void 0, error)));
|
|
176
176
|
searches.push({ ...payload, query, exitCode: queryExitCode });
|
|
177
177
|
if (!json) {
|
|
178
178
|
console.error(`${JSON.stringify(query)}: ${payload.error.message}`);
|
|
@@ -184,7 +184,7 @@ Search failed.
|
|
|
184
184
|
}
|
|
185
185
|
}
|
|
186
186
|
rememberSearchRefsByTool(refs);
|
|
187
|
-
|
|
187
|
+
_chunk5KHSPLPOjs.printCommandEnvelope.call(void 0,
|
|
188
188
|
{ searches },
|
|
189
189
|
{
|
|
190
190
|
json,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
PlayClient
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-AAXGFMYQ.mjs";
|
|
4
4
|
import {
|
|
5
5
|
HttpClient,
|
|
6
6
|
resolveConfig
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-TSNVG3T5.mjs";
|
|
8
8
|
|
|
9
9
|
// src/plays/local-play-execution.ts
|
|
10
10
|
function importedNodes(graph) {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _chunk5KHSPLPOjs = require('./chunk-5KHSPLPO.js');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
@@ -22,14 +22,14 @@ var _chunkTVGGBQFGjs = require('./chunk-TVGGBQFG.js');
|
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
|
|
25
|
-
var
|
|
25
|
+
var _chunkO4FCX6BSjs = require('./chunk-O4FCX6BS.js');
|
|
26
26
|
|
|
27
27
|
|
|
28
28
|
|
|
29
29
|
|
|
30
30
|
|
|
31
31
|
|
|
32
|
-
var
|
|
32
|
+
var _chunkRUAEON5Jjs = require('./chunk-RUAEON5J.js');
|
|
33
33
|
|
|
34
34
|
|
|
35
35
|
var _chunkLFQJW4S2js = require('./chunk-LFQJW4S2.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 _chunkO4FCX6BSjs.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 = _chunkO4FCX6BSjs.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 `${_chunkO4FCX6BSjs.hostConfigDirPath.call(void 0, baseUrl)}/pending-auth.json`;
|
|
87
87
|
}
|
|
88
88
|
function legacyPendingClaimTokenPath(baseUrl) {
|
|
89
|
-
return `${
|
|
89
|
+
return `${_chunkO4FCX6BSjs.hostConfigDirPath.call(void 0, baseUrl)}/pending-claim-token`;
|
|
90
90
|
}
|
|
91
91
|
function savePendingClaim(baseUrl, claim) {
|
|
92
92
|
const filePath = pendingClaimPath(baseUrl, claim.scope);
|
|
@@ -191,21 +191,21 @@ function parseRegisterWaitMode(args) {
|
|
|
191
191
|
function shouldWaitForRegisterClaim(mode) {
|
|
192
192
|
if (mode === "yes") return true;
|
|
193
193
|
if (mode === "no") return false;
|
|
194
|
-
return
|
|
194
|
+
return _chunkRUAEON5Jjs.detectAgentRuntime.call(void 0, ) !== "claude_cowork";
|
|
195
195
|
}
|
|
196
196
|
function saveEnvValues(values, baseUrl, scope) {
|
|
197
197
|
const filtered = {
|
|
198
|
-
...values[
|
|
199
|
-
...values[
|
|
200
|
-
...values[
|
|
201
|
-
...Object.prototype.hasOwnProperty.call(values,
|
|
198
|
+
...values[_chunkO4FCX6BSjs.HOST_URL_ENV] ? { [_chunkO4FCX6BSjs.HOST_URL_ENV]: values[_chunkO4FCX6BSjs.HOST_URL_ENV] } : {},
|
|
199
|
+
...values[_chunkO4FCX6BSjs.API_KEY_ENV] ? { [_chunkO4FCX6BSjs.API_KEY_ENV]: values[_chunkO4FCX6BSjs.API_KEY_ENV] } : {},
|
|
200
|
+
...values[_chunkO4FCX6BSjs.ACTIVE_ORG_ID_ENV] ? { [_chunkO4FCX6BSjs.ACTIVE_ORG_ID_ENV]: values[_chunkO4FCX6BSjs.ACTIVE_ORG_ID_ENV] } : {},
|
|
201
|
+
...Object.prototype.hasOwnProperty.call(values, _chunkO4FCX6BSjs.ACTIVE_ORG_NAME_ENV) ? { [_chunkO4FCX6BSjs.ACTIVE_ORG_NAME_ENV]: values[_chunkO4FCX6BSjs.ACTIVE_ORG_NAME_ENV] } : {},
|
|
202
202
|
// An explicit empty list must reach the store: it clears a stale line.
|
|
203
|
-
...Object.prototype.hasOwnProperty.call(values,
|
|
203
|
+
...Object.prototype.hasOwnProperty.call(values, _chunkO4FCX6BSjs.FEATURES_ENV) ? { [_chunkO4FCX6BSjs.FEATURES_ENV]: values[_chunkO4FCX6BSjs.FEATURES_ENV] } : {}
|
|
204
204
|
};
|
|
205
205
|
if (scope === "folder") {
|
|
206
|
-
|
|
206
|
+
_chunkO4FCX6BSjs.saveProjectDeeplineEnvValues.call(void 0, filtered);
|
|
207
207
|
} else {
|
|
208
|
-
|
|
208
|
+
_chunkO4FCX6BSjs.saveHostEnvValues.call(void 0, baseUrl, filtered);
|
|
209
209
|
}
|
|
210
210
|
}
|
|
211
211
|
function activeOrgEnvValues(data) {
|
|
@@ -213,21 +213,21 @@ function activeOrgEnvValues(data) {
|
|
|
213
213
|
if (!orgId) return {};
|
|
214
214
|
const orgName = typeof data.org_name === "string" ? data.org_name.trim() : "";
|
|
215
215
|
return {
|
|
216
|
-
[
|
|
217
|
-
[
|
|
218
|
-
...
|
|
216
|
+
[_chunkO4FCX6BSjs.ACTIVE_ORG_ID_ENV]: orgId,
|
|
217
|
+
[_chunkO4FCX6BSjs.ACTIVE_ORG_NAME_ENV]: orgName,
|
|
218
|
+
..._chunkO4FCX6BSjs.featureEnvValues.call(void 0, data)
|
|
219
219
|
};
|
|
220
220
|
}
|
|
221
221
|
async function httpJson(method, url, apiKey, body, timeoutMs = AUTH_HTTP_TIMEOUT_MS) {
|
|
222
222
|
const headers = {
|
|
223
223
|
"Content-Type": "application/json",
|
|
224
|
-
"User-Agent": `deepline-ts-sdk/${
|
|
224
|
+
"User-Agent": `deepline-ts-sdk/${_chunkRUAEON5Jjs.SDK_VERSION}`,
|
|
225
225
|
"X-Deepline-Client-Family": "sdk",
|
|
226
226
|
"X-Deepline-CLI-Family": "sdk",
|
|
227
|
-
"X-Deepline-Agent-Runtime":
|
|
228
|
-
"X-Deepline-CLI-Version":
|
|
229
|
-
"X-Deepline-SDK-Version":
|
|
230
|
-
"X-Deepline-API-Contract":
|
|
227
|
+
"X-Deepline-Agent-Runtime": _chunkRUAEON5Jjs.detectAgentRuntime.call(void 0, ),
|
|
228
|
+
"X-Deepline-CLI-Version": _chunkRUAEON5Jjs.SDK_VERSION,
|
|
229
|
+
"X-Deepline-SDK-Version": _chunkRUAEON5Jjs.SDK_VERSION,
|
|
230
|
+
"X-Deepline-API-Contract": _chunkRUAEON5Jjs.SDK_API_CONTRACT
|
|
231
231
|
};
|
|
232
232
|
if (apiKey) headers["Authorization"] = `Bearer ${apiKey}`;
|
|
233
233
|
const bypassToken = _optionalChain([process, 'access', _7 => _7.env, 'access', _8 => _8.VERCEL_PROTECTION_BYPASS_TOKEN, 'optionalAccess', _9 => _9.trim, 'call', _10 => _10()]);
|
|
@@ -266,10 +266,10 @@ async function httpJson(method, url, apiKey, body, timeoutMs = AUTH_HTTP_TIMEOUT
|
|
|
266
266
|
if (failure.name === "AbortError" || failure.name === "TimeoutError") {
|
|
267
267
|
throw failure;
|
|
268
268
|
}
|
|
269
|
-
const causeCode =
|
|
269
|
+
const causeCode = _chunkRUAEON5Jjs.networkCauseCode.call(void 0, failure);
|
|
270
270
|
throw Object.assign(
|
|
271
271
|
new (0, _chunkLFQJW4S2js.DeeplineError)(
|
|
272
|
-
|
|
272
|
+
_chunkRUAEON5Jjs.connectionFailureMessage.call(void 0, new URL(url).origin, failure),
|
|
273
273
|
void 0,
|
|
274
274
|
"NETWORK_ERROR",
|
|
275
275
|
causeCode ? { causeCode } : void 0
|
|
@@ -286,7 +286,7 @@ async function readStatusBanner(baseUrl) {
|
|
|
286
286
|
return _optionalChain([response, 'optionalAccess', _11 => _11.status]) === 200 ? _nullishCoalesce(response.data.banner, () => ( null)) : null;
|
|
287
287
|
}
|
|
288
288
|
async function reportSetupCompleted(input) {
|
|
289
|
-
const apiKey = input.authScope === "folder" ?
|
|
289
|
+
const apiKey = input.authScope === "folder" ? _chunkO4FCX6BSjs.resolveProjectApiKeyForBaseUrl.call(void 0, input.baseUrl) : _chunkO4FCX6BSjs.resolveGlobalApiKeyForBaseUrl.call(void 0, input.baseUrl);
|
|
290
290
|
if (!apiKey) return;
|
|
291
291
|
try {
|
|
292
292
|
await httpJson(
|
|
@@ -415,7 +415,7 @@ function endClaimPollOnRefusal(status, data, baseUrl, authScope) {
|
|
|
415
415
|
return EXIT_SERVER;
|
|
416
416
|
}
|
|
417
417
|
async function handleRegister(args, options) {
|
|
418
|
-
const baseUrl =
|
|
418
|
+
const baseUrl = _chunkO4FCX6BSjs.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, "");
|
|
419
419
|
let orgName = "";
|
|
420
420
|
let orgId = "";
|
|
421
421
|
let agentName = "";
|
|
@@ -486,14 +486,14 @@ async function handleRegister(args, options) {
|
|
|
486
486
|
savePendingClaim(baseUrl, pendingClaim);
|
|
487
487
|
saveEnvValues(
|
|
488
488
|
{
|
|
489
|
-
[
|
|
489
|
+
[_chunkO4FCX6BSjs.HOST_URL_ENV]: baseUrl
|
|
490
490
|
},
|
|
491
491
|
baseUrl,
|
|
492
492
|
authScope
|
|
493
493
|
);
|
|
494
494
|
}
|
|
495
495
|
if (claimUrl && !_optionalChain([options, 'optionalAccess', _16 => _16.delegatedApproval])) {
|
|
496
|
-
const shouldOpen = waitMode !== "no" &&
|
|
496
|
+
const shouldOpen = waitMode !== "no" && _chunkRUAEON5Jjs.detectAgentRuntime.call(void 0, ) !== "claude_cowork";
|
|
497
497
|
console.log(" Open this approval page in your browser:");
|
|
498
498
|
console.log(` ${claimUrl}`);
|
|
499
499
|
if (pendingClaim.device) {
|
|
@@ -501,7 +501,7 @@ async function handleRegister(args, options) {
|
|
|
501
501
|
` Click Approve if the page shows ${pendingClaim.device.userCode}.`
|
|
502
502
|
);
|
|
503
503
|
}
|
|
504
|
-
const opened = shouldOpen &&
|
|
504
|
+
const opened = shouldOpen && _chunk5KHSPLPOjs.openInBrowser.call(void 0, claimUrl) === "opened";
|
|
505
505
|
if (claimToken && pendingClaim.approvalLinkReporting) {
|
|
506
506
|
await reportApprovalLinkShown(
|
|
507
507
|
baseUrl,
|
|
@@ -554,8 +554,8 @@ async function handleRegister(args, options) {
|
|
|
554
554
|
if (apiKey) {
|
|
555
555
|
saveEnvValues(
|
|
556
556
|
{
|
|
557
|
-
[
|
|
558
|
-
[
|
|
557
|
+
[_chunkO4FCX6BSjs.HOST_URL_ENV]: baseUrl,
|
|
558
|
+
[_chunkO4FCX6BSjs.API_KEY_ENV]: apiKey,
|
|
559
559
|
...activeOrgEnvValues(statusData)
|
|
560
560
|
},
|
|
561
561
|
baseUrl,
|
|
@@ -577,7 +577,7 @@ async function handleRegister(args, options) {
|
|
|
577
577
|
}
|
|
578
578
|
}
|
|
579
579
|
async function handleWait(args, options) {
|
|
580
|
-
const baseUrl =
|
|
580
|
+
const baseUrl = _chunkO4FCX6BSjs.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, "");
|
|
581
581
|
let timeoutSeconds = 300;
|
|
582
582
|
let requestedScope;
|
|
583
583
|
if (args.includes("--auth-scope")) {
|
|
@@ -601,7 +601,7 @@ async function handleWait(args, options) {
|
|
|
601
601
|
const authScope = resumed.scope;
|
|
602
602
|
const claimToken = _nullishCoalesce(_optionalChain([pendingClaim, 'optionalAccess', _18 => _18.claimToken]), () => ( ""));
|
|
603
603
|
if (!pendingClaim) {
|
|
604
|
-
const scopedApiKey = authScope === "folder" ?
|
|
604
|
+
const scopedApiKey = authScope === "folder" ? _chunkO4FCX6BSjs.resolveProjectApiKeyForBaseUrl.call(void 0, baseUrl) : _chunkO4FCX6BSjs.resolveGlobalApiKeyForBaseUrl.call(void 0, baseUrl);
|
|
605
605
|
if (scopedApiKey) {
|
|
606
606
|
if (!_optionalChain([options, 'optionalAccess', _19 => _19.quiet])) console.log("Already connected.");
|
|
607
607
|
return EXIT_OK;
|
|
@@ -664,8 +664,8 @@ async function handleWait(args, options) {
|
|
|
664
664
|
if (apiKey) {
|
|
665
665
|
saveEnvValues(
|
|
666
666
|
{
|
|
667
|
-
[
|
|
668
|
-
[
|
|
667
|
+
[_chunkO4FCX6BSjs.HOST_URL_ENV]: baseUrl,
|
|
668
|
+
[_chunkO4FCX6BSjs.API_KEY_ENV]: apiKey,
|
|
669
669
|
...activeOrgEnvValues(data)
|
|
670
670
|
},
|
|
671
671
|
baseUrl,
|
|
@@ -695,8 +695,8 @@ async function handleWait(args, options) {
|
|
|
695
695
|
return EXIT_AUTH;
|
|
696
696
|
}
|
|
697
697
|
async function authStatusLine(timeoutMs = 3e3) {
|
|
698
|
-
const baseUrl =
|
|
699
|
-
const apiKey =
|
|
698
|
+
const baseUrl = _chunkO4FCX6BSjs.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, "");
|
|
699
|
+
const apiKey = _chunkO4FCX6BSjs.resolveApiKeyForBaseUrl.call(void 0, baseUrl);
|
|
700
700
|
if (!apiKey) return `Auth: not connected (${baseUrl})`;
|
|
701
701
|
try {
|
|
702
702
|
const { status, data } = await httpJson(
|
|
@@ -719,9 +719,9 @@ async function authStatusLine(timeoutMs = 3e3) {
|
|
|
719
719
|
}
|
|
720
720
|
}
|
|
721
721
|
async function handleStatus(args) {
|
|
722
|
-
const baseUrl =
|
|
722
|
+
const baseUrl = _chunkO4FCX6BSjs.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, "");
|
|
723
723
|
const reveal = args.includes("--reveal");
|
|
724
|
-
const jsonOutput =
|
|
724
|
+
const jsonOutput = _chunk5KHSPLPOjs.argsWantJson.call(void 0, args);
|
|
725
725
|
const hasExplicitAuthScope = args.includes("--auth-scope");
|
|
726
726
|
let authScope = null;
|
|
727
727
|
if (hasExplicitAuthScope) {
|
|
@@ -762,14 +762,14 @@ async function handleStatus(args) {
|
|
|
762
762
|
};
|
|
763
763
|
hostLines.push(`Host: ${baseUrl} (unreachable)`);
|
|
764
764
|
}
|
|
765
|
-
const apiKey = authScope === "folder" ?
|
|
765
|
+
const apiKey = authScope === "folder" ? _chunkO4FCX6BSjs.resolveProjectApiKeyForBaseUrl.call(void 0, baseUrl) : authScope === "global" ? _chunkO4FCX6BSjs.resolveGlobalApiKeyForBaseUrl.call(void 0, baseUrl) : _chunkO4FCX6BSjs.resolveApiKeyForBaseUrl.call(void 0, baseUrl);
|
|
766
766
|
if (!apiKey) {
|
|
767
767
|
const { claim: pendingClaim } = resolvePendingAuthClaimForResume(
|
|
768
768
|
baseUrl,
|
|
769
769
|
_nullishCoalesce(authScope, () => ( void 0))
|
|
770
770
|
);
|
|
771
771
|
if (pendingClaim) {
|
|
772
|
-
|
|
772
|
+
_chunk5KHSPLPOjs.printCommandEnvelope.call(void 0,
|
|
773
773
|
{
|
|
774
774
|
..._nullishCoalesce(hostStatusPayload, () => ( { host: baseUrl })),
|
|
775
775
|
status: "pending",
|
|
@@ -799,7 +799,7 @@ async function handleStatus(args) {
|
|
|
799
799
|
);
|
|
800
800
|
return EXIT_OK;
|
|
801
801
|
}
|
|
802
|
-
|
|
802
|
+
_chunk5KHSPLPOjs.printCommandEnvelope.call(void 0,
|
|
803
803
|
{
|
|
804
804
|
..._nullishCoalesce(hostStatusPayload, () => ( { host: baseUrl })),
|
|
805
805
|
status: "not connected",
|
|
@@ -832,7 +832,7 @@ async function handleStatus(args) {
|
|
|
832
832
|
}
|
|
833
833
|
);
|
|
834
834
|
if (status === 401 || status === 403) {
|
|
835
|
-
|
|
835
|
+
_chunk5KHSPLPOjs.printCommandEnvelope.call(void 0,
|
|
836
836
|
{
|
|
837
837
|
..._nullishCoalesce(hostStatusPayload, () => ( { host: baseUrl })),
|
|
838
838
|
status: "unauthorized",
|
|
@@ -859,7 +859,7 @@ async function handleStatus(args) {
|
|
|
859
859
|
console.error(`Auth status error (status ${status}).`);
|
|
860
860
|
return EXIT_SERVER;
|
|
861
861
|
}
|
|
862
|
-
const resolvedAuthScope = _nullishCoalesce(authScope, () => ( (
|
|
862
|
+
const resolvedAuthScope = _nullishCoalesce(authScope, () => ( (_chunkO4FCX6BSjs.getResolvedProjectAuthSource.call(void 0, baseUrl, apiKey) ? "folder" : "global")));
|
|
863
863
|
clearSatisfiedPendingClaim(
|
|
864
864
|
baseUrl,
|
|
865
865
|
resolvedAuthScope,
|
|
@@ -887,28 +887,28 @@ async function handleStatus(args) {
|
|
|
887
887
|
if (apiKeyResp) {
|
|
888
888
|
saveEnvValues(
|
|
889
889
|
{
|
|
890
|
-
[
|
|
891
|
-
[
|
|
890
|
+
[_chunkO4FCX6BSjs.HOST_URL_ENV]: baseUrl,
|
|
891
|
+
[_chunkO4FCX6BSjs.API_KEY_ENV]: apiKeyResp,
|
|
892
892
|
...activeOrgEnvValues(data)
|
|
893
893
|
},
|
|
894
894
|
baseUrl,
|
|
895
895
|
resolvedAuthScope
|
|
896
896
|
);
|
|
897
897
|
if (resolvedAuthScope === "folder") {
|
|
898
|
-
const target =
|
|
898
|
+
const target = _chunkO4FCX6BSjs.resolveProjectPinTarget.call(void 0, );
|
|
899
899
|
savedApiKeyPath = target.ok ? _path.join.call(void 0, target.dir, ".env.deepline") : null;
|
|
900
900
|
} else {
|
|
901
901
|
savedApiKeyPath = envFilePath(baseUrl);
|
|
902
902
|
}
|
|
903
903
|
}
|
|
904
|
-
} else if (resolvedAuthScope === "folder" ||
|
|
905
|
-
saveEnvValues(
|
|
904
|
+
} else if (resolvedAuthScope === "folder" || _chunkO4FCX6BSjs.storedHostApiKey.call(void 0, baseUrl) === apiKey) {
|
|
905
|
+
saveEnvValues(_chunkO4FCX6BSjs.featureEnvValues.call(void 0, data), baseUrl, resolvedAuthScope);
|
|
906
906
|
}
|
|
907
|
-
|
|
907
|
+
_chunk5KHSPLPOjs.printCommandEnvelope.call(void 0,
|
|
908
908
|
{
|
|
909
909
|
...payload,
|
|
910
|
-
...
|
|
911
|
-
command_context:
|
|
910
|
+
..._chunkRUAEON5Jjs.detectAgentRuntime.call(void 0, ) !== "unknown" ? {
|
|
911
|
+
command_context: _chunkO4FCX6BSjs.resolveCliCommandContext.call(void 0,
|
|
912
912
|
{ baseUrl, apiKey },
|
|
913
913
|
resolvedAuthScope
|
|
914
914
|
)
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DeeplineClient
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-AAXGFMYQ.mjs";
|
|
4
4
|
import {
|
|
5
5
|
HttpClient,
|
|
6
6
|
resolveConfig
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-TSNVG3T5.mjs";
|
|
8
8
|
|
|
9
9
|
// src/client.ts
|
|
10
10
|
var DeeplineClient2 = class extends DeeplineClient {
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
argsWantJson,
|
|
3
3
|
openInBrowser,
|
|
4
4
|
printCommandEnvelope
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-SONHOBIK.mjs";
|
|
6
6
|
import {
|
|
7
7
|
ACTIVE_ORG_ID_ENV,
|
|
8
8
|
ACTIVE_ORG_NAME_ENV,
|
|
@@ -22,14 +22,14 @@ import {
|
|
|
22
22
|
saveHostEnvValues,
|
|
23
23
|
saveProjectDeeplineEnvValues,
|
|
24
24
|
storedHostApiKey
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-TSNVG3T5.mjs";
|
|
26
26
|
import {
|
|
27
27
|
SDK_API_CONTRACT,
|
|
28
28
|
SDK_VERSION,
|
|
29
29
|
connectionFailureMessage,
|
|
30
30
|
detectAgentRuntime,
|
|
31
31
|
networkCauseCode
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-5SOJGKQM.mjs";
|
|
33
33
|
import {
|
|
34
34
|
DeeplineError
|
|
35
35
|
} from "./chunk-Z3A2S3QM.mjs";
|