recker 1.0.14-next.cd6adc2 → 1.0.15-next.0dab95d

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 (50) hide show
  1. package/README.md +78 -100
  2. package/dist/bench/generator.d.ts.map +1 -1
  3. package/dist/bench/generator.js +2 -1
  4. package/dist/bench/stats.d.ts +15 -1
  5. package/dist/bench/stats.d.ts.map +1 -1
  6. package/dist/bench/stats.js +84 -5
  7. package/dist/cli/index.js +21 -0
  8. package/dist/cli/tui/load-dashboard.d.ts.map +1 -1
  9. package/dist/cli/tui/load-dashboard.js +62 -8
  10. package/dist/cli/tui/scroll-buffer.d.ts +43 -0
  11. package/dist/cli/tui/scroll-buffer.d.ts.map +1 -0
  12. package/dist/cli/tui/scroll-buffer.js +162 -0
  13. package/dist/cli/tui/search-panel.d.ts +41 -0
  14. package/dist/cli/tui/search-panel.d.ts.map +1 -0
  15. package/dist/cli/tui/search-panel.js +419 -0
  16. package/dist/cli/tui/shell.d.ts +11 -0
  17. package/dist/cli/tui/shell.d.ts.map +1 -1
  18. package/dist/cli/tui/shell.js +242 -46
  19. package/dist/contract/index.js +3 -2
  20. package/dist/dns/index.d.ts +1 -0
  21. package/dist/dns/index.d.ts.map +1 -1
  22. package/dist/dns/index.js +1 -0
  23. package/dist/dns/propagation.d.ts +19 -0
  24. package/dist/dns/propagation.d.ts.map +1 -0
  25. package/dist/dns/propagation.js +129 -0
  26. package/dist/index.d.ts +2 -0
  27. package/dist/index.d.ts.map +1 -1
  28. package/dist/index.js +2 -0
  29. package/dist/mcp/embeddings-loader.d.ts +18 -0
  30. package/dist/mcp/embeddings-loader.d.ts.map +1 -0
  31. package/dist/mcp/embeddings-loader.js +152 -0
  32. package/dist/mcp/index.d.ts +1 -0
  33. package/dist/mcp/index.d.ts.map +1 -1
  34. package/dist/mcp/index.js +1 -0
  35. package/dist/mcp/search/hybrid-search.d.ts.map +1 -1
  36. package/dist/mcp/search/hybrid-search.js +7 -21
  37. package/dist/mcp/server.d.ts +2 -0
  38. package/dist/mcp/server.d.ts.map +1 -1
  39. package/dist/mcp/server.js +8 -1
  40. package/dist/recker.d.ts +47 -0
  41. package/dist/recker.d.ts.map +1 -0
  42. package/dist/recker.js +99 -0
  43. package/dist/utils/colors.d.ts +16 -0
  44. package/dist/utils/colors.d.ts.map +1 -1
  45. package/dist/utils/colors.js +16 -0
  46. package/dist/utils/tls-inspector.d.ts +6 -0
  47. package/dist/utils/tls-inspector.d.ts.map +1 -1
  48. package/dist/utils/tls-inspector.js +35 -1
  49. package/package.json +2 -2
  50. package/dist/mcp/data/embeddings.json +0 -1
@@ -12,6 +12,8 @@ import { rdap } from '../../utils/rdap.js';
12
12
  import { ScrapeDocument } from '../../scrape/document.js';
13
13
  import colors from '../../utils/colors.js';
14
14
  import { getShellSearch } from './shell-search.js';
15
+ import { openSearchPanel } from './search-panel.js';
16
+ import { ScrollBuffer, parseScrollKey, parseMouseScroll, enableMouseReporting, disableMouseReporting } from './scroll-buffer.js';
15
17
  let highlight;
16
18
  async function initDependencies() {
17
19
  if (!highlight) {
@@ -36,11 +38,16 @@ export class RekShell {
36
38
  initialized = false;
37
39
  currentDoc = null;
38
40
  currentDocUrl = '';
41
+ scrollBuffer;
42
+ originalStdoutWrite = null;
43
+ inScrollMode = false;
39
44
  constructor() {
40
45
  this.client = createClient({
41
46
  baseUrl: 'http://localhost',
42
- checkHooks: false
47
+ checkHooks: false,
48
+ http2: true
43
49
  });
50
+ this.scrollBuffer = new ScrollBuffer({ maxLines: 10000 });
44
51
  }
45
52
  async ensureInitialized() {
46
53
  if (this.initialized)
@@ -85,7 +92,7 @@ export class RekShell {
85
92
  const commands = [
86
93
  'get', 'post', 'put', 'delete', 'patch', 'head', 'options',
87
94
  'ws', 'udp', 'load', 'chat', 'ai',
88
- 'whois', 'tls', 'ssl', 'dns', 'rdap', 'ping',
95
+ 'whois', 'tls', 'ssl', 'dns', 'dns:propagate', 'rdap', 'ping',
89
96
  'scrap', '$', '$text', '$attr', '$html', '$links', '$images', '$scripts', '$css', '$sourcemaps', '$unmap', '$unmap:view', '$unmap:save', '$beautify', '$beautify:save', '$table',
90
97
  '?', 'search', 'suggest', 'example',
91
98
  'help', 'clear', 'exit', 'set', 'url', 'vars', 'env'
@@ -95,9 +102,11 @@ export class RekShell {
95
102
  }
96
103
  async start() {
97
104
  await this.ensureInitialized();
105
+ this.setupScrollCapture();
98
106
  console.clear();
99
107
  console.log(colors.bold(colors.cyan('Rek Console')));
100
108
  console.log(colors.gray('Chat with your APIs. Type "help" for magic.'));
109
+ console.log(colors.gray('Page Up/Down or mouse scroll to view history.'));
101
110
  console.log(colors.gray('--------------------------------------------\n'));
102
111
  this.prompt();
103
112
  this.rl.on('line', async (line) => {
@@ -112,15 +121,165 @@ export class RekShell {
112
121
  this.rl.close();
113
122
  });
114
123
  this.rl.on('close', () => {
124
+ this.cleanupScrollCapture();
115
125
  console.log(colors.gray('\nSee ya.'));
116
126
  process.exit(0);
117
127
  });
128
+ process.stdout.on('resize', () => {
129
+ this.scrollBuffer.updateViewport();
130
+ });
131
+ this.setupScrollKeyHandler();
132
+ }
133
+ setupScrollCapture() {
134
+ this.originalStdoutWrite = process.stdout.write.bind(process.stdout);
135
+ const self = this;
136
+ process.stdout.write = function (chunk, encodingOrCallback, callback) {
137
+ const content = typeof chunk === 'string' ? chunk : chunk.toString();
138
+ self.scrollBuffer.write(content);
139
+ if (!self.inScrollMode && self.originalStdoutWrite) {
140
+ return self.originalStdoutWrite(chunk, encodingOrCallback, callback);
141
+ }
142
+ return true;
143
+ };
144
+ }
145
+ cleanupScrollCapture() {
146
+ if (this.originalStdoutWrite) {
147
+ process.stdout.write = this.originalStdoutWrite;
148
+ this.originalStdoutWrite = null;
149
+ }
150
+ disableMouseReporting();
151
+ }
152
+ setupScrollKeyHandler() {
153
+ enableMouseReporting();
154
+ if (process.stdin.isTTY) {
155
+ const originalEmit = process.stdin.emit.bind(process.stdin);
156
+ const self = this;
157
+ process.stdin.emit = function (event, ...args) {
158
+ if (event === 'data') {
159
+ const data = args[0];
160
+ const mouseScroll = parseMouseScroll(data);
161
+ if (mouseScroll) {
162
+ self.handleScrollKey(mouseScroll);
163
+ return true;
164
+ }
165
+ const scrollKey = parseScrollKey(data);
166
+ if (scrollKey) {
167
+ self.handleScrollKey(scrollKey);
168
+ return true;
169
+ }
170
+ }
171
+ return originalEmit(event, ...args);
172
+ };
173
+ }
174
+ }
175
+ handleScrollKey(key) {
176
+ let needsRedraw = false;
177
+ switch (key) {
178
+ case 'pageUp':
179
+ if (!this.inScrollMode) {
180
+ this.enterScrollMode();
181
+ }
182
+ needsRedraw = this.scrollBuffer.pageUp();
183
+ break;
184
+ case 'pageDown':
185
+ needsRedraw = this.scrollBuffer.pageDown();
186
+ if (!this.scrollBuffer.isScrolledUp && this.inScrollMode) {
187
+ this.exitScrollMode();
188
+ return;
189
+ }
190
+ break;
191
+ case 'scrollUp':
192
+ if (!this.inScrollMode) {
193
+ this.enterScrollMode();
194
+ }
195
+ needsRedraw = this.scrollBuffer.scrollUp(3);
196
+ break;
197
+ case 'scrollDown':
198
+ needsRedraw = this.scrollBuffer.scrollDown(3);
199
+ if (!this.scrollBuffer.isScrolledUp && this.inScrollMode) {
200
+ this.exitScrollMode();
201
+ return;
202
+ }
203
+ break;
204
+ case 'home':
205
+ if (!this.inScrollMode) {
206
+ this.enterScrollMode();
207
+ }
208
+ this.scrollBuffer.scrollToTop();
209
+ needsRedraw = true;
210
+ break;
211
+ case 'end':
212
+ this.scrollBuffer.scrollToBottom();
213
+ if (this.inScrollMode) {
214
+ this.exitScrollMode();
215
+ return;
216
+ }
217
+ break;
218
+ case 'escape':
219
+ if (this.inScrollMode) {
220
+ this.exitScrollMode();
221
+ return;
222
+ }
223
+ break;
224
+ }
225
+ if (needsRedraw && this.inScrollMode) {
226
+ this.renderScrollView();
227
+ }
228
+ }
229
+ enterScrollMode() {
230
+ if (this.inScrollMode)
231
+ return;
232
+ this.inScrollMode = true;
233
+ this.rl.pause();
234
+ if (this.originalStdoutWrite) {
235
+ this.originalStdoutWrite('\x1b[?25l');
236
+ }
237
+ this.renderScrollView();
238
+ }
239
+ exitScrollMode() {
240
+ if (!this.inScrollMode)
241
+ return;
242
+ this.inScrollMode = false;
243
+ if (this.originalStdoutWrite) {
244
+ this.originalStdoutWrite('\x1b[?25h');
245
+ this.originalStdoutWrite('\x1b[2J\x1b[H');
246
+ }
247
+ const recentLines = this.scrollBuffer.getVisibleLines();
248
+ if (this.originalStdoutWrite) {
249
+ this.originalStdoutWrite(recentLines.join('\n') + '\n');
250
+ }
251
+ this.rl.resume();
252
+ this.prompt();
253
+ }
254
+ renderScrollView() {
255
+ if (!this.originalStdoutWrite)
256
+ return;
257
+ const rows = process.stdout.rows || 24;
258
+ const cols = process.stdout.columns || 80;
259
+ const visibleLines = this.scrollBuffer.getVisibleLines();
260
+ const info = this.scrollBuffer.getScrollInfo();
261
+ this.originalStdoutWrite('\x1b[2J\x1b[H');
262
+ for (let i = 0; i < visibleLines.length && i < rows - 1; i++) {
263
+ const line = visibleLines[i] || '';
264
+ const truncated = line.length > cols ? line.slice(0, cols - 1) + '…' : line;
265
+ this.originalStdoutWrite(truncated + '\n');
266
+ }
267
+ const scrollInfo = this.scrollBuffer.isScrolledUp
268
+ ? colors.yellow(`↑ ${this.scrollBuffer.position} lines | ${info.percent}% | `)
269
+ : '';
270
+ const helpText = colors.gray('Page Up/Down • Home/End • Esc to exit');
271
+ const statusBar = `\x1b[${rows};1H\x1b[7m ${scrollInfo}${helpText} \x1b[0m`;
272
+ this.originalStdoutWrite(statusBar);
118
273
  }
119
274
  prompt() {
120
275
  this.rl.setPrompt(this.getPrompt());
121
276
  this.rl.prompt();
122
277
  }
123
278
  async handleCommand(input) {
279
+ if (input.endsWith('?') && !input.startsWith('?') && input.length > 1) {
280
+ await this.runSearch(input.slice(0, -1).trim());
281
+ return;
282
+ }
124
283
  if (input.includes('=') && !input.includes(' ') && !input.startsWith('http')) {
125
284
  }
126
285
  const parts = this.parseLine(input);
@@ -165,6 +324,9 @@ export class RekShell {
165
324
  case 'dns':
166
325
  await this.runDNS(parts[1]);
167
326
  return;
327
+ case 'dns:propagate':
328
+ await this.runDNSPropagation(parts[1], parts[2]);
329
+ return;
168
330
  case 'rdap':
169
331
  await this.runRDAP(parts[1]);
170
332
  return;
@@ -650,25 +812,56 @@ export class RekShell {
650
812
  const duration = Math.round(performance.now() - startTime);
651
813
  const statusIcon = info.valid ? colors.green('✔') : colors.red('✖');
652
814
  const statusText = info.valid ? colors.green('Valid') : colors.red('Invalid/Expired');
653
- console.log(`${statusIcon} Certificate ${statusText}` + colors.gray(` (${duration}ms)\n`));
654
- console.log(colors.bold(' Certificate:'));
655
- console.log(` ${colors.cyan('Subject')}: ${info.subject?.CN || info.subject?.O || 'N/A'}`);
656
- console.log(` ${colors.cyan('Issuer')}: ${info.issuer?.CN || info.issuer?.O || 'N/A'}`);
657
- console.log(` ${colors.cyan('Valid From')}: ${info.validFrom.toISOString()}`);
658
- console.log(` ${colors.cyan('Valid To')}: ${info.validTo.toISOString()}`);
659
815
  const daysColor = info.daysRemaining < 30 ? colors.red : info.daysRemaining < 90 ? colors.yellow : colors.green;
660
- console.log(` ${colors.cyan('Days Remaining')}: ${daysColor(String(info.daysRemaining))}`);
661
- console.log(colors.bold('\n Connection:'));
662
- console.log(` ${colors.cyan('Protocol')}: ${info.protocol || 'N/A'}`);
663
- console.log(` ${colors.cyan('Cipher')}: ${info.cipher?.name || 'N/A'}`);
664
- console.log(` ${colors.cyan('Authorized')}: ${info.authorized ? colors.green('Yes') : colors.red('No')}`);
816
+ console.log(`\n${colors.bold(colors.cyan('🔒 TLS/SSL Report'))}`);
817
+ console.log(`${statusIcon} Certificate ${statusText}` + colors.gray(` (${duration}ms)\n`));
818
+ console.log(colors.bold('Certificate:'));
819
+ console.log(` ${colors.gray('Subject:')}`);
820
+ for (const key of Object.keys(info.subject || {})) {
821
+ console.log(` ${colors.gray(key.padEnd(10))}: ${info.subject[key]}`);
822
+ }
823
+ console.log(` ${colors.gray('Issuer:')}`);
824
+ for (const key of Object.keys(info.issuer || {})) {
825
+ console.log(` ${colors.gray(key.padEnd(10))}: ${info.issuer[key]}`);
826
+ }
827
+ console.log(` ${colors.gray('Expires:')} ${daysColor(info.daysRemaining + ' days')} (${info.validTo.toISOString().split('T')[0]})`);
828
+ console.log(` ${colors.gray('Valid From:')} ${info.validFrom.toISOString().split('T')[0]}`);
829
+ console.log(` ${colors.gray('Valid To:')} ${info.validTo.toISOString().split('T')[0]}`);
830
+ console.log(` ${colors.gray('Valid:')} ${info.valid ? colors.green('Yes') : colors.red('No')}`);
831
+ if (info.altNames && info.altNames.length > 0) {
832
+ console.log(colors.bold('\nSubject Alternative Names (SANs):'));
833
+ for (const name of info.altNames) {
834
+ console.log(` ${colors.cyan('→')} ${name}`);
835
+ }
836
+ }
837
+ console.log(colors.bold('\nPublic Key:'));
838
+ if (info.pubkey) {
839
+ console.log(` ${colors.gray('Algorithm:')} ${info.pubkey.algo}`);
840
+ console.log(` ${colors.gray('Size:')} ${info.pubkey.size} bits`);
841
+ }
842
+ else {
843
+ console.log(' Not available');
844
+ }
845
+ console.log(colors.bold('\nExtended Key Usage:'));
846
+ if (info.extKeyUsage && info.extKeyUsage.length > 0) {
847
+ for (const oid of info.extKeyUsage) {
848
+ console.log(` ${colors.cyan('→')} ${oid}`);
849
+ }
850
+ }
851
+ else {
852
+ console.log(' None');
853
+ }
854
+ console.log(colors.bold('\nConnection:'));
855
+ console.log(` ${colors.gray('Protocol:')} ${info.protocol || 'N/A'}`);
856
+ console.log(` ${colors.gray('Cipher:')} ${info.cipher?.name || 'N/A'}`);
857
+ console.log(` ${colors.gray('Auth:')} ${info.authorized ? colors.green('Trusted') : colors.red('Untrusted')}`);
665
858
  if (info.authorizationError) {
666
- console.log(` ${colors.cyan('Auth Error')}: ${colors.red(String(info.authorizationError))}`);
859
+ console.log(` ${colors.gray('Auth Error:')} ${colors.red(String(info.authorizationError))}`);
667
860
  }
668
- console.log(colors.bold('\n Fingerprints:'));
669
- console.log(` ${colors.cyan('SHA1')}: ${info.fingerprint}`);
670
- console.log(` ${colors.cyan('SHA256')}: ${info.fingerprint256}`);
671
- console.log(` ${colors.cyan('Serial')}: ${info.serialNumber}`);
861
+ console.log(colors.bold('\nFingerprints:'));
862
+ console.log(` ${colors.gray('SHA1:')} ${info.fingerprint}`);
863
+ console.log(` ${colors.gray('SHA256:')} ${info.fingerprint256}`);
864
+ console.log(` ${colors.gray('Serial:')} ${info.serialNumber}`);
672
865
  this.lastResponse = info;
673
866
  }
674
867
  catch (error) {
@@ -736,6 +929,27 @@ export class RekShell {
736
929
  }
737
930
  console.log('');
738
931
  }
932
+ async runDNSPropagation(domain, type = 'A') {
933
+ if (!domain) {
934
+ domain = this.getBaseDomain() || '';
935
+ if (!domain) {
936
+ console.log(colors.yellow('Usage: dns:propagate <domain> [type]'));
937
+ console.log(colors.gray(' Examples: dns:propagate google.com | dns:propagate github.com TXT'));
938
+ console.log(colors.gray(' Or set a base URL first: url https://example.com'));
939
+ return;
940
+ }
941
+ }
942
+ console.log(colors.gray(`Checking DNS propagation for ${domain} (${type})...`));
943
+ try {
944
+ const { checkPropagation, formatPropagationReport } = await import('../../dns/propagation.js');
945
+ const results = await checkPropagation(domain, type);
946
+ console.log(formatPropagationReport(results, domain, type));
947
+ this.lastResponse = results;
948
+ }
949
+ catch (error) {
950
+ console.error(colors.red(`Propagation check failed: ${error.message}`));
951
+ }
952
+ }
739
953
  async runRDAP(domain) {
740
954
  if (!domain) {
741
955
  domain = this.getRootDomain() || '';
@@ -1660,38 +1874,14 @@ export class RekShell {
1660
1874
  console.log('');
1661
1875
  }
1662
1876
  async runSearch(query) {
1663
- if (!query.trim()) {
1664
- console.log(colors.yellow('Usage: ? <query> or search <query>'));
1665
- console.log(colors.gray(' Examples:'));
1666
- console.log(colors.gray(' ? retry exponential backoff'));
1667
- console.log(colors.gray(' search cache configuration'));
1668
- return;
1669
- }
1670
- console.log(colors.gray('Searching documentation...'));
1671
1877
  try {
1672
- const search = getShellSearch();
1673
- const results = await search.search(query, { limit: 5 });
1674
- if (results.length === 0) {
1675
- console.log(colors.yellow(`No results for: "${query}"`));
1676
- console.log(colors.gray('Try different keywords like: retry, cache, streaming, websocket, pagination'));
1677
- return;
1678
- }
1679
- console.log(colors.bold(colors.cyan(`\nFound ${results.length} results for "${query}":\n`)));
1680
- for (let i = 0; i < results.length; i++) {
1681
- const result = results[i];
1682
- const score = Math.round(result.score * 100);
1683
- console.log(` ${colors.green(`${i + 1}.`)} ${colors.bold(result.title)} ${colors.gray(`(${score}%)`)}`);
1684
- console.log(` ${colors.gray(result.path)}`);
1685
- if (result.snippet) {
1686
- const snippet = result.snippet.slice(0, 120).replace(/\n/g, ' ');
1687
- console.log(` ${colors.gray(snippet)}${result.snippet.length > 120 ? '...' : ''}`);
1688
- }
1689
- console.log('');
1690
- }
1691
- console.log(colors.gray(' Tip: Use "get_doc <path>" to read full documentation'));
1878
+ this.rl.pause();
1879
+ await openSearchPanel(query.trim() || undefined);
1880
+ this.rl.resume();
1692
1881
  }
1693
1882
  catch (error) {
1694
1883
  console.error(colors.red(`Search failed: ${error.message}`));
1884
+ this.rl.resume();
1695
1885
  }
1696
1886
  }
1697
1887
  async runSuggest(useCase) {
@@ -1834,6 +2024,12 @@ export class RekShell {
1834
2024
  ${colors.green('suggest <use-case>')} Get implementation suggestions.
1835
2025
  ${colors.green('example <feature>')} Get code examples for a feature.
1836
2026
 
2027
+ ${colors.bold('Navigation:')}
2028
+ ${colors.green('Page Up/Down')} Scroll through command history.
2029
+ ${colors.green('Home/End')} Jump to top/bottom of history.
2030
+ ${colors.green('Mouse Scroll')} Scroll with mouse wheel.
2031
+ ${colors.green('Escape')} Exit scroll mode.
2032
+
1837
2033
  ${colors.bold('Examples:')}
1838
2034
  › url httpbin.org
1839
2035
  › get /json
@@ -49,14 +49,15 @@ export function createContract(client, contract) {
49
49
  if (endpoint.errors && err instanceof HttpError && err.response) {
50
50
  const schema = endpoint.errors[err.status];
51
51
  if (schema) {
52
+ let parsedError;
52
53
  try {
53
54
  const errorBody = await err.response.json();
54
- const parsedError = schema.parse(errorBody);
55
- throw new ContractError(err.status, parsedError, err);
55
+ parsedError = schema.parse(errorBody);
56
56
  }
57
57
  catch (parseErr) {
58
58
  throw err;
59
59
  }
60
+ throw new ContractError(err.status, parsedError, err);
60
61
  }
61
62
  }
62
63
  throw err;
@@ -2,6 +2,7 @@ import { type DnsSecurityRecords } from '../utils/dns-toolkit.js';
2
2
  export { createLookupFunction, customDNSLookup } from '../utils/dns.js';
3
3
  export { createDoHLookup } from '../utils/doh.js';
4
4
  export { getSecurityRecords, type DnsSecurityRecords } from '../utils/dns-toolkit.js';
5
+ export { checkPropagation, type PropagationResult, type DnsRecord, formatPropagationReport } from './propagation.js';
5
6
  export type { DNSOptions } from '../types/index.js';
6
7
  export type RecordType = 'A' | 'AAAA' | 'CNAME' | 'MX' | 'TXT' | 'NS' | 'SOA' | 'SRV' | 'CAA' | 'PTR';
7
8
  export type DoHProvider = 'cloudflare' | 'google' | 'quad9' | 'system';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/dns/index.ts"],"names":[],"mappings":"AA4BA,OAAO,EAAgD,KAAK,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAGhH,OAAO,EAAE,oBAAoB,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AACxE,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAE,kBAAkB,EAAE,KAAK,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AACtF,YAAY,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAKpD,MAAM,MAAM,UAAU,GAAG,GAAG,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,GAAG,KAAK,GAAG,IAAI,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,CA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,CAAC;IAiD1E,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;IAO7C,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;IAO7C,SAAS,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IAOxE,UAAU,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;IAQrD,SAAS,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;IAO9C,UAAU,CAAC,QAAQ,EAAE,MAAM;IAO3B,UAAU,CAAC,QAAQ,EAAE,MAAM;IAO3B,UAAU,CAAC,QAAQ,EAAE,MAAM;IAO3B,OAAO,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;IAOhC,UAAU,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,EAAE,CAAC,CAAC;IA4BhE,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,kBAAkB,CAAC;CAItE;AA0BD,wBAAgB,SAAS,CAAC,OAAO,CAAC,EAAE,gBAAgB,GAAG,SAAS,CAE/D"}
package/dist/dns/index.js CHANGED
@@ -3,6 +3,7 @@ import { getSecurityRecords as getSecurityRecordsUtil } from '../utils/dns-toolk
3
3
  export { createLookupFunction, customDNSLookup } from '../utils/dns.js';
4
4
  export { createDoHLookup } from '../utils/doh.js';
5
5
  export { getSecurityRecords } from '../utils/dns-toolkit.js';
6
+ export { checkPropagation, formatPropagationReport } from './propagation.js';
6
7
  export class DNSClient {
7
8
  options;
8
9
  constructor(options = {}) {
@@ -0,0 +1,19 @@
1
+ export interface DnsRecord {
2
+ name: string;
3
+ type: number;
4
+ TTL: number;
5
+ data: string;
6
+ }
7
+ export interface PropagationResult {
8
+ id: string;
9
+ provider: string;
10
+ status: 'ok' | 'error';
11
+ records: string[];
12
+ rawRecords: DnsRecord[];
13
+ latency: number;
14
+ error?: string;
15
+ location?: string;
16
+ }
17
+ export declare function checkPropagation(domain: string, type?: string): Promise<PropagationResult[]>;
18
+ export declare function formatPropagationReport(results: PropagationResult[], domain: string, type: string): string;
19
+ //# sourceMappingURL=propagation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"propagation.d.ts","sourceRoot":"","sources":["../../src/dns/propagation.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,iBAAiB;IAChC,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,IAAI,GAAG,OAAO,CAAC;IACvB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,UAAU,EAAE,SAAS,EAAE,CAAC;IACxB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AA8BD,wBAAsB,gBAAgB,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,GAAE,MAAY,GAAG,OAAO,CAAC,iBAAiB,EAAE,CAAC,CAyEvG;AAED,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,iBAAiB,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAqD1G"}
@@ -0,0 +1,129 @@
1
+ import { request } from 'undici';
2
+ import pc from '../utils/colors.js';
3
+ const PROVIDERS = [
4
+ { id: 'google', name: 'Google DNS', url: 'https://dns.google/resolve' },
5
+ { id: 'cloudflare', name: 'Cloudflare', url: 'https://cloudflare-dns.com/dns-query' },
6
+ { id: 'quad9', name: 'Quad9', url: 'https://dns.quad9.net:5053/dns-query' },
7
+ { id: 'alidns', name: 'AliDNS (China)', url: 'https://dns.alidns.com/resolve' },
8
+ ];
9
+ const TYPE_MAP = {
10
+ 'A': '1',
11
+ 'AAAA': '28',
12
+ 'CNAME': '5',
13
+ 'MX': '15',
14
+ 'NS': '2',
15
+ 'TXT': '16',
16
+ 'PTR': '12',
17
+ 'SRV': '33',
18
+ 'SOA': '6',
19
+ 'CAA': '257'
20
+ };
21
+ const TYPE_ID_MAP = Object.entries(TYPE_MAP).reduce((acc, [k, v]) => {
22
+ acc[Number(v)] = k;
23
+ return acc;
24
+ }, {});
25
+ export async function checkPropagation(domain, type = 'A') {
26
+ const typeId = TYPE_MAP[type.toUpperCase()] || type;
27
+ const queries = PROVIDERS.map(async (provider) => {
28
+ const start = performance.now();
29
+ try {
30
+ const url = new URL(provider.url);
31
+ url.searchParams.set('name', domain);
32
+ url.searchParams.set('type', typeId);
33
+ const { body, statusCode } = await request(url, {
34
+ method: 'GET',
35
+ headers: { 'Accept': 'application/dns-json' }
36
+ });
37
+ if (statusCode !== 200) {
38
+ throw new Error(`HTTP ${statusCode}`);
39
+ }
40
+ const json = await body.json();
41
+ const duration = performance.now() - start;
42
+ if (json.Status !== 0) {
43
+ const statusMap = {
44
+ 1: 'FormErr', 2: 'ServFail', 3: 'NXDomain', 4: 'NotImp', 5: 'Refused'
45
+ };
46
+ const errorName = statusMap[json.Status] || `Code ${json.Status}`;
47
+ return {
48
+ id: provider.id,
49
+ provider: provider.name,
50
+ status: 'error',
51
+ records: [],
52
+ rawRecords: [],
53
+ latency: duration,
54
+ error: errorName
55
+ };
56
+ }
57
+ const answers = (json.Answer || []);
58
+ const records = answers.map(r => r.data);
59
+ return {
60
+ id: provider.id,
61
+ provider: provider.name,
62
+ status: 'ok',
63
+ records,
64
+ rawRecords: answers,
65
+ latency: duration
66
+ };
67
+ }
68
+ catch (err) {
69
+ return {
70
+ id: provider.id,
71
+ provider: provider.name,
72
+ status: 'error',
73
+ records: [],
74
+ rawRecords: [],
75
+ latency: performance.now() - start,
76
+ error: err.message
77
+ };
78
+ }
79
+ });
80
+ return Promise.all(queries);
81
+ }
82
+ export function formatPropagationReport(results, domain, type) {
83
+ let output = '';
84
+ output += `
85
+ ${pc.bold(pc.cyan('🌍 Global DNS Propagation Check'))}
86
+ `;
87
+ output += `${pc.gray('Domain:')} ${pc.white(domain)} ${pc.gray('Type:')} ${pc.white(type.toUpperCase())}
88
+
89
+ `;
90
+ const consensus = {};
91
+ results.forEach(res => {
92
+ const key = res.status === 'ok' ? res.records.sort().join(', ') : `Error: ${res.error}`;
93
+ consensus[key] = (consensus[key] || 0) + 1;
94
+ const statusIcon = res.status === 'ok' ? pc.green('✔') : pc.red('✖');
95
+ const latencyColor = res.latency < 50 ? pc.green : res.latency < 200 ? pc.yellow : pc.red;
96
+ const latencyText = latencyColor(`${Math.round(res.latency)}ms`.padStart(5));
97
+ const providerName = pc.bold(res.provider.padEnd(15));
98
+ let recordsText = '';
99
+ if (res.status === 'ok') {
100
+ if (res.records.length === 0) {
101
+ recordsText = pc.yellow('(No records)');
102
+ }
103
+ else {
104
+ recordsText = res.records.join(', ');
105
+ if (recordsText.length > 60)
106
+ recordsText = recordsText.substring(0, 57) + '...';
107
+ }
108
+ }
109
+ else {
110
+ recordsText = pc.red(res.error || 'Unknown Error');
111
+ }
112
+ output += ` ${statusIcon} ${providerName} ${latencyText} ${recordsText}
113
+ `;
114
+ });
115
+ output += '\n';
116
+ const distinctAnswers = Object.keys(consensus);
117
+ if (distinctAnswers.length === 1) {
118
+ if (distinctAnswers[0].startsWith('Error')) {
119
+ output += pc.red('❌ All providers returned error.\n');
120
+ }
121
+ else {
122
+ output += pc.green('✅ All providers returned the same records. Propagation is complete.\n');
123
+ }
124
+ }
125
+ else if (distinctAnswers.length > 1) {
126
+ output += pc.yellow('⚠ Inconsistent results detected (Propagation in progress or Split-Horizon DNS).\n');
127
+ }
128
+ return output;
129
+ }
package/dist/index.d.ts CHANGED
@@ -64,4 +64,6 @@ export * as protocols from './protocols/index.js';
64
64
  export * from './mcp/client.js';
65
65
  export * from './mcp/contract.js';
66
66
  export { Client as Recker } from './core/client.js';
67
+ export { get, post, put, patch, del, del as delete, head, options, whois, whoisAvailable, dns, dnsSecurity, ws, recker, } from './recker.js';
68
+ export { default } from './recker.js';
67
69
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAC;AAC1C,cAAc,uBAAuB,CAAC;AACtC,cAAc,0BAA0B,CAAC;AACzC,cAAc,iBAAiB,CAAC;AAChC,cAAc,wBAAwB,CAAC;AACvC,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,yBAAyB,CAAC;AACxC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,qBAAqB,CAAC;AACpC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,0BAA0B,CAAC;AACzC,cAAc,yBAAyB,CAAC;AACxC,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,0BAA0B,CAAC;AACzC,cAAc,sBAAsB,CAAC;AACrC,cAAc,yBAAyB,CAAC;AACxC,cAAc,0BAA0B,CAAC;AACzC,cAAc,wBAAwB,CAAC;AACvC,cAAc,uBAAuB,CAAC;AACtC,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,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AC;AACnC,cAAc,yBAAyB,CAAC;AACxC,cAAc,oBAAoB,CAAC;AACnC,cAAc,0BAA0B,CAAC;AACzC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC;AACnC,cAAc,wBAAwB,CAAC;AACvC,OAAO,KAAK,OAAO,MAAM,oBAAoB,CAAC;AAC9C,OAAO,KAAK,OAAO,MAAM,oBAAoB,CAAC;AAC9C,OAAO,KAAK,SAAS,MAAM,sBAAsB,CAAC;AAGlD,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAGlC,OAAO,EAAE,MAAM,IAAI,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAOpD,OAAO,EACL,GAAG,EACH,IAAI,EACJ,GAAG,EACH,KAAK,EACL,GAAG,EACH,GAAG,IAAI,MAAM,EACb,IAAI,EACJ,OAAO,EACP,KAAK,EACL,cAAc,EACd,GAAG,EACH,WAAW,EACX,EAAE,EACF,MAAM,GACP,MAAM,aAAa,CAAC;AAGrB,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC"}
package/dist/index.js CHANGED
@@ -64,3 +64,5 @@ export * as protocols from './protocols/index.js';
64
64
  export * from './mcp/client.js';
65
65
  export * from './mcp/contract.js';
66
66
  export { Client as Recker } from './core/client.js';
67
+ export { get, post, put, patch, del, del as delete, head, options, whois, whoisAvailable, dns, dnsSecurity, ws, recker, } from './recker.js';
68
+ export { default } from './recker.js';
@@ -0,0 +1,18 @@
1
+ import type { EmbeddingsData } from './search/types.js';
2
+ declare function getPackageVersion(): string;
3
+ export declare function getEmbeddingsCachePath(version?: string): string;
4
+ export declare function hasLocalEmbeddings(version?: string): boolean;
5
+ export declare function loadLocalEmbeddings(version?: string): EmbeddingsData | null;
6
+ export declare function saveLocalEmbeddings(data: EmbeddingsData, version?: string): void;
7
+ export declare function downloadEmbeddings(version?: string): Promise<EmbeddingsData>;
8
+ export declare function loadBundledEmbeddings(): Promise<EmbeddingsData | null>;
9
+ export interface LoadEmbeddingsOptions {
10
+ forceDownload?: boolean;
11
+ version?: string;
12
+ offline?: boolean;
13
+ debug?: boolean;
14
+ }
15
+ export declare function loadEmbeddings(options?: LoadEmbeddingsOptions): Promise<EmbeddingsData | null>;
16
+ export declare function clearEmbeddingsCache(version?: string): void;
17
+ export { getPackageVersion };
18
+ //# sourceMappingURL=embeddings-loader.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"embeddings-loader.d.ts","sourceRoot":"","sources":["../../src/mcp/embeddings-loader.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AA+BxD,iBAAS,iBAAiB,IAAI,MAAM,CAKnC;AAyBD,wBAAgB,sBAAsB,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAI/D;AAKD,wBAAgB,kBAAkB,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAE5D;AAKD,wBAAgB,mBAAmB,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,cAAc,GAAG,IAAI,CAa3E;AAKD,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,cAAc,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAUhF;AAKD,wBAAsB,kBAAkB,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC,CAoBlF;AAKD,wBAAsB,qBAAqB,IAAI,OAAO,CAAC,cAAc,GAAG,IAAI,CAAC,CAsB5E;AAED,MAAM,WAAW,qBAAqB;IAEpC,aAAa,CAAC,EAAE,OAAO,CAAC;IAExB,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAsBD,wBAAsB,cAAc,CAAC,OAAO,GAAE,qBAA0B,GAAG,OAAO,CAAC,cAAc,GAAG,IAAI,CAAC,CAsCxG;AAKD,wBAAgB,oBAAoB,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAW3D;AAKD,OAAO,EAAE,iBAAiB,EAAE,CAAC"}