deepline 0.3.482 → 0.3.484

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 (131) hide show
  1. package/dist/bundling-sources/sdk/src/release.ts +1 -1
  2. package/dist/bundling-sources/shared_libs/monitors/signal-radars/inbound-dead-letter.ts +100 -9
  3. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/ambiguous-modal-create-state.ts +21 -0
  4. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/compute-billing-job-state.ts +23 -0
  5. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/integration-operation-value-retirement-state.ts +25 -0
  6. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/integration-operation-value-retirement.ts +15 -1
  7. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/outbox-repair-operation-state.ts +30 -0
  8. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/postgres.ts +95 -33
  9. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/runtime-sandbox-capacity.ts +9 -1
  10. package/dist/bundling-sources/shared_libs/play-runtime/scheduler-backends/sandbox-cleanup-job-state.ts +23 -0
  11. package/dist/bundling-sources/shared_libs/product-notifications/destination-state.ts +93 -0
  12. package/dist/cli/{auth-R5GFDAMI.mjs → auth-EBFOTF7X.mjs} +5 -5
  13. package/dist/cli/auth-L5CSV3UO.js +43 -0
  14. package/dist/cli/{billing-SO5SFQFC.mjs → billing-2ZOIMW5V.mjs} +6 -6
  15. package/dist/cli/{billing-DXKVQPTC.js → billing-G2G3EF3I.js} +79 -79
  16. package/dist/cli/{chunk-Y4Y2QUFL.js → chunk-2AWYJXBX.js} +5 -5
  17. package/dist/cli/{chunk-OVSSKTXG.js → chunk-3XQIVEAT.js} +3 -3
  18. package/dist/cli/{chunk-RLG2MNXH.mjs → chunk-4OEOM6GP.mjs} +4 -4
  19. package/dist/cli/{chunk-LVOEZVDW.mjs → chunk-4OVHIWE7.mjs} +2 -2
  20. package/dist/cli/{chunk-G7N2DYQL.mjs → chunk-4SFC2XUF.mjs} +5 -5
  21. package/dist/cli/chunk-5AEDYVB6.mjs +6 -0
  22. package/dist/cli/{chunk-2KC3MJP5.mjs → chunk-5GOG5ZGC.mjs} +2 -2
  23. package/dist/cli/chunk-5K5CAND4.mjs +200 -0
  24. package/dist/cli/{chunk-AEMPAR6L.js → chunk-5KNRQWHE.js} +3 -3
  25. package/dist/cli/chunk-6GRZEYSG.js +200 -0
  26. package/dist/cli/{chunk-FQFAWIRK.mjs → chunk-6NPWXE32.mjs} +1 -1
  27. package/dist/cli/{chunk-AZRG5NWV.mjs → chunk-7K5CWKKZ.mjs} +2 -2
  28. package/dist/cli/{chunk-LMLN7R7X.mjs → chunk-AF7MOUZP.mjs} +2 -2
  29. package/dist/cli/{chunk-UVU4OCYO.js → chunk-C62NI2X6.js} +5 -5
  30. package/dist/cli/{chunk-BHID34HA.js → chunk-CYWBAV5H.js} +16 -16
  31. package/dist/cli/chunk-D3BCSAN7.js +6 -0
  32. package/dist/cli/{chunk-M6B2OZGA.js → chunk-DBJ62RAO.js} +3 -3
  33. package/dist/cli/{chunk-JLI7SK55.mjs → chunk-DEXSQGXB.mjs} +5 -5
  34. package/dist/cli/{chunk-Y6OKWGAM.mjs → chunk-EACX7QXO.mjs} +2 -2
  35. package/dist/cli/{chunk-3EN2BLAS.js → chunk-FQK7BULS.js} +1 -1
  36. package/dist/cli/{chunk-6NF7S5WY.js → chunk-FRD5WFT4.js} +6 -6
  37. package/dist/cli/{chunk-KDJZXX7I.mjs → chunk-HEI3BWIV.mjs} +1 -1
  38. package/dist/cli/{chunk-RLYJ4O6Q.js → chunk-IXWQOVNW.js} +53 -53
  39. package/dist/cli/{chunk-4V34YMLU.js → chunk-KA2LNIUP.js} +6 -6
  40. package/dist/cli/{chunk-VU2PUAEH.js → chunk-KGOC6HGI.js} +53 -53
  41. package/dist/cli/{chunk-AJT436SK.mjs → chunk-LTZXLYKE.mjs} +1 -1
  42. package/dist/cli/{chunk-ETJSPSOQ.js → chunk-M4PG7FGC.js} +2 -2
  43. package/dist/cli/{chunk-YT6GV6RP.js → chunk-NW4QJE54.js} +2 -2
  44. package/dist/cli/{chunk-MFNEJOQG.js → chunk-OHKKDPA5.js} +10 -10
  45. package/dist/cli/{chunk-7SZUHFJ6.mjs → chunk-PU52JXKA.mjs} +2 -2
  46. package/dist/cli/{chunk-2ZIUCN5I.js → chunk-QIDDTIVZ.js} +93 -93
  47. package/dist/cli/{chunk-DZRHML3J.js → chunk-RLLEH2SP.js} +26 -26
  48. package/dist/cli/{chunk-RCWBWM5J.mjs → chunk-TIRSKEZH.mjs} +1 -1
  49. package/dist/cli/{chunk-QCIG6V26.mjs → chunk-TN2GW57M.mjs} +1 -1
  50. package/dist/cli/{chunk-5MHCTVMM.mjs → chunk-TRLDJNVE.mjs} +1 -1
  51. package/dist/cli/{chunk-OO6HA5OT.js → chunk-U7IJAGWB.js} +7 -7
  52. package/dist/cli/{chunk-AZUDSDZX.js → chunk-UKM74PAA.js} +37 -37
  53. package/dist/cli/{chunk-NXTZ4UNI.js → chunk-UT4YMA2N.js} +4 -4
  54. package/dist/cli/{chunk-LKFQERA6.js → chunk-UWOY74RU.js} +21 -21
  55. package/dist/cli/{chunk-EC2QPBSZ.mjs → chunk-V7JCMBLU.mjs} +4 -4
  56. package/dist/cli/{chunk-SFZCKYTD.js → chunk-VEVGM6B5.js} +9 -9
  57. package/dist/cli/{chunk-DYHBKFCW.mjs → chunk-WXRM3UC6.mjs} +3 -3
  58. package/dist/cli/{chunk-BK3XMHPF.mjs → chunk-WYUCDLVR.mjs} +1 -1
  59. package/dist/cli/{chunk-SKBXTN5F.mjs → chunk-XZXIWPT3.mjs} +1 -1
  60. package/dist/cli/{chunk-DM7APZWK.mjs → chunk-YGN77QA5.mjs} +2 -2
  61. package/dist/cli/{chunk-FKGA7VKL.mjs → chunk-YHA3EV3I.mjs} +4 -4
  62. package/dist/cli/{chunk-HYS35M6H.mjs → chunk-YWC5AN26.mjs} +10 -10
  63. package/dist/cli/{chunk-FUVJPW7O.js → chunk-ZOKM7DVA.js} +8 -8
  64. package/dist/cli/{csv-IC3XJ4PV.mjs → csv-NLWVWD3H.mjs} +4 -4
  65. package/dist/cli/{csv-UWFQLI3K.js → csv-S3CHUKI6.js} +13 -13
  66. package/dist/cli/{db-RIPJQYF3.mjs → db-OGRPAEEM.mjs} +6 -6
  67. package/dist/cli/{db-PT73YDEP.js → db-WBSKMMOH.js} +27 -27
  68. package/dist/cli/{describe-GHI2MTDW.mjs → describe-FAD3Z7LN.mjs} +18 -17
  69. package/dist/cli/describe-UIAYCHWW.js +49 -0
  70. package/dist/cli/{executions-XUJBZF5H.mjs → executions-LYCL344R.mjs} +6 -6
  71. package/dist/cli/{executions-QUOWVXCU.js → executions-SOAZHCY4.js} +8 -8
  72. package/dist/cli/{feedback-JOZ7QNGH.mjs → feedback-AVF6V7SV.mjs} +4 -4
  73. package/dist/cli/{feedback-UDZ7BFB3.js → feedback-OROUPUNJ.js} +8 -8
  74. package/dist/cli/git-ATMWC27D.js +25 -0
  75. package/dist/cli/{git-O67OED4L.mjs → git-J5N5M57H.mjs} +5 -5
  76. package/dist/cli/index.js +138 -138
  77. package/dist/cli/index.mjs +42 -42
  78. package/dist/cli/{legacy-noops-T2G2TKO2.mjs → legacy-noops-ENRRM7BL.mjs} +5 -5
  79. package/dist/cli/{legacy-noops-ZFD6Z2ID.js → legacy-noops-QAQMZMEG.js} +8 -8
  80. package/dist/cli/{monitors-WSH4I37O.mjs → monitors-CKQ65WRL.mjs} +7 -7
  81. package/dist/cli/{monitors-QPWEWJW7.js → monitors-SFMQ5LFR.js} +91 -91
  82. package/dist/cli/{org-PZOFC4P3.js → org-3UNTDLT2.js} +72 -72
  83. package/dist/cli/{org-FVM465Q4.mjs → org-K4UIEU5P.mjs} +6 -6
  84. package/dist/cli/{pages-A5SLKL6L.mjs → pages-6GPGBIAH.mjs} +6 -6
  85. package/dist/cli/{pages-UMDOU2WF.js → pages-NKZTGB4C.js} +17 -17
  86. package/dist/cli/{play-XKJLIZQE.mjs → play-62BEE7IX.mjs} +26 -22
  87. package/dist/cli/{play-AFGL5D7B.js → play-BDEADESI.js} +495 -491
  88. package/dist/cli/{providers-CQDRM62K.js → providers-SXGP44GH.js} +9 -9
  89. package/dist/cli/{providers-A2EIHS3P.mjs → providers-X3CUWMFP.mjs} +6 -6
  90. package/dist/cli/{quickstart-BJ2XCUVV.mjs → quickstart-7LN22BKX.mjs} +4 -4
  91. package/dist/cli/{quickstart-NMJLH7T6.js → quickstart-XQ4426M4.js} +6 -6
  92. package/dist/cli/{run-S4XTJADQ.js → run-PBJ4ZJ4W.js} +37 -36
  93. package/dist/cli/{run-63I5M3ID.mjs → run-XXSN3B5A.mjs} +26 -25
  94. package/dist/cli/search-IGHLRLBD.js +32 -0
  95. package/dist/cli/{search-DUIWWZ56.mjs → search-M75VMADD.mjs} +8 -8
  96. package/dist/cli/{chunk-UXQZLXHZ.js → search-output-F6HCFYEI.js} +14 -194
  97. package/dist/cli/{chunk-EDBQIPMG.mjs → search-output-NUQAKWDM.mjs} +14 -194
  98. package/dist/cli/{secrets-FK4PQJ6U.mjs → secrets-J2H6V33R.mjs} +6 -6
  99. package/dist/cli/{secrets-Q6QEWCAT.js → secrets-LRYY4QPE.js} +15 -15
  100. package/dist/cli/{sessions-QJSN6AUL.mjs → sessions-IMT336UV.mjs} +5 -5
  101. package/dist/cli/{sessions-KF6JPKFK.js → sessions-YPF62CZE.js} +6 -6
  102. package/dist/cli/{settings-PIKGA5PF.js → settings-35YYC5WA.js} +78 -78
  103. package/dist/cli/{settings-UIQP5ERC.mjs → settings-PDWVQIGH.mjs} +11 -11
  104. package/dist/cli/{setup-4CALCNAA.mjs → setup-DG5DISSE.mjs} +9 -9
  105. package/dist/cli/{setup-ROKA4M5X.js → setup-UR7GOR7H.js} +47 -47
  106. package/dist/cli/skills-4U5WC4MJ.js +33 -0
  107. package/dist/cli/{skills-SQKRC7W4.mjs → skills-U6NJD5J7.mjs} +7 -7
  108. package/dist/cli/{tools-B6J53QS2.mjs → tools-2HGEOELR.mjs} +17 -16
  109. package/dist/cli/tools-PYJTQVVS.js +56 -0
  110. package/dist/cli/update-344OTRFM.js +33 -0
  111. package/dist/cli/{update-MVKCAJJV.mjs → update-FRAYBAHK.mjs} +9 -9
  112. package/dist/cli/{workflow-3BO5WPZO.mjs → workflow-DDKVTF36.mjs} +7 -7
  113. package/dist/cli/{workflow-VH2H4VS3.js → workflow-JKKLOMBX.js} +17 -17
  114. package/dist/index.js +10 -10
  115. package/dist/index.mjs +10 -10
  116. package/dist/install-integrity.json +106 -96
  117. package/dist/plays/bundle-play-file.mjs +6 -6
  118. package/dist/release.d.mts +1 -1
  119. package/dist/release.d.ts +1 -1
  120. package/dist/release.js +2 -2
  121. package/dist/release.mjs +1 -1
  122. package/dist/server.js +5 -5
  123. package/dist/server.mjs +3 -3
  124. package/package.json +1 -1
  125. package/dist/cli/auth-Q5VRDGL4.js +0 -43
  126. package/dist/cli/describe-72RFB7RS.js +0 -48
  127. package/dist/cli/git-A6SU7ITW.js +0 -25
  128. package/dist/cli/search-ACCI4VYH.js +0 -32
  129. package/dist/cli/skills-GZQSDPZX.js +0 -33
  130. package/dist/cli/tools-5C7ZVTDG.js +0 -55
  131. package/dist/cli/update-PR4QP7JN.js +0 -33
@@ -1,16 +1,16 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); 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 _chunk6NF7S5WYjs = require('./chunk-6NF7S5WY.js');
3
+ var _chunkFRD5WFT4js = require('./chunk-FRD5WFT4.js');
4
4
 
5
5
 
6
6
 
7
- var _chunkOVSSKTXGjs = require('./chunk-OVSSKTXG.js');
7
+ var _chunk3XQIVEATjs = require('./chunk-3XQIVEAT.js');
8
8
 
9
9
  // src/client.ts
10
- var DeeplineClient2 = class extends _chunk6NF7S5WYjs.DeeplineClient {
10
+ var DeeplineClient2 = class extends _chunkFRD5WFT4js.DeeplineClient {
11
11
  constructor(options) {
12
- const config = _chunkOVSSKTXGjs.resolveConfig.call(void 0, options);
13
- super(config, new (0, _chunkOVSSKTXGjs.HttpClient)(config), _optionalChain([options, 'optionalAccess', _ => _.timeout]));
12
+ const config = _chunk3XQIVEATjs.resolveConfig.call(void 0, options);
13
+ super(config, new (0, _chunk3XQIVEATjs.HttpClient)(config), _optionalChain([options, 'optionalAccess', _ => _.timeout]));
14
14
  }
15
15
  };
16
16
 
@@ -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
3
 
4
- var _chunkNXTZ4UNIjs = require('./chunk-NXTZ4UNI.js');
4
+ var _chunkUT4YMA2Njs = require('./chunk-UT4YMA2N.js');
5
5
 
6
6
 
7
7
  var _chunkALJJRZNJjs = require('./chunk-ALJJRZNJ.js');
@@ -711,7 +711,7 @@ function readSkillsVersionFile(path) {
711
711
  }
712
712
  }
713
713
  function resolveAutoSyncSkillAgents() {
714
- switch (_chunkNXTZ4UNIjs.detectAgentRuntime.call(void 0, )) {
714
+ switch (_chunkUT4YMA2Njs.detectAgentRuntime.call(void 0, )) {
715
715
  case "codex":
716
716
  return ["codex"];
717
717
  case "claude_code":
@@ -781,7 +781,7 @@ function writeSdkSkillsLocalVersion(baseUrl, version, agents) {
781
781
  }
782
782
 
783
783
  // src/http.ts
784
- var HttpClient2 = class extends _chunkNXTZ4UNIjs.HttpClient {
784
+ var HttpClient2 = class extends _chunkUT4YMA2Njs.HttpClient {
785
785
  constructor(config) {
786
786
  super(config, readSdkSkillsLocalVersion);
787
787
  }
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  seedToolListScript
3
- } from "./chunk-HYS35M6H.mjs";
3
+ } from "./chunk-YWC5AN26.mjs";
4
4
  import {
5
5
  addDescribeOptions
6
- } from "./chunk-RCWBWM5J.mjs";
6
+ } from "./chunk-TIRSKEZH.mjs";
7
7
  import {
8
8
  describeLookupsFor,
9
9
  describeName,
@@ -14,10 +14,10 @@ import {
14
14
  } from "./chunk-JVHOS3K3.mjs";
15
15
  import {
16
16
  DeeplineClient
17
- } from "./chunk-LVOEZVDW.mjs";
17
+ } from "./chunk-4OVHIWE7.mjs";
18
18
  import {
19
19
  printCommandEnvelope
20
- } from "./chunk-AZRG5NWV.mjs";
20
+ } from "./chunk-7K5CWKKZ.mjs";
21
21
 
22
22
  // src/cli/commands/describe.ts
23
23
  import { writeFileSync } from "fs";
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  DeeplineClient
3
- } from "./chunk-AJT436SK.mjs";
3
+ } from "./chunk-LTZXLYKE.mjs";
4
4
  import {
5
5
  HttpClient,
6
6
  resolveConfig
7
- } from "./chunk-5MHCTVMM.mjs";
7
+ } from "./chunk-TRLDJNVE.mjs";
8
8
 
9
9
  // src/client.ts
10
10
  var DeeplineClient2 = class extends DeeplineClient {
@@ -1,19 +1,19 @@
1
1
  import {
2
2
  npmSupportsAllowScripts,
3
3
  readNpmVersion
4
- } from "./chunk-SKBXTN5F.mjs";
4
+ } from "./chunk-XZXIWPT3.mjs";
5
5
  import {
6
6
  runSkillsCommand
7
- } from "./chunk-EC2QPBSZ.mjs";
7
+ } from "./chunk-V7JCMBLU.mjs";
8
8
  import {
9
9
  resolveShellSpawn
10
- } from "./chunk-FKGA7VKL.mjs";
10
+ } from "./chunk-YHA3EV3I.mjs";
11
11
  import {
12
12
  printCommandEnvelope
13
- } from "./chunk-AZRG5NWV.mjs";
13
+ } from "./chunk-7K5CWKKZ.mjs";
14
14
  import {
15
15
  autoDetectBaseUrl
16
- } from "./chunk-5MHCTVMM.mjs";
16
+ } from "./chunk-TRLDJNVE.mjs";
17
17
 
18
18
  // src/cli/commands/update.ts
19
19
  import { spawn, spawnSync } from "child_process";
@@ -0,0 +1,6 @@
1
+ // src/cli/search-output-options.ts
2
+ var DEFAULT_SUMMARY_WIDTH = 140;
3
+
4
+ export {
5
+ DEFAULT_SUMMARY_WIDTH
6
+ };
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  getAuthedHttpClient,
3
3
  printCommandEnvelope
4
- } from "./chunk-AZRG5NWV.mjs";
4
+ } from "./chunk-7K5CWKKZ.mjs";
5
5
  import {
6
6
  agentSessionIdFromEnvironment
7
- } from "./chunk-BK3XMHPF.mjs";
7
+ } from "./chunk-WYUCDLVR.mjs";
8
8
 
9
9
  // src/cli/commands/sessions.ts
10
10
  import {
@@ -0,0 +1,200 @@
1
+ import {
2
+ DEFAULT_SUMMARY_WIDTH
3
+ } from "./chunk-5AEDYVB6.mjs";
4
+ import {
5
+ DeeplineClient
6
+ } from "./chunk-4OVHIWE7.mjs";
7
+ import {
8
+ printCommandEnvelope
9
+ } from "./chunk-7K5CWKKZ.mjs";
10
+ import {
11
+ resolveConfig,
12
+ sdkCliStateDirPath
13
+ } from "./chunk-TRLDJNVE.mjs";
14
+
15
+ // src/cli/commands/search.ts
16
+ import { Option } from "commander";
17
+
18
+ // src/cli/search-ref.ts
19
+ import { mkdirSync, readFileSync, writeFileSync } from "fs";
20
+ import { dirname, join } from "path";
21
+ var SEARCH_REF_TTL_MS = 15 * 6e4;
22
+ function lastSearchPath() {
23
+ return join(sdkCliStateDirPath(resolveConfig().baseUrl), "last-search.json");
24
+ }
25
+ function rememberSearchRef(searchRef) {
26
+ try {
27
+ mkdirSync(dirname(lastSearchPath()), { recursive: true });
28
+ writeFileSync(
29
+ lastSearchPath(),
30
+ JSON.stringify({ searchRef, at: Date.now() }),
31
+ { mode: 384 }
32
+ );
33
+ } catch {
34
+ }
35
+ }
36
+ function recentSearchRef() {
37
+ try {
38
+ const saved = JSON.parse(readFileSync(lastSearchPath(), "utf8"));
39
+ return typeof saved.searchRef === "string" && typeof saved.at === "number" && Date.now() - saved.at < SEARCH_REF_TTL_MS ? saved.searchRef : void 0;
40
+ } catch {
41
+ return void 0;
42
+ }
43
+ }
44
+
45
+ // src/cli/commands/search.ts
46
+ var SEARCH_TYPES = [
47
+ "tools",
48
+ "plays",
49
+ "monitors",
50
+ "prebuilts",
51
+ "custom"
52
+ ];
53
+ var USAGE = 'Usage: deepline search "<task>" [--type <types>] [--json]';
54
+ function parseTypes(flag, raw) {
55
+ const names = (raw ?? "").split(",").map((name) => name.trim().toLowerCase()).filter(Boolean);
56
+ const unknown = names.filter(
57
+ (name) => !SEARCH_TYPES.includes(name)
58
+ );
59
+ if (unknown.length > 0) {
60
+ throw new Error(
61
+ `Unknown ${flag} ${unknown.join(", ")}. Use any of: ${SEARCH_TYPES.join(", ")}.`
62
+ );
63
+ }
64
+ return names;
65
+ }
66
+ function optionalInteger(raw) {
67
+ return raw === void 0 ? void 0 : Number.parseInt(raw, 10);
68
+ }
69
+ function appendCsv(value, previous) {
70
+ return previous ? `${previous},${value}` : value;
71
+ }
72
+ function addSearchOptions(command) {
73
+ const hidden = (flags) => new Option(flags).hideHelp();
74
+ return command.option(
75
+ "--categories <categories>",
76
+ "Only tools in these categories, comma-separated"
77
+ ).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(
78
+ "--summary-width <chars>",
79
+ `Description characters per result (default ${DEFAULT_SUMMARY_WIDTH})`
80
+ ).addOption(hidden("--search-mode <mode>")).addOption(hidden("--include-search-debug")).option("--json", "Print JSON instead of the readable list");
81
+ }
82
+ function asRun(command) {
83
+ return command.replace(/^deepline (?:tools execute|plays run) /, "deepline run ").replace(/ --watch\b/, "");
84
+ }
85
+ function pointAtDescribe(result) {
86
+ const old = /`deepline (tools|plays) describe [^`]*`/;
87
+ const render = result.render;
88
+ for (const section of render?.sections ?? []) {
89
+ if (!section.lines?.some((line) => old.test(line))) continue;
90
+ section.lines = [
91
+ "Run `deepline describe <id>` before executing a tool or running a play.",
92
+ ...section.lines.filter((line) => !old.test(line))
93
+ ];
94
+ }
95
+ const templates = result.commandTemplates;
96
+ for (const template of Object.values(templates ?? {})) {
97
+ if (template.describe) template.describe = "deepline describe <id>";
98
+ for (const key of ["execute", "run"]) {
99
+ if (template[key]) template[key] = asRun(template[key]);
100
+ }
101
+ }
102
+ const results = Array.isArray(result.results) ? result.results : [];
103
+ for (const item of results) {
104
+ for (const key of ["executeCommand", "runCommand"]) {
105
+ if (typeof item[key] === "string") item[key] = asRun(item[key]);
106
+ }
107
+ }
108
+ }
109
+ async function runSearch(queryInput, options, types, exclude = []) {
110
+ const query = queryInput?.trim() ?? "";
111
+ const searchTerms = options.searchTerms ?? options.search_terms;
112
+ if (!query && !options.categories?.trim() && !searchTerms?.trim()) {
113
+ console.error(USAGE);
114
+ return 1;
115
+ }
116
+ const summaryWidth = optionalInteger(options.summaryWidth) ?? DEFAULT_SUMMARY_WIDTH;
117
+ if (!Number.isInteger(summaryWidth) || summaryWidth < 2) {
118
+ console.error("--summary-width must be an integer of at least 2.");
119
+ return 1;
120
+ }
121
+ const { search_ref: searchRef, ...result } = await new DeeplineClient().search({
122
+ query,
123
+ types,
124
+ exclude,
125
+ categories: options.categories,
126
+ searchTerms,
127
+ task: options.task,
128
+ limit: optionalInteger(options.limit),
129
+ offset: optionalInteger(options.offset),
130
+ searchMode: options.searchMode === "v1" || options.searchMode === "v2" ? options.searchMode : void 0,
131
+ includeSearchDebug: Boolean(options.includeSearchDebug)
132
+ });
133
+ if (searchRef) rememberSearchRef(searchRef);
134
+ pointAtDescribe(result);
135
+ const { renderSearchResults } = await import("./search-output-NUQAKWDM.mjs");
136
+ printCommandEnvelope(result, {
137
+ json: options.json === true,
138
+ text: renderSearchResults(result, summaryWidth)
139
+ });
140
+ return 0;
141
+ }
142
+ function registerDeprecatedSearchCommand(parent, typesFor) {
143
+ const name = `deepline ${parent.name()} search`;
144
+ addSearchOptions(
145
+ parent.command("search [task]").description(`Deprecated. Use deepline search --type <types>.`).addHelpText(
146
+ "after",
147
+ `
148
+ Notes:
149
+ Deprecated alias for the unified search. It runs deepline search with the
150
+ matching --type and returns the same results envelope.
151
+
152
+ Examples:
153
+ deepline search "name and company domain -> work email" --type ${typesFor({}).join(",")}
154
+ `
155
+ ).option("--all", "Include plays your workspace created").option("--compact", "Accepted for compatibility; results are compact")
156
+ ).action(async (query, options) => {
157
+ const types = typesFor(options);
158
+ console.error(
159
+ `${name} is deprecated. Use: deepline search${query ? ` ${JSON.stringify(query)}` : ""} --type ${types.join(",")}`
160
+ );
161
+ process.exitCode = await runSearch(query, options, types);
162
+ });
163
+ }
164
+ function registerSearchCommand(program) {
165
+ addSearchOptions(
166
+ program.command("search [task]").description(
167
+ "Search tools, monitors, and plays together, ranked by intent."
168
+ ).option(
169
+ "--type <types>",
170
+ "Only these kinds, comma-separated: tools, plays, monitors",
171
+ appendCsv
172
+ ).option(
173
+ "--exclude <types>",
174
+ "Leave these kinds out, comma-separated",
175
+ appendCsv
176
+ )
177
+ ).action(async (query, options) => {
178
+ let types;
179
+ let exclude;
180
+ try {
181
+ types = parseTypes("--type", options.type);
182
+ exclude = parseTypes("--exclude", options.exclude);
183
+ } catch (error) {
184
+ console.error(error instanceof Error ? error.message : String(error));
185
+ process.exitCode = 1;
186
+ return;
187
+ }
188
+ process.exitCode = await runSearch(query, options, types, exclude);
189
+ });
190
+ }
191
+
192
+ export {
193
+ recentSearchRef,
194
+ SEARCH_TYPES,
195
+ parseTypes,
196
+ appendCsv,
197
+ pointAtDescribe,
198
+ registerDeprecatedSearchCommand,
199
+ registerSearchCommand
200
+ };
@@ -1,6 +1,6 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); 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; } var _class;
2
2
 
3
- var _chunkOO6HA5OTjs = require('./chunk-OO6HA5OT.js');
3
+ var _chunkU7IJAGWBjs = require('./chunk-U7IJAGWB.js');
4
4
 
5
5
  // src/cli/progress.ts
6
6
  var _worker_threads = require('worker_threads');
@@ -17,7 +17,7 @@ var CliProgress = (_class = class {
17
17
 
18
18
  // --json output is one JSON document: progress never renders under it.
19
19
  constructor(enabled) {;_class.prototype.__init.call(this);_class.prototype.__init2.call(this);_class.prototype.__init3.call(this);_class.prototype.__init4.call(this);_class.prototype.__init5.call(this);_class.prototype.__init6.call(this);_class.prototype.__init7.call(this);_class.prototype.__init8.call(this);
20
- this.enabled = enabled && !_chunkOO6HA5OTjs.isJsonOutputMode.call(void 0, );
20
+ this.enabled = enabled && !_chunkU7IJAGWBjs.isJsonOutputMode.call(void 0, );
21
21
  }
22
22
  setLogWriter(writer) {
23
23
  this.logWriter = writer;
@@ -49,7 +49,7 @@ var CliProgress = (_class = class {
49
49
  this.logWriter(line);
50
50
  return;
51
51
  }
52
- if (_chunkOO6HA5OTjs.isJsonOutputMode.call(void 0, )) return;
52
+ if (_chunkU7IJAGWBjs.isJsonOutputMode.call(void 0, )) return;
53
53
  if (!this.enabled) {
54
54
  process.stderr.write(`${line}
55
55
  `);
@@ -0,0 +1,200 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } 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
+
3
+ var _chunkD3BCSAN7js = require('./chunk-D3BCSAN7.js');
4
+
5
+
6
+ var _chunk2AWYJXBXjs = require('./chunk-2AWYJXBX.js');
7
+
8
+
9
+ var _chunkU7IJAGWBjs = require('./chunk-U7IJAGWB.js');
10
+
11
+
12
+
13
+ var _chunk3XQIVEATjs = require('./chunk-3XQIVEAT.js');
14
+
15
+ // src/cli/commands/search.ts
16
+ var _commander = require('commander');
17
+
18
+ // src/cli/search-ref.ts
19
+ var _fs = require('fs');
20
+ var _path = require('path');
21
+ var SEARCH_REF_TTL_MS = 15 * 6e4;
22
+ function lastSearchPath() {
23
+ return _path.join.call(void 0, _chunk3XQIVEATjs.sdkCliStateDirPath.call(void 0, _chunk3XQIVEATjs.resolveConfig.call(void 0, ).baseUrl), "last-search.json");
24
+ }
25
+ function rememberSearchRef(searchRef) {
26
+ try {
27
+ _fs.mkdirSync.call(void 0, _path.dirname.call(void 0, lastSearchPath()), { recursive: true });
28
+ _fs.writeFileSync.call(void 0,
29
+ lastSearchPath(),
30
+ JSON.stringify({ searchRef, at: Date.now() }),
31
+ { mode: 384 }
32
+ );
33
+ } catch (e) {
34
+ }
35
+ }
36
+ function recentSearchRef() {
37
+ try {
38
+ const saved = JSON.parse(_fs.readFileSync.call(void 0, lastSearchPath(), "utf8"));
39
+ return typeof saved.searchRef === "string" && typeof saved.at === "number" && Date.now() - saved.at < SEARCH_REF_TTL_MS ? saved.searchRef : void 0;
40
+ } catch (e2) {
41
+ return void 0;
42
+ }
43
+ }
44
+
45
+ // src/cli/commands/search.ts
46
+ var SEARCH_TYPES = [
47
+ "tools",
48
+ "plays",
49
+ "monitors",
50
+ "prebuilts",
51
+ "custom"
52
+ ];
53
+ var USAGE = 'Usage: deepline search "<task>" [--type <types>] [--json]';
54
+ function parseTypes(flag, raw) {
55
+ const names = (_nullishCoalesce(raw, () => ( ""))).split(",").map((name) => name.trim().toLowerCase()).filter(Boolean);
56
+ const unknown = names.filter(
57
+ (name) => !SEARCH_TYPES.includes(name)
58
+ );
59
+ if (unknown.length > 0) {
60
+ throw new Error(
61
+ `Unknown ${flag} ${unknown.join(", ")}. Use any of: ${SEARCH_TYPES.join(", ")}.`
62
+ );
63
+ }
64
+ return names;
65
+ }
66
+ function optionalInteger(raw) {
67
+ return raw === void 0 ? void 0 : Number.parseInt(raw, 10);
68
+ }
69
+ function appendCsv(value, previous) {
70
+ return previous ? `${previous},${value}` : value;
71
+ }
72
+ function addSearchOptions(command) {
73
+ const hidden = (flags) => new (0, _commander.Option)(flags).hideHelp();
74
+ return command.option(
75
+ "--categories <categories>",
76
+ "Only tools in these categories, comma-separated"
77
+ ).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(
78
+ "--summary-width <chars>",
79
+ `Description characters per result (default ${_chunkD3BCSAN7js.DEFAULT_SUMMARY_WIDTH})`
80
+ ).addOption(hidden("--search-mode <mode>")).addOption(hidden("--include-search-debug")).option("--json", "Print JSON instead of the readable list");
81
+ }
82
+ function asRun(command) {
83
+ return command.replace(/^deepline (?:tools execute|plays run) /, "deepline run ").replace(/ --watch\b/, "");
84
+ }
85
+ function pointAtDescribe(result) {
86
+ const old = /`deepline (tools|plays) describe [^`]*`/;
87
+ const render = result.render;
88
+ for (const section of _nullishCoalesce(_optionalChain([render, 'optionalAccess', _ => _.sections]), () => ( []))) {
89
+ if (!_optionalChain([section, 'access', _2 => _2.lines, 'optionalAccess', _3 => _3.some, 'call', _4 => _4((line) => old.test(line))])) continue;
90
+ section.lines = [
91
+ "Run `deepline describe <id>` before executing a tool or running a play.",
92
+ ...section.lines.filter((line) => !old.test(line))
93
+ ];
94
+ }
95
+ const templates = result.commandTemplates;
96
+ for (const template of Object.values(_nullishCoalesce(templates, () => ( {})))) {
97
+ if (template.describe) template.describe = "deepline describe <id>";
98
+ for (const key of ["execute", "run"]) {
99
+ if (template[key]) template[key] = asRun(template[key]);
100
+ }
101
+ }
102
+ const results = Array.isArray(result.results) ? result.results : [];
103
+ for (const item of results) {
104
+ for (const key of ["executeCommand", "runCommand"]) {
105
+ if (typeof item[key] === "string") item[key] = asRun(item[key]);
106
+ }
107
+ }
108
+ }
109
+ async function runSearch(queryInput, options, types, exclude = []) {
110
+ const query = _nullishCoalesce(_optionalChain([queryInput, 'optionalAccess', _5 => _5.trim, 'call', _6 => _6()]), () => ( ""));
111
+ const searchTerms = _nullishCoalesce(options.searchTerms, () => ( options.search_terms));
112
+ if (!query && !_optionalChain([options, 'access', _7 => _7.categories, 'optionalAccess', _8 => _8.trim, 'call', _9 => _9()]) && !_optionalChain([searchTerms, 'optionalAccess', _10 => _10.trim, 'call', _11 => _11()])) {
113
+ console.error(USAGE);
114
+ return 1;
115
+ }
116
+ const summaryWidth = _nullishCoalesce(optionalInteger(options.summaryWidth), () => ( _chunkD3BCSAN7js.DEFAULT_SUMMARY_WIDTH));
117
+ if (!Number.isInteger(summaryWidth) || summaryWidth < 2) {
118
+ console.error("--summary-width must be an integer of at least 2.");
119
+ return 1;
120
+ }
121
+ const { search_ref: searchRef, ...result } = await new (0, _chunk2AWYJXBXjs.DeeplineClient)().search({
122
+ query,
123
+ types,
124
+ exclude,
125
+ categories: options.categories,
126
+ searchTerms,
127
+ task: options.task,
128
+ limit: optionalInteger(options.limit),
129
+ offset: optionalInteger(options.offset),
130
+ searchMode: options.searchMode === "v1" || options.searchMode === "v2" ? options.searchMode : void 0,
131
+ includeSearchDebug: Boolean(options.includeSearchDebug)
132
+ });
133
+ if (searchRef) rememberSearchRef(searchRef);
134
+ pointAtDescribe(result);
135
+ const { renderSearchResults } = await Promise.resolve().then(() => _interopRequireWildcard(require("./search-output-F6HCFYEI.js")));
136
+ _chunkU7IJAGWBjs.printCommandEnvelope.call(void 0, result, {
137
+ json: options.json === true,
138
+ text: renderSearchResults(result, summaryWidth)
139
+ });
140
+ return 0;
141
+ }
142
+ function registerDeprecatedSearchCommand(parent, typesFor) {
143
+ const name = `deepline ${parent.name()} search`;
144
+ addSearchOptions(
145
+ parent.command("search [task]").description(`Deprecated. Use deepline search --type <types>.`).addHelpText(
146
+ "after",
147
+ `
148
+ Notes:
149
+ Deprecated alias for the unified search. It runs deepline search with the
150
+ matching --type and returns the same results envelope.
151
+
152
+ Examples:
153
+ deepline search "name and company domain -> work email" --type ${typesFor({}).join(",")}
154
+ `
155
+ ).option("--all", "Include plays your workspace created").option("--compact", "Accepted for compatibility; results are compact")
156
+ ).action(async (query, options) => {
157
+ const types = typesFor(options);
158
+ console.error(
159
+ `${name} is deprecated. Use: deepline search${query ? ` ${JSON.stringify(query)}` : ""} --type ${types.join(",")}`
160
+ );
161
+ process.exitCode = await runSearch(query, options, types);
162
+ });
163
+ }
164
+ function registerSearchCommand(program) {
165
+ addSearchOptions(
166
+ program.command("search [task]").description(
167
+ "Search tools, monitors, and plays together, ranked by intent."
168
+ ).option(
169
+ "--type <types>",
170
+ "Only these kinds, comma-separated: tools, plays, monitors",
171
+ appendCsv
172
+ ).option(
173
+ "--exclude <types>",
174
+ "Leave these kinds out, comma-separated",
175
+ appendCsv
176
+ )
177
+ ).action(async (query, options) => {
178
+ let types;
179
+ let exclude;
180
+ try {
181
+ types = parseTypes("--type", options.type);
182
+ exclude = parseTypes("--exclude", options.exclude);
183
+ } catch (error) {
184
+ console.error(error instanceof Error ? error.message : String(error));
185
+ process.exitCode = 1;
186
+ return;
187
+ }
188
+ process.exitCode = await runSearch(query, options, types, exclude);
189
+ });
190
+ }
191
+
192
+
193
+
194
+
195
+
196
+
197
+
198
+
199
+
200
+ exports.recentSearchRef = recentSearchRef; exports.SEARCH_TYPES = SEARCH_TYPES; exports.parseTypes = parseTypes; exports.appendCsv = appendCsv; exports.pointAtDescribe = pointAtDescribe; exports.registerDeprecatedSearchCommand = registerDeprecatedSearchCommand; exports.registerSearchCommand = registerSearchCommand;
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  writeRawStderr
3
- } from "./chunk-AZRG5NWV.mjs";
3
+ } from "./chunk-7K5CWKKZ.mjs";
4
4
 
5
5
  // src/cli/maintenance-policy.ts
6
6
  import { InvalidArgumentError } from "commander";
@@ -2,10 +2,10 @@ import {
2
2
  HttpClient,
3
3
  resolveCliCommandContext,
4
4
  resolveConfig
5
- } from "./chunk-5MHCTVMM.mjs";
5
+ } from "./chunk-TRLDJNVE.mjs";
6
6
  import {
7
7
  detectAgentRuntime
8
- } from "./chunk-BK3XMHPF.mjs";
8
+ } from "./chunk-WYUCDLVR.mjs";
9
9
  import {
10
10
  DeeplineError,
11
11
  serializeToolExecutionFailure
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  PlayClient
3
- } from "./chunk-AJT436SK.mjs";
3
+ } from "./chunk-LTZXLYKE.mjs";
4
4
  import {
5
5
  HttpClient,
6
6
  resolveConfig
7
- } from "./chunk-5MHCTVMM.mjs";
7
+ } from "./chunk-TRLDJNVE.mjs";
8
8
 
9
9
  // src/plays/local-play-execution.ts
10
10
  function importedNodes(graph) {
@@ -1,10 +1,10 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
2
2
 
3
- var _chunk6NF7S5WYjs = require('./chunk-6NF7S5WY.js');
3
+ var _chunkFRD5WFT4js = require('./chunk-FRD5WFT4.js');
4
4
 
5
5
 
6
6
 
7
- var _chunkOVSSKTXGjs = require('./chunk-OVSSKTXG.js');
7
+ var _chunk3XQIVEATjs = require('./chunk-3XQIVEAT.js');
8
8
 
9
9
  // src/plays/local-play-execution.ts
10
10
  function importedNodes(graph) {
@@ -137,9 +137,9 @@ async function pinLocalPlayImports(client, graph) {
137
137
 
138
138
  // src/plays/client.ts
139
139
  function createPlayClient(options) {
140
- const config = _chunkOVSSKTXGjs.resolveConfig.call(void 0, options);
141
- return new (0, _chunk6NF7S5WYjs.PlayClient)(
142
- new (0, _chunkOVSSKTXGjs.HttpClient)(config),
140
+ const config = _chunk3XQIVEATjs.resolveConfig.call(void 0, options);
141
+ return new (0, _chunkFRD5WFT4js.PlayClient)(
142
+ new (0, _chunk3XQIVEATjs.HttpClient)(config),
143
143
  _nullishCoalesce(config.environment, () => ( process.env))
144
144
  );
145
145
  }