deepline 0.3.568 → 0.3.570
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 +20 -5
- package/dist/bundling-sources/sdk/src/release.ts +1 -1
- package/dist/bundling-sources/shared_libs/monitors/fleets/limits.ts +17 -10
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/modal.ts +1 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/early-sandbox.ts +17 -1
- package/dist/cli/{auth-AV6JJ2Y6.mjs → auth-KHJKNEYN.mjs} +5 -5
- package/dist/cli/auth-X2LWGPF4.js +44 -0
- package/dist/cli/{billing-3RUXM4OW.js → billing-Q4BRUODF.js} +102 -102
- package/dist/cli/{billing-3RVJZROW.mjs → billing-R5AO4M3S.mjs} +9 -9
- package/dist/cli/{chunk-VVGHZ7S6.mjs → chunk-2GBOHROU.mjs} +1 -1
- package/dist/cli/{chunk-LKXBFVYU.js → chunk-2GTLZNSK.js} +53 -53
- package/dist/cli/{chunk-5KHSPLPO.js → chunk-2MXS53XJ.js} +20 -20
- package/dist/cli/{chunk-GXSJTCCG.mjs → chunk-3YHMHV6U.mjs} +4 -4
- package/dist/cli/{chunk-FQIOTHEZ.mjs → chunk-5OOGWYSR.mjs} +1 -1
- package/dist/cli/{chunk-G7GN3RGE.mjs → chunk-64MOX3SN.mjs} +15 -3
- package/dist/cli/{chunk-GLTA22I3.mjs → chunk-73RTZMDV.mjs} +84 -11
- package/dist/cli/{chunk-TSNVG3T5.mjs → chunk-77HEH4RY.mjs} +1 -1
- package/dist/cli/{chunk-SHO6BOXN.mjs → chunk-BEE5VGCL.mjs} +11 -11
- package/dist/cli/{chunk-ANRKUFUG.js → chunk-CHHXUEVC.js} +100 -100
- package/dist/cli/{chunk-RJJNXV36.js → chunk-DPZAEVPO.js} +20 -20
- package/dist/cli/{chunk-HQX2P4NH.mjs → chunk-EEUBKKJE.mjs} +1 -1
- package/dist/cli/{chunk-VIMSKO7W.mjs → chunk-EJB4V77N.mjs} +5 -5
- package/dist/cli/{chunk-VEPXXRHO.mjs → chunk-EYEPXZNS.mjs} +2 -2
- package/dist/cli/{chunk-O4FCX6BS.js → chunk-FABLUH75.js} +3 -3
- package/dist/cli/{chunk-DIPM4GTS.js → chunk-FDSQSUZF.js} +5 -5
- package/dist/cli/{chunk-RH3WIX2W.mjs → chunk-GFGXDDJH.mjs} +2 -2
- package/dist/cli/{chunk-F62RQL3X.js → chunk-GPXLMRCB.js} +3 -3
- package/dist/cli/{chunk-5SOJGKQM.mjs → chunk-HPWP2B3D.mjs} +1 -1
- package/dist/cli/{chunk-SONHOBIK.mjs → chunk-I4N62RWB.mjs} +2 -2
- package/dist/cli/{chunk-MOJOAX3X.mjs → chunk-I5EZZFQL.mjs} +3 -3
- package/dist/cli/{chunk-H4BU2RRU.js → chunk-J6M2AX3P.js} +118 -108
- package/dist/cli/{chunk-JJSKWDUI.js → chunk-J6PTH725.js} +6 -6
- package/dist/cli/{chunk-OWSTUCIB.js → chunk-JSHE4W6W.js} +5 -5
- package/dist/cli/{chunk-QVERY22Q.mjs → chunk-MH3WE5O6.mjs} +2 -2
- package/dist/cli/{chunk-BXNCAZ7G.mjs → chunk-MVHKTZCX.mjs} +1 -1
- package/dist/cli/{chunk-ZVJ2YNAH.js → chunk-N6KF6X3D.js} +15 -3
- package/dist/cli/{chunk-UPUBCTSS.js → chunk-NIO2T6OC.js} +2 -2
- package/dist/cli/{chunk-JIEUKZ7J.js → chunk-NR7QW2E7.js} +2 -2
- package/dist/cli/{chunk-4QGZUHDF.mjs → chunk-NVYQ6WCW.mjs} +5 -5
- package/dist/cli/{chunk-4PAGRUZA.js → chunk-NWAFCOUF.js} +15 -15
- package/dist/cli/{chunk-V5WFPMUC.mjs → chunk-O3ET4XR3.mjs} +4 -4
- package/dist/cli/{chunk-AAXGFMYQ.mjs → chunk-OOTXBEHG.mjs} +15 -5
- package/dist/cli/{chunk-KKIDGS7O.js → chunk-OPZHUL6T.js} +10 -10
- package/dist/cli/{chunk-RZMU7ISG.js → chunk-OV6EKORX.js} +26 -26
- package/dist/cli/{chunk-PPQHQ4J2.js → chunk-OWEUQCBZ.js} +48 -48
- package/dist/cli/{chunk-5NBR7V5U.js → chunk-PERYT4ZA.js} +1 -1
- package/dist/cli/{chunk-Y4Q4LQRX.js → chunk-PSMYOQFI.js} +13 -13
- package/dist/cli/{chunk-D2DYHEH7.js → chunk-Q4P6STRD.js} +23 -23
- package/dist/cli/{chunk-VW2EUXY2.mjs → chunk-RS6KPFQX.mjs} +5 -5
- package/dist/cli/{chunk-2BWPNLYG.js → chunk-SOZ2SB43.js} +9 -9
- package/dist/cli/{chunk-JPSKSXNS.mjs → chunk-TMT3S2JR.mjs} +2 -2
- package/dist/cli/{chunk-LQTLFFUB.mjs → chunk-TWHTVGGW.mjs} +2 -2
- package/dist/cli/{chunk-RUAEON5J.js → chunk-UDN6EYBJ.js} +4 -4
- package/dist/cli/{chunk-S2HGTJET.mjs → chunk-UWQLRBXY.mjs} +5 -5
- package/dist/cli/{chunk-WYXXJA5J.js → chunk-W26YT37U.js} +41 -41
- package/dist/cli/{chunk-TM3Z7JXT.mjs → chunk-WINZRS3A.mjs} +1 -1
- package/dist/cli/{chunk-JRTB75JO.js → chunk-WNUFRUNS.js} +95 -22
- package/dist/cli/{chunk-JT7S45KT.mjs → chunk-XHFSNMEU.mjs} +3 -3
- package/dist/cli/{chunk-7X34FUYS.js → chunk-YQP4ZUOJ.js} +7 -7
- package/dist/cli/{chunk-KMWH6VY2.mjs → chunk-YXJVYY5V.mjs} +2 -2
- package/dist/cli/{chunk-PE2XN2VM.js → chunk-ZGOCDLJQ.js} +2 -2
- package/dist/cli/{chunk-M3IMARRH.mjs → chunk-ZZ4D74UL.mjs} +1 -1
- package/dist/cli/{chunk-5KDMJLQX.js → chunk-ZZ7ZH27W.js} +5 -5
- package/dist/cli/command-docs.js +2 -2
- package/dist/cli/command-docs.mjs +1 -1
- package/dist/cli/{concurrent-runs-help-SJ27PPHV.mjs → concurrent-runs-help-Q26CEJ7I.mjs} +6 -6
- package/dist/cli/concurrent-runs-help-QDURIV4N.js +22 -0
- package/dist/cli/{csv-ZN4QI6PJ.mjs → csv-6LI6HLKG.mjs} +4 -4
- package/dist/cli/{csv-BGXZKS5R.js → csv-Z34I5QIU.js} +13 -13
- package/dist/cli/{db-SVBVPMWN.mjs → db-K5GKIKQU.mjs} +6 -6
- package/dist/cli/{db-KTAZ5FBG.js → db-NUDEYQCF.js} +27 -27
- package/dist/cli/describe-BY7LKP53.js +50 -0
- package/dist/cli/{describe-4CGCRK24.mjs → describe-EB4KTEPT.mjs} +18 -18
- package/dist/cli/describe-core.d.mts +2 -2
- package/dist/cli/describe-core.d.ts +2 -2
- package/dist/cli/{executions-YL5CTGWP.mjs → executions-DAGHJZEI.mjs} +6 -6
- package/dist/cli/{executions-75DO2GBS.js → executions-KHOUABZ3.js} +8 -8
- package/dist/cli/{feedback-VEA3XJM3.mjs → feedback-A57YETEA.mjs} +6 -6
- package/dist/cli/{feedback-2SMUBQZR.js → feedback-XLAWTPK2.js} +14 -14
- package/dist/cli/git-CR6PBWBH.js +26 -0
- package/dist/cli/{git-BEYEHMCX.mjs → git-U3FNR34D.mjs} +5 -5
- package/dist/cli/index.js +147 -147
- package/dist/cli/index.mjs +46 -46
- package/dist/cli/{integrations-RXWE6WUZ.mjs → integrations-LXUMB4RY.mjs} +7 -7
- package/dist/cli/{integrations-PIXZBU2N.js → integrations-YVOJ5D6W.js} +29 -29
- package/dist/cli/{legacy-noops-PJHP4GRU.mjs → legacy-noops-4Z2RBTHW.mjs} +6 -6
- package/dist/cli/{legacy-noops-XHVEYEJN.js → legacy-noops-IZVLGQZJ.js} +9 -9
- package/dist/cli/{mcp-276ZFIUM.js → mcp-GRGI3KYH.js} +24 -24
- package/dist/cli/{mcp-SUOIVUOM.mjs → mcp-ZHXRVV7D.mjs} +4 -4
- package/dist/cli/{monitors-AVGNLV7V.mjs → monitors-7ZVYJ3CX.mjs} +7 -7
- package/dist/cli/{monitors-DGBB7X4G.js → monitors-XFN5D6EW.js} +100 -100
- package/dist/cli/{org-U5275K5D.js → org-RWWXN5TK.js} +121 -121
- package/dist/cli/{org-WKP2BZJQ.mjs → org-YY5JTKNV.mjs} +6 -6
- package/dist/cli/{outcomes-LSCS6QE5.js → outcomes-AOZVYNJT.js} +14 -14
- package/dist/cli/{outcomes-H3RAH5ES.mjs → outcomes-MGWUZNQ6.mjs} +6 -6
- package/dist/cli/{play-7MSJU3LP.mjs → play-AJR7BT3R.mjs} +19 -19
- package/dist/cli/{play-GNT7SITC.js → play-S34KIOWS.js} +324 -324
- package/dist/cli/{providers-YDKHHCO4.mjs → providers-QRWQGVIC.mjs} +6 -6
- package/dist/cli/{providers-KTEG2ZNS.js → providers-S4WMWHBW.js} +9 -9
- package/dist/cli/{quickstart-T2NJMACU.js → quickstart-GET2M3BQ.js} +6 -6
- package/dist/cli/{quickstart-F6IH43NP.mjs → quickstart-NLAIOXVY.mjs} +4 -4
- package/dist/cli/{run-MIRJIW45.js → run-BOHHBZSI.js} +44 -44
- package/dist/cli/{run-AJB4MQGO.mjs → run-R2RYHNVS.mjs} +23 -23
- package/dist/cli/search-CZVM2OX5.js +32 -0
- package/dist/cli/{search-V6YPFL6J.mjs → search-VBIVRRRO.mjs} +7 -7
- package/dist/cli/{search-output-GGCIICSW.js → search-output-EVNRKEGZ.js} +6 -6
- package/dist/cli/{search-output-4VDZLO42.mjs → search-output-OCYIQFV6.mjs} +4 -4
- package/dist/cli/{secrets-L2VDRZDZ.js → secrets-52T2SCZ5.js} +15 -15
- package/dist/cli/{secrets-XUENPM5D.mjs → secrets-TNCO45WJ.mjs} +6 -6
- package/dist/cli/{sessions-W7LHEE35.mjs → sessions-4XE7AR3A.mjs} +6 -6
- package/dist/cli/sessions-GOHYDYMH.js +23 -0
- package/dist/cli/{settings-NB6Y53VR.js → settings-TKRF2B3K.js} +85 -85
- package/dist/cli/{settings-IVFOUU7V.mjs → settings-ZFCHR7MW.mjs} +12 -12
- package/dist/cli/{setup-2F42I4HW.js → setup-AWNE4VNL.js} +49 -49
- package/dist/cli/{setup-QUL7OO6A.mjs → setup-QY3ZML4C.mjs} +9 -9
- package/dist/cli/skills-54CGCMPF.js +37 -0
- package/dist/cli/{skills-SL3DNAH6.mjs → skills-GUGJDCFY.mjs} +7 -7
- package/dist/cli/tools-A7FEGDPX.js +57 -0
- package/dist/cli/{tools-TD5EJ2UD.mjs → tools-NBKPWOWD.mjs} +17 -17
- package/dist/cli/update-3J52CJHB.js +37 -0
- package/dist/cli/{update-Z53GM6PX.mjs → update-KLGVIBRY.mjs} +9 -9
- package/dist/cli/{views-VAQGFKXN.js → views-MDXEIVQ7.js} +21 -21
- package/dist/cli/{views-ZB6AOING.mjs → views-OEOW2EZO.mjs} +6 -6
- package/dist/cli/{workflow-OKDLEK3G.mjs → workflow-LK4SIUOM.mjs} +7 -7
- package/dist/cli/{workflow-PSIQ5HVP.js → workflow-PUSTWPW4.js} +17 -17
- package/dist/{client-D5mo-R-t.d.mts → client-ClJlqkKt.d.mts} +1 -1
- package/dist/{client-B8_eh5F-.d.ts → client-DCnExziW.d.ts} +1 -1
- package/dist/{client-core-Br12Asu-.d.ts → client-core-BKq5ZNAl.d.ts} +14 -2
- package/dist/{client-core-BPu-brbA.d.mts → client-core-DAOPQnGD.d.mts} +14 -2
- 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-IPONFGG7.js +0 -44
- package/dist/cli/concurrent-runs-help-66WCD2Y4.js +0 -22
- package/dist/cli/describe-M3MOFAVN.js +0 -50
- package/dist/cli/git-XDS5BHBG.js +0 -26
- package/dist/cli/search-YPZ575MY.js +0 -32
- package/dist/cli/sessions-GJLSOVLW.js +0 -23
- package/dist/cli/skills-2KAEOH2N.js +0 -37
- package/dist/cli/tools-W6223Q4W.js +0 -57
- package/dist/cli/update-IZBYF422.js +0 -37
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DeeplineClient
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-TWHTVGGW.mjs";
|
|
4
4
|
import {
|
|
5
5
|
printCommandEnvelope
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-I4N62RWB.mjs";
|
|
7
|
+
import {
|
|
8
|
+
resolveConfig
|
|
9
|
+
} from "./chunk-77HEH4RY.mjs";
|
|
7
10
|
|
|
8
11
|
// src/cli/commands/integration-commands.ts
|
|
9
12
|
import { Option } from "commander";
|
|
@@ -329,7 +332,12 @@ function registerIntegrationConnectCommand(parent, defaultLink = false, hidden =
|
|
|
329
332
|
).option(
|
|
330
333
|
"--credentials-file <path>",
|
|
331
334
|
"JSON object of credential field names and string values; keep this file private"
|
|
332
|
-
).option("--oauth", "Return an OAuth authorization URL").addOption(
|
|
335
|
+
).option("--oauth", "Return an OAuth authorization URL").addOption(
|
|
336
|
+
new Option(
|
|
337
|
+
"--org-default",
|
|
338
|
+
"Write the org default even when a workspace is selected"
|
|
339
|
+
).conflicts(["link"])
|
|
340
|
+
).addOption(new Option("--expected-connection-id <id>").hideHelp()).option("--preset <id>", "Server-defined access preset (HubSpot only)").option("--scopes <scopes>", "Comma-separated OAuth scopes").option(
|
|
333
341
|
"--optional-scopes <scopes>",
|
|
334
342
|
"Comma-separated optional OAuth scopes"
|
|
335
343
|
).option(
|
|
@@ -349,11 +357,14 @@ function registerIntegrationConnectCommand(parent, defaultLink = false, hidden =
|
|
|
349
357
|
"--managed requires --company-domain, --company-legal-name and --company-country."
|
|
350
358
|
);
|
|
351
359
|
}
|
|
360
|
+
const teamId2 = connectTeamId(options.orgDefault);
|
|
361
|
+
refuseManagedWorkspaceConnect(provider, teamId2);
|
|
352
362
|
if (options.dryRun) {
|
|
353
363
|
printSetupPlan(
|
|
354
364
|
{
|
|
355
365
|
provider,
|
|
356
366
|
action: "connect_managed",
|
|
367
|
+
team_id: teamId2,
|
|
357
368
|
terms_version: options.acceptTerms ?? "not accepted",
|
|
358
369
|
company_domain: options.companyDomain
|
|
359
370
|
},
|
|
@@ -380,10 +391,11 @@ function registerIntegrationConnectCommand(parent, defaultLink = false, hidden =
|
|
|
380
391
|
const confirmation2 = {
|
|
381
392
|
provider,
|
|
382
393
|
credential_saved: true,
|
|
383
|
-
credential_mode: "partner_managed"
|
|
394
|
+
credential_mode: "partner_managed",
|
|
395
|
+
team_id: teamId2
|
|
384
396
|
};
|
|
385
397
|
printIntegrationResult(confirmation2, options.json, [
|
|
386
|
-
`${provider} is connected
|
|
398
|
+
`${provider} is connected with a Deepline-managed key for ${describeConnectTarget(teamId2)}. Usage is billed in Deepline credits.`
|
|
387
399
|
]);
|
|
388
400
|
return;
|
|
389
401
|
}
|
|
@@ -411,11 +423,14 @@ function registerIntegrationConnectCommand(parent, defaultLink = false, hidden =
|
|
|
411
423
|
const splitScopes = (value) => value.split(",").map((scope) => scope.trim()).filter(Boolean);
|
|
412
424
|
if (options.scopes !== void 0 && splitScopes(options.scopes).length === 0)
|
|
413
425
|
throw new Error("scopes must contain at least one OAuth scope.");
|
|
426
|
+
const teamId2 = connectTeamId(options.orgDefault);
|
|
427
|
+
refuseMetaWorkspaceConnect(provider, teamId2);
|
|
414
428
|
if (options.dryRun) {
|
|
415
429
|
printSetupPlan(
|
|
416
430
|
{
|
|
417
431
|
provider,
|
|
418
432
|
action: "oauth",
|
|
433
|
+
team_id: teamId2,
|
|
419
434
|
...options.preset !== void 0 ? { preset: options.preset } : {},
|
|
420
435
|
...options.scopes !== void 0 ? { scopes: splitScopes(options.scopes) } : {},
|
|
421
436
|
...options.optionalScopes !== void 0 ? { optionalScopes: splitScopes(options.optionalScopes) } : {}
|
|
@@ -429,17 +444,26 @@ function registerIntegrationConnectCommand(parent, defaultLink = false, hidden =
|
|
|
429
444
|
{
|
|
430
445
|
...options.preset !== void 0 ? { preset: options.preset } : {},
|
|
431
446
|
...options.scopes !== void 0 ? { scopes: splitScopes(options.scopes) } : {},
|
|
432
|
-
...options.optionalScopes !== void 0 ? { optionalScopes: splitScopes(options.optionalScopes) } : {}
|
|
447
|
+
...options.optionalScopes !== void 0 ? { optionalScopes: splitScopes(options.optionalScopes) } : {},
|
|
448
|
+
teamId: teamId2
|
|
433
449
|
}
|
|
434
450
|
);
|
|
451
|
+
const confirmed2 = assertConnectTarget(result2, teamId2);
|
|
435
452
|
if (!result2.ok || typeof result2.redirect_url !== "string" || !result2.redirect_url)
|
|
436
453
|
throw new Error(
|
|
437
454
|
"The API did not return an OAuth authorization URL."
|
|
438
455
|
);
|
|
439
456
|
printIntegrationResult(
|
|
440
|
-
{ provider, redirect_url: result2.redirect_url },
|
|
457
|
+
{ provider, redirect_url: result2.redirect_url, team_id: teamId2 },
|
|
441
458
|
options.json,
|
|
442
|
-
[
|
|
459
|
+
[
|
|
460
|
+
result2.redirect_url,
|
|
461
|
+
connectTargetLine(
|
|
462
|
+
`This connects ${provider} for`,
|
|
463
|
+
teamId2,
|
|
464
|
+
confirmed2
|
|
465
|
+
)
|
|
466
|
+
]
|
|
443
467
|
);
|
|
444
468
|
return;
|
|
445
469
|
}
|
|
@@ -447,11 +471,14 @@ function registerIntegrationConnectCommand(parent, defaultLink = false, hidden =
|
|
|
447
471
|
throw new Error(
|
|
448
472
|
"Use --link for a dashboard link, --credentials-file to save credentials, or --oauth to request access."
|
|
449
473
|
);
|
|
474
|
+
const teamId = connectTeamId(options.orgDefault);
|
|
475
|
+
refuseMetaWorkspaceConnect(provider, teamId);
|
|
450
476
|
if (options.dryRun) {
|
|
451
477
|
printSetupPlan(
|
|
452
478
|
{
|
|
453
479
|
provider,
|
|
454
480
|
action: "save_credentials",
|
|
481
|
+
team_id: teamId,
|
|
455
482
|
credentials_file: options.credentialsFile,
|
|
456
483
|
...options.expectedConnectionId ? { expected_connection_id: options.expectedConnectionId } : {}
|
|
457
484
|
},
|
|
@@ -477,20 +504,66 @@ function registerIntegrationConnectCommand(parent, defaultLink = false, hidden =
|
|
|
477
504
|
const result = await new DeeplineClient().setIntegrationCredentials(
|
|
478
505
|
provider,
|
|
479
506
|
credentials,
|
|
480
|
-
{ expectedConnectionId: options.expectedConnectionId }
|
|
507
|
+
{ expectedConnectionId: options.expectedConnectionId, teamId }
|
|
481
508
|
);
|
|
482
509
|
if (!result.ok || result.credential_saved !== true) {
|
|
483
510
|
throw new Error(
|
|
484
511
|
"The API did not confirm that provider credentials were saved. Inspect the integration before retrying."
|
|
485
512
|
);
|
|
486
513
|
}
|
|
487
|
-
const
|
|
514
|
+
const confirmed = assertConnectTarget(result, teamId);
|
|
515
|
+
const confirmation = {
|
|
516
|
+
provider,
|
|
517
|
+
credential_saved: true,
|
|
518
|
+
team_id: teamId
|
|
519
|
+
};
|
|
488
520
|
printIntegrationResult(confirmation, options.json, [
|
|
489
|
-
|
|
521
|
+
connectTargetLine(
|
|
522
|
+
`Credentials saved for ${provider} in`,
|
|
523
|
+
teamId,
|
|
524
|
+
confirmed
|
|
525
|
+
)
|
|
490
526
|
]);
|
|
491
527
|
}
|
|
492
528
|
);
|
|
493
529
|
}
|
|
530
|
+
function connectTeamId(orgDefault) {
|
|
531
|
+
if (orgDefault) return null;
|
|
532
|
+
try {
|
|
533
|
+
return resolveConfig().workspace ?? null;
|
|
534
|
+
} catch {
|
|
535
|
+
return process.env.DEEPLINE_WORKSPACE_ID?.trim() || null;
|
|
536
|
+
}
|
|
537
|
+
}
|
|
538
|
+
function describeConnectTarget(teamId) {
|
|
539
|
+
return teamId ? `workspace ${teamId} (its own connection; other workspaces are unchanged)` : "the org default (used by every workspace without its own connection)";
|
|
540
|
+
}
|
|
541
|
+
function assertConnectTarget(result, teamId) {
|
|
542
|
+
if (!("team_id" in result)) return false;
|
|
543
|
+
if ((result.team_id ?? null) !== teamId) {
|
|
544
|
+
throw new Error(
|
|
545
|
+
`The API wrote ${describeConnectTarget(result.team_id ?? null)}, not ${describeConnectTarget(teamId)}. Inspect the integration before retrying.`
|
|
546
|
+
);
|
|
547
|
+
}
|
|
548
|
+
return true;
|
|
549
|
+
}
|
|
550
|
+
function connectTargetLine(prefix, teamId, confirmed) {
|
|
551
|
+
if (confirmed) return `${prefix} ${describeConnectTarget(teamId)}.`;
|
|
552
|
+
const requested = teamId ? `workspace ${teamId}` : "the org default";
|
|
553
|
+
return `${prefix} ${requested} (requested; this server did not confirm the target).`;
|
|
554
|
+
}
|
|
555
|
+
function refuseMetaWorkspaceConnect(provider, teamId) {
|
|
556
|
+
if (provider !== "meta_audiences" || !teamId) return;
|
|
557
|
+
throw new Error(
|
|
558
|
+
`Meta Audiences connects workspace ${teamId} with a system user token: run \`deepline org workspaces integrations set ${teamId} meta_audiences --api-key-stdin\`, or pass --org-default to connect the org default.`
|
|
559
|
+
);
|
|
560
|
+
}
|
|
561
|
+
function refuseManagedWorkspaceConnect(provider, teamId) {
|
|
562
|
+
if (!teamId) return;
|
|
563
|
+
throw new Error(
|
|
564
|
+
`A Deepline-managed ${provider} key is set up for the whole org, not workspace ${teamId}. Pass --org-default to connect the org default, or --credentials-file to give this workspace its own key.`
|
|
565
|
+
);
|
|
566
|
+
}
|
|
494
567
|
function printSetupPlan(plan, json) {
|
|
495
568
|
printIntegrationResult(
|
|
496
569
|
plan,
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
addDescribeOptions,
|
|
3
3
|
recordApiResponse,
|
|
4
4
|
writeExecutionOutput
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-MVHKTZCX.mjs";
|
|
6
6
|
import {
|
|
7
7
|
registerIntegrationBalanceCommand,
|
|
8
8
|
registerIntegrationConnectCommand,
|
|
@@ -11,11 +11,11 @@ import {
|
|
|
11
11
|
registerLegacyHubSpotMembersCommand,
|
|
12
12
|
registerLegacyWorkspaceConnectionCommand,
|
|
13
13
|
registerWorkspaceConnectionListCommand
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-73RTZMDV.mjs";
|
|
15
15
|
import {
|
|
16
16
|
recentSearchRef,
|
|
17
17
|
registerDeprecatedSearchCommand
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-O3ET4XR3.mjs";
|
|
19
19
|
import {
|
|
20
20
|
Capability,
|
|
21
21
|
arrayField,
|
|
@@ -57,29 +57,29 @@ import {
|
|
|
57
57
|
} from "./chunk-FIVKWNMT.mjs";
|
|
58
58
|
import {
|
|
59
59
|
DeeplineClient
|
|
60
|
-
} from "./chunk-
|
|
60
|
+
} from "./chunk-TWHTVGGW.mjs";
|
|
61
61
|
import {
|
|
62
62
|
validateExecutionIdempotencyKey
|
|
63
|
-
} from "./chunk-
|
|
63
|
+
} from "./chunk-OOTXBEHG.mjs";
|
|
64
64
|
import {
|
|
65
65
|
beginToolExecuteCommand,
|
|
66
66
|
getToolExecuteInvocationId,
|
|
67
67
|
maybeAutoUpdateAndRelaunch,
|
|
68
68
|
registerCompatibilityCatalog,
|
|
69
69
|
runToolExecuteStage
|
|
70
|
-
} from "./chunk-
|
|
70
|
+
} from "./chunk-NVYQ6WCW.mjs";
|
|
71
71
|
import {
|
|
72
72
|
isCliTraceEnabled,
|
|
73
73
|
recordCliTrace,
|
|
74
74
|
resolveCliMaintenancePolicy
|
|
75
|
-
} from "./chunk-
|
|
75
|
+
} from "./chunk-ZZ4D74UL.mjs";
|
|
76
76
|
import {
|
|
77
77
|
checkSdkCompatibility,
|
|
78
78
|
enforceSdkCompatibilityResponse,
|
|
79
79
|
flushDeferredSkillsSyncNotices,
|
|
80
80
|
requireSdkCompatibility,
|
|
81
81
|
syncSdkSkillsIfNeeded
|
|
82
|
-
} from "./chunk-
|
|
82
|
+
} from "./chunk-UWQLRBXY.mjs";
|
|
83
83
|
import {
|
|
84
84
|
errorToJsonPayload,
|
|
85
85
|
printCommandEnvelope,
|
|
@@ -88,12 +88,12 @@ import {
|
|
|
88
88
|
printJsonError,
|
|
89
89
|
renderCommandEnvelopeText,
|
|
90
90
|
shouldEmitJson
|
|
91
|
-
} from "./chunk-
|
|
91
|
+
} from "./chunk-I4N62RWB.mjs";
|
|
92
92
|
import {
|
|
93
93
|
readSdkSkillsLocalVersion,
|
|
94
94
|
resolveConfig,
|
|
95
95
|
sdkCliStateDirPath
|
|
96
|
-
} from "./chunk-
|
|
96
|
+
} from "./chunk-77HEH4RY.mjs";
|
|
97
97
|
import {
|
|
98
98
|
DeeplineError
|
|
99
99
|
} from "./chunk-Z3A2S3QM.mjs";
|
|
@@ -1052,7 +1052,7 @@ Examples:
|
|
|
1052
1052
|
process.exitCode = await narrowView();
|
|
1053
1053
|
return;
|
|
1054
1054
|
}
|
|
1055
|
-
const { describeAnything } = await import("./describe-
|
|
1055
|
+
const { describeAnything } = await import("./describe-EB4KTEPT.mjs");
|
|
1056
1056
|
process.exitCode = await describeAnything(
|
|
1057
1057
|
toolId,
|
|
1058
1058
|
{
|