@wubaoqi/guancopilot 0.0.0-stage → 0.1.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 (263) hide show
  1. package/NOTICE.md +10 -0
  2. package/README.md +131 -2
  3. package/assets/coreutils.wasm +0 -0
  4. package/assets/find.wasm +0 -0
  5. package/assets/guanbi.wasm +4 -0
  6. package/assets/guancli.wasm +0 -0
  7. package/assets/guanhelm.wasm +0 -0
  8. package/assets/jq.wasm +0 -0
  9. package/assets/openskills.wasm +0 -0
  10. package/assets/rg.wasm +0 -0
  11. package/assets/sed.wasm +0 -0
  12. package/bin/guancopilot +0 -0
  13. package/bin/guanvm +0 -0
  14. package/bin/platforms.cjs +6 -0
  15. package/bin/run.cjs +39 -0
  16. package/bin/runtime.cjs +43 -0
  17. package/licenses/Go-LICENSE +27 -0
  18. package/licenses/browser-dompurify-LICENSE +202 -0
  19. package/licenses/browser-dompurify-LICENSE-MPL +373 -0
  20. package/licenses/browser-highlight.js-LICENSE +29 -0
  21. package/licenses/browser-marked-LICENSE +44 -0
  22. package/licenses/coreutils-LICENSE +18 -0
  23. package/licenses/findutils-LICENSE +18 -0
  24. package/licenses/github.com_BurntSushi_toml_v1.6.0-COPYING +21 -0
  25. package/licenses/github.com_davecgh_go-spew_v1.1.1-LICENSE +15 -0
  26. package/licenses/github.com_dustin_go-humanize_v1.0.1-LICENSE +21 -0
  27. package/licenses/github.com_go-quicktest_qt_v1.101.0-LICENSE +21 -0
  28. package/licenses/github.com_golang-jwt_jwt_v5_v5.3.1-LICENSE +9 -0
  29. package/licenses/github.com_google_go-cmp_v0.7.0-LICENSE +27 -0
  30. package/licenses/github.com_google_jsonschema-go_v0.4.3-LICENSE +21 -0
  31. package/licenses/github.com_google_pprof_v0.0.0-20250317173921-a4b03ec1a45e-LICENSE +202 -0
  32. package/licenses/github.com_google_uuid_v1.6.0-LICENSE +27 -0
  33. package/licenses/github.com_hashicorp_golang-lru_v2_v2.0.7-LICENSE +364 -0
  34. package/licenses/github.com_jackc_pgpassfile_v1.0.0-LICENSE +22 -0
  35. package/licenses/github.com_jackc_pgservicefile_v0.0.0-20240606120523-5a60cdf6a761-LICENSE +22 -0
  36. package/licenses/github.com_jackc_pgx_v5_v5.11.0-LICENSE +22 -0
  37. package/licenses/github.com_jackc_puddle_v2_v2.2.2-LICENSE +22 -0
  38. package/licenses/github.com_kr_pretty_v0.3.1-License +19 -0
  39. package/licenses/github.com_kr_text_v0.2.0-License +19 -0
  40. package/licenses/github.com_mattn_go-isatty_v0.0.20-LICENSE +9 -0
  41. package/licenses/github.com_modelcontextprotocol_go-sdk_v1.8.0-LICENSE +216 -0
  42. package/licenses/github.com_ncruces_go-strftime_v1.0.0-LICENSE +21 -0
  43. package/licenses/github.com_pmezard_go-difflib_v1.0.0-LICENSE +27 -0
  44. package/licenses/github.com_remyoudompheng_bigfft_v0.0.0-20230129092748-24d4a6f8daec-LICENSE +27 -0
  45. package/licenses/github.com_rogpeppe_go-internal_v1.14.1-LICENSE +27 -0
  46. package/licenses/github.com_segmentio_asm_v1.1.3-LICENSE +21 -0
  47. package/licenses/github.com_segmentio_encoding_v0.5.4-LICENSE +21 -0
  48. package/licenses/github.com_stretchr_testify_v1.11.1-LICENSE +21 -0
  49. package/licenses/github.com_tetratelabs_wazero_v1.12.0-LICENSE +201 -0
  50. package/licenses/github.com_tetratelabs_wazero_v1.12.0-NOTICE +2 -0
  51. package/licenses/github.com_yosida95_uritemplate_v3_v3.0.2-LICENSE +25 -0
  52. package/licenses/golang.org_x_image_v0.44.0-LICENSE +27 -0
  53. package/licenses/golang.org_x_mod_v0.36.0-LICENSE +27 -0
  54. package/licenses/golang.org_x_mod_v0.38.0-LICENSE +27 -0
  55. package/licenses/golang.org_x_net_v0.58.0-LICENSE +27 -0
  56. package/licenses/golang.org_x_oauth2_v0.36.0-LICENSE +27 -0
  57. package/licenses/golang.org_x_sync_v0.20.0-LICENSE +27 -0
  58. package/licenses/golang.org_x_sync_v0.22.0-LICENSE +27 -0
  59. package/licenses/golang.org_x_sys_v0.47.0-LICENSE +27 -0
  60. package/licenses/golang.org_x_text_v0.41.0-LICENSE +27 -0
  61. package/licenses/golang.org_x_time_v0.15.0-LICENSE +27 -0
  62. package/licenses/golang.org_x_tools_v0.45.0-LICENSE +27 -0
  63. package/licenses/golang.org_x_tools_v0.48.0-LICENSE +27 -0
  64. package/licenses/gopkg.in_yaml.v3_v3.0.1-LICENSE +50 -0
  65. package/licenses/gopkg.in_yaml.v3_v3.0.1-NOTICE +13 -0
  66. package/licenses/guanbi-skills-LICENSE +133 -0
  67. package/licenses/guanbi-skills-LICENSE.README.md +28 -0
  68. package/licenses/guanbi-skills-LICENSE.zh-CN +82 -0
  69. package/licenses/jq-COPYING +176 -0
  70. package/licenses/modernc.org_cc_v4_v4.28.4-LICENSE +27 -0
  71. package/licenses/modernc.org_ccgo_v4_v4.34.4-LICENSE +27 -0
  72. package/licenses/modernc.org_fileutil_v1.4.0-LICENSE +27 -0
  73. package/licenses/modernc.org_gc_v2_v2.6.5-LICENSE +69 -0
  74. package/licenses/modernc.org_gc_v3_v3.1.3-LICENSE +69 -0
  75. package/licenses/modernc.org_goabi0_v0.2.0-LICENSE +26 -0
  76. package/licenses/modernc.org_libc_v1.73.4-LICENSE +27 -0
  77. package/licenses/modernc.org_libc_v1.73.4-LICENSE-3RD-PARTY.md +305 -0
  78. package/licenses/modernc.org_mathutil_v1.7.1-LICENSE +27 -0
  79. package/licenses/modernc.org_memory_v1.11.0-LICENSE +27 -0
  80. package/licenses/modernc.org_memory_v1.11.0-LICENSE-GO +27 -0
  81. package/licenses/modernc.org_memory_v1.11.0-LICENSE-LOGO +1 -0
  82. package/licenses/modernc.org_memory_v1.11.0-LICENSE-MMAP-GO +25 -0
  83. package/licenses/modernc.org_opt_v0.2.0-LICENSE +27 -0
  84. package/licenses/modernc.org_sortutil_v1.2.1-LICENSE +27 -0
  85. package/licenses/modernc.org_sqlite_v1.53.0-LICENSE +26 -0
  86. package/licenses/modernc.org_strutil_v1.2.1-LICENSE +27 -0
  87. package/licenses/modernc.org_token_v1.1.0-LICENSE +27 -0
  88. package/licenses/mvdan.cc_sh_v3_v3.13.1-LICENSE +27 -0
  89. package/licenses/ripgrep-COPYING +3 -0
  90. package/licenses/ripgrep-LICENSE-MIT +21 -0
  91. package/licenses/sed-LICENSE +21 -0
  92. package/manifest.json +1060 -0
  93. package/package.json +30 -4
  94. package/plugin/guancopilot.js +163 -0
  95. package/skills-bundle/.guanvm-skills-bundle +0 -0
  96. package/skills-bundle/_recipes/dashboard/gates/page_check.js +16 -0
  97. package/skills-bundle/_recipes/dashboard/gates/report_check.js +4 -0
  98. package/skills-bundle/_recipes/dashboard/knowledge/01.md +1 -0
  99. package/skills-bundle/_recipes/dashboard/knowledge/02.md +1 -0
  100. package/skills-bundle/_recipes/dashboard/knowledge/03.md +1 -0
  101. package/skills-bundle/_recipes/dashboard/knowledge/04.md +1 -0
  102. package/skills-bundle/_recipes/dashboard/knowledge/05.md +1 -0
  103. package/skills-bundle/_recipes/dashboard/knowledge/06.md +1 -0
  104. package/skills-bundle/_recipes/dashboard/template.json +41 -0
  105. package/skills-bundle/_recipes/etl/gates/etl_live_check.js +10 -0
  106. package/skills-bundle/_recipes/etl/gates/etl_report_check.js +3 -0
  107. package/skills-bundle/_recipes/etl/knowledge/01.md +1 -0
  108. package/skills-bundle/_recipes/etl/knowledge/02.md +9 -0
  109. package/skills-bundle/_recipes/etl/knowledge/03.md +1 -0
  110. package/skills-bundle/_recipes/etl/knowledge/04.md +1 -0
  111. package/skills-bundle/_recipes/etl/knowledge/05.md +1 -0
  112. package/skills-bundle/_recipes/etl/template.json +39 -0
  113. package/skills-bundle/_recipes/hints.json +46 -0
  114. package/skills-bundle/guancli/.commandface.json +155 -0
  115. package/skills-bundle/guancli/SKILL.md +342 -0
  116. package/skills-bundle/guancli/evals/evals.json +156 -0
  117. package/skills-bundle/guancli/evals/fixtures/metric-candidate-empty-search.json +13 -0
  118. package/skills-bundle/guancli/evals/fixtures/metric-candidate-prior-request.json +13 -0
  119. package/skills-bundle/guancli/evals/fixtures/metric-consumption-columns.json +46 -0
  120. package/skills-bundle/guancli/evals/fixtures/metric-consumption-metadata.json +36 -0
  121. package/skills-bundle/guancli/evals/fixtures/metric-consumption-query.json +18 -0
  122. package/skills-bundle/guancli/references/analysis-primitives.md +95 -0
  123. package/skills-bundle/guancli/references/auth-and-config.md +131 -0
  124. package/skills-bundle/guancli/references/examples/metric-date-in.json +7 -0
  125. package/skills-bundle/guancli/references/examples/metric-query-rows.py +83 -0
  126. package/skills-bundle/guancli/references/examples/metric-query.sh +6 -0
  127. package/skills-bundle/guancli/references/form-chatbi.md +199 -0
  128. package/skills-bundle/guancli/references/gateway.md +148 -0
  129. package/skills-bundle/guancli/references/metric-batch-query.md +82 -0
  130. package/skills-bundle/guancli/references/metric-commands.md +562 -0
  131. package/skills-bundle/guancli/references/metric-generic-query.md +215 -0
  132. package/skills-bundle/guancli/references/metric-json-migration.md +18 -0
  133. package/skills-bundle/guancli/references/metric-query-recipes.md +358 -0
  134. package/skills-bundle/guancli/references/preview-and-output.md +192 -0
  135. package/skills-bundle/guancli/references/resource-query.md +101 -0
  136. package/skills-bundle/guands/SKILL.md +281 -0
  137. package/skills-bundle/guands/references/calc-fields-boundaries-and-pitfalls.md +160 -0
  138. package/skills-bundle/guands/references/command-reference.md +267 -0
  139. package/skills-bundle/guands/references/incremental-and-schedule.md +157 -0
  140. package/skills-bundle/guands/references/workflows.md +256 -0
  141. package/skills-bundle/guanetl/SKILL.md +391 -0
  142. package/skills-bundle/guanetl/evals/evals.json +41 -0
  143. package/skills-bundle/guanetl/references/ETL_AI_DEVELOP.md +456 -0
  144. package/skills-bundle/guanmetric/SKILL.md +144 -0
  145. package/skills-bundle/guanmetric/evals/evals.json +117 -0
  146. package/skills-bundle/guanmetric/evals/fixtures/atomic-detail-read-model.json +18 -0
  147. package/skills-bundle/guanmetric/evals/fixtures/confirmed-template-summary.json +12 -0
  148. package/skills-bundle/guanmetric/evals/fixtures/create-result-unknown-state.json +13 -0
  149. package/skills-bundle/guanmetric/evals/forward-eval-2026-09-21.json +62 -0
  150. package/skills-bundle/guanmetric/references/metric-api-contract-examples.json +690 -0
  151. package/skills-bundle/guanmetric/references/metric-api-contract.schema.json +349 -0
  152. package/skills-bundle/guanmetric/references/metric-api-contracts.md +436 -0
  153. package/skills-bundle/guanmetric/references/metric-atomic-mutation.md +238 -0
  154. package/skills-bundle/guanmetric/references/metric-batch-status.md +71 -0
  155. package/skills-bundle/guanmetric/references/metric-business-dictionary-api-contract-examples.json +53 -0
  156. package/skills-bundle/guanmetric/references/metric-business-dictionary-api-contract.schema.json +26 -0
  157. package/skills-bundle/guanmetric/references/metric-business-dictionary.md +76 -0
  158. package/skills-bundle/guanmetric/references/metric-common-fields.md +246 -0
  159. package/skills-bundle/guanmetric/references/metric-composite-mutation.md +165 -0
  160. package/skills-bundle/guanmetric/references/metric-delete-mutation.md +70 -0
  161. package/skills-bundle/guanmetric/references/metric-derived-mutation.md +453 -0
  162. package/skills-bundle/guanmetric/references/metric-excel-template.md +365 -0
  163. package/skills-bundle/guanmetric/references/metric-expression-rules.md +146 -0
  164. package/skills-bundle/guanmetric/references/metric-flow-generate-example.json +79 -0
  165. package/skills-bundle/guanmetric/references/metric-flow-generate.schema.json +93 -0
  166. package/skills-bundle/guanmetric/references/metric-flow.md +218 -0
  167. package/skills-bundle/guanmetric/references/metric-hierarchy-api-contract-examples.json +171 -0
  168. package/skills-bundle/guanmetric/references/metric-hierarchy-api-contract.schema.json +167 -0
  169. package/skills-bundle/guanmetric/references/metric-hierarchy-api-contracts.md +193 -0
  170. package/skills-bundle/guanmetric/references/metric-mutation.md +155 -0
  171. package/skills-bundle/guanmetric/references/metric-public-dimension-api-contract-examples.json +62 -0
  172. package/skills-bundle/guanmetric/references/metric-public-dimension-api-contract.schema.json +47 -0
  173. package/skills-bundle/guanmetric/references/metric-public-dimension.md +155 -0
  174. package/skills-bundle/guanmetric/references/metric-tree-api-contract-examples.json +277 -0
  175. package/skills-bundle/guanmetric/references/metric-tree-api-contract.schema.json +263 -0
  176. package/skills-bundle/guanmetric/references/metric-tree-api-contracts.md +53 -0
  177. package/skills-bundle/guanmetric/references/metric-tree-mutation.md +500 -0
  178. package/skills-bundle/guanmetric/references/metric-validation-ownership.md +74 -0
  179. package/skills-bundle/guanvis/SKILL.md +333 -0
  180. package/skills-bundle/guanvis/evals/china_map/card_01_basic_map.js +13 -0
  181. package/skills-bundle/guanvis/evals/china_map/card_02_world_map.js +10 -0
  182. package/skills-bundle/guanvis/evals/china_map/card_03_point_map.js +12 -0
  183. package/skills-bundle/guanvis/evals/china_map/page.js +10 -0
  184. package/skills-bundle/guanvis/evals/china_map/schema.js +10 -0
  185. package/skills-bundle/guanvis/evals/comparative_mvp_roundtrip/README.md +30 -0
  186. package/skills-bundle/guanvis/evals/comparative_mvp_roundtrip/card_01_comparative_mvp.js +72 -0
  187. package/skills-bundle/guanvis/evals/comparative_mvp_roundtrip/page.js +6 -0
  188. package/skills-bundle/guanvis/evals/comparative_mvp_roundtrip/schema.js +22 -0
  189. package/skills-bundle/guanvis/evals/comparative_mvp_roundtrip/verify_default_roundtrip.sh +92 -0
  190. package/skills-bundle/guanvis/evals/complex_report_pro/card_01_monthly.js +63 -0
  191. package/skills-bundle/guanvis/evals/complex_report_pro/page.js +6 -0
  192. package/skills-bundle/guanvis/evals/complex_report_pro/schema.js +6 -0
  193. package/skills-bundle/guanvis/evals/custom_chart_echarts/card_01_bar.js +13 -0
  194. package/skills-bundle/guanvis/evals/custom_chart_echarts/card_02_pie.js +13 -0
  195. package/skills-bundle/guanvis/evals/custom_chart_echarts/charts/bar.js +11 -0
  196. package/skills-bundle/guanvis/evals/custom_chart_echarts/charts/pie.js +15 -0
  197. package/skills-bundle/guanvis/evals/custom_chart_echarts/page.js +5 -0
  198. package/skills-bundle/guanvis/evals/custom_chart_echarts/schema.js +9 -0
  199. package/skills-bundle/guanvis/evals/custom_chart_sdk/card_01_level_nodes.js +19 -0
  200. package/skills-bundle/guanvis/evals/custom_chart_sdk/charts/level_nodes.css +51 -0
  201. package/skills-bundle/guanvis/evals/custom_chart_sdk/charts/level_nodes.html +1 -0
  202. package/skills-bundle/guanvis/evals/custom_chart_sdk/charts/level_nodes.js +28 -0
  203. package/skills-bundle/guanvis/evals/custom_chart_sdk/page.js +5 -0
  204. package/skills-bundle/guanvis/evals/custom_chart_sdk/schema.js +7 -0
  205. package/skills-bundle/guanvis/evals/dynamic_fields/card_01_dynamic_dataset.js +20 -0
  206. package/skills-bundle/guanvis/evals/dynamic_fields/card_02_dynamic_metric_chart.js +16 -0
  207. package/skills-bundle/guanvis/evals/dynamic_fields/metrics.js +19 -0
  208. package/skills-bundle/guanvis/evals/dynamic_fields/page.js +9 -0
  209. package/skills-bundle/guanvis/evals/dynamic_fields/schema.js +7 -0
  210. package/skills-bundle/guanvis/evals/dynamic_fields/verify_default_roundtrip.sh +137 -0
  211. package/skills-bundle/guanvis/evals/percentage_advcalc_roundtrip/README.md +26 -0
  212. package/skills-bundle/guanvis/evals/percentage_advcalc_roundtrip/card_01_percentage_advcalc.js +44 -0
  213. package/skills-bundle/guanvis/evals/percentage_advcalc_roundtrip/card_02_scroll_percentage.js +12 -0
  214. package/skills-bundle/guanvis/evals/percentage_advcalc_roundtrip/page.js +6 -0
  215. package/skills-bundle/guanvis/evals/percentage_advcalc_roundtrip/schema.js +22 -0
  216. package/skills-bundle/guanvis/evals/rank_advcalc_roundtrip/README.md +28 -0
  217. package/skills-bundle/guanvis/evals/rank_advcalc_roundtrip/card_01_rank_advcalc.js +59 -0
  218. package/skills-bundle/guanvis/evals/rank_advcalc_roundtrip/page.js +6 -0
  219. package/skills-bundle/guanvis/evals/rank_advcalc_roundtrip/schema.js +22 -0
  220. package/skills-bundle/guanvis/evals/rank_advcalc_roundtrip/verify_default_roundtrip.sh +135 -0
  221. package/skills-bundle/guanvis/evals/running_total_advcalc_roundtrip/README.md +15 -0
  222. package/skills-bundle/guanvis/evals/running_total_advcalc_roundtrip/card_01_running_total_advcalc.js +74 -0
  223. package/skills-bundle/guanvis/evals/running_total_advcalc_roundtrip/page.js +6 -0
  224. package/skills-bundle/guanvis/evals/running_total_advcalc_roundtrip/schema.js +22 -0
  225. package/skills-bundle/guanvis/evals/sales_dashboard/card_01_revenue_column.js +10 -0
  226. package/skills-bundle/guanvis/evals/sales_dashboard/card_02_trend_line.js +9 -0
  227. package/skills-bundle/guanvis/evals/sales_dashboard/card_03_kpi.js +6 -0
  228. package/skills-bundle/guanvis/evals/sales_dashboard/card_04_pie.js +9 -0
  229. package/skills-bundle/guanvis/evals/sales_dashboard/card_05_calc_field_test.js +12 -0
  230. package/skills-bundle/guanvis/evals/sales_dashboard/page.js +11 -0
  231. package/skills-bundle/guanvis/evals/sales_dashboard/schema.js +14 -0
  232. package/skills-bundle/guanvis/evals/sales_dashboard/selector_01_region.js +10 -0
  233. package/skills-bundle/guanvis/evals/split_charts/card_01_column_split.js +10 -0
  234. package/skills-bundle/guanvis/evals/split_charts/card_02_line_split.js +10 -0
  235. package/skills-bundle/guanvis/evals/split_charts/card_03_combo_split.js +11 -0
  236. package/skills-bundle/guanvis/evals/split_charts/page.js +10 -0
  237. package/skills-bundle/guanvis/evals/split_charts/schema.js +14 -0
  238. package/skills-bundle/guanvis/evals/tab_layout/card_00_total_revenue.js +6 -0
  239. package/skills-bundle/guanvis/evals/tab_layout/card_01_revenue.js +10 -0
  240. package/skills-bundle/guanvis/evals/tab_layout/card_02_trend.js +9 -0
  241. package/skills-bundle/guanvis/evals/tab_layout/card_03_story.js +11 -0
  242. package/skills-bundle/guanvis/evals/tab_layout/page.js +23 -0
  243. package/skills-bundle/guanvis/evals/tab_layout/schema.js +11 -0
  244. package/skills-bundle/guanvis/evals/tab_layout/selector_01_region.js +8 -0
  245. package/skills-bundle/guanvis/references/api-reference.md +476 -0
  246. package/skills-bundle/guanvis/references/builder-reference.md +1676 -0
  247. package/skills-bundle/guanvis/references/chart-properties.md +2101 -0
  248. package/skills-bundle/guanvis/references/checkout-editing.md +53 -0
  249. package/skills-bundle/guanvis/references/complex-report-pro-patterns.md +398 -0
  250. package/skills-bundle/guanvis/references/dir-and-page-management.md +48 -0
  251. package/skills-bundle/guanvis/references/metric-chart-reference.md +258 -0
  252. package/skills-bundle/guanvis/references/publish-and-constraints.md +60 -0
  253. package/skills-bundle/guanvis/references/selector-reference.md +431 -0
  254. package/skills-bundle/guanvis/references/tableau-migration.md +73 -0
  255. package/skills-bundle/guanvis/references/theme.md +123 -0
  256. package/skills-bundle/guanvis/references/troubleshooting.md +25 -0
  257. package/skills-bundle/guanvis/references/validation-and-chart-patterns.md +205 -0
  258. package/skills-bundle/guanwf/SKILL.md +543 -0
  259. package/skills-bundle/guanwf/references/ETL_AI_DEVELOP.md +456 -0
  260. package/skills-bundle/guanwf/references/TASK_NODE_CONTRACTS.md +64 -0
  261. package/skills-bundle/guanwf/references/WORKFLOW_DSL.md +536 -0
  262. package/skills-bundle/guanwf/references/WORKFLOW_NODES.md +166 -0
  263. package/skills-bundle/js/SKILL.md +145 -0
package/NOTICE.md ADDED
@@ -0,0 +1,10 @@
1
+ # Distribution notice
2
+
3
+ First-party GuanCopilot/GuanVM code is distributed without a public license grant
4
+ (UNLICENSED). Public availability of this package does not grant an open-source
5
+ license to first-party code. Third-party components retain their respective
6
+ licenses, with collected license texts in licenses/.
7
+
8
+ The self-contained package includes source provenance and per-file SHA-256 hashes.
9
+ WASM files are a prebuilt snapshot, not a claim of a fresh reproducible WASI build.
10
+ Codex itself is not bundled: an installed ChatGPT app or compatible Codex CLI is required.
package/README.md CHANGED
@@ -1,3 +1,132 @@
1
- # Temporary Holding Version
1
+ # @wubaoqi/guancopilot
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ 本地 GuanData BI Copilot。安装包自带 guancopilot、GuanVM、9 个 WASM 工具、
4
+ 7 个技能定义及可手工安装的 BI 前端插件。用户不需要 Go,也不需要准备 GuanVM。
5
+
6
+ 当前首次发布版本为 **0.1.0**,仅有 `@wubaoqi/guancopilot` 一个自包含包;发布状态以官方 npm registry 为准。
7
+
8
+ ## 用户启动流程
9
+
10
+ 需要 Node.js >=20,以及已安装并登录的 ChatGPT.app 或兼容的 Codex CLI(>=0.162.1,
11
+ 需文件 auth.json)。macOS 优先使用 ChatGPT.app 自带 Codex,再回退 PATH 中的 CLI;
12
+ 本包不下载 Codex、不改桌面配置、不安装全局 Codex skills/MCP。
13
+
14
+ 用户安装和启动流程:
15
+
16
+ ```bash
17
+ npm install -g @wubaoqi/guancopilot
18
+ guancopilot doctor
19
+ guancopilot
20
+ ```
21
+
22
+ 直接 `guancopilot` 或 `guancopilot start` 默认运行 serve,仅监听 127.0.0.1:19090。
23
+ 默认 CORS 为 `*`,浏览器免配对,无需填写 --origins;仍可用 --origins 限制精确 Origin。任意工作目录均可启动,
24
+ 后台和资源路径按安装包位置定位;--guanvm/--assets/--skills 可用于开发时显式覆盖。
25
+ `guancopilot --version`、`--help` 不需要启动 Codex。
26
+
27
+ ```bash
28
+ guancopilot plugin-path
29
+ guancopilot plugin --out ./guancopilot-plugin.js
30
+ ```
31
+
32
+ 把导出的 JS 整体粘贴到已登录 BI 的 Console 进行联调,或由管理员人工安装。
33
+ 只在 `/data-dev/offline-dev/` 下显示;没有自动修改、安装或发布 BI 插件的步骤。
34
+ 界面可选择模型及该模型支持的 Low/Medium/High 等常规思考强度,排除 xhigh/max/ultra。
35
+ 历史、文件和终端按 BI URL + 服务端验证的 domID + 账号隔离,同一身份的新对话复用固定工作区。
36
+ 文件浏览提供搜索、排序、分栏/列表/专注预览,以及文件和空目录的确认后永久删除;没有回收站。
37
+ 同一后台默认可同时服务多个 BI 环境。需要限制来源时,可显式指定各自 Origin:
38
+
39
+ ```bash
40
+ guancopilot start --origins https://demo.guandata.com,https://app.guandata.com
41
+ ```
42
+
43
+ 不同身份的凭证、历史和文件工作区隔离;同一身份的多个页面复用文件工作区。
44
+ 聊天及状态默认在当前用户 home 的 `.guancopilot`,不会写入 npm 安装目录;支持 --state。
45
+
46
+ ```bash
47
+ guancopilot start --expose --origins https://your-bi.example.com
48
+ ```
49
+
50
+ 外网模式默认监听 0.0.0.0:19090,并每次启动生成、打印配对码,保存到状态目录
51
+ pairing-token(0600)。前端设置中填写后台地址和配对码;HTTPS BI 访问远端需要 HTTPS
52
+ 入口,本包不配置 TLS 或代理。配对码授权个人实例,不是多租户账号隔离系统。
53
+
54
+ ## 维护者本地构建和打包
55
+
56
+ 构建机需要 Go 1.26.5、Node 开发依赖,以及旁边 GuanVM 仓库已准备的 assets/ 与
57
+ skills-bundle/。这些是维护者的构建输入,最终用户无需它们;WASM 原始编译继续使用
58
+ GuanVM 自己的 prepare/build 脚本。本流程将现有 WASM 快照按 SHA-256 固定,不宣称
59
+ 它们刚从 native 源码提交重建。记录源码 commit、dirty 状态、Go 版本和逐文件摘要。
60
+
61
+ 在 guancopilot 根目录:
62
+
63
+ ```bash
64
+ npm ci --ignore-scripts
65
+ cd npm
66
+ npm run build # 当前平台;生成完整单包暂存目录
67
+ npm run pack # 只写本地 .tgz
68
+ npm test
69
+ npm run test:install # 本机只读 registry fixture 安装验收,不发布
70
+ ```
71
+
72
+ 当前唯一目标 macOS Apple Silicon(darwin-arm64)的完整构建与打包:
73
+
74
+ ```bash
75
+ npm run build:all
76
+ npm run pack:all
77
+ ```
78
+
79
+ 仅支持 darwin-arm64,CGO_ENABLED=0。npm 的 os/cpu 和平台选择器都会拒绝其他系统与架构;其他平台的 Codex 定位、目录和认证逻辑后续按需验收后添加。
80
+
81
+ 定制源码/资产来源:`node scripts/build.mjs --target darwin-arm64 --guanvm-source /path/to/guanvm
82
+ --assets /path/to/assets --skills /path/to/skills-bundle`。构建不改变来源目录,包内软链接
83
+ 被复制为实际文件;拒绝指向技能包之外的软链接。分发包不依赖源码中的链接。
84
+
85
+ 产物只有 `npm/dist/0.1.0/wubaoqi-guancopilot-0.1.0.tgz` 一个包,名称为
86
+ `@wubaoqi/guancopilot`。JS 启动器、两个 macOS ARM64 程序、WASM、skills、插件、
87
+ 许可证和 manifest 全部内置;没有 dependencies 或 optionalDependencies,也没有资源包/
88
+ 平台包的额外安装步骤。后续有其他平台需求时再拆包。
89
+
90
+ 安装无需 lifecycle scripts,不会编译或从 GitHub 下载运行时;缺失文件、平台不匹配或
91
+ 文件摘要错误会明确拒绝启动。维护者的构建暂存目录为 `npm/build/package/`;
92
+ `npm run pack` 从该完整目录打包,避免将源码目录误当作完整分发包。
93
+
94
+ 当前 macOS ARM64 可以直接使用单一本地 tarball 安装(在 npm 目录下):
95
+
96
+ ```bash
97
+ npm install -g --offline ./dist/0.1.0/wubaoqi-guancopilot-0.1.0.tgz
98
+ ```
99
+
100
+ 也可运行 `npm run test:install -- --tarballs` 自动在临时 prefix 验证离线 tarball 安装。
101
+ 测试将 PATH 限定为无 Go、无独立 GuanVM,使用带空格的安装路径及无关工作目录,验证
102
+ 全局命令、doctor、启动、自动浏览器会话、内置 GuanVM 身份验证、凭证更新及优雅退出。
103
+ registry fixture 只接受 GET/HEAD,所有包来自本地 tgz;不连接公共 registry、不发布。
104
+ 使用 `--keep` 保留安装 prefix,供进一步运行 `guancopilot smoke` 检查真实 Codex 链路。
105
+
106
+ 构建、打包和安装测试不会自动发布。维护者只发布已经安装验证的 tarball;浏览器登录、dry-run、发布及发布后验证流程见源码仓库 `AGENTS.md`。
107
+
108
+ 双站点并行验收:安装测试加 `--keep` 后,在仓库根运行
109
+ `node npm/scripts/multisite-smoke.mjs`,使用本地模拟 BI 验证隔离、凭证轮换、停止和直接删除。
110
+
111
+ ## 浏览器提示 loopback address space 权限错误
112
+
113
+ 默认 CORS * 及兼容 PNA 的 Access-Control-Allow-Private-Network 头,不能代替浏览器的
114
+ 本地网络访问权限。若看到 `Permission was denied ... loopback address space`,在当前
115
+ BI 站点的浏览器站点设置中允许“本地网络访问/本机访问”,刷新页面;不是在 127.0.0.1
116
+ 页面设置。不同浏览器版本的名称可能不同。后端不能通过响应头授予该权限。
117
+ 参见 [Chrome 官方说明](https://developer.chrome.com/blog/local-network-access)。
118
+
119
+ 首次打开 Copilot 会从用户点击中发起本机连接,触发浏览器授权弹窗;选择“允许”即可。
120
+ 授权前暂停后台探活。权限查询优先 loopback-network,旧版兼容 local-network-access;
121
+ 已允许时自动连接,已拒绝时显示恢复指引,网页无法强制覆盖拒绝决定。
122
+
123
+ ## Safari 和代码配色
124
+
125
+ macOS Safari 打开 HTTPS BI 时,插件使用独立的本机连接窗口:启动更新后的 guancopilot,
126
+ 点击 Copilot,再保持自动打开的“guanloop 本机连接”窗口开启,返回 BI 使用。若关闭该窗口,
127
+ 面板会显示断线,点击连接可重新打开。弹窗被浏览器阻止时,面板会提示允许当前站点的弹窗。
128
+ Chrome 继续使用直接连接和原有本地网络授权流程。无需安装证书或修改安全设置。
129
+ 后台和导出的单文件插件需一起更新;本次已在 macOS Safari 27.0 完成真实 BI 只读验证。
130
+
131
+ Markdown 代码块、文件预览和终端使用 Solarized Light。SQL、Bash、JavaScript、JSON、
132
+ Python 语法高亮随单文件插件内置,不需要 CDN;复制代码仍为原始文本。
Binary file
Binary file
@@ -0,0 +1,4 @@
1
+ [diffend] Oversized file quarantined before diffing.
2
+ name: package/assets/guanbi.wasm
3
+ size: 66169888 bytes
4
+ sha256: 3b0260ad4c9a475508247bff6db5e1842b8a7c62741ef77d997b53b0c792900f
Binary file
Binary file
package/assets/jq.wasm ADDED
Binary file
Binary file
package/assets/rg.wasm ADDED
Binary file
Binary file
Binary file
package/bin/guanvm ADDED
Binary file
@@ -0,0 +1,6 @@
1
+ const targets = [
2
+ ['darwin','arm64'],
3
+ ].map(([platform,arch]) => ({platform,arch,key:`${platform}-${arch}`,goos:platform==='win32'?'windows':platform,goarch:arch==='x64'?'amd64':arch,ext:platform==='win32'?'.exe':''}));
4
+ const wasmNames=['coreutils','find','guanbi','guancli','guanhelm','jq','openskills','rg','sed'];
5
+ const skillNames=['guancli','guands','guanetl','guanmetric','guanvis','guanwf','js'];
6
+ module.exports={targets,wasmNames,skillNames,targetFor:(platform,arch)=>targets.find(t=>t.platform===platform&&t.arch===arch)};
package/bin/run.cjs ADDED
@@ -0,0 +1,39 @@
1
+ #!/usr/bin/env node
2
+ 'use strict';
3
+ const fs=require('node:fs');
4
+ const path=require('node:path');
5
+ const os=require('node:os');
6
+ const {spawn}=require('node:child_process');
7
+ const {resolveRuntime}=require('./runtime.cjs');
8
+ const pkg=require('../package.json');
9
+ function launch(argv=process.argv.slice(2)) {
10
+ if(['--version','-v','version'].includes(argv[0])) {console.log(pkg.version);return;}
11
+ if(['--help','-h','help'].includes(argv[0])) {
12
+ console.log(`guancopilot ${pkg.version}\n\nUsage:\n guancopilot [serve|start] [--origins https://your-bi.example.com]\n guancopilot doctor\n guancopilot plugin-path\n guancopilot plugin [--out FILE]\n\nDefault: 127.0.0.1:19090, CORS *, automatic browser session, no pairing code.\n--expose enables external listening and generates a pairing code.\nUse guancopilot serve --help for all server flags.\nGuanVM, WASM tools and skills are bundled; no Go installation required.\nAn authenticated ChatGPT app or compatible Codex CLI is required.`);return;
13
+ }
14
+ const runtime=resolveRuntime();
15
+ if(argv[0]==='plugin-path') {if(argv.length!==1)throw new Error('Usage: guancopilot plugin-path');console.log(runtime.plugin);return;}
16
+ if(argv[0]==='plugin') {
17
+ if(argv.length===1)process.stdout.write(fs.readFileSync(runtime.plugin));
18
+ else if(argv.length===3&&argv[1]==='--out') {fs.copyFileSync(runtime.plugin,path.resolve(argv[2]));console.log(path.resolve(argv[2]));}
19
+ else throw new Error('Usage: guancopilot plugin [--out FILE]');
20
+ return;
21
+ }
22
+ argv=[...argv];
23
+ if(argv[0]==='start')argv[0]='serve';
24
+ if(!argv.length||argv[0].startsWith('-'))argv.unshift('serve');
25
+ for(const [flag,value]of [['--guanvm',runtime.guanvm],['--assets',runtime.assets],['--skills',runtime.skills]]) {
26
+ if(!argv.some(arg=>arg===flag||arg.startsWith(flag+'=')))argv.push(flag,value);
27
+ }
28
+ if(argv[0]==='serve')console.error(`Bundled BI plugin: ${runtime.plugin}`);
29
+ const child=spawn(runtime.copilot,argv,{stdio:'inherit',shell:false,env:process.env});
30
+ const signals=['SIGINT','SIGTERM'];
31
+ const forward=signal=>{if(!child.killed)child.kill(signal);};
32
+ const handlers=signals.map(signal=>{const handler=()=>forward(signal);process.on(signal,handler);return [signal,handler];});
33
+ const cleanup=()=>{for(const [signal,handler]of handlers)process.removeListener(signal,handler);};
34
+ child.on('error',error=>{cleanup();console.error(`Cannot start guancopilot: ${error.message}`);process.exitCode=1;});
35
+ child.on('exit',(code,signal)=>{cleanup();process.exitCode=code??(128+(os.constants.signals[signal]||1));});
36
+ return child;
37
+ }
38
+ if(require.main===module)try{launch();}catch(error){console.error(error.message);process.exitCode=1;}
39
+ module.exports={launch};
@@ -0,0 +1,43 @@
1
+ const fs=require('node:fs');
2
+ const path=require('node:path');
3
+ const crypto=require('node:crypto');
4
+ const {targetFor,wasmNames,skillNames}=require('./platforms.cjs');
5
+ const main=require('../package.json');
6
+ function hashFile(file) {
7
+ const hash=crypto.createHash('sha256'),fd=fs.openSync(file,'r'),buffer=Buffer.allocUnsafe(1024*1024);
8
+ try {let n;while((n=fs.readSync(fd,buffer,0,buffer.length,null))>0)hash.update(buffer.subarray(0,n));} finally {fs.closeSync(fd);}
9
+ return hash.digest('hex');
10
+ }
11
+ function checkedFile(root,relative) {
12
+ if(typeof relative!=='string'||!relative||relative.includes('\\')||path.posix.isAbsolute(relative)||relative.split('/').some(p=>!p||p==='.'||p==='..'))throw new Error('Invalid bundled file path');
13
+ const file=path.join(root,...relative.split('/'));
14
+ // Build materializes bundle-local links; verify every component again in installed packages.
15
+ let current=root;
16
+ for(const part of relative.split('/')) {current=path.join(current,part);if(fs.lstatSync(current).isSymbolicLink())throw new Error('Unexpected symlink in bundled runtime');}
17
+ if(!fs.statSync(file).isFile())throw new Error(`Bundled file missing: ${relative}`);
18
+ return file;
19
+ }
20
+ function verifyPackage(root, required, targetKey) {
21
+ const pkg=JSON.parse(fs.readFileSync(path.join(root,'package.json'),'utf8'));
22
+ if(pkg.name!==main.name)throw new Error(`Unexpected runtime package: ${pkg.name}`);
23
+ if(pkg.version!==main.version)throw new Error(`Runtime version mismatch: ${pkg.name} ${pkg.version}; expected ${main.version}`);
24
+ const manifest=JSON.parse(fs.readFileSync(path.join(root,'manifest.json'),'utf8'));
25
+ if(manifest.version!==main.version||!manifest.files||typeof manifest.files!=='object')throw new Error('Invalid runtime manifest');
26
+ if(targetKey&&manifest.platform!==targetKey)throw new Error(`Bundled platform mismatch: ${manifest.platform}; expected ${targetKey}`);
27
+ for(const relative of required)if(!Object.hasOwn(manifest.files,relative))throw new Error(`Runtime manifest is missing ${relative}`);
28
+ for(const [relative,expected]of Object.entries(manifest.files)) {
29
+ const file=checkedFile(root,relative);
30
+ if(fs.statSync(file).size!==expected.size||hashFile(file)!==expected.sha256)throw new Error(`Bundled file integrity check failed: ${relative}; reinstall ${main.name}`);
31
+ }
32
+ return manifest;
33
+ }
34
+ function resolveRuntime({platform=process.platform,arch=process.arch,root=path.resolve(__dirname,'..')}={}) {
35
+ const target=targetFor(platform,arch);
36
+ if(!target)throw new Error(`Unsupported platform: ${platform}-${arch}`);
37
+ const copilot=`bin/guancopilot${target.ext}`,vm=`bin/guanvm${target.ext}`;
38
+ verifyPackage(root,[copilot,vm,'bin/run.cjs','bin/runtime.cjs','bin/platforms.cjs',...wasmNames.map(n=>`assets/${n}.wasm`),...skillNames.map(n=>`skills-bundle/${n}/SKILL.md`),'plugin/guancopilot.js'],target.key);
39
+ const runtime={copilot:path.join(root,copilot),guanvm:path.join(root,vm),assets:path.join(root,'assets'),skills:path.join(root,'skills-bundle'),plugin:path.join(root,'plugin/guancopilot.js')};
40
+ for(const file of [runtime.copilot,runtime.guanvm])fs.accessSync(file,fs.constants.X_OK);
41
+ return runtime;
42
+ }
43
+ module.exports={hashFile,checkedFile,verifyPackage,resolveRuntime};
@@ -0,0 +1,27 @@
1
+ Copyright 2009 The Go Authors.
2
+
3
+ Redistribution and use in source and binary forms, with or without
4
+ modification, are permitted provided that the following conditions are
5
+ met:
6
+
7
+ * Redistributions of source code must retain the above copyright
8
+ notice, this list of conditions and the following disclaimer.
9
+ * Redistributions in binary form must reproduce the above
10
+ copyright notice, this list of conditions and the following disclaimer
11
+ in the documentation and/or other materials provided with the
12
+ distribution.
13
+ * Neither the name of Google LLC nor the names of its
14
+ contributors may be used to endorse or promote products derived from
15
+ this software without specific prior written permission.
16
+
17
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
18
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
19
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
20
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
21
+ OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
22
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
23
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25
+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.