deepline 0.1.164 → 0.1.165

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.
@@ -104,10 +104,10 @@ export const SDK_RELEASE = {
104
104
  // 0.1.111 ships dataset-native tool list getters and result row datasets.
105
105
  // 0.1.154 removes the short-lived generated enrich StepOptions recompute
106
106
  // fields shipped in 0.1.153.
107
- version: '0.1.164',
107
+ version: '0.1.165',
108
108
  apiContract: '2026-06-dataset-handle-results-hard-cutover',
109
109
  supportPolicy: {
110
- latest: '0.1.164',
110
+ latest: '0.1.165',
111
111
  minimumSupported: '0.1.53',
112
112
  deprecatedBelow: '0.1.53',
113
113
  commandMinimumSupported: [
@@ -319,6 +319,15 @@ export interface ToolSearchResult {
319
319
  search_mode?: 'v1' | 'v2';
320
320
  /** Whether search fell back to category matching. */
321
321
  search_fallback_to_category?: boolean;
322
+ /** Explanation and next commands when filters/search succeed but match zero tools. */
323
+ emptyResult?: {
324
+ reason: string;
325
+ message: string;
326
+ suggestions: Array<{
327
+ label: string;
328
+ command: string;
329
+ }>;
330
+ };
322
331
  /** Hint explaining omitted play results when searching tools only. */
323
332
  omitted_plays_hint?: string;
324
333
  /** Copyable CLI command templates for follow-up discovery/execution. */
package/dist/cli/index.js CHANGED
@@ -622,10 +622,10 @@ var SDK_RELEASE = {
622
622
  // 0.1.111 ships dataset-native tool list getters and result row datasets.
623
623
  // 0.1.154 removes the short-lived generated enrich StepOptions recompute
624
624
  // fields shipped in 0.1.153.
625
- version: "0.1.164",
625
+ version: "0.1.165",
626
626
  apiContract: "2026-06-dataset-handle-results-hard-cutover",
627
627
  supportPolicy: {
628
- latest: "0.1.164",
628
+ latest: "0.1.165",
629
629
  minimumSupported: "0.1.53",
630
630
  deprecatedBelow: "0.1.53",
631
631
  commandMinimumSupported: [
@@ -22039,6 +22039,63 @@ function matchesGrepQuery(value, query, mode) {
22039
22039
  if (mode === "any") return terms.some((term) => haystack.includes(term));
22040
22040
  return terms.every((term) => haystack.includes(term));
22041
22041
  }
22042
+ function shellCommandArg(value) {
22043
+ return `'${value.replace(/'/g, `'\\''`)}'`;
22044
+ }
22045
+ function zeroMatchToolGuidance(options) {
22046
+ const categories = options.categories ?? [];
22047
+ const query = options.query?.trim() ?? "";
22048
+ const filterText = [
22049
+ categories.length ? `categories=${categories.join(",")}` : null,
22050
+ query ? `grep=${query}` : null,
22051
+ query ? `grep_mode=${options.mode ?? "all"}` : null
22052
+ ].filter(Boolean).join(" ");
22053
+ const suggestions = [
22054
+ ...query ? [
22055
+ {
22056
+ label: "Use ranked semantic search for intent-style queries",
22057
+ command: `deepline tools search -- ${shellCommandArg(query)}`
22058
+ },
22059
+ ...options.mode === "all" ? [
22060
+ {
22061
+ label: "Relax literal grep from AND to OR matching",
22062
+ command: `deepline tools grep --mode any -- ${shellCommandArg(query)}`
22063
+ }
22064
+ ] : []
22065
+ ] : [],
22066
+ {
22067
+ label: "List the current atomic tool catalog",
22068
+ command: "deepline tools list --json"
22069
+ },
22070
+ ...query ? [
22071
+ {
22072
+ label: "Search composed Deepline plays separately",
22073
+ command: `deepline plays search -- ${shellCommandArg(query)}`
22074
+ }
22075
+ ] : []
22076
+ ];
22077
+ return {
22078
+ reason: "filters_matched_no_atomic_tools",
22079
+ message: `The tools catalog responded successfully, but no atomic provider tools matched ${filterText || "the current filters"}. This is a zero-match filter result, not a registry outage.`,
22080
+ suggestions
22081
+ };
22082
+ }
22083
+ function zeroMatchRender(emptyResult) {
22084
+ return {
22085
+ sections: [
22086
+ {
22087
+ title: "0 tools available:",
22088
+ lines: [emptyResult.message]
22089
+ },
22090
+ {
22091
+ title: "suggestions",
22092
+ lines: emptyResult.suggestions.map(
22093
+ (suggestion) => `${suggestion.label}: ${suggestion.command}`
22094
+ )
22095
+ }
22096
+ ]
22097
+ };
22098
+ }
22042
22099
  async function listTools(args) {
22043
22100
  const client2 = new DeeplineClient();
22044
22101
  const categoryArgIndex = args.findIndex((arg) => arg === "--categories");
@@ -22053,8 +22110,9 @@ async function listTools(args) {
22053
22110
  (category) => item.categories.includes(category)
22054
22111
  )
22055
22112
  );
22113
+ const emptyResult = items.length === 0 && requestedCategories.length > 0 ? zeroMatchToolGuidance({ categories: requestedCategories }) : null;
22056
22114
  const render = {
22057
- sections: [
22115
+ sections: emptyResult ? zeroMatchRender(emptyResult).sections : [
22058
22116
  {
22059
22117
  title: `${items.length} tools available:`,
22060
22118
  lines: items.map((item) => {
@@ -22076,6 +22134,7 @@ async function listTools(args) {
22076
22134
  {
22077
22135
  tools: outputItems,
22078
22136
  count: outputItems.length,
22137
+ ...emptyResult ? { emptyResult } : {},
22079
22138
  filters: {
22080
22139
  categories: requestedCategories
22081
22140
  },
@@ -22147,6 +22206,11 @@ async function grepTools(queryInput, options = {}) {
22147
22206
  );
22148
22207
  const shouldCompact = options.compact || !options.json;
22149
22208
  const outputTools = shouldCompact ? tools.slice(0, 8).map(compactTool) : tools;
22209
+ const emptyResult = tools.length === 0 ? zeroMatchToolGuidance({
22210
+ categories: requestedCategories,
22211
+ query,
22212
+ mode
22213
+ }) : null;
22150
22214
  printCommandEnvelope(
22151
22215
  {
22152
22216
  tools: outputTools,
@@ -22159,6 +22223,10 @@ async function grepTools(queryInput, options = {}) {
22159
22223
  filters: {
22160
22224
  categories: requestedCategories
22161
22225
  },
22226
+ ...emptyResult ? {
22227
+ emptyResult,
22228
+ render: zeroMatchRender(emptyResult)
22229
+ } : {},
22162
22230
  commandTemplates: TOOL_COMMAND_TEMPLATES
22163
22231
  },
22164
22232
  { json: options.json || shouldEmitJson() }
@@ -607,10 +607,10 @@ var SDK_RELEASE = {
607
607
  // 0.1.111 ships dataset-native tool list getters and result row datasets.
608
608
  // 0.1.154 removes the short-lived generated enrich StepOptions recompute
609
609
  // fields shipped in 0.1.153.
610
- version: "0.1.164",
610
+ version: "0.1.165",
611
611
  apiContract: "2026-06-dataset-handle-results-hard-cutover",
612
612
  supportPolicy: {
613
- latest: "0.1.164",
613
+ latest: "0.1.165",
614
614
  minimumSupported: "0.1.53",
615
615
  deprecatedBelow: "0.1.53",
616
616
  commandMinimumSupported: [
@@ -22085,6 +22085,63 @@ function matchesGrepQuery(value, query, mode) {
22085
22085
  if (mode === "any") return terms.some((term) => haystack.includes(term));
22086
22086
  return terms.every((term) => haystack.includes(term));
22087
22087
  }
22088
+ function shellCommandArg(value) {
22089
+ return `'${value.replace(/'/g, `'\\''`)}'`;
22090
+ }
22091
+ function zeroMatchToolGuidance(options) {
22092
+ const categories = options.categories ?? [];
22093
+ const query = options.query?.trim() ?? "";
22094
+ const filterText = [
22095
+ categories.length ? `categories=${categories.join(",")}` : null,
22096
+ query ? `grep=${query}` : null,
22097
+ query ? `grep_mode=${options.mode ?? "all"}` : null
22098
+ ].filter(Boolean).join(" ");
22099
+ const suggestions = [
22100
+ ...query ? [
22101
+ {
22102
+ label: "Use ranked semantic search for intent-style queries",
22103
+ command: `deepline tools search -- ${shellCommandArg(query)}`
22104
+ },
22105
+ ...options.mode === "all" ? [
22106
+ {
22107
+ label: "Relax literal grep from AND to OR matching",
22108
+ command: `deepline tools grep --mode any -- ${shellCommandArg(query)}`
22109
+ }
22110
+ ] : []
22111
+ ] : [],
22112
+ {
22113
+ label: "List the current atomic tool catalog",
22114
+ command: "deepline tools list --json"
22115
+ },
22116
+ ...query ? [
22117
+ {
22118
+ label: "Search composed Deepline plays separately",
22119
+ command: `deepline plays search -- ${shellCommandArg(query)}`
22120
+ }
22121
+ ] : []
22122
+ ];
22123
+ return {
22124
+ reason: "filters_matched_no_atomic_tools",
22125
+ message: `The tools catalog responded successfully, but no atomic provider tools matched ${filterText || "the current filters"}. This is a zero-match filter result, not a registry outage.`,
22126
+ suggestions
22127
+ };
22128
+ }
22129
+ function zeroMatchRender(emptyResult) {
22130
+ return {
22131
+ sections: [
22132
+ {
22133
+ title: "0 tools available:",
22134
+ lines: [emptyResult.message]
22135
+ },
22136
+ {
22137
+ title: "suggestions",
22138
+ lines: emptyResult.suggestions.map(
22139
+ (suggestion) => `${suggestion.label}: ${suggestion.command}`
22140
+ )
22141
+ }
22142
+ ]
22143
+ };
22144
+ }
22088
22145
  async function listTools(args) {
22089
22146
  const client2 = new DeeplineClient();
22090
22147
  const categoryArgIndex = args.findIndex((arg) => arg === "--categories");
@@ -22099,8 +22156,9 @@ async function listTools(args) {
22099
22156
  (category) => item.categories.includes(category)
22100
22157
  )
22101
22158
  );
22159
+ const emptyResult = items.length === 0 && requestedCategories.length > 0 ? zeroMatchToolGuidance({ categories: requestedCategories }) : null;
22102
22160
  const render = {
22103
- sections: [
22161
+ sections: emptyResult ? zeroMatchRender(emptyResult).sections : [
22104
22162
  {
22105
22163
  title: `${items.length} tools available:`,
22106
22164
  lines: items.map((item) => {
@@ -22122,6 +22180,7 @@ async function listTools(args) {
22122
22180
  {
22123
22181
  tools: outputItems,
22124
22182
  count: outputItems.length,
22183
+ ...emptyResult ? { emptyResult } : {},
22125
22184
  filters: {
22126
22185
  categories: requestedCategories
22127
22186
  },
@@ -22193,6 +22252,11 @@ async function grepTools(queryInput, options = {}) {
22193
22252
  );
22194
22253
  const shouldCompact = options.compact || !options.json;
22195
22254
  const outputTools = shouldCompact ? tools.slice(0, 8).map(compactTool) : tools;
22255
+ const emptyResult = tools.length === 0 ? zeroMatchToolGuidance({
22256
+ categories: requestedCategories,
22257
+ query,
22258
+ mode
22259
+ }) : null;
22196
22260
  printCommandEnvelope(
22197
22261
  {
22198
22262
  tools: outputTools,
@@ -22205,6 +22269,10 @@ async function grepTools(queryInput, options = {}) {
22205
22269
  filters: {
22206
22270
  categories: requestedCategories
22207
22271
  },
22272
+ ...emptyResult ? {
22273
+ emptyResult,
22274
+ render: zeroMatchRender(emptyResult)
22275
+ } : {},
22208
22276
  commandTemplates: TOOL_COMMAND_TEMPLATES
22209
22277
  },
22210
22278
  { json: options.json || shouldEmitJson() }
package/dist/index.d.mts CHANGED
@@ -295,6 +295,15 @@ interface ToolSearchResult {
295
295
  search_mode?: 'v1' | 'v2';
296
296
  /** Whether search fell back to category matching. */
297
297
  search_fallback_to_category?: boolean;
298
+ /** Explanation and next commands when filters/search succeed but match zero tools. */
299
+ emptyResult?: {
300
+ reason: string;
301
+ message: string;
302
+ suggestions: Array<{
303
+ label: string;
304
+ command: string;
305
+ }>;
306
+ };
298
307
  /** Hint explaining omitted play results when searching tools only. */
299
308
  omitted_plays_hint?: string;
300
309
  /** Copyable CLI command templates for follow-up discovery/execution. */
package/dist/index.d.ts CHANGED
@@ -295,6 +295,15 @@ interface ToolSearchResult {
295
295
  search_mode?: 'v1' | 'v2';
296
296
  /** Whether search fell back to category matching. */
297
297
  search_fallback_to_category?: boolean;
298
+ /** Explanation and next commands when filters/search succeed but match zero tools. */
299
+ emptyResult?: {
300
+ reason: string;
301
+ message: string;
302
+ suggestions: Array<{
303
+ label: string;
304
+ command: string;
305
+ }>;
306
+ };
298
307
  /** Hint explaining omitted play results when searching tools only. */
299
308
  omitted_plays_hint?: string;
300
309
  /** Copyable CLI command templates for follow-up discovery/execution. */
package/dist/index.js CHANGED
@@ -421,10 +421,10 @@ var SDK_RELEASE = {
421
421
  // 0.1.111 ships dataset-native tool list getters and result row datasets.
422
422
  // 0.1.154 removes the short-lived generated enrich StepOptions recompute
423
423
  // fields shipped in 0.1.153.
424
- version: "0.1.164",
424
+ version: "0.1.165",
425
425
  apiContract: "2026-06-dataset-handle-results-hard-cutover",
426
426
  supportPolicy: {
427
- latest: "0.1.164",
427
+ latest: "0.1.165",
428
428
  minimumSupported: "0.1.53",
429
429
  deprecatedBelow: "0.1.53",
430
430
  commandMinimumSupported: [
package/dist/index.mjs CHANGED
@@ -351,10 +351,10 @@ var SDK_RELEASE = {
351
351
  // 0.1.111 ships dataset-native tool list getters and result row datasets.
352
352
  // 0.1.154 removes the short-lived generated enrich StepOptions recompute
353
353
  // fields shipped in 0.1.153.
354
- version: "0.1.164",
354
+ version: "0.1.165",
355
355
  apiContract: "2026-06-dataset-handle-results-hard-cutover",
356
356
  supportPolicy: {
357
- latest: "0.1.164",
357
+ latest: "0.1.165",
358
358
  minimumSupported: "0.1.53",
359
359
  deprecatedBelow: "0.1.53",
360
360
  commandMinimumSupported: [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "deepline",
3
- "version": "0.1.164",
3
+ "version": "0.1.165",
4
4
  "description": "Deepline SDK + CLI — B2B data enrichment powered by durable cloud execution",
5
5
  "license": "MIT",
6
6
  "repository": {