deepline 0.3.311 → 0.3.312

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.
Files changed (113) hide show
  1. package/dist/bundling-sources/sdk/src/play.ts +7 -1
  2. package/dist/bundling-sources/sdk/src/release.ts +1 -1
  3. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres.ts +100 -25
  4. package/dist/bundling-sources/shared_libs/plays/authoring-contract.ts +23 -1
  5. package/dist/bundling-sources/shared_libs/plays/core.ts +7 -1
  6. package/dist/bundling-sources/shared_libs/plays/settings-contract.ts +29 -3
  7. package/dist/cli/{auth-2A7OYHFJ.mjs → auth-ACDTPM3M.mjs} +4 -4
  8. package/dist/cli/auth-TFDGA24W.js +31 -0
  9. package/dist/cli/{billing-P7GIAP3U.mjs → billing-FVBBJ77L.mjs} +5 -5
  10. package/dist/cli/{billing-2PQ4VDRR.js → billing-YTJFHEGU.js} +71 -71
  11. package/dist/cli/{chunk-5IBHISKA.js → chunk-6KKETQSI.js} +6 -6
  12. package/dist/cli/{chunk-XDUQQTIS.js → chunk-6LLJWMYH.js} +6 -6
  13. package/dist/cli/{chunk-HOCPOTDX.mjs → chunk-6OGNRAS7.mjs} +2 -2
  14. package/dist/cli/chunk-76VKBPOC.mjs +406 -0
  15. package/dist/cli/{chunk-7TT4LZIR.js → chunk-7SW43OAX.js} +60 -60
  16. package/dist/cli/{chunk-SGTSJCOA.mjs → chunk-AA66YTS7.mjs} +1 -1
  17. package/dist/cli/{chunk-QO3GH6UP.js → chunk-BRJOVSTH.js} +2 -2
  18. package/dist/cli/{chunk-4WFNAWVO.mjs → chunk-EHVJ7XXD.mjs} +2 -2
  19. package/dist/cli/{chunk-G3QP2WYR.mjs → chunk-ENSDO4SG.mjs} +4 -4
  20. package/dist/cli/{chunk-VODJJUKE.js → chunk-FQVTHBEH.js} +15 -15
  21. package/dist/cli/{chunk-DUEHAEPM.mjs → chunk-GTEDCRKC.mjs} +1 -1
  22. package/dist/cli/{play-SOG5Q2GE.mjs → chunk-I25C4KL7.mjs} +166 -90
  23. package/dist/cli/{chunk-W7INSYJS.js → chunk-IALPYID6.js} +3 -3
  24. package/dist/cli/{chunk-ICZB4GTY.mjs → chunk-MK4K5MQU.mjs} +23 -3
  25. package/dist/cli/{chunk-WB6Z2Q44.mjs → chunk-N5V2SBB2.mjs} +19 -1
  26. package/dist/cli/{chunk-TBX7AA7Y.mjs → chunk-NJNYWVEF.mjs} +2 -2
  27. package/dist/cli/{chunk-QJA6SJHA.mjs → chunk-NMZPK7LM.mjs} +1 -1
  28. package/dist/cli/{chunk-5OVNL6LS.mjs → chunk-NWFE4PGX.mjs} +1 -1
  29. package/dist/cli/{chunk-ZDO3TO3M.js → chunk-OJ243ZA5.js} +19 -1
  30. package/dist/cli/{tools-G4HGCHNQ.mjs → chunk-OV6IFAXH.mjs} +180 -36
  31. package/dist/cli/{play-BCMGFYTF.js → chunk-QFSLMI42.js} +342 -266
  32. package/dist/cli/{chunk-LRI2FQF2.js → chunk-T4IJQKRE.js} +26 -26
  33. package/dist/cli/{chunk-RNJ74JDH.js → chunk-TID5XLTZ.js} +4 -4
  34. package/dist/cli/{chunk-QYL5ZV4U.js → chunk-ULI6UVV6.js} +6 -6
  35. package/dist/cli/{chunk-4NIQA6S7.mjs → chunk-US4S3E4Y.mjs} +1 -1
  36. package/dist/cli/{tools-WN7T25LW.js → chunk-V7N6BJQD.js} +231 -87
  37. package/dist/cli/{chunk-IB7OGQGH.js → chunk-VJDKV5RU.js} +29 -9
  38. package/dist/cli/{chunk-Q3LYQTSO.mjs → chunk-WPTUKXIF.mjs} +1 -1
  39. package/dist/cli/chunk-XNL3SEMC.js +406 -0
  40. package/dist/cli/{chunk-GCX3343L.js → chunk-YYU3PYVK.js} +48 -48
  41. package/dist/cli/{chunk-SPUTBCUR.mjs → chunk-ZH7KTVAB.mjs} +1 -1
  42. package/dist/cli/{chunk-FYPZ43Y4.js → chunk-ZQJDRSR5.js} +1 -1
  43. package/dist/cli/{client-PNLDT2M3.mjs → client-ENGOMTTU.mjs} +3 -3
  44. package/dist/cli/client-T6YGH6TT.js +20 -0
  45. package/dist/cli/{csv-L5DN7F45.js → csv-6WOJC6NZ.js} +12 -12
  46. package/dist/cli/{csv-KUAATBZQ.mjs → csv-ENKTPYAJ.mjs} +3 -3
  47. package/dist/cli/{db-6NIH4KTZ.js → db-BAEVP4QK.js} +20 -20
  48. package/dist/cli/{db-WZOD6NP5.mjs → db-DSCJZYJU.mjs} +4 -4
  49. package/dist/cli/describe-PAUHJF7H.mjs +236 -0
  50. package/dist/cli/describe-X2AFAC4B.js +236 -0
  51. package/dist/cli/{executions-TQ5WRHDS.js → executions-LXS6NLCV.js} +6 -6
  52. package/dist/cli/{executions-RDDXGT2Y.mjs → executions-R6JOR67D.mjs} +4 -4
  53. package/dist/cli/{feedback-ZB4WKBSS.mjs → feedback-CYRVNCGT.mjs} +3 -3
  54. package/dist/cli/{feedback-NYKLEQB6.js → feedback-HXP2D7K6.js} +6 -6
  55. package/dist/cli/git-JOE2RM3Q.js +23 -0
  56. package/dist/cli/{git-E6DKAX3X.mjs → git-XBYBZB4R.mjs} +4 -4
  57. package/dist/cli/index.js +82 -78
  58. package/dist/cli/index.mjs +45 -41
  59. package/dist/cli/{legacy-noops-26Y5NSU6.js → legacy-noops-AUNAFEZP.js} +7 -7
  60. package/dist/cli/{legacy-noops-25B7JCOZ.mjs → legacy-noops-OQP6VZKE.mjs} +4 -4
  61. package/dist/cli/{monitors-WRTHO7DT.mjs → monitors-L2HAAPAL.mjs} +7 -7
  62. package/dist/cli/{monitors-L3GFT4MG.js → monitors-QSIZG3CJ.js} +88 -88
  63. package/dist/cli/{org-BNCTGPWF.js → org-JUHQGBQE.js} +60 -60
  64. package/dist/cli/{org-ZTHOFVEO.mjs → org-UCSN5XRC.mjs} +4 -4
  65. package/dist/cli/play-2SNMTZGK.js +152 -0
  66. package/dist/cli/play-5AT2RB3M.mjs +152 -0
  67. package/dist/cli/{providers-MLOKTD6O.js → providers-CVG4L3VR.js} +7 -7
  68. package/dist/cli/{providers-SLAPPVMU.mjs → providers-GVPAPZ4L.mjs} +4 -4
  69. package/dist/cli/{quickstart-IWJLGET3.js → quickstart-7OIFIQG3.js} +5 -5
  70. package/dist/cli/{quickstart-LZRKZLNQ.mjs → quickstart-Y6ZU27LE.mjs} +3 -3
  71. package/dist/cli/{search-RCDGSNWW.mjs → search-4I2Y2NKK.mjs} +13 -5
  72. package/dist/cli/search-DS36UHOX.js +26 -0
  73. package/dist/cli/{secrets-GDPYV6OC.mjs → secrets-3Z4IUEBA.mjs} +4 -4
  74. package/dist/cli/{secrets-24KEMSCU.js → secrets-O2UFLU52.js} +13 -13
  75. package/dist/cli/{sessions-ST5XQQZN.mjs → sessions-OMAXRY5I.mjs} +4 -4
  76. package/dist/cli/{sessions-QOUUGVP3.js → sessions-T6MWWQRH.js} +5 -5
  77. package/dist/cli/{settings-V6Z775TO.mjs → settings-C47WXZY5.mjs} +7 -7
  78. package/dist/cli/{settings-4XWDMAA2.js → settings-R4LO5NMY.js} +74 -74
  79. package/dist/cli/{setup-W7SPZTUL.js → setup-FIUTV4DD.js} +41 -41
  80. package/dist/cli/{setup-QPZLP25U.mjs → setup-JPJVTIQ6.mjs} +6 -6
  81. package/dist/cli/{skills-QG22R2EI.mjs → skills-6WVTMKP5.mjs} +4 -4
  82. package/dist/cli/skills-GLPKPF7R.js +28 -0
  83. package/dist/cli/tools-L3YLQ7BR.js +38 -0
  84. package/dist/cli/tools-TKS77TNU.mjs +38 -0
  85. package/dist/cli/{update-5PSYBGVU.mjs → update-GD754XMA.mjs} +6 -6
  86. package/dist/cli/update-HXI35NME.js +28 -0
  87. package/dist/cli/{workflow-ZEQ46MGG.js → workflow-OCUQCNXA.js} +16 -16
  88. package/dist/cli/{workflow-EK7DV4AQ.mjs → workflow-YKQSPXQZ.mjs} +6 -6
  89. package/dist/{client-DpnkGBn-.d.mts → client-CtVdLZux.d.mts} +21 -4
  90. package/dist/{client-ypdBvf1o.d.ts → client-OBwghxPC.d.ts} +21 -4
  91. package/dist/{compiler-manifest-qtTNYvBl.d.ts → compiler-manifest-wOKNiXpa.d.mts} +21 -0
  92. package/dist/{compiler-manifest-qtTNYvBl.d.mts → compiler-manifest-wOKNiXpa.d.ts} +21 -0
  93. package/dist/index.d.mts +4 -4
  94. package/dist/index.d.ts +4 -4
  95. package/dist/index.js +13 -10
  96. package/dist/index.mjs +16 -13
  97. package/dist/install-integrity.json +84 -76
  98. package/dist/plays/bundle-play-file.d.mts +2 -2
  99. package/dist/plays/bundle-play-file.d.ts +2 -2
  100. package/dist/plays/bundle-play-file.mjs +2 -2
  101. package/dist/plays/run-request.d.mts +2 -2
  102. package/dist/plays/run-request.d.ts +2 -2
  103. package/dist/release.d.mts +1 -1
  104. package/dist/release.d.ts +1 -1
  105. package/dist/release.js +2 -2
  106. package/dist/release.mjs +1 -1
  107. package/package.json +1 -1
  108. package/dist/cli/auth-66JFXP6C.js +0 -31
  109. package/dist/cli/client-ADWRS22F.js +0 -20
  110. package/dist/cli/git-E56KOYJR.js +0 -23
  111. package/dist/cli/search-6FBDSA3K.js +0 -18
  112. package/dist/cli/skills-WKOQBJY7.js +0 -28
  113. package/dist/cli/update-WKVCWGYY.js +0 -28
@@ -0,0 +1,236 @@
1
+ import {
2
+ describedTool,
3
+ publicToolSchemas,
4
+ toolMetadataJsonForDescribe
5
+ } from "./chunk-OV6IFAXH.mjs";
6
+ import {
7
+ describedPlay
8
+ } from "./chunk-I25C4KL7.mjs";
9
+ import {
10
+ SCHEMA_LINE_LIMIT,
11
+ addDescribeOptions,
12
+ describedLines,
13
+ examples,
14
+ schemaLines,
15
+ topLevelField
16
+ } from "./chunk-76VKBPOC.mjs";
17
+ import "./chunk-EDWJY6T4.mjs";
18
+ import "./chunk-MK4K5MQU.mjs";
19
+ import "./chunk-EHVJ7XXD.mjs";
20
+ import "./chunk-MIMASXO4.mjs";
21
+ import "./chunk-OWJZUE3Y.mjs";
22
+ import {
23
+ DeeplineClient
24
+ } from "./chunk-NWFE4PGX.mjs";
25
+ import "./chunk-CBVIJSHF.mjs";
26
+ import "./chunk-WXLOW623.mjs";
27
+ import "./chunk-UFS752TU.mjs";
28
+ import "./chunk-GAMFK2ZP.mjs";
29
+ import {
30
+ printCommandEnvelope
31
+ } from "./chunk-ZH7KTVAB.mjs";
32
+ import "./chunk-WPTUKXIF.mjs";
33
+ import "./chunk-DLIRSHV6.mjs";
34
+ import "./chunk-AA66YTS7.mjs";
35
+ import "./chunk-US4S3E4Y.mjs";
36
+ import "./chunk-H7HIDGZ7.mjs";
37
+ import "./chunk-N5V2SBB2.mjs";
38
+ import "./chunk-6IKARAYD.mjs";
39
+ import {
40
+ DeeplineError
41
+ } from "./chunk-NXGCO4JB.mjs";
42
+ import "./chunk-WZYKRD7T.mjs";
43
+ import "./chunk-KRD6H754.mjs";
44
+
45
+ // src/cli/commands/describe.ts
46
+ import { writeFileSync } from "fs";
47
+ import { resolve } from "path";
48
+ var FILTER_OF = {
49
+ tool: "tools",
50
+ monitor_type: "monitors",
51
+ prebuilt_play: "prebuilts",
52
+ custom_play: "custom"
53
+ };
54
+ async function found(lookup) {
55
+ try {
56
+ return await lookup;
57
+ } catch (error) {
58
+ if (error instanceof DeeplineError && (error.statusCode === 404 || error.code === "PLAY_NOT_FOUND" || error.code === "NOT_FOUND")) {
59
+ return null;
60
+ }
61
+ throw error;
62
+ }
63
+ }
64
+ async function describeAnything(name, options, onMissing) {
65
+ const maintainedOnly = options.prebuilt === true || options.tool === true;
66
+ const wants = (filter) => (!options.kinds || options.kinds.includes(filter)) && !(maintainedOnly && filter === "custom");
67
+ const client = new DeeplineClient();
68
+ const play = async (reference) => {
69
+ const record2 = await client.describePlay(reference);
70
+ return {
71
+ described: describedPlay(record2),
72
+ record: { ...record2 },
73
+ schemas: {
74
+ inputSchema: record2.inputSchema ?? null,
75
+ outputSchema: record2.outputSchema ?? null
76
+ }
77
+ };
78
+ };
79
+ const tool = async () => {
80
+ const record2 = options.fetchedTool ?? await client.getTool(name);
81
+ return {
82
+ described: describedTool(record2, name),
83
+ record: toolMetadataJsonForDescribe(record2, name),
84
+ schemas: publicToolSchemas(record2)
85
+ };
86
+ };
87
+ const sources = name.includes("/") ? [{ kinds: ["prebuilts", "custom"], find: () => play(name) }] : [
88
+ { kinds: ["custom"], find: () => play(name) },
89
+ { kinds: ["tools", "monitors"], find: tool },
90
+ { kinds: ["prebuilts"], find: () => play(`prebuilt/${name}`) }
91
+ ];
92
+ const matches = await Promise.all(
93
+ sources.filter((source) => source.kinds.some(wants)).map(async ({ kinds, find }) => {
94
+ const match = await found(find());
95
+ const filter = match && FILTER_OF[match.described.kind];
96
+ return filter && kinds.includes(filter) && wants(filter) ? match : null;
97
+ })
98
+ );
99
+ const [chosen, shadowed] = matches.filter((match) => match !== null);
100
+ if (!chosen) {
101
+ if (onMissing) return onMissing();
102
+ console.error(
103
+ `Nothing named "${name}". Search for it: deepline search ${JSON.stringify(name.replace(/[-_./]+/g, " "))}`
104
+ );
105
+ return 2;
106
+ }
107
+ const { described, record } = chosen;
108
+ const shadows = described.kind === "custom_play" && shadowed ? {
109
+ kind: shadowed.described.kind,
110
+ describeCommand: `deepline describe ${name} --prebuilt`
111
+ } : null;
112
+ 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;
113
+ const verbose = options.verbose === true;
114
+ const json = options.json === true;
115
+ const named = options.cliExample === true || options.playExample === true;
116
+ const shown = options.example !== false;
117
+ const {
118
+ runner: _runner,
119
+ inputs,
120
+ outputs,
121
+ rowInputs: _rowInputs,
122
+ rowOutputs: _rowOutputs,
123
+ ...summary
124
+ } = described;
125
+ const view = options.schemaOnly ? {
126
+ envelope: {
127
+ kind: described.kind,
128
+ id: described.id,
129
+ ...chosen.schemas
130
+ },
131
+ lines: [
132
+ `${described.id} [${described.kind.replace("_", " ")}]`,
133
+ ...schemaLines(described, { full: true })
134
+ ]
135
+ } : {
136
+ envelope: {
137
+ ...summary,
138
+ inputs: inputs.map(topLevelField),
139
+ outputs: outputs.map(topLevelField),
140
+ ...described.rowInputs ? { rowInputs: described.rowInputs.map(topLevelField) } : {},
141
+ ...described.rowOutputs ? { rowOutputs: described.rowOutputs.map(topLevelField) } : {},
142
+ runExamples: examples(described, { verbose }),
143
+ ...shadows ? { shadows, note } : {}
144
+ },
145
+ lines: [
146
+ ...note ? [`Note: ${note}`, ""] : [],
147
+ ...describedLines(described, {
148
+ cli: shown && (!named || options.cliExample === true),
149
+ play: shown && (!named || options.playExample === true),
150
+ explain: named,
151
+ verbose,
152
+ fullSchema: options.fullSchema === true
153
+ })
154
+ ]
155
+ };
156
+ const envelope = options.schemaOnly ? view.envelope : (
157
+ // The shared keys lead; where the kind's own record has the same key,
158
+ // its value stands, so callers of the older commands read what they did.
159
+ { ...view.envelope, ...record }
160
+ );
161
+ const text = `${view.lines.join("\n")}
162
+ `;
163
+ if (options.out) {
164
+ const path = resolve(options.out);
165
+ const content = json ? `${JSON.stringify(envelope, null, 2)}
166
+ ` : text;
167
+ writeFileSync(path, content);
168
+ const bytes = Buffer.byteLength(content);
169
+ printCommandEnvelope(
170
+ { path, bytes },
171
+ { json, text: `Wrote ${path} (${bytes} bytes)
172
+ ` }
173
+ );
174
+ return 0;
175
+ }
176
+ printCommandEnvelope(envelope, { json, text });
177
+ return 0;
178
+ }
179
+ function registerDescribeCommand(program) {
180
+ addDescribeOptions(program.command("describe <name>")).description(
181
+ "Describe anything search returns: a tool, monitor type, or play."
182
+ ).addHelpText(
183
+ "after",
184
+ `
185
+ What you can describe:
186
+ Any id deepline search returns: a tool id, a monitor type id, or a play name
187
+ or reference. You do not say which kind it is; tool ids, monitor type ids
188
+ and prebuilt play names never overlap.
189
+
190
+ When a name is taken twice:
191
+ A play your workspace created is shown instead of a Deepline tool, monitor
192
+ type or prebuilt play with the same name, and the output says so.
193
+ Pass --prebuilt (or --tool) to see the Deepline one.
194
+
195
+ What it prints:
196
+ The same sections for every kind: what it is, cost, inputs, outputs, then
197
+ an example of running it from the CLI and from inside a play.
198
+
199
+ Examples in the output:
200
+ (default) required inputs filled in, first output read
201
+ --verbose every input filled in, every output read
202
+ --cli-example only the CLI example, with how inputs and outputs work
203
+ --play-example only the in-play example, with how inputs and outputs work
204
+ --no-example no examples
205
+
206
+ Schema size and format:
207
+ A schema over ${SCHEMA_LINE_LIMIT} lines is folded: deeper objects show only their field
208
+ names. A shape used more than once is printed once under Types.
209
+ --full-schema the normal output, with the schema not folded
210
+ --schema-only only the schema, not folded, and nothing else
211
+ --json everything as JSON; the schema is never folded in JSON
212
+ --schema-only --json
213
+ only the input and output JSON Schemas; use this for a
214
+ program, or for a schema too large to read
215
+ --out <path> save any of the above to a file instead of printing it
216
+
217
+ Older commands:
218
+ deepline tools describe and deepline plays describe are this command limited
219
+ to one kind. Their own flags still work: --pricing-only, --examples-only,
220
+ --model and --estimate-payload on tools; --json <fields> on plays.
221
+
222
+ Examples:
223
+ deepline describe hunter_email_verifier
224
+ deepline describe person-linkedin-to-email --json
225
+ deepline describe my-play --prebuilt
226
+ deepline describe ai_ark_people_search --full-schema
227
+ deepline describe ai_ark_people_search --schema-only --json --out schema.json
228
+ `
229
+ ).action(async (name, options) => {
230
+ process.exitCode = await describeAnything(name, options);
231
+ });
232
+ }
233
+ export {
234
+ describeAnything,
235
+ registerDescribeCommand
236
+ };
@@ -0,0 +1,236 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } async function _asyncNullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return await rhsFn(); } }
2
+
3
+
4
+
5
+ var _chunkV7N6BJQDjs = require('./chunk-V7N6BJQD.js');
6
+
7
+
8
+ var _chunkQFSLMI42js = require('./chunk-QFSLMI42.js');
9
+
10
+
11
+
12
+
13
+
14
+
15
+
16
+ var _chunkXNL3SEMCjs = require('./chunk-XNL3SEMC.js');
17
+ require('./chunk-5JLQPVNX.js');
18
+ require('./chunk-VJDKV5RU.js');
19
+ require('./chunk-T4IJQKRE.js');
20
+ require('./chunk-NXDRDJ4K.js');
21
+ require('./chunk-SDK3ZA2C.js');
22
+
23
+
24
+ var _chunkULI6UVV6js = require('./chunk-ULI6UVV6.js');
25
+ require('./chunk-LA46MMTL.js');
26
+ require('./chunk-QJBJZVG6.js');
27
+ require('./chunk-AYHLUHE5.js');
28
+ require('./chunk-WJYPBHTE.js');
29
+
30
+
31
+ var _chunk6LLJWMYHjs = require('./chunk-6LLJWMYH.js');
32
+ require('./chunk-TID5XLTZ.js');
33
+ require('./chunk-XNYIZMNQ.js');
34
+ require('./chunk-ZQJDRSR5.js');
35
+ require('./chunk-IALPYID6.js');
36
+ require('./chunk-3KC45UVF.js');
37
+ require('./chunk-OJ243ZA5.js');
38
+ require('./chunk-S6R3OX7B.js');
39
+
40
+
41
+ var _chunk7P5AA3SNjs = require('./chunk-7P5AA3SN.js');
42
+ require('./chunk-OG64RBAC.js');
43
+ require('./chunk-COGTRVWW.js');
44
+
45
+ // src/cli/commands/describe.ts
46
+ var _fs = require('fs');
47
+ var _path = require('path');
48
+ var FILTER_OF = {
49
+ tool: "tools",
50
+ monitor_type: "monitors",
51
+ prebuilt_play: "prebuilts",
52
+ custom_play: "custom"
53
+ };
54
+ async function found(lookup) {
55
+ try {
56
+ return await lookup;
57
+ } catch (error) {
58
+ if (error instanceof _chunk7P5AA3SNjs.DeeplineError && (error.statusCode === 404 || error.code === "PLAY_NOT_FOUND" || error.code === "NOT_FOUND")) {
59
+ return null;
60
+ }
61
+ throw error;
62
+ }
63
+ }
64
+ async function describeAnything(name, options, onMissing) {
65
+ const maintainedOnly = options.prebuilt === true || options.tool === true;
66
+ const wants = (filter) => (!options.kinds || options.kinds.includes(filter)) && !(maintainedOnly && filter === "custom");
67
+ const client = new (0, _chunkULI6UVV6js.DeeplineClient)();
68
+ const play = async (reference) => {
69
+ const record2 = await client.describePlay(reference);
70
+ return {
71
+ described: _chunkQFSLMI42js.describedPlay.call(void 0, record2),
72
+ record: { ...record2 },
73
+ schemas: {
74
+ inputSchema: _nullishCoalesce(record2.inputSchema, () => ( null)),
75
+ outputSchema: _nullishCoalesce(record2.outputSchema, () => ( null))
76
+ }
77
+ };
78
+ };
79
+ const tool = async () => {
80
+ const record2 = await _asyncNullishCoalesce(options.fetchedTool, async () => ( await client.getTool(name)));
81
+ return {
82
+ described: _chunkV7N6BJQDjs.describedTool.call(void 0, record2, name),
83
+ record: _chunkV7N6BJQDjs.toolMetadataJsonForDescribe.call(void 0, record2, name),
84
+ schemas: _chunkV7N6BJQDjs.publicToolSchemas.call(void 0, record2)
85
+ };
86
+ };
87
+ const sources = name.includes("/") ? [{ kinds: ["prebuilts", "custom"], find: () => play(name) }] : [
88
+ { kinds: ["custom"], find: () => play(name) },
89
+ { kinds: ["tools", "monitors"], find: tool },
90
+ { kinds: ["prebuilts"], find: () => play(`prebuilt/${name}`) }
91
+ ];
92
+ const matches = await Promise.all(
93
+ sources.filter((source) => source.kinds.some(wants)).map(async ({ kinds, find }) => {
94
+ const match = await found(find());
95
+ const filter = match && FILTER_OF[match.described.kind];
96
+ return filter && kinds.includes(filter) && wants(filter) ? match : null;
97
+ })
98
+ );
99
+ const [chosen, shadowed] = matches.filter((match) => match !== null);
100
+ if (!chosen) {
101
+ if (onMissing) return onMissing();
102
+ console.error(
103
+ `Nothing named "${name}". Search for it: deepline search ${JSON.stringify(name.replace(/[-_./]+/g, " "))}`
104
+ );
105
+ return 2;
106
+ }
107
+ const { described, record } = chosen;
108
+ const shadows = described.kind === "custom_play" && shadowed ? {
109
+ kind: shadowed.described.kind,
110
+ describeCommand: `deepline describe ${name} --prebuilt`
111
+ } : null;
112
+ 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;
113
+ const verbose = options.verbose === true;
114
+ const json = options.json === true;
115
+ const named = options.cliExample === true || options.playExample === true;
116
+ const shown = options.example !== false;
117
+ const {
118
+ runner: _runner,
119
+ inputs,
120
+ outputs,
121
+ rowInputs: _rowInputs,
122
+ rowOutputs: _rowOutputs,
123
+ ...summary
124
+ } = described;
125
+ const view = options.schemaOnly ? {
126
+ envelope: {
127
+ kind: described.kind,
128
+ id: described.id,
129
+ ...chosen.schemas
130
+ },
131
+ lines: [
132
+ `${described.id} [${described.kind.replace("_", " ")}]`,
133
+ ..._chunkXNL3SEMCjs.schemaLines.call(void 0, described, { full: true })
134
+ ]
135
+ } : {
136
+ envelope: {
137
+ ...summary,
138
+ inputs: inputs.map(_chunkXNL3SEMCjs.topLevelField),
139
+ outputs: outputs.map(_chunkXNL3SEMCjs.topLevelField),
140
+ ...described.rowInputs ? { rowInputs: described.rowInputs.map(_chunkXNL3SEMCjs.topLevelField) } : {},
141
+ ...described.rowOutputs ? { rowOutputs: described.rowOutputs.map(_chunkXNL3SEMCjs.topLevelField) } : {},
142
+ runExamples: _chunkXNL3SEMCjs.examples.call(void 0, described, { verbose }),
143
+ ...shadows ? { shadows, note } : {}
144
+ },
145
+ lines: [
146
+ ...note ? [`Note: ${note}`, ""] : [],
147
+ ..._chunkXNL3SEMCjs.describedLines.call(void 0, described, {
148
+ cli: shown && (!named || options.cliExample === true),
149
+ play: shown && (!named || options.playExample === true),
150
+ explain: named,
151
+ verbose,
152
+ fullSchema: options.fullSchema === true
153
+ })
154
+ ]
155
+ };
156
+ const envelope = options.schemaOnly ? view.envelope : (
157
+ // The shared keys lead; where the kind's own record has the same key,
158
+ // its value stands, so callers of the older commands read what they did.
159
+ { ...view.envelope, ...record }
160
+ );
161
+ const text = `${view.lines.join("\n")}
162
+ `;
163
+ if (options.out) {
164
+ const path = _path.resolve.call(void 0, options.out);
165
+ const content = json ? `${JSON.stringify(envelope, null, 2)}
166
+ ` : text;
167
+ _fs.writeFileSync.call(void 0, path, content);
168
+ const bytes = Buffer.byteLength(content);
169
+ _chunk6LLJWMYHjs.printCommandEnvelope.call(void 0,
170
+ { path, bytes },
171
+ { json, text: `Wrote ${path} (${bytes} bytes)
172
+ ` }
173
+ );
174
+ return 0;
175
+ }
176
+ _chunk6LLJWMYHjs.printCommandEnvelope.call(void 0, envelope, { json, text });
177
+ return 0;
178
+ }
179
+ function registerDescribeCommand(program) {
180
+ _chunkXNL3SEMCjs.addDescribeOptions.call(void 0, program.command("describe <name>")).description(
181
+ "Describe anything search returns: a tool, monitor type, or play."
182
+ ).addHelpText(
183
+ "after",
184
+ `
185
+ What you can describe:
186
+ Any id deepline search returns: a tool id, a monitor type id, or a play name
187
+ or reference. You do not say which kind it is; tool ids, monitor type ids
188
+ and prebuilt play names never overlap.
189
+
190
+ When a name is taken twice:
191
+ A play your workspace created is shown instead of a Deepline tool, monitor
192
+ type or prebuilt play with the same name, and the output says so.
193
+ Pass --prebuilt (or --tool) to see the Deepline one.
194
+
195
+ What it prints:
196
+ The same sections for every kind: what it is, cost, inputs, outputs, then
197
+ an example of running it from the CLI and from inside a play.
198
+
199
+ Examples in the output:
200
+ (default) required inputs filled in, first output read
201
+ --verbose every input filled in, every output read
202
+ --cli-example only the CLI example, with how inputs and outputs work
203
+ --play-example only the in-play example, with how inputs and outputs work
204
+ --no-example no examples
205
+
206
+ Schema size and format:
207
+ A schema over ${_chunkXNL3SEMCjs.SCHEMA_LINE_LIMIT} lines is folded: deeper objects show only their field
208
+ names. A shape used more than once is printed once under Types.
209
+ --full-schema the normal output, with the schema not folded
210
+ --schema-only only the schema, not folded, and nothing else
211
+ --json everything as JSON; the schema is never folded in JSON
212
+ --schema-only --json
213
+ only the input and output JSON Schemas; use this for a
214
+ program, or for a schema too large to read
215
+ --out <path> save any of the above to a file instead of printing it
216
+
217
+ Older commands:
218
+ deepline tools describe and deepline plays describe are this command limited
219
+ to one kind. Their own flags still work: --pricing-only, --examples-only,
220
+ --model and --estimate-payload on tools; --json <fields> on plays.
221
+
222
+ Examples:
223
+ deepline describe hunter_email_verifier
224
+ deepline describe person-linkedin-to-email --json
225
+ deepline describe my-play --prebuilt
226
+ deepline describe ai_ark_people_search --full-schema
227
+ deepline describe ai_ark_people_search --schema-only --json --out schema.json
228
+ `
229
+ ).action(async (name, options) => {
230
+ process.exitCode = await describeAnything(name, options);
231
+ });
232
+ }
233
+
234
+
235
+
236
+ exports.describeAnything = describeAnything; exports.registerDescribeCommand = registerDescribeCommand;
@@ -1,13 +1,13 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkQYL5ZV4Ujs = require('./chunk-QYL5ZV4U.js');
3
+ var _chunkULI6UVV6js = require('./chunk-ULI6UVV6.js');
4
4
  require('./chunk-LA46MMTL.js');
5
5
 
6
6
 
7
- var _chunkXDUQQTISjs = require('./chunk-XDUQQTIS.js');
8
- require('./chunk-RNJ74JDH.js');
7
+ var _chunk6LLJWMYHjs = require('./chunk-6LLJWMYH.js');
8
+ require('./chunk-TID5XLTZ.js');
9
9
  require('./chunk-XNYIZMNQ.js');
10
- require('./chunk-FYPZ43Y4.js');
10
+ require('./chunk-ZQJDRSR5.js');
11
11
  require('./chunk-S6R3OX7B.js');
12
12
  require('./chunk-7P5AA3SN.js');
13
13
  require('./chunk-OG64RBAC.js');
@@ -17,10 +17,10 @@ require('./chunk-COGTRVWW.js');
17
17
  function registerExecutionsCommands(program) {
18
18
  const executions = program.command("executions").description("Inspect and recover keyed tool executions.");
19
19
  executions.command("get").description("Retrieve a tool execution by its idempotency key.").requiredOption("--idempotency-key <key>", "Stable execution recovery key").option("--json", "Emit the stable JSON response").action(async (options) => {
20
- const result = await new (0, _chunkQYL5ZV4Ujs.DeeplineClient)().executions.getByKey(
20
+ const result = await new (0, _chunkULI6UVV6js.DeeplineClient)().executions.getByKey(
21
21
  options.idempotencyKey
22
22
  );
23
- _chunkXDUQQTISjs.printCommandEnvelope.call(void 0, result, { json: true });
23
+ _chunk6LLJWMYHjs.printCommandEnvelope.call(void 0, result, { json: true });
24
24
  });
25
25
  }
26
26
 
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  DeeplineClient
3
- } from "./chunk-5OVNL6LS.mjs";
3
+ } from "./chunk-NWFE4PGX.mjs";
4
4
  import "./chunk-CBVIJSHF.mjs";
5
5
  import {
6
6
  printCommandEnvelope
7
- } from "./chunk-SPUTBCUR.mjs";
8
- import "./chunk-Q3LYQTSO.mjs";
7
+ } from "./chunk-ZH7KTVAB.mjs";
8
+ import "./chunk-WPTUKXIF.mjs";
9
9
  import "./chunk-DLIRSHV6.mjs";
10
- import "./chunk-SGTSJCOA.mjs";
10
+ import "./chunk-AA66YTS7.mjs";
11
11
  import "./chunk-6IKARAYD.mjs";
12
12
  import "./chunk-NXGCO4JB.mjs";
13
13
  import "./chunk-WZYKRD7T.mjs";
@@ -2,10 +2,10 @@ import {
2
2
  collectLocalEnvInfo,
3
3
  getAuthedHttpClient,
4
4
  printCommandEnvelope
5
- } from "./chunk-SPUTBCUR.mjs";
6
- import "./chunk-Q3LYQTSO.mjs";
5
+ } from "./chunk-ZH7KTVAB.mjs";
6
+ import "./chunk-WPTUKXIF.mjs";
7
7
  import "./chunk-DLIRSHV6.mjs";
8
- import "./chunk-SGTSJCOA.mjs";
8
+ import "./chunk-AA66YTS7.mjs";
9
9
  import "./chunk-NXGCO4JB.mjs";
10
10
  import "./chunk-WZYKRD7T.mjs";
11
11
  import "./chunk-KRD6H754.mjs";
@@ -2,10 +2,10 @@
2
2
 
3
3
 
4
4
 
5
- var _chunkXDUQQTISjs = require('./chunk-XDUQQTIS.js');
6
- require('./chunk-RNJ74JDH.js');
5
+ var _chunk6LLJWMYHjs = require('./chunk-6LLJWMYH.js');
6
+ require('./chunk-TID5XLTZ.js');
7
7
  require('./chunk-XNYIZMNQ.js');
8
- require('./chunk-FYPZ43Y4.js');
8
+ require('./chunk-ZQJDRSR5.js');
9
9
  require('./chunk-7P5AA3SN.js');
10
10
  require('./chunk-OG64RBAC.js');
11
11
  require('./chunk-COGTRVWW.js');
@@ -15,16 +15,16 @@ var _commander = require('commander');
15
15
  var _fs = require('fs');
16
16
  async function handleFeedback(text, options) {
17
17
  const message = resolveFeedbackText(text, options.file);
18
- const { http } = _chunkXDUQQTISjs.getAuthedHttpClient.call(void 0, );
18
+ const { http } = _chunk6LLJWMYHjs.getAuthedHttpClient.call(void 0, );
19
19
  const response = await http.post("/api/v2/cli/feedback", {
20
20
  text: message,
21
21
  requested: options.requested === true,
22
- environment: _chunkXDUQQTISjs.collectLocalEnvInfo.call(void 0, ),
22
+ environment: _chunk6LLJWMYHjs.collectLocalEnvInfo.call(void 0, ),
23
23
  ...options.command ? { command: options.command } : {},
24
24
  ...options.payload ? { payload: options.payload } : {},
25
25
  ...options.errorOutcome ? { error_outcome: options.errorOutcome } : {}
26
26
  });
27
- _chunkXDUQQTISjs.printCommandEnvelope.call(void 0,
27
+ _chunk6LLJWMYHjs.printCommandEnvelope.call(void 0,
28
28
  {
29
29
  ...response,
30
30
  render: {
@@ -0,0 +1,23 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+
4
+
5
+
6
+
7
+
8
+ var _chunkT4IJQKREjs = require('./chunk-T4IJQKRE.js');
9
+ require('./chunk-6LLJWMYH.js');
10
+ require('./chunk-TID5XLTZ.js');
11
+ require('./chunk-XNYIZMNQ.js');
12
+ require('./chunk-ZQJDRSR5.js');
13
+ require('./chunk-7P5AA3SN.js');
14
+ require('./chunk-OG64RBAC.js');
15
+ require('./chunk-COGTRVWW.js');
16
+
17
+
18
+
19
+
20
+
21
+
22
+
23
+ exports.handleDeploymentGet = _chunkT4IJQKREjs.handleDeploymentGet; exports.handleDeploymentsList = _chunkT4IJQKREjs.handleDeploymentsList; exports.registerGitCommands = _chunkT4IJQKREjs.registerGitCommands; exports.renderDeployment = _chunkT4IJQKREjs.renderDeployment; exports.renderDeploymentMonitorLines = _chunkT4IJQKREjs.renderDeploymentMonitorLines; exports.renderDeploymentPlayLines = _chunkT4IJQKREjs.renderDeploymentPlayLines;
@@ -5,11 +5,11 @@ import {
5
5
  renderDeployment,
6
6
  renderDeploymentMonitorLines,
7
7
  renderDeploymentPlayLines
8
- } from "./chunk-4WFNAWVO.mjs";
9
- import "./chunk-SPUTBCUR.mjs";
10
- import "./chunk-Q3LYQTSO.mjs";
8
+ } from "./chunk-EHVJ7XXD.mjs";
9
+ import "./chunk-ZH7KTVAB.mjs";
10
+ import "./chunk-WPTUKXIF.mjs";
11
11
  import "./chunk-DLIRSHV6.mjs";
12
- import "./chunk-SGTSJCOA.mjs";
12
+ import "./chunk-AA66YTS7.mjs";
13
13
  import "./chunk-NXGCO4JB.mjs";
14
14
  import "./chunk-WZYKRD7T.mjs";
15
15
  import "./chunk-KRD6H754.mjs";