@cloro-dev/response-parser 0.5.3 → 0.6.0

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.
@@ -0,0 +1,25 @@
1
+ import { BaseProvider } from './base-provider';
2
+ import { AIProvider, ParsedResponse, ParseOptions, ContentExtraction } from '../core/types';
3
+ /**
4
+ * Bing AI Mode (bing.com/copilotsearch).
5
+ *
6
+ * The page that cloro stores is Bing's chat shell. The answer is inside an
7
+ * `<iframe srcdoc>` that an inline `onload` script sizes to its content. With
8
+ * scripts blocked (a sandboxed preview, or this parser, which removes
9
+ * scripts), the frame stays 150px high and shows only the first sentence. So
10
+ * this provider renders the frame's own document, which holds the whole
11
+ * answer: the reasoning panel, the answer, the citation chips and the source
12
+ * cards.
13
+ */
14
+ export declare class BingAiModeProvider extends BaseProvider {
15
+ readonly name: AIProvider;
16
+ readonly baseUrl = "https://www.bing.com";
17
+ extractContent(response: any): ContentExtraction;
18
+ /**
19
+ * The document in the answer frame's `srcdoc`, or the input when the page
20
+ * has no such frame (for example, when it is already the answer document).
21
+ */
22
+ answerDocument(html: string): string;
23
+ parse(response: any, options?: ParseOptions): ParsedResponse;
24
+ }
25
+ //# sourceMappingURL=bing-ai-mode.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bing-ai-mode.d.ts","sourceRoot":"","sources":["../../src/providers/bing-ai-mode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,YAAY,EAAE,iBAAiB,EAAoB,MAAM,eAAe,CAAC;AAE9G;;;;;;;;;;GAUG;AACH,qBAAa,kBAAmB,SAAQ,YAAY;IAClD,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAiB;IAC1C,QAAQ,CAAC,OAAO,0BAA0B;IAE1C,cAAc,CAAC,QAAQ,EAAE,GAAG,GAAG,iBAAiB;IAIhD;;;OAGG;IACH,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM;IAYpC,KAAK,CAAC,QAAQ,EAAE,GAAG,EAAE,OAAO,CAAC,EAAE,YAAY,GAAG,cAAc;CAsD7D"}
@@ -1,5 +1,9 @@
1
1
  import { BaseProvider } from './base-provider';
2
2
  import { AIProvider, ParsedResponse, ParseOptions, ContentExtraction } from '../core/types';
3
+ /**
4
+ * @deprecated cloro discontinues its Copilot endpoint. For Bing's AI answers,
5
+ * use `BingAiModeProvider` (`BING_AIMODE`).
6
+ */
3
7
  export declare class CopilotProvider extends BaseProvider {
4
8
  readonly name: AIProvider;
5
9
  readonly baseUrl = "https://copilot.microsoft.com";
@@ -1 +1 @@
1
- {"version":3,"file":"copilot.d.ts","sourceRoot":"","sources":["../../src/providers/copilot.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,YAAY,EAAE,iBAAiB,EAAoB,MAAM,eAAe,CAAC;AAE9G,qBAAa,eAAgB,SAAQ,YAAY;IAC/C,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAa;IACtC,QAAQ,CAAC,OAAO,mCAAmC;IAGnD,cAAc,CAAC,QAAQ,EAAE,GAAG,GAAG,iBAAiB;IAIhD;;OAEG;IACH,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM;IASlC;;OAEG;IACH,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM;IAiBlC;;OAEG;IACH,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM;IAYxC;;OAEG;IACH,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM;IAKnC;;OAEG;IACH,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM;IAMnC,KAAK,CAAC,QAAQ,EAAE,GAAG,EAAE,OAAO,CAAC,EAAE,YAAY,GAAG,cAAc;CAiF7D"}
1
+ {"version":3,"file":"copilot.d.ts","sourceRoot":"","sources":["../../src/providers/copilot.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,YAAY,EAAE,iBAAiB,EAAoB,MAAM,eAAe,CAAC;AAE9G;;;GAGG;AACH,qBAAa,eAAgB,SAAQ,YAAY;IAC/C,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAa;IACtC,QAAQ,CAAC,OAAO,mCAAmC;IAGnD,cAAc,CAAC,QAAQ,EAAE,GAAG,GAAG,iBAAiB;IAIhD;;OAEG;IACH,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM;IASlC;;OAEG;IACH,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM;IAiBlC;;OAEG;IACH,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM;IAYxC;;OAEG;IACH,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM;IAKnC;;OAEG;IACH,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM;IAMnC,KAAK,CAAC,QAAQ,EAAE,GAAG,EAAE,OAAO,CAAC,EAAE,YAAY,GAAG,cAAc;CAiF7D"}
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@cloro-dev/response-parser",
3
- "version": "0.5.3",
3
+ "version": "0.6.0",
4
4
  "type": "module",
5
- "description": "Parse and render AI model responses from ChatGPT, Gemini, Perplexity, and more",
5
+ "description": "Parse and render AI model responses from ChatGPT, Gemini, Perplexity, Google AI Mode, Bing AI Mode, and more",
6
6
  "main": "dist/index.cjs",
7
7
  "module": "dist/index.esm.js",
8
8
  "types": "dist/index.d.ts",
@@ -31,7 +31,7 @@
31
31
  "chatgpt",
32
32
  "gemini",
33
33
  "perplexity",
34
- "copilot",
34
+ "bing",
35
35
  "html-parser",
36
36
  "typescript",
37
37
  "framework-agnostic"