deepline 0.3.347 → 0.3.348
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.ts +5 -0
- package/dist/bundling-sources/sdk/src/index.ts +1 -0
- package/dist/bundling-sources/sdk/src/release.ts +1 -1
- package/dist/bundling-sources/shared_libs/integration-contracts/billing-entitlements.ts +29 -0
- package/dist/bundling-sources/shared_libs/play-runtime/app-runtime-api.ts +32 -1
- package/dist/bundling-sources/shared_libs/play-runtime/context.ts +17 -1
- package/dist/bundling-sources/shared_libs/play-runtime/execution-capabilities.ts +18 -0
- package/dist/bundling-sources/shared_libs/play-runtime/internal-bootstrap-token.ts +9 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-authority.ts +11 -0
- package/dist/bundling-sources/shared_libs/play-runtime/runtime-operation-contract.ts +6 -0
- package/dist/bundling-sources/shared_libs/play-runtime/workflow-executor-auth.ts +3 -0
- package/dist/bundling-sources/shared_libs/plays/authoring-contract.ts +13 -0
- package/dist/cli/{auth-RWP45MJX.mjs → auth-ME53BGXD.mjs} +4 -4
- package/dist/cli/auth-YHS2NN4I.js +31 -0
- package/dist/cli/{billing-XPKHI4LF.mjs → billing-466LUN65.mjs} +31 -4
- package/dist/cli/{billing-F6RNSQWW.js → billing-EMRJAWNG.js} +99 -72
- package/dist/cli/{chunk-AOKWJJLP.mjs → chunk-2G7KMDDI.mjs} +1 -1
- package/dist/cli/{chunk-WX7W76U7.js → chunk-2JRKH263.js} +15 -15
- package/dist/cli/{chunk-AYR45POY.mjs → chunk-35PLGSH6.mjs} +2 -1
- package/dist/cli/{chunk-GT7OCAWV.js → chunk-4JJN7BDI.js} +48 -48
- package/dist/cli/{chunk-SFJEAK54.mjs → chunk-5AZNXX2S.mjs} +1 -1
- package/dist/cli/{chunk-EOS73ZCP.js → chunk-5HLM2PGK.js} +8 -8
- package/dist/cli/{chunk-723POEH5.js → chunk-5IYFQJHX.js} +10 -9
- package/dist/cli/{chunk-FKKNYKDY.js → chunk-5O4B6AUN.js} +2 -0
- package/dist/cli/{chunk-Y6D2JYBR.mjs → chunk-5UWZ52IW.mjs} +2 -2
- package/dist/cli/{chunk-LPKV6IBM.js → chunk-6NM2IY4B.js} +8 -8
- package/dist/cli/{chunk-NTVTZAVZ.mjs → chunk-7E66A24V.mjs} +2 -0
- package/dist/cli/{chunk-U2GPF4SB.mjs → chunk-BAJXRIRP.mjs} +2 -2
- package/dist/cli/{chunk-OS6CZRJE.mjs → chunk-CA7RR4UD.mjs} +3 -3
- package/dist/cli/{chunk-VRYRVD3F.mjs → chunk-CEC3BXRV.mjs} +1 -1
- package/dist/cli/{chunk-IIOBMOMH.mjs → chunk-DSWSEHRX.mjs} +1 -1
- package/dist/cli/{chunk-JB4UKD3B.js → chunk-EWYHXSV4.js} +6 -6
- package/dist/cli/{chunk-5UJOJKPW.js → chunk-GVJPI7MB.js} +4 -4
- package/dist/cli/{chunk-AGV2VS4U.js → chunk-IICCYB57.js} +54 -54
- package/dist/cli/{chunk-GS2ZSOAQ.js → chunk-KGKPHGDT.js} +2 -2
- package/dist/cli/{chunk-LTJOC47W.mjs → chunk-L645OZEB.mjs} +7 -7
- package/dist/cli/{chunk-X32ZLEUU.mjs → chunk-MM6X5ADB.mjs} +2 -2
- package/dist/cli/{chunk-BUXJSW26.js → chunk-NX4WJO5P.js} +26 -26
- package/dist/cli/{chunk-L4TXOCCC.js → chunk-PQZURAHR.js} +1 -1
- package/dist/cli/{chunk-LH4VHCN5.mjs → chunk-Q37KLZXK.mjs} +6 -6
- package/dist/cli/{chunk-OJVAVQLB.js → chunk-QGKPTBRR.js} +3 -3
- package/dist/cli/{chunk-3PRBUTJK.js → chunk-SIE7MILM.js} +242 -242
- package/dist/cli/{chunk-ROEN4NXY.js → chunk-U5U2DJ3A.js} +60 -60
- package/dist/cli/{chunk-3JJLQQLW.mjs → chunk-UCVFMPAO.mjs} +2 -2
- package/dist/cli/{chunk-PQGDU7B5.mjs → chunk-VWSEZMCR.mjs} +1 -1
- package/dist/cli/{chunk-NU5EU2SH.mjs → chunk-XVWOERRO.mjs} +4 -4
- package/dist/cli/client-F47WSZBF.js +20 -0
- package/dist/cli/{client-FZJ3RSO3.mjs → client-K3EFOESB.mjs} +3 -3
- package/dist/cli/{csv-QSMT5HZS.js → csv-4UFHUMIR.js} +12 -12
- package/dist/cli/{csv-HPBPBU3I.mjs → csv-ZFH725GM.mjs} +3 -3
- package/dist/cli/{db-IKZKICP3.js → db-EJHH7IBM.js} +29 -29
- package/dist/cli/{db-2KAUAVVC.mjs → db-KTJSJ6LJ.mjs} +4 -4
- package/dist/cli/{describe-EW4GZMUK.mjs → describe-2GXTRRSJ.mjs} +10 -10
- package/dist/cli/{describe-QM7Q5Y2H.js → describe-ZQXDXWKZ.js} +17 -17
- package/dist/cli/{executions-5ICONLFX.js → executions-FEBZXTAI.js} +6 -6
- package/dist/cli/{executions-U5WWUFEZ.mjs → executions-ZFEW2R3V.mjs} +4 -4
- package/dist/cli/{feedback-ZBQPQPFG.mjs → feedback-BYMYIBHU.mjs} +3 -3
- package/dist/cli/{feedback-N2KGAK4V.js → feedback-F3LKI327.js} +7 -7
- package/dist/cli/{git-M5YEP57H.mjs → git-A3V2AKGA.mjs} +4 -4
- package/dist/cli/git-PWHYGNBR.js +23 -0
- package/dist/cli/index.js +79 -79
- package/dist/cli/index.mjs +31 -31
- package/dist/cli/{legacy-noops-GJUYBH2F.mjs → legacy-noops-IMOMP5NH.mjs} +4 -4
- package/dist/cli/{legacy-noops-IQIPPJF7.js → legacy-noops-TYXWVLSD.js} +7 -7
- package/dist/cli/{monitors-DQUCHISX.js → monitors-BG2EP4M2.js} +85 -85
- package/dist/cli/{monitors-XJAJNMG4.mjs → monitors-PJWHKJAG.mjs} +4 -4
- package/dist/cli/{org-DFWDN4EJ.mjs → org-CVCRHGQF.mjs} +4 -4
- package/dist/cli/{org-G45CXUJV.js → org-NM7EROYH.js} +60 -60
- package/dist/cli/{play-URTZW2Q4.mjs → play-ESB6ZDMP.mjs} +9 -9
- package/dist/cli/play-MYWKV6MH.js +153 -0
- package/dist/cli/{providers-CCKMRCXU.mjs → providers-BPDX7QBF.mjs} +4 -4
- package/dist/cli/{providers-IVUWWGFP.js → providers-EXITLSJG.js} +7 -7
- package/dist/cli/{quickstart-MMIVNRV4.js → quickstart-55MBPFRI.js} +5 -5
- package/dist/cli/{quickstart-CRHIA3PZ.mjs → quickstart-P5HLSTZB.mjs} +3 -3
- package/dist/cli/search-2JFDCWWK.js +26 -0
- package/dist/cli/{search-NDRDOINX.mjs → search-UJ3KOFZV.mjs} +5 -5
- package/dist/cli/{secrets-GQUBMJGM.js → secrets-TLV2Q4Z5.js} +13 -13
- package/dist/cli/{secrets-SUC3KLLH.mjs → secrets-XJCZM2M2.mjs} +4 -4
- package/dist/cli/{sessions-7CAU6JL5.mjs → sessions-4XMG3DEE.mjs} +4 -4
- package/dist/cli/{sessions-AQCRVLHW.js → sessions-DJWLUVXM.js} +5 -5
- package/dist/cli/{settings-LFFOFAU6.mjs → settings-3ZGLOANJ.mjs} +7 -7
- package/dist/cli/{settings-4SDI73XW.js → settings-KBNCPN3E.js} +74 -74
- package/dist/cli/{setup-BKCQOJBD.mjs → setup-R3UV4ZXN.mjs} +6 -6
- package/dist/cli/{setup-FQ3E7U7G.js → setup-WZZXC7H5.js} +41 -41
- package/dist/cli/{skills-USGJ5MF7.mjs → skills-44RXNHZH.mjs} +4 -4
- package/dist/cli/skills-52WTBX7A.js +28 -0
- package/dist/cli/tools-4ESTBMSN.js +40 -0
- package/dist/cli/{tools-5HTXLDZ4.mjs → tools-NLUPNYR3.mjs} +7 -7
- package/dist/cli/{update-F7TIJEIV.mjs → update-57GQJRXF.mjs} +6 -6
- package/dist/cli/update-V2FZCYNP.js +28 -0
- package/dist/cli/{workflow-FXJ2D2MG.mjs → workflow-ARCLSKBC.mjs} +5 -5
- package/dist/cli/{workflow-J5JVOUIL.js → workflow-XI7LZRTQ.js} +15 -15
- package/dist/{client-rHyf5s_Y.d.ts → client-4DbE-U6e.d.ts} +3 -1
- package/dist/{client-D20uyRYB.d.mts → client-DIJpwhl-.d.mts} +3 -1
- package/dist/{compiler-manifest-CButyeZ8.d.ts → compiler-manifest-DgdW0q0b.d.mts} +42 -1
- package/dist/{compiler-manifest-CButyeZ8.d.mts → compiler-manifest-DgdW0q0b.d.ts} +42 -1
- package/dist/{index-BMsNUoL5.d.mts → index-C3nQQTI-.d.mts} +1 -1
- package/dist/{index-LDRzwo09.d.ts → index-CEYQAfS0.d.ts} +1 -1
- package/dist/index.d.mts +6 -6
- package/dist/index.d.ts +6 -6
- package/dist/index.js +7 -7
- package/dist/index.mjs +4 -4
- package/dist/install-integrity.json +85 -84
- package/dist/plays/bundle-play-file.d.mts +3 -3
- package/dist/plays/bundle-play-file.d.ts +3 -3
- package/dist/plays/bundle-play-file.mjs +2 -2
- package/dist/plays/run-request.d.mts +2 -2
- package/dist/plays/run-request.d.ts +2 -2
- package/dist/release.d.mts +1 -1
- package/dist/release.d.ts +1 -1
- package/dist/release.js +2 -2
- package/dist/release.mjs +1 -1
- package/package.json +1 -1
- package/dist/cli/auth-PSMCNXBC.js +0 -31
- package/dist/cli/client-J4QGSQ6Y.js +0 -20
- package/dist/cli/git-2N5LS25H.js +0 -23
- package/dist/cli/play-WWMUYKWS.js +0 -153
- package/dist/cli/search-YZL2QRIF.js +0 -26
- package/dist/cli/skills-7BPEGDIA.js +0 -28
- package/dist/cli/tools-5VEZ4QR4.js +0 -40
- package/dist/cli/update-YFPMWKI4.js +0 -28
|
@@ -1,17 +1,17 @@
|
|
|
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
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkKGKPHGDTjs = require('./chunk-KGKPHGDT.js');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var _chunkU5U2DJ3Ajs = require('./chunk-U5U2DJ3A.js');
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
var
|
|
11
|
+
var _chunkEWYHXSV4js = require('./chunk-EWYHXSV4.js');
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _chunkGVJPI7MBjs = require('./chunk-GVJPI7MB.js');
|
|
15
15
|
|
|
16
16
|
// src/cli/commands/update.ts
|
|
17
17
|
var _child_process = require('child_process');
|
|
@@ -489,7 +489,7 @@ function normalizedNpmPrefix(value) {
|
|
|
489
489
|
}
|
|
490
490
|
function resolveNpmGlobalPrefix(env) {
|
|
491
491
|
try {
|
|
492
|
-
const plan =
|
|
492
|
+
const plan = _chunkU5U2DJ3Ajs.resolveShellSpawn.call(void 0, "npm", ["prefix", "-g"], process.platform, env);
|
|
493
493
|
const result = _child_process.spawnSync.call(void 0, plan.command, plan.args, {
|
|
494
494
|
encoding: "utf8",
|
|
495
495
|
env,
|
|
@@ -545,8 +545,8 @@ function resolveUpdatePlan(options = {}) {
|
|
|
545
545
|
const npmGlobalPrefix = options.npmGlobalPrefix !== void 0 ? options.npmGlobalPrefix : resolveNpmGlobalPrefix(env);
|
|
546
546
|
const hasVerifiedNpmOwnership = inferredInstallPrefix !== null && normalizedNpmPrefix(inferredInstallPrefix) === normalizedNpmPrefix(npmGlobalPrefix);
|
|
547
547
|
const installPrefix = options.requireVerifiedNpmOwnership ? hasVerifiedNpmOwnership ? inferredInstallPrefix : null : inferredInstallPrefix;
|
|
548
|
-
const npmVersion = options.npmVersion === void 0 ?
|
|
549
|
-
const npmGlobalInstallFlags =
|
|
548
|
+
const npmVersion = options.npmVersion === void 0 ? _chunkKGKPHGDTjs.readNpmVersion.call(void 0, env) : options.npmVersion;
|
|
549
|
+
const npmGlobalInstallFlags = _chunkKGKPHGDTjs.npmSupportsAllowScripts.call(void 0, npmVersion) ? [...NPM_SDK_INSTALL_COMMON_FLAGS, "--allow-scripts=esbuild"] : NPM_SDK_INSTALL_COMMON_FLAGS;
|
|
550
550
|
const args = installPrefix ? [
|
|
551
551
|
"install",
|
|
552
552
|
"-g",
|
|
@@ -556,7 +556,7 @@ function resolveUpdatePlan(options = {}) {
|
|
|
556
556
|
packageSpec
|
|
557
557
|
] : ["install", "-g", ...npmGlobalInstallFlags, packageSpec];
|
|
558
558
|
const fallbackRegistryUrl = options.npmFallbackRegistryUrl !== void 0 ? options.npmFallbackRegistryUrl : publicNpmFallbackRegistryUrl(
|
|
559
|
-
_optionalChain([env, 'access', _18 => _18.DEEPLINE_HOST_URL, 'optionalAccess', _19 => _19.trim, 'call', _20 => _20()]) ||
|
|
559
|
+
_optionalChain([env, 'access', _18 => _18.DEEPLINE_HOST_URL, 'optionalAccess', _19 => _19.trim, 'call', _20 => _20()]) || _chunkGVJPI7MBjs.autoDetectBaseUrl.call(void 0, )
|
|
560
560
|
);
|
|
561
561
|
return {
|
|
562
562
|
kind: "npm-global",
|
|
@@ -703,7 +703,7 @@ function sidecarInstallFailure(versionDir) {
|
|
|
703
703
|
function runCommand(command, args, env = process.env) {
|
|
704
704
|
return new Promise((resolveResult) => {
|
|
705
705
|
let output = "";
|
|
706
|
-
const plan =
|
|
706
|
+
const plan = _chunkU5U2DJ3Ajs.resolveShellSpawn.call(void 0, command, args, process.platform, env);
|
|
707
707
|
const child = _child_process.spawn.call(void 0, plan.command, plan.args, {
|
|
708
708
|
stdio: ["inherit", "pipe", "pipe"],
|
|
709
709
|
shell: plan.shell,
|
|
@@ -1079,14 +1079,14 @@ async function publishedVersionSupportsPin(version, fallbackRegistryUrl) {
|
|
|
1079
1079
|
throw _nullishCoalesce(lastError, () => ( new Error("No npm registry was available")));
|
|
1080
1080
|
}
|
|
1081
1081
|
async function runUpdateCommand(options, dependencies = {}) {
|
|
1082
|
-
const detectBaseUrl = _nullishCoalesce(dependencies.detectBaseUrl, () => (
|
|
1082
|
+
const detectBaseUrl = _nullishCoalesce(dependencies.detectBaseUrl, () => ( _chunkGVJPI7MBjs.autoDetectBaseUrl));
|
|
1083
1083
|
const resolvePlan = _nullishCoalesce(dependencies.resolvePlan, () => ( resolveUpdatePlan));
|
|
1084
1084
|
const runPlan = _nullishCoalesce(dependencies.runPlan, () => ( runUpdatePlan));
|
|
1085
1085
|
const syncSkills = _nullishCoalesce(dependencies.syncSkillsIfNeeded, () => ( (async () => {
|
|
1086
1086
|
const originalWrite = process.stdout.write.bind(process.stdout);
|
|
1087
1087
|
process.stdout.write = (() => true);
|
|
1088
1088
|
try {
|
|
1089
|
-
const exitCode = await
|
|
1089
|
+
const exitCode = await _chunkU5U2DJ3Ajs.runSkillsCommand.call(void 0, { json: true });
|
|
1090
1090
|
if (exitCode !== 0) {
|
|
1091
1091
|
throw new Error(
|
|
1092
1092
|
`Deepline skills update failed with exit ${exitCode}.`
|
|
@@ -1157,11 +1157,11 @@ async function runUpdateCommand(options, dependencies = {}) {
|
|
|
1157
1157
|
]
|
|
1158
1158
|
};
|
|
1159
1159
|
if (options.json && !options.executeWithJson) {
|
|
1160
|
-
|
|
1160
|
+
_chunkEWYHXSV4js.printCommandEnvelope.call(void 0, { ...plan, render }, { json: true });
|
|
1161
1161
|
return 0;
|
|
1162
1162
|
}
|
|
1163
1163
|
if (options.printCommand) {
|
|
1164
|
-
|
|
1164
|
+
_chunkEWYHXSV4js.printCommandEnvelope.call(void 0,
|
|
1165
1165
|
{
|
|
1166
1166
|
...plan,
|
|
1167
1167
|
render: {
|
|
@@ -1174,7 +1174,7 @@ async function runUpdateCommand(options, dependencies = {}) {
|
|
|
1174
1174
|
return 0;
|
|
1175
1175
|
}
|
|
1176
1176
|
if (plan.kind === "source" || plan.kind === "homebrew") {
|
|
1177
|
-
|
|
1177
|
+
_chunkEWYHXSV4js.printCommandEnvelope.call(void 0, { ...plan, render }, { json: false });
|
|
1178
1178
|
return 0;
|
|
1179
1179
|
}
|
|
1180
1180
|
stderr.write(`Updating Deepline SDK/CLI with: ${plan.manualCommand}
|
|
@@ -1204,7 +1204,7 @@ To retry with full installer output, run: deepline skills --json
|
|
|
1204
1204
|
);
|
|
1205
1205
|
}
|
|
1206
1206
|
if (options.executeWithJson && options.json) {
|
|
1207
|
-
|
|
1207
|
+
_chunkEWYHXSV4js.printCommandEnvelope.call(void 0,
|
|
1208
1208
|
{
|
|
1209
1209
|
ok: true,
|
|
1210
1210
|
pinnedVersion
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
RETAINED_PIPELINE_RECEIVERS_HEADER,
|
|
16
16
|
RUNTIME_ENVIRONMENT_TOKEN_HEADER,
|
|
17
17
|
resolveConfig
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-VWSEZMCR.mjs";
|
|
19
19
|
import {
|
|
20
20
|
PLAY_RUNTIME_BACKENDS,
|
|
21
21
|
RAW_V2_TOOL_RESPONSE_CONTRACT,
|
|
@@ -3261,6 +3261,7 @@ var DeeplineClient = class _DeeplineClient {
|
|
|
3261
3261
|
planQuery: (input) => planCustomerDbQuery(input)
|
|
3262
3262
|
};
|
|
3263
3263
|
this.billing = {
|
|
3264
|
+
entitlements: () => this.http.get("/api/v2/billing/entitlements"),
|
|
3264
3265
|
topUp: (options2) => this.topUpBillingBalance(options2),
|
|
3265
3266
|
topUpWithReceipt: (options2) => this.topUpBillingBalanceWithReceipt(options2),
|
|
3266
3267
|
plans: () => this.getBillingPlans(),
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _chunkEWYHXSV4js = require('./chunk-EWYHXSV4.js');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
@@ -25,7 +25,7 @@ var _chunkJB4UKD3Bjs = require('./chunk-JB4UKD3B.js');
|
|
|
25
25
|
|
|
26
26
|
|
|
27
27
|
|
|
28
|
-
var
|
|
28
|
+
var _chunkGVJPI7MBjs = require('./chunk-GVJPI7MB.js');
|
|
29
29
|
|
|
30
30
|
// src/cli/commands/auth.ts
|
|
31
31
|
|
|
@@ -52,7 +52,7 @@ function statusBannerLine(value) {
|
|
|
52
52
|
return `Service notice: ${banner.message}`;
|
|
53
53
|
}
|
|
54
54
|
function envFilePath(baseUrl) {
|
|
55
|
-
return
|
|
55
|
+
return _chunkGVJPI7MBjs.hostEnvFilePath.call(void 0, baseUrl);
|
|
56
56
|
}
|
|
57
57
|
function normalizeAuthScope(value) {
|
|
58
58
|
if (!value || value === "global") return "global";
|
|
@@ -65,7 +65,7 @@ function parseAuthScope(args) {
|
|
|
65
65
|
}
|
|
66
66
|
function pendingClaimPath(baseUrl, scope) {
|
|
67
67
|
if (scope === "folder") {
|
|
68
|
-
const target =
|
|
68
|
+
const target = _chunkGVJPI7MBjs.resolveProjectPinTarget.call(void 0, );
|
|
69
69
|
if (!target.ok) {
|
|
70
70
|
throw new Error(
|
|
71
71
|
`Cowork project folder is ambiguous. Candidate folders: ${target.candidates.join(
|
|
@@ -75,10 +75,10 @@ function pendingClaimPath(baseUrl, scope) {
|
|
|
75
75
|
}
|
|
76
76
|
return _path.join.call(void 0, target.dir, ".deepline", "setup", "pending-auth.json");
|
|
77
77
|
}
|
|
78
|
-
return `${
|
|
78
|
+
return `${_chunkGVJPI7MBjs.hostConfigDirPath.call(void 0, baseUrl)}/pending-auth.json`;
|
|
79
79
|
}
|
|
80
80
|
function legacyPendingClaimTokenPath(baseUrl) {
|
|
81
|
-
return `${
|
|
81
|
+
return `${_chunkGVJPI7MBjs.hostConfigDirPath.call(void 0, baseUrl)}/pending-claim-token`;
|
|
82
82
|
}
|
|
83
83
|
function savePendingClaim(baseUrl, claim) {
|
|
84
84
|
const filePath = pendingClaimPath(baseUrl, claim.scope);
|
|
@@ -180,21 +180,21 @@ function parseRegisterWaitMode(args) {
|
|
|
180
180
|
function shouldWaitForRegisterClaim(mode) {
|
|
181
181
|
if (mode === "yes") return true;
|
|
182
182
|
if (mode === "no") return false;
|
|
183
|
-
return
|
|
183
|
+
return _chunkGVJPI7MBjs.detectAgentRuntime.call(void 0, ) !== "claude_cowork";
|
|
184
184
|
}
|
|
185
185
|
function saveEnvValues(values, baseUrl, scope) {
|
|
186
186
|
const filtered = {
|
|
187
|
-
...values[
|
|
188
|
-
...values[
|
|
189
|
-
...values[
|
|
190
|
-
...Object.prototype.hasOwnProperty.call(values,
|
|
187
|
+
...values[_chunkGVJPI7MBjs.HOST_URL_ENV] ? { [_chunkGVJPI7MBjs.HOST_URL_ENV]: values[_chunkGVJPI7MBjs.HOST_URL_ENV] } : {},
|
|
188
|
+
...values[_chunkGVJPI7MBjs.API_KEY_ENV] ? { [_chunkGVJPI7MBjs.API_KEY_ENV]: values[_chunkGVJPI7MBjs.API_KEY_ENV] } : {},
|
|
189
|
+
...values[_chunkGVJPI7MBjs.ACTIVE_ORG_ID_ENV] ? { [_chunkGVJPI7MBjs.ACTIVE_ORG_ID_ENV]: values[_chunkGVJPI7MBjs.ACTIVE_ORG_ID_ENV] } : {},
|
|
190
|
+
...Object.prototype.hasOwnProperty.call(values, _chunkGVJPI7MBjs.ACTIVE_ORG_NAME_ENV) ? { [_chunkGVJPI7MBjs.ACTIVE_ORG_NAME_ENV]: values[_chunkGVJPI7MBjs.ACTIVE_ORG_NAME_ENV] } : {},
|
|
191
191
|
// An explicit empty list must reach the store: it clears a stale line.
|
|
192
|
-
...Object.prototype.hasOwnProperty.call(values,
|
|
192
|
+
...Object.prototype.hasOwnProperty.call(values, _chunkGVJPI7MBjs.FEATURES_ENV) ? { [_chunkGVJPI7MBjs.FEATURES_ENV]: values[_chunkGVJPI7MBjs.FEATURES_ENV] } : {}
|
|
193
193
|
};
|
|
194
194
|
if (scope === "folder") {
|
|
195
|
-
|
|
195
|
+
_chunkGVJPI7MBjs.saveProjectDeeplineEnvValues.call(void 0, filtered);
|
|
196
196
|
} else {
|
|
197
|
-
|
|
197
|
+
_chunkGVJPI7MBjs.saveHostEnvValues.call(void 0, baseUrl, filtered);
|
|
198
198
|
}
|
|
199
199
|
}
|
|
200
200
|
function activeOrgEnvValues(data) {
|
|
@@ -202,21 +202,21 @@ function activeOrgEnvValues(data) {
|
|
|
202
202
|
if (!orgId) return {};
|
|
203
203
|
const orgName = typeof data.org_name === "string" ? data.org_name.trim() : "";
|
|
204
204
|
return {
|
|
205
|
-
[
|
|
206
|
-
[
|
|
207
|
-
...
|
|
205
|
+
[_chunkGVJPI7MBjs.ACTIVE_ORG_ID_ENV]: orgId,
|
|
206
|
+
[_chunkGVJPI7MBjs.ACTIVE_ORG_NAME_ENV]: orgName,
|
|
207
|
+
..._chunkGVJPI7MBjs.featureEnvValues.call(void 0, data)
|
|
208
208
|
};
|
|
209
209
|
}
|
|
210
210
|
async function httpJson(method, url, apiKey, body, timeoutMs = AUTH_HTTP_TIMEOUT_MS) {
|
|
211
211
|
const headers = {
|
|
212
212
|
"Content-Type": "application/json",
|
|
213
|
-
"User-Agent": `deepline-ts-sdk/${
|
|
213
|
+
"User-Agent": `deepline-ts-sdk/${_chunkGVJPI7MBjs.SDK_VERSION}`,
|
|
214
214
|
"X-Deepline-Client-Family": "sdk",
|
|
215
215
|
"X-Deepline-CLI-Family": "sdk",
|
|
216
|
-
"X-Deepline-Agent-Runtime":
|
|
217
|
-
"X-Deepline-CLI-Version":
|
|
218
|
-
"X-Deepline-SDK-Version":
|
|
219
|
-
"X-Deepline-API-Contract":
|
|
216
|
+
"X-Deepline-Agent-Runtime": _chunkGVJPI7MBjs.detectAgentRuntime.call(void 0, ),
|
|
217
|
+
"X-Deepline-CLI-Version": _chunkGVJPI7MBjs.SDK_VERSION,
|
|
218
|
+
"X-Deepline-SDK-Version": _chunkGVJPI7MBjs.SDK_VERSION,
|
|
219
|
+
"X-Deepline-API-Contract": _chunkGVJPI7MBjs.SDK_API_CONTRACT
|
|
220
220
|
};
|
|
221
221
|
if (apiKey) headers["Authorization"] = `Bearer ${apiKey}`;
|
|
222
222
|
const bypassToken = _optionalChain([process, 'access', _7 => _7.env, 'access', _8 => _8.VERCEL_PROTECTION_BYPASS_TOKEN, 'optionalAccess', _9 => _9.trim, 'call', _10 => _10()]);
|
|
@@ -254,7 +254,7 @@ async function httpJson(method, url, apiKey, body, timeoutMs = AUTH_HTTP_TIMEOUT
|
|
|
254
254
|
throw lastError instanceof Error ? lastError : new Error(String(lastError));
|
|
255
255
|
}
|
|
256
256
|
async function reportSetupCompleted(input) {
|
|
257
|
-
const apiKey = input.authScope === "folder" ?
|
|
257
|
+
const apiKey = input.authScope === "folder" ? _chunkGVJPI7MBjs.resolveProjectApiKeyForBaseUrl.call(void 0, input.baseUrl) : _chunkGVJPI7MBjs.resolveGlobalApiKeyForBaseUrl.call(void 0, input.baseUrl);
|
|
258
258
|
if (!apiKey) return;
|
|
259
259
|
try {
|
|
260
260
|
await httpJson(
|
|
@@ -351,7 +351,7 @@ async function printClaimSuccessBanner(baseUrl, apiKey, statusData) {
|
|
|
351
351
|
}
|
|
352
352
|
}
|
|
353
353
|
async function handleRegister(args) {
|
|
354
|
-
const baseUrl =
|
|
354
|
+
const baseUrl = _chunkGVJPI7MBjs.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, "");
|
|
355
355
|
let orgName = "";
|
|
356
356
|
let orgId = "";
|
|
357
357
|
let agentName = "";
|
|
@@ -406,19 +406,19 @@ async function handleRegister(args) {
|
|
|
406
406
|
});
|
|
407
407
|
saveEnvValues(
|
|
408
408
|
{
|
|
409
|
-
[
|
|
409
|
+
[_chunkGVJPI7MBjs.HOST_URL_ENV]: baseUrl
|
|
410
410
|
},
|
|
411
411
|
baseUrl,
|
|
412
412
|
authScope
|
|
413
413
|
);
|
|
414
414
|
}
|
|
415
415
|
if (claimUrl) {
|
|
416
|
-
const shouldOpen = waitMode !== "no" &&
|
|
416
|
+
const shouldOpen = waitMode !== "no" && _chunkGVJPI7MBjs.detectAgentRuntime.call(void 0, ) !== "claude_cowork";
|
|
417
417
|
console.log(
|
|
418
418
|
shouldOpen ? " Opening approval page in your browser." : " Open this approval page in your browser:"
|
|
419
419
|
);
|
|
420
420
|
console.log(` ${claimUrl}`);
|
|
421
|
-
if (shouldOpen)
|
|
421
|
+
if (shouldOpen) _chunkEWYHXSV4js.openInBrowser.call(void 0, claimUrl);
|
|
422
422
|
}
|
|
423
423
|
if (data.cli_message) {
|
|
424
424
|
console.log(String(data.cli_message));
|
|
@@ -461,8 +461,8 @@ async function handleRegister(args) {
|
|
|
461
461
|
if (apiKey) {
|
|
462
462
|
saveEnvValues(
|
|
463
463
|
{
|
|
464
|
-
[
|
|
465
|
-
[
|
|
464
|
+
[_chunkGVJPI7MBjs.HOST_URL_ENV]: baseUrl,
|
|
465
|
+
[_chunkGVJPI7MBjs.API_KEY_ENV]: apiKey,
|
|
466
466
|
...activeOrgEnvValues(statusData)
|
|
467
467
|
},
|
|
468
468
|
baseUrl,
|
|
@@ -484,7 +484,7 @@ async function handleRegister(args) {
|
|
|
484
484
|
}
|
|
485
485
|
}
|
|
486
486
|
async function handleWait(args) {
|
|
487
|
-
const baseUrl =
|
|
487
|
+
const baseUrl = _chunkGVJPI7MBjs.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, "");
|
|
488
488
|
let timeoutSeconds = 300;
|
|
489
489
|
let requestedScope;
|
|
490
490
|
if (args.includes("--auth-scope")) {
|
|
@@ -508,7 +508,7 @@ async function handleWait(args) {
|
|
|
508
508
|
const authScope = resumed.scope;
|
|
509
509
|
const claimToken = _nullishCoalesce(_optionalChain([pendingClaim, 'optionalAccess', _11 => _11.claimToken]), () => ( ""));
|
|
510
510
|
if (!pendingClaim) {
|
|
511
|
-
const scopedApiKey = authScope === "folder" ?
|
|
511
|
+
const scopedApiKey = authScope === "folder" ? _chunkGVJPI7MBjs.resolveProjectApiKeyForBaseUrl.call(void 0, baseUrl) : _chunkGVJPI7MBjs.resolveGlobalApiKeyForBaseUrl.call(void 0, baseUrl);
|
|
512
512
|
if (scopedApiKey) {
|
|
513
513
|
console.log("Already connected.");
|
|
514
514
|
return EXIT_OK;
|
|
@@ -551,8 +551,8 @@ async function handleWait(args) {
|
|
|
551
551
|
if (apiKey) {
|
|
552
552
|
saveEnvValues(
|
|
553
553
|
{
|
|
554
|
-
[
|
|
555
|
-
[
|
|
554
|
+
[_chunkGVJPI7MBjs.HOST_URL_ENV]: baseUrl,
|
|
555
|
+
[_chunkGVJPI7MBjs.API_KEY_ENV]: apiKey,
|
|
556
556
|
...activeOrgEnvValues(data)
|
|
557
557
|
},
|
|
558
558
|
baseUrl,
|
|
@@ -576,9 +576,9 @@ async function handleWait(args) {
|
|
|
576
576
|
return EXIT_AUTH;
|
|
577
577
|
}
|
|
578
578
|
async function handleStatus(args) {
|
|
579
|
-
const baseUrl =
|
|
579
|
+
const baseUrl = _chunkGVJPI7MBjs.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, "");
|
|
580
580
|
const reveal = args.includes("--reveal");
|
|
581
|
-
const jsonOutput =
|
|
581
|
+
const jsonOutput = _chunkEWYHXSV4js.argsWantJson.call(void 0, args);
|
|
582
582
|
const hasExplicitAuthScope = args.includes("--auth-scope");
|
|
583
583
|
let authScope = null;
|
|
584
584
|
if (hasExplicitAuthScope) {
|
|
@@ -618,14 +618,14 @@ async function handleStatus(args) {
|
|
|
618
618
|
};
|
|
619
619
|
hostLines.push(`Host: ${baseUrl} (unreachable)`);
|
|
620
620
|
}
|
|
621
|
-
const apiKey = authScope === "folder" ?
|
|
621
|
+
const apiKey = authScope === "folder" ? _chunkGVJPI7MBjs.resolveProjectApiKeyForBaseUrl.call(void 0, baseUrl) : authScope === "global" ? _chunkGVJPI7MBjs.resolveGlobalApiKeyForBaseUrl.call(void 0, baseUrl) : _chunkGVJPI7MBjs.resolveApiKeyForBaseUrl.call(void 0, baseUrl);
|
|
622
622
|
if (!apiKey) {
|
|
623
623
|
const { claim: pendingClaim } = resolvePendingAuthClaimForResume(
|
|
624
624
|
baseUrl,
|
|
625
625
|
_nullishCoalesce(authScope, () => ( void 0))
|
|
626
626
|
);
|
|
627
627
|
if (pendingClaim) {
|
|
628
|
-
|
|
628
|
+
_chunkEWYHXSV4js.printCommandEnvelope.call(void 0,
|
|
629
629
|
{
|
|
630
630
|
..._nullishCoalesce(hostStatusPayload, () => ( { host: baseUrl })),
|
|
631
631
|
status: "pending",
|
|
@@ -646,7 +646,7 @@ async function handleStatus(args) {
|
|
|
646
646
|
);
|
|
647
647
|
return EXIT_OK;
|
|
648
648
|
}
|
|
649
|
-
|
|
649
|
+
_chunkEWYHXSV4js.printCommandEnvelope.call(void 0,
|
|
650
650
|
{
|
|
651
651
|
..._nullishCoalesce(hostStatusPayload, () => ( { host: baseUrl })),
|
|
652
652
|
status: "not connected",
|
|
@@ -679,7 +679,7 @@ async function handleStatus(args) {
|
|
|
679
679
|
}
|
|
680
680
|
);
|
|
681
681
|
if (status === 401 || status === 403) {
|
|
682
|
-
|
|
682
|
+
_chunkEWYHXSV4js.printCommandEnvelope.call(void 0,
|
|
683
683
|
{
|
|
684
684
|
..._nullishCoalesce(hostStatusPayload, () => ( { host: baseUrl })),
|
|
685
685
|
status: "unauthorized",
|
|
@@ -706,7 +706,7 @@ async function handleStatus(args) {
|
|
|
706
706
|
console.error(`Auth status error (status ${status}).`);
|
|
707
707
|
return EXIT_SERVER;
|
|
708
708
|
}
|
|
709
|
-
const resolvedAuthScope = _nullishCoalesce(authScope, () => ( (
|
|
709
|
+
const resolvedAuthScope = _nullishCoalesce(authScope, () => ( (_chunkGVJPI7MBjs.getResolvedProjectAuthSource.call(void 0, baseUrl, apiKey) ? "folder" : "global")));
|
|
710
710
|
clearSatisfiedPendingClaim(
|
|
711
711
|
baseUrl,
|
|
712
712
|
resolvedAuthScope,
|
|
@@ -734,28 +734,28 @@ async function handleStatus(args) {
|
|
|
734
734
|
if (apiKeyResp) {
|
|
735
735
|
saveEnvValues(
|
|
736
736
|
{
|
|
737
|
-
[
|
|
738
|
-
[
|
|
737
|
+
[_chunkGVJPI7MBjs.HOST_URL_ENV]: baseUrl,
|
|
738
|
+
[_chunkGVJPI7MBjs.API_KEY_ENV]: apiKeyResp,
|
|
739
739
|
...activeOrgEnvValues(data)
|
|
740
740
|
},
|
|
741
741
|
baseUrl,
|
|
742
742
|
resolvedAuthScope
|
|
743
743
|
);
|
|
744
744
|
if (resolvedAuthScope === "folder") {
|
|
745
|
-
const target =
|
|
745
|
+
const target = _chunkGVJPI7MBjs.resolveProjectPinTarget.call(void 0, );
|
|
746
746
|
savedApiKeyPath = target.ok ? _path.join.call(void 0, target.dir, ".env.deepline") : null;
|
|
747
747
|
} else {
|
|
748
748
|
savedApiKeyPath = envFilePath(baseUrl);
|
|
749
749
|
}
|
|
750
750
|
}
|
|
751
|
-
} else if (resolvedAuthScope === "folder" ||
|
|
752
|
-
saveEnvValues(
|
|
751
|
+
} else if (resolvedAuthScope === "folder" || _chunkGVJPI7MBjs.storedHostApiKey.call(void 0, baseUrl) === apiKey) {
|
|
752
|
+
saveEnvValues(_chunkGVJPI7MBjs.featureEnvValues.call(void 0, data), baseUrl, resolvedAuthScope);
|
|
753
753
|
}
|
|
754
|
-
|
|
754
|
+
_chunkEWYHXSV4js.printCommandEnvelope.call(void 0,
|
|
755
755
|
{
|
|
756
756
|
...payload,
|
|
757
|
-
...
|
|
758
|
-
command_context:
|
|
757
|
+
..._chunkGVJPI7MBjs.detectAgentRuntime.call(void 0, ) !== "unknown" ? {
|
|
758
|
+
command_context: _chunkGVJPI7MBjs.resolveCliCommandContext.call(void 0,
|
|
759
759
|
{ baseUrl, apiKey },
|
|
760
760
|
resolvedAuthScope
|
|
761
761
|
)
|
|
@@ -1,10 +1,10 @@
|
|
|
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
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkEWYHXSV4js = require('./chunk-EWYHXSV4.js');
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunkGVJPI7MBjs = require('./chunk-GVJPI7MB.js');
|
|
8
8
|
|
|
9
9
|
// src/cli/commands/sessions.ts
|
|
10
10
|
|
|
@@ -139,7 +139,7 @@ function currentSessionFile(agent) {
|
|
|
139
139
|
const newestFirst = listSessionFiles(agent).sort(
|
|
140
140
|
(a, b) => b.mtimeMs - a.mtimeMs
|
|
141
141
|
);
|
|
142
|
-
const sessionId =
|
|
142
|
+
const sessionId = _chunkGVJPI7MBjs.agentSessionIdFromEnvironment.call(void 0, );
|
|
143
143
|
const cwd = process.cwd();
|
|
144
144
|
return _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(newestFirst.find((candidate) => candidate.sessionId === sessionId), () => ( newestFirst.find(
|
|
145
145
|
(candidate) => sessionStartedInDirectory(candidate, cwd)
|
|
@@ -448,7 +448,7 @@ function buildSessionUploadContent(raw) {
|
|
|
448
448
|
return { encodedContent: encoded, needsChunking: true };
|
|
449
449
|
}
|
|
450
450
|
async function uploadPayload(path, payload) {
|
|
451
|
-
const { http } =
|
|
451
|
+
const { http } = _chunkEWYHXSV4js.getAuthedHttpClient.call(void 0, );
|
|
452
452
|
return await http.post(path, payload);
|
|
453
453
|
}
|
|
454
454
|
async function uploadChunkedSessions(sessions, options) {
|
|
@@ -481,7 +481,7 @@ async function uploadChunkedSessions(sessions, options) {
|
|
|
481
481
|
...options.rating ? { rating: options.rating } : {}
|
|
482
482
|
});
|
|
483
483
|
const sessionIds = sessions.map((session) => session.sessionId);
|
|
484
|
-
|
|
484
|
+
_chunkEWYHXSV4js.printCommandEnvelope.call(void 0,
|
|
485
485
|
{
|
|
486
486
|
...response,
|
|
487
487
|
ok: true,
|
|
@@ -513,7 +513,7 @@ async function handleSessionsSend(options) {
|
|
|
513
513
|
filename: _path.basename.call(void 0, filePath),
|
|
514
514
|
...rating ? { rating } : {}
|
|
515
515
|
});
|
|
516
|
-
|
|
516
|
+
_chunkEWYHXSV4js.printCommandEnvelope.call(void 0,
|
|
517
517
|
{
|
|
518
518
|
...response2,
|
|
519
519
|
ok: true,
|
|
@@ -563,7 +563,7 @@ async function handleSessionsSend(options) {
|
|
|
563
563
|
...rating ? { rating } : {}
|
|
564
564
|
});
|
|
565
565
|
const sessionIds = built.map((session) => session.sessionId);
|
|
566
|
-
|
|
566
|
+
_chunkEWYHXSV4js.printCommandEnvelope.call(void 0,
|
|
567
567
|
{
|
|
568
568
|
...response,
|
|
569
569
|
ok: true,
|
|
@@ -671,7 +671,7 @@ ${refreshMeta}
|
|
|
671
671
|
</body>
|
|
672
672
|
</html>`;
|
|
673
673
|
_fs.writeFileSync.call(void 0, outputPath, html, "utf8");
|
|
674
|
-
|
|
674
|
+
_chunkEWYHXSV4js.printCommandEnvelope.call(void 0,
|
|
675
675
|
{
|
|
676
676
|
ok: true,
|
|
677
677
|
file: outputPath,
|
|
@@ -15,7 +15,7 @@ var _chunkLA46MMTLjs = require('./chunk-LA46MMTL.js');
|
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
|
|
18
|
-
var
|
|
18
|
+
var _chunkGVJPI7MBjs = require('./chunk-GVJPI7MB.js');
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
|
|
@@ -167,7 +167,7 @@ async function queryCustomerDatabase(http, input) {
|
|
|
167
167
|
if (error instanceof _chunk7P5AA3SNjs.DeeplineError && (_optionalChain([error, 'access', _2 => _2.code, 'optionalAccess', _3 => _3.startsWith, 'call', _4 => _4("NETWORK_")]) || // Older API readers return PostgreSQL errors as HTTP 400, including
|
|
168
168
|
// lost connections and explicitly unknown transaction resolution.
|
|
169
169
|
/^08[A-Z0-9]{3}$/.test(_nullishCoalesce(error.code, () => ( ""))) || ["57P01", "57P02", "57P03"].includes(_nullishCoalesce(error.code, () => ( ""))) || error.statusCode === 408 || (_nullishCoalesce(error.statusCode, () => ( 0))) >= 500)) {
|
|
170
|
-
throw new (0,
|
|
170
|
+
throw new (0, _chunkGVJPI7MBjs.CustomerDbQueryOutcomeUnknownError)(
|
|
171
171
|
error,
|
|
172
172
|
plan.request.body.operation_key
|
|
173
173
|
);
|
|
@@ -175,7 +175,7 @@ async function queryCustomerDatabase(http, input) {
|
|
|
175
175
|
throw error;
|
|
176
176
|
}
|
|
177
177
|
if (!result || typeof result !== "object" || Array.isArray(result) || typeof result.command !== "string" || !Array.isArray(result.columns) || !Array.isArray(result.rows) || typeof result.truncated !== "boolean" || result.row_count !== null && (!Number.isSafeInteger(result.row_count) || result.row_count < 0) || !Number.isSafeInteger(result.row_count_returned) || result.row_count_returned < 0) {
|
|
178
|
-
throw new (0,
|
|
178
|
+
throw new (0, _chunkGVJPI7MBjs.CustomerDbQueryOutcomeUnknownError)(
|
|
179
179
|
new (0, _chunk7P5AA3SNjs.DeeplineError)(
|
|
180
180
|
"The SQL response did not contain a valid result.",
|
|
181
181
|
200,
|
|
@@ -186,7 +186,7 @@ async function queryCustomerDatabase(http, input) {
|
|
|
186
186
|
}
|
|
187
187
|
const operation = result.operation;
|
|
188
188
|
if (input.operationKey !== void 0 && (!operation || operation.operation_key !== input.operationKey || !Number.isSafeInteger(operation.completed_at_ms) || operation.completed_at_ms < 0 || !["executed", "operation_recovery"].includes(operation.source))) {
|
|
189
|
-
throw new (0,
|
|
189
|
+
throw new (0, _chunkGVJPI7MBjs.CustomerDbQueryOutcomeUnknownError)(
|
|
190
190
|
new (0, _chunk7P5AA3SNjs.DeeplineError)(
|
|
191
191
|
"The server did not confirm the original atomic SQL operation.",
|
|
192
192
|
200,
|
|
@@ -2910,8 +2910,8 @@ function runtimeSelectionHeaders(runtime) {
|
|
|
2910
2910
|
}
|
|
2911
2911
|
const receivers = _optionalChain([process, 'access', _104 => _104.env, 'access', _105 => _105.DEEPLINE_RUNTIME_RETAINED_PIPELINE_RECEIVERS, 'optionalAccess', _106 => _106.trim, 'call', _107 => _107()]);
|
|
2912
2912
|
return {
|
|
2913
|
-
[
|
|
2914
|
-
...receivers ? { [
|
|
2913
|
+
[_chunkGVJPI7MBjs.RUNTIME_ENVIRONMENT_TOKEN_HEADER]: token,
|
|
2914
|
+
...receivers ? { [_chunkGVJPI7MBjs.RETAINED_PIPELINE_RECEIVERS_HEADER]: receivers } : {}
|
|
2915
2915
|
};
|
|
2916
2916
|
}
|
|
2917
2917
|
function isolatedCiRuntimeEventReadHeaders() {
|
|
@@ -2927,7 +2927,7 @@ function isolatedCiRuntimeEventReadHeaders() {
|
|
|
2927
2927
|
"RUNTIME_EVENT_INTERNAL_TOKEN_REQUIRED"
|
|
2928
2928
|
);
|
|
2929
2929
|
}
|
|
2930
|
-
return { [
|
|
2930
|
+
return { [_chunkGVJPI7MBjs.COORDINATOR_INTERNAL_TOKEN_HEADER]: token };
|
|
2931
2931
|
}
|
|
2932
2932
|
function normalizeTestPolicyOverrides(value, source) {
|
|
2933
2933
|
if (value && typeof value === "object" && !Array.isArray(value)) {
|
|
@@ -3217,8 +3217,8 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
3217
3217
|
* @throws {@link ConfigError} if no API key can be resolved from any source.
|
|
3218
3218
|
*/
|
|
3219
3219
|
constructor(options) {
|
|
3220
|
-
this.config =
|
|
3221
|
-
this.http = new (0,
|
|
3220
|
+
this.config = _chunkGVJPI7MBjs.resolveConfig.call(void 0, options);
|
|
3221
|
+
this.http = new (0, _chunkGVJPI7MBjs.HttpClient)(this.config);
|
|
3222
3222
|
this.toolCalls = new ToolCalls(
|
|
3223
3223
|
this.http,
|
|
3224
3224
|
this.config.timeout,
|
|
@@ -3261,6 +3261,7 @@ var DeeplineClient = (_class = class _DeeplineClient {
|
|
|
3261
3261
|
planQuery: (input) => planCustomerDbQuery(input)
|
|
3262
3262
|
};
|
|
3263
3263
|
this.billing = {
|
|
3264
|
+
entitlements: () => this.http.get("/api/v2/billing/entitlements"),
|
|
3264
3265
|
topUp: (options2) => this.topUpBillingBalance(options2),
|
|
3265
3266
|
topUpWithReceipt: (options2) => this.topUpBillingBalanceWithReceipt(options2),
|
|
3266
3267
|
plans: () => this.getBillingPlans(),
|
|
@@ -1620,7 +1620,9 @@ var PLAY_AUTHORING_CLOUD_TYPE_DECLARATIONS = [
|
|
|
1620
1620
|
" run(options?: DatasetRunOptions<InputRow>): Promise<PlayDataset<OutputRow>>;",
|
|
1621
1621
|
"};",
|
|
1622
1622
|
"export type PlayReferenceLike<TInput extends Record<string, unknown> = Record<string, unknown>> = ({ readonly playName: string; readonly name?: string } | { readonly name: string; readonly playName?: string }) & { readonly __inputType?: TInput };",
|
|
1623
|
+
"export type BillingEntitlements = { org_id: string; as_of: number; plan: { sku: string; name: string; catalog_revision: string | null; included_credits: number; interval: 'month' | 'year' | null } | null; benefits: { quickenrichUnlimited?: { status: 'active' | 'past_due'; value: { enabled: boolean; requestsPerMinute: number }; expiresAt?: number } }; effective_limits: { quickenrichUnlimited?: { baseline: number; effective: number; source: 'plan' | 'override'; override_expires_at?: number } } };",
|
|
1623
1624
|
"export interface DeeplinePlayRuntimeContext {",
|
|
1625
|
+
" billing: { entitlements(): Promise<BillingEntitlements> };",
|
|
1624
1626
|
" csv<T = Record<string, unknown>>(path: string | CsvInput<T & object>, options?: CsvOptions): Promise<PlayDataset<T>>;",
|
|
1625
1627
|
" dataset<TSource extends PlayDatasetInput<object>>(key: string, items: TSource): DatasetBuilder<PlayDatasetRow<TSource> & object, PlayDatasetRow<TSource> & object>;",
|
|
1626
1628
|
" map<TSource extends PlayDatasetInput<object>>(key: string, items: TSource, options?: DatasetDefinitionOptions<PlayDatasetRow<TSource> & object>): never;",
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
argsWantJson,
|
|
3
3
|
openInBrowser,
|
|
4
4
|
printCommandEnvelope
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-5AZNXX2S.mjs";
|
|
6
6
|
import {
|
|
7
7
|
ACTIVE_ORG_ID_ENV,
|
|
8
8
|
ACTIVE_ORG_NAME_ENV,
|
|
@@ -25,7 +25,7 @@ import {
|
|
|
25
25
|
saveHostEnvValues,
|
|
26
26
|
saveProjectDeeplineEnvValues,
|
|
27
27
|
storedHostApiKey
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-VWSEZMCR.mjs";
|
|
29
29
|
|
|
30
30
|
// src/cli/commands/auth.ts
|
|
31
31
|
import {
|
|
@@ -1,14 +1,14 @@
|
|
|
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 _chunk5IYFQJHXjs = require('./chunk-5IYFQJHX.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunkEWYHXSV4js = require('./chunk-EWYHXSV4.js');
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
var
|
|
11
|
+
var _chunkGVJPI7MBjs = require('./chunk-GVJPI7MB.js');
|
|
12
12
|
|
|
13
13
|
// src/cli/commands/search.ts
|
|
14
14
|
var _commander = require('commander');
|
|
@@ -18,7 +18,7 @@ var _fs = require('fs');
|
|
|
18
18
|
var _path = require('path');
|
|
19
19
|
var SEARCH_REF_TTL_MS = 15 * 6e4;
|
|
20
20
|
function lastSearchPath() {
|
|
21
|
-
return _path.join.call(void 0,
|
|
21
|
+
return _path.join.call(void 0, _chunkGVJPI7MBjs.sdkCliStateDirPath.call(void 0, _chunkGVJPI7MBjs.resolveConfig.call(void 0, ).baseUrl), "last-search.json");
|
|
22
22
|
}
|
|
23
23
|
function rememberSearchRef(searchRef) {
|
|
24
24
|
try {
|
|
@@ -130,7 +130,7 @@ function searchRow(item) {
|
|
|
130
130
|
}
|
|
131
131
|
function renderSearchResults(result) {
|
|
132
132
|
if (result.results.length === 0)
|
|
133
|
-
return
|
|
133
|
+
return _chunkEWYHXSV4js.renderCommandEnvelopeText.call(void 0, result);
|
|
134
134
|
const rows = result.results.map(searchRow);
|
|
135
135
|
const kinds = new Set(rows.map((row) => row.kind));
|
|
136
136
|
const onlyTools = kinds.size === 1 && kinds.has("tool");
|
|
@@ -147,7 +147,7 @@ function renderSearchResults(result) {
|
|
|
147
147
|
actions: _optionalChain([render, 'optionalAccess', _9 => _9.actions])
|
|
148
148
|
};
|
|
149
149
|
const followUps = _optionalChain([remaining, 'access', _10 => _10.sections, 'optionalAccess', _11 => _11.length]) || _optionalChain([remaining, 'access', _12 => _12.actions, 'optionalAccess', _13 => _13.length]) ? `
|
|
150
|
-
${
|
|
150
|
+
${_chunkEWYHXSV4js.renderCommandEnvelopeText.call(void 0, { render: remaining })}` : "";
|
|
151
151
|
const notes = rows.flatMap(
|
|
152
152
|
(row) => row.notes.map((note) => ` ${row.id}: ${note}`)
|
|
153
153
|
);
|
|
@@ -224,7 +224,7 @@ async function runSearch(queryInput, options, types, exclude = []) {
|
|
|
224
224
|
console.error(USAGE);
|
|
225
225
|
return 1;
|
|
226
226
|
}
|
|
227
|
-
const { search_ref: searchRef, ...result } = await new (0,
|
|
227
|
+
const { search_ref: searchRef, ...result } = await new (0, _chunk5IYFQJHXjs.DeeplineClient)().search({
|
|
228
228
|
query,
|
|
229
229
|
types,
|
|
230
230
|
exclude,
|
|
@@ -238,7 +238,7 @@ async function runSearch(queryInput, options, types, exclude = []) {
|
|
|
238
238
|
});
|
|
239
239
|
if (searchRef) rememberSearchRef(searchRef);
|
|
240
240
|
pointAtDescribe(result);
|
|
241
|
-
|
|
241
|
+
_chunkEWYHXSV4js.printCommandEnvelope.call(void 0, result, {
|
|
242
242
|
json: options.json === true,
|
|
243
243
|
text: renderSearchResults(result)
|
|
244
244
|
});
|