writedock-mcp 0.4.2 → 0.4.6
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.
- package/README.md +87 -63
- package/extension/LICENSE-MULTIPOST.txt +201 -0
- package/extension/LICENSE.txt +674 -0
- package/extension/NOTICE.txt +13 -0
- package/extension/assets/editor-DWoK50xk.js +76 -0
- package/extension/assets/editor-VBFqqvXW.css +1 -0
- package/extension/assets/icon-128.png +0 -0
- package/extension/assets/icon-16.png +0 -0
- package/extension/assets/icon-48.png +0 -0
- package/extension/assets/index.browser-Hs3ZYqOv.js +157 -0
- package/extension/assets/index.ts-DbQynGAJ.js +42 -0
- package/extension/assets/logo.svg +5 -0
- package/extension/assets/offscreen-3BECPbQX.js +63 -0
- package/extension/assets/purify.es-1yEQDPgc.js +3 -0
- package/extension/assets/react-vendor-BrXlnJmF.js +40 -0
- package/extension/assets/task-utils-DwzGcJkm.js +1 -0
- package/extension/manifest.json +40 -0
- package/extension/service-worker-loader.js +1 -0
- package/extension/src/editor/index.html +16 -0
- package/extension/src/offscreen/index.html +6 -0
- package/extension/zhihu-publication-observer.js +1 -0
- package/extension//345/256/211/350/243/205/344/270/216/346/233/264/346/226/260.txt +19 -0
- package/index.cjs +330 -69
- package/package.json +3 -2
- package/source/package.json +1 -1
- package/source/src/__tests__/bridge.test.ts +22 -0
- package/source/src/__tests__/extension-update.test.ts +54 -0
- package/source/src/__tests__/setup.test.ts +50 -0
- package/source/src/bridge.ts +40 -11
- package/source/src/extension-id.ts +2 -0
- package/source/src/extension-update.ts +82 -0
- package/source/src/index.ts +3 -0
- package/source/src/release-info.ts +3 -0
- package/source/src/server.ts +45 -3
- package/source/src/setup.ts +88 -0
package/README.md
CHANGED
|
@@ -1,102 +1,126 @@
|
|
|
1
1
|
# WriteDock MCP
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
连接你自己的 agent 与 WriteDock 浏览器扩展:agent 写稿并准备图片或视频,一次调用发布到多个平台,并按平台查询结果。
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
MCP 运行在你自己的电脑上,只监听 `127.0.0.1`。平台 Cookie 留在浏览器里,稿件和媒体不经过 npm。
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
## 安装
|
|
8
|
+
|
|
9
|
+
需要 Node.js 22+ 和 Chrome 或 Edge。运行:
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
npx -y writedock-mcp@latest setup
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
它会做两件事,并在最后告诉用户下一步:
|
|
16
|
+
|
|
17
|
+
- 给本机已有的 Codex、Claude Code、Cursor、Claude Desktop 添加 MCP 配置,原文件留一份 `.writedock-backup`。已有的 WriteDock 配置不会改动。
|
|
18
|
+
- 把内置的扩展放到本机固定目录。
|
|
19
|
+
|
|
20
|
+
然后重启 agent,在扩展管理页打开开发者模式,加载提示中的文件夹,打开扩展点「连接」。
|
|
21
|
+
|
|
22
|
+
其他客户端手动添加:
|
|
8
23
|
|
|
9
24
|
```json
|
|
10
25
|
{
|
|
11
26
|
"mcpServers": {
|
|
12
27
|
"writedock": {
|
|
13
28
|
"command": "npx",
|
|
14
|
-
"args": ["-y", "--prefer-online", "writedock-mcp@latest"]
|
|
15
|
-
"env": { "WRITEDOCK_PORT": "9647" }
|
|
29
|
+
"args": ["-y", "--prefer-online", "writedock-mcp@latest"]
|
|
16
30
|
}
|
|
17
31
|
}
|
|
18
32
|
}
|
|
19
33
|
```
|
|
20
34
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
```toml
|
|
24
|
-
[mcp_servers.writedock]
|
|
25
|
-
command = "npx"
|
|
26
|
-
args = ["-y", "--prefer-online", "writedock-mcp@latest"]
|
|
27
|
-
startup_timeout_sec = 120
|
|
28
|
-
tool_timeout_sec = 60
|
|
29
|
-
|
|
30
|
-
[mcp_servers.writedock.env]
|
|
31
|
-
WRITEDOCK_PORT = "9647"
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
不同客户端按各自支持的配置格式添加。首次下载需预留启动时间;Windows 的 npx 启动命令按客户端要求处理。
|
|
35
|
-
|
|
36
|
-
启动 MCP 后调用 `get_connection_status`;尚未配对时调用 `begin_pairing`,将一次性配对码粘贴到扩展的「MCP 连接」。配对码 3 分钟有效、使用一次失效。连接配置和配对阶段不提交文章;连通后按用户指定的平台和内容调用发布工具。
|
|
37
|
-
|
|
38
|
-
## 更新与旧版迁移
|
|
39
|
-
|
|
40
|
-
`--prefer-online` 在每次新启动时检查 npm 包的更新,相同版本可复用缓存;`latest` 指向维护者发布的版本。正在运行的进程不会自动替换,发布新版后重新加载 MCP 连接或重启相关 agent。新建聊天、刷新扩展不一定重启 MCP。
|
|
41
|
-
|
|
42
|
-
从旧的 `node /安装目录/index.cjs` 迁移时,修改已有 writedock 服务的 command/args,保留原端口、`WRITEDOCK_DATA_DIR`、已有 `WRITEDOCK_TOKEN` 和其他客户端配置,停掉仍运行旧程序的 WriteDock MCP,再重新加载连接。无需删除旧程序目录或配对资料。
|
|
35
|
+
首次下载较慢,请把启动超时设为 120 秒。启动后调用 `get_connection_status`;未连接时,让用户打开扩展点「连接」。
|
|
43
36
|
|
|
44
|
-
|
|
37
|
+
## 发布
|
|
45
38
|
|
|
46
|
-
|
|
47
|
-
- Windows:`%LOCALAPPDATA%/WriteDock/mcp/`
|
|
48
|
-
- Linux:`${XDG_DATA_HOME:-~/.local/share}/writedock/mcp/`
|
|
49
|
-
|
|
50
|
-
保留同一系统用户、端口和数据目录时,npx 更新继续复用身份。旧 `WRITEDOCK_TOKEN` 仅在首次建立持久身份时迁移,资料已存在时不会覆盖。扩展更新保留浏览器配对;卸载重装扩展后用 `begin_pairing` 恢复,不需要重装 MCP。配对资料不备份浏览器稿件或 Cookie。
|
|
39
|
+
优先使用 `publish`,一次调用即可:
|
|
51
40
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
41
|
+
```json
|
|
42
|
+
{
|
|
43
|
+
"platforms": ["zhihu", "baijiahao", "weibo", "xiaohongshu", "douyin"],
|
|
44
|
+
"article": { "file_path": "/absolute/path/article.md" },
|
|
45
|
+
"post": { "kind": "image", "title": "标题", "content": "正文", "image_paths": ["/absolute/path/1.png"] },
|
|
46
|
+
"request_id": "my_post_20261105_01"
|
|
47
|
+
}
|
|
48
|
+
```
|
|
55
49
|
|
|
56
|
-
|
|
50
|
+
扩展按平台选择内容:
|
|
57
51
|
|
|
58
|
-
|
|
52
|
+
| 平台 ID | 默认发送 | 说明 |
|
|
53
|
+
|---|---|---|
|
|
54
|
+
| `zhihu` | 文章 | 标题最多 100 字,可内嵌本地 MP4 |
|
|
55
|
+
| `baijiahao` | 文章 | 标题最多 64 字;没有 `cover` 时使用正文第一张图 |
|
|
56
|
+
| `bilibili` | 文章 | 不接独立封面;LV1–3 账号每天只能发 1 篇,删除不退额度 |
|
|
57
|
+
| `weibo` | 有 `post` 发图文或视频,否则发长文章 | 长文章标题最多 32 字;视频必须明确 `weibo_video_creation` |
|
|
58
|
+
| `xiaohongshu` | 有 `post` 发图文或视频,否则发长文 | 长文标题最多 64 字、正文最多 10000 字 |
|
|
59
|
+
| `douyin` | 图文或视频 | 不接文章 |
|
|
60
|
+
| `weixin`、`sohu` | 只保存文章草稿 | 不公开发布 |
|
|
59
61
|
|
|
60
|
-
|
|
62
|
+
- 用 `modes` 可为微博、小红书指定内容类型,如 `{"weibo": "article"}`。
|
|
63
|
+
- 某个平台未登录、不能接收这份内容或失败时,只跳过该平台,其他平台继续。
|
|
64
|
+
- 不支持的 `cover` 会被忽略,并写入该平台的 `warnings`。标题超长不会被截断,该平台直接失败。
|
|
65
|
+
- 平台依次执行,全部完成通常需要几分钟。同一时间只运行一个任务。
|
|
66
|
+
- 只有用户明确要求发布并指定平台时,才调用发布工具。
|
|
61
67
|
|
|
62
|
-
|
|
68
|
+
`rehearse_publish` 参数相同,但会在点击发布之前停下,也不需要 `request_id`。可能上传图片并留下草稿,结果 `rehearsed` 不代表已发布。
|
|
63
69
|
|
|
64
|
-
|
|
70
|
+
## 查询结果
|
|
65
71
|
|
|
66
|
-
|
|
72
|
+
`publish` 立即返回 `task_id`,随后用 `get_sync_task` 查询,直到 `finished: true`。任务结束后,按 `summary` 逐平台告诉用户结果:
|
|
67
73
|
|
|
68
|
-
|
|
|
74
|
+
| `summary` 分类 | 含义 | agent 应该怎么做 |
|
|
69
75
|
|---|---|---|
|
|
70
|
-
|
|
|
71
|
-
|
|
|
72
|
-
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
76
|
+
| `submitted` | 平台已接受提交,可能还在审核 | 汇报结果和链接 |
|
|
77
|
+
| `draft_saved` | 已保存草稿 | 汇报,说明未公开发布 |
|
|
78
|
+
| `rehearsed` | 演练结束,未发布 | 不得说已发布 |
|
|
79
|
+
| `not_logged_in` | 未登录,未执行 | 请用户登录后,用新 `request_id` 只重发这些平台 |
|
|
80
|
+
| `login_unconfirmed` | 无法确认登录状态,未执行 | 请用户检查后再提交 |
|
|
81
|
+
| `waiting_verification` | 正在等用户完成验证码 | 立即转告 `user_actions` 的提示和链接,继续查询 |
|
|
82
|
+
| `needs_user_action` | 需要用户在页面上处理 | 转告原因和链接,不重发 |
|
|
83
|
+
| `unknown` | 结果未确认,可能已经发布 | 让用户核对,**不要重发** |
|
|
84
|
+
| `failed` | 未能完成 | 汇报 `error`,必要时提供 `diagnostics` |
|
|
77
85
|
|
|
78
|
-
|
|
86
|
+
验证码由用户手动完成,agent 和扩展都不代做。用户完成后任务会自动更新,不需要重新提交。
|
|
79
87
|
|
|
80
|
-
|
|
88
|
+
相同 `request_id` 和相同内容不会重复提交;内容变化必须换新 ID。部分平台失败时,只针对失败的平台用新 ID 重发,`unknown` 的平台不要重发。
|
|
81
89
|
|
|
82
|
-
|
|
90
|
+
## 工具
|
|
83
91
|
|
|
84
|
-
|
|
92
|
+
| 工具 | 用途 |
|
|
93
|
+
|---|---|
|
|
94
|
+
| `get_connection_status` | 连接状态、运行版本和更新提示 |
|
|
95
|
+
| `begin_pairing` | 仅在一键连接不可用时使用:生成一次性配对码 |
|
|
96
|
+
| `list_platforms`、`check_auth` | 平台能力和登录状态 |
|
|
97
|
+
| `publish`、`rehearse_publish` | 一次调用发多平台,以及演练 |
|
|
98
|
+
| `get_sync_task`、`list_sync_history` | 任务结果和最近 25 次记录 |
|
|
99
|
+
| `prepare_article`、`prepare_post` | 可选:把稿件存到扩展里预览 |
|
|
100
|
+
| `publish_article`、`publish_post`、`sync_article` | 旧版按类型发布,继续可用 |
|
|
101
|
+
| `rehearse_article`、`rehearse_post` | 旧版按类型演练 |
|
|
85
102
|
|
|
86
|
-
|
|
103
|
+
文章来源支持 `file_path`、`markdown`、`html` 三选一,图片支持 PNG/JPEG/GIF/WebP,单张 8 MB,整篇 24 MB。图文图片单张 20 MB、总量 100 MB;视频支持 MP4/MOV/WebM,最大 512 MB。实际限制还以平台页面为准。
|
|
87
104
|
|
|
88
|
-
|
|
105
|
+
## 已知限制
|
|
89
106
|
|
|
90
|
-
|
|
107
|
+
- 发布依赖平台页面,平台改版可能导致失败。失败结果的 `diagnostics` 含阶段、页面结构和请求路径,不含 Cookie、输入内容和 URL 查询参数。
|
|
108
|
+
- 抖音只能通过页面提示确认结果,没有接口回执,遇到验证码时直接交给用户。
|
|
109
|
+
- 除 B站外,其他平台的验证码流程尚未在真实验证码上验证过。
|
|
110
|
+
- 视频发布已走到发布前,但尚未真实发布验证。
|
|
111
|
+
- `submitted` 不跟踪之后的审核结果。
|
|
91
112
|
|
|
92
|
-
|
|
113
|
+
## 更新
|
|
93
114
|
|
|
94
|
-
|
|
115
|
+
- **MCP:** `--prefer-online` 在每次启动时检查新版,运行中的进程不会自动替换,重启 agent 即可。发布任务进行中不要重启。
|
|
116
|
+
- **扩展:** 新版 MCP 内置更新的扩展时,扩展的「连接 agent」页会出现「更新扩展」。用户点一下,MCP 覆盖扩展目录,扩展自行重新加载;发布任务进行中不能更新。
|
|
95
117
|
|
|
96
|
-
|
|
118
|
+
连接资料保存在用户数据目录的 `identity-端口.json`:
|
|
97
119
|
|
|
98
|
-
|
|
120
|
+
- macOS:`~/Library/Application Support/WriteDock/mcp/`
|
|
121
|
+
- Windows:`%LOCALAPPDATA%/WriteDock/mcp/`
|
|
122
|
+
- Linux:`${XDG_DATA_HOME:-~/.local/share}/writedock/mcp/`
|
|
99
123
|
|
|
100
|
-
|
|
124
|
+
卸载重装扩展后,在扩展里再点一次「连接」即可,不需要重装 MCP。`npx -y writedock-mcp@latest --version` 只显示版本。
|
|
101
125
|
|
|
102
|
-
|
|
126
|
+
对应源码位于包内 `source/`。本服务遵循 GPL-3.0-only,见 `LICENSE`、`NOTICE.md` 和 `THIRD_PARTY_NOTICES.txt`。
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright [yyyy] [name of copyright owner]
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|