@cydm/pie 1.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/README.md +115 -89
  2. package/package.json +1 -1
  3. package/dist/builtin/extensions/ask-user/index.js +0 -2924
  4. package/dist/builtin/extensions/changelog/index.js +0 -200
  5. package/dist/builtin/extensions/deploy/index.js +0 -11
  6. package/dist/builtin/extensions/document-attachments/index.js +0 -144
  7. package/dist/builtin/extensions/files/index.js +0 -10
  8. package/dist/builtin/extensions/init/index.js +0 -144
  9. package/dist/builtin/extensions/kimi-attachments/index.js +0 -46
  10. package/dist/builtin/extensions/plan-mode/index.js +0 -209
  11. package/dist/builtin/extensions/questionnaire/index.js +0 -2753
  12. package/dist/builtin/extensions/subagent/index.js +0 -11031
  13. package/dist/builtin/extensions/todo/index.js +0 -162
  14. package/dist/builtin/skills/browser-tools/CHANGELOG.md +0 -47
  15. package/dist/builtin/skills/browser-tools/browser-cookies.js +0 -35
  16. package/dist/builtin/skills/browser-tools/browser-screenshot.js +0 -34
  17. package/dist/builtin/skills/browser-tools/browser-start.js +0 -86
  18. package/dist/builtin/skills/skill-creator/LICENSE.txt +0 -202
  19. package/dist/builtin/skills/skill-creator/SKILL.md +0 -485
  20. package/dist/builtin/skills/skill-creator/agents/analyzer.md +0 -274
  21. package/dist/builtin/skills/skill-creator/agents/comparator.md +0 -202
  22. package/dist/builtin/skills/skill-creator/agents/grader.md +0 -223
  23. package/dist/builtin/skills/skill-creator/assets/eval_review.html +0 -146
  24. package/dist/builtin/skills/skill-creator/eval-viewer/generate_review.py +0 -471
  25. package/dist/builtin/skills/skill-creator/eval-viewer/viewer.html +0 -1325
  26. package/dist/builtin/skills/skill-creator/references/schemas.md +0 -430
  27. package/dist/builtin/skills/skill-creator/scripts/__init__.py +0 -0
  28. package/dist/builtin/skills/skill-creator/scripts/aggregate_benchmark.py +0 -401
  29. package/dist/builtin/skills/skill-creator/scripts/generate_report.py +0 -326
  30. package/dist/builtin/skills/skill-creator/scripts/improve_description.py +0 -247
  31. package/dist/builtin/skills/skill-creator/scripts/package_skill.py +0 -136
  32. package/dist/builtin/skills/skill-creator/scripts/quick_validate.py +0 -103
  33. package/dist/builtin/skills/skill-creator/scripts/run_eval.py +0 -310
  34. package/dist/builtin/skills/skill-creator/scripts/run_loop.py +0 -328
  35. package/dist/builtin/skills/skill-creator/scripts/utils.py +0 -47
  36. package/dist/cli.js +0 -78983
  37. package/dist/theme/dark.json +0 -85
  38. package/dist/theme/light.json +0 -84
@@ -1,162 +0,0 @@
1
- import { createRequire as __createRequire } from "node:module"; const require = __createRequire(import.meta.url);
2
-
3
- // builtin/extensions/todo/index.ts
4
- async function readTodos(cwd) {
5
- try {
6
- const fs = await import("fs");
7
- const path = await import("path");
8
- const todosPath = path.join(cwd, ".pie", "todos.md");
9
- if (fs.existsSync(todosPath)) {
10
- return fs.readFileSync(todosPath, "utf-8");
11
- }
12
- } catch {
13
- }
14
- return null;
15
- }
16
- function todoExtension(ctx) {
17
- ctx.log("Todo extension loaded");
18
- ctx.registerCommand({
19
- path: ["tools", "todo"],
20
- description: "Smart task extraction and management",
21
- handler: async (ctx2, args) => {
22
- const fs = await import("fs");
23
- const path = await import("path");
24
- const todosPath = path.join(ctx2.cwd, ".pie", "todos.md");
25
- const pieDir = path.join(ctx2.cwd, ".pie");
26
- if (!fs.existsSync(pieDir)) {
27
- fs.mkdirSync(pieDir, { recursive: true });
28
- }
29
- const command = args?.trim();
30
- const existingTodos = await readTodos(ctx2.cwd);
31
- if (command?.match(/^done\s+\d+/i)) {
32
- const match = command.match(/done\s+(\d+)/i);
33
- const id = match ? parseInt(match[1], 10) : 0;
34
- if (!existingTodos) return "No todos.md file found.";
35
- return `\u8BF7\u5C06 .pie/todos.md \u4E2D\u7B2C ${id} \u4E2A\u672A\u5B8C\u6210\u4EFB\u52A1\u6807\u8BB0\u4E3A\u5DF2\u5B8C\u6210\uFF1A
36
-
37
- \u5F53\u524D\u6587\u4EF6\u5185\u5BB9\uFF1A
38
- \`\`\`
39
- ${existingTodos}
40
- \`\`\`
41
-
42
- \u8981\u6C42\uFF1A
43
- 1. \u627E\u5230\u7B2C ${id} \u4E2A\u4EE5 "- [ ]" \u5F00\u5934\u7684\u4EFB\u52A1
44
- 2. \u5C06\u5176\u6539\u4E3A "- [x]"\uFF08\u4FDD\u7559\u539F\u6709\u5185\u5BB9\u548C\u4F18\u5148\u7EA7\u6807\u8BB0\uFF09
45
- 3. \u5728\u672B\u5C3E\u6DFB\u52A0\u5B8C\u6210\u65F6\u95F4\u6CE8\u91CA\uFF1A<!-- completed: YYYY-MM-DD -->
46
- 4. \u4F7F\u7528 write \u5DE5\u5177\u66F4\u65B0\u6587\u4EF6
47
- 5. \u62A5\u544A\u5B8C\u6210\u4E86\u54EA\u4E2A\u4EFB\u52A1`;
48
- }
49
- if (command?.toLowerCase() === "clear") {
50
- if (!existingTodos) return "No todos.md file found.";
51
- return `\u8BF7\u6E05\u7406 .pie/todos.md \u4E2D\u7684\u5DF2\u5B8C\u6210\u4EFB\u52A1\uFF1A
52
-
53
- \u5F53\u524D\u6587\u4EF6\u5185\u5BB9\uFF1A
54
- \`\`\`
55
- ${existingTodos}
56
- \`\`\`
57
-
58
- \u8981\u6C42\uFF1A
59
- 1. \u79FB\u9664\u6240\u6709\u4EE5 "- [x]" \u5F00\u5934\u7684\u5DF2\u5B8C\u6210\u4EFB\u52A1
60
- 2. \u4FDD\u7559\u6240\u6709 "- [ ]" \u672A\u5B8C\u6210\u4EFB\u52A1
61
- 3. \u4FDD\u7559\u6587\u4EF6\u6807\u9898\u548C\u5176\u4ED6\u7ED3\u6784
62
- 4. \u4F7F\u7528 write \u5DE5\u5177\u66F4\u65B0\u6587\u4EF6
63
- 5. \u62A5\u544A\u6E05\u7406\u4E86\u591A\u5C11\u4E2A\u5DF2\u5B8C\u6210\u4EFB\u52A1`;
64
- }
65
- if (command?.toLowerCase().startsWith("add ")) {
66
- const description = command.slice(4).trim();
67
- ctx2.ui.notify("\u{1F4DD} \u6B63\u5728\u5206\u6790\u4EFB\u52A1...", "info");
68
- return `\u8BF7\u5C06\u4EE5\u4E0B\u63CF\u8FF0\u8F6C\u6362\u4E3A\u7ED3\u6784\u5316\u7684 todo \u6761\u76EE\u5E76\u6DFB\u52A0\u5230 .pie/todos.md\uFF1A
69
-
70
- \u63CF\u8FF0\uFF1A"${description}"
71
-
72
- ${existingTodos ? `
73
- \u5F53\u524D todos.md \u5185\u5BB9\uFF1A
74
- \`\`\`
75
- ${existingTodos}
76
- \`\`\`` : ""}
77
-
78
- \u4EFB\u52A1\uFF1A
79
- 1. \u5206\u6790\u63CF\u8FF0\uFF0C\u786E\u5B9A\uFF1A
80
- - \u4EFB\u52A1\u7C7B\u578B\uFF1Afeature / bug / refactor / docs / test / other
81
- - \u4F18\u5148\u7EA7\uFF1Ahigh / medium / low\uFF08\u6839\u636E\u7D27\u6025\u7A0B\u5EA6\u548C\u5F71\u54CD\u5224\u65AD\uFF09
82
- - \u6E05\u6670\u7B80\u6D01\u7684\u4EFB\u52A1\u63CF\u8FF0
83
-
84
- 2. \u751F\u6210\u683C\u5F0F\uFF1A
85
- - [ ] ![{priority}] [{type}] {description}
86
-
87
- \u793A\u4F8B\uFF1A
88
- - [ ] ![high] [bug] \u4FEE\u590D\u767B\u5F55\u9875\u9762\u7684\u5185\u5B58\u6CC4\u6F0F
89
- - [ ] ![medium] [feature] \u6DFB\u52A0\u7528\u6237\u5BFC\u51FA\u529F\u80FD
90
- - [ ] ![low] [docs] \u66F4\u65B0 API \u6587\u6863
91
-
92
- 3. \u4F7F\u7528 write \u5DE5\u5177\uFF1A
93
- - \u5982\u679C\u6587\u4EF6\u4E0D\u5B58\u5728\uFF0C\u521B\u5EFA\u6807\u51C6\u683C\u5F0F
94
- - \u5C06\u65B0\u4EFB\u52A1\u6309\u4F18\u5148\u7EA7\u63D2\u5165\u5230 "## Active" \u90E8\u5206\u7684\u5408\u9002\u4F4D\u7F6E\uFF08high\u5728\u524D\uFF0Clow\u5728\u540E\uFF09
95
- - \u4FDD\u6301\u73B0\u6709\u4EFB\u52A1\u4E0D\u53D8
96
-
97
- 4. \u62A5\u544A\u6DFB\u52A0\u4E86\u4EC0\u4E48\u4EFB\u52A1`;
98
- }
99
- if (command?.toLowerCase() === "priority") {
100
- if (!existingTodos) return "No todos.md file found.";
101
- ctx2.ui.notify("\u{1F504} \u6B63\u5728\u6309\u4F18\u5148\u7EA7\u6392\u5E8F...", "info");
102
- return `\u8BF7\u91CD\u65B0\u6574\u7406 .pie/todos.md \u4E2D\u7684\u4EFB\u52A1\uFF0C\u6309\u4F18\u5148\u7EA7\u6392\u5E8F\uFF1A
103
-
104
- \u5F53\u524D\u6587\u4EF6\u5185\u5BB9\uFF1A
105
- \`\`\`
106
- ${existingTodos}
107
- \`\`\`
108
-
109
- \u6392\u5E8F\u89C4\u5219\uFF1A
110
- 1. \u672A\u5B8C\u6210\u4EFB\u52A1\u6309\u4F18\u5148\u7EA7\u6392\u5E8F\uFF1Ahigh \u2192 medium \u2192 low
111
- 2. \u540C\u7EA7\u4F18\u5148\u7EA7\u4FDD\u6301\u539F\u6709\u987A\u5E8F
112
- 3. \u5DF2\u5B8C\u6210\u4EFB\u52A1\u653E\u5728\u6700\u540E
113
- 4. \u4FDD\u6301\u6587\u4EF6\u5176\u4ED6\u7ED3\u6784\u4E0D\u53D8
114
-
115
- \u683C\u5F0F\u4FDD\u6301\uFF1A
116
- - [ ] ![high] [type] \u63CF\u8FF0
117
- - [ ] ![medium] [type] \u63CF\u8FF0
118
- - [ ] ![low] [type] \u63CF\u8FF0
119
-
120
- \u4F7F\u7528 write \u5DE5\u5177\u66F4\u65B0\u6587\u4EF6\u3002`;
121
- }
122
- ctx2.ui.notify("\u{1F50D} \u6B63\u5728\u5206\u6790\u5BF9\u8BDD\u63D0\u53D6\u4EFB\u52A1...", "info");
123
- return `\u{1F50D} \u667A\u80FD\u4EFB\u52A1\u63D0\u53D6
124
-
125
- \u8BF7\u5206\u6790\u6211\u4EEC\u7684\u5BF9\u8BDD\u5386\u53F2\uFF0C\u63D0\u53D6\u6240\u6709\u9700\u8981\u540E\u7EED\u5904\u7406\u7684\u4EFB\u52A1\u3002
126
-
127
- ${existingTodos ? `\u5F53\u524D\u5DF2\u6709\u4EFB\u52A1\uFF08\u907F\u514D\u91CD\u590D\uFF09\uFF1A
128
- \`\`\`
129
- ${existingTodos}
130
- \`\`\`
131
- ` : ""}
132
-
133
- \u63D0\u53D6\u6807\u51C6\uFF1A
134
- 1. **\u660E\u786E\u7684\u5F85\u529E** - "\u6211\u4EEC\u9700\u8981..."\u3001"\u8FD8\u8981..."\u3001"TODO..."
135
- 2. **\u53D1\u73B0\u7684\u95EE\u9898** - "\u8FD9\u91CC\u6709 bug"\u3001"\u9700\u8981\u4FEE\u590D..."
136
- 3. **\u6539\u8FDB\u5EFA\u8BAE** - "\u5E94\u8BE5\u4F18\u5316..."\u3001"\u53EF\u4EE5\u91CD\u6784..."
137
- 4. **\u540E\u7EED\u5DE5\u4F5C** - "\u63A5\u4E0B\u6765..."\u3001"\u4E4B\u540E\u8981..."
138
- 5. **\u672A\u5B8C\u6210\u4E8B\u9879** - \u5BF9\u8BDD\u4E2D\u63D0\u53CA\u4F46\u672A\u5B8C\u6210\u7684\u52A8\u4F5C
139
-
140
- \u5FFD\u7565\uFF1A
141
- - \u5DF2\u7ECF\u660E\u786E\u8BF4"\u5B8C\u6210"\u7684\u4E8B\u9879
142
- - \u592A\u6A21\u7CCA\u65E0\u6CD5\u6267\u884C\u7684\u60F3\u6CD5
143
- - \u5F53\u524D\u5BF9\u8BDD\u4E2D\u5DF2\u7ECF\u89E3\u51B3\u7684\u95EE\u9898
144
-
145
- \u8F93\u51FA\u683C\u5F0F\uFF08\u5982\u679C\u63D0\u53D6\u5230\u4EFB\u52A1\uFF09\uFF1A
146
-
147
- ## \u53D1\u73B0\u7684\u4EFB\u52A1
148
-
149
- | # | \u4F18\u5148\u7EA7 | \u7C7B\u578B | \u4EFB\u52A1\u63CF\u8FF0 |
150
- |---|--------|------|----------|
151
- | 1 | \u{1F534} high | bug | \u4FEE\u590D xxx \u95EE\u9898 |
152
- | 2 | \u{1F7E1} medium | feature | \u6DFB\u52A0 xxx \u529F\u80FD |
153
-
154
- \u8BF7\u4F7F\u7528 write \u5DE5\u5177\u5C06\u63D0\u53D6\u5230\u7684\u4EFB\u52A1\u6DFB\u52A0\u5230 .pie/todos.md\u3002
155
- \u5982\u679C\u6CA1\u6709\u53D1\u73B0\u65B0\u4EFB\u52A1\uFF0C\u76F4\u63A5\u62A5\u544A\u5373\u53EF\u3002`;
156
- }
157
- });
158
- ctx.log("Todo extension ready");
159
- }
160
- export {
161
- todoExtension as default
162
- };
@@ -1,47 +0,0 @@
1
- # Changelog
2
-
3
- All notable changes to this project will be documented in this file.
4
-
5
- The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
- and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
-
8
- ## [1.1.0] - 2025-03-10
9
-
10
- ### Fixed
11
-
12
- - **browser-eval.js**: Fixed complex JavaScript code execution
13
- - Support for "const", "let", "var" keywords
14
- - Support for multi-line code and conditionals (if/else, for, while)
15
- - Support for function declarations and calls
16
- - Automatic expression return value handling
17
- - Fixed AsyncFunction wrapping syntax errors
18
-
19
- ### Improved
20
-
21
- - Improved code execution logic using eval() instead of complex AsyncFunction wrapping
22
- - Support for more complex browser automation scenarios (e.g., MagicShell 10-round dialog testing)
23
-
24
- ## [1.0.0] - 2025-03-09
25
-
26
- ### Initial Release
27
-
28
- - Basic browser automation toolset
29
- - Chrome DevTools Protocol support
30
- - Included tools:
31
- - browser-start.js: Start Chrome
32
- - browser-nav.js: Page navigation
33
- - browser-eval.js: JavaScript execution (basic)
34
- - browser-screenshot.js: Screenshots
35
- - browser-cookies.js: Cookie management
36
- - browser-content.js: Content extraction
37
- - browser-hn-scraper.js: HN scraper example
38
- - browser-pick.js: Interactive element picker
39
-
40
- ### Dependencies
41
-
42
- - puppeteer: ^24.31.0
43
- - puppeteer-core: ^23.11.1
44
- - @mozilla/readability: ^0.6.0
45
- - cheerio: ^1.1.2
46
- - jsdom: ^27.0.1
47
- - turndown: ^7.2.2
@@ -1,35 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- import puppeteer from "puppeteer-core";
4
-
5
- const b = await Promise.race([
6
- puppeteer.connect({
7
- browserURL: "http://localhost:9222",
8
- defaultViewport: null,
9
- }),
10
- new Promise((_, reject) => setTimeout(() => reject(new Error("timeout")), 5000)),
11
- ]).catch((e) => {
12
- console.error("✗ Could not connect to browser:", e.message);
13
- console.error(" Run: browser-start.js");
14
- process.exit(1);
15
- });
16
-
17
- const p = (await b.pages()).at(-1);
18
-
19
- if (!p) {
20
- console.error("✗ No active tab found");
21
- process.exit(1);
22
- }
23
-
24
- const cookies = await p.cookies();
25
-
26
- for (const cookie of cookies) {
27
- console.log(`${cookie.name}: ${cookie.value}`);
28
- console.log(` domain: ${cookie.domain}`);
29
- console.log(` path: ${cookie.path}`);
30
- console.log(` httpOnly: ${cookie.httpOnly}`);
31
- console.log(` secure: ${cookie.secure}`);
32
- console.log("");
33
- }
34
-
35
- await b.disconnect();
@@ -1,34 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- import { tmpdir } from "node:os";
4
- import { join } from "node:path";
5
- import puppeteer from "puppeteer-core";
6
-
7
- const b = await Promise.race([
8
- puppeteer.connect({
9
- browserURL: "http://localhost:9222",
10
- defaultViewport: null,
11
- }),
12
- new Promise((_, reject) => setTimeout(() => reject(new Error("timeout")), 5000)),
13
- ]).catch((e) => {
14
- console.error("✗ Could not connect to browser:", e.message);
15
- console.error(" Run: browser-start.js");
16
- process.exit(1);
17
- });
18
-
19
- const p = (await b.pages()).at(-1);
20
-
21
- if (!p) {
22
- console.error("✗ No active tab found");
23
- process.exit(1);
24
- }
25
-
26
- const timestamp = new Date().toISOString().replace(/[:.]/g, "-");
27
- const filename = `screenshot-${timestamp}.png`;
28
- const filepath = join(tmpdir(), filename);
29
-
30
- await p.screenshot({ path: filepath });
31
-
32
- console.log(filepath);
33
-
34
- await b.disconnect();
@@ -1,86 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- import { spawn, execSync } from "node:child_process";
4
- import puppeteer from "puppeteer-core";
5
-
6
- const useProfile = process.argv[2] === "--profile";
7
-
8
- if (process.argv[2] && process.argv[2] !== "--profile") {
9
- console.log("Usage: browser-start.js [--profile]");
10
- console.log("\nOptions:");
11
- console.log(" --profile Copy your default Chrome profile (cookies, logins)");
12
- process.exit(1);
13
- }
14
-
15
- const SCRAPING_DIR = `${process.env.HOME}/.cache/browser-tools`;
16
-
17
- // Check if already running on :9222
18
- try {
19
- const browser = await puppeteer.connect({
20
- browserURL: "http://localhost:9222",
21
- defaultViewport: null,
22
- });
23
- await browser.disconnect();
24
- console.log("✓ Chrome already running on :9222");
25
- process.exit(0);
26
- } catch {}
27
-
28
- // Setup profile directory
29
- execSync(`mkdir -p "${SCRAPING_DIR}"`, { stdio: "ignore" });
30
-
31
- // Remove SingletonLock to allow new instance
32
- try {
33
- execSync(`rm -f "${SCRAPING_DIR}/SingletonLock" "${SCRAPING_DIR}/SingletonSocket" "${SCRAPING_DIR}/SingletonCookie"`, { stdio: "ignore" });
34
- } catch {}
35
-
36
- if (useProfile) {
37
- console.log("Syncing profile...");
38
- execSync(
39
- `rsync -a --delete \
40
- --exclude='SingletonLock' \
41
- --exclude='SingletonSocket' \
42
- --exclude='SingletonCookie' \
43
- --exclude='*/Sessions/*' \
44
- --exclude='*/Current Session' \
45
- --exclude='*/Current Tabs' \
46
- --exclude='*/Last Session' \
47
- --exclude='*/Last Tabs' \
48
- "${process.env.HOME}/Library/Application Support/Google/Chrome/" "${SCRAPING_DIR}/"`,
49
- { stdio: "pipe" },
50
- );
51
- }
52
-
53
- // Start Chrome with flags to force new instance
54
- spawn(
55
- "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome",
56
- [
57
- "--remote-debugging-port=9222",
58
- `--user-data-dir=${SCRAPING_DIR}`,
59
- "--no-first-run",
60
- "--no-default-browser-check",
61
- ],
62
- { detached: true, stdio: "ignore" },
63
- ).unref();
64
-
65
- // Wait for Chrome to be ready
66
- let connected = false;
67
- for (let i = 0; i < 30; i++) {
68
- try {
69
- const browser = await puppeteer.connect({
70
- browserURL: "http://localhost:9222",
71
- defaultViewport: null,
72
- });
73
- await browser.disconnect();
74
- connected = true;
75
- break;
76
- } catch {
77
- await new Promise((r) => setTimeout(r, 500));
78
- }
79
- }
80
-
81
- if (!connected) {
82
- console.error("✗ Failed to connect to Chrome");
83
- process.exit(1);
84
- }
85
-
86
- console.log(`✓ Chrome started on :9222${useProfile ? " with your profile" : ""}`);
@@ -1,202 +0,0 @@
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.