deepline 0.3.422 → 0.3.423
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 +2 -2
- package/dist/bundling-sources/sdk/src/index.ts +2 -0
- package/dist/bundling-sources/sdk/src/play.ts +227 -184
- package/dist/bundling-sources/sdk/src/plays/local-file-discovery.ts +9 -2
- package/dist/bundling-sources/sdk/src/plays/local-play-execution.ts +1 -1
- package/dist/bundling-sources/sdk/src/release.ts +1 -1
- package/dist/bundling-sources/sdk/src/tool-calls.ts +3 -1
- package/dist/bundling-sources/sdk/src/types.ts +5 -5
- package/dist/bundling-sources/shared_libs/plays/authoring-contract.ts +37 -36
- package/dist/bundling-sources/shared_libs/plays/bundling/index.ts +179 -38
- package/dist/bundling-sources/shared_libs/plays/dataset.ts +2 -2
- package/dist/bundling-sources/shared_libs/plays/docflow.ts +4 -0
- package/dist/bundling-sources/shared_libs/plays/fetch-http-error.ts +1 -1
- package/dist/bundling-sources/shared_libs/plays/local-file-discovery.ts +12 -4
- package/dist/bundling-sources/shared_libs/plays/play-exports.ts +27 -5
- package/dist/bundling-sources/shared_libs/plays/script-entry.ts +992 -0
- package/dist/bundling-sources/shared_libs/plays/source-authoring-edition.ts +63 -0
- package/dist/bundling-sources/shared_libs/plays/tool-result-types.ts +8 -4
- package/dist/bundling-sources/shared_libs/plays/ts-ast.ts +2 -0
- package/dist/cli/{auth-DMLBSXLV.mjs → auth-L7Q53QKK.mjs} +4 -4
- package/dist/cli/auth-SUNY477Y.js +40 -0
- package/dist/cli/{billing-SEXKROBQ.mjs → billing-IH7AKDR2.mjs} +4 -4
- package/dist/cli/{billing-IFGFPGJV.js → billing-QNP6YGI2.js} +73 -73
- package/dist/cli/{chunk-AARWVK4C.mjs → chunk-2BQUML3X.mjs} +792 -69
- package/dist/cli/{chunk-WP7T4BPE.js → chunk-2F5ULM2F.js} +1 -1
- package/dist/cli/{chunk-BL3LY54Y.js → chunk-2U3AMRHF.js} +8 -8
- package/dist/cli/{chunk-ERFN2QY4.mjs → chunk-3DNKFH2G.mjs} +1 -1
- package/dist/cli/{chunk-SDCIROIS.mjs → chunk-44US3EL2.mjs} +5 -5
- package/dist/cli/{chunk-S4KGXRCV.js → chunk-4WT5RISA.js} +20 -20
- package/dist/cli/{chunk-JRSULUPQ.js → chunk-5DGR3TB6.js} +2 -2
- package/dist/cli/{chunk-2JKQORUX.mjs → chunk-6FFORGD2.mjs} +2 -2
- package/dist/cli/{chunk-QNBHQM5R.mjs → chunk-ARTGL3FM.mjs} +1 -1
- package/dist/cli/{chunk-WGO2DY4L.js → chunk-AVOBDFQ5.js} +11 -11
- package/dist/cli/{chunk-V4RAH5D6.js → chunk-DRK6FYJU.js} +26 -26
- package/dist/cli/{chunk-63ILLN5H.mjs → chunk-DS7Y7X26.mjs} +2 -2
- package/dist/cli/{chunk-CTNA5QY2.mjs → chunk-EER67G2B.mjs} +43 -28
- package/dist/cli/{chunk-AYM2KZN3.js → chunk-EWWWOKX2.js} +6 -6
- package/dist/cli/{chunk-MLP4CAY7.mjs → chunk-FJRFSBWO.mjs} +4 -4
- package/dist/cli/{chunk-27GJKC5Q.js → chunk-GXOQRZXG.js} +2 -2
- package/dist/cli/{chunk-CO3VMH33.mjs → chunk-H662SHPT.mjs} +28 -27
- package/dist/cli/{chunk-PKBPSMOT.js → chunk-INFLI36H.js} +43 -28
- package/dist/cli/{chunk-FEKJENBB.mjs → chunk-IW5QK3K6.mjs} +3 -3
- package/dist/cli/{chunk-VT6WJ26Y.mjs → chunk-JDAXVQV7.mjs} +1 -1
- package/dist/cli/{chunk-4PG4ARL2.mjs → chunk-KPKU53YO.mjs} +1 -1
- package/dist/cli/{chunk-IMZ56EOH.mjs → chunk-LXTSVUZN.mjs} +2 -2
- package/dist/cli/{chunk-KXPIFC5S.mjs → chunk-MHG3NND4.mjs} +3 -3
- package/dist/cli/{chunk-IHG7UAHD.mjs → chunk-MLJBCS3E.mjs} +32 -13
- package/dist/cli/{chunk-LXRDHISW.js → chunk-MMI2DXCW.js} +8 -8
- package/dist/cli/{chunk-K4X472AT.js → chunk-NA6SGG7X.js} +260 -259
- package/dist/cli/{chunk-M6SXXFMT.mjs → chunk-NFIZ5YED.mjs} +2 -2
- package/dist/cli/{chunk-OZHPZCAU.js → chunk-OMWO2JLC.js} +52 -52
- package/dist/cli/{chunk-TP26TAAF.mjs → chunk-OPI7UCQG.mjs} +1 -1
- package/dist/cli/{chunk-UQQRMCOL.js → chunk-OZLMMMZH.js} +6 -6
- package/dist/cli/{chunk-W74RDGRL.mjs → chunk-PH4BP6KM.mjs} +2 -2
- package/dist/cli/{chunk-4EV2FKBI.js → chunk-PQ4G6MKI.js} +16 -16
- package/dist/cli/{chunk-3CE3WGKP.mjs → chunk-QN6DG4JO.mjs} +2 -2
- package/dist/cli/{chunk-4CAVSRQH.mjs → chunk-QWJJMQNE.mjs} +1 -1
- package/dist/cli/{chunk-GEJDBXXM.js → chunk-QWRHGGUH.js} +1 -1
- package/dist/cli/{chunk-AD47BXN2.js → chunk-R2QWSSAG.js} +8 -8
- package/dist/cli/{chunk-2LVM22ZU.js → chunk-RAL75ND3.js} +2 -2
- package/dist/cli/{chunk-QADCFSGH.js → chunk-RDIN3NKA.js} +17 -17
- package/dist/cli/{chunk-AXDEH2AM.mjs → chunk-S6KG7JCR.mjs} +2 -2
- package/dist/cli/{chunk-BQR6UN3C.js → chunk-VUYUI35Q.js} +32 -13
- package/dist/cli/{chunk-HCYNAIHZ.js → chunk-W42SSVM7.js} +4 -4
- package/dist/cli/{chunk-VRI3ABTK.js → chunk-WJO7KIFT.js} +50 -50
- package/dist/cli/{chunk-PXO253DP.mjs → chunk-XSERB7H2.mjs} +1 -1
- package/dist/cli/{chunk-KBJP3UAU.js → chunk-YCHR57TD.js} +35 -35
- package/dist/cli/{chunk-OQQOXSYA.js → chunk-YHRS6XTB.js} +845 -122
- package/dist/cli/{chunk-7OJEYJ6G.mjs → chunk-YNT7PJND.mjs} +3 -3
- package/dist/cli/command-docs.js +2 -2
- package/dist/cli/command-docs.mjs +1 -1
- package/dist/cli/{csv-J7UVP4KB.mjs → csv-5KW7M6ZS.mjs} +3 -3
- package/dist/cli/{csv-Y4YWZSLB.js → csv-GF7VRES5.js} +12 -12
- package/dist/cli/{db-SVFCM6YZ.js → db-AEDXKB4F.js} +26 -26
- package/dist/cli/{db-CQ6NHMLG.mjs → db-NN4JQAC4.mjs} +5 -5
- package/dist/cli/{describe-FSDW6LTN.js → describe-5RLXW332.js} +24 -24
- package/dist/cli/{describe-Y65BU7ZY.mjs → describe-RX6VROHQ.mjs} +16 -16
- package/dist/cli/describe-core.d.mts +2 -2
- package/dist/cli/describe-core.d.ts +2 -2
- package/dist/cli/describe-core.js +4 -4
- package/dist/cli/describe-core.mjs +3 -3
- package/dist/cli/{executions-IW762OIJ.mjs → executions-EJZ34VUB.mjs} +4 -4
- package/dist/cli/{executions-SJIKBRHT.js → executions-PGIGFDDS.js} +6 -6
- package/dist/cli/{feedback-VMJIWAMT.mjs → feedback-6MWOKE7H.mjs} +3 -3
- package/dist/cli/{feedback-RCYSUOB3.js → feedback-L2ODMANV.js} +7 -7
- package/dist/cli/git-2ZDCRTBD.js +24 -0
- package/dist/cli/{git-Q2WY3K6X.mjs → git-456RF3AT.mjs} +4 -4
- package/dist/cli/index.js +135 -135
- package/dist/cli/index.mjs +37 -37
- package/dist/cli/{legacy-noops-U4YPPYXU.js → legacy-noops-MDPB3MIS.js} +7 -7
- package/dist/cli/{legacy-noops-JVEE2VHK.mjs → legacy-noops-ZPRBXQDE.mjs} +4 -4
- package/dist/cli/{monitors-BMAOQ37R.js → monitors-TXKR5XYW.js} +86 -86
- package/dist/cli/{monitors-AY4KQRTC.mjs → monitors-ZLP6A7FT.mjs} +6 -6
- package/dist/cli/{org-G5IURX74.js → org-73SQ3AT2.js} +64 -64
- package/dist/cli/{org-ME4X6HWH.mjs → org-YZ62BIGM.mjs} +4 -4
- package/dist/cli/{play-X5GSZOKZ.js → play-M75EBXEV.js} +606 -567
- package/dist/cli/{play-WLYU7WQL.mjs → play-VCYQKCKF.mjs} +113 -74
- package/dist/cli/{providers-AHEUVD3R.js → providers-GIINJPWQ.js} +7 -7
- package/dist/cli/{providers-2LBMNB7B.mjs → providers-JLA6LST3.mjs} +4 -4
- package/dist/cli/{quickstart-DBLYGHJP.mjs → quickstart-AHCU75GG.mjs} +3 -3
- package/dist/cli/{quickstart-DP2SKLIG.js → quickstart-HHHLYCHT.js} +5 -5
- package/dist/cli/{search-YKJHY3ZJ.mjs → search-5GACUIAX.mjs} +5 -5
- package/dist/cli/search-W2PGBXQO.js +30 -0
- package/dist/cli/{secrets-2P3I3OEZ.js → secrets-PI7IPCOE.js} +13 -13
- package/dist/cli/{secrets-ECLARBO6.mjs → secrets-S2NBKAEN.mjs} +4 -4
- package/dist/cli/{sessions-MC4ZCTSN.js → sessions-BK4CSRFS.js} +5 -5
- package/dist/cli/{sessions-3GDFID7R.mjs → sessions-IBKYGTBD.mjs} +4 -4
- package/dist/cli/{settings-7SVR2OVL.js → settings-2G7TUDM7.js} +75 -75
- package/dist/cli/{settings-RTPJXMOA.mjs → settings-JY6UN4KO.mjs} +8 -8
- package/dist/cli/{setup-OKAZZGAW.mjs → setup-HS5X3OSN.mjs} +7 -7
- package/dist/cli/{setup-4WLIJX36.js → setup-R424FIBF.js} +42 -42
- package/dist/cli/skills-M3RZAN4A.js +29 -0
- package/dist/cli/{skills-2CVL6RG5.mjs → skills-UIBUDTGN.mjs} +5 -5
- package/dist/cli/tools-K2GII2PA.js +44 -0
- package/dist/cli/{tools-KAFHP6J4.mjs → tools-SB4FREB6.mjs} +15 -15
- package/dist/cli/update-C2ORJRXN.js +31 -0
- package/dist/cli/{update-3ZV3W7I4.mjs → update-NJSUE2YU.mjs} +7 -7
- package/dist/cli/{workflow-GULDFFP3.js → workflow-3AZWZ4J3.js} +19 -19
- package/dist/cli/{workflow-DKSUNZXE.mjs → workflow-HBG76XYX.mjs} +9 -9
- package/dist/{client-CCWIUnk7.d.mts → client-BTUOYGID.d.mts} +10 -9
- package/dist/{client-vHqBm-OL.d.ts → client-C668iUhZ.d.ts} +10 -9
- package/dist/{compiler-manifest-lzWpbV3w.d.mts → compiler-manifest-DaFuA1ki.d.mts} +35 -32
- package/dist/{compiler-manifest-lzWpbV3w.d.ts → compiler-manifest-DaFuA1ki.d.ts} +35 -32
- package/dist/{index-CtNK-0nI.d.mts → index-0yS9ihly.d.mts} +10 -3
- package/dist/{index-C8Cy-YTm.d.ts → index-CRAScKPg.d.ts} +10 -3
- package/dist/index.d.mts +120 -150
- package/dist/index.d.ts +120 -150
- package/dist/index.js +77 -12
- package/dist/index.mjs +74 -9
- package/dist/install-integrity.json +99 -98
- 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 +1 -1
- package/dist/plays/play-description.d.mts +2 -2
- package/dist/plays/play-description.d.ts +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-HD5AM2WM.js +0 -40
- package/dist/cli/git-JAW3UEGA.js +0 -24
- package/dist/cli/search-4K3VSDS5.js +0 -30
- package/dist/cli/skills-ZNSQOXO2.js +0 -29
- package/dist/cli/tools-W4U4FT3R.js +0 -44
- package/dist/cli/update-IE2FPLB5.js +0 -31
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkR2QWSSAGjs = require('./chunk-R2QWSSAG.js');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
@@ -13,7 +13,7 @@ var _chunkAD47BXN2js = require('./chunk-AD47BXN2.js');
|
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
|
|
16
|
-
var
|
|
16
|
+
var _chunkVUYUI35Qjs = require('./chunk-VUYUI35Q.js');
|
|
17
17
|
|
|
18
18
|
|
|
19
19
|
var _chunkPPDBRJRWjs = require('./chunk-PPDBRJRW.js');
|
|
@@ -31,13 +31,13 @@ var VIEWS = {
|
|
|
31
31
|
details: model,
|
|
32
32
|
lines: [
|
|
33
33
|
...unlisted,
|
|
34
|
-
...
|
|
34
|
+
..._chunkR2QWSSAGjs.formatModelDescription.call(void 0, model).trimEnd().split("\n")
|
|
35
35
|
]
|
|
36
36
|
};
|
|
37
37
|
},
|
|
38
38
|
byok: async (_value, tool) => ({
|
|
39
39
|
details: _nullishCoalesce(tool.byok, () => ( {})),
|
|
40
|
-
lines:
|
|
40
|
+
lines: _chunkVUYUI35Qjs.byokLines.call(void 0, _nullishCoalesce(tool.byok, () => ( {})))
|
|
41
41
|
})
|
|
42
42
|
};
|
|
43
43
|
var isFeatureView = (value) => typeof value === "string" && Object.hasOwn(VIEWS, value);
|
|
@@ -113,7 +113,7 @@ async function describeName(name, options, lookups) {
|
|
|
113
113
|
const record2 = await lookups.play(reference);
|
|
114
114
|
if (!record2) return null;
|
|
115
115
|
return {
|
|
116
|
-
described:
|
|
116
|
+
described: _chunkVUYUI35Qjs.describedPlay.call(void 0, record2),
|
|
117
117
|
record: { ...record2 },
|
|
118
118
|
schemas: {
|
|
119
119
|
inputSchema: _nullishCoalesce(record2.inputSchema, () => ( null)),
|
|
@@ -128,18 +128,18 @@ async function describeName(name, options, lookups) {
|
|
|
128
128
|
const features = toolFeatures(record2);
|
|
129
129
|
return {
|
|
130
130
|
described: {
|
|
131
|
-
...
|
|
131
|
+
..._chunkR2QWSSAGjs.describedTool.call(void 0, record2, name),
|
|
132
132
|
// Shown when the tool runs only on your own credentials; otherwise
|
|
133
133
|
// it is a feature, described with --feature byok.
|
|
134
134
|
..._optionalChain([byok, 'optionalAccess', _3 => _3.required]) === true ? { byok } : {},
|
|
135
135
|
...features.length ? { features: features.map(({ view: _view, ...feature }) => feature) } : {}
|
|
136
136
|
},
|
|
137
|
-
record:
|
|
137
|
+
record: _chunkR2QWSSAGjs.toolMetadataJsonForDescribe.call(void 0,
|
|
138
138
|
record2,
|
|
139
139
|
name,
|
|
140
140
|
lookups.seedStarterScript
|
|
141
141
|
),
|
|
142
|
-
schemas:
|
|
142
|
+
schemas: _chunkR2QWSSAGjs.publicToolSchemas.call(void 0, record2),
|
|
143
143
|
feature: (featureName, value) => {
|
|
144
144
|
const feature = features.find(({ name: name2 }) => name2 === featureName);
|
|
145
145
|
return feature ? describeFeature(record2, feature, value, {
|
|
@@ -170,7 +170,7 @@ async function describeName(name, options, lookups) {
|
|
|
170
170
|
const note = shadows ? `Showing your workspace play "${name}". It has the same name as a Deepline ${shadows.kind.replace("_", " ")}; see that one with: ${shadows.describeCommand}` : null;
|
|
171
171
|
const verbose = options.verbose === true;
|
|
172
172
|
const isPlay = described.kind === "prebuilt_play" || described.kind === "custom_play";
|
|
173
|
-
const dashboardUrl = isPlay ?
|
|
173
|
+
const dashboardUrl = isPlay ? _chunkVUYUI35Qjs.buildPlayDashboardUrl.call(void 0, lookups.baseUrl, described.id) : null;
|
|
174
174
|
if (options.webUrl) {
|
|
175
175
|
if (!dashboardUrl) {
|
|
176
176
|
return {
|
|
@@ -234,7 +234,7 @@ async function describeName(name, options, lookups) {
|
|
|
234
234
|
},
|
|
235
235
|
lines: [
|
|
236
236
|
`${described.id} [${described.kind.replace("_", " ")}]`,
|
|
237
|
-
...
|
|
237
|
+
..._chunkVUYUI35Qjs.schemaLines.call(void 0, described, {
|
|
238
238
|
full: true,
|
|
239
239
|
secondary: true,
|
|
240
240
|
...fields.length ? { fields } : {}
|
|
@@ -243,17 +243,17 @@ async function describeName(name, options, lookups) {
|
|
|
243
243
|
} : {
|
|
244
244
|
envelope: {
|
|
245
245
|
...summary,
|
|
246
|
-
inputs: inputs.map(
|
|
247
|
-
outputs: outputs.map(
|
|
248
|
-
...described.rowInputs ? { rowInputs: described.rowInputs.map(
|
|
249
|
-
...described.rowOutputs ? { rowOutputs: described.rowOutputs.map(
|
|
250
|
-
runExamples:
|
|
246
|
+
inputs: inputs.map(_chunkVUYUI35Qjs.topLevelField),
|
|
247
|
+
outputs: outputs.map(_chunkVUYUI35Qjs.topLevelField),
|
|
248
|
+
...described.rowInputs ? { rowInputs: described.rowInputs.map(_chunkVUYUI35Qjs.topLevelField) } : {},
|
|
249
|
+
...described.rowOutputs ? { rowOutputs: described.rowOutputs.map(_chunkVUYUI35Qjs.topLevelField) } : {},
|
|
250
|
+
runExamples: _chunkVUYUI35Qjs.examples.call(void 0, described, { verbose }),
|
|
251
251
|
...dashboardUrl ? { dashboardUrl } : {},
|
|
252
252
|
...shadows ? { shadows, note } : {}
|
|
253
253
|
},
|
|
254
254
|
lines: [
|
|
255
255
|
...note ? [`Note: ${note}`, ""] : [],
|
|
256
|
-
...
|
|
256
|
+
..._chunkVUYUI35Qjs.describedLines.call(void 0, described, {
|
|
257
257
|
cli: shown && (!named || options.cliExample === true),
|
|
258
258
|
play: shown && (!named || options.playExample === true),
|
|
259
259
|
explain: named,
|
|
@@ -270,7 +270,7 @@ async function describeName(name, options, lookups) {
|
|
|
270
270
|
// its value stands, so callers of the older commands read what they did.
|
|
271
271
|
{ ...view.envelope, ...record }
|
|
272
272
|
) : {
|
|
273
|
-
...
|
|
273
|
+
..._chunkVUYUI35Qjs.describedJson.call(void 0, described, {
|
|
274
274
|
secondary: verbose || fields.length > 0,
|
|
275
275
|
verbose
|
|
276
276
|
}),
|
|
@@ -2,10 +2,10 @@ import {
|
|
|
2
2
|
getAuthedHttpClient,
|
|
3
3
|
openInBrowser,
|
|
4
4
|
printCommandEnvelope
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-QWJJMQNE.mjs";
|
|
6
6
|
import {
|
|
7
7
|
resolveBaseUrlOnly
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-XSERB7H2.mjs";
|
|
9
9
|
|
|
10
10
|
// src/cli/commands/git.ts
|
|
11
11
|
function shellQuote(value) {
|
|
@@ -454,27 +454,46 @@ function examples(described, options) {
|
|
|
454
454
|
const source = expression(field);
|
|
455
455
|
return source ? [`const ${safeIdentifier(field.name)} = ${source};`] : [];
|
|
456
456
|
});
|
|
457
|
+
const playFunction = (body, returned) => [
|
|
458
|
+
"import deepline from 'deepline';",
|
|
459
|
+
"export default async function () {",
|
|
460
|
+
...[...body, `return { ${returned.join(", ")} };`].map(
|
|
461
|
+
(line) => ` ${line}`
|
|
462
|
+
),
|
|
463
|
+
"}"
|
|
464
|
+
].join("\n");
|
|
465
|
+
const returnedNames = (expression) => read.flatMap(
|
|
466
|
+
(field) => expression(field) ? [safeIdentifier(field.name)] : []
|
|
467
|
+
);
|
|
457
468
|
if (runner.via === "monitor") return { cli: runner.deploy, play: null };
|
|
458
469
|
if (runner.via === "tool") {
|
|
470
|
+
const readNames = returnedNames((field) => field.read);
|
|
459
471
|
return {
|
|
460
472
|
cli: `deepline tools execute ${runner.toolId} --input ${_chunkAID3OYVJjs.shellQuote.call(void 0, input)}`,
|
|
461
|
-
play:
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
473
|
+
play: playFunction(
|
|
474
|
+
[
|
|
475
|
+
"const result = await deepline.tools.execute({",
|
|
476
|
+
" staleAfterSeconds: 0,",
|
|
477
|
+
` id: '${safeIdentifier(runner.toolId)}',`,
|
|
478
|
+
` tool: '${runner.toolId}',`,
|
|
479
|
+
` input: ${input},`,
|
|
480
|
+
` description: ${JSON.stringify(_nullishCoalesce(described.displayName, () => ( runner.toolId)))},`,
|
|
481
|
+
"});",
|
|
482
|
+
...reads((field) => field.read)
|
|
483
|
+
],
|
|
484
|
+
readNames.length ? readNames : ["response: result.toolResponse"]
|
|
485
|
+
)
|
|
470
486
|
};
|
|
471
487
|
}
|
|
472
488
|
return {
|
|
473
489
|
cli: _nullishCoalesce(runner.cli, () => ( `deepline plays run ${runner.reference} --input ${_chunkAID3OYVJjs.shellQuote.call(void 0, input)}`)),
|
|
474
|
-
play:
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
490
|
+
play: playFunction(
|
|
491
|
+
[
|
|
492
|
+
`const output = await deepline.runPlay('${safeIdentifier(runner.reference.replace(/^.*\//, ""))}', '${runner.reference}', ${input});`,
|
|
493
|
+
...reads((field) => `output.${field.name}`)
|
|
494
|
+
],
|
|
495
|
+
read.length ? returnedNames((field) => field.name) : ["output"]
|
|
496
|
+
)
|
|
478
497
|
};
|
|
479
498
|
}
|
|
480
499
|
var EXPLANATIONS = {
|
|
@@ -17,7 +17,7 @@ var _chunkXNYIZMNQjs = require('./chunk-XNYIZMNQ.js');
|
|
|
17
17
|
var _chunkPPDBRJRWjs = require('./chunk-PPDBRJRW.js');
|
|
18
18
|
|
|
19
19
|
|
|
20
|
-
var
|
|
20
|
+
var _chunk2F5ULM2Fjs = require('./chunk-2F5ULM2F.js');
|
|
21
21
|
|
|
22
22
|
// src/config.ts
|
|
23
23
|
|
|
@@ -649,9 +649,9 @@ function resolveCliCommandContext(inputConfig, requestedScope) {
|
|
|
649
649
|
}
|
|
650
650
|
|
|
651
651
|
// src/version.ts
|
|
652
|
-
var SDK_VERSION =
|
|
653
|
-
var SDK_API_MAJOR =
|
|
654
|
-
var SDK_API_CONTRACT = _nullishCoalesce(
|
|
652
|
+
var SDK_VERSION = _chunk2F5ULM2Fjs.SDK_RELEASE.version;
|
|
653
|
+
var SDK_API_MAJOR = _chunk2F5ULM2Fjs.SDK_RELEASE.contracts.api.currentMajor;
|
|
654
|
+
var SDK_API_CONTRACT = _nullishCoalesce(_chunk2F5ULM2Fjs.SDK_RELEASE.contracts.api.legacyWireIds[0], () => ( `api-v${SDK_API_MAJOR}`));
|
|
655
655
|
|
|
656
656
|
// src/agent-runtime.ts
|
|
657
657
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _chunkEWWWOKX2js = require('./chunk-EWWWOKX2.js');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
@@ -25,7 +25,7 @@ var _chunkAYM2KZN3js = require('./chunk-AYM2KZN3.js');
|
|
|
25
25
|
|
|
26
26
|
|
|
27
27
|
|
|
28
|
-
var
|
|
28
|
+
var _chunkW42SSVM7js = require('./chunk-W42SSVM7.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 _chunkW42SSVM7js.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 = _chunkW42SSVM7js.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 `${_chunkW42SSVM7js.hostConfigDirPath.call(void 0, baseUrl)}/pending-auth.json`;
|
|
79
79
|
}
|
|
80
80
|
function legacyPendingClaimTokenPath(baseUrl) {
|
|
81
|
-
return `${
|
|
81
|
+
return `${_chunkW42SSVM7js.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 _chunkW42SSVM7js.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[_chunkW42SSVM7js.HOST_URL_ENV] ? { [_chunkW42SSVM7js.HOST_URL_ENV]: values[_chunkW42SSVM7js.HOST_URL_ENV] } : {},
|
|
188
|
+
...values[_chunkW42SSVM7js.API_KEY_ENV] ? { [_chunkW42SSVM7js.API_KEY_ENV]: values[_chunkW42SSVM7js.API_KEY_ENV] } : {},
|
|
189
|
+
...values[_chunkW42SSVM7js.ACTIVE_ORG_ID_ENV] ? { [_chunkW42SSVM7js.ACTIVE_ORG_ID_ENV]: values[_chunkW42SSVM7js.ACTIVE_ORG_ID_ENV] } : {},
|
|
190
|
+
...Object.prototype.hasOwnProperty.call(values, _chunkW42SSVM7js.ACTIVE_ORG_NAME_ENV) ? { [_chunkW42SSVM7js.ACTIVE_ORG_NAME_ENV]: values[_chunkW42SSVM7js.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, _chunkW42SSVM7js.FEATURES_ENV) ? { [_chunkW42SSVM7js.FEATURES_ENV]: values[_chunkW42SSVM7js.FEATURES_ENV] } : {}
|
|
193
193
|
};
|
|
194
194
|
if (scope === "folder") {
|
|
195
|
-
|
|
195
|
+
_chunkW42SSVM7js.saveProjectDeeplineEnvValues.call(void 0, filtered);
|
|
196
196
|
} else {
|
|
197
|
-
|
|
197
|
+
_chunkW42SSVM7js.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
|
+
[_chunkW42SSVM7js.ACTIVE_ORG_ID_ENV]: orgId,
|
|
206
|
+
[_chunkW42SSVM7js.ACTIVE_ORG_NAME_ENV]: orgName,
|
|
207
|
+
..._chunkW42SSVM7js.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/${_chunkW42SSVM7js.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": _chunkW42SSVM7js.detectAgentRuntime.call(void 0, ),
|
|
217
|
+
"X-Deepline-CLI-Version": _chunkW42SSVM7js.SDK_VERSION,
|
|
218
|
+
"X-Deepline-SDK-Version": _chunkW42SSVM7js.SDK_VERSION,
|
|
219
|
+
"X-Deepline-API-Contract": _chunkW42SSVM7js.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()]);
|
|
@@ -262,7 +262,7 @@ async function readStatusBanner(baseUrl) {
|
|
|
262
262
|
return _optionalChain([response, 'optionalAccess', _11 => _11.status]) === 200 ? _nullishCoalesce(response.data.banner, () => ( null)) : null;
|
|
263
263
|
}
|
|
264
264
|
async function reportSetupCompleted(input) {
|
|
265
|
-
const apiKey = input.authScope === "folder" ?
|
|
265
|
+
const apiKey = input.authScope === "folder" ? _chunkW42SSVM7js.resolveProjectApiKeyForBaseUrl.call(void 0, input.baseUrl) : _chunkW42SSVM7js.resolveGlobalApiKeyForBaseUrl.call(void 0, input.baseUrl);
|
|
266
266
|
if (!apiKey) return;
|
|
267
267
|
try {
|
|
268
268
|
await httpJson(
|
|
@@ -359,7 +359,7 @@ async function printClaimSuccessBanner(baseUrl, apiKey, statusData) {
|
|
|
359
359
|
}
|
|
360
360
|
}
|
|
361
361
|
async function handleRegister(args) {
|
|
362
|
-
const baseUrl =
|
|
362
|
+
const baseUrl = _chunkW42SSVM7js.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, "");
|
|
363
363
|
let orgName = "";
|
|
364
364
|
let orgId = "";
|
|
365
365
|
let agentName = "";
|
|
@@ -414,19 +414,19 @@ async function handleRegister(args) {
|
|
|
414
414
|
});
|
|
415
415
|
saveEnvValues(
|
|
416
416
|
{
|
|
417
|
-
[
|
|
417
|
+
[_chunkW42SSVM7js.HOST_URL_ENV]: baseUrl
|
|
418
418
|
},
|
|
419
419
|
baseUrl,
|
|
420
420
|
authScope
|
|
421
421
|
);
|
|
422
422
|
}
|
|
423
423
|
if (claimUrl) {
|
|
424
|
-
const shouldOpen = waitMode !== "no" &&
|
|
424
|
+
const shouldOpen = waitMode !== "no" && _chunkW42SSVM7js.detectAgentRuntime.call(void 0, ) !== "claude_cowork";
|
|
425
425
|
console.log(
|
|
426
426
|
shouldOpen ? " Opening approval page in your browser." : " Open this approval page in your browser:"
|
|
427
427
|
);
|
|
428
428
|
console.log(` ${claimUrl}`);
|
|
429
|
-
if (shouldOpen)
|
|
429
|
+
if (shouldOpen) _chunkEWWWOKX2js.openInBrowser.call(void 0, claimUrl);
|
|
430
430
|
}
|
|
431
431
|
if (data.cli_message) {
|
|
432
432
|
console.log(String(data.cli_message));
|
|
@@ -469,8 +469,8 @@ async function handleRegister(args) {
|
|
|
469
469
|
if (apiKey) {
|
|
470
470
|
saveEnvValues(
|
|
471
471
|
{
|
|
472
|
-
[
|
|
473
|
-
[
|
|
472
|
+
[_chunkW42SSVM7js.HOST_URL_ENV]: baseUrl,
|
|
473
|
+
[_chunkW42SSVM7js.API_KEY_ENV]: apiKey,
|
|
474
474
|
...activeOrgEnvValues(statusData)
|
|
475
475
|
},
|
|
476
476
|
baseUrl,
|
|
@@ -492,7 +492,7 @@ async function handleRegister(args) {
|
|
|
492
492
|
}
|
|
493
493
|
}
|
|
494
494
|
async function handleWait(args) {
|
|
495
|
-
const baseUrl =
|
|
495
|
+
const baseUrl = _chunkW42SSVM7js.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, "");
|
|
496
496
|
let timeoutSeconds = 300;
|
|
497
497
|
let requestedScope;
|
|
498
498
|
if (args.includes("--auth-scope")) {
|
|
@@ -516,7 +516,7 @@ async function handleWait(args) {
|
|
|
516
516
|
const authScope = resumed.scope;
|
|
517
517
|
const claimToken = _nullishCoalesce(_optionalChain([pendingClaim, 'optionalAccess', _12 => _12.claimToken]), () => ( ""));
|
|
518
518
|
if (!pendingClaim) {
|
|
519
|
-
const scopedApiKey = authScope === "folder" ?
|
|
519
|
+
const scopedApiKey = authScope === "folder" ? _chunkW42SSVM7js.resolveProjectApiKeyForBaseUrl.call(void 0, baseUrl) : _chunkW42SSVM7js.resolveGlobalApiKeyForBaseUrl.call(void 0, baseUrl);
|
|
520
520
|
if (scopedApiKey) {
|
|
521
521
|
console.log("Already connected.");
|
|
522
522
|
return EXIT_OK;
|
|
@@ -559,8 +559,8 @@ async function handleWait(args) {
|
|
|
559
559
|
if (apiKey) {
|
|
560
560
|
saveEnvValues(
|
|
561
561
|
{
|
|
562
|
-
[
|
|
563
|
-
[
|
|
562
|
+
[_chunkW42SSVM7js.HOST_URL_ENV]: baseUrl,
|
|
563
|
+
[_chunkW42SSVM7js.API_KEY_ENV]: apiKey,
|
|
564
564
|
...activeOrgEnvValues(data)
|
|
565
565
|
},
|
|
566
566
|
baseUrl,
|
|
@@ -584,8 +584,8 @@ async function handleWait(args) {
|
|
|
584
584
|
return EXIT_AUTH;
|
|
585
585
|
}
|
|
586
586
|
async function authStatusLine(timeoutMs = 3e3) {
|
|
587
|
-
const baseUrl =
|
|
588
|
-
const apiKey =
|
|
587
|
+
const baseUrl = _chunkW42SSVM7js.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, "");
|
|
588
|
+
const apiKey = _chunkW42SSVM7js.resolveApiKeyForBaseUrl.call(void 0, baseUrl);
|
|
589
589
|
if (!apiKey) return `Auth: not connected (${baseUrl})`;
|
|
590
590
|
try {
|
|
591
591
|
const { status, data } = await httpJson(
|
|
@@ -608,9 +608,9 @@ async function authStatusLine(timeoutMs = 3e3) {
|
|
|
608
608
|
}
|
|
609
609
|
}
|
|
610
610
|
async function handleStatus(args) {
|
|
611
|
-
const baseUrl =
|
|
611
|
+
const baseUrl = _chunkW42SSVM7js.autoDetectBaseUrl.call(void 0, ).replace(/\/$/, "");
|
|
612
612
|
const reveal = args.includes("--reveal");
|
|
613
|
-
const jsonOutput =
|
|
613
|
+
const jsonOutput = _chunkEWWWOKX2js.argsWantJson.call(void 0, args);
|
|
614
614
|
const hasExplicitAuthScope = args.includes("--auth-scope");
|
|
615
615
|
let authScope = null;
|
|
616
616
|
if (hasExplicitAuthScope) {
|
|
@@ -651,14 +651,14 @@ async function handleStatus(args) {
|
|
|
651
651
|
};
|
|
652
652
|
hostLines.push(`Host: ${baseUrl} (unreachable)`);
|
|
653
653
|
}
|
|
654
|
-
const apiKey = authScope === "folder" ?
|
|
654
|
+
const apiKey = authScope === "folder" ? _chunkW42SSVM7js.resolveProjectApiKeyForBaseUrl.call(void 0, baseUrl) : authScope === "global" ? _chunkW42SSVM7js.resolveGlobalApiKeyForBaseUrl.call(void 0, baseUrl) : _chunkW42SSVM7js.resolveApiKeyForBaseUrl.call(void 0, baseUrl);
|
|
655
655
|
if (!apiKey) {
|
|
656
656
|
const { claim: pendingClaim } = resolvePendingAuthClaimForResume(
|
|
657
657
|
baseUrl,
|
|
658
658
|
_nullishCoalesce(authScope, () => ( void 0))
|
|
659
659
|
);
|
|
660
660
|
if (pendingClaim) {
|
|
661
|
-
|
|
661
|
+
_chunkEWWWOKX2js.printCommandEnvelope.call(void 0,
|
|
662
662
|
{
|
|
663
663
|
..._nullishCoalesce(hostStatusPayload, () => ( { host: baseUrl })),
|
|
664
664
|
status: "pending",
|
|
@@ -679,7 +679,7 @@ async function handleStatus(args) {
|
|
|
679
679
|
);
|
|
680
680
|
return EXIT_OK;
|
|
681
681
|
}
|
|
682
|
-
|
|
682
|
+
_chunkEWWWOKX2js.printCommandEnvelope.call(void 0,
|
|
683
683
|
{
|
|
684
684
|
..._nullishCoalesce(hostStatusPayload, () => ( { host: baseUrl })),
|
|
685
685
|
status: "not connected",
|
|
@@ -712,7 +712,7 @@ async function handleStatus(args) {
|
|
|
712
712
|
}
|
|
713
713
|
);
|
|
714
714
|
if (status === 401 || status === 403) {
|
|
715
|
-
|
|
715
|
+
_chunkEWWWOKX2js.printCommandEnvelope.call(void 0,
|
|
716
716
|
{
|
|
717
717
|
..._nullishCoalesce(hostStatusPayload, () => ( { host: baseUrl })),
|
|
718
718
|
status: "unauthorized",
|
|
@@ -739,7 +739,7 @@ async function handleStatus(args) {
|
|
|
739
739
|
console.error(`Auth status error (status ${status}).`);
|
|
740
740
|
return EXIT_SERVER;
|
|
741
741
|
}
|
|
742
|
-
const resolvedAuthScope = _nullishCoalesce(authScope, () => ( (
|
|
742
|
+
const resolvedAuthScope = _nullishCoalesce(authScope, () => ( (_chunkW42SSVM7js.getResolvedProjectAuthSource.call(void 0, baseUrl, apiKey) ? "folder" : "global")));
|
|
743
743
|
clearSatisfiedPendingClaim(
|
|
744
744
|
baseUrl,
|
|
745
745
|
resolvedAuthScope,
|
|
@@ -767,28 +767,28 @@ async function handleStatus(args) {
|
|
|
767
767
|
if (apiKeyResp) {
|
|
768
768
|
saveEnvValues(
|
|
769
769
|
{
|
|
770
|
-
[
|
|
771
|
-
[
|
|
770
|
+
[_chunkW42SSVM7js.HOST_URL_ENV]: baseUrl,
|
|
771
|
+
[_chunkW42SSVM7js.API_KEY_ENV]: apiKeyResp,
|
|
772
772
|
...activeOrgEnvValues(data)
|
|
773
773
|
},
|
|
774
774
|
baseUrl,
|
|
775
775
|
resolvedAuthScope
|
|
776
776
|
);
|
|
777
777
|
if (resolvedAuthScope === "folder") {
|
|
778
|
-
const target =
|
|
778
|
+
const target = _chunkW42SSVM7js.resolveProjectPinTarget.call(void 0, );
|
|
779
779
|
savedApiKeyPath = target.ok ? _path.join.call(void 0, target.dir, ".env.deepline") : null;
|
|
780
780
|
} else {
|
|
781
781
|
savedApiKeyPath = envFilePath(baseUrl);
|
|
782
782
|
}
|
|
783
783
|
}
|
|
784
|
-
} else if (resolvedAuthScope === "folder" ||
|
|
785
|
-
saveEnvValues(
|
|
784
|
+
} else if (resolvedAuthScope === "folder" || _chunkW42SSVM7js.storedHostApiKey.call(void 0, baseUrl) === apiKey) {
|
|
785
|
+
saveEnvValues(_chunkW42SSVM7js.featureEnvValues.call(void 0, data), baseUrl, resolvedAuthScope);
|
|
786
786
|
}
|
|
787
|
-
|
|
787
|
+
_chunkEWWWOKX2js.printCommandEnvelope.call(void 0,
|
|
788
788
|
{
|
|
789
789
|
...payload,
|
|
790
|
-
...
|
|
791
|
-
command_context:
|
|
790
|
+
..._chunkW42SSVM7js.detectAgentRuntime.call(void 0, ) !== "unknown" ? {
|
|
791
|
+
command_context: _chunkW42SSVM7js.resolveCliCommandContext.call(void 0,
|
|
792
792
|
{ baseUrl, apiKey },
|
|
793
793
|
resolvedAuthScope
|
|
794
794
|
)
|