deepline 0.3.468 → 0.3.470
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundling-sources/sdk/src/release.ts +1 -1
- package/dist/bundling-sources/shared_libs/monitors/http-error-response.ts +0 -5
- package/dist/bundling-sources/shared_libs/monitors/provider-monitor-errors.ts +0 -9
- package/dist/bundling-sources/shared_libs/monitors/provider-monitor-identity-claims.ts +2 -31
- package/dist/bundling-sources/shared_libs/monitors/provider-monitor-priority-execution.ts +0 -39
- package/dist/bundling-sources/shared_libs/play-runtime/play-runs/admission/postgres-adapter.ts +3 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd.ts +3 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres.ts +42 -10
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/run-ledger-outbox-recovery.ts +17 -8
- package/dist/cli/auth-4DBOZZDX.js +41 -0
- package/dist/cli/{auth-CXQRTOBC.mjs → auth-7J52UEWO.mjs} +5 -5
- package/dist/cli/{billing-JSIPTXM6.js → billing-ASNWVDQG.js} +79 -79
- package/dist/cli/{billing-HDKO5VQI.mjs → billing-ORB3UZ73.mjs} +6 -6
- package/dist/cli/{chunk-NZQPALPW.mjs → chunk-262PYO4I.mjs} +2 -2
- package/dist/cli/{chunk-ERQJLYIS.mjs → chunk-3P4WOCRB.mjs} +5 -5
- package/dist/cli/{chunk-UNLLMHY7.mjs → chunk-3XLJPLXZ.mjs} +1 -1
- package/dist/cli/{chunk-U37BWQZH.js → chunk-44UR3BU2.js} +9 -9
- package/dist/cli/{chunk-RSMFUWCP.js → chunk-4BQQ3Q3J.js} +8 -8
- package/dist/cli/{chunk-YD2KV7RT.js → chunk-57F5VKHV.js} +7 -7
- package/dist/cli/{chunk-TNOTKGZC.mjs → chunk-5ADROBCY.mjs} +2 -2
- package/dist/cli/{chunk-UU4GMU7A.mjs → chunk-6B7XLHIE.mjs} +4 -4
- package/dist/cli/{chunk-ECY6QP3M.js → chunk-6R5UKWRW.js} +16 -16
- package/dist/cli/{chunk-SFWU7IJJ.mjs → chunk-7WILY2XM.mjs} +2 -2
- package/dist/cli/{chunk-OAF5U6SN.js → chunk-A7THVTRN.js} +51 -51
- package/dist/cli/{chunk-LQ2KVMOD.js → chunk-AGIEKE3L.js} +4 -4
- package/dist/cli/{chunk-X4U763KU.mjs → chunk-BWLXHUKH.mjs} +3 -3
- package/dist/cli/{chunk-54SVGPMK.js → chunk-C7EA2VNR.js} +5 -5
- package/dist/cli/{chunk-YI6TIURR.js → chunk-CNQBCLQP.js} +3 -3
- package/dist/cli/{chunk-GCHTTVC7.mjs → chunk-CTDWQYBW.mjs} +2 -2
- package/dist/cli/{chunk-CXYMJSRQ.mjs → chunk-DSOTGAXS.mjs} +1 -1
- package/dist/cli/{chunk-747ZYPXB.js → chunk-EM2E7YIS.js} +53 -53
- package/dist/cli/{chunk-FLH4D33O.js → chunk-ETTUFFBS.js} +36 -36
- package/dist/cli/{chunk-QI2LOENC.js → chunk-F2XK4UN6.js} +3 -3
- package/dist/cli/{chunk-FPFBYOR6.mjs → chunk-F4L7WMLK.mjs} +2 -2
- package/dist/cli/{chunk-AXTZID4V.js → chunk-F6OB5L74.js} +6 -6
- package/dist/cli/{chunk-ZA6UUGOZ.js → chunk-GDFO3ERN.js} +2 -2
- package/dist/cli/{chunk-EOWMLNCV.mjs → chunk-GLSFZYZB.mjs} +1 -1
- package/dist/cli/{chunk-F52TY2QC.js → chunk-KBNAI5BY.js} +21 -21
- package/dist/cli/{chunk-QWJ3V3GI.js → chunk-MXAB4W6E.js} +8 -8
- package/dist/cli/{chunk-VPCS5KOF.js → chunk-N72VIY7R.js} +2 -2
- package/dist/cli/{chunk-37Z2W7OS.js → chunk-NNCDHMCT.js} +26 -26
- package/dist/cli/{chunk-EXXXRDCC.js → chunk-NSAKJQLX.js} +1 -1
- package/dist/cli/{chunk-2NE3LCEA.js → chunk-ORO2GFH4.js} +5 -5
- package/dist/cli/{chunk-WNS5YEZN.mjs → chunk-PJX7BA7T.mjs} +2 -2
- package/dist/cli/{chunk-54CKAYKK.js → chunk-PWXHZPHK.js} +10 -10
- package/dist/cli/{chunk-NOQRM7LV.mjs → chunk-QG7UPPOK.mjs} +2 -2
- package/dist/cli/{chunk-7PBIHKB4.mjs → chunk-QW6HNDS7.mjs} +1 -1
- package/dist/cli/{chunk-QKGHYF7A.mjs → chunk-RVQ333NB.mjs} +1 -1
- package/dist/cli/{chunk-CHD7NMZD.mjs → chunk-SETIOXN4.mjs} +1 -1
- package/dist/cli/{chunk-F3YSH2CY.mjs → chunk-SHB7BUNQ.mjs} +3 -3
- package/dist/cli/{chunk-UA42Q7R3.mjs → chunk-SOME764Z.mjs} +4 -4
- package/dist/cli/{chunk-PZZNEIE3.mjs → chunk-SV3B6KW4.mjs} +5 -5
- package/dist/cli/{chunk-6PN2RUXL.mjs → chunk-SXQZYTUW.mjs} +1 -1
- package/dist/cli/{chunk-DQHMXKDT.js → chunk-VBKN6ISP.js} +93 -93
- package/dist/cli/{chunk-TVDBGEVP.mjs → chunk-VL7OL7YR.mjs} +1 -1
- package/dist/cli/{chunk-ZJRHPVJU.js → chunk-Y4OE46HH.js} +6 -6
- package/dist/cli/{chunk-DDUCF63F.mjs → chunk-YBDQUVDE.mjs} +10 -10
- package/dist/cli/{chunk-Q7NNU6KB.mjs → chunk-YFKOA4HW.mjs} +4 -4
- package/dist/cli/{chunk-5RXVB6UK.js → chunk-YTFCKCII.js} +3 -3
- package/dist/cli/{csv-H2656YID.mjs → csv-D3JPZVUN.mjs} +4 -4
- package/dist/cli/{csv-EIXI4D7F.js → csv-FSXDIWBP.js} +13 -13
- package/dist/cli/{db-CABNKWAS.mjs → db-3UWDQXLF.mjs} +6 -6
- package/dist/cli/{db-7AQJE7CP.js → db-DZQUPWI3.js} +27 -27
- package/dist/cli/describe-2ENX4O3U.js +48 -0
- package/dist/cli/{describe-5RUFO5ZR.mjs → describe-APG2GVFG.mjs} +17 -17
- package/dist/cli/{executions-OHOBXCPD.js → executions-BFAPMPG2.js} +8 -8
- package/dist/cli/{executions-4GUJEBEC.mjs → executions-TDUX3575.mjs} +6 -6
- package/dist/cli/{feedback-JIJWTK2H.js → feedback-2KNPCYTH.js} +8 -8
- package/dist/cli/{feedback-N3CSL3OV.mjs → feedback-BMV7PUDL.mjs} +4 -4
- package/dist/cli/{git-Z5DTMOAQ.mjs → git-KBVONNE5.mjs} +5 -5
- package/dist/cli/git-LUW3GBSD.js +25 -0
- package/dist/cli/index.js +135 -135
- package/dist/cli/index.mjs +40 -40
- package/dist/cli/{legacy-noops-XTLI64KX.mjs → legacy-noops-GZDRRUFE.mjs} +5 -5
- package/dist/cli/{legacy-noops-ZEJRXMTS.js → legacy-noops-LE6LJO7F.js} +8 -8
- package/dist/cli/{monitors-3MDJEWZB.mjs → monitors-CW22L3VL.mjs} +7 -7
- package/dist/cli/{monitors-E3TTJB3S.js → monitors-PGBHMKOU.js} +91 -91
- package/dist/cli/{org-722NMZ4T.js → org-3V2VAH5D.js} +72 -72
- package/dist/cli/{org-AJUXWQ6P.mjs → org-K5C23LAV.mjs} +6 -6
- package/dist/cli/{pages-CPCWTTPD.js → pages-2F73VVWC.js} +17 -17
- package/dist/cli/{pages-Y6AC7PBJ.mjs → pages-7V2C7GWU.mjs} +6 -6
- package/dist/cli/{play-ACQ54HNN.js → play-62KSZGJQ.js} +304 -304
- package/dist/cli/{play-TYHP7UNL.mjs → play-VT7TPJUH.mjs} +17 -17
- package/dist/cli/{providers-UDG7V7WU.js → providers-3SI3QBT3.js} +9 -9
- package/dist/cli/{providers-BSXILLKJ.mjs → providers-LX562YG7.mjs} +6 -6
- package/dist/cli/{quickstart-ZW7VOPFN.js → quickstart-5HA5IFTB.js} +6 -6
- package/dist/cli/{quickstart-66MNFG2G.mjs → quickstart-ADE7FV26.mjs} +4 -4
- package/dist/cli/{run-KPS3O2VA.js → run-4ZV4UDKP.js} +36 -36
- package/dist/cli/{run-JSAI5PRF.mjs → run-OITZJ6QZ.mjs} +22 -22
- package/dist/cli/{search-GQGB3JIE.mjs → search-BI5VZQMD.mjs} +7 -7
- package/dist/cli/search-PXFM3MGW.js +32 -0
- package/dist/cli/{secrets-LGGKGT3A.mjs → secrets-A2R36AZ6.mjs} +6 -6
- package/dist/cli/{secrets-UVQKUCBM.js → secrets-UAKNTMYB.js} +15 -15
- package/dist/cli/{sessions-MPZ42HUS.js → sessions-3JM3OXME.js} +6 -6
- package/dist/cli/{sessions-JYPDKPVA.mjs → sessions-PPOFUFBW.mjs} +5 -5
- package/dist/cli/{settings-E7VTIIRT.js → settings-C4M5HOD4.js} +78 -78
- package/dist/cli/{settings-5UVSGJ72.mjs → settings-PZA6TBOL.mjs} +11 -11
- package/dist/cli/{setup-FM6VKRER.mjs → setup-245XVTBR.mjs} +9 -9
- package/dist/cli/{setup-NQ5BQ3ZY.js → setup-TY2OSI6D.js} +44 -44
- package/dist/cli/skills-UYNRYDDI.js +31 -0
- package/dist/cli/{skills-WOCXEASX.mjs → skills-ZAN23KLR.mjs} +7 -7
- package/dist/cli/{tools-QZRDZS45.mjs → tools-GG4KDQBM.mjs} +16 -16
- package/dist/cli/tools-OBESOBG7.js +55 -0
- package/dist/cli/update-2VMXTKBN.js +33 -0
- package/dist/cli/{update-OW2FEGGG.mjs → update-XKXIL6DU.mjs} +9 -9
- package/dist/cli/{workflow-QRGUHBKL.mjs → workflow-LVQVTFUJ.mjs} +7 -7
- package/dist/cli/{workflow-QJM2ELOS.js → workflow-VN7M3D2U.js} +17 -17
- package/dist/index.js +9 -9
- package/dist/index.mjs +6 -6
- package/dist/install-integrity.json +96 -96
- 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.js +5 -5
- package/dist/server.mjs +3 -3
- package/package.json +1 -1
- package/dist/cli/auth-MDWIVGZQ.js +0 -41
- package/dist/cli/describe-ODBO2AMO.js +0 -48
- package/dist/cli/git-TWNEROIX.js +0 -25
- package/dist/cli/search-JUXEQ5HQ.js +0 -32
- package/dist/cli/skills-OLIMNV35.js +0 -31
- package/dist/cli/tools-IZNJT6RU.js +0 -55
- package/dist/cli/update-4JVVAYI4.js +0 -33
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
var _chunkVLEVVDWGjs = require('./chunk-VLEVVDWG.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkY4OE46HHjs = require('./chunk-Y4OE46HH.js');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
var _chunkJKVRBCZLjs = require('./chunk-JKVRBCZL.js');
|
|
@@ -11,7 +11,7 @@ var _chunkJKVRBCZLjs = require('./chunk-JKVRBCZL.js');
|
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _chunk57F5VKHVjs = require('./chunk-57F5VKHV.js');
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
var _chunkDIAWYWT5js = require('./chunk-DIAWYWT5.js');
|
|
@@ -579,7 +579,7 @@ function parseInputFlagValue(raw) {
|
|
|
579
579
|
return raw;
|
|
580
580
|
}
|
|
581
581
|
function parsePlayRunOptions(args, initialInput = null) {
|
|
582
|
-
const selection =
|
|
582
|
+
const selection = _chunk57F5VKHVjs.parseJsonFields.call(void 0, args, "run");
|
|
583
583
|
args = selection.args;
|
|
584
584
|
const usage = "Usage: deepline plays run <play-name> [--input '{...}'] [--run-id-file <path>] [--no-wait] [--tail-timeout-ms 30000] [--force] [--open] [--full] [--<input> value]\n deepline plays run <play-file.ts> [--input '{...}'] [--run-id-file <path>] [--no-wait] [--tail-timeout-ms 30000] [--force] [--open] [--full] [--<input> value]\n deepline plays run --file <play-file.ts> [--input '{...}'] [--profile <id>] [--run-id-file <path>] [--no-wait] [--tail-timeout-ms 30000] [--force] [--open] [--full] [--<input> value]\n deepline plays run --name <name> [--input '{...}'] [--profile <id>] [--live|--latest|--revision-id <id>] [--run-id-file <path>] [--no-wait] [--tail-timeout-ms 30000] [--force] [--open] [--json] [--full] [--<input> value]\n Runs use the Absurd CJS runtime.\n --header '<name>: <value>' may repeat; each is sent on every request for this run.\n Unknown --<input> value flags, such as --limit 5, are passed into play input.\nRun `deepline plays run --help` for idempotent call caching and deepline.dataset guidance.";
|
|
585
585
|
let filePath = null;
|
|
@@ -591,7 +591,7 @@ function parsePlayRunOptions(args, initialInput = null) {
|
|
|
591
591
|
let revisionSelector = null;
|
|
592
592
|
const watch = !args.includes("--no-wait");
|
|
593
593
|
const dryRun = args.includes("--dry-run");
|
|
594
|
-
let jsonOutput = dryRun ?
|
|
594
|
+
let jsonOutput = dryRun ? _chunk57F5VKHVjs.argsWantJson.call(void 0, args) : watch ? args.includes("--json") : _chunk57F5VKHVjs.argsWantJson.call(void 0, args);
|
|
595
595
|
const fullJson = args.includes("--full");
|
|
596
596
|
const force = args.includes("--force");
|
|
597
597
|
const forceToolRefresh = args.includes("--force-tool-refresh");
|
|
@@ -654,7 +654,7 @@ function parsePlayRunOptions(args, initialInput = null) {
|
|
|
654
654
|
"--log-level requires one of: debug, info, warn, error."
|
|
655
655
|
);
|
|
656
656
|
}
|
|
657
|
-
const parsed =
|
|
657
|
+
const parsed = _chunkY4OE46HHjs.parseLogLevel.call(void 0, value);
|
|
658
658
|
if (!parsed) {
|
|
659
659
|
throw new Error(
|
|
660
660
|
`Unsupported --log-level ${JSON.stringify(value)}. Use debug, info, warn, or error.`
|
|
@@ -972,7 +972,7 @@ function resolvePlayRunCliOptions(target, options, inputArgs = [], maintenancePo
|
|
|
972
972
|
const hasExplicitLogLevel = options.logLevel !== void 0 || inputArgs.some(
|
|
973
973
|
(arg) => arg === "--log-level" || arg.startsWith("--log-level=")
|
|
974
974
|
);
|
|
975
|
-
let logLevel = options.logLevel === void 0 ? base.logLevel :
|
|
975
|
+
let logLevel = options.logLevel === void 0 ? base.logLevel : _chunkY4OE46HHjs.parseLogLevel.call(void 0, options.logLevel);
|
|
976
976
|
if (!logLevel)
|
|
977
977
|
throw new Error("--log-level requires one of: debug, info, warn, error.");
|
|
978
978
|
const debugAlias = options.logs || options.debug === true || inputArgs.some(
|
|
@@ -986,13 +986,13 @@ function resolvePlayRunCliOptions(target, options, inputArgs = [], maintenancePo
|
|
|
986
986
|
if (debugAlias || debugMapLatency && logLevel === "info")
|
|
987
987
|
logLevel = "debug";
|
|
988
988
|
const fullJson = _nullishCoalesce(options.full, () => ( base.fullJson));
|
|
989
|
-
const jsonFields = options.json === void 0 ? base.jsonFields :
|
|
990
|
-
[...fullJson ? ["--full"] : [], ...
|
|
989
|
+
const jsonFields = options.json === void 0 ? base.jsonFields : _chunk57F5VKHVjs.parseJsonFields.call(void 0,
|
|
990
|
+
[...fullJson ? ["--full"] : [], ..._chunk57F5VKHVjs.jsonFieldArgs.call(void 0, options.json)],
|
|
991
991
|
"run"
|
|
992
992
|
).fields;
|
|
993
993
|
const watch = options.wait === false ? false : base.watch;
|
|
994
994
|
const explicitJson = options.json !== void 0 ? options.json !== false : base.jsonOutput;
|
|
995
|
-
const jsonOutput = dryRun || !watch ? explicitJson ||
|
|
995
|
+
const jsonOutput = dryRun || !watch ? explicitJson || _chunk57F5VKHVjs.argsWantJson.call(void 0, []) : explicitJson;
|
|
996
996
|
const verboseLogs = Boolean(
|
|
997
997
|
debugAlias || logLevel === "debug" || debugMapLatency
|
|
998
998
|
);
|
|
@@ -3,15 +3,15 @@
|
|
|
3
3
|
var _chunkZM2YPJQJjs = require('./chunk-ZM2YPJQJ.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkORO2GFH4js = require('./chunk-ORO2GFH4.js');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _chunk57F5VKHVjs = require('./chunk-57F5VKHV.js');
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _chunkCNQBCLQPjs = require('./chunk-CNQBCLQP.js');
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
|
|
@@ -5713,7 +5713,7 @@ var _fs = require('fs');
|
|
|
5713
5713
|
var _path = require('path');
|
|
5714
5714
|
var SEARCH_REF_TTL_MS = 15 * 6e4;
|
|
5715
5715
|
function lastSearchPath() {
|
|
5716
|
-
return _path.join.call(void 0,
|
|
5716
|
+
return _path.join.call(void 0, _chunkCNQBCLQPjs.sdkCliStateDirPath.call(void 0, _chunkCNQBCLQPjs.resolveConfig.call(void 0, ).baseUrl), "last-search.json");
|
|
5717
5717
|
}
|
|
5718
5718
|
function rememberSearchRef(searchRef) {
|
|
5719
5719
|
try {
|
|
@@ -5877,7 +5877,7 @@ var OPTIONAL_COLUMNS = [
|
|
|
5877
5877
|
];
|
|
5878
5878
|
function renderSearchResults(result, summaryWidth = DEFAULT_SUMMARY_WIDTH) {
|
|
5879
5879
|
if (result.results.length === 0)
|
|
5880
|
-
return
|
|
5880
|
+
return _chunk57F5VKHVjs.renderCommandEnvelopeText.call(void 0, result);
|
|
5881
5881
|
const rows = result.results.map((item) => searchRow(item, summaryWidth));
|
|
5882
5882
|
const kinds = new Set(rows.map((row) => row.kind));
|
|
5883
5883
|
const onlyTools = kinds.size === 1 && kinds.has("tool");
|
|
@@ -5902,7 +5902,7 @@ function renderSearchResults(result, summaryWidth = DEFAULT_SUMMARY_WIDTH) {
|
|
|
5902
5902
|
actions: _optionalChain([render, 'optionalAccess', _12 => _12.actions])
|
|
5903
5903
|
};
|
|
5904
5904
|
const followUps = _optionalChain([remaining, 'access', _13 => _13.sections, 'optionalAccess', _14 => _14.length]) || _optionalChain([remaining, 'access', _15 => _15.actions, 'optionalAccess', _16 => _16.length]) ? `
|
|
5905
|
-
${
|
|
5905
|
+
${_chunk57F5VKHVjs.renderCommandEnvelopeText.call(void 0, { render: remaining })}` : "";
|
|
5906
5906
|
const notes = rows.flatMap(
|
|
5907
5907
|
(row) => row.notes.map((note) => ` ${row.id}: ${note}`)
|
|
5908
5908
|
);
|
|
@@ -5997,7 +5997,7 @@ async function runSearch(queryInput, options, types, exclude = []) {
|
|
|
5997
5997
|
console.error("--summary-width must be an integer of at least 2.");
|
|
5998
5998
|
return 1;
|
|
5999
5999
|
}
|
|
6000
|
-
const { search_ref: searchRef, ...result } = await new (0,
|
|
6000
|
+
const { search_ref: searchRef, ...result } = await new (0, _chunkORO2GFH4js.DeeplineClient)().search({
|
|
6001
6001
|
query,
|
|
6002
6002
|
types,
|
|
6003
6003
|
exclude,
|
|
@@ -6011,7 +6011,7 @@ async function runSearch(queryInput, options, types, exclude = []) {
|
|
|
6011
6011
|
});
|
|
6012
6012
|
if (searchRef) rememberSearchRef(searchRef);
|
|
6013
6013
|
pointAtDescribe(result);
|
|
6014
|
-
|
|
6014
|
+
_chunk57F5VKHVjs.printCommandEnvelope.call(void 0, result, {
|
|
6015
6015
|
json: options.json === true,
|
|
6016
6016
|
text: renderSearchResults(result, summaryWidth)
|
|
6017
6017
|
});
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _chunkCNQBCLQPjs = require('./chunk-CNQBCLQP.js');
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var _chunkAGIEKE3Ljs = require('./chunk-AGIEKE3L.js');
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
|
|
@@ -290,8 +290,8 @@ var BROWSER_OPEN_COOLDOWN_MS = 3e4;
|
|
|
290
290
|
var SAME_URL_BROWSER_OPEN_COOLDOWN_MS = 5 * 6e4;
|
|
291
291
|
var defaultBrowserCommandRunner = childProcess;
|
|
292
292
|
function getAuthedHttpClient() {
|
|
293
|
-
const config =
|
|
294
|
-
return { config, http: new (0,
|
|
293
|
+
const config = _chunkCNQBCLQPjs.resolveConfig.call(void 0, );
|
|
294
|
+
return { config, http: new (0, _chunkCNQBCLQPjs.HttpClient)(config) };
|
|
295
295
|
}
|
|
296
296
|
function stableOsUserId() {
|
|
297
297
|
try {
|
|
@@ -631,7 +631,7 @@ function collectLocalEnvInfo() {
|
|
|
631
631
|
os: `${process.platform} ${process.arch}`,
|
|
632
632
|
node_version: process.version,
|
|
633
633
|
home_dir: homeDir,
|
|
634
|
-
agent_runtime:
|
|
634
|
+
agent_runtime: _chunkAGIEKE3Ljs.detectAgentRuntime.call(void 0, )
|
|
635
635
|
};
|
|
636
636
|
const env = process.env;
|
|
637
637
|
const optional = {
|
|
@@ -878,9 +878,9 @@ function markdownTableFromRows(rows, preferredColumns = []) {
|
|
|
878
878
|
}
|
|
879
879
|
function withAgentCommandContext(value) {
|
|
880
880
|
const valueRecord = value !== null && typeof value === "object" && !Array.isArray(value) ? value : null;
|
|
881
|
-
return
|
|
881
|
+
return _chunkAGIEKE3Ljs.detectAgentRuntime.call(void 0, ) !== "unknown" && valueRecord && !Object.prototype.hasOwnProperty.call(valueRecord, "command_context") ? {
|
|
882
882
|
...valueRecord,
|
|
883
|
-
command_context:
|
|
883
|
+
command_context: _chunkCNQBCLQPjs.resolveCliCommandContext.call(void 0, )
|
|
884
884
|
} : value;
|
|
885
885
|
}
|
|
886
886
|
function printJson(value, fields) {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
PlayClient
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-QW6HNDS7.mjs";
|
|
4
4
|
import {
|
|
5
5
|
HttpClient,
|
|
6
6
|
resolveConfig
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-VL7OL7YR.mjs";
|
|
8
8
|
|
|
9
9
|
// src/plays/local-play-execution.ts
|
|
10
10
|
function importedNodes(graph) {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
seedToolListScript
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-YBDQUVDE.mjs";
|
|
4
4
|
import {
|
|
5
5
|
addDescribeOptions
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-SXQZYTUW.mjs";
|
|
7
7
|
import {
|
|
8
8
|
describeLookupsFor,
|
|
9
9
|
describeName,
|
|
@@ -14,10 +14,10 @@ import {
|
|
|
14
14
|
} from "./chunk-JVHOS3K3.mjs";
|
|
15
15
|
import {
|
|
16
16
|
DeeplineClient
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-CTDWQYBW.mjs";
|
|
18
18
|
import {
|
|
19
19
|
printCommandEnvelope
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-QG7UPPOK.mjs";
|
|
21
21
|
|
|
22
22
|
// src/cli/commands/describe.ts
|
|
23
23
|
import { writeFileSync } from "fs";
|
|
@@ -1,19 +1,19 @@
|
|
|
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 _chunkN72VIY7Rjs = require('./chunk-N72VIY7R.js');
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunkETTUFFBSjs = require('./chunk-ETTUFFBS.js');
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _chunkEM2E7YISjs = require('./chunk-EM2E7YIS.js');
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
var
|
|
13
|
+
var _chunk57F5VKHVjs = require('./chunk-57F5VKHV.js');
|
|
14
14
|
|
|
15
15
|
|
|
16
|
-
var
|
|
16
|
+
var _chunkCNQBCLQPjs = require('./chunk-CNQBCLQP.js');
|
|
17
17
|
|
|
18
18
|
// src/cli/commands/update.ts
|
|
19
19
|
var _child_process = require('child_process');
|
|
@@ -495,7 +495,7 @@ function normalizedNpmPrefix(value) {
|
|
|
495
495
|
}
|
|
496
496
|
function resolveNpmGlobalPrefix(env) {
|
|
497
497
|
try {
|
|
498
|
-
const plan =
|
|
498
|
+
const plan = _chunkEM2E7YISjs.resolveShellSpawn.call(void 0,
|
|
499
499
|
"npm",
|
|
500
500
|
["prefix", "-g"],
|
|
501
501
|
process.platform,
|
|
@@ -556,8 +556,8 @@ function resolveUpdatePlan(options = {}) {
|
|
|
556
556
|
const npmGlobalPrefix = options.npmGlobalPrefix !== void 0 ? options.npmGlobalPrefix : resolveNpmGlobalPrefix(env);
|
|
557
557
|
const hasVerifiedNpmOwnership = inferredInstallPrefix !== null && normalizedNpmPrefix(inferredInstallPrefix) === normalizedNpmPrefix(npmGlobalPrefix);
|
|
558
558
|
const installPrefix = options.requireVerifiedNpmOwnership ? hasVerifiedNpmOwnership ? inferredInstallPrefix : null : inferredInstallPrefix;
|
|
559
|
-
const npmVersion = options.npmVersion === void 0 ?
|
|
560
|
-
const npmGlobalInstallFlags =
|
|
559
|
+
const npmVersion = options.npmVersion === void 0 ? _chunkN72VIY7Rjs.readNpmVersion.call(void 0, env) : options.npmVersion;
|
|
560
|
+
const npmGlobalInstallFlags = _chunkN72VIY7Rjs.npmSupportsAllowScripts.call(void 0, npmVersion) ? [...NPM_SDK_INSTALL_COMMON_FLAGS, "--allow-scripts=esbuild"] : NPM_SDK_INSTALL_COMMON_FLAGS;
|
|
561
561
|
const args = installPrefix ? [
|
|
562
562
|
"install",
|
|
563
563
|
"-g",
|
|
@@ -567,7 +567,7 @@ function resolveUpdatePlan(options = {}) {
|
|
|
567
567
|
packageSpec
|
|
568
568
|
] : ["install", "-g", ...npmGlobalInstallFlags, packageSpec];
|
|
569
569
|
const fallbackRegistryUrl = options.npmFallbackRegistryUrl !== void 0 ? options.npmFallbackRegistryUrl : publicNpmFallbackRegistryUrl(
|
|
570
|
-
_optionalChain([env, 'access', _22 => _22.DEEPLINE_HOST_URL, 'optionalAccess', _23 => _23.trim, 'call', _24 => _24()]) ||
|
|
570
|
+
_optionalChain([env, 'access', _22 => _22.DEEPLINE_HOST_URL, 'optionalAccess', _23 => _23.trim, 'call', _24 => _24()]) || _chunkCNQBCLQPjs.autoDetectBaseUrl.call(void 0, )
|
|
571
571
|
);
|
|
572
572
|
return {
|
|
573
573
|
kind: "npm-global",
|
|
@@ -816,7 +816,7 @@ function sidecarInstallFailure(versionDir) {
|
|
|
816
816
|
function runCommand(command, args, env = process.env) {
|
|
817
817
|
return new Promise((resolveResult) => {
|
|
818
818
|
let output = "";
|
|
819
|
-
const plan =
|
|
819
|
+
const plan = _chunkEM2E7YISjs.resolveShellSpawn.call(void 0, command, args, process.platform, env);
|
|
820
820
|
const child = _child_process.spawn.call(void 0, plan.command, plan.args, {
|
|
821
821
|
stdio: ["inherit", "pipe", "pipe"],
|
|
822
822
|
shell: plan.shell,
|
|
@@ -1199,14 +1199,14 @@ async function publishedVersionSupportsPin(version, fallbackRegistryUrl) {
|
|
|
1199
1199
|
throw _nullishCoalesce(lastError, () => ( new Error("No npm registry was available")));
|
|
1200
1200
|
}
|
|
1201
1201
|
async function runUpdateCommand(options, dependencies = {}) {
|
|
1202
|
-
const detectBaseUrl = _nullishCoalesce(dependencies.detectBaseUrl, () => (
|
|
1202
|
+
const detectBaseUrl = _nullishCoalesce(dependencies.detectBaseUrl, () => ( _chunkCNQBCLQPjs.autoDetectBaseUrl));
|
|
1203
1203
|
const resolvePlan = _nullishCoalesce(dependencies.resolvePlan, () => ( resolveUpdatePlan));
|
|
1204
1204
|
const runPlan = _nullishCoalesce(dependencies.runPlan, () => ( runUpdatePlan));
|
|
1205
1205
|
const syncSkills = _nullishCoalesce(dependencies.syncSkillsIfNeeded, () => ( (async () => {
|
|
1206
1206
|
const originalWrite = process.stdout.write.bind(process.stdout);
|
|
1207
1207
|
process.stdout.write = (() => true);
|
|
1208
1208
|
try {
|
|
1209
|
-
const exitCode = await
|
|
1209
|
+
const exitCode = await _chunkETTUFFBSjs.runSkillsCommand.call(void 0, { json: true });
|
|
1210
1210
|
if (exitCode !== 0) {
|
|
1211
1211
|
throw new Error(
|
|
1212
1212
|
`Deepline skills update failed with exit ${exitCode}.`
|
|
@@ -1277,11 +1277,11 @@ async function runUpdateCommand(options, dependencies = {}) {
|
|
|
1277
1277
|
]
|
|
1278
1278
|
};
|
|
1279
1279
|
if (options.json && !options.executeWithJson) {
|
|
1280
|
-
|
|
1280
|
+
_chunk57F5VKHVjs.printCommandEnvelope.call(void 0, { ...plan, render }, { json: true });
|
|
1281
1281
|
return 0;
|
|
1282
1282
|
}
|
|
1283
1283
|
if (options.printCommand) {
|
|
1284
|
-
|
|
1284
|
+
_chunk57F5VKHVjs.printCommandEnvelope.call(void 0,
|
|
1285
1285
|
{
|
|
1286
1286
|
...plan,
|
|
1287
1287
|
render: {
|
|
@@ -1294,7 +1294,7 @@ async function runUpdateCommand(options, dependencies = {}) {
|
|
|
1294
1294
|
return 0;
|
|
1295
1295
|
}
|
|
1296
1296
|
if (plan.kind === "source" || plan.kind === "homebrew") {
|
|
1297
|
-
|
|
1297
|
+
_chunk57F5VKHVjs.printCommandEnvelope.call(void 0, { ...plan, render }, { json: false });
|
|
1298
1298
|
return 0;
|
|
1299
1299
|
}
|
|
1300
1300
|
stderr.write(`Updating Deepline SDK/CLI with: ${plan.manualCommand}
|
|
@@ -1324,7 +1324,7 @@ To retry with full installer output, run: deepline skills
|
|
|
1324
1324
|
);
|
|
1325
1325
|
}
|
|
1326
1326
|
if (options.executeWithJson && options.json) {
|
|
1327
|
-
|
|
1327
|
+
_chunk57F5VKHVjs.printCommandEnvelope.call(void 0,
|
|
1328
1328
|
{
|
|
1329
1329
|
ok: true,
|
|
1330
1330
|
pinnedVersion
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
traceCliSpan
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-RVQ333NB.mjs";
|
|
4
4
|
import {
|
|
5
5
|
checkSdkCompatibility,
|
|
6
6
|
enforceSdkCompatibilityResponse,
|
|
7
7
|
flushDeferredSkillsSyncNotices
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-YFKOA4HW.mjs";
|
|
9
9
|
|
|
10
10
|
// src/cli/play-run-admission.ts
|
|
11
11
|
function usesInlinePlayAdmission(command, args) {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _chunk57F5VKHVjs = require('./chunk-57F5VKHV.js');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
@@ -22,12 +22,12 @@ var _chunkYD2KV7RTjs = require('./chunk-YD2KV7RT.js');
|
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
|
|
25
|
-
var
|
|
25
|
+
var _chunkCNQBCLQPjs = require('./chunk-CNQBCLQP.js');
|
|
26
26
|
|
|
27
27
|
|
|
28
28
|
|
|
29
29
|
|
|
30
|
-
var
|
|
30
|
+
var _chunkAGIEKE3Ljs = require('./chunk-AGIEKE3L.js');
|
|
31
31
|
|
|
32
32
|
// src/cli/commands/auth.ts
|
|
33
33
|
|
|
@@ -54,7 +54,7 @@ function statusBannerLine(value) {
|
|
|
54
54
|
return `Service notice: ${banner.message}`;
|
|
55
55
|
}
|
|
56
56
|
function envFilePath(baseUrl) {
|
|
57
|
-
return
|
|
57
|
+
return _chunkCNQBCLQPjs.hostEnvFilePath.call(void 0, baseUrl);
|
|
58
58
|
}
|
|
59
59
|
function normalizeAuthScope(value) {
|
|
60
60
|
if (!value || value === "global") return "global";
|
|
@@ -67,7 +67,7 @@ function parseAuthScope(args) {
|
|
|
67
67
|
}
|
|
68
68
|
function pendingClaimPath(baseUrl, scope) {
|
|
69
69
|
if (scope === "folder") {
|
|
70
|
-
const target =
|
|
70
|
+
const target = _chunkCNQBCLQPjs.resolveProjectPinTarget.call(void 0, );
|
|
71
71
|
if (!target.ok) {
|
|
72
72
|
throw new Error(
|
|
73
73
|
`Cowork project folder is ambiguous. Candidate folders: ${target.candidates.join(
|
|
@@ -77,10 +77,10 @@ function pendingClaimPath(baseUrl, scope) {
|
|
|
77
77
|
}
|
|
78
78
|
return _path.join.call(void 0, target.dir, ".deepline", "setup", "pending-auth.json");
|
|
79
79
|
}
|
|
80
|
-
return `${
|
|
80
|
+
return `${_chunkCNQBCLQPjs.hostConfigDirPath.call(void 0, baseUrl)}/pending-auth.json`;
|
|
81
81
|
}
|
|
82
82
|
function legacyPendingClaimTokenPath(baseUrl) {
|
|
83
|
-
return `${
|
|
83
|
+
return `${_chunkCNQBCLQPjs.hostConfigDirPath.call(void 0, baseUrl)}/pending-claim-token`;
|
|
84
84
|
}
|
|
85
85
|
function savePendingClaim(baseUrl, claim) {
|
|
86
86
|
const filePath = pendingClaimPath(baseUrl, claim.scope);
|
|
@@ -182,21 +182,21 @@ function parseRegisterWaitMode(args) {
|
|
|
182
182
|
function shouldWaitForRegisterClaim(mode) {
|
|
183
183
|
if (mode === "yes") return true;
|
|
184
184
|
if (mode === "no") return false;
|
|
185
|
-
return
|
|
185
|
+
return _chunkAGIEKE3Ljs.detectAgentRuntime.call(void 0, ) !== "claude_cowork";
|
|
186
186
|
}
|
|
187
187
|
function saveEnvValues(values, baseUrl, scope) {
|
|
188
188
|
const filtered = {
|
|
189
|
-
...values[
|
|
190
|
-
...values[
|
|
191
|
-
...values[
|
|
192
|
-
...Object.prototype.hasOwnProperty.call(values,
|
|
189
|
+
...values[_chunkCNQBCLQPjs.HOST_URL_ENV] ? { [_chunkCNQBCLQPjs.HOST_URL_ENV]: values[_chunkCNQBCLQPjs.HOST_URL_ENV] } : {},
|
|
190
|
+
...values[_chunkCNQBCLQPjs.API_KEY_ENV] ? { [_chunkCNQBCLQPjs.API_KEY_ENV]: values[_chunkCNQBCLQPjs.API_KEY_ENV] } : {},
|
|
191
|
+
...values[_chunkCNQBCLQPjs.ACTIVE_ORG_ID_ENV] ? { [_chunkCNQBCLQPjs.ACTIVE_ORG_ID_ENV]: values[_chunkCNQBCLQPjs.ACTIVE_ORG_ID_ENV] } : {},
|
|
192
|
+
...Object.prototype.hasOwnProperty.call(values, _chunkCNQBCLQPjs.ACTIVE_ORG_NAME_ENV) ? { [_chunkCNQBCLQPjs.ACTIVE_ORG_NAME_ENV]: values[_chunkCNQBCLQPjs.ACTIVE_ORG_NAME_ENV] } : {},
|
|
193
193
|
// An explicit empty list must reach the store: it clears a stale line.
|
|
194
|
-
...Object.prototype.hasOwnProperty.call(values,
|
|
194
|
+
...Object.prototype.hasOwnProperty.call(values, _chunkCNQBCLQPjs.FEATURES_ENV) ? { [_chunkCNQBCLQPjs.FEATURES_ENV]: values[_chunkCNQBCLQPjs.FEATURES_ENV] } : {}
|
|
195
195
|
};
|
|
196
196
|
if (scope === "folder") {
|
|
197
|
-
|
|
197
|
+
_chunkCNQBCLQPjs.saveProjectDeeplineEnvValues.call(void 0, filtered);
|
|
198
198
|
} else {
|
|
199
|
-
|
|
199
|
+
_chunkCNQBCLQPjs.saveHostEnvValues.call(void 0, baseUrl, filtered);
|
|
200
200
|
}
|
|
201
201
|
}
|
|
202
202
|
function activeOrgEnvValues(data) {
|
|
@@ -204,21 +204,21 @@ function activeOrgEnvValues(data) {
|
|
|
204
204
|
if (!orgId) return {};
|
|
205
205
|
const orgName = typeof data.org_name === "string" ? data.org_name.trim() : "";
|
|
206
206
|
return {
|
|
207
|
-
[
|
|
208
|
-
[
|
|
209
|
-
...
|
|
207
|
+
[_chunkCNQBCLQPjs.ACTIVE_ORG_ID_ENV]: orgId,
|
|
208
|
+
[_chunkCNQBCLQPjs.ACTIVE_ORG_NAME_ENV]: orgName,
|
|
209
|
+
..._chunkCNQBCLQPjs.featureEnvValues.call(void 0, data)
|
|
210
210
|
};
|
|
211
211
|
}
|
|
212
212
|
async function httpJson(method, url, apiKey, body, timeoutMs = AUTH_HTTP_TIMEOUT_MS) {
|
|
213
213
|
const headers = {
|
|
214
214
|
"Content-Type": "application/json",
|
|
215
|
-
"User-Agent": `deepline-ts-sdk/${
|
|
215
|
+
"User-Agent": `deepline-ts-sdk/${_chunkAGIEKE3Ljs.SDK_VERSION}`,
|
|
216
216
|
"X-Deepline-Client-Family": "sdk",
|
|
217
217
|
"X-Deepline-CLI-Family": "sdk",
|
|
218
|
-
"X-Deepline-Agent-Runtime":
|
|
219
|
-
"X-Deepline-CLI-Version":
|
|
220
|
-
"X-Deepline-SDK-Version":
|
|
221
|
-
"X-Deepline-API-Contract":
|
|
218
|
+
"X-Deepline-Agent-Runtime": _chunkAGIEKE3Ljs.detectAgentRuntime.call(void 0, ),
|
|
219
|
+
"X-Deepline-CLI-Version": _chunkAGIEKE3Ljs.SDK_VERSION,
|
|
220
|
+
"X-Deepline-SDK-Version": _chunkAGIEKE3Ljs.SDK_VERSION,
|
|
221
|
+
"X-Deepline-API-Contract": _chunkAGIEKE3Ljs.SDK_API_CONTRACT
|
|
222
222
|
};
|
|
223
223
|
if (apiKey) headers["Authorization"] = `Bearer ${apiKey}`;
|
|
224
224
|
const bypassToken = _optionalChain([process, 'access', _7 => _7.env, 'access', _8 => _8.VERCEL_PROTECTION_BYPASS_TOKEN, 'optionalAccess', _9 => _9.trim, 'call', _10 => _10()]);
|
|
@@ -264,7 +264,7 @@ async function readStatusBanner(baseUrl) {
|
|
|
264
264
|
return _optionalChain([response, 'optionalAccess', _11 => _11.status]) === 200 ? _nullishCoalesce(response.data.banner, () => ( null)) : null;
|
|
265
265
|
}
|
|
266
266
|
async function reportSetupCompleted(input) {
|
|
267
|
-
const apiKey = input.authScope === "folder" ?
|
|
267
|
+
const apiKey = input.authScope === "folder" ? _chunkCNQBCLQPjs.resolveProjectApiKeyForBaseUrl.call(void 0, input.baseUrl) : _chunkCNQBCLQPjs.resolveGlobalApiKeyForBaseUrl.call(void 0, input.baseUrl);
|
|
268
268
|
if (!apiKey) return;
|
|
269
269
|
try {
|
|
270
270
|
await httpJson(
|
|
@@ -361,7 +361,7 @@ async function printClaimSuccessBanner(baseUrl, apiKey, statusData) {
|
|
|
361
361
|
}
|
|
362
362
|
}
|
|
363
363
|
async function handleRegister(args) {
|
|
364
|
-
const baseUrl =
|
|
364
|
+
const baseUrl = _chunkCNQBCLQPjs.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, "");
|
|
365
365
|
let orgName = "";
|
|
366
366
|
let orgId = "";
|
|
367
367
|
let agentName = "";
|
|
@@ -416,19 +416,19 @@ async function handleRegister(args) {
|
|
|
416
416
|
});
|
|
417
417
|
saveEnvValues(
|
|
418
418
|
{
|
|
419
|
-
[
|
|
419
|
+
[_chunkCNQBCLQPjs.HOST_URL_ENV]: baseUrl
|
|
420
420
|
},
|
|
421
421
|
baseUrl,
|
|
422
422
|
authScope
|
|
423
423
|
);
|
|
424
424
|
}
|
|
425
425
|
if (claimUrl) {
|
|
426
|
-
const shouldOpen = waitMode !== "no" &&
|
|
426
|
+
const shouldOpen = waitMode !== "no" && _chunkAGIEKE3Ljs.detectAgentRuntime.call(void 0, ) !== "claude_cowork";
|
|
427
427
|
console.log(
|
|
428
428
|
shouldOpen ? " Opening approval page in your browser." : " Open this approval page in your browser:"
|
|
429
429
|
);
|
|
430
430
|
console.log(` ${claimUrl}`);
|
|
431
|
-
if (shouldOpen)
|
|
431
|
+
if (shouldOpen) _chunk57F5VKHVjs.openInBrowser.call(void 0, claimUrl);
|
|
432
432
|
}
|
|
433
433
|
if (data.cli_message) {
|
|
434
434
|
console.log(String(data.cli_message));
|
|
@@ -471,8 +471,8 @@ async function handleRegister(args) {
|
|
|
471
471
|
if (apiKey) {
|
|
472
472
|
saveEnvValues(
|
|
473
473
|
{
|
|
474
|
-
[
|
|
475
|
-
[
|
|
474
|
+
[_chunkCNQBCLQPjs.HOST_URL_ENV]: baseUrl,
|
|
475
|
+
[_chunkCNQBCLQPjs.API_KEY_ENV]: apiKey,
|
|
476
476
|
...activeOrgEnvValues(statusData)
|
|
477
477
|
},
|
|
478
478
|
baseUrl,
|
|
@@ -494,7 +494,7 @@ async function handleRegister(args) {
|
|
|
494
494
|
}
|
|
495
495
|
}
|
|
496
496
|
async function handleWait(args) {
|
|
497
|
-
const baseUrl =
|
|
497
|
+
const baseUrl = _chunkCNQBCLQPjs.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, "");
|
|
498
498
|
let timeoutSeconds = 300;
|
|
499
499
|
let requestedScope;
|
|
500
500
|
if (args.includes("--auth-scope")) {
|
|
@@ -518,7 +518,7 @@ async function handleWait(args) {
|
|
|
518
518
|
const authScope = resumed.scope;
|
|
519
519
|
const claimToken = _nullishCoalesce(_optionalChain([pendingClaim, 'optionalAccess', _12 => _12.claimToken]), () => ( ""));
|
|
520
520
|
if (!pendingClaim) {
|
|
521
|
-
const scopedApiKey = authScope === "folder" ?
|
|
521
|
+
const scopedApiKey = authScope === "folder" ? _chunkCNQBCLQPjs.resolveProjectApiKeyForBaseUrl.call(void 0, baseUrl) : _chunkCNQBCLQPjs.resolveGlobalApiKeyForBaseUrl.call(void 0, baseUrl);
|
|
522
522
|
if (scopedApiKey) {
|
|
523
523
|
console.log("Already connected.");
|
|
524
524
|
return EXIT_OK;
|
|
@@ -561,8 +561,8 @@ async function handleWait(args) {
|
|
|
561
561
|
if (apiKey) {
|
|
562
562
|
saveEnvValues(
|
|
563
563
|
{
|
|
564
|
-
[
|
|
565
|
-
[
|
|
564
|
+
[_chunkCNQBCLQPjs.HOST_URL_ENV]: baseUrl,
|
|
565
|
+
[_chunkCNQBCLQPjs.API_KEY_ENV]: apiKey,
|
|
566
566
|
...activeOrgEnvValues(data)
|
|
567
567
|
},
|
|
568
568
|
baseUrl,
|
|
@@ -586,8 +586,8 @@ async function handleWait(args) {
|
|
|
586
586
|
return EXIT_AUTH;
|
|
587
587
|
}
|
|
588
588
|
async function authStatusLine(timeoutMs = 3e3) {
|
|
589
|
-
const baseUrl =
|
|
590
|
-
const apiKey =
|
|
589
|
+
const baseUrl = _chunkCNQBCLQPjs.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, "");
|
|
590
|
+
const apiKey = _chunkCNQBCLQPjs.resolveApiKeyForBaseUrl.call(void 0, baseUrl);
|
|
591
591
|
if (!apiKey) return `Auth: not connected (${baseUrl})`;
|
|
592
592
|
try {
|
|
593
593
|
const { status, data } = await httpJson(
|
|
@@ -610,9 +610,9 @@ async function authStatusLine(timeoutMs = 3e3) {
|
|
|
610
610
|
}
|
|
611
611
|
}
|
|
612
612
|
async function handleStatus(args) {
|
|
613
|
-
const baseUrl =
|
|
613
|
+
const baseUrl = _chunkCNQBCLQPjs.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, "");
|
|
614
614
|
const reveal = args.includes("--reveal");
|
|
615
|
-
const jsonOutput =
|
|
615
|
+
const jsonOutput = _chunk57F5VKHVjs.argsWantJson.call(void 0, args);
|
|
616
616
|
const hasExplicitAuthScope = args.includes("--auth-scope");
|
|
617
617
|
let authScope = null;
|
|
618
618
|
if (hasExplicitAuthScope) {
|
|
@@ -653,14 +653,14 @@ async function handleStatus(args) {
|
|
|
653
653
|
};
|
|
654
654
|
hostLines.push(`Host: ${baseUrl} (unreachable)`);
|
|
655
655
|
}
|
|
656
|
-
const apiKey = authScope === "folder" ?
|
|
656
|
+
const apiKey = authScope === "folder" ? _chunkCNQBCLQPjs.resolveProjectApiKeyForBaseUrl.call(void 0, baseUrl) : authScope === "global" ? _chunkCNQBCLQPjs.resolveGlobalApiKeyForBaseUrl.call(void 0, baseUrl) : _chunkCNQBCLQPjs.resolveApiKeyForBaseUrl.call(void 0, baseUrl);
|
|
657
657
|
if (!apiKey) {
|
|
658
658
|
const { claim: pendingClaim } = resolvePendingAuthClaimForResume(
|
|
659
659
|
baseUrl,
|
|
660
660
|
_nullishCoalesce(authScope, () => ( void 0))
|
|
661
661
|
);
|
|
662
662
|
if (pendingClaim) {
|
|
663
|
-
|
|
663
|
+
_chunk57F5VKHVjs.printCommandEnvelope.call(void 0,
|
|
664
664
|
{
|
|
665
665
|
..._nullishCoalesce(hostStatusPayload, () => ( { host: baseUrl })),
|
|
666
666
|
status: "pending",
|
|
@@ -681,7 +681,7 @@ async function handleStatus(args) {
|
|
|
681
681
|
);
|
|
682
682
|
return EXIT_OK;
|
|
683
683
|
}
|
|
684
|
-
|
|
684
|
+
_chunk57F5VKHVjs.printCommandEnvelope.call(void 0,
|
|
685
685
|
{
|
|
686
686
|
..._nullishCoalesce(hostStatusPayload, () => ( { host: baseUrl })),
|
|
687
687
|
status: "not connected",
|
|
@@ -714,7 +714,7 @@ async function handleStatus(args) {
|
|
|
714
714
|
}
|
|
715
715
|
);
|
|
716
716
|
if (status === 401 || status === 403) {
|
|
717
|
-
|
|
717
|
+
_chunk57F5VKHVjs.printCommandEnvelope.call(void 0,
|
|
718
718
|
{
|
|
719
719
|
..._nullishCoalesce(hostStatusPayload, () => ( { host: baseUrl })),
|
|
720
720
|
status: "unauthorized",
|
|
@@ -741,7 +741,7 @@ async function handleStatus(args) {
|
|
|
741
741
|
console.error(`Auth status error (status ${status}).`);
|
|
742
742
|
return EXIT_SERVER;
|
|
743
743
|
}
|
|
744
|
-
const resolvedAuthScope = _nullishCoalesce(authScope, () => ( (
|
|
744
|
+
const resolvedAuthScope = _nullishCoalesce(authScope, () => ( (_chunkCNQBCLQPjs.getResolvedProjectAuthSource.call(void 0, baseUrl, apiKey) ? "folder" : "global")));
|
|
745
745
|
clearSatisfiedPendingClaim(
|
|
746
746
|
baseUrl,
|
|
747
747
|
resolvedAuthScope,
|
|
@@ -769,28 +769,28 @@ async function handleStatus(args) {
|
|
|
769
769
|
if (apiKeyResp) {
|
|
770
770
|
saveEnvValues(
|
|
771
771
|
{
|
|
772
|
-
[
|
|
773
|
-
[
|
|
772
|
+
[_chunkCNQBCLQPjs.HOST_URL_ENV]: baseUrl,
|
|
773
|
+
[_chunkCNQBCLQPjs.API_KEY_ENV]: apiKeyResp,
|
|
774
774
|
...activeOrgEnvValues(data)
|
|
775
775
|
},
|
|
776
776
|
baseUrl,
|
|
777
777
|
resolvedAuthScope
|
|
778
778
|
);
|
|
779
779
|
if (resolvedAuthScope === "folder") {
|
|
780
|
-
const target =
|
|
780
|
+
const target = _chunkCNQBCLQPjs.resolveProjectPinTarget.call(void 0, );
|
|
781
781
|
savedApiKeyPath = target.ok ? _path.join.call(void 0, target.dir, ".env.deepline") : null;
|
|
782
782
|
} else {
|
|
783
783
|
savedApiKeyPath = envFilePath(baseUrl);
|
|
784
784
|
}
|
|
785
785
|
}
|
|
786
|
-
} else if (resolvedAuthScope === "folder" ||
|
|
787
|
-
saveEnvValues(
|
|
786
|
+
} else if (resolvedAuthScope === "folder" || _chunkCNQBCLQPjs.storedHostApiKey.call(void 0, baseUrl) === apiKey) {
|
|
787
|
+
saveEnvValues(_chunkCNQBCLQPjs.featureEnvValues.call(void 0, data), baseUrl, resolvedAuthScope);
|
|
788
788
|
}
|
|
789
|
-
|
|
789
|
+
_chunk57F5VKHVjs.printCommandEnvelope.call(void 0,
|
|
790
790
|
{
|
|
791
791
|
...payload,
|
|
792
|
-
...
|
|
793
|
-
command_context:
|
|
792
|
+
..._chunkAGIEKE3Ljs.detectAgentRuntime.call(void 0, ) !== "unknown" ? {
|
|
793
|
+
command_context: _chunkCNQBCLQPjs.resolveCliCommandContext.call(void 0,
|
|
794
794
|
{ baseUrl, apiKey },
|
|
795
795
|
resolvedAuthScope
|
|
796
796
|
)
|