deepline 0.1.273 → 0.1.275
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 +12 -0
- package/dist/cli/index.js +182 -2
- package/dist/cli/index.mjs +182 -2
- package/dist/index.d.mts +15 -0
- package/dist/index.d.ts +15 -0
- package/dist/index.js +9 -1
- package/dist/index.mjs +9 -1
- package/package.json +1 -1
|
@@ -71,6 +71,7 @@ import type {
|
|
|
71
71
|
PublishSharePageRequest,
|
|
72
72
|
UpdateSharePageRequest,
|
|
73
73
|
ToolDefinition,
|
|
74
|
+
ProviderDefinition,
|
|
74
75
|
ToolSearchOptions,
|
|
75
76
|
ToolSearchResult,
|
|
76
77
|
ToolMetadata,
|
|
@@ -1640,6 +1641,17 @@ export class DeeplineClient {
|
|
|
1640
1641
|
return res.tools;
|
|
1641
1642
|
}
|
|
1642
1643
|
|
|
1644
|
+
/** List discoverable providers without requiring a local plugin catalog. */
|
|
1645
|
+
async listProviders(options?: {
|
|
1646
|
+
changed?: boolean;
|
|
1647
|
+
}): Promise<ProviderDefinition[]> {
|
|
1648
|
+
const suffix = options?.changed ? '?changed=true' : '';
|
|
1649
|
+
const res = await this.http.get<{ providers: ProviderDefinition[] }>(
|
|
1650
|
+
`/api/v2/tools/providers${suffix}`,
|
|
1651
|
+
);
|
|
1652
|
+
return res.providers;
|
|
1653
|
+
}
|
|
1654
|
+
|
|
1643
1655
|
/**
|
|
1644
1656
|
* Search available tools using Deepline's ranked backend search.
|
|
1645
1657
|
*
|
|
@@ -155,7 +155,7 @@ export const SDK_RELEASE = {
|
|
|
155
155
|
// 0.1.253 makes play-page browser opening opt-in and retires --no-open.
|
|
156
156
|
// 0.1.254 removes the internal operations tree from the published SDK CLI.
|
|
157
157
|
// Operators use the checkout-local deepline-admin binary instead.
|
|
158
|
-
version: '0.1.
|
|
158
|
+
version: '0.1.275',
|
|
159
159
|
contracts: {
|
|
160
160
|
api: {
|
|
161
161
|
name: 'sdk-http-api',
|
|
@@ -112,6 +112,18 @@ export interface ToolPricingSummary {
|
|
|
112
112
|
details: string[];
|
|
113
113
|
}
|
|
114
114
|
|
|
115
|
+
/** A discoverable provider, returned by {@link DeeplineClient.listProviders}. */
|
|
116
|
+
export interface ProviderDefinition {
|
|
117
|
+
provider: string;
|
|
118
|
+
displayName: string;
|
|
119
|
+
toolCount: number;
|
|
120
|
+
categories: string[];
|
|
121
|
+
/** Present for providers in the recent-additions ledger. */
|
|
122
|
+
version?: string;
|
|
123
|
+
/** ISO-8601 date on which this provider was added. */
|
|
124
|
+
releasedAt?: string;
|
|
125
|
+
}
|
|
126
|
+
|
|
115
127
|
/**
|
|
116
128
|
* Summary definition of a tool, returned by {@link DeeplineClient.listTools}.
|
|
117
129
|
*
|
package/dist/cli/index.js
CHANGED
|
@@ -718,7 +718,7 @@ var SDK_RELEASE = {
|
|
|
718
718
|
// 0.1.253 makes play-page browser opening opt-in and retires --no-open.
|
|
719
719
|
// 0.1.254 removes the internal operations tree from the published SDK CLI.
|
|
720
720
|
// Operators use the checkout-local deepline-admin binary instead.
|
|
721
|
-
version: "0.1.
|
|
721
|
+
version: "0.1.275",
|
|
722
722
|
contracts: {
|
|
723
723
|
api: {
|
|
724
724
|
name: "sdk-http-api",
|
|
@@ -3120,6 +3120,14 @@ var DeeplineClient = class {
|
|
|
3120
3120
|
);
|
|
3121
3121
|
return res.tools;
|
|
3122
3122
|
}
|
|
3123
|
+
/** List discoverable providers without requiring a local plugin catalog. */
|
|
3124
|
+
async listProviders(options) {
|
|
3125
|
+
const suffix = options?.changed ? "?changed=true" : "";
|
|
3126
|
+
const res = await this.http.get(
|
|
3127
|
+
`/api/v2/tools/providers${suffix}`
|
|
3128
|
+
);
|
|
3129
|
+
return res.providers;
|
|
3130
|
+
}
|
|
3123
3131
|
/**
|
|
3124
3132
|
* Search available tools using Deepline's ranked backend search.
|
|
3125
3133
|
*
|
|
@@ -26975,6 +26983,43 @@ async function listTools(category, options = {}) {
|
|
|
26975
26983
|
}
|
|
26976
26984
|
return listToolCategories(emitJson, compact);
|
|
26977
26985
|
}
|
|
26986
|
+
async function listProviders(options = {}) {
|
|
26987
|
+
const client2 = new DeeplineClient();
|
|
26988
|
+
const changed = options.changed === true;
|
|
26989
|
+
const emitJson = options.json === true || shouldEmitJson();
|
|
26990
|
+
const providers = await client2.listProviders({ changed });
|
|
26991
|
+
const render = {
|
|
26992
|
+
sections: [
|
|
26993
|
+
{
|
|
26994
|
+
title: changed ? `${providers.length} recently added providers:` : `${providers.length} providers:`,
|
|
26995
|
+
lines: providers.map((provider) => {
|
|
26996
|
+
const release2 = provider.releasedAt ? ` - v${provider.version ?? "unknown"} (${provider.releasedAt})` : "";
|
|
26997
|
+
return `${provider.provider} (${provider.displayName}) - ${provider.toolCount} tools${release2}`;
|
|
26998
|
+
})
|
|
26999
|
+
},
|
|
27000
|
+
{
|
|
27001
|
+
title: "next",
|
|
27002
|
+
lines: [
|
|
27003
|
+
"Run `deepline tools list <category>` to browse provider tools by category."
|
|
27004
|
+
]
|
|
27005
|
+
}
|
|
27006
|
+
]
|
|
27007
|
+
};
|
|
27008
|
+
printCommandEnvelope(
|
|
27009
|
+
{
|
|
27010
|
+
providers,
|
|
27011
|
+
count: providers.length,
|
|
27012
|
+
filters: { changed },
|
|
27013
|
+
commandTemplates: {
|
|
27014
|
+
list: "deepline tools providers",
|
|
27015
|
+
changed: "deepline tools providers --changed"
|
|
27016
|
+
},
|
|
27017
|
+
render
|
|
27018
|
+
},
|
|
27019
|
+
{ json: emitJson }
|
|
27020
|
+
);
|
|
27021
|
+
return 0;
|
|
27022
|
+
}
|
|
26978
27023
|
async function searchTools(queryInput, options = {}) {
|
|
26979
27024
|
const query = queryInput?.trim() ?? "";
|
|
26980
27025
|
const hasStructuredSearch = Boolean(
|
|
@@ -27124,6 +27169,9 @@ function isPlayLikeTool(tool) {
|
|
|
27124
27169
|
const toolId = typeof record.toolId === "string" ? record.toolId : "";
|
|
27125
27170
|
return toolId.endsWith("_waterfall");
|
|
27126
27171
|
}
|
|
27172
|
+
function isMonitorTypeTool(tool) {
|
|
27173
|
+
return stringField2(tool, "kind") === "monitor_type";
|
|
27174
|
+
}
|
|
27127
27175
|
function playReferenceForTool(tool) {
|
|
27128
27176
|
const record = tool;
|
|
27129
27177
|
const declared = stringField2(record, "playReference", "play_reference");
|
|
@@ -27164,6 +27212,7 @@ Concepts:
|
|
|
27164
27212
|
through the plays namespace.
|
|
27165
27213
|
|
|
27166
27214
|
Common commands:
|
|
27215
|
+
deepline tools providers --changed --json
|
|
27167
27216
|
deepline tools search email --json
|
|
27168
27217
|
deepline tools describe hunter_email_verifier --json
|
|
27169
27218
|
deepline tools execute hunter_email_verifier --input '{"email":"a@b.com"}'
|
|
@@ -27173,6 +27222,28 @@ Output:
|
|
|
27173
27222
|
Use execute to run a tool.
|
|
27174
27223
|
`
|
|
27175
27224
|
);
|
|
27225
|
+
tools.command("providers").description("List discoverable providers and their available tool counts.").addHelpText(
|
|
27226
|
+
"after",
|
|
27227
|
+
`
|
|
27228
|
+
Notes:
|
|
27229
|
+
This directory is served by Deepline's provider catalog; it does not require
|
|
27230
|
+
cloning a public plugins repository. Use --changed to show recently added
|
|
27231
|
+
providers with their catalog version and release date.
|
|
27232
|
+
|
|
27233
|
+
Examples:
|
|
27234
|
+
deepline tools providers
|
|
27235
|
+
deepline tools providers --changed
|
|
27236
|
+
deepline tools providers --changed --json
|
|
27237
|
+
`
|
|
27238
|
+
).option(
|
|
27239
|
+
"--changed",
|
|
27240
|
+
"Only list recently added providers with release metadata"
|
|
27241
|
+
).option("--json", "Emit JSON output. Also automatic when stdout is piped").action(async (options) => {
|
|
27242
|
+
process.exitCode = await listProviders({
|
|
27243
|
+
changed: Boolean(options.changed),
|
|
27244
|
+
json: Boolean(options.json)
|
|
27245
|
+
});
|
|
27246
|
+
});
|
|
27176
27247
|
tools.command("list [category]").description("Browse tool categories, or list every tool in a category.").addHelpText(
|
|
27177
27248
|
"after",
|
|
27178
27249
|
`
|
|
@@ -27540,7 +27611,100 @@ function extractionContractEntries(entries) {
|
|
|
27540
27611
|
return name && expression ? [{ name, expression }] : [];
|
|
27541
27612
|
});
|
|
27542
27613
|
}
|
|
27614
|
+
function printMonitorTypeFilters(tool) {
|
|
27615
|
+
const schema = recordField2(tool, "payload_schema", "payloadSchema");
|
|
27616
|
+
const properties = recordField2(schema, "properties");
|
|
27617
|
+
const required = new Set(
|
|
27618
|
+
arrayField2(schema, "required").filter(
|
|
27619
|
+
(v) => typeof v === "string"
|
|
27620
|
+
)
|
|
27621
|
+
);
|
|
27622
|
+
const names = Object.keys(properties);
|
|
27623
|
+
if (!names.length) {
|
|
27624
|
+
console.log("Deploy filters: none");
|
|
27625
|
+
return;
|
|
27626
|
+
}
|
|
27627
|
+
console.log("Deploy filters (set in the monitor payload):");
|
|
27628
|
+
for (const name of names) {
|
|
27629
|
+
const field = isRecord8(properties[name]) ? properties[name] : {};
|
|
27630
|
+
const star = required.has(name) ? "*" : "";
|
|
27631
|
+
const enumVals = arrayField2(field, "enum").filter(
|
|
27632
|
+
(v) => typeof v === "string"
|
|
27633
|
+
);
|
|
27634
|
+
const type = enumVals.length ? `one of [${enumVals.join(", ")}]` : stringField2(field, "type") || "string";
|
|
27635
|
+
const desc = stringField2(field, "description");
|
|
27636
|
+
console.log(`- ${name}${star}: ${type}${desc ? ` - ${desc}` : ""}`);
|
|
27637
|
+
}
|
|
27638
|
+
}
|
|
27639
|
+
function printMonitorTypeStreams(tool) {
|
|
27640
|
+
const streams = arrayField2(tool, "streams", "output_streams").filter(isRecord8);
|
|
27641
|
+
if (!streams.length) return;
|
|
27642
|
+
console.log("");
|
|
27643
|
+
console.log("Filter columns (a play's sqlListeners.where, per stream):");
|
|
27644
|
+
for (const stream of streams) {
|
|
27645
|
+
const name = stringField2(stream, "stream");
|
|
27646
|
+
const cols = arrayField2(stream, "columns").filter(isRecord8).map((col) => stringField2(col, "name")).filter(Boolean);
|
|
27647
|
+
console.log(`- ${name}: ${cols.join(", ")}`);
|
|
27648
|
+
}
|
|
27649
|
+
}
|
|
27650
|
+
function printMonitorTypePricing(tool) {
|
|
27651
|
+
const pricing = recordField2(tool, "pricing");
|
|
27652
|
+
const byType = recordField2(
|
|
27653
|
+
pricing,
|
|
27654
|
+
"pricing_by_radar_type",
|
|
27655
|
+
"pricingByRadarType"
|
|
27656
|
+
);
|
|
27657
|
+
const keys = Object.keys(byType);
|
|
27658
|
+
if (!keys.length) {
|
|
27659
|
+
console.log("Pricing: Deepline credits per accepted event (see --json)");
|
|
27660
|
+
return;
|
|
27661
|
+
}
|
|
27662
|
+
console.log("Pricing (Deepline credits per accepted event):");
|
|
27663
|
+
for (const key of keys) {
|
|
27664
|
+
const entry = isRecord8(byType[key]) ? byType[key] : {};
|
|
27665
|
+
const credits = numberField2(entry, "deepline_credits", "deeplineCredits");
|
|
27666
|
+
const display = stringField2(entry, "display");
|
|
27667
|
+
const shown = display || (credits !== null ? `${formatDecimal(credits)} credits/event` : "see --json");
|
|
27668
|
+
console.log(`- ${key}: ${shown}`);
|
|
27669
|
+
}
|
|
27670
|
+
}
|
|
27671
|
+
function printMonitorTypeDeploy(tool) {
|
|
27672
|
+
const deploy = recordField2(tool, "deploy");
|
|
27673
|
+
const toolId = stringField2(tool, "toolId");
|
|
27674
|
+
const example = stringField2(deploy, "example") || `deepline monitors deploy '{"key":"...","tool":"${toolId}","payload":{...}}'`;
|
|
27675
|
+
console.log("Deploy (a monitor type is deployed, not executed):");
|
|
27676
|
+
console.log(` ${example}`);
|
|
27677
|
+
}
|
|
27678
|
+
function printMonitorTypeContract(tool, requestedToolId) {
|
|
27679
|
+
const toolId = stringField2(tool, "toolId") || requestedToolId;
|
|
27680
|
+
console.log(toolId);
|
|
27681
|
+
const displayName = stringField2(tool, "displayName");
|
|
27682
|
+
if (displayName) console.log(`Best for: ${displayName}`);
|
|
27683
|
+
const description = stringField2(tool, "description");
|
|
27684
|
+
if (description) console.log(`Description: ${description}`);
|
|
27685
|
+
const categories = arrayField2(tool, "categories").filter(
|
|
27686
|
+
(v) => typeof v === "string"
|
|
27687
|
+
);
|
|
27688
|
+
if (categories.length) console.log(`Tags: ${categories.join(", ")}`);
|
|
27689
|
+
console.log("");
|
|
27690
|
+
console.log(
|
|
27691
|
+
"Monitor type \u2014 streams a provider's events into your warehouse. Deploy it, don't execute it."
|
|
27692
|
+
);
|
|
27693
|
+
console.log("");
|
|
27694
|
+
printMonitorTypeFilters(tool);
|
|
27695
|
+
printMonitorTypeStreams(tool);
|
|
27696
|
+
console.log("");
|
|
27697
|
+
printMonitorTypePricing(tool);
|
|
27698
|
+
console.log("");
|
|
27699
|
+
printMonitorTypeDeploy(tool);
|
|
27700
|
+
console.log("");
|
|
27701
|
+
console.log(`More: deepline tools get ${toolId} --json`);
|
|
27702
|
+
}
|
|
27543
27703
|
function printCompactToolContract(tool, requestedToolId) {
|
|
27704
|
+
if (isMonitorTypeTool(tool)) {
|
|
27705
|
+
printMonitorTypeContract(tool, requestedToolId);
|
|
27706
|
+
return;
|
|
27707
|
+
}
|
|
27544
27708
|
const contract = toolContractJsonForDescribe(tool, requestedToolId);
|
|
27545
27709
|
const cost = isRecord8(contract.cost) ? contract.cost : {};
|
|
27546
27710
|
const getters = isRecord8(contract.getters) ? contract.getters : {};
|
|
@@ -27606,6 +27770,10 @@ function printCompactToolContract(tool, requestedToolId) {
|
|
|
27606
27770
|
);
|
|
27607
27771
|
}
|
|
27608
27772
|
function printToolPricingOnly(tool, requestedToolId, options = {}) {
|
|
27773
|
+
if (isMonitorTypeTool(tool)) {
|
|
27774
|
+
printMonitorTypePricing(tool);
|
|
27775
|
+
return;
|
|
27776
|
+
}
|
|
27609
27777
|
const contract = toolContractJsonForDescribe(tool, requestedToolId);
|
|
27610
27778
|
const cost = isRecord8(contract.cost) ? contract.cost : {};
|
|
27611
27779
|
const pricingModel = stringField2(cost, "pricingModel") || "unknown";
|
|
@@ -27618,6 +27786,11 @@ function printToolPricingOnly(tool, requestedToolId, options = {}) {
|
|
|
27618
27786
|
console.log(`Billing: ${billingMode}`);
|
|
27619
27787
|
}
|
|
27620
27788
|
function printToolSchemaOnly(tool, requestedToolId) {
|
|
27789
|
+
if (isMonitorTypeTool(tool)) {
|
|
27790
|
+
printMonitorTypeFilters(tool);
|
|
27791
|
+
printMonitorTypeStreams(tool);
|
|
27792
|
+
return;
|
|
27793
|
+
}
|
|
27621
27794
|
const contract = toolContractJsonForDescribe(tool, requestedToolId);
|
|
27622
27795
|
const inputFields = Array.isArray(contract.inputFields) ? contract.inputFields : [];
|
|
27623
27796
|
console.log(`Schema: ${contract.toolId}`);
|
|
@@ -27640,6 +27813,10 @@ function printToolSchemaOnly(tool, requestedToolId) {
|
|
|
27640
27813
|
}
|
|
27641
27814
|
}
|
|
27642
27815
|
function printToolExamplesOnly(tool, requestedToolId, options = {}) {
|
|
27816
|
+
if (isMonitorTypeTool(tool)) {
|
|
27817
|
+
printMonitorTypeDeploy(tool);
|
|
27818
|
+
return;
|
|
27819
|
+
}
|
|
27643
27820
|
if (isPlayLikeTool(tool)) {
|
|
27644
27821
|
printPlayLikeToolUsage(tool, requestedToolId);
|
|
27645
27822
|
return;
|
|
@@ -31878,7 +32055,9 @@ function shouldDeferSkillsSyncForCommand() {
|
|
|
31878
32055
|
const args = process.argv.slice(2);
|
|
31879
32056
|
const command = args[0];
|
|
31880
32057
|
const subcommand = args[1];
|
|
31881
|
-
if (command === "tools" && ["list", "search", "grep", "describe", "get"].includes(
|
|
32058
|
+
if (command === "tools" && ["list", "providers", "search", "grep", "describe", "get"].includes(
|
|
32059
|
+
subcommand ?? ""
|
|
32060
|
+
)) {
|
|
31882
32061
|
return true;
|
|
31883
32062
|
}
|
|
31884
32063
|
return (command === "play" || command === "plays") && subcommand === "run" && args.includes("--json");
|
|
@@ -32104,6 +32283,7 @@ Common commands:
|
|
|
32104
32283
|
deepline plays describe prebuilt/person-linkedin-to-email --json
|
|
32105
32284
|
deepline plays run my.play.ts --input '{"domain":"stripe.com"}'
|
|
32106
32285
|
deepline secrets check HUBSPOT_TOKEN
|
|
32286
|
+
deepline tools providers --changed --json
|
|
32107
32287
|
deepline tools execute hunter_email_verifier --input '{"email":"a@b.com"}'
|
|
32108
32288
|
deepline update
|
|
32109
32289
|
|
package/dist/cli/index.mjs
CHANGED
|
@@ -703,7 +703,7 @@ var SDK_RELEASE = {
|
|
|
703
703
|
// 0.1.253 makes play-page browser opening opt-in and retires --no-open.
|
|
704
704
|
// 0.1.254 removes the internal operations tree from the published SDK CLI.
|
|
705
705
|
// Operators use the checkout-local deepline-admin binary instead.
|
|
706
|
-
version: "0.1.
|
|
706
|
+
version: "0.1.275",
|
|
707
707
|
contracts: {
|
|
708
708
|
api: {
|
|
709
709
|
name: "sdk-http-api",
|
|
@@ -3105,6 +3105,14 @@ var DeeplineClient = class {
|
|
|
3105
3105
|
);
|
|
3106
3106
|
return res.tools;
|
|
3107
3107
|
}
|
|
3108
|
+
/** List discoverable providers without requiring a local plugin catalog. */
|
|
3109
|
+
async listProviders(options) {
|
|
3110
|
+
const suffix = options?.changed ? "?changed=true" : "";
|
|
3111
|
+
const res = await this.http.get(
|
|
3112
|
+
`/api/v2/tools/providers${suffix}`
|
|
3113
|
+
);
|
|
3114
|
+
return res.providers;
|
|
3115
|
+
}
|
|
3108
3116
|
/**
|
|
3109
3117
|
* Search available tools using Deepline's ranked backend search.
|
|
3110
3118
|
*
|
|
@@ -27023,6 +27031,43 @@ async function listTools(category, options = {}) {
|
|
|
27023
27031
|
}
|
|
27024
27032
|
return listToolCategories(emitJson, compact);
|
|
27025
27033
|
}
|
|
27034
|
+
async function listProviders(options = {}) {
|
|
27035
|
+
const client2 = new DeeplineClient();
|
|
27036
|
+
const changed = options.changed === true;
|
|
27037
|
+
const emitJson = options.json === true || shouldEmitJson();
|
|
27038
|
+
const providers = await client2.listProviders({ changed });
|
|
27039
|
+
const render = {
|
|
27040
|
+
sections: [
|
|
27041
|
+
{
|
|
27042
|
+
title: changed ? `${providers.length} recently added providers:` : `${providers.length} providers:`,
|
|
27043
|
+
lines: providers.map((provider) => {
|
|
27044
|
+
const release2 = provider.releasedAt ? ` - v${provider.version ?? "unknown"} (${provider.releasedAt})` : "";
|
|
27045
|
+
return `${provider.provider} (${provider.displayName}) - ${provider.toolCount} tools${release2}`;
|
|
27046
|
+
})
|
|
27047
|
+
},
|
|
27048
|
+
{
|
|
27049
|
+
title: "next",
|
|
27050
|
+
lines: [
|
|
27051
|
+
"Run `deepline tools list <category>` to browse provider tools by category."
|
|
27052
|
+
]
|
|
27053
|
+
}
|
|
27054
|
+
]
|
|
27055
|
+
};
|
|
27056
|
+
printCommandEnvelope(
|
|
27057
|
+
{
|
|
27058
|
+
providers,
|
|
27059
|
+
count: providers.length,
|
|
27060
|
+
filters: { changed },
|
|
27061
|
+
commandTemplates: {
|
|
27062
|
+
list: "deepline tools providers",
|
|
27063
|
+
changed: "deepline tools providers --changed"
|
|
27064
|
+
},
|
|
27065
|
+
render
|
|
27066
|
+
},
|
|
27067
|
+
{ json: emitJson }
|
|
27068
|
+
);
|
|
27069
|
+
return 0;
|
|
27070
|
+
}
|
|
27026
27071
|
async function searchTools(queryInput, options = {}) {
|
|
27027
27072
|
const query = queryInput?.trim() ?? "";
|
|
27028
27073
|
const hasStructuredSearch = Boolean(
|
|
@@ -27172,6 +27217,9 @@ function isPlayLikeTool(tool) {
|
|
|
27172
27217
|
const toolId = typeof record.toolId === "string" ? record.toolId : "";
|
|
27173
27218
|
return toolId.endsWith("_waterfall");
|
|
27174
27219
|
}
|
|
27220
|
+
function isMonitorTypeTool(tool) {
|
|
27221
|
+
return stringField2(tool, "kind") === "monitor_type";
|
|
27222
|
+
}
|
|
27175
27223
|
function playReferenceForTool(tool) {
|
|
27176
27224
|
const record = tool;
|
|
27177
27225
|
const declared = stringField2(record, "playReference", "play_reference");
|
|
@@ -27212,6 +27260,7 @@ Concepts:
|
|
|
27212
27260
|
through the plays namespace.
|
|
27213
27261
|
|
|
27214
27262
|
Common commands:
|
|
27263
|
+
deepline tools providers --changed --json
|
|
27215
27264
|
deepline tools search email --json
|
|
27216
27265
|
deepline tools describe hunter_email_verifier --json
|
|
27217
27266
|
deepline tools execute hunter_email_verifier --input '{"email":"a@b.com"}'
|
|
@@ -27221,6 +27270,28 @@ Output:
|
|
|
27221
27270
|
Use execute to run a tool.
|
|
27222
27271
|
`
|
|
27223
27272
|
);
|
|
27273
|
+
tools.command("providers").description("List discoverable providers and their available tool counts.").addHelpText(
|
|
27274
|
+
"after",
|
|
27275
|
+
`
|
|
27276
|
+
Notes:
|
|
27277
|
+
This directory is served by Deepline's provider catalog; it does not require
|
|
27278
|
+
cloning a public plugins repository. Use --changed to show recently added
|
|
27279
|
+
providers with their catalog version and release date.
|
|
27280
|
+
|
|
27281
|
+
Examples:
|
|
27282
|
+
deepline tools providers
|
|
27283
|
+
deepline tools providers --changed
|
|
27284
|
+
deepline tools providers --changed --json
|
|
27285
|
+
`
|
|
27286
|
+
).option(
|
|
27287
|
+
"--changed",
|
|
27288
|
+
"Only list recently added providers with release metadata"
|
|
27289
|
+
).option("--json", "Emit JSON output. Also automatic when stdout is piped").action(async (options) => {
|
|
27290
|
+
process.exitCode = await listProviders({
|
|
27291
|
+
changed: Boolean(options.changed),
|
|
27292
|
+
json: Boolean(options.json)
|
|
27293
|
+
});
|
|
27294
|
+
});
|
|
27224
27295
|
tools.command("list [category]").description("Browse tool categories, or list every tool in a category.").addHelpText(
|
|
27225
27296
|
"after",
|
|
27226
27297
|
`
|
|
@@ -27588,7 +27659,100 @@ function extractionContractEntries(entries) {
|
|
|
27588
27659
|
return name && expression ? [{ name, expression }] : [];
|
|
27589
27660
|
});
|
|
27590
27661
|
}
|
|
27662
|
+
function printMonitorTypeFilters(tool) {
|
|
27663
|
+
const schema = recordField2(tool, "payload_schema", "payloadSchema");
|
|
27664
|
+
const properties = recordField2(schema, "properties");
|
|
27665
|
+
const required = new Set(
|
|
27666
|
+
arrayField2(schema, "required").filter(
|
|
27667
|
+
(v) => typeof v === "string"
|
|
27668
|
+
)
|
|
27669
|
+
);
|
|
27670
|
+
const names = Object.keys(properties);
|
|
27671
|
+
if (!names.length) {
|
|
27672
|
+
console.log("Deploy filters: none");
|
|
27673
|
+
return;
|
|
27674
|
+
}
|
|
27675
|
+
console.log("Deploy filters (set in the monitor payload):");
|
|
27676
|
+
for (const name of names) {
|
|
27677
|
+
const field = isRecord8(properties[name]) ? properties[name] : {};
|
|
27678
|
+
const star = required.has(name) ? "*" : "";
|
|
27679
|
+
const enumVals = arrayField2(field, "enum").filter(
|
|
27680
|
+
(v) => typeof v === "string"
|
|
27681
|
+
);
|
|
27682
|
+
const type = enumVals.length ? `one of [${enumVals.join(", ")}]` : stringField2(field, "type") || "string";
|
|
27683
|
+
const desc = stringField2(field, "description");
|
|
27684
|
+
console.log(`- ${name}${star}: ${type}${desc ? ` - ${desc}` : ""}`);
|
|
27685
|
+
}
|
|
27686
|
+
}
|
|
27687
|
+
function printMonitorTypeStreams(tool) {
|
|
27688
|
+
const streams = arrayField2(tool, "streams", "output_streams").filter(isRecord8);
|
|
27689
|
+
if (!streams.length) return;
|
|
27690
|
+
console.log("");
|
|
27691
|
+
console.log("Filter columns (a play's sqlListeners.where, per stream):");
|
|
27692
|
+
for (const stream of streams) {
|
|
27693
|
+
const name = stringField2(stream, "stream");
|
|
27694
|
+
const cols = arrayField2(stream, "columns").filter(isRecord8).map((col) => stringField2(col, "name")).filter(Boolean);
|
|
27695
|
+
console.log(`- ${name}: ${cols.join(", ")}`);
|
|
27696
|
+
}
|
|
27697
|
+
}
|
|
27698
|
+
function printMonitorTypePricing(tool) {
|
|
27699
|
+
const pricing = recordField2(tool, "pricing");
|
|
27700
|
+
const byType = recordField2(
|
|
27701
|
+
pricing,
|
|
27702
|
+
"pricing_by_radar_type",
|
|
27703
|
+
"pricingByRadarType"
|
|
27704
|
+
);
|
|
27705
|
+
const keys = Object.keys(byType);
|
|
27706
|
+
if (!keys.length) {
|
|
27707
|
+
console.log("Pricing: Deepline credits per accepted event (see --json)");
|
|
27708
|
+
return;
|
|
27709
|
+
}
|
|
27710
|
+
console.log("Pricing (Deepline credits per accepted event):");
|
|
27711
|
+
for (const key of keys) {
|
|
27712
|
+
const entry = isRecord8(byType[key]) ? byType[key] : {};
|
|
27713
|
+
const credits = numberField2(entry, "deepline_credits", "deeplineCredits");
|
|
27714
|
+
const display = stringField2(entry, "display");
|
|
27715
|
+
const shown = display || (credits !== null ? `${formatDecimal(credits)} credits/event` : "see --json");
|
|
27716
|
+
console.log(`- ${key}: ${shown}`);
|
|
27717
|
+
}
|
|
27718
|
+
}
|
|
27719
|
+
function printMonitorTypeDeploy(tool) {
|
|
27720
|
+
const deploy = recordField2(tool, "deploy");
|
|
27721
|
+
const toolId = stringField2(tool, "toolId");
|
|
27722
|
+
const example = stringField2(deploy, "example") || `deepline monitors deploy '{"key":"...","tool":"${toolId}","payload":{...}}'`;
|
|
27723
|
+
console.log("Deploy (a monitor type is deployed, not executed):");
|
|
27724
|
+
console.log(` ${example}`);
|
|
27725
|
+
}
|
|
27726
|
+
function printMonitorTypeContract(tool, requestedToolId) {
|
|
27727
|
+
const toolId = stringField2(tool, "toolId") || requestedToolId;
|
|
27728
|
+
console.log(toolId);
|
|
27729
|
+
const displayName = stringField2(tool, "displayName");
|
|
27730
|
+
if (displayName) console.log(`Best for: ${displayName}`);
|
|
27731
|
+
const description = stringField2(tool, "description");
|
|
27732
|
+
if (description) console.log(`Description: ${description}`);
|
|
27733
|
+
const categories = arrayField2(tool, "categories").filter(
|
|
27734
|
+
(v) => typeof v === "string"
|
|
27735
|
+
);
|
|
27736
|
+
if (categories.length) console.log(`Tags: ${categories.join(", ")}`);
|
|
27737
|
+
console.log("");
|
|
27738
|
+
console.log(
|
|
27739
|
+
"Monitor type \u2014 streams a provider's events into your warehouse. Deploy it, don't execute it."
|
|
27740
|
+
);
|
|
27741
|
+
console.log("");
|
|
27742
|
+
printMonitorTypeFilters(tool);
|
|
27743
|
+
printMonitorTypeStreams(tool);
|
|
27744
|
+
console.log("");
|
|
27745
|
+
printMonitorTypePricing(tool);
|
|
27746
|
+
console.log("");
|
|
27747
|
+
printMonitorTypeDeploy(tool);
|
|
27748
|
+
console.log("");
|
|
27749
|
+
console.log(`More: deepline tools get ${toolId} --json`);
|
|
27750
|
+
}
|
|
27591
27751
|
function printCompactToolContract(tool, requestedToolId) {
|
|
27752
|
+
if (isMonitorTypeTool(tool)) {
|
|
27753
|
+
printMonitorTypeContract(tool, requestedToolId);
|
|
27754
|
+
return;
|
|
27755
|
+
}
|
|
27592
27756
|
const contract = toolContractJsonForDescribe(tool, requestedToolId);
|
|
27593
27757
|
const cost = isRecord8(contract.cost) ? contract.cost : {};
|
|
27594
27758
|
const getters = isRecord8(contract.getters) ? contract.getters : {};
|
|
@@ -27654,6 +27818,10 @@ function printCompactToolContract(tool, requestedToolId) {
|
|
|
27654
27818
|
);
|
|
27655
27819
|
}
|
|
27656
27820
|
function printToolPricingOnly(tool, requestedToolId, options = {}) {
|
|
27821
|
+
if (isMonitorTypeTool(tool)) {
|
|
27822
|
+
printMonitorTypePricing(tool);
|
|
27823
|
+
return;
|
|
27824
|
+
}
|
|
27657
27825
|
const contract = toolContractJsonForDescribe(tool, requestedToolId);
|
|
27658
27826
|
const cost = isRecord8(contract.cost) ? contract.cost : {};
|
|
27659
27827
|
const pricingModel = stringField2(cost, "pricingModel") || "unknown";
|
|
@@ -27666,6 +27834,11 @@ function printToolPricingOnly(tool, requestedToolId, options = {}) {
|
|
|
27666
27834
|
console.log(`Billing: ${billingMode}`);
|
|
27667
27835
|
}
|
|
27668
27836
|
function printToolSchemaOnly(tool, requestedToolId) {
|
|
27837
|
+
if (isMonitorTypeTool(tool)) {
|
|
27838
|
+
printMonitorTypeFilters(tool);
|
|
27839
|
+
printMonitorTypeStreams(tool);
|
|
27840
|
+
return;
|
|
27841
|
+
}
|
|
27669
27842
|
const contract = toolContractJsonForDescribe(tool, requestedToolId);
|
|
27670
27843
|
const inputFields = Array.isArray(contract.inputFields) ? contract.inputFields : [];
|
|
27671
27844
|
console.log(`Schema: ${contract.toolId}`);
|
|
@@ -27688,6 +27861,10 @@ function printToolSchemaOnly(tool, requestedToolId) {
|
|
|
27688
27861
|
}
|
|
27689
27862
|
}
|
|
27690
27863
|
function printToolExamplesOnly(tool, requestedToolId, options = {}) {
|
|
27864
|
+
if (isMonitorTypeTool(tool)) {
|
|
27865
|
+
printMonitorTypeDeploy(tool);
|
|
27866
|
+
return;
|
|
27867
|
+
}
|
|
27691
27868
|
if (isPlayLikeTool(tool)) {
|
|
27692
27869
|
printPlayLikeToolUsage(tool, requestedToolId);
|
|
27693
27870
|
return;
|
|
@@ -31949,7 +32126,9 @@ function shouldDeferSkillsSyncForCommand() {
|
|
|
31949
32126
|
const args = process.argv.slice(2);
|
|
31950
32127
|
const command = args[0];
|
|
31951
32128
|
const subcommand = args[1];
|
|
31952
|
-
if (command === "tools" && ["list", "search", "grep", "describe", "get"].includes(
|
|
32129
|
+
if (command === "tools" && ["list", "providers", "search", "grep", "describe", "get"].includes(
|
|
32130
|
+
subcommand ?? ""
|
|
32131
|
+
)) {
|
|
31953
32132
|
return true;
|
|
31954
32133
|
}
|
|
31955
32134
|
return (command === "play" || command === "plays") && subcommand === "run" && args.includes("--json");
|
|
@@ -32175,6 +32354,7 @@ Common commands:
|
|
|
32175
32354
|
deepline plays describe prebuilt/person-linkedin-to-email --json
|
|
32176
32355
|
deepline plays run my.play.ts --input '{"domain":"stripe.com"}'
|
|
32177
32356
|
deepline secrets check HUBSPOT_TOKEN
|
|
32357
|
+
deepline tools providers --changed --json
|
|
32178
32358
|
deepline tools execute hunter_email_verifier --input '{"email":"a@b.com"}'
|
|
32179
32359
|
deepline update
|
|
32180
32360
|
|
package/dist/index.d.mts
CHANGED
|
@@ -131,6 +131,17 @@ interface ToolPricingSummary {
|
|
|
131
131
|
/** Additional user-facing pricing notes. */
|
|
132
132
|
details: string[];
|
|
133
133
|
}
|
|
134
|
+
/** A discoverable provider, returned by {@link DeeplineClient.listProviders}. */
|
|
135
|
+
interface ProviderDefinition {
|
|
136
|
+
provider: string;
|
|
137
|
+
displayName: string;
|
|
138
|
+
toolCount: number;
|
|
139
|
+
categories: string[];
|
|
140
|
+
/** Present for providers in the recent-additions ledger. */
|
|
141
|
+
version?: string;
|
|
142
|
+
/** ISO-8601 date on which this provider was added. */
|
|
143
|
+
releasedAt?: string;
|
|
144
|
+
}
|
|
134
145
|
|
|
135
146
|
/**
|
|
136
147
|
* Summary definition of a callable provider-backed tool.
|
|
@@ -2156,6 +2167,10 @@ declare class DeeplineClient {
|
|
|
2156
2167
|
grepMode?: 'all' | 'any' | 'phrase';
|
|
2157
2168
|
compact?: boolean;
|
|
2158
2169
|
}): Promise<ToolDefinition[]>;
|
|
2170
|
+
/** List discoverable providers without requiring a local plugin catalog. */
|
|
2171
|
+
listProviders(options?: {
|
|
2172
|
+
changed?: boolean;
|
|
2173
|
+
}): Promise<ProviderDefinition[]>;
|
|
2159
2174
|
/**
|
|
2160
2175
|
* Search available tools using Deepline's ranked backend search.
|
|
2161
2176
|
*
|
package/dist/index.d.ts
CHANGED
|
@@ -131,6 +131,17 @@ interface ToolPricingSummary {
|
|
|
131
131
|
/** Additional user-facing pricing notes. */
|
|
132
132
|
details: string[];
|
|
133
133
|
}
|
|
134
|
+
/** A discoverable provider, returned by {@link DeeplineClient.listProviders}. */
|
|
135
|
+
interface ProviderDefinition {
|
|
136
|
+
provider: string;
|
|
137
|
+
displayName: string;
|
|
138
|
+
toolCount: number;
|
|
139
|
+
categories: string[];
|
|
140
|
+
/** Present for providers in the recent-additions ledger. */
|
|
141
|
+
version?: string;
|
|
142
|
+
/** ISO-8601 date on which this provider was added. */
|
|
143
|
+
releasedAt?: string;
|
|
144
|
+
}
|
|
134
145
|
|
|
135
146
|
/**
|
|
136
147
|
* Summary definition of a callable provider-backed tool.
|
|
@@ -2156,6 +2167,10 @@ declare class DeeplineClient {
|
|
|
2156
2167
|
grepMode?: 'all' | 'any' | 'phrase';
|
|
2157
2168
|
compact?: boolean;
|
|
2158
2169
|
}): Promise<ToolDefinition[]>;
|
|
2170
|
+
/** List discoverable providers without requiring a local plugin catalog. */
|
|
2171
|
+
listProviders(options?: {
|
|
2172
|
+
changed?: boolean;
|
|
2173
|
+
}): Promise<ProviderDefinition[]>;
|
|
2159
2174
|
/**
|
|
2160
2175
|
* Search available tools using Deepline's ranked backend search.
|
|
2161
2176
|
*
|
package/dist/index.js
CHANGED
|
@@ -438,7 +438,7 @@ var SDK_RELEASE = {
|
|
|
438
438
|
// 0.1.253 makes play-page browser opening opt-in and retires --no-open.
|
|
439
439
|
// 0.1.254 removes the internal operations tree from the published SDK CLI.
|
|
440
440
|
// Operators use the checkout-local deepline-admin binary instead.
|
|
441
|
-
version: "0.1.
|
|
441
|
+
version: "0.1.275",
|
|
442
442
|
contracts: {
|
|
443
443
|
api: {
|
|
444
444
|
name: "sdk-http-api",
|
|
@@ -2840,6 +2840,14 @@ var DeeplineClient = class {
|
|
|
2840
2840
|
);
|
|
2841
2841
|
return res.tools;
|
|
2842
2842
|
}
|
|
2843
|
+
/** List discoverable providers without requiring a local plugin catalog. */
|
|
2844
|
+
async listProviders(options) {
|
|
2845
|
+
const suffix = options?.changed ? "?changed=true" : "";
|
|
2846
|
+
const res = await this.http.get(
|
|
2847
|
+
`/api/v2/tools/providers${suffix}`
|
|
2848
|
+
);
|
|
2849
|
+
return res.providers;
|
|
2850
|
+
}
|
|
2843
2851
|
/**
|
|
2844
2852
|
* Search available tools using Deepline's ranked backend search.
|
|
2845
2853
|
*
|
package/dist/index.mjs
CHANGED
|
@@ -367,7 +367,7 @@ var SDK_RELEASE = {
|
|
|
367
367
|
// 0.1.253 makes play-page browser opening opt-in and retires --no-open.
|
|
368
368
|
// 0.1.254 removes the internal operations tree from the published SDK CLI.
|
|
369
369
|
// Operators use the checkout-local deepline-admin binary instead.
|
|
370
|
-
version: "0.1.
|
|
370
|
+
version: "0.1.275",
|
|
371
371
|
contracts: {
|
|
372
372
|
api: {
|
|
373
373
|
name: "sdk-http-api",
|
|
@@ -2769,6 +2769,14 @@ var DeeplineClient = class {
|
|
|
2769
2769
|
);
|
|
2770
2770
|
return res.tools;
|
|
2771
2771
|
}
|
|
2772
|
+
/** List discoverable providers without requiring a local plugin catalog. */
|
|
2773
|
+
async listProviders(options) {
|
|
2774
|
+
const suffix = options?.changed ? "?changed=true" : "";
|
|
2775
|
+
const res = await this.http.get(
|
|
2776
|
+
`/api/v2/tools/providers${suffix}`
|
|
2777
|
+
);
|
|
2778
|
+
return res.providers;
|
|
2779
|
+
}
|
|
2772
2780
|
/**
|
|
2773
2781
|
* Search available tools using Deepline's ranked backend search.
|
|
2774
2782
|
*
|