deepline 0.3.313 → 0.3.315
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 +12 -0
- package/dist/bundling-sources/sdk/src/release.ts +1 -1
- package/dist/bundling-sources/sdk/src/types.ts +10 -0
- package/dist/bundling-sources/shared_libs/play-runtime/play-run-recovery-policy.ts +50 -0
- package/dist/bundling-sources/shared_libs/play-runtime/run-event-query.ts +15 -2
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-launch-transport.ts +210 -2
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona-lifecycle.ts +226 -14
- package/dist/bundling-sources/shared_libs/play-runtime/runner-backends/backends/daytona.ts +4 -18
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/absurd-runtime-worker.ts +5 -0
- package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres.ts +94 -14
- package/dist/bundling-sources/shared_libs/plays/docflow-binding-owner.ts +61 -11
- package/dist/cli/{auth-LNA6WCQA.mjs → auth-OVWOO5NP.mjs} +4 -4
- package/dist/cli/auth-P2TTZU36.js +31 -0
- package/dist/cli/{billing-GJJUUCOZ.js → billing-SRZL7UOH.js} +70 -70
- package/dist/cli/{billing-D37QNIE3.mjs → billing-W3OXKWNE.mjs} +4 -4
- package/dist/cli/{chunk-HY2SSFRI.js → chunk-6BJACIVK.js} +1 -1
- package/dist/cli/{chunk-BS4GAUMH.mjs → chunk-AO4IWPP7.mjs} +33 -8
- package/dist/cli/{chunk-DOI3UBGV.mjs → chunk-AZWQJAQF.mjs} +1 -1
- package/dist/cli/{chunk-XFEPRIW7.mjs → chunk-B473QUQU.mjs} +4 -4
- package/dist/cli/{chunk-P4N7233B.js → chunk-C5WSTXUB.js} +247 -222
- package/dist/cli/{chunk-4UXNEC5C.js → chunk-FGAK6FET.js} +26 -26
- package/dist/cli/{chunk-3ZC4PHJ6.mjs → chunk-FTJQO757.mjs} +1 -1
- package/dist/cli/{chunk-UQBMMN4U.mjs → chunk-GK67FYMS.mjs} +5 -5
- package/dist/cli/{chunk-CSH4PKPJ.mjs → chunk-HNKHMHJ7.mjs} +1 -1
- package/dist/cli/{chunk-YZ5PP6TX.mjs → chunk-IGE7EJJY.mjs} +23 -3
- package/dist/cli/{chunk-HM2TSTCT.mjs → chunk-JF4O5OMH.mjs} +1 -1
- package/dist/cli/{chunk-N2DXWS6W.mjs → chunk-L5TSFCJ6.mjs} +2 -2
- package/dist/cli/{chunk-6G7ZYA6E.js → chunk-LOWURQMF.js} +50 -50
- package/dist/cli/{chunk-FJUIXWZF.js → chunk-OJP4FCCX.js} +48 -48
- package/dist/cli/{chunk-BLMO3JMZ.mjs → chunk-OUIIYFG3.mjs} +2 -2
- package/dist/cli/{chunk-MHETTUWR.js → chunk-OYJCNCUW.js} +2 -2
- package/dist/cli/{chunk-JG2ZTDZV.js → chunk-PPONZ6IE.js} +15 -15
- package/dist/cli/{chunk-QCXDLOGA.mjs → chunk-R3IFZDJL.mjs} +2 -2
- package/dist/cli/{chunk-KNGTN7NE.js → chunk-SNFSO2AN.js} +6 -6
- package/dist/cli/{chunk-RDUS2EDE.mjs → chunk-TQ3F77AC.mjs} +3 -3
- package/dist/cli/{chunk-I4FHFGMA.js → chunk-TQK662WG.js} +60 -60
- package/dist/cli/{chunk-OTA5C7DD.mjs → chunk-TZ5KUDPP.mjs} +1 -1
- package/dist/cli/{chunk-FSZTWQFK.js → chunk-URVZGYGG.js} +4 -4
- package/dist/cli/{chunk-VSAYSOVC.js → chunk-VYK23G2C.js} +222 -202
- package/dist/cli/{chunk-GQXEHX5X.js → chunk-Y42UERUY.js} +6 -6
- package/dist/cli/{chunk-QQMKX7JW.js → chunk-YL42TF53.js} +6 -6
- package/dist/cli/client-CXFPFCIG.js +20 -0
- package/dist/cli/{client-6RVRZ4OY.mjs → client-WQ3J5BSH.mjs} +3 -3
- package/dist/cli/{csv-SBOHBKEG.mjs → csv-36ARCBNQ.mjs} +3 -3
- package/dist/cli/{csv-2UHRG67O.js → csv-CENMEWDH.js} +12 -12
- package/dist/cli/{db-VRE7CLIQ.js → db-6DQZG6NB.js} +20 -20
- package/dist/cli/{db-TUFTPYEA.mjs → db-JU7XLKQM.mjs} +4 -4
- package/dist/cli/{describe-WCBZTSOF.mjs → describe-34ALEEFO.mjs} +8 -8
- package/dist/cli/{describe-GS5A2XH4.js → describe-VUD4AFBY.js} +15 -15
- package/dist/cli/{executions-ENMOOKWH.js → executions-H2UXS6FP.js} +6 -6
- package/dist/cli/{executions-UTN3O372.mjs → executions-H66BMN6N.mjs} +4 -4
- package/dist/cli/{feedback-PXBA3AG7.mjs → feedback-Q7LXXLSH.mjs} +3 -3
- package/dist/cli/{feedback-BLN6SIRG.js → feedback-YSYFQSAB.js} +6 -6
- package/dist/cli/git-SYFCYIFP.js +23 -0
- package/dist/cli/{git-YDMIRW3Q.mjs → git-XV43NSWN.mjs} +4 -4
- package/dist/cli/index.js +74 -74
- package/dist/cli/index.mjs +31 -31
- package/dist/cli/{legacy-noops-CWTUWTDB.js → legacy-noops-RGDW6SCA.js} +7 -7
- package/dist/cli/{legacy-noops-OVG2SICQ.mjs → legacy-noops-Z2DTZQN3.mjs} +4 -4
- package/dist/cli/{monitors-T63OPBTY.js → monitors-I75KZ2BP.js} +85 -85
- package/dist/cli/{monitors-ATIDXJA4.mjs → monitors-OFQ56O4S.mjs} +4 -4
- package/dist/cli/{org-7RVAPMRN.js → org-75AH6RIB.js} +60 -60
- package/dist/cli/{org-NXKNIM3H.mjs → org-ZYMCU6XO.mjs} +4 -4
- package/dist/cli/{play-B62OVHD4.mjs → play-BKXM76DV.mjs} +7 -7
- package/dist/cli/play-OKXUWPMO.js +152 -0
- package/dist/cli/{providers-U7B7JEYY.mjs → providers-GWG2WFIY.mjs} +4 -4
- package/dist/cli/{providers-EITVEGXD.js → providers-Z77MM7ID.js} +7 -7
- package/dist/cli/{quickstart-VSWTYNJM.mjs → quickstart-BGVIV374.mjs} +3 -3
- package/dist/cli/{quickstart-G64F2XRU.js → quickstart-I4RECIQC.js} +5 -5
- package/dist/cli/search-3KISUDDT.js +26 -0
- package/dist/cli/{search-SKYTFKKF.mjs → search-TIKBP3RE.mjs} +5 -5
- package/dist/cli/{secrets-JSFHSCGM.js → secrets-SNGRI4KS.js} +13 -13
- package/dist/cli/{secrets-4DNS7KWS.mjs → secrets-YCHKLWKC.mjs} +4 -4
- package/dist/cli/{sessions-HB7RQ4XN.mjs → sessions-IRDG6ZRX.mjs} +4 -4
- package/dist/cli/{sessions-MLTYPPCG.js → sessions-WXLADGDX.js} +5 -5
- package/dist/cli/{settings-3PCKNBPU.js → settings-72J4BVF6.js} +74 -74
- package/dist/cli/{settings-BT5WCU65.mjs → settings-KZALJDXW.mjs} +7 -7
- package/dist/cli/{setup-EIWDTMCK.mjs → setup-4KCA7ESV.mjs} +6 -6
- package/dist/cli/{setup-EYZWTDJI.js → setup-FFB3KLFD.js} +41 -41
- package/dist/cli/{skills-AQ3ORN2C.mjs → skills-MQZPYUQ3.mjs} +4 -4
- package/dist/cli/skills-XGOK4GRW.js +28 -0
- package/dist/cli/tools-LEAJ7EPW.js +38 -0
- package/dist/cli/{tools-OFTB2BGP.mjs → tools-M3WKRZ5T.mjs} +6 -6
- package/dist/cli/{update-ERQTFSAR.mjs → update-QJMNYGNF.mjs} +6 -6
- package/dist/cli/update-ZN6LDUHS.js +28 -0
- package/dist/cli/{workflow-6D6NHUH4.js → workflow-35UUOZ5E.js} +15 -15
- package/dist/cli/{workflow-SRLWGGBM.mjs → workflow-6T2EUFCN.mjs} +5 -5
- package/dist/{client-CtVdLZux.d.mts → client-CvpZsBqt.d.mts} +12 -0
- package/dist/{client-OBwghxPC.d.ts → client-Dh_4Ph1R.d.ts} +12 -0
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +6 -6
- package/dist/index.mjs +3 -3
- package/dist/install-integrity.json +76 -76
- 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/package.json +1 -1
- package/dist/cli/auth-56NYRTQK.js +0 -31
- package/dist/cli/client-XUTMYJDL.js +0 -20
- package/dist/cli/git-26D3VD2I.js +0 -23
- package/dist/cli/play-WM3NZVE7.js +0 -152
- package/dist/cli/search-TXQJJQWY.js +0 -26
- package/dist/cli/skills-73T4BSDE.js +0 -28
- package/dist/cli/tools-ZGSOHWBY.js +0 -38
- package/dist/cli/update-L4V5TF7I.js +0 -28
|
@@ -7,7 +7,7 @@ var _chunkXNL3SEMCjs = require('./chunk-XNL3SEMC.js');
|
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _chunkYL42TF53js = require('./chunk-YL42TF53.js');
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
@@ -18,7 +18,7 @@ var _chunkQQMKX7JWjs = require('./chunk-QQMKX7JW.js');
|
|
|
18
18
|
var _chunkNXDRDJ4Kjs = require('./chunk-NXDRDJ4K.js');
|
|
19
19
|
|
|
20
20
|
|
|
21
|
-
var
|
|
21
|
+
var _chunkVYK23G2Cjs = require('./chunk-VYK23G2C.js');
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
|
|
@@ -33,11 +33,11 @@ var _chunkQJBJZVG6js = require('./chunk-QJBJZVG6.js');
|
|
|
33
33
|
|
|
34
34
|
|
|
35
35
|
|
|
36
|
-
var
|
|
36
|
+
var _chunkY42UERUYjs = require('./chunk-Y42UERUY.js');
|
|
37
37
|
|
|
38
38
|
|
|
39
39
|
|
|
40
|
-
var
|
|
40
|
+
var _chunkURVZGYGGjs = require('./chunk-URVZGYGG.js');
|
|
41
41
|
|
|
42
42
|
|
|
43
43
|
var _chunk7P5AA3SNjs = require('./chunk-7P5AA3SN.js');
|
|
@@ -82,10 +82,10 @@ var ToolCallRecovery = class _ToolCallRecovery {
|
|
|
82
82
|
}
|
|
83
83
|
};
|
|
84
84
|
function pendingToolExecutionPath(input) {
|
|
85
|
-
const config =
|
|
85
|
+
const config = _chunkURVZGYGGjs.resolveConfig.call(void 0, );
|
|
86
86
|
const fingerprint = _crypto.createHash.call(void 0, "sha256").update(config.baseUrl).update("\0").update(_crypto.createHash.call(void 0, "sha256").update(config.apiKey).digest("hex")).update("\0").update(input.toolId).update("\0").update(_chunkNXDRDJ4Kjs.stableStringify.call(void 0, input.params)).update("\0").update(input.responseIntent).digest("hex");
|
|
87
87
|
return _path.join.call(void 0,
|
|
88
|
-
|
|
88
|
+
_chunkURVZGYGGjs.sdkCliStateDirPath.call(void 0, config.baseUrl),
|
|
89
89
|
`pending-tool-execution-${fingerprint}.json`
|
|
90
90
|
);
|
|
91
91
|
}
|
|
@@ -517,12 +517,12 @@ function categoryEnumerationRender(summaries) {
|
|
|
517
517
|
};
|
|
518
518
|
}
|
|
519
519
|
async function listToolCategories(emitJson, compact) {
|
|
520
|
-
const client = new (0,
|
|
520
|
+
const client = new (0, _chunkVYK23G2Cjs.DeeplineClient)();
|
|
521
521
|
const rawTools = await client.listTools({ compact });
|
|
522
522
|
const items = rawTools.map(toListedTool);
|
|
523
523
|
const summaries = aggregateCategorySummaries(rawTools);
|
|
524
524
|
const outputItems = compact ? items.map(compactTool) : items;
|
|
525
|
-
|
|
525
|
+
_chunkY42UERUYjs.printCommandEnvelope.call(void 0,
|
|
526
526
|
{
|
|
527
527
|
tools: outputItems,
|
|
528
528
|
count: outputItems.length,
|
|
@@ -541,7 +541,7 @@ function unknownCategoryError(category, summaries, emitJson) {
|
|
|
541
541
|
const known = summaries.map((item) => item.name);
|
|
542
542
|
const message = `Unknown tool category "${category}". Run \`deepline tools list\` to browse categories.`;
|
|
543
543
|
if (emitJson) {
|
|
544
|
-
|
|
544
|
+
_chunkY42UERUYjs.printJson.call(void 0, {
|
|
545
545
|
ok: false,
|
|
546
546
|
exitCode: 4,
|
|
547
547
|
code: "TOOL_CATEGORY_NOT_FOUND",
|
|
@@ -555,13 +555,13 @@ function unknownCategoryError(category, summaries, emitJson) {
|
|
|
555
555
|
const render = categoryEnumerationRender(summaries);
|
|
556
556
|
console.error(message);
|
|
557
557
|
console.error("");
|
|
558
|
-
console.error(
|
|
558
|
+
console.error(_chunkY42UERUYjs.renderCommandEnvelopeText.call(void 0, { render }).trimEnd());
|
|
559
559
|
console.error("");
|
|
560
560
|
console.error(`Valid categories: ${known.join(", ")}`);
|
|
561
561
|
return 4;
|
|
562
562
|
}
|
|
563
563
|
async function listToolsInCategory(category, emitJson) {
|
|
564
|
-
const client = new (0,
|
|
564
|
+
const client = new (0, _chunkVYK23G2Cjs.DeeplineClient)();
|
|
565
565
|
const rawTools = await client.listTools({
|
|
566
566
|
categories: category,
|
|
567
567
|
compact: false
|
|
@@ -598,7 +598,7 @@ async function listToolsInCategory(category, emitJson) {
|
|
|
598
598
|
}
|
|
599
599
|
]
|
|
600
600
|
};
|
|
601
|
-
|
|
601
|
+
_chunkY42UERUYjs.printCommandEnvelope.call(void 0,
|
|
602
602
|
{
|
|
603
603
|
category,
|
|
604
604
|
total: rows.length,
|
|
@@ -611,7 +611,7 @@ async function listToolsInCategory(category, emitJson) {
|
|
|
611
611
|
return 0;
|
|
612
612
|
}
|
|
613
613
|
async function listToolsForCategoryFilter(requestedCategories, emitJson, compact) {
|
|
614
|
-
const client = new (0,
|
|
614
|
+
const client = new (0, _chunkVYK23G2Cjs.DeeplineClient)();
|
|
615
615
|
const items = (await client.listTools({
|
|
616
616
|
categories: requestedCategories.join(","),
|
|
617
617
|
compact
|
|
@@ -640,7 +640,7 @@ async function listToolsForCategoryFilter(requestedCategories, emitJson, compact
|
|
|
640
640
|
]
|
|
641
641
|
};
|
|
642
642
|
const outputItems = compact ? items.map(compactTool) : items;
|
|
643
|
-
|
|
643
|
+
_chunkY42UERUYjs.printCommandEnvelope.call(void 0,
|
|
644
644
|
{
|
|
645
645
|
tools: outputItems,
|
|
646
646
|
count: outputItems.length,
|
|
@@ -659,13 +659,13 @@ async function listTools(category, options = {}) {
|
|
|
659
659
|
const positional = _nullishCoalesce(_optionalChain([category, 'optionalAccess', _9 => _9.trim, 'call', _10 => _10()]), () => ( ""));
|
|
660
660
|
const flagCategories = (_nullishCoalesce(options.categories, () => ( ""))).split(",").map((item) => item.trim()).filter(Boolean);
|
|
661
661
|
const compact = options.compact !== false;
|
|
662
|
-
const emitJson = options.json === true ||
|
|
662
|
+
const emitJson = options.json === true || _chunkY42UERUYjs.shouldEmitJson.call(void 0, );
|
|
663
663
|
if (positional && flagCategories.length > 0) {
|
|
664
664
|
const flagIsSameSingle = flagCategories.length === 1 && flagCategories[0] === positional;
|
|
665
665
|
if (!flagIsSameSingle) {
|
|
666
666
|
const message = `Category "${positional}" and --categories ${flagCategories.join(",")} disagree. Pass one: deepline tools list ${positional}`;
|
|
667
667
|
if (emitJson) {
|
|
668
|
-
|
|
668
|
+
_chunkY42UERUYjs.printJson.call(void 0, {
|
|
669
669
|
ok: false,
|
|
670
670
|
exitCode: 2,
|
|
671
671
|
code: "TOOL_LIST_CATEGORY_CONFLICT",
|
|
@@ -692,7 +692,7 @@ async function grepTools(queryInput, options = {}) {
|
|
|
692
692
|
console.error("Usage: deepline tools grep <query> [--json]");
|
|
693
693
|
return 1;
|
|
694
694
|
}
|
|
695
|
-
const client = new (0,
|
|
695
|
+
const client = new (0, _chunkVYK23G2Cjs.DeeplineClient)();
|
|
696
696
|
const requestedCategories = options.categories ? options.categories.split(",").map((item) => item.trim()).filter(Boolean) : [];
|
|
697
697
|
const mode = _nullishCoalesce(options.mode, () => ( "all"));
|
|
698
698
|
const jsonOutput = options.json === true;
|
|
@@ -735,7 +735,7 @@ async function grepTools(queryInput, options = {}) {
|
|
|
735
735
|
query,
|
|
736
736
|
mode
|
|
737
737
|
}) : null;
|
|
738
|
-
|
|
738
|
+
_chunkY42UERUYjs.printCommandEnvelope.call(void 0,
|
|
739
739
|
{
|
|
740
740
|
tools: outputTools,
|
|
741
741
|
count: outputTools.length,
|
|
@@ -753,7 +753,7 @@ async function grepTools(queryInput, options = {}) {
|
|
|
753
753
|
} : {},
|
|
754
754
|
commandTemplates: TOOL_COMMAND_TEMPLATES
|
|
755
755
|
},
|
|
756
|
-
{ json: options.json ||
|
|
756
|
+
{ json: options.json || _chunkY42UERUYjs.shouldEmitJson.call(void 0, ) }
|
|
757
757
|
);
|
|
758
758
|
return 0;
|
|
759
759
|
}
|
|
@@ -909,7 +909,7 @@ Examples:
|
|
|
909
909
|
json: Boolean(options.json)
|
|
910
910
|
});
|
|
911
911
|
});
|
|
912
|
-
|
|
912
|
+
_chunkYL42TF53js.registerDeprecatedSearchCommand.call(void 0, tools, () => ["tools", "monitors"]);
|
|
913
913
|
tools.command("grep <query>").description(
|
|
914
914
|
"Literal grep over tool ids, descriptions, categories, and input fields."
|
|
915
915
|
).addHelpText(
|
|
@@ -1010,7 +1010,7 @@ Examples:
|
|
|
1010
1010
|
process.exitCode = await narrowView();
|
|
1011
1011
|
return;
|
|
1012
1012
|
}
|
|
1013
|
-
const { describeAnything } = await Promise.resolve().then(() => _interopRequireWildcard(require("./describe-
|
|
1013
|
+
const { describeAnything } = await Promise.resolve().then(() => _interopRequireWildcard(require("./describe-VUD4AFBY.js")));
|
|
1014
1014
|
process.exitCode = await describeAnything(
|
|
1015
1015
|
toolId,
|
|
1016
1016
|
{ ...options, kinds: ["tools", "monitors"], fetchedTool: metadata },
|
|
@@ -1107,7 +1107,7 @@ async function getTool(toolId, options = {}, compatibilityMetadata) {
|
|
|
1107
1107
|
console.error("Usage: deepline tools describe <toolId> [--json]");
|
|
1108
1108
|
return 1;
|
|
1109
1109
|
}
|
|
1110
|
-
const client = new (0,
|
|
1110
|
+
const client = new (0, _chunkVYK23G2Cjs.DeeplineClient)();
|
|
1111
1111
|
let tool;
|
|
1112
1112
|
try {
|
|
1113
1113
|
tool = await _asyncNullishCoalesce(compatibilityMetadata, async () => ( await client.getTool(toolId)));
|
|
@@ -1161,7 +1161,7 @@ async function getTool(toolId, options = {}, compatibilityMetadata) {
|
|
|
1161
1161
|
const lines = toolPricingOnlyLines(tool, toolId);
|
|
1162
1162
|
if (inferenceQuote)
|
|
1163
1163
|
lines.push(...inferenceQuoteSummaryLines(inferenceQuote));
|
|
1164
|
-
|
|
1164
|
+
_chunkY42UERUYjs.printCommandEnvelope.call(void 0,
|
|
1165
1165
|
{
|
|
1166
1166
|
toolId: String(tool.toolId || toolId),
|
|
1167
1167
|
cost: Capability.fromCatalogEntry(tool).describe().customerCost(),
|
|
@@ -1179,7 +1179,7 @@ async function getTool(toolId, options = {}, compatibilityMetadata) {
|
|
|
1179
1179
|
}
|
|
1180
1180
|
if ((options.schemaOnly || options.examplesOnly || options.gettersOnly) && !isMonitorTypeTool(tool) && !isPlayLikeTool(tool) && (options.json || options.contractJson)) {
|
|
1181
1181
|
const contract = toolContractJsonForDescribe(tool, toolId);
|
|
1182
|
-
|
|
1182
|
+
_chunkY42UERUYjs.printCompactJson.call(void 0, {
|
|
1183
1183
|
toolId: contract.toolId,
|
|
1184
1184
|
...options.schemaOnly ? {
|
|
1185
1185
|
inputSchema: contract.inputSchema,
|
|
@@ -1202,7 +1202,7 @@ async function getTool(toolId, options = {}, compatibilityMetadata) {
|
|
|
1202
1202
|
return 0;
|
|
1203
1203
|
}
|
|
1204
1204
|
if (options.contractJson) {
|
|
1205
|
-
|
|
1205
|
+
_chunkY42UERUYjs.printCompactJson.call(void 0, {
|
|
1206
1206
|
...toolContractJsonForDescribe(tool, toolId),
|
|
1207
1207
|
...modelDescription ? { modelOptions: modelDescription } : {},
|
|
1208
1208
|
...inferenceQuote ? { inferenceQuote } : {}
|
|
@@ -1211,7 +1211,7 @@ async function getTool(toolId, options = {}, compatibilityMetadata) {
|
|
|
1211
1211
|
}
|
|
1212
1212
|
const emitJson = options.json === true;
|
|
1213
1213
|
if (emitJson) {
|
|
1214
|
-
|
|
1214
|
+
_chunkY42UERUYjs.printCompactJson.call(void 0, {
|
|
1215
1215
|
...toolMetadataJsonForDescribe(tool, toolId),
|
|
1216
1216
|
...modelDescription ? { modelOptions: modelDescription } : {},
|
|
1217
1217
|
...inferenceQuote ? { inferenceQuote } : {}
|
|
@@ -1242,8 +1242,8 @@ ${formatModelDescription(modelDescription)}`);
|
|
|
1242
1242
|
if (inferenceQuote) printInferenceQuoteSummary(inferenceQuote);
|
|
1243
1243
|
return 0;
|
|
1244
1244
|
}
|
|
1245
|
-
if (
|
|
1246
|
-
|
|
1245
|
+
if (_chunkY42UERUYjs.shouldEmitJson.call(void 0, )) {
|
|
1246
|
+
_chunkY42UERUYjs.printCompactJson.call(void 0, {
|
|
1247
1247
|
...toolContractJsonForDescribe(tool, toolId),
|
|
1248
1248
|
...modelDescription ? { modelOptions: modelDescription } : {},
|
|
1249
1249
|
...inferenceQuote ? { inferenceQuote } : {}
|
|
@@ -2915,15 +2915,15 @@ async function executeTool(args) {
|
|
|
2915
2915
|
try {
|
|
2916
2916
|
parsed = parseExecuteOptions(args);
|
|
2917
2917
|
} catch (error) {
|
|
2918
|
-
if (
|
|
2919
|
-
|
|
2918
|
+
if (_chunkY42UERUYjs.argsWantJson.call(void 0, args)) {
|
|
2919
|
+
_chunkY42UERUYjs.printJsonError.call(void 0, error);
|
|
2920
2920
|
} else {
|
|
2921
2921
|
console.error(error instanceof Error ? error.message : String(error));
|
|
2922
2922
|
}
|
|
2923
2923
|
return 1;
|
|
2924
2924
|
}
|
|
2925
2925
|
const cliInvocationId = _nullishCoalesce(_chunkQJBJZVG6js.getToolExecuteInvocationId.call(void 0, ), () => ( _chunkQJBJZVG6js.beginToolExecuteCommand.call(void 0, )));
|
|
2926
|
-
const client = new (0,
|
|
2926
|
+
const client = new (0, _chunkVYK23G2Cjs.DeeplineClient)();
|
|
2927
2927
|
let metadata;
|
|
2928
2928
|
try {
|
|
2929
2929
|
metadata = await _chunkQJBJZVG6js.runToolExecuteStage.call(void 0,
|
|
@@ -2937,8 +2937,8 @@ async function executeTool(args) {
|
|
|
2937
2937
|
() => findPlayForToolId(client, parsed.toolId, cliInvocationId)
|
|
2938
2938
|
);
|
|
2939
2939
|
if (play) {
|
|
2940
|
-
if (
|
|
2941
|
-
|
|
2940
|
+
if (_chunkY42UERUYjs.argsWantJson.call(void 0, args)) {
|
|
2941
|
+
_chunkY42UERUYjs.printJsonError.call(void 0,
|
|
2942
2942
|
new Error(playAliasToolErrorMessage(parsed.toolId, play))
|
|
2943
2943
|
);
|
|
2944
2944
|
} else {
|
|
@@ -2950,8 +2950,8 @@ async function executeTool(args) {
|
|
|
2950
2950
|
throw error;
|
|
2951
2951
|
}
|
|
2952
2952
|
if (isPlayLikeTool(metadata)) {
|
|
2953
|
-
if (
|
|
2954
|
-
|
|
2953
|
+
if (_chunkY42UERUYjs.argsWantJson.call(void 0, args)) {
|
|
2954
|
+
_chunkY42UERUYjs.printJsonError.call(void 0,
|
|
2955
2955
|
new Error(
|
|
2956
2956
|
playLikeToolExecuteErrorMessage(
|
|
2957
2957
|
parsed.toolId,
|
|
@@ -2987,7 +2987,7 @@ async function executeTool(args) {
|
|
|
2987
2987
|
responseIntent,
|
|
2988
2988
|
...idempotencyKey ? { idempotencyKey } : {},
|
|
2989
2989
|
...parsed.recoveryTimeoutMs !== void 0 ? { recoveryTimeoutMs: parsed.recoveryTimeoutMs } : {},
|
|
2990
|
-
searchRef:
|
|
2990
|
+
searchRef: _chunkYL42TF53js.recentSearchRef.call(void 0, ),
|
|
2991
2991
|
cliInvocationId
|
|
2992
2992
|
}).catch((error) => {
|
|
2993
2993
|
const guidanceLines = toolGuidanceLines(metadata.guidance);
|
|
@@ -3026,8 +3026,8 @@ async function executeTool(args) {
|
|
|
3026
3026
|
);
|
|
3027
3027
|
const executeExitCode = toolExecuteExitCode(baseEnvelope);
|
|
3028
3028
|
const delivered = await _chunkQJBJZVG6js.runToolExecuteStage.call(void 0, "output delivery", () => {
|
|
3029
|
-
if (!parsed.outPath && (parsed.outputFormat === "json" || parsed.outputFormat === "auto" &&
|
|
3030
|
-
|
|
3029
|
+
if (!parsed.outPath && (parsed.outputFormat === "json" || parsed.outputFormat === "auto" && _chunkY42UERUYjs.shouldEmitJson.call(void 0, ))) {
|
|
3030
|
+
_chunkY42UERUYjs.printCommandEnvelope.call(void 0, baseEnvelope, { json: true });
|
|
3031
3031
|
return true;
|
|
3032
3032
|
}
|
|
3033
3033
|
if (parsed.outputFormat === "json_file") {
|
|
@@ -3035,7 +3035,7 @@ async function executeTool(args) {
|
|
|
3035
3035
|
rawResponse,
|
|
3036
3036
|
`payload_${parsed.toolId}`
|
|
3037
3037
|
);
|
|
3038
|
-
|
|
3038
|
+
_chunkY42UERUYjs.printCommandEnvelope.call(void 0,
|
|
3039
3039
|
{
|
|
3040
3040
|
...baseEnvelope,
|
|
3041
3041
|
local: {
|
|
@@ -3052,8 +3052,8 @@ async function executeTool(args) {
|
|
|
3052
3052
|
const error = new Error(
|
|
3053
3053
|
`${parsed.toolId} did not expose row-shaped output to write as CSV. Re-run with --json to inspect the raw tool response.`
|
|
3054
3054
|
);
|
|
3055
|
-
if (
|
|
3056
|
-
|
|
3055
|
+
if (_chunkY42UERUYjs.argsWantJson.call(void 0, args)) {
|
|
3056
|
+
_chunkY42UERUYjs.printJsonError.call(void 0, error);
|
|
3057
3057
|
} else {
|
|
3058
3058
|
console.error(error.message);
|
|
3059
3059
|
}
|
|
@@ -3064,18 +3064,18 @@ async function executeTool(args) {
|
|
|
3064
3064
|
rawResponse,
|
|
3065
3065
|
`payload_${parsed.toolId}`
|
|
3066
3066
|
);
|
|
3067
|
-
|
|
3067
|
+
_chunkY42UERUYjs.printCommandEnvelope.call(void 0,
|
|
3068
3068
|
{
|
|
3069
3069
|
...baseEnvelope,
|
|
3070
3070
|
local: {
|
|
3071
3071
|
payload_file: jsonPath
|
|
3072
3072
|
}
|
|
3073
3073
|
},
|
|
3074
|
-
{ json: parsed.outputFormat === "csv_file" ||
|
|
3074
|
+
{ json: parsed.outputFormat === "csv_file" || _chunkY42UERUYjs.shouldEmitJson.call(void 0, ) }
|
|
3075
3075
|
);
|
|
3076
3076
|
return true;
|
|
3077
3077
|
}
|
|
3078
|
-
|
|
3078
|
+
_chunkY42UERUYjs.printCommandEnvelope.call(void 0, baseEnvelope, { json: false });
|
|
3079
3079
|
return true;
|
|
3080
3080
|
}
|
|
3081
3081
|
const rowOutput = _chunkNXDRDJ4Kjs.projectRowOutput.call(void 0, listConversion);
|
|
@@ -3097,19 +3097,19 @@ async function executeTool(args) {
|
|
|
3097
3097
|
seededScript
|
|
3098
3098
|
});
|
|
3099
3099
|
if (parsed.outputFormat === "csv_file") {
|
|
3100
|
-
|
|
3100
|
+
_chunkY42UERUYjs.printCommandEnvelope.call(void 0, materializedEnvelope, { json: true });
|
|
3101
3101
|
return true;
|
|
3102
3102
|
}
|
|
3103
3103
|
if (parsed.outPath) {
|
|
3104
|
-
|
|
3105
|
-
json:
|
|
3104
|
+
_chunkY42UERUYjs.printCommandEnvelope.call(void 0, materializedEnvelope, {
|
|
3105
|
+
json: _chunkY42UERUYjs.argsWantJson.call(void 0, args) || _chunkY42UERUYjs.shouldEmitJson.call(void 0, ),
|
|
3106
3106
|
text: `Wrote ${csv.rowCount} row(s) to ${csv.path}
|
|
3107
3107
|
`
|
|
3108
3108
|
});
|
|
3109
3109
|
return true;
|
|
3110
3110
|
}
|
|
3111
3111
|
if (parsed.noPreview) {
|
|
3112
|
-
|
|
3112
|
+
_chunkY42UERUYjs.printCommandEnvelope.call(void 0,
|
|
3113
3113
|
{
|
|
3114
3114
|
...materializedEnvelope,
|
|
3115
3115
|
local: {
|
|
@@ -3117,12 +3117,12 @@ async function executeTool(args) {
|
|
|
3117
3117
|
output_path: csv.path
|
|
3118
3118
|
}
|
|
3119
3119
|
},
|
|
3120
|
-
{ json:
|
|
3120
|
+
{ json: _chunkY42UERUYjs.shouldEmitJson.call(void 0, ), text: `${csv.path}
|
|
3121
3121
|
` }
|
|
3122
3122
|
);
|
|
3123
3123
|
return true;
|
|
3124
3124
|
}
|
|
3125
|
-
|
|
3125
|
+
_chunkY42UERUYjs.printCommandEnvelope.call(void 0, materializedEnvelope, { json: false });
|
|
3126
3126
|
return true;
|
|
3127
3127
|
});
|
|
3128
3128
|
if (delivered) {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _chunkY42UERUYjs = require('./chunk-Y42UERUY.js');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
@@ -25,7 +25,7 @@ var _chunkGQXEHX5Xjs = require('./chunk-GQXEHX5X.js');
|
|
|
25
25
|
|
|
26
26
|
|
|
27
27
|
|
|
28
|
-
var
|
|
28
|
+
var _chunkURVZGYGGjs = require('./chunk-URVZGYGG.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 _chunkURVZGYGGjs.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 = _chunkURVZGYGGjs.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 `${_chunkURVZGYGGjs.hostConfigDirPath.call(void 0, baseUrl)}/pending-auth.json`;
|
|
79
79
|
}
|
|
80
80
|
function legacyPendingClaimTokenPath(baseUrl) {
|
|
81
|
-
return `${
|
|
81
|
+
return `${_chunkURVZGYGGjs.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 _chunkURVZGYGGjs.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[_chunkURVZGYGGjs.HOST_URL_ENV] ? { [_chunkURVZGYGGjs.HOST_URL_ENV]: values[_chunkURVZGYGGjs.HOST_URL_ENV] } : {},
|
|
188
|
+
...values[_chunkURVZGYGGjs.API_KEY_ENV] ? { [_chunkURVZGYGGjs.API_KEY_ENV]: values[_chunkURVZGYGGjs.API_KEY_ENV] } : {},
|
|
189
|
+
...values[_chunkURVZGYGGjs.ACTIVE_ORG_ID_ENV] ? { [_chunkURVZGYGGjs.ACTIVE_ORG_ID_ENV]: values[_chunkURVZGYGGjs.ACTIVE_ORG_ID_ENV] } : {},
|
|
190
|
+
...Object.prototype.hasOwnProperty.call(values, _chunkURVZGYGGjs.ACTIVE_ORG_NAME_ENV) ? { [_chunkURVZGYGGjs.ACTIVE_ORG_NAME_ENV]: values[_chunkURVZGYGGjs.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, _chunkURVZGYGGjs.FEATURES_ENV) ? { [_chunkURVZGYGGjs.FEATURES_ENV]: values[_chunkURVZGYGGjs.FEATURES_ENV] } : {}
|
|
193
193
|
};
|
|
194
194
|
if (scope === "folder") {
|
|
195
|
-
|
|
195
|
+
_chunkURVZGYGGjs.saveProjectDeeplineEnvValues.call(void 0, filtered);
|
|
196
196
|
} else {
|
|
197
|
-
|
|
197
|
+
_chunkURVZGYGGjs.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
|
+
[_chunkURVZGYGGjs.ACTIVE_ORG_ID_ENV]: orgId,
|
|
206
|
+
[_chunkURVZGYGGjs.ACTIVE_ORG_NAME_ENV]: orgName,
|
|
207
|
+
..._chunkURVZGYGGjs.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/${_chunkURVZGYGGjs.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": _chunkURVZGYGGjs.detectAgentRuntime.call(void 0, ),
|
|
217
|
+
"X-Deepline-CLI-Version": _chunkURVZGYGGjs.SDK_VERSION,
|
|
218
|
+
"X-Deepline-SDK-Version": _chunkURVZGYGGjs.SDK_VERSION,
|
|
219
|
+
"X-Deepline-API-Contract": _chunkURVZGYGGjs.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" ? _chunkURVZGYGGjs.resolveProjectApiKeyForBaseUrl.call(void 0, input.baseUrl) : _chunkURVZGYGGjs.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 = _chunkURVZGYGGjs.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
|
+
[_chunkURVZGYGGjs.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" && _chunkURVZGYGGjs.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) _chunkY42UERUYjs.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
|
+
[_chunkURVZGYGGjs.HOST_URL_ENV]: baseUrl,
|
|
465
|
+
[_chunkURVZGYGGjs.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 = _chunkURVZGYGGjs.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" ? _chunkURVZGYGGjs.resolveProjectApiKeyForBaseUrl.call(void 0, baseUrl) : _chunkURVZGYGGjs.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
|
+
[_chunkURVZGYGGjs.HOST_URL_ENV]: baseUrl,
|
|
555
|
+
[_chunkURVZGYGGjs.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 = _chunkURVZGYGGjs.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, "");
|
|
580
580
|
const reveal = args.includes("--reveal");
|
|
581
|
-
const jsonOutput =
|
|
581
|
+
const jsonOutput = _chunkY42UERUYjs.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" ? _chunkURVZGYGGjs.resolveProjectApiKeyForBaseUrl.call(void 0, baseUrl) : authScope === "global" ? _chunkURVZGYGGjs.resolveGlobalApiKeyForBaseUrl.call(void 0, baseUrl) : _chunkURVZGYGGjs.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
|
+
_chunkY42UERUYjs.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
|
+
_chunkY42UERUYjs.printCommandEnvelope.call(void 0,
|
|
650
650
|
{
|
|
651
651
|
..._nullishCoalesce(hostStatusPayload, () => ( { host: baseUrl })),
|
|
652
652
|
status: "not connected",
|
|
@@ -682,7 +682,7 @@ async function handleStatus(args) {
|
|
|
682
682
|
}
|
|
683
683
|
);
|
|
684
684
|
if (status === 401 || status === 403) {
|
|
685
|
-
|
|
685
|
+
_chunkY42UERUYjs.printCommandEnvelope.call(void 0,
|
|
686
686
|
{
|
|
687
687
|
..._nullishCoalesce(hostStatusPayload, () => ( { host: baseUrl })),
|
|
688
688
|
status: "unauthorized",
|
|
@@ -712,7 +712,7 @@ async function handleStatus(args) {
|
|
|
712
712
|
console.error(`Auth status error (status ${status}).`);
|
|
713
713
|
return EXIT_SERVER;
|
|
714
714
|
}
|
|
715
|
-
const resolvedAuthScope = _nullishCoalesce(authScope, () => ( (
|
|
715
|
+
const resolvedAuthScope = _nullishCoalesce(authScope, () => ( (_chunkURVZGYGGjs.getResolvedProjectAuthSource.call(void 0, baseUrl, apiKey) ? "folder" : "global")));
|
|
716
716
|
clearSatisfiedPendingClaim(
|
|
717
717
|
baseUrl,
|
|
718
718
|
resolvedAuthScope,
|
|
@@ -740,28 +740,28 @@ async function handleStatus(args) {
|
|
|
740
740
|
if (apiKeyResp) {
|
|
741
741
|
saveEnvValues(
|
|
742
742
|
{
|
|
743
|
-
[
|
|
744
|
-
[
|
|
743
|
+
[_chunkURVZGYGGjs.HOST_URL_ENV]: baseUrl,
|
|
744
|
+
[_chunkURVZGYGGjs.API_KEY_ENV]: apiKeyResp,
|
|
745
745
|
...activeOrgEnvValues(data)
|
|
746
746
|
},
|
|
747
747
|
baseUrl,
|
|
748
748
|
resolvedAuthScope
|
|
749
749
|
);
|
|
750
750
|
if (resolvedAuthScope === "folder") {
|
|
751
|
-
const target =
|
|
751
|
+
const target = _chunkURVZGYGGjs.resolveProjectPinTarget.call(void 0, );
|
|
752
752
|
savedApiKeyPath = target.ok ? _path.join.call(void 0, target.dir, ".env.deepline") : null;
|
|
753
753
|
} else {
|
|
754
754
|
savedApiKeyPath = envFilePath(baseUrl);
|
|
755
755
|
}
|
|
756
756
|
}
|
|
757
|
-
} else if (resolvedAuthScope === "folder" ||
|
|
758
|
-
saveEnvValues(
|
|
757
|
+
} else if (resolvedAuthScope === "folder" || _chunkURVZGYGGjs.storedHostApiKey.call(void 0, baseUrl) === apiKey) {
|
|
758
|
+
saveEnvValues(_chunkURVZGYGGjs.featureEnvValues.call(void 0, data), baseUrl, resolvedAuthScope);
|
|
759
759
|
}
|
|
760
|
-
|
|
760
|
+
_chunkY42UERUYjs.printCommandEnvelope.call(void 0,
|
|
761
761
|
{
|
|
762
762
|
...payload,
|
|
763
|
-
...
|
|
764
|
-
command_context:
|
|
763
|
+
..._chunkURVZGYGGjs.detectAgentRuntime.call(void 0, ) !== "unknown" ? {
|
|
764
|
+
command_context: _chunkURVZGYGGjs.resolveCliCommandContext.call(void 0,
|
|
765
765
|
{ baseUrl, apiKey },
|
|
766
766
|
resolvedAuthScope
|
|
767
767
|
)
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
argsWantJson,
|
|
3
3
|
openInBrowser,
|
|
4
4
|
printCommandEnvelope
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-HNKHMHJ7.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-AZWQJAQF.mjs";
|
|
29
29
|
|
|
30
30
|
// src/cli/commands/auth.ts
|
|
31
31
|
import {
|