llm-kb 0.2.0 → 0.4.1

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 (41) hide show
  1. package/README.md +322 -60
  2. package/bin/anthropic-5TIU2EED.js +5515 -0
  3. package/bin/azure-openai-responses-ZVUVMK3G.js +190 -0
  4. package/bin/chunk-2WV6TQRI.js +4792 -0
  5. package/bin/chunk-3YMNGUZZ.js +262 -0
  6. package/bin/chunk-5PYKQQLA.js +14295 -0
  7. package/bin/chunk-65KFH7OI.js +31 -0
  8. package/bin/chunk-DHOXVEIR.js +7261 -0
  9. package/bin/chunk-EAQYK3U2.js +41 -0
  10. package/bin/chunk-IFS3OKBN.js +428 -0
  11. package/bin/chunk-LDHOKBJA.js +86 -0
  12. package/bin/chunk-SLYBG6ZQ.js +32681 -0
  13. package/bin/chunk-UEODFF7H.js +17 -0
  14. package/bin/chunk-XCXTZJGO.js +174 -0
  15. package/bin/chunk-XFV534WU.js +7056 -0
  16. package/bin/cli.js +5496 -163
  17. package/bin/dist-3YH7P2QF.js +1244 -0
  18. package/bin/google-JFC43EFJ.js +371 -0
  19. package/bin/google-gemini-cli-K4XNMYDI.js +712 -0
  20. package/bin/google-vertex-Y42F254G.js +414 -0
  21. package/bin/indexer-KSYRIVVN.js +10 -0
  22. package/bin/mistral-ZU2JS5XZ.js +38406 -0
  23. package/bin/multipart-parser-CO464TZY.js +371 -0
  24. package/bin/openai-codex-responses-NW2LELBH.js +712 -0
  25. package/bin/openai-completions-TW3VKTHO.js +662 -0
  26. package/bin/openai-responses-VGL522MK.js +198 -0
  27. package/bin/src-Y22OHE3S.js +1408 -0
  28. package/package.json +16 -6
  29. package/PHASE2_SPEC.md +0 -274
  30. package/SPEC.md +0 -275
  31. package/bin/chunk-MYQ36JJB.js +0 -118
  32. package/bin/indexer-LSYSZXZX.js +0 -6
  33. package/plan.md +0 -55
  34. package/src/cli.ts +0 -132
  35. package/src/indexer.ts +0 -148
  36. package/src/pdf.ts +0 -119
  37. package/src/query.ts +0 -132
  38. package/src/resolve-kb.ts +0 -19
  39. package/src/scan.ts +0 -59
  40. package/src/watcher.ts +0 -84
  41. package/tsconfig.json +0 -14
@@ -0,0 +1,31 @@
1
+ // node_modules/@mariozechner/pi-ai/dist/providers/github-copilot-headers.js
2
+ function inferCopilotInitiator(messages) {
3
+ const last = messages[messages.length - 1];
4
+ return last && last.role !== "user" ? "agent" : "user";
5
+ }
6
+ function hasCopilotVisionInput(messages) {
7
+ return messages.some((msg) => {
8
+ if (msg.role === "user" && Array.isArray(msg.content)) {
9
+ return msg.content.some((c) => c.type === "image");
10
+ }
11
+ if (msg.role === "toolResult" && Array.isArray(msg.content)) {
12
+ return msg.content.some((c) => c.type === "image");
13
+ }
14
+ return false;
15
+ });
16
+ }
17
+ function buildCopilotDynamicHeaders(params) {
18
+ const headers = {
19
+ "X-Initiator": inferCopilotInitiator(params.messages),
20
+ "Openai-Intent": "conversation-edits"
21
+ };
22
+ if (params.hasImages) {
23
+ headers["Copilot-Vision-Request"] = "true";
24
+ }
25
+ return headers;
26
+ }
27
+
28
+ export {
29
+ hasCopilotVisionInput,
30
+ buildCopilotDynamicHeaders
31
+ };