aico-cli 0.4.1 → 0.4.2

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 (50) hide show
  1. package/dist/chunks/simple-config.mjs +41 -15
  2. package/dist/cli.mjs +35 -31
  3. package/package.json +4 -1
  4. package/templates/skills/slack-gif-creator/LICENSE.txt +202 -0
  5. package/templates/skills/slack-gif-creator/SKILL.md +646 -0
  6. package/templates/skills/slack-gif-creator/core/color_palettes.py +302 -0
  7. package/templates/skills/slack-gif-creator/core/easing.py +230 -0
  8. package/templates/skills/slack-gif-creator/core/frame_composer.py +469 -0
  9. package/templates/skills/slack-gif-creator/core/gif_builder.py +246 -0
  10. package/templates/skills/slack-gif-creator/core/typography.py +357 -0
  11. package/templates/skills/slack-gif-creator/core/validators.py +264 -0
  12. package/templates/skills/slack-gif-creator/core/visual_effects.py +494 -0
  13. package/templates/skills/slack-gif-creator/requirements.txt +4 -0
  14. package/templates/skills/slack-gif-creator/templates/bounce.py +106 -0
  15. package/templates/skills/slack-gif-creator/templates/explode.py +331 -0
  16. package/templates/skills/slack-gif-creator/templates/fade.py +329 -0
  17. package/templates/skills/slack-gif-creator/templates/flip.py +291 -0
  18. package/templates/skills/slack-gif-creator/templates/kaleidoscope.py +211 -0
  19. package/templates/skills/slack-gif-creator/templates/morph.py +329 -0
  20. package/templates/skills/slack-gif-creator/templates/move.py +293 -0
  21. package/templates/skills/slack-gif-creator/templates/pulse.py +268 -0
  22. package/templates/skills/slack-gif-creator/templates/shake.py +127 -0
  23. package/templates/skills/slack-gif-creator/templates/slide.py +291 -0
  24. package/templates/skills/slack-gif-creator/templates/spin.py +269 -0
  25. package/templates/skills/slack-gif-creator/templates/wiggle.py +300 -0
  26. package/templates/skills/slack-gif-creator/templates/zoom.py +312 -0
  27. package/templates/skills/swimlane-diagram/README.md +373 -0
  28. package/templates/skills/swimlane-diagram/SKILL.md +242 -0
  29. package/templates/skills/swimlane-diagram/examples.md +405 -0
  30. package/templates/skills/swimlane-diagram/generators.mjs +258 -0
  31. package/templates/skills/swimlane-diagram/package.json +126 -0
  32. package/templates/skills/swimlane-diagram/reference.md +368 -0
  33. package/templates/skills/swimlane-diagram/swimlane-diagram.mjs +215 -0
  34. package/templates/skills/swimlane-diagram/swimlane-diagram.test.mjs +358 -0
  35. package/templates/skills/swimlane-diagram/validators.mjs +291 -0
  36. package/templates/skills/theme-factory/LICENSE.txt +202 -0
  37. package/templates/skills/theme-factory/SKILL.md +59 -0
  38. package/templates/skills/theme-factory/theme-showcase.pdf +0 -0
  39. package/templates/skills/theme-factory/themes/arctic-frost.md +19 -0
  40. package/templates/skills/theme-factory/themes/botanical-garden.md +19 -0
  41. package/templates/skills/theme-factory/themes/desert-rose.md +19 -0
  42. package/templates/skills/theme-factory/themes/forest-canopy.md +19 -0
  43. package/templates/skills/theme-factory/themes/golden-hour.md +19 -0
  44. package/templates/skills/theme-factory/themes/midnight-galaxy.md +19 -0
  45. package/templates/skills/theme-factory/themes/modern-minimalist.md +19 -0
  46. package/templates/skills/theme-factory/themes/ocean-depths.md +19 -0
  47. package/templates/skills/theme-factory/themes/sunset-boulevard.md +19 -0
  48. package/templates/skills/theme-factory/themes/tech-innovation.md +19 -0
  49. package/templates/code.md +0 -70
  50. package/templates/windows-bootstrap.ps1 +0 -390
@@ -13,7 +13,7 @@ import { join as join$1 } from 'node:path';
13
13
  import { join, dirname, basename } from 'pathe';
14
14
  import { fileURLToPath } from 'node:url';
15
15
 
16
- const version = "0.4.1";
16
+ const version = "0.4.2";
17
17
 
18
18
  function displayBanner(subtitle) {
19
19
  const defaultSubtitle = "\u4E00\u952E\u914D\u7F6E\u4F60\u7684\u5F00\u53D1\u73AF\u5883";
@@ -4678,18 +4678,18 @@ const DEFAULT_FILE_COPY_CONFIGS = [
4678
4678
  }
4679
4679
  },
4680
4680
  {
4681
- source: "templates/personality.md",
4682
- destination: join(CLAUDE_DIR, "personality.md"),
4683
- type: "file",
4681
+ source: "templates/skills",
4682
+ destination: join(CLAUDE_DIR, "skills"),
4683
+ type: "directory",
4684
4684
  options: {
4685
- mergeStrategy: "merge",
4685
+ mergeStrategy: "copy",
4686
4686
  backupBeforeCopy: true,
4687
4687
  deleteBeforeCopy: true
4688
4688
  }
4689
4689
  },
4690
4690
  {
4691
- source: "templates/code.md",
4692
- destination: join(CLAUDE_DIR, "code.md"),
4691
+ source: "templates/personality.md",
4692
+ destination: join(CLAUDE_DIR, "personality.md"),
4693
4693
  type: "file",
4694
4694
  options: {
4695
4695
  mergeStrategy: "merge",
@@ -4941,7 +4941,10 @@ class ConfigInstaller extends AbstractInstaller {
4941
4941
  const settingsInstalled = existsSync(SETTINGS_FILE);
4942
4942
  const personalityInstalled = existsSync(join(CLAUDE_DIR, "personality.md"));
4943
4943
  const languageInstalled = existsSync(join(CLAUDE_DIR, "language.md"));
4944
- return { isInstalled: settingsInstalled && personalityInstalled && languageInstalled };
4944
+ const skillsInstalled = existsSync(join(CLAUDE_DIR, "skills"));
4945
+ return {
4946
+ isInstalled: settingsInstalled && personalityInstalled && languageInstalled && skillsInstalled
4947
+ };
4945
4948
  }
4946
4949
  async install(options = {}) {
4947
4950
  try {
@@ -5151,35 +5154,58 @@ class ConfigCheckerInstaller extends AbstractInstaller {
5151
5154
  name = "Config Checker";
5152
5155
  async checkStatus() {
5153
5156
  const configType = await this.detectConfigType();
5157
+ const skillsInstalled = exists(join(CLAUDE_DIR, "skills"));
5154
5158
  return {
5155
- isInstalled: configType !== "none",
5159
+ isInstalled: configType !== "none" && skillsInstalled,
5156
5160
  version: void 0
5157
5161
  };
5158
5162
  }
5159
5163
  async install(options = {}) {
5160
5164
  try {
5161
5165
  const configType = await this.detectConfigType();
5162
- if (configType !== "none" && !options.force) {
5163
- this.log(`\u68C0\u6D4B\u5230 ${configType === "company" ? "\u516C\u53F8" : "\u4E2A\u4EBA"} \u914D\u7F6E\uFF0C\u8DF3\u8FC7\u914D\u7F6E`, "success");
5166
+ const skillsInstalled = exists(join(CLAUDE_DIR, "skills"));
5167
+ if (configType !== "none" && skillsInstalled && !options.force) {
5168
+ this.log(`\u68C0\u6D4B\u5230 ${configType === "company" ? "\u516C\u53F8" : "\u4E2A\u4EBA"} \u914D\u7F6E\u4E14\u6280\u80FD\u76EE\u5F55\u5DF2\u5B58\u5728\uFF0C\u8DF3\u8FC7\u914D\u7F6E`, "success");
5164
5169
  return this.createSkipResult(
5165
- `${configType === "company" ? "\u516C\u53F8" : "\u4E2A\u4EBA"} \u914D\u7F6E\u5DF2\u5B58\u5728\uFF0C\u8DF3\u8FC7\u914D\u7F6E`,
5170
+ `${configType === "company" ? "\u516C\u53F8" : "\u4E2A\u4EBA"} \u914D\u7F6E\u548C\u6280\u80FD\u76EE\u5F55\u5DF2\u5B58\u5728\uFF0C\u8DF3\u8FC7\u914D\u7F6E`,
5166
5171
  "already_configured",
5167
- { configType }
5172
+ { configType, skillsInstalled }
5168
5173
  );
5169
5174
  }
5170
5175
  if (!options.silent) {
5171
5176
  if (configType !== "none" && options.force) {
5172
5177
  this.log(`\u5F3A\u5236\u8986\u76D6\u73B0\u6709${configType === "company" ? "\u516C\u53F8" : "\u4E2A\u4EBA"}\u914D\u7F6E...`, "info");
5178
+ } else if (!skillsInstalled) {
5179
+ this.log("\u68C0\u6D4B\u5230\u6280\u80FD\u76EE\u5F55\u672A\u5B89\u88C5\uFF0C\u5C06\u8FDB\u884C\u5B89\u88C5...", "info");
5173
5180
  } else {
5174
5181
  this.log("\u5F00\u59CB\u914D\u7F6E\u68C0\u67E5...", "info");
5175
5182
  }
5176
5183
  }
5177
5184
  const operation = configType !== "none" && options.force ? "\u8986\u76D6\u68C0\u67E5" : "\u914D\u7F6E\u68C0\u67E5";
5178
- return this.createSuccessResult(`\u914D\u7F6E\u68C0\u67E5\u5B8C\u6210\uFF0C${operation}\u6210\u529F`, void 0, { configType });
5185
+ const skillsMessage = skillsInstalled ? "\u6280\u80FD\u76EE\u5F55\u5DF2\u5B58\u5728" : "\u6280\u80FD\u76EE\u5F55\u672A\u5B89\u88C5";
5186
+ return this.createSuccessResult(
5187
+ `\u914D\u7F6E\u68C0\u67E5\u5B8C\u6210\uFF0C${operation}\u6210\u529F\uFF0C${skillsMessage}`,
5188
+ void 0,
5189
+ { configType, skillsInstalled }
5190
+ );
5179
5191
  } catch (error) {
5180
5192
  return this.handleError(error, "\u914D\u7F6E\u68C0\u67E5");
5181
5193
  }
5182
5194
  }
5195
+ /**
5196
+ * 检查版本一致性
5197
+ */
5198
+ async checkVersionConsistency() {
5199
+ try {
5200
+ const aicoConfig = readAicoConfig();
5201
+ if (!aicoConfig) {
5202
+ return false;
5203
+ }
5204
+ return aicoConfig.version === version;
5205
+ } catch (error) {
5206
+ return false;
5207
+ }
5208
+ }
5183
5209
  /**
5184
5210
  * 检测配置类型
5185
5211
  */
@@ -5544,4 +5570,4 @@ async function openSettingsJson() {
5544
5570
  }
5545
5571
  }
5546
5572
 
5547
- export { AICO_CONFIG_FILE as A, getMcpConfigPath as B, CLAUDE_DIR as C, DEFAULT_FILE_COPY_CONFIGS as D, readMcpConfig as E, writeMcpConfig as F, backupMcpConfig as G, mergeMcpServers as H, buildMcpServerConfig as I, fixWindowsMcpConfig as J, addCompletedOnboarding as K, LEGACY_AICO_CONFIG_FILE as L, MCP_SERVICES as M, createEscapablePrompt as N, displayBannerWithInfo as O, executeWithEscapeSupport as P, handleExitPromptError as Q, handleGeneralError as R, SETTINGS_FILE as S, EscapeKeyPressed as T, displayBanner as U, ConfigCheckerInstaller as V, InstallationComposer as W, version as X, readAicoConfig as Y, init$1 as Z, init as a, getPlatform as b, commandExists as c, importRecommendedEnv as d, importRecommendedPermissions as e, cleanupPermissions as f, getTermuxPrefix as g, mergeAndCleanPermissions as h, isTermux as i, CLAUDE_MD_FILE as j, ClAUDE_CONFIG_FILE as k, SUPPORTED_LANGS as l, messages as m, LANG_LABELS as n, openSettingsJson as o, AI_OUTPUT_LANGUAGES as p, ensureClaudeDir as q, backupExistingConfig as r, copyConfigFiles as s, copyConfigFilesWithConfig as t, configureApi as u, mergeConfigs as v, updateDefaultModel as w, mergeSettingsFile as x, getExistingApiConfig as y, applyAiLanguageDirective as z };
5573
+ export { AICO_CONFIG_FILE as A, getMcpConfigPath as B, CLAUDE_DIR as C, DEFAULT_FILE_COPY_CONFIGS as D, readMcpConfig as E, writeMcpConfig as F, backupMcpConfig as G, mergeMcpServers as H, buildMcpServerConfig as I, fixWindowsMcpConfig as J, addCompletedOnboarding as K, LEGACY_AICO_CONFIG_FILE as L, MCP_SERVICES as M, createEscapablePrompt as N, displayBannerWithInfo as O, executeWithEscapeSupport as P, handleExitPromptError as Q, handleGeneralError as R, SETTINGS_FILE as S, EscapeKeyPressed as T, displayBanner as U, ConfigCheckerInstaller as V, updateAicoConfig as W, version as X, InstallationComposer as Y, readAicoConfig as Z, init$1 as _, init as a, getPlatform as b, commandExists as c, importRecommendedEnv as d, importRecommendedPermissions as e, cleanupPermissions as f, getTermuxPrefix as g, mergeAndCleanPermissions as h, isTermux as i, CLAUDE_MD_FILE as j, ClAUDE_CONFIG_FILE as k, SUPPORTED_LANGS as l, messages as m, LANG_LABELS as n, openSettingsJson as o, AI_OUTPUT_LANGUAGES as p, ensureClaudeDir as q, backupExistingConfig as r, copyConfigFiles as s, copyConfigFilesWithConfig as t, configureApi as u, mergeConfigs as v, updateDefaultModel as w, mergeSettingsFile as x, getExistingApiConfig as y, applyAiLanguageDirective as z };
package/dist/cli.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import cac from 'cac';
3
3
  import ansis from 'ansis';
4
- import { N as createEscapablePrompt, O as displayBannerWithInfo, a as init, P as executeWithEscapeSupport, Q as handleExitPromptError, R as handleGeneralError, T as EscapeKeyPressed, U as displayBanner, V as ConfigCheckerInstaller, W as InstallationComposer, X as version, Y as readAicoConfig } from './chunks/simple-config.mjs';
4
+ import { N as createEscapablePrompt, O as displayBannerWithInfo, a as init, P as executeWithEscapeSupport, Q as handleExitPromptError, R as handleGeneralError, T as EscapeKeyPressed, U as displayBanner, V as ConfigCheckerInstaller, W as updateAicoConfig, X as version, Y as InstallationComposer, Z as readAicoConfig } from './chunks/simple-config.mjs';
5
5
  import inquirer$1 from 'inquirer';
6
6
  import { spawn, exec as exec$1 } from 'node:child_process';
7
7
  import 'tinyexec';
@@ -356,9 +356,10 @@ async function update(options = {}) {
356
356
  const configType = await checker.detectConfigType();
357
357
  console.log(ansis.cyan(`\u{1F4CB} \u68C0\u6D4B\u5230\u914D\u7F6E\u7C7B\u578B: ${configType === "company" ? "\u516C\u53F8\u914D\u7F6E" : configType === "personal" ? "\u4E2A\u4EBA\u914D\u7F6E" : "\u65E0\u914D\u7F6E"}`));
358
358
  await updateAicoCli();
359
+ updateAicoConfig({ version });
359
360
  if (configType === "none") {
360
361
  console.log(ansis.yellow("\n\u26A0\uFE0F \u672A\u68C0\u6D4B\u5230\u914D\u7F6E\uFF0C\u5C06\u6267\u884C\u521D\u59CB\u5316..."));
361
- const { init } = await import('./chunks/simple-config.mjs').then(function (n) { return n.Z; });
362
+ const { init } = await import('./chunks/simple-config.mjs').then(function (n) { return n._; });
362
363
  await init({
363
364
  force: false,
364
365
  skipBanner: true,
@@ -404,7 +405,7 @@ function setupCommands(cli) {
404
405
  } else if (options.update) {
405
406
  await update({});
406
407
  } else if (options.company) {
407
- const { init: init2 } = await import('./chunks/simple-config.mjs').then(function (n) { return n.Z; });
408
+ const { init: init2 } = await import('./chunks/simple-config.mjs').then(function (n) { return n._; });
408
409
  await init2({
409
410
  apiType: "auth_token",
410
411
  force: options.force,
@@ -412,7 +413,7 @@ function setupCommands(cli) {
412
413
  skipPrompt: true
413
414
  });
414
415
  } else if (options.personal) {
415
- const { init: init2 } = await import('./chunks/simple-config.mjs').then(function (n) { return n.Z; });
416
+ const { init: init2 } = await import('./chunks/simple-config.mjs').then(function (n) { return n._; });
416
417
  await init2({
417
418
  apiType: "ccr_proxy",
418
419
  force: options.force,
@@ -434,7 +435,7 @@ function setupCommands(cli) {
434
435
  await update({});
435
436
  });
436
437
  cli.command("c", "\u5FEB\u901F\u914D\u7F6E\u516C\u53F8\u8BBE\u7F6E").action(async () => {
437
- const { init: init2 } = await import('./chunks/simple-config.mjs').then(function (n) { return n.Z; });
438
+ const { init: init2 } = await import('./chunks/simple-config.mjs').then(function (n) { return n._; });
438
439
  await init2({
439
440
  apiType: "auth_token",
440
441
  force: false,
@@ -443,7 +444,7 @@ function setupCommands(cli) {
443
444
  });
444
445
  });
445
446
  cli.command("p", "\u5FEB\u901F\u914D\u7F6E\u4E2A\u4EBA\u8BBE\u7F6E").action(async () => {
446
- const { init: init2 } = await import('./chunks/simple-config.mjs').then(function (n) { return n.Z; });
447
+ const { init: init2 } = await import('./chunks/simple-config.mjs').then(function (n) { return n._; });
447
448
  await init2({
448
449
  apiType: "ccr_proxy",
449
450
  force: false,
@@ -468,31 +469,34 @@ async function startCodeEditor() {
468
469
  const configType = await checker.detectConfigType();
469
470
  const aicoConfig = readAicoConfig();
470
471
  const needsReinstall = !aicoConfig || aicoConfig.version !== version;
471
- if (configType === "none" || needsReinstall) {
472
- if (configType === "none") {
473
- console.log(ansis.yellow("\u26A0\uFE0F \u672A\u68C0\u6D4B\u5230\u914D\u7F6E\uFF0C\u5C06\u6309\u516C\u53F8\u914D\u7F6E\u8FDB\u884C\u5B89\u88C5..."));
474
- } else {
475
- console.log(ansis.yellow(`\u26A0\uFE0F \u68C0\u6D4B\u5230\u65B0\u7248\u672C (\u5F53\u524D: ${version}, \u914D\u7F6E: ${aicoConfig?.version || "\u65E0"})\uFF0C\u5C06\u81EA\u52A8\u5347\u7EA7...`));
476
- }
477
- if (configType === "company") {
478
- const { init: init2 } = await import('./chunks/simple-config.mjs').then(function (n) { return n.Z; });
479
- await init2({
480
- apiType: "auth_token",
481
- skipBanner: true,
482
- skipPrompt: true,
483
- force: true
484
- });
485
- } else if (configType === "personal") {
486
- const { init: init2 } = await import('./chunks/simple-config.mjs').then(function (n) { return n.Z; });
487
- await init2({
488
- apiType: "ccr_proxy",
489
- skipBanner: true,
490
- skipPrompt: true,
491
- force: true
492
- });
493
- } else {
494
- const { init: init2 } = await import('./chunks/simple-config.mjs').then(function (n) { return n.Z; });
495
- await init2({ skipBanner: true, skipPrompt: true });
472
+ if (configType === "none") {
473
+ console.log(ansis.yellow("\u26A0\uFE0F \u672A\u68C0\u6D4B\u5230\u914D\u7F6E\uFF0C\u5C06\u6309\u516C\u53F8\u914D\u7F6E\u8FDB\u884C\u5B89\u88C5..."));
474
+ const { init: init2 } = await import('./chunks/simple-config.mjs').then(function (n) { return n._; });
475
+ await init2({ skipBanner: true, skipPrompt: true });
476
+ } else if (needsReinstall) {
477
+ console.log(ansis.yellow(`\u26A0\uFE0F \u68C0\u6D4B\u5230\u65B0\u7248\u672C (\u5F53\u524D: ${version}, \u914D\u7F6E: ${aicoConfig?.version || "\u65E0"})`));
478
+ try {
479
+ updateAicoConfig({ version });
480
+ console.log(ansis.green("\u2705 \u7248\u672C\u5DF2\u540C\u6B65\uFF0C\u8DF3\u8FC7\u91CD\u65B0\u5B89\u88C5"));
481
+ } catch (error) {
482
+ console.log(ansis.yellow("\u26A0\uFE0F \u7248\u672C\u540C\u6B65\u5931\u8D25\uFF0C\u5C06\u6267\u884C\u5B8C\u6574\u914D\u7F6E\u66F4\u65B0..."));
483
+ if (configType === "company") {
484
+ const { init: init2 } = await import('./chunks/simple-config.mjs').then(function (n) { return n._; });
485
+ await init2({
486
+ apiType: "auth_token",
487
+ skipBanner: true,
488
+ skipPrompt: true,
489
+ force: true
490
+ });
491
+ } else if (configType === "personal") {
492
+ const { init: init2 } = await import('./chunks/simple-config.mjs').then(function (n) { return n._; });
493
+ await init2({
494
+ apiType: "ccr_proxy",
495
+ skipBanner: true,
496
+ skipPrompt: true,
497
+ force: true
498
+ });
499
+ }
496
500
  }
497
501
  } else {
498
502
  console.log(ansis.green(`\u2705 \u68C0\u6D4B\u5230${configType === "company" ? "\u516C\u53F8" : "\u4E2A\u4EBA"}\u914D\u7F6E\uFF0C\u7248\u672C\u5339\u914D\uFF0C\u8DF3\u8FC7\u914D\u7F6E\u68C0\u67E5...`));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aico-cli",
3
- "version": "0.4.1",
3
+ "version": "0.4.2",
4
4
  "packageManager": "pnpm@9.15.9",
5
5
  "description": "AI CLI",
6
6
  "repository": {
@@ -51,7 +51,10 @@
51
51
  "@types/semver": "^7.7.0",
52
52
  "@vitest/coverage-v8": "^3.2.4",
53
53
  "@vitest/ui": "^3.2.4",
54
+ "playwright": "^1.56.1",
55
+ "pptxgenjs": "^4.0.1",
54
56
  "semver": "^7.7.2",
57
+ "sharp": "^0.34.4",
55
58
  "tsx": "^4.20.3",
56
59
  "typescript": "^5.9.2",
57
60
  "unbuild": "^3.6.0",
@@ -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.