dsh-vision-router 3.2.1 → 3.3.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.
Files changed (37) hide show
  1. package/README.md +3 -3
  2. package/README.zh.md +18 -3
  3. package/THIRD_PARTY_NOTICES.md +60 -0
  4. package/assets/licenses/llvm-mingw-LICENSE.txt +279 -0
  5. package/assets/licenses/mingw-w64-runtime-COPYING.txt +265 -0
  6. package/assets/licenses/ncnn-LICENSE.txt +86 -0
  7. package/docs/architecture/dsh-support-window.md +25 -6
  8. package/docs/compatibility/dsh-0.2.2-rc3-audit.md +131 -0
  9. package/docs/releases/v3.2.2.md +25 -0
  10. package/docs/releases/v3.3.0.md +34 -0
  11. package/index.js +265 -159
  12. package/lib/client.js +4 -4
  13. package/lib/core-primitives.js +115 -56
  14. package/lib/dsh-support-window.js +6 -3
  15. package/lib/native-ocr-annotation-risk.js +33 -0
  16. package/lib/native-ocr-canary.js +156 -0
  17. package/lib/native-ocr-chemistry-review.js +37 -0
  18. package/lib/native-ocr-document.js +243 -0
  19. package/lib/native-ocr-installation.js +17 -0
  20. package/lib/native-ocr-integrity.js +93 -0
  21. package/lib/native-ocr-question-labels.js +167 -0
  22. package/lib/native-ocr-supervisor.js +268 -0
  23. package/lib/runtime-reliability.js +7 -0
  24. package/lib/session-query-readers.js +8 -2
  25. package/lib/session-vision-attachment-index.js +61 -14
  26. package/lib/settings-ia-client-prelude.js +1 -1
  27. package/lib/tesseract-image-preprocess.js +35 -0
  28. package/lib/trace-vtracer-process-runtime.js +133 -0
  29. package/lib/trace-vtracer-process.js +43 -0
  30. package/lib/vision-attachment-handle-runtime.js +11 -2
  31. package/lib/vision-backend-runtime-policy.js +5 -3
  32. package/lib/vision-image-input-reader.js +67 -0
  33. package/lib/vision-image-input-verdict.js +24 -3
  34. package/lib/vision-tool-runtime-boundary.js +7 -10
  35. package/lib/vision-tool-stage.js +58 -0
  36. package/package.json +5 -4
  37. package/scripts/install-native-ocr.mjs +144 -0
package/README.md CHANGED
@@ -22,7 +22,7 @@
22
22
  > **Data leaves your machine by default.** When a cloud vision model is used, Vision Router sends the image (or a derived crop), the vision prompt and related request metadata to that provider. A fresh install has an anonymous OVHcloud vision fallback enabled, so "free" and "no key" do **not** mean offline. Do not use the cloud chain for confidential, regulated or classified material. See [Data flow and strict local-only use](#data-flow-and-strict-local-only-use).
23
23
 
24
24
  > [!WARNING]
25
- > **v3.2.1 stable maintenance release:** Fixes Settings bridge initialization and local/authorized remote configuration handling, and replaces the Potrace/Jimp SVG tracing dependency chain with isolated VTracer WASM. Requires DSH >=0.2.1-rc.5 <0.3.0-0 and Node.js >=24.9.0; old DSH/Node environments are **not** newly supported. **Existing profiles are not upgraded automatically.** Back up your profile and run the read-only `doctor --upgrade-preflight` before upgrading; keep a rollback path. Third-party Desktop generation installers have not been separately certified. See [v3.2.1 release notes](docs/releases/v3.2.1.md).
25
+ > **v3.3.0 minor release — confirm publication through GitHub Releases/npm:** Brings the v3.2.2 attachment/Session timeout and security fixes, bounded VTracer subprocess isolation, Windows portability, and a SHA-verified **owner-installed** PP-OCRv6/ncnn OCR preference on supported Mac ARM64/Windows x64. Native model weights and executables are **not included in npm**; optional native archive redistribution remains separately gated. Without an installed native worker, auto can still use local Tesseract, which also remains explicitly selectable. DSH >=0.2.1-rc.5 <0.3.0-0 and Node.js >=24.9.0 remain required; no profile auto-migration. The default cloud vision fallback may transmit images externally unless strict local-only is enabled. Back up, run read-only `doctor --upgrade-preflight`, and keep a rollback option. See [v3.3.0 release notes](docs/releases/v3.3.0.md).
26
26
 
27
27
  ## Start here
28
28
 
@@ -422,7 +422,7 @@ ollama pull qwen2.5vl
422
422
  ## Requirements
423
423
 
424
424
  - DeepSeek Harness Web profile. Normal installs can use `npx @deepseek-ai/dsh ...`; source checkouts use `pnpm dsh ...`. A bare `dsh ...` command only works when the CLI is already on your shell `PATH`.
425
- - **DSH Host policy (unreleased DVR 3.2 candidate):** Minimum DSH 0.2.1-rc.5; currently recommended DSH 0.2.2-rc.1. DSH 0.1.x, 0.2.0 and earlier 0.2.1 prereleases are retired. DSH owns native Connection authentication, routing and trustedHosts. Older sessions, attachments and Settings data remain readable. See [new Host support window](docs/architecture/dsh-support-window.md) and [retirement plan](docs/architecture/dvr32-host-retirement.md).
425
+ - **DSH Host policy (DVR 3.2+ / 3.3.0 candidate):** Minimum DSH 0.2.1-rc.5; currently recommended DSH 0.2.2-rc.1. DSH 0.1.x, 0.2.0 and earlier 0.2.1 prereleases are retired. DSH owns native Connection authentication, routing and trustedHosts. Older sessions, attachments and Settings data remain readable. See [new Host support window](docs/architecture/dsh-support-window.md) and [retirement plan](docs/architecture/dvr32-host-retirement.md).
426
426
  - Node.js >=24.9.0 (Host side; Node 22 is retired).
427
427
  - No API key for the default free chain; a credential reference (`apiKeyEnv`) only for paid `httpProviders`.
428
428
  - Chrome / Chromium / Edge is needed only for `vision_html_screenshot`; every other tool works without a browser.
@@ -611,7 +611,7 @@ exploration (LLM7.io and OVHcloud anonymous tiers) by
611
611
 
612
612
  ## Release notes and community
613
613
 
614
- Release details: [v3.1.3 release candidate notes](docs/releases/v3.1.3.md). Check GitHub Releases or npm for the published version.
614
+ Release details: [v3.3.0 notes](docs/releases/v3.3.0.md). Check GitHub Releases or npm for the actually published version.
615
615
 
616
616
  <p align="center">
617
617
  <sub>Ecosystem:</sub>
package/README.zh.md CHANGED
@@ -22,7 +22,7 @@
22
22
  > **默认配置会让数据出网。** 使用云端视觉模型时,Vision Router 会将图片(或由它裁剪出的局部)、识图提示词及相关请求元数据发送给对应供应商。新安装默认开启 OVHcloud 匿名视觉兜底,因此“免费”和“免 Key”不等于离线。涉密、涉案、内部或其他受限材料请勿使用云端链路。详见[数据流向与严格纯本地配置](#数据流向与严格纯本地配置)。
23
23
 
24
24
  > [!WARNING]
25
- > **v3.2.1 正式维护版:** 修复设置桥挂载和本地/授权远程设置读写问题,将 SVG 轮廓追踪的 Potrace/Jimp 依赖链替换为隔离执行的 VTracer WASM。仍要求 DSH >=0.2.1-rc.5 <0.3.0-0、Node.js >=24.9.0,**不恢复对旧 DSH/Node 的支持**。**不会自动迁移现有 Profile。** 升级前备份并运行只读 `doctor --upgrade-preflight`,保留回滚方案。第三方 Desktop 代际安装器尚未单独认证。详见 [v3.2.1 发布说明](docs/releases/v3.2.1.md)。
25
+ > **v3.3.0 次版本更新(正式发布状态请核实 GitHub Releases/npm):** 集成附件 ID/会话恢复的完整任务超时和权限加固、VTracer 独立进程隔离、Windows 兼容修复,以及 Mac ARM64/Windows x64 **用户自行安装**的 SHA-256 校验 PP-OCRv6/ncnn 主力 OCR 路线;`auto` 对不确定识别在授权和预算内核查。**npm 包不包含原生模型或可执行文件**,原生离线包公开分发仍须独立完成许可证和供应链审核。未安装原生 ncnn 时仍可回退到 Tesseract,也可以显式指定兼容引擎。最低要求仍为 DSH >=0.2.1-rc.5 <0.3.0-0、Node.js >=24.9.0;不自动迁移 Profile。默认云端视觉兜底可能发送图片,敏感内容应使用严格纯本地。升级前请备份、运行只读 `doctor --upgrade-preflight` 并保留回滚版本。详见 [v3.3.0 发布说明](docs/releases/v3.3.0.md)。
26
26
 
27
27
  ## 先用起来
28
28
 
@@ -426,7 +426,22 @@ ollama pull qwen2.5vl
426
426
  - 默认免费链路无需 API Key;付费 `httpProviders` 只需一个凭据引用(`apiKeyEnv`)。
427
427
  - 只有 `vision_html_screenshot` 需要 Chrome / Chromium / Edge;其余工具无浏览器也能用。
428
428
  - 桌面截屏必须显式开启。Windows/macOS 使用系统截屏能力;Linux 需安装 ImageMagick `import` 或 `scrot`,且必须处于可截取的桌面会话(Wayland 支持取决于环境)。
429
- - tesseract 可选。`vision_ocr` 默认使用 `ocrEngine: auto`(本地 Tesseract 优先、失败或空结果再回退视觉模型);也可在「设置 → 高级 → OCR 默认引擎」强制仅 Tesseract 或直接使用视觉模型,无需卸载 Tesseract。单次调用显式 `engine=tesseract|vision` 始终覆盖默认设置。
429
+ - tesseract 可选。`vision_ocr` 默认使用 `ocrEngine: auto`:在 **Mac ARM64 / Windows x64** 上优先使用已安装且 SHA-256 校验通过的 PP-OCRv6 small/ncnn,未安装或失败才使用本地 Tesseract,最后按照现有隐私设置决定是否回退视觉模型。其他系统暂时保持 Tesseract 优先。针对 Issue #836,Tesseract 自适应识别增加 PSM 7(单行);只有低置信度时才按需尝试底部字幕的灰度、放大与暗底反相预处理。`auto` 遇到非空但低置信度的本地结果时,在非严格本地模式、未触发熔断且剩余时间允许的情况下,可继续调用视觉模型核查(可能产生服务商用量);否则保留带不确定性标记的本地结果。仍可在「设置 → 高级 → OCR 默认引擎」强制仅 Tesseract 或直接使用视觉模型。单次调用显式 `engine=tesseract|vision` 始终优先,`engine=tesseract` 绝不触发云端视觉请求。
430
+
431
+ 本地安装已验证的 PP-OCRv6 引擎(Mac ARM64 已验证;Windows x64 已通过本地安装与正式 \`auto\` 调用,公开发行仍待最终审查):拿到经来源核验的单文件包后运行下面一条命令即可,不需要自行编译;安装器会逐项校验二进制与五个模型资产。当前两个包均为**本地验证候选,尚未上传公共 Release**;Windows 版本仍需完成许可证审核。
432
+
433
+ ```bash
434
+ node scripts/install-native-ocr.mjs --bundle /absolute/path/to/ppocrv6-small-darwin-arm64.tar.gz
435
+ # Windows x64 则使用 ppocrv6-small-win32-x64.tar.gz
436
+ ```
437
+
438
+ 维护者仍可使用原有两个路径参数安装已验证的本地产物:
439
+
440
+ ```bash
441
+ node scripts/install-native-ocr.mjs --binary /absolute/path/to/native-ocr-worker --models /absolute/path/to/ppocrv6-ncnn-models
442
+ ```
443
+
444
+ 安装成功后无需设置 `DVR_NCNN_OCR_CANARY` 等实验环境变量;`auto` 自动启用。若未安装则正常回退。**npm 包不包含任何原生二进制或模型权重**;来源和完整许可声明见 `THIRD_PARTY_NOTICES.md`。Linux 原生版本仍未获准进入默认路径;Windows x64 的本地安装需经明确选择且不提供公开发行包,详见许可声明。
430
445
 
431
446
  ## 安装与生命周期
432
447
 
@@ -605,7 +620,7 @@ npx dsh-vision-router doctor --profile web
605
620
 
606
621
  ## 版本公告与社区链接
607
622
 
608
- 版本更新详情:[v3.1.3 候选版更新说明](docs/releases/v3.1.3.md)。正式可安装版本请以 GitHub Releases 或 npm 为准。
623
+ 版本更新详情:[v3.3.0 发布说明](docs/releases/v3.3.0.md)。正式可安装版本请以 GitHub Releases 或 npm 为准。
609
624
 
610
625
  <p align="center">
611
626
  <sub>生态收录:</sub>
@@ -1,5 +1,65 @@
1
1
  # Third-Party Notices
2
2
 
3
+ ## Optional local PP-OCRv6 / ncnn OCR engine (macOS ARM64 and Windows x64)
4
+
5
+ This npm package does **not** bundle native OCR binaries, model weights or conversion output.
6
+ Owners may install a single checksum-validated release archive using
7
+ `scripts/install-native-ocr.mjs --bundle /absolute/path/to/ppocrv6-small-darwin-arm64.tar.gz`.
8
+ The bundle is created by `scripts/package-native-ocr.mjs` from previously verified
9
+ source-linked binaries and models. Its contents are individually verified before installation,
10
+ and unknown archive members are refused. When available, `vision_ocr` auto mode uses
11
+ the local engine, otherwise it preserves Tesseract/vision fallback.
12
+
13
+ - PaddlePaddle PP-OCRv6 small detector model: `PP-OCRv6_small_det_onnx`,
14
+ revision `28fe5895c24fd108c19eb3e8479f4ab385fbfc62`,
15
+ upstream model card **Apache-2.0**:
16
+ https://huggingface.co/PaddlePaddle/PP-OCRv6_small_det_onnx
17
+ - PaddlePaddle PP-OCRv6 small recognizer model: `PP-OCRv6_small_rec_onnx`,
18
+ revision `b8f84f0b80c529de40b4fbb3544b84fa7233a513`,
19
+ upstream model card **Apache-2.0**:
20
+ https://huggingface.co/PaddlePaddle/PP-OCRv6_small_rec_onnx
21
+ - Dictionary `ppocr/utils/dict/ppocrv6_dict.txt`: PaddlePaddle/PaddleOCR
22
+ commit `dab3fe35379033fdcb2d0e9572fac0b36c9a9ebf`,
23
+ **Apache-2.0**.
24
+ - CPU inference engine: Tencent/ncnn
25
+ commit `d1f6ac67e9fc91390cc70f7168573fd2626f1d66`,
26
+ **BSD-3-Clause** plus its internally listed **BSD-2-Clause/zlib**
27
+ components. The unmodified upstream 6.3 KiB license/third-party attribution
28
+ text is included as `assets/licenses/ncnn-LICENSE.txt` with SHA-256
29
+ `7c974bac98848df46be1af5bdaa3c3c9c01f6082a90f55caeb7f60c6208aa255`.
30
+ - Full Apache 2.0 text: `assets/licenses/apache-2.0.txt`.
31
+
32
+ Windows x64 research candidate (not publicly released) uses LLVM-MinGW
33
+ 20261020 UCRT (official toolchain tarball SHA-256
34
+ `fd5462b7f5d93b2ff981fcd3f9c7e427e47f3203c64ea91c27bcc444eebd74cd`)
35
+ and explicitly `-static` to statically link `libc++`, `libunwind`, and
36
+ compiler runtime. Full original Apache-2.0 WITH LLVM Exceptions license is
37
+ `assets/licenses/llvm-mingw-LICENSE.txt` and the exact mingw-w64 runtime
38
+ notice is `assets/licenses/mingw-w64-runtime-COPYING.txt`.
39
+ Windows ncnn binary's actual PE import table lists only KERNEL32 and OS UCRT
40
+ API-set DLLs; no additional GNU/LLVM runtime DLLs. The mingw-w64 runtime notice contains a general disclosure about LGPL
41
+ Wine-imported headers/IDLs. The **actual** Windows build's Ninja dependency
42
+ graph contains 743 unique toolchain headers. After replacing the toolchain's
43
+ old GPL-with-GCC-only-exception \`stdarg.h\` with the pin-verified Apache-2.0
44
+ LLVM header and recompiling 549 affected objects, no GPL/LGPL-labeled header
45
+ remained in that observed dependency set. The sole Wine-origin header
46
+ (\`corecrt_stdio_config.h\`) explicitly declares **Public Domain**.
47
+ Full upstream notices are still retained even where a component is unused.
48
+ These checks cover the tested binary's identified build dependencies, not
49
+ a formal legal opinion, signed reproducible release or every LLVM/MinGW target.
50
+
51
+ The verified Mac ARM64 executable imports only the operating system's
52
+ `/usr/lib/libc++.1.dylib` and `/usr/lib/libSystem.B.dylib`; the npm package
53
+ does not redistribute them. **The tested Windows x64 binary's compiler/header/runtime source license
54
+ inventory is recorded and its discovered linked components have permissive
55
+ terms; a public release still requires clean build attestation and final
56
+ third-party notice review.** Linux remains excluded. Native binaries and
57
+ models are not included in the npm package or a public release.
58
+ The original ONNX and converted ncnn model hashes are pinned in
59
+ `quality/native-ocr-provenance-LAB.json` (research record, not a packaged
60
+ weight). The installed local asset directory includes copies of the two
61
+ license texts and a source notice.
62
+
3
63
  dsh-vision-router is distributed under the MIT license; it is not a relicensing of its dependencies.
4
64
  The versioned VTracer WASM package is distributed separately as an npm dependency.
5
65
  This document records the vectorizer-related notices and a reviewed license snapshot.
@@ -0,0 +1,279 @@
1
+ ==============================================================================
2
+ The LLVM Project is under the Apache License v2.0 with LLVM Exceptions:
3
+ ==============================================================================
4
+
5
+ Apache License
6
+ Version 2.0, January 2004
7
+ http://www.apache.org/licenses/
8
+
9
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
10
+
11
+ 1. Definitions.
12
+
13
+ "License" shall mean the terms and conditions for use, reproduction,
14
+ and distribution as defined by Sections 1 through 9 of this document.
15
+
16
+ "Licensor" shall mean the copyright owner or entity authorized by
17
+ the copyright owner that is granting the License.
18
+
19
+ "Legal Entity" shall mean the union of the acting entity and all
20
+ other entities that control, are controlled by, or are under common
21
+ control with that entity. For the purposes of this definition,
22
+ "control" means (i) the power, direct or indirect, to cause the
23
+ direction or management of such entity, whether by contract or
24
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
25
+ outstanding shares, or (iii) beneficial ownership of such entity.
26
+
27
+ "You" (or "Your") shall mean an individual or Legal Entity
28
+ exercising permissions granted by this License.
29
+
30
+ "Source" form shall mean the preferred form for making modifications,
31
+ including but not limited to software source code, documentation
32
+ source, and configuration files.
33
+
34
+ "Object" form shall mean any form resulting from mechanical
35
+ transformation or translation of a Source form, including but
36
+ not limited to compiled object code, generated documentation,
37
+ and conversions to other media types.
38
+
39
+ "Work" shall mean the work of authorship, whether in Source or
40
+ Object form, made available under the License, as indicated by a
41
+ copyright notice that is included in or attached to the work
42
+ (an example is provided in the Appendix below).
43
+
44
+ "Derivative Works" shall mean any work, whether in Source or Object
45
+ form, that is based on (or derived from) the Work and for which the
46
+ editorial revisions, annotations, elaborations, or other modifications
47
+ represent, as a whole, an original work of authorship. For the purposes
48
+ of this License, Derivative Works shall not include works that remain
49
+ separable from, or merely link (or bind by name) to the interfaces of,
50
+ the Work and Derivative Works thereof.
51
+
52
+ "Contribution" shall mean any work of authorship, including
53
+ the original version of the Work and any modifications or additions
54
+ to that Work or Derivative Works thereof, that is intentionally
55
+ submitted to Licensor for inclusion in the Work by the copyright owner
56
+ or by an individual or Legal Entity authorized to submit on behalf of
57
+ the copyright owner. For the purposes of this definition, "submitted"
58
+ means any form of electronic, verbal, or written communication sent
59
+ to the Licensor or its representatives, including but not limited to
60
+ communication on electronic mailing lists, source code control systems,
61
+ and issue tracking systems that are managed by, or on behalf of, the
62
+ Licensor for the purpose of discussing and improving the Work, but
63
+ excluding communication that is conspicuously marked or otherwise
64
+ designated in writing by the copyright owner as "Not a Contribution."
65
+
66
+ "Contributor" shall mean Licensor and any individual or Legal Entity
67
+ on behalf of whom a Contribution has been received by Licensor and
68
+ subsequently incorporated within the Work.
69
+
70
+ 2. Grant of Copyright License. Subject to the terms and conditions of
71
+ this License, each Contributor hereby grants to You a perpetual,
72
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
73
+ copyright license to reproduce, prepare Derivative Works of,
74
+ publicly display, publicly perform, sublicense, and distribute the
75
+ Work and such Derivative Works in Source or Object form.
76
+
77
+ 3. Grant of Patent License. Subject to the terms and conditions of
78
+ this License, each Contributor hereby grants to You a perpetual,
79
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
80
+ (except as stated in this section) patent license to make, have made,
81
+ use, offer to sell, sell, import, and otherwise transfer the Work,
82
+ where such license applies only to those patent claims licensable
83
+ by such Contributor that are necessarily infringed by their
84
+ Contribution(s) alone or by combination of their Contribution(s)
85
+ with the Work to which such Contribution(s) was submitted. If You
86
+ institute patent litigation against any entity (including a
87
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
88
+ or a Contribution incorporated within the Work constitutes direct
89
+ or contributory patent infringement, then any patent licenses
90
+ granted to You under this License for that Work shall terminate
91
+ as of the date such litigation is filed.
92
+
93
+ 4. Redistribution. You may reproduce and distribute copies of the
94
+ Work or Derivative Works thereof in any medium, with or without
95
+ modifications, and in Source or Object form, provided that You
96
+ meet the following conditions:
97
+
98
+ (a) You must give any other recipients of the Work or
99
+ Derivative Works a copy of this License; and
100
+
101
+ (b) You must cause any modified files to carry prominent notices
102
+ stating that You changed the files; and
103
+
104
+ (c) You must retain, in the Source form of any Derivative Works
105
+ that You distribute, all copyright, patent, trademark, and
106
+ attribution notices from the Source form of the Work,
107
+ excluding those notices that do not pertain to any part of
108
+ the Derivative Works; and
109
+
110
+ (d) If the Work includes a "NOTICE" text file as part of its
111
+ distribution, then any Derivative Works that You distribute must
112
+ include a readable copy of the attribution notices contained
113
+ within such NOTICE file, excluding those notices that do not
114
+ pertain to any part of the Derivative Works, in at least one
115
+ of the following places: within a NOTICE text file distributed
116
+ as part of the Derivative Works; within the Source form or
117
+ documentation, if provided along with the Derivative Works; or,
118
+ within a display generated by the Derivative Works, if and
119
+ wherever such third-party notices normally appear. The contents
120
+ of the NOTICE file are for informational purposes only and
121
+ do not modify the License. You may add Your own attribution
122
+ notices within Derivative Works that You distribute, alongside
123
+ or as an addendum to the NOTICE text from the Work, provided
124
+ that such additional attribution notices cannot be construed
125
+ as modifying the License.
126
+
127
+ You may add Your own copyright statement to Your modifications and
128
+ may provide additional or different license terms and conditions
129
+ for use, reproduction, or distribution of Your modifications, or
130
+ for any such Derivative Works as a whole, provided Your use,
131
+ reproduction, and distribution of the Work otherwise complies with
132
+ the conditions stated in this License.
133
+
134
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
135
+ any Contribution intentionally submitted for inclusion in the Work
136
+ by You to the Licensor shall be under the terms and conditions of
137
+ this License, without any additional terms or conditions.
138
+ Notwithstanding the above, nothing herein shall supersede or modify
139
+ the terms of any separate license agreement you may have executed
140
+ with Licensor regarding such Contributions.
141
+
142
+ 6. Trademarks. This License does not grant permission to use the trade
143
+ names, trademarks, service marks, or product names of the Licensor,
144
+ except as required for reasonable and customary use in describing the
145
+ origin of the Work and reproducing the content of the NOTICE file.
146
+
147
+ 7. Disclaimer of Warranty. Unless required by applicable law or
148
+ agreed to in writing, Licensor provides the Work (and each
149
+ Contributor provides its Contributions) on an "AS IS" BASIS,
150
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
151
+ implied, including, without limitation, any warranties or conditions
152
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
153
+ PARTICULAR PURPOSE. You are solely responsible for determining the
154
+ appropriateness of using or redistributing the Work and assume any
155
+ risks associated with Your exercise of permissions under this License.
156
+
157
+ 8. Limitation of Liability. In no event and under no legal theory,
158
+ whether in tort (including negligence), contract, or otherwise,
159
+ unless required by applicable law (such as deliberate and grossly
160
+ negligent acts) or agreed to in writing, shall any Contributor be
161
+ liable to You for damages, including any direct, indirect, special,
162
+ incidental, or consequential damages of any character arising as a
163
+ result of this License or out of the use or inability to use the
164
+ Work (including but not limited to damages for loss of goodwill,
165
+ work stoppage, computer failure or malfunction, or any and all
166
+ other commercial damages or losses), even if such Contributor
167
+ has been advised of the possibility of such damages.
168
+
169
+ 9. Accepting Warranty or Additional Liability. While redistributing
170
+ the Work or Derivative Works thereof, You may choose to offer,
171
+ and charge a fee for, acceptance of support, warranty, indemnity,
172
+ or other liability obligations and/or rights consistent with this
173
+ License. However, in accepting such obligations, You may act only
174
+ on Your own behalf and on Your sole responsibility, not on behalf
175
+ of any other Contributor, and only if You agree to indemnify,
176
+ defend, and hold each Contributor harmless for any liability
177
+ incurred by, or claims asserted against, such Contributor by reason
178
+ of your accepting any such warranty or additional liability.
179
+
180
+ END OF TERMS AND CONDITIONS
181
+
182
+ APPENDIX: How to apply the Apache License to your work.
183
+
184
+ To apply the Apache License to your work, attach the following
185
+ boilerplate notice, with the fields enclosed by brackets "[]"
186
+ replaced with your own identifying information. (Don't include
187
+ the brackets!) The text should be enclosed in the appropriate
188
+ comment syntax for the file format. We also recommend that a
189
+ file or class name and description of purpose be included on the
190
+ same "printed page" as the copyright notice for easier
191
+ identification within third-party archives.
192
+
193
+ Copyright [yyyy] [name of copyright owner]
194
+
195
+ Licensed under the Apache License, Version 2.0 (the "License");
196
+ you may not use this file except in compliance with the License.
197
+ You may obtain a copy of the License at
198
+
199
+ http://www.apache.org/licenses/LICENSE-2.0
200
+
201
+ Unless required by applicable law or agreed to in writing, software
202
+ distributed under the License is distributed on an "AS IS" BASIS,
203
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
204
+ See the License for the specific language governing permissions and
205
+ limitations under the License.
206
+
207
+
208
+ ---- LLVM Exceptions to the Apache 2.0 License ----
209
+
210
+ As an exception, if, as a result of your compiling your source code, portions
211
+ of this Software are embedded into an Object form of such source code, you
212
+ may redistribute such embedded portions in such Object form without complying
213
+ with the conditions of Sections 4(a), 4(b) and 4(d) of the License.
214
+
215
+ In addition, if you combine or link compiled forms of this Software with
216
+ software that is licensed under the GPLv2 ("Combined Software") and if a
217
+ court of competent jurisdiction determines that the patent provision (Section
218
+ 3), the indemnity provision (Section 9) or other Section of the License
219
+ conflicts with the conditions of the GPLv2, you may retroactively and
220
+ prospectively choose to deem waived or otherwise exclude such Section(s) of
221
+ the License, but only in their entirety and only with respect to the Combined
222
+ Software.
223
+
224
+ ==============================================================================
225
+ Software from third parties included in the LLVM Project:
226
+ ==============================================================================
227
+ The LLVM Project contains third party software which is under different license
228
+ terms. All such code will be identified clearly using at least one of two
229
+ mechanisms:
230
+ 1) It will be in a separate directory tree with its own `LICENSE.txt` or
231
+ `LICENSE` file at the top containing the specific license and restrictions
232
+ which apply to that software, or
233
+ 2) It will contain specific license and restriction terms at the top of every
234
+ file.
235
+
236
+ ==============================================================================
237
+ Legacy LLVM License (https://llvm.org/docs/DeveloperPolicy.html#legacy):
238
+ ==============================================================================
239
+ University of Illinois/NCSA
240
+ Open Source License
241
+
242
+ Copyright (c) 2003-2019 University of Illinois at Urbana-Champaign.
243
+ All rights reserved.
244
+
245
+ Developed by:
246
+
247
+ LLVM Team
248
+
249
+ University of Illinois at Urbana-Champaign
250
+
251
+ http://llvm.org
252
+
253
+ Permission is hereby granted, free of charge, to any person obtaining a copy of
254
+ this software and associated documentation files (the "Software"), to deal with
255
+ the Software without restriction, including without limitation the rights to
256
+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
257
+ of the Software, and to permit persons to whom the Software is furnished to do
258
+ so, subject to the following conditions:
259
+
260
+ * Redistributions of source code must retain the above copyright notice,
261
+ this list of conditions and the following disclaimers.
262
+
263
+ * Redistributions in binary form must reproduce the above copyright notice,
264
+ this list of conditions and the following disclaimers in the
265
+ documentation and/or other materials provided with the distribution.
266
+
267
+ * Neither the names of the LLVM Team, University of Illinois at
268
+ Urbana-Champaign, nor the names of its contributors may be used to
269
+ endorse or promote products derived from this Software without specific
270
+ prior written permission.
271
+
272
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
273
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
274
+ FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
275
+ CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
276
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
277
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE
278
+ SOFTWARE.
279
+