deepline 0.3.482 → 0.3.483

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 (121) hide show
  1. package/dist/bundling-sources/sdk/src/release.ts +1 -1
  2. package/dist/cli/{auth-R5GFDAMI.mjs → auth-2NXF6Q3Q.mjs} +5 -5
  3. package/dist/cli/auth-JHQKM6QY.js +43 -0
  4. package/dist/cli/{billing-DXKVQPTC.js → billing-5PW4L5WD.js} +79 -79
  5. package/dist/cli/{billing-SO5SFQFC.mjs → billing-W2Y4EOZP.mjs} +6 -6
  6. package/dist/cli/{chunk-DYHBKFCW.mjs → chunk-25IGCYJP.mjs} +3 -3
  7. package/dist/cli/{chunk-3EN2BLAS.js → chunk-2JWG2H2N.js} +1 -1
  8. package/dist/cli/{chunk-Y4Y2QUFL.js → chunk-2MKX3HV3.js} +5 -5
  9. package/dist/cli/{chunk-LKFQERA6.js → chunk-2T4OSJEH.js} +21 -21
  10. package/dist/cli/{chunk-JLI7SK55.mjs → chunk-4X23YY2E.mjs} +5 -5
  11. package/dist/cli/chunk-5AEDYVB6.mjs +6 -0
  12. package/dist/cli/{chunk-SFZCKYTD.js → chunk-5ICAG4RE.js} +9 -9
  13. package/dist/cli/{chunk-UVU4OCYO.js → chunk-5JCXS4MP.js} +5 -5
  14. package/dist/cli/{chunk-OVSSKTXG.js → chunk-5LHU7NUS.js} +3 -3
  15. package/dist/cli/{chunk-DZRHML3J.js → chunk-62XGOB2D.js} +26 -26
  16. package/dist/cli/{chunk-NXTZ4UNI.js → chunk-75IIHFN6.js} +4 -4
  17. package/dist/cli/{chunk-LVOEZVDW.mjs → chunk-7APXZ3CX.mjs} +2 -2
  18. package/dist/cli/{chunk-M6B2OZGA.js → chunk-7TKLISLM.js} +3 -3
  19. package/dist/cli/{chunk-RCWBWM5J.mjs → chunk-AWAFYRFV.mjs} +1 -1
  20. package/dist/cli/{chunk-RLYJ4O6Q.js → chunk-B7HQL77V.js} +53 -53
  21. package/dist/cli/{chunk-RLG2MNXH.mjs → chunk-C3LJSOQ6.mjs} +4 -4
  22. package/dist/cli/chunk-D3BCSAN7.js +6 -0
  23. package/dist/cli/{chunk-AEMPAR6L.js → chunk-DS455RPF.js} +3 -3
  24. package/dist/cli/{chunk-G7N2DYQL.mjs → chunk-EDMCD7MX.mjs} +5 -5
  25. package/dist/cli/{chunk-QCIG6V26.mjs → chunk-EGHYGTJM.mjs} +1 -1
  26. package/dist/cli/{chunk-LMLN7R7X.mjs → chunk-FAZTLYJO.mjs} +2 -2
  27. package/dist/cli/{chunk-EC2QPBSZ.mjs → chunk-FGEC5SWP.mjs} +4 -4
  28. package/dist/cli/{chunk-5MHCTVMM.mjs → chunk-FK47YUPC.mjs} +1 -1
  29. package/dist/cli/{chunk-Y6OKWGAM.mjs → chunk-GGJQ4HJW.mjs} +2 -2
  30. package/dist/cli/{chunk-OO6HA5OT.js → chunk-GONUMUBM.js} +7 -7
  31. package/dist/cli/{chunk-BK3XMHPF.mjs → chunk-GRE3ID5E.mjs} +1 -1
  32. package/dist/cli/{chunk-SKBXTN5F.mjs → chunk-IEV5UWPN.mjs} +1 -1
  33. package/dist/cli/chunk-ISP7ZENV.mjs +200 -0
  34. package/dist/cli/{chunk-7SZUHFJ6.mjs → chunk-J7S3DJB4.mjs} +2 -2
  35. package/dist/cli/{chunk-AJT436SK.mjs → chunk-JJSLEMQQ.mjs} +1 -1
  36. package/dist/cli/{chunk-2KC3MJP5.mjs → chunk-JYEZ6BWX.mjs} +2 -2
  37. package/dist/cli/{chunk-BHID34HA.js → chunk-MYB6JVSD.js} +16 -16
  38. package/dist/cli/{chunk-AZRG5NWV.mjs → chunk-NREZRYPU.mjs} +2 -2
  39. package/dist/cli/{chunk-4V34YMLU.js → chunk-PHDEQ6W3.js} +6 -6
  40. package/dist/cli/{chunk-FKGA7VKL.mjs → chunk-PRL7EKJZ.mjs} +4 -4
  41. package/dist/cli/{chunk-YT6GV6RP.js → chunk-QSYA6VE4.js} +2 -2
  42. package/dist/cli/{chunk-FUVJPW7O.js → chunk-R2OR4RHV.js} +8 -8
  43. package/dist/cli/{chunk-DM7APZWK.mjs → chunk-S24CK3CJ.mjs} +2 -2
  44. package/dist/cli/{chunk-KDJZXX7I.mjs → chunk-SCPFOH5Z.mjs} +1 -1
  45. package/dist/cli/{chunk-6NF7S5WY.js → chunk-T5GZZJ7O.js} +6 -6
  46. package/dist/cli/{chunk-HYS35M6H.mjs → chunk-UDF2CY4D.mjs} +10 -10
  47. package/dist/cli/{chunk-ETJSPSOQ.js → chunk-UGBZ6MCR.js} +2 -2
  48. package/dist/cli/{chunk-MFNEJOQG.js → chunk-UY7OXFVU.js} +10 -10
  49. package/dist/cli/{chunk-2ZIUCN5I.js → chunk-VFEW53L5.js} +93 -93
  50. package/dist/cli/{chunk-VU2PUAEH.js → chunk-WI2HNYQX.js} +53 -53
  51. package/dist/cli/{chunk-AZUDSDZX.js → chunk-WKB6Y43W.js} +37 -37
  52. package/dist/cli/chunk-XRIQN6EP.js +200 -0
  53. package/dist/cli/{chunk-FQFAWIRK.mjs → chunk-YL64JIQ7.mjs} +1 -1
  54. package/dist/cli/{csv-IC3XJ4PV.mjs → csv-DIFVIR23.mjs} +4 -4
  55. package/dist/cli/{csv-UWFQLI3K.js → csv-EKEFLUIW.js} +13 -13
  56. package/dist/cli/{db-RIPJQYF3.mjs → db-DOW4EVEU.mjs} +6 -6
  57. package/dist/cli/{db-PT73YDEP.js → db-S7DDRUHX.js} +27 -27
  58. package/dist/cli/{describe-GHI2MTDW.mjs → describe-KSZFOWKV.mjs} +18 -17
  59. package/dist/cli/describe-RXYQCJRR.js +49 -0
  60. package/dist/cli/{executions-QUOWVXCU.js → executions-3DU5IXB6.js} +8 -8
  61. package/dist/cli/{executions-XUJBZF5H.mjs → executions-CAG7YC5K.mjs} +6 -6
  62. package/dist/cli/{feedback-JOZ7QNGH.mjs → feedback-BQMPTE47.mjs} +4 -4
  63. package/dist/cli/{feedback-UDZ7BFB3.js → feedback-I65JMCP2.js} +8 -8
  64. package/dist/cli/git-ADIABNMQ.js +25 -0
  65. package/dist/cli/{git-O67OED4L.mjs → git-UQUCD7XZ.mjs} +5 -5
  66. package/dist/cli/index.js +138 -138
  67. package/dist/cli/index.mjs +42 -42
  68. package/dist/cli/{legacy-noops-T2G2TKO2.mjs → legacy-noops-JXKLHUI3.mjs} +5 -5
  69. package/dist/cli/{legacy-noops-ZFD6Z2ID.js → legacy-noops-OLNT2BG5.js} +8 -8
  70. package/dist/cli/{monitors-WSH4I37O.mjs → monitors-DLTHHAFQ.mjs} +7 -7
  71. package/dist/cli/{monitors-QPWEWJW7.js → monitors-Z5X56AZN.js} +91 -91
  72. package/dist/cli/{org-FVM465Q4.mjs → org-6EZZHD3M.mjs} +6 -6
  73. package/dist/cli/{org-PZOFC4P3.js → org-XBHJLKUG.js} +72 -72
  74. package/dist/cli/{pages-A5SLKL6L.mjs → pages-MYXROSVK.mjs} +6 -6
  75. package/dist/cli/{pages-UMDOU2WF.js → pages-XVJ34SCN.js} +17 -17
  76. package/dist/cli/{play-XKJLIZQE.mjs → play-5PV4LAHE.mjs} +26 -22
  77. package/dist/cli/{play-AFGL5D7B.js → play-ACC4T2XQ.js} +495 -491
  78. package/dist/cli/{providers-A2EIHS3P.mjs → providers-2DLUGIFF.mjs} +6 -6
  79. package/dist/cli/{providers-CQDRM62K.js → providers-JCI3KNE4.js} +9 -9
  80. package/dist/cli/{quickstart-BJ2XCUVV.mjs → quickstart-NSL3C76K.mjs} +4 -4
  81. package/dist/cli/{quickstart-NMJLH7T6.js → quickstart-PDSQEDLD.js} +6 -6
  82. package/dist/cli/{run-S4XTJADQ.js → run-UCFMHOQC.js} +37 -36
  83. package/dist/cli/{run-63I5M3ID.mjs → run-X5MXCM4P.mjs} +26 -25
  84. package/dist/cli/{search-DUIWWZ56.mjs → search-RPEMXV6N.mjs} +8 -8
  85. package/dist/cli/search-YILJZD36.js +32 -0
  86. package/dist/cli/{chunk-EDBQIPMG.mjs → search-output-6UO47B7G.mjs} +14 -194
  87. package/dist/cli/{chunk-UXQZLXHZ.js → search-output-MZH3HLVE.js} +14 -194
  88. package/dist/cli/{secrets-FK4PQJ6U.mjs → secrets-NLEQURD3.mjs} +6 -6
  89. package/dist/cli/{secrets-Q6QEWCAT.js → secrets-UFBASYGY.js} +15 -15
  90. package/dist/cli/{sessions-QJSN6AUL.mjs → sessions-3ALFLWVU.mjs} +5 -5
  91. package/dist/cli/{sessions-KF6JPKFK.js → sessions-JYH4DBEE.js} +6 -6
  92. package/dist/cli/{settings-PIKGA5PF.js → settings-MQYKNAMB.js} +78 -78
  93. package/dist/cli/{settings-UIQP5ERC.mjs → settings-YPRILREA.mjs} +11 -11
  94. package/dist/cli/{setup-ROKA4M5X.js → setup-5IGSHH4E.js} +47 -47
  95. package/dist/cli/{setup-4CALCNAA.mjs → setup-DK4GM227.mjs} +9 -9
  96. package/dist/cli/skills-I4IUZN3U.js +33 -0
  97. package/dist/cli/{skills-SQKRC7W4.mjs → skills-KYBZH3IT.mjs} +7 -7
  98. package/dist/cli/{tools-B6J53QS2.mjs → tools-4B2MHNBN.mjs} +17 -16
  99. package/dist/cli/tools-NLZR7ABS.js +56 -0
  100. package/dist/cli/update-RVDEUJTE.js +33 -0
  101. package/dist/cli/{update-MVKCAJJV.mjs → update-S6VEO7NB.mjs} +9 -9
  102. package/dist/cli/{workflow-VH2H4VS3.js → workflow-FU2XVPUK.js} +17 -17
  103. package/dist/cli/{workflow-3BO5WPZO.mjs → workflow-KXZZYFEF.mjs} +7 -7
  104. package/dist/index.js +10 -10
  105. package/dist/index.mjs +10 -10
  106. package/dist/install-integrity.json +100 -96
  107. package/dist/plays/bundle-play-file.mjs +6 -6
  108. package/dist/release.d.mts +1 -1
  109. package/dist/release.d.ts +1 -1
  110. package/dist/release.js +2 -2
  111. package/dist/release.mjs +1 -1
  112. package/dist/server.js +5 -5
  113. package/dist/server.mjs +3 -3
  114. package/package.json +1 -1
  115. package/dist/cli/auth-Q5VRDGL4.js +0 -43
  116. package/dist/cli/describe-72RFB7RS.js +0 -48
  117. package/dist/cli/git-A6SU7ITW.js +0 -25
  118. package/dist/cli/search-ACCI4VYH.js +0 -32
  119. package/dist/cli/skills-GZQSDPZX.js +0 -33
  120. package/dist/cli/tools-5C7ZVTDG.js +0 -55
  121. package/dist/cli/update-PR4QP7JN.js +0 -33
@@ -1,17 +1,19 @@
1
+ import {
2
+ DEFAULT_SUMMARY_WIDTH
3
+ } from "./chunk-5AEDYVB6.mjs";
1
4
  import {
2
5
  observedMaxText
3
6
  } from "./chunk-LJ5747UC.mjs";
4
7
  import {
5
- DeeplineClient
6
- } from "./chunk-LVOEZVDW.mjs";
7
- import {
8
- printCommandEnvelope,
9
8
  renderCommandEnvelopeText
10
- } from "./chunk-AZRG5NWV.mjs";
11
- import {
12
- resolveConfig,
13
- sdkCliStateDirPath
14
- } from "./chunk-5MHCTVMM.mjs";
9
+ } from "./chunk-NREZRYPU.mjs";
10
+ import "./chunk-FK47YUPC.mjs";
11
+ import "./chunk-GRE3ID5E.mjs";
12
+ import "./chunk-4QF2K7TM.mjs";
13
+ import "./chunk-DLIRSHV6.mjs";
14
+ import "./chunk-HBL4PM5Q.mjs";
15
+ import "./chunk-SCPFOH5Z.mjs";
16
+ import "./chunk-WZYKRD7T.mjs";
15
17
  import {
16
18
  __commonJS,
17
19
  __toESM
@@ -5705,36 +5707,6 @@ var require_src = __commonJS({
5705
5707
  }
5706
5708
  });
5707
5709
 
5708
- // src/cli/commands/search.ts
5709
- import { Option } from "commander";
5710
-
5711
- // src/cli/search-ref.ts
5712
- import { mkdirSync, readFileSync, writeFileSync } from "fs";
5713
- import { dirname, join } from "path";
5714
- var SEARCH_REF_TTL_MS = 15 * 6e4;
5715
- function lastSearchPath() {
5716
- return join(sdkCliStateDirPath(resolveConfig().baseUrl), "last-search.json");
5717
- }
5718
- function rememberSearchRef(searchRef) {
5719
- try {
5720
- mkdirSync(dirname(lastSearchPath()), { recursive: true });
5721
- writeFileSync(
5722
- lastSearchPath(),
5723
- JSON.stringify({ searchRef, at: Date.now() }),
5724
- { mode: 384 }
5725
- );
5726
- } catch {
5727
- }
5728
- }
5729
- function recentSearchRef() {
5730
- try {
5731
- const saved = JSON.parse(readFileSync(lastSearchPath(), "utf8"));
5732
- return typeof saved.searchRef === "string" && typeof saved.at === "number" && Date.now() - saved.at < SEARCH_REF_TTL_MS ? saved.searchRef : void 0;
5733
- } catch {
5734
- return void 0;
5735
- }
5736
- }
5737
-
5738
5710
  // src/cli/text-table.ts
5739
5711
  var import_table = __toESM(require_src());
5740
5712
  function formatTextTable(rows, columns) {
@@ -5759,7 +5731,6 @@ function formatTextTable(rows, columns) {
5759
5731
  }
5760
5732
 
5761
5733
  // src/cli/search-output.ts
5762
- var DEFAULT_SUMMARY_WIDTH = 140;
5763
5734
  function clipSummary(value, width) {
5764
5735
  const characters = Array.from(value.replace(/\s+/gu, " ").trim());
5765
5736
  return characters.length <= width ? characters.join("") : `${characters.slice(0, width - 1).join("")}\u2026`;
@@ -5920,159 +5891,8 @@ ${formatTextTable(rows, columns)}
5920
5891
  ${details}
5921
5892
  ${followUps}`;
5922
5893
  }
5923
-
5924
- // src/cli/commands/search.ts
5925
- var SEARCH_TYPES = [
5926
- "tools",
5927
- "plays",
5928
- "monitors",
5929
- "prebuilts",
5930
- "custom"
5931
- ];
5932
- var USAGE = 'Usage: deepline search "<task>" [--type <types>] [--json]';
5933
- function parseTypes(flag, raw) {
5934
- const names = (raw ?? "").split(",").map((name) => name.trim().toLowerCase()).filter(Boolean);
5935
- const unknown = names.filter(
5936
- (name) => !SEARCH_TYPES.includes(name)
5937
- );
5938
- if (unknown.length > 0) {
5939
- throw new Error(
5940
- `Unknown ${flag} ${unknown.join(", ")}. Use any of: ${SEARCH_TYPES.join(", ")}.`
5941
- );
5942
- }
5943
- return names;
5944
- }
5945
- function optionalInteger(raw) {
5946
- return raw === void 0 ? void 0 : Number.parseInt(raw, 10);
5947
- }
5948
- function appendCsv(value, previous) {
5949
- return previous ? `${previous},${value}` : value;
5950
- }
5951
- function addSearchOptions(command) {
5952
- const hidden = (flags) => new Option(flags).hideHelp();
5953
- return command.option(
5954
- "--categories <categories>",
5955
- "Only tools in these categories, comma-separated"
5956
- ).addOption(hidden("--search_terms <terms>")).addOption(hidden("--search-terms <terms>")).addOption(hidden("--task <sentence>")).option("--limit <count>", "Results per page, 1-50").option("--offset <count>", "Results to skip, for the next page").option(
5957
- "--summary-width <chars>",
5958
- `Description characters per result (default ${DEFAULT_SUMMARY_WIDTH})`
5959
- ).addOption(hidden("--search-mode <mode>")).addOption(hidden("--include-search-debug")).option("--json", "Print JSON instead of the readable list");
5960
- }
5961
- function asRun(command) {
5962
- return command.replace(/^deepline (?:tools execute|plays run) /, "deepline run ").replace(/ --watch\b/, "");
5963
- }
5964
- function pointAtDescribe(result) {
5965
- const old = /`deepline (tools|plays) describe [^`]*`/;
5966
- const render = result.render;
5967
- for (const section of render?.sections ?? []) {
5968
- if (!section.lines?.some((line) => old.test(line))) continue;
5969
- section.lines = [
5970
- "Run `deepline describe <id>` before executing a tool or running a play.",
5971
- ...section.lines.filter((line) => !old.test(line))
5972
- ];
5973
- }
5974
- const templates = result.commandTemplates;
5975
- for (const template of Object.values(templates ?? {})) {
5976
- if (template.describe) template.describe = "deepline describe <id>";
5977
- for (const key of ["execute", "run"]) {
5978
- if (template[key]) template[key] = asRun(template[key]);
5979
- }
5980
- }
5981
- const results = Array.isArray(result.results) ? result.results : [];
5982
- for (const item of results) {
5983
- for (const key of ["executeCommand", "runCommand"]) {
5984
- if (typeof item[key] === "string") item[key] = asRun(item[key]);
5985
- }
5986
- }
5987
- }
5988
- async function runSearch(queryInput, options, types, exclude = []) {
5989
- const query = queryInput?.trim() ?? "";
5990
- const searchTerms = options.searchTerms ?? options.search_terms;
5991
- if (!query && !options.categories?.trim() && !searchTerms?.trim()) {
5992
- console.error(USAGE);
5993
- return 1;
5994
- }
5995
- const summaryWidth = optionalInteger(options.summaryWidth) ?? DEFAULT_SUMMARY_WIDTH;
5996
- if (!Number.isInteger(summaryWidth) || summaryWidth < 2) {
5997
- console.error("--summary-width must be an integer of at least 2.");
5998
- return 1;
5999
- }
6000
- const { search_ref: searchRef, ...result } = await new DeeplineClient().search({
6001
- query,
6002
- types,
6003
- exclude,
6004
- categories: options.categories,
6005
- searchTerms,
6006
- task: options.task,
6007
- limit: optionalInteger(options.limit),
6008
- offset: optionalInteger(options.offset),
6009
- searchMode: options.searchMode === "v1" || options.searchMode === "v2" ? options.searchMode : void 0,
6010
- includeSearchDebug: Boolean(options.includeSearchDebug)
6011
- });
6012
- if (searchRef) rememberSearchRef(searchRef);
6013
- pointAtDescribe(result);
6014
- printCommandEnvelope(result, {
6015
- json: options.json === true,
6016
- text: renderSearchResults(result, summaryWidth)
6017
- });
6018
- return 0;
6019
- }
6020
- function registerDeprecatedSearchCommand(parent, typesFor) {
6021
- const name = `deepline ${parent.name()} search`;
6022
- addSearchOptions(
6023
- parent.command("search [task]").description(`Deprecated. Use deepline search --type <types>.`).addHelpText(
6024
- "after",
6025
- `
6026
- Notes:
6027
- Deprecated alias for the unified search. It runs deepline search with the
6028
- matching --type and returns the same results envelope.
6029
-
6030
- Examples:
6031
- deepline search "name and company domain -> work email" --type ${typesFor({}).join(",")}
6032
- `
6033
- ).option("--all", "Include plays your workspace created").option("--compact", "Accepted for compatibility; results are compact")
6034
- ).action(async (query, options) => {
6035
- const types = typesFor(options);
6036
- console.error(
6037
- `${name} is deprecated. Use: deepline search${query ? ` ${JSON.stringify(query)}` : ""} --type ${types.join(",")}`
6038
- );
6039
- process.exitCode = await runSearch(query, options, types);
6040
- });
6041
- }
6042
- function registerSearchCommand(program) {
6043
- addSearchOptions(
6044
- program.command("search [task]").description(
6045
- "Search tools, monitors, and plays together, ranked by intent."
6046
- ).option(
6047
- "--type <types>",
6048
- "Only these kinds, comma-separated: tools, plays, monitors",
6049
- appendCsv
6050
- ).option(
6051
- "--exclude <types>",
6052
- "Leave these kinds out, comma-separated",
6053
- appendCsv
6054
- )
6055
- ).action(async (query, options) => {
6056
- let types;
6057
- let exclude;
6058
- try {
6059
- types = parseTypes("--type", options.type);
6060
- exclude = parseTypes("--exclude", options.exclude);
6061
- } catch (error) {
6062
- console.error(error instanceof Error ? error.message : String(error));
6063
- process.exitCode = 1;
6064
- return;
6065
- }
6066
- process.exitCode = await runSearch(query, options, types, exclude);
6067
- });
6068
- }
6069
-
6070
5894
  export {
6071
- recentSearchRef,
6072
- SEARCH_TYPES,
6073
- parseTypes,
6074
- appendCsv,
6075
- pointAtDescribe,
6076
- registerDeprecatedSearchCommand,
6077
- registerSearchCommand
5895
+ DEFAULT_SUMMARY_WIDTH,
5896
+ SEARCH_KIND_COLUMN_ENABLED,
5897
+ renderSearchResults
6078
5898
  };
@@ -1,17 +1,19 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
2
2
 
3
- var _chunkZM2YPJQJjs = require('./chunk-ZM2YPJQJ.js');
4
-
5
-
6
- var _chunkY4Y2QUFLjs = require('./chunk-Y4Y2QUFL.js');
3
+ var _chunkD3BCSAN7js = require('./chunk-D3BCSAN7.js');
7
4
 
8
5
 
9
-
10
- var _chunkOO6HA5OTjs = require('./chunk-OO6HA5OT.js');
11
-
6
+ var _chunkZM2YPJQJjs = require('./chunk-ZM2YPJQJ.js');
12
7
 
13
8
 
14
- var _chunkOVSSKTXGjs = require('./chunk-OVSSKTXG.js');
9
+ var _chunkGONUMUBMjs = require('./chunk-GONUMUBM.js');
10
+ require('./chunk-5LHU7NUS.js');
11
+ require('./chunk-75IIHFN6.js');
12
+ require('./chunk-ALJJRZNJ.js');
13
+ require('./chunk-XNYIZMNQ.js');
14
+ require('./chunk-DIAWYWT5.js');
15
+ require('./chunk-2JWG2H2N.js');
16
+ require('./chunk-OG64RBAC.js');
15
17
 
16
18
 
17
19
 
@@ -5705,36 +5707,6 @@ var require_src = _chunkCOGTRVWWjs.__commonJS.call(void 0, {
5705
5707
  }
5706
5708
  });
5707
5709
 
5708
- // src/cli/commands/search.ts
5709
- var _commander = require('commander');
5710
-
5711
- // src/cli/search-ref.ts
5712
- var _fs = require('fs');
5713
- var _path = require('path');
5714
- var SEARCH_REF_TTL_MS = 15 * 6e4;
5715
- function lastSearchPath() {
5716
- return _path.join.call(void 0, _chunkOVSSKTXGjs.sdkCliStateDirPath.call(void 0, _chunkOVSSKTXGjs.resolveConfig.call(void 0, ).baseUrl), "last-search.json");
5717
- }
5718
- function rememberSearchRef(searchRef) {
5719
- try {
5720
- _fs.mkdirSync.call(void 0, _path.dirname.call(void 0, lastSearchPath()), { recursive: true });
5721
- _fs.writeFileSync.call(void 0,
5722
- lastSearchPath(),
5723
- JSON.stringify({ searchRef, at: Date.now() }),
5724
- { mode: 384 }
5725
- );
5726
- } catch (e2) {
5727
- }
5728
- }
5729
- function recentSearchRef() {
5730
- try {
5731
- const saved = JSON.parse(_fs.readFileSync.call(void 0, lastSearchPath(), "utf8"));
5732
- return typeof saved.searchRef === "string" && typeof saved.at === "number" && Date.now() - saved.at < SEARCH_REF_TTL_MS ? saved.searchRef : void 0;
5733
- } catch (e3) {
5734
- return void 0;
5735
- }
5736
- }
5737
-
5738
5710
  // src/cli/text-table.ts
5739
5711
  var import_table = _chunkCOGTRVWWjs.__toESM.call(void 0, require_src());
5740
5712
  function formatTextTable(rows, columns) {
@@ -5759,7 +5731,6 @@ function formatTextTable(rows, columns) {
5759
5731
  }
5760
5732
 
5761
5733
  // src/cli/search-output.ts
5762
- var DEFAULT_SUMMARY_WIDTH = 140;
5763
5734
  function clipSummary(value, width) {
5764
5735
  const characters = Array.from(value.replace(/\s+/gu, " ").trim());
5765
5736
  return characters.length <= width ? characters.join("") : `${characters.slice(0, width - 1).join("")}\u2026`;
@@ -5875,9 +5846,9 @@ var OPTIONAL_COLUMNS = [
5875
5846
  { header: "FAILURES", key: "failureRate" },
5876
5847
  { header: "P95", key: "p95" }
5877
5848
  ];
5878
- function renderSearchResults(result, summaryWidth = DEFAULT_SUMMARY_WIDTH) {
5849
+ function renderSearchResults(result, summaryWidth = _chunkD3BCSAN7js.DEFAULT_SUMMARY_WIDTH) {
5879
5850
  if (result.results.length === 0)
5880
- return _chunkOO6HA5OTjs.renderCommandEnvelopeText.call(void 0, result);
5851
+ return _chunkGONUMUBMjs.renderCommandEnvelopeText.call(void 0, result);
5881
5852
  const rows = result.results.map((item) => searchRow(item, summaryWidth));
5882
5853
  const kinds = new Set(rows.map((row) => row.kind));
5883
5854
  const onlyTools = kinds.size === 1 && kinds.has("tool");
@@ -5902,7 +5873,7 @@ function renderSearchResults(result, summaryWidth = DEFAULT_SUMMARY_WIDTH) {
5902
5873
  actions: _optionalChain([render, 'optionalAccess', _12 => _12.actions])
5903
5874
  };
5904
5875
  const followUps = _optionalChain([remaining, 'access', _13 => _13.sections, 'optionalAccess', _14 => _14.length]) || _optionalChain([remaining, 'access', _15 => _15.actions, 'optionalAccess', _16 => _16.length]) ? `
5905
- ${_chunkOO6HA5OTjs.renderCommandEnvelopeText.call(void 0, { render: remaining })}` : "";
5876
+ ${_chunkGONUMUBMjs.renderCommandEnvelopeText.call(void 0, { render: remaining })}` : "";
5906
5877
  const notes = rows.flatMap(
5907
5878
  (row) => row.notes.map((note) => ` ${row.id}: ${note}`)
5908
5879
  );
@@ -5921,158 +5892,7 @@ ${details}
5921
5892
  ${followUps}`;
5922
5893
  }
5923
5894
 
5924
- // src/cli/commands/search.ts
5925
- var SEARCH_TYPES = [
5926
- "tools",
5927
- "plays",
5928
- "monitors",
5929
- "prebuilts",
5930
- "custom"
5931
- ];
5932
- var USAGE = 'Usage: deepline search "<task>" [--type <types>] [--json]';
5933
- function parseTypes(flag, raw) {
5934
- const names = (_nullishCoalesce(raw, () => ( ""))).split(",").map((name) => name.trim().toLowerCase()).filter(Boolean);
5935
- const unknown = names.filter(
5936
- (name) => !SEARCH_TYPES.includes(name)
5937
- );
5938
- if (unknown.length > 0) {
5939
- throw new Error(
5940
- `Unknown ${flag} ${unknown.join(", ")}. Use any of: ${SEARCH_TYPES.join(", ")}.`
5941
- );
5942
- }
5943
- return names;
5944
- }
5945
- function optionalInteger(raw) {
5946
- return raw === void 0 ? void 0 : Number.parseInt(raw, 10);
5947
- }
5948
- function appendCsv(value, previous) {
5949
- return previous ? `${previous},${value}` : value;
5950
- }
5951
- function addSearchOptions(command) {
5952
- const hidden = (flags) => new (0, _commander.Option)(flags).hideHelp();
5953
- return command.option(
5954
- "--categories <categories>",
5955
- "Only tools in these categories, comma-separated"
5956
- ).addOption(hidden("--search_terms <terms>")).addOption(hidden("--search-terms <terms>")).addOption(hidden("--task <sentence>")).option("--limit <count>", "Results per page, 1-50").option("--offset <count>", "Results to skip, for the next page").option(
5957
- "--summary-width <chars>",
5958
- `Description characters per result (default ${DEFAULT_SUMMARY_WIDTH})`
5959
- ).addOption(hidden("--search-mode <mode>")).addOption(hidden("--include-search-debug")).option("--json", "Print JSON instead of the readable list");
5960
- }
5961
- function asRun(command) {
5962
- return command.replace(/^deepline (?:tools execute|plays run) /, "deepline run ").replace(/ --watch\b/, "");
5963
- }
5964
- function pointAtDescribe(result) {
5965
- const old = /`deepline (tools|plays) describe [^`]*`/;
5966
- const render = result.render;
5967
- for (const section of _nullishCoalesce(_optionalChain([render, 'optionalAccess', _17 => _17.sections]), () => ( []))) {
5968
- if (!_optionalChain([section, 'access', _18 => _18.lines, 'optionalAccess', _19 => _19.some, 'call', _20 => _20((line) => old.test(line))])) continue;
5969
- section.lines = [
5970
- "Run `deepline describe <id>` before executing a tool or running a play.",
5971
- ...section.lines.filter((line) => !old.test(line))
5972
- ];
5973
- }
5974
- const templates = result.commandTemplates;
5975
- for (const template of Object.values(_nullishCoalesce(templates, () => ( {})))) {
5976
- if (template.describe) template.describe = "deepline describe <id>";
5977
- for (const key of ["execute", "run"]) {
5978
- if (template[key]) template[key] = asRun(template[key]);
5979
- }
5980
- }
5981
- const results = Array.isArray(result.results) ? result.results : [];
5982
- for (const item of results) {
5983
- for (const key of ["executeCommand", "runCommand"]) {
5984
- if (typeof item[key] === "string") item[key] = asRun(item[key]);
5985
- }
5986
- }
5987
- }
5988
- async function runSearch(queryInput, options, types, exclude = []) {
5989
- const query = _nullishCoalesce(_optionalChain([queryInput, 'optionalAccess', _21 => _21.trim, 'call', _22 => _22()]), () => ( ""));
5990
- const searchTerms = _nullishCoalesce(options.searchTerms, () => ( options.search_terms));
5991
- if (!query && !_optionalChain([options, 'access', _23 => _23.categories, 'optionalAccess', _24 => _24.trim, 'call', _25 => _25()]) && !_optionalChain([searchTerms, 'optionalAccess', _26 => _26.trim, 'call', _27 => _27()])) {
5992
- console.error(USAGE);
5993
- return 1;
5994
- }
5995
- const summaryWidth = _nullishCoalesce(optionalInteger(options.summaryWidth), () => ( DEFAULT_SUMMARY_WIDTH));
5996
- if (!Number.isInteger(summaryWidth) || summaryWidth < 2) {
5997
- console.error("--summary-width must be an integer of at least 2.");
5998
- return 1;
5999
- }
6000
- const { search_ref: searchRef, ...result } = await new (0, _chunkY4Y2QUFLjs.DeeplineClient)().search({
6001
- query,
6002
- types,
6003
- exclude,
6004
- categories: options.categories,
6005
- searchTerms,
6006
- task: options.task,
6007
- limit: optionalInteger(options.limit),
6008
- offset: optionalInteger(options.offset),
6009
- searchMode: options.searchMode === "v1" || options.searchMode === "v2" ? options.searchMode : void 0,
6010
- includeSearchDebug: Boolean(options.includeSearchDebug)
6011
- });
6012
- if (searchRef) rememberSearchRef(searchRef);
6013
- pointAtDescribe(result);
6014
- _chunkOO6HA5OTjs.printCommandEnvelope.call(void 0, result, {
6015
- json: options.json === true,
6016
- text: renderSearchResults(result, summaryWidth)
6017
- });
6018
- return 0;
6019
- }
6020
- function registerDeprecatedSearchCommand(parent, typesFor) {
6021
- const name = `deepline ${parent.name()} search`;
6022
- addSearchOptions(
6023
- parent.command("search [task]").description(`Deprecated. Use deepline search --type <types>.`).addHelpText(
6024
- "after",
6025
- `
6026
- Notes:
6027
- Deprecated alias for the unified search. It runs deepline search with the
6028
- matching --type and returns the same results envelope.
6029
-
6030
- Examples:
6031
- deepline search "name and company domain -> work email" --type ${typesFor({}).join(",")}
6032
- `
6033
- ).option("--all", "Include plays your workspace created").option("--compact", "Accepted for compatibility; results are compact")
6034
- ).action(async (query, options) => {
6035
- const types = typesFor(options);
6036
- console.error(
6037
- `${name} is deprecated. Use: deepline search${query ? ` ${JSON.stringify(query)}` : ""} --type ${types.join(",")}`
6038
- );
6039
- process.exitCode = await runSearch(query, options, types);
6040
- });
6041
- }
6042
- function registerSearchCommand(program) {
6043
- addSearchOptions(
6044
- program.command("search [task]").description(
6045
- "Search tools, monitors, and plays together, ranked by intent."
6046
- ).option(
6047
- "--type <types>",
6048
- "Only these kinds, comma-separated: tools, plays, monitors",
6049
- appendCsv
6050
- ).option(
6051
- "--exclude <types>",
6052
- "Leave these kinds out, comma-separated",
6053
- appendCsv
6054
- )
6055
- ).action(async (query, options) => {
6056
- let types;
6057
- let exclude;
6058
- try {
6059
- types = parseTypes("--type", options.type);
6060
- exclude = parseTypes("--exclude", options.exclude);
6061
- } catch (error) {
6062
- console.error(error instanceof Error ? error.message : String(error));
6063
- process.exitCode = 1;
6064
- return;
6065
- }
6066
- process.exitCode = await runSearch(query, options, types, exclude);
6067
- });
6068
- }
6069
-
6070
-
6071
-
6072
-
6073
-
6074
-
6075
5895
 
6076
5896
 
6077
5897
 
6078
- exports.recentSearchRef = recentSearchRef; exports.SEARCH_TYPES = SEARCH_TYPES; exports.parseTypes = parseTypes; exports.appendCsv = appendCsv; exports.pointAtDescribe = pointAtDescribe; exports.registerDeprecatedSearchCommand = registerDeprecatedSearchCommand; exports.registerSearchCommand = registerSearchCommand;
5898
+ exports.DEFAULT_SUMMARY_WIDTH = _chunkD3BCSAN7js.DEFAULT_SUMMARY_WIDTH; exports.SEARCH_KIND_COLUMN_ENABLED = SEARCH_KIND_COLUMN_ENABLED; exports.renderSearchResults = renderSearchResults;
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  DeeplineClient
3
- } from "./chunk-LVOEZVDW.mjs";
4
- import "./chunk-AJT436SK.mjs";
3
+ } from "./chunk-7APXZ3CX.mjs";
4
+ import "./chunk-JJSLEMQQ.mjs";
5
5
  import "./chunk-L2VKAASU.mjs";
6
6
  import "./chunk-HNRELVCS.mjs";
7
7
  import "./chunk-S3A4IXBQ.mjs";
@@ -9,13 +9,13 @@ import "./chunk-UBKA33KY.mjs";
9
9
  import {
10
10
  getAuthedHttpClient,
11
11
  printCommandEnvelope
12
- } from "./chunk-AZRG5NWV.mjs";
13
- import "./chunk-5MHCTVMM.mjs";
14
- import "./chunk-BK3XMHPF.mjs";
12
+ } from "./chunk-NREZRYPU.mjs";
13
+ import "./chunk-FK47YUPC.mjs";
14
+ import "./chunk-GRE3ID5E.mjs";
15
15
  import "./chunk-4QF2K7TM.mjs";
16
16
  import "./chunk-DLIRSHV6.mjs";
17
17
  import "./chunk-HBL4PM5Q.mjs";
18
- import "./chunk-KDJZXX7I.mjs";
18
+ import "./chunk-SCPFOH5Z.mjs";
19
19
  import "./chunk-WZYKRD7T.mjs";
20
20
  import "./chunk-KRD6H754.mjs";
21
21
 
@@ -1,7 +1,7 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
2
2
 
3
- var _chunkY4Y2QUFLjs = require('./chunk-Y4Y2QUFL.js');
4
- require('./chunk-6NF7S5WY.js');
3
+ var _chunk2MKX3HV3js = require('./chunk-2MKX3HV3.js');
4
+ require('./chunk-T5GZZJ7O.js');
5
5
  require('./chunk-E4CABWXL.js');
6
6
  require('./chunk-GVAENVIG.js');
7
7
  require('./chunk-NMU3VR5U.js');
@@ -9,13 +9,13 @@ require('./chunk-XDVT3GOM.js');
9
9
 
10
10
 
11
11
 
12
- var _chunkOO6HA5OTjs = require('./chunk-OO6HA5OT.js');
13
- require('./chunk-OVSSKTXG.js');
14
- require('./chunk-NXTZ4UNI.js');
12
+ var _chunkGONUMUBMjs = require('./chunk-GONUMUBM.js');
13
+ require('./chunk-5LHU7NUS.js');
14
+ require('./chunk-75IIHFN6.js');
15
15
  require('./chunk-ALJJRZNJ.js');
16
16
  require('./chunk-XNYIZMNQ.js');
17
17
  require('./chunk-DIAWYWT5.js');
18
- require('./chunk-3EN2BLAS.js');
18
+ require('./chunk-2JWG2H2N.js');
19
19
  require('./chunk-OG64RBAC.js');
20
20
  require('./chunk-COGTRVWW.js');
21
21
 
@@ -207,9 +207,9 @@ function preventShellHistoryLeak(forbidden) {
207
207
  }
208
208
  }
209
209
  async function handleList(options) {
210
- const client = new (0, _chunkY4Y2QUFLjs.DeeplineClient)();
210
+ const client = new (0, _chunk2MKX3HV3js.DeeplineClient)();
211
211
  const secrets = await client.listSecrets();
212
- _chunkOO6HA5OTjs.printCommandEnvelope.call(void 0,
212
+ _chunkGONUMUBMjs.printCommandEnvelope.call(void 0,
213
213
  {
214
214
  secrets,
215
215
  count: secrets.length,
@@ -227,14 +227,14 @@ async function handleList(options) {
227
227
  }
228
228
  async function handleCheck(nameInput, options) {
229
229
  const name = normalizeSecretName(nameInput);
230
- const client = new (0, _chunkY4Y2QUFLjs.DeeplineClient)();
230
+ const client = new (0, _chunk2MKX3HV3js.DeeplineClient)();
231
231
  const playName = options.play === void 0 ? void 0 : normalizePlaySelector(options.play);
232
232
  const check = playName !== void 0 ? await client.inspectSecret(name, { playName }) : null;
233
233
  const secret = check ? check.secret : await client.checkSecret(name);
234
234
  const ok = check ? check.ok : Boolean(secret);
235
235
  const quotedPlay = `'${(_nullishCoalesce(options.play, () => ( "PLAY"))).replace(/'/g, `'"'"'`)}'`;
236
236
  const scopeHint = check ? _optionalChain([secret, 'optionalAccess', _3 => _3.scope]) === "play" ? check.reason === "disabled" ? `The Play-scoped secret is disabled and no active org fallback is available. Restore it with: deepline secrets set ${name} --scope play --play ${quotedPlay}` : `The active Play-scoped secret takes precedence over the org secret.${ok ? "" : ` Restore it with: deepline secrets set ${name} --scope play --play ${quotedPlay}`}` : `No Play override.${ok ? " The org secret is available." : ` Set or rotate the org secret with: deepline secrets set ${name}`}` : `Metadata only. Verify effective scope and active version with: deepline secrets check ${name} --play <play-name>`;
237
- _chunkOO6HA5OTjs.printCommandEnvelope.call(void 0,
237
+ _chunkGONUMUBMjs.printCommandEnvelope.call(void 0,
238
238
  {
239
239
  ok,
240
240
  name,
@@ -262,7 +262,7 @@ async function handleSet(nameInput, forbidden, options) {
262
262
  const name = normalizeSecretName(nameInput);
263
263
  const { scope, playName } = resolveSecretWriteScope(options);
264
264
  const value = await readSecretValueFromOptions(options);
265
- const { http } = _chunkOO6HA5OTjs.getAuthedHttpClient.call(void 0, );
265
+ const { http } = _chunkGONUMUBMjs.getAuthedHttpClient.call(void 0, );
266
266
  const response = await http.post(
267
267
  "/api/v2/secrets",
268
268
  {
@@ -274,7 +274,7 @@ async function handleSet(nameInput, forbidden, options) {
274
274
  }
275
275
  );
276
276
  const secret = response.secret;
277
- _chunkOO6HA5OTjs.printCommandEnvelope.call(void 0,
277
+ _chunkGONUMUBMjs.printCommandEnvelope.call(void 0,
278
278
  {
279
279
  ok: true,
280
280
  secret,
@@ -302,7 +302,7 @@ async function handleNote(secretId, noteInput, options) {
302
302
  }
303
303
  const note = options.clear ? "" : noteInput;
304
304
  if (options.dryRun) {
305
- _chunkOO6HA5OTjs.printCommandEnvelope.call(void 0,
305
+ _chunkGONUMUBMjs.printCommandEnvelope.call(void 0,
306
306
  {
307
307
  ok: true,
308
308
  dryRun: true,
@@ -323,9 +323,9 @@ async function handleNote(secretId, noteInput, options) {
323
323
  );
324
324
  return;
325
325
  }
326
- const client = new (0, _chunkY4Y2QUFLjs.DeeplineClient)();
326
+ const client = new (0, _chunk2MKX3HV3js.DeeplineClient)();
327
327
  const secret = await client.updateSecretNote(secretId, note);
328
- _chunkOO6HA5OTjs.printCommandEnvelope.call(void 0,
328
+ _chunkGONUMUBMjs.printCommandEnvelope.call(void 0,
329
329
  {
330
330
  ok: true,
331
331
  secret,
@@ -1,14 +1,14 @@
1
1
  import {
2
2
  registerSessionSendRenderCommands,
3
3
  registerSessionsCommands
4
- } from "./chunk-2KC3MJP5.mjs";
5
- import "./chunk-AZRG5NWV.mjs";
6
- import "./chunk-5MHCTVMM.mjs";
7
- import "./chunk-BK3XMHPF.mjs";
4
+ } from "./chunk-JYEZ6BWX.mjs";
5
+ import "./chunk-NREZRYPU.mjs";
6
+ import "./chunk-FK47YUPC.mjs";
7
+ import "./chunk-GRE3ID5E.mjs";
8
8
  import "./chunk-4QF2K7TM.mjs";
9
9
  import "./chunk-DLIRSHV6.mjs";
10
10
  import "./chunk-HBL4PM5Q.mjs";
11
- import "./chunk-KDJZXX7I.mjs";
11
+ import "./chunk-SCPFOH5Z.mjs";
12
12
  import "./chunk-WZYKRD7T.mjs";
13
13
  import "./chunk-KRD6H754.mjs";
14
14
  export {
@@ -1,17 +1,17 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
3
 
4
- var _chunkFUVJPW7Ojs = require('./chunk-FUVJPW7O.js');
5
- require('./chunk-OO6HA5OT.js');
6
- require('./chunk-OVSSKTXG.js');
7
- require('./chunk-NXTZ4UNI.js');
4
+ var _chunkR2OR4RHVjs = require('./chunk-R2OR4RHV.js');
5
+ require('./chunk-GONUMUBM.js');
6
+ require('./chunk-5LHU7NUS.js');
7
+ require('./chunk-75IIHFN6.js');
8
8
  require('./chunk-ALJJRZNJ.js');
9
9
  require('./chunk-XNYIZMNQ.js');
10
10
  require('./chunk-DIAWYWT5.js');
11
- require('./chunk-3EN2BLAS.js');
11
+ require('./chunk-2JWG2H2N.js');
12
12
  require('./chunk-OG64RBAC.js');
13
13
  require('./chunk-COGTRVWW.js');
14
14
 
15
15
 
16
16
 
17
- exports.registerSessionSendRenderCommands = _chunkFUVJPW7Ojs.registerSessionSendRenderCommands; exports.registerSessionsCommands = _chunkFUVJPW7Ojs.registerSessionsCommands;
17
+ exports.registerSessionSendRenderCommands = _chunkR2OR4RHVjs.registerSessionSendRenderCommands; exports.registerSessionsCommands = _chunkR2OR4RHVjs.registerSessionsCommands;