@raymondchins/agentmap 0.2.0 → 0.2.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.
- package/NOTICE +14 -9
- package/README.md +7 -4
- package/agentmap.mjs +45 -14
- package/hooks/INSTALL.md +4 -2
- package/package.json +2 -3
- package/LICENSE-APACHE +0 -194
package/NOTICE
CHANGED
|
@@ -1,19 +1,24 @@
|
|
|
1
|
-
agentmap —
|
|
2
|
-
|
|
1
|
+
agentmap — Credits & attribution
|
|
2
|
+
================================
|
|
3
3
|
|
|
4
4
|
agentmap is copyright 2026 Raymond Surya Chin and contributors,
|
|
5
5
|
licensed under the MIT License (see LICENSE).
|
|
6
6
|
|
|
7
7
|
-------------------------------------------------------------------------------
|
|
8
|
-
|
|
8
|
+
Algorithm credit
|
|
9
9
|
-------------------------------------------------------------------------------
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
agentmap's repo-map ranking — personalized PageRank importance scoring and the
|
|
12
|
+
identifier-graph symbol ranking — is an independent reimplementation, in
|
|
13
|
+
JavaScript, of the approach introduced by Aider's repo map
|
|
13
14
|
(https://github.com/Aider-AI/aider) by Paul Gauthier and contributors.
|
|
14
15
|
|
|
15
|
-
Aider
|
|
16
|
-
|
|
16
|
+
No Aider source code is copied or included here: PageRank is a public, textbook
|
|
17
|
+
algorithm, agentmap implements it from scratch (a dependency-free power
|
|
18
|
+
iteration in agentmap.mjs), and Aider itself relies on the networkx library
|
|
19
|
+
rather than hand-written ranking code. This NOTICE is a courtesy credit to the
|
|
20
|
+
project that pioneered applying that ranking approach to a coding-agent repo
|
|
21
|
+
map — not a statement of derivative authorship.
|
|
17
22
|
|
|
18
|
-
|
|
19
|
-
|
|
23
|
+
Aider is licensed under the Apache License, Version 2.0
|
|
24
|
+
(http://www.apache.org/licenses/LICENSE-2.0).
|
package/README.md
CHANGED
|
@@ -339,7 +339,7 @@ $ node agentmap.mjs --print | jq '.hubs[0]'
|
|
|
339
339
|
| `--help` / `-h` | Print a usage block listing every flag and exit 0. |
|
|
340
340
|
| `--version` / `-v` | Print the version from `package.json` and exit 0. |
|
|
341
341
|
| `--json` | **Global modifier.** When present, every command prints exactly one JSON object to stdout (no prose). Shapes vary per command: `--json --hubs` → `{command,fileCount,sha,hubs:[string]}`, `--json --find X` → `{command,query,matches:[{file,name,kind}]}`, `--json --relates X` → `{command,file,pagerank,exports,imports,dependents,related}`, `--json --any X` → `{command,query,kind,…payload}`, etc. Bare `--json` (no query flag) → `{command:"build",fileCount,features,topHub}`. |
|
|
342
|
-
| `--install-hooks` | Copy `hooks/post-commit` into `.git/hooks/` (chmod 0755), ensure `.claude/agentmap.json` is in `.gitignore`, and
|
|
342
|
+
| `--install-hooks` | Copy `hooks/post-commit` into `.git/hooks/` (chmod 0755), ensure `.claude/agentmap.json` is in `.gitignore`, and auto-wire the Claude Code `PreToolUse(Grep)` nudge into `.claude/settings.json` (merge-safe + idempotent). Exit 0 on success, stderr + exit 1 on failure. |
|
|
343
343
|
| `--mcp` | Start agentmap as a **stdio MCP server** so non-Claude-Code agents (Cursor, Cline, any MCP client) can call every flag as a first-class tool. |
|
|
344
344
|
|
|
345
345
|
**Exit-code contract:** `0` = success / match / help / version; `1` = query returned zero results (`--any`, `--find`, `--relates`, `--feature` with no match); `2` = usage error (missing required arg, unknown flag). Any token starting with `-` that matches no known flag prints an error to stderr and exits 2.
|
|
@@ -365,8 +365,9 @@ npx @raymondchins/agentmap --install-hooks
|
|
|
365
365
|
```
|
|
366
366
|
|
|
367
367
|
This copies `hooks/post-commit` into `.git/hooks/`, sets it executable, ensures
|
|
368
|
-
`.claude/agentmap.json` is in `.gitignore`, and
|
|
369
|
-
|
|
368
|
+
`.claude/agentmap.json` is in `.gitignore`, and **auto-wires the `PreToolUse` nudge
|
|
369
|
+
hook into `.claude/settings.json`** (merge-safe + idempotent) so map enforcement is
|
|
370
|
+
on by default — no manual paste. Manual alternative for just the post-commit hook:
|
|
370
371
|
|
|
371
372
|
```bash
|
|
372
373
|
# from your repo root
|
|
@@ -385,7 +386,9 @@ reuse search, it injects a reminder steering the agent to `agentmap --any` first
|
|
|
385
386
|
denies the grep, and stays silent for raw-string / Tailwind-class / lowercase-HTML-tag
|
|
386
387
|
sweeps — so it's high-signal, not nagging.
|
|
387
388
|
|
|
388
|
-
|
|
389
|
+
`--install-hooks` writes this into `.claude/settings.json` for you (merge-safe — it
|
|
390
|
+
preserves existing settings and won't duplicate on re-run). For reference, or to wire
|
|
391
|
+
it by hand:
|
|
389
392
|
|
|
390
393
|
```json
|
|
391
394
|
{
|
package/agentmap.mjs
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
//
|
|
6
6
|
// A ts-morph code-relationship map for TypeScript/JavaScript repos. Unlike
|
|
7
7
|
// one-shot "pack the repo into a prompt" tools, this is a QUERYABLE, RANKED
|
|
8
|
-
// map: PageRank importance (
|
|
8
|
+
// map: PageRank importance (approach from Aider's repo map), Aider-style
|
|
9
9
|
// symbol ranking, a token-budgeted `--map` digest, and a single `--any`
|
|
10
10
|
// router (file → symbol → feature → live git-grep) — wired into the agent
|
|
11
11
|
// loop via a post-commit auto-refresh + a PreToolUse hook.
|
|
@@ -13,11 +13,18 @@
|
|
|
13
13
|
// Near-zero deps (ts-morph only). Runs in the target repo's cwd.
|
|
14
14
|
// Algorithm credit: Aider's repo map (Apache-2.0) — github.com/Aider-AI/aider
|
|
15
15
|
// ============================================================================
|
|
16
|
-
import { Project, SyntaxKind } from "ts-morph";
|
|
17
|
-
const CallExpression = SyntaxKind.CallExpression;
|
|
18
16
|
import { writeFileSync, readFileSync, existsSync, mkdirSync, renameSync, readdirSync, statSync, chmodSync } from "node:fs";
|
|
19
17
|
import { execSync, execFileSync } from "node:child_process";
|
|
20
18
|
import { createHash } from "node:crypto";
|
|
19
|
+
import { createRequire } from "node:module";
|
|
20
|
+
|
|
21
|
+
// Lazy ts-morph: its ~105ms module init only fires on a COLD rebuild. Warm cache
|
|
22
|
+
// queries (the common case) never construct a Project, so they skip the load
|
|
23
|
+
// entirely (~2x faster warm). createRequire keeps it synchronous — no async to
|
|
24
|
+
// thread through build()/makeProject().
|
|
25
|
+
const _require = createRequire(import.meta.url);
|
|
26
|
+
let _tsm = null;
|
|
27
|
+
const tsMorph = () => (_tsm ??= _require("ts-morph"));
|
|
21
28
|
|
|
22
29
|
const MAP = ".claude/agentmap.json";
|
|
23
30
|
const SCHEMA_VERSION = 2;
|
|
@@ -177,6 +184,7 @@ function identMul(ident, defineCount, mentioned) {
|
|
|
177
184
|
// else (missing / malformed / solution-style references that index 0 files) fall
|
|
178
185
|
// back to broad source globs so the tool degrades gracefully instead of crashing.
|
|
179
186
|
function makeProject() {
|
|
187
|
+
const { Project } = tsMorph();
|
|
180
188
|
// skipFileDependencyResolution: ~40% faster build, verified identical edge
|
|
181
189
|
// set (we resolve module specifiers explicitly below, never via the implicit
|
|
182
190
|
// dependency graph). allowJs so .js/.jsx are parsed.
|
|
@@ -248,6 +256,8 @@ function makeProject() {
|
|
|
248
256
|
function build() {
|
|
249
257
|
const t0 = Date.now();
|
|
250
258
|
const project = makeProject();
|
|
259
|
+
const { SyntaxKind } = tsMorph();
|
|
260
|
+
const CallExpression = SyntaxKind.CallExpression;
|
|
251
261
|
const cwd = process.cwd().replace(/\\/g, "/");
|
|
252
262
|
const rel = (p) => p.replace(cwd + "/", "");
|
|
253
263
|
const files = {}, dependents = {}, features = {};
|
|
@@ -534,14 +544,13 @@ function fileBlock(key, f) {
|
|
|
534
544
|
|
|
535
545
|
// ---------------------------------------------------------------------------
|
|
536
546
|
// --install-hooks: copy the package post-commit hook into .git/hooks, ensure
|
|
537
|
-
// .claude/agentmap.json is gitignored, and
|
|
538
|
-
//
|
|
539
|
-
//
|
|
540
|
-
//
|
|
547
|
+
// .claude/agentmap.json is gitignored, and auto-wire the Claude Code
|
|
548
|
+
// PreToolUse(Grep) nudge into the project's .claude/settings.json so map
|
|
549
|
+
// enforcement is ON by default (no manual copy-paste). Merge-safe + idempotent.
|
|
550
|
+
// Throws on any failure so the caller can stderr+exit 1.
|
|
541
551
|
// ---------------------------------------------------------------------------
|
|
542
552
|
function installHooks() {
|
|
543
553
|
const src = new URL("./hooks/post-commit", import.meta.url);
|
|
544
|
-
const nudge = new URL("./hooks/agentmap-nudge.mjs", import.meta.url);
|
|
545
554
|
// The package hooks/ dir must ship alongside agentmap.mjs.
|
|
546
555
|
if (!existsSync(src)) throw new Error(`packaged hook not found at ${src.pathname} (is the hooks/ dir present?)`);
|
|
547
556
|
|
|
@@ -565,14 +574,36 @@ function installHooks() {
|
|
|
565
574
|
writeFileSync(".gitignore", IGNORE_LINE + "\n");
|
|
566
575
|
}
|
|
567
576
|
|
|
568
|
-
//
|
|
569
|
-
//
|
|
577
|
+
// Auto-wire the PreToolUse(Grep) enforcement nudge into the PROJECT settings
|
|
578
|
+
// (.claude/settings.json) so "the agent is forced to use the map" is ON by
|
|
579
|
+
// default — not a manual paste. Merge-safe + idempotent: preserves any
|
|
580
|
+
// existing settings/hooks, never duplicates our entry. Uses a project-relative
|
|
581
|
+
// command so a committed settings.json stays portable across machines.
|
|
582
|
+
const NUDGE_CMD = "node node_modules/@raymondchins/agentmap/hooks/agentmap-nudge.mjs";
|
|
583
|
+
const settingsPath = ".claude/settings.json";
|
|
584
|
+
let settings = {};
|
|
585
|
+
if (existsSync(settingsPath)) {
|
|
586
|
+
try { settings = JSON.parse(readFileSync(settingsPath, "utf8")) || {}; }
|
|
587
|
+
catch { throw new Error(`${settingsPath} is not valid JSON — fix or remove it, then re-run --install-hooks`); }
|
|
588
|
+
}
|
|
589
|
+
settings.hooks ??= {};
|
|
590
|
+
settings.hooks.PreToolUse ??= [];
|
|
591
|
+
const alreadyWired = settings.hooks.PreToolUse.some(
|
|
592
|
+
(e) => Array.isArray(e?.hooks) && e.hooks.some((h) => typeof h?.command === "string" && h.command.includes("agentmap-nudge")),
|
|
593
|
+
);
|
|
594
|
+
if (!alreadyWired) {
|
|
595
|
+
settings.hooks.PreToolUse.push({ matcher: "Grep", hooks: [{ type: "command", command: NUDGE_CMD }] });
|
|
596
|
+
mkdirSync(".claude", { recursive: true });
|
|
597
|
+
writeFileSync(settingsPath, JSON.stringify(settings, null, 2) + "\n");
|
|
598
|
+
}
|
|
599
|
+
|
|
600
|
+
// Success report.
|
|
570
601
|
console.log(`installed post-commit hook → ${dest}`);
|
|
571
602
|
console.log(ignoredAlready ? `.gitignore already has ${IGNORE_LINE}` : `added ${IGNORE_LINE} to .gitignore`);
|
|
572
|
-
console.log(
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
603
|
+
console.log(alreadyWired
|
|
604
|
+
? `${settingsPath} already wires the PreToolUse(Grep) → agentmap nudge — left as-is`
|
|
605
|
+
: `wired PreToolUse(Grep) → agentmap nudge into ${settingsPath} (map enforcement on by default)`);
|
|
606
|
+
console.log("\nDone — the map auto-refreshes on commit, and greps are nudged to agentmap first.");
|
|
576
607
|
}
|
|
577
608
|
|
|
578
609
|
// ---------------------------------------------------------------------------
|
package/hooks/INSTALL.md
CHANGED
|
@@ -121,8 +121,10 @@ agentmap --install-hooks
|
|
|
121
121
|
```
|
|
122
122
|
|
|
123
123
|
This copies `hooks/post-commit` to `.git/hooks/post-commit`, chmods it, ensures
|
|
124
|
-
`.claude/agentmap.json` is in `.gitignore`, and
|
|
125
|
-
`settings.json`
|
|
124
|
+
`.claude/agentmap.json` is in `.gitignore`, and auto-wires the Claude Code
|
|
125
|
+
`PreToolUse(Grep)` nudge into `.claude/settings.json` (merge-safe — preserves
|
|
126
|
+
existing settings, idempotent on re-run) — enforcement on by default, all in one
|
|
127
|
+
step. No manual paste needed.
|
|
126
128
|
|
|
127
129
|
**Manual alternative:**
|
|
128
130
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@raymondchins/agentmap",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.2",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -14,12 +14,11 @@
|
|
|
14
14
|
"agentmap.mjs",
|
|
15
15
|
"mcp.mjs",
|
|
16
16
|
"hooks",
|
|
17
|
-
"LICENSE-APACHE",
|
|
18
17
|
"NOTICE"
|
|
19
18
|
],
|
|
20
19
|
"scripts": {
|
|
21
20
|
"map": "node agentmap.mjs",
|
|
22
|
-
"test": "node --test test
|
|
21
|
+
"test": "node --test test/*.test.mjs"
|
|
23
22
|
},
|
|
24
23
|
"engines": {
|
|
25
24
|
"node": ">=18"
|
package/LICENSE-APACHE
DELETED
|
@@ -1,194 +0,0 @@
|
|
|
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 made available under
|
|
36
|
-
the License, as indicated by a copyright notice that is included in
|
|
37
|
-
or attached to the work (an example is provided in the Appendix below).
|
|
38
|
-
|
|
39
|
-
"Derivative Works" shall mean any work, whether in Source or Object
|
|
40
|
-
form, that is based on (or derived from) the Work and for which the
|
|
41
|
-
editorial revisions, annotations, elaborations, or other modifications
|
|
42
|
-
represent, as a whole, an original work of authorship. For the purposes
|
|
43
|
-
of this License, Derivative Works shall not include works that remain
|
|
44
|
-
separable from, or merely link (or bind by name) to the interfaces of,
|
|
45
|
-
the Work and Derivative Works thereof.
|
|
46
|
-
|
|
47
|
-
"Contribution" shall mean, as submitted to the Licensor for inclusion
|
|
48
|
-
in the Work by the copyright owner or by an individual or Legal Entity
|
|
49
|
-
authorized to submit on behalf of the copyright owner. For the purposes
|
|
50
|
-
of this definition, "submitted" means any form of electronic, verbal,
|
|
51
|
-
or written communication sent to the Licensor or its representatives,
|
|
52
|
-
including but not limited to communication on electronic mailing lists,
|
|
53
|
-
source code control systems, and issue tracking systems that are managed
|
|
54
|
-
by, or on behalf of, the Licensor for the purpose of discussing and
|
|
55
|
-
improving the Work, but excluding communication that is conspicuously
|
|
56
|
-
marked or designated in writing by the copyright owner as "Not a
|
|
57
|
-
Contribution."
|
|
58
|
-
|
|
59
|
-
"Contributor" shall mean Licensor and any Legal Entity on behalf of
|
|
60
|
-
whom a Contribution has been received by the Licensor and included
|
|
61
|
-
within the Work.
|
|
62
|
-
|
|
63
|
-
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
64
|
-
this License, each Contributor hereby grants to You a perpetual,
|
|
65
|
-
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
66
|
-
copyright license to reproduce, prepare Derivative Works of,
|
|
67
|
-
publicly display, publicly perform, sublicense, and distribute the
|
|
68
|
-
Work and such Derivative Works in Source or Object form.
|
|
69
|
-
|
|
70
|
-
3. Grant of Patent License. Subject to the terms and conditions of
|
|
71
|
-
this License, each Contributor hereby grants to You a perpetual,
|
|
72
|
-
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
73
|
-
(except as stated in this section) patent license to make, have made,
|
|
74
|
-
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
75
|
-
where such license applies only to those patent claims licensable
|
|
76
|
-
by such Contributor that are necessarily infringed by their
|
|
77
|
-
Contribution(s) alone or by the combination of their Contribution(s)
|
|
78
|
-
with the Work to which such Contribution(s) was submitted. If You
|
|
79
|
-
institute patent litigation against any entity (including a cross-claim
|
|
80
|
-
or counterclaim in a lawsuit) alleging that the Work or any
|
|
81
|
-
Contribution embodied within the Work constitutes direct or contributory
|
|
82
|
-
patent infringement, then any patent licenses granted to You under
|
|
83
|
-
this License for that Work shall terminate as of the date such
|
|
84
|
-
litigation is filed.
|
|
85
|
-
|
|
86
|
-
4. Redistribution. You may reproduce and distribute copies of the
|
|
87
|
-
Work or Derivative Works thereof in any medium, with or without
|
|
88
|
-
modifications, and in Source or Object form, provided that You
|
|
89
|
-
meet the following conditions:
|
|
90
|
-
|
|
91
|
-
(a) You must give any other recipients of the Work or Derivative Works
|
|
92
|
-
a copy of this License; and
|
|
93
|
-
|
|
94
|
-
(b) You must cause any modified files to carry prominent notices
|
|
95
|
-
stating that You changed the files; and
|
|
96
|
-
|
|
97
|
-
(c) You must retain, in the Source form of any Derivative Works
|
|
98
|
-
that You distribute, all copyright, patent, trademark, and
|
|
99
|
-
attribution notices from the Source form of the Work,
|
|
100
|
-
excluding those notices that do not pertain to any part of
|
|
101
|
-
the Derivative Works; and
|
|
102
|
-
|
|
103
|
-
(d) If the Work includes a "NOTICE" text file as part of its
|
|
104
|
-
distribution, You must include a readable copy of the attribution
|
|
105
|
-
notices contained within such NOTICE file, in at least one
|
|
106
|
-
of the following places: within a NOTICE text file distributed
|
|
107
|
-
as part of the Derivative Works; within the Source form or
|
|
108
|
-
documentation, if provided along with the Derivative Works; or,
|
|
109
|
-
within a display generated by the Derivative Works, if and
|
|
110
|
-
wherever such third-party notices normally appear. The contents
|
|
111
|
-
of the NOTICE file are for informational purposes only and
|
|
112
|
-
do not modify the License. You may add Your own attribution
|
|
113
|
-
notices within Derivative Works that You distribute, alongside
|
|
114
|
-
or as an addendum to the NOTICE text from the Work, provided
|
|
115
|
-
that such additional attribution notices cannot be construed
|
|
116
|
-
as modifying the License.
|
|
117
|
-
|
|
118
|
-
You may add Your own license statement for Your modifications and
|
|
119
|
-
may provide additional grant of rights to use, reproduce, modify,
|
|
120
|
-
prepare Derivative Works of, convert to other media types, publicly
|
|
121
|
-
display, publicly perform, sublicense, and distribute such modifications
|
|
122
|
-
and Derivative Works as a whole, provided Your use, reproduction,
|
|
123
|
-
and distribution of the Work otherwise complies with the conditions
|
|
124
|
-
stated in this License.
|
|
125
|
-
|
|
126
|
-
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
127
|
-
any Contribution intentionally submitted for inclusion in the Work
|
|
128
|
-
by You to the Licensor shall be under the terms and conditions of
|
|
129
|
-
this License, without any additional terms or conditions.
|
|
130
|
-
Notwithstanding the above, nothing herein shall supersede or modify
|
|
131
|
-
the terms of any separate license agreement you may have executed
|
|
132
|
-
with Licensor regarding such Contributions.
|
|
133
|
-
|
|
134
|
-
6. Trademarks. This License does not grant permission to use the trade
|
|
135
|
-
names, trademarks, service marks, or product names of the Licensor,
|
|
136
|
-
except as required for reasonable and customary use in describing the
|
|
137
|
-
origin of the Work and reproducing the content of the NOTICE file.
|
|
138
|
-
|
|
139
|
-
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
140
|
-
agreed to in writing, Licensor provides the Work (and each
|
|
141
|
-
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
142
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
143
|
-
implied, including, without limitation, any warranties or conditions
|
|
144
|
-
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
145
|
-
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
146
|
-
appropriateness of using or reproducing the Work and assume any
|
|
147
|
-
risks associated with Your exercise of permissions under this License.
|
|
148
|
-
|
|
149
|
-
8. Limitation of Liability. In no event and under no legal theory,
|
|
150
|
-
whether in tort (including negligence), contract, or otherwise,
|
|
151
|
-
unless required by applicable law (such as deliberate and grossly
|
|
152
|
-
negligent acts) or agreed to in writing, shall any Contributor be
|
|
153
|
-
liable to You for damages, including any direct, indirect, special,
|
|
154
|
-
incidental, or exemplary damages of any character arising as a
|
|
155
|
-
result of this License or out of the use or inability to use the
|
|
156
|
-
Work (including but not limited to damages for loss of goodwill,
|
|
157
|
-
work stoppage, computer failure or malfunction, or all other
|
|
158
|
-
commercial damages or losses), even if such Contributor has been
|
|
159
|
-
advised of the possibility of such damages.
|
|
160
|
-
|
|
161
|
-
9. Accepting Warranty or Additional Liability. While redistributing
|
|
162
|
-
the Work or Derivative Works thereof, You may choose to offer,
|
|
163
|
-
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
164
|
-
or other liability obligations and/or rights consistent with this
|
|
165
|
-
License. However, in accepting such obligations, You may offer only
|
|
166
|
-
conditions consistent with this License, provided that You also
|
|
167
|
-
comply with the terms of this License, and, if applicable, offer
|
|
168
|
-
insurance and/or a fee for each obligation of benefit to the
|
|
169
|
-
Derivative Works.
|
|
170
|
-
|
|
171
|
-
END OF TERMS AND CONDITIONS
|
|
172
|
-
|
|
173
|
-
APPENDIX: How to apply the Apache License to your work.
|
|
174
|
-
|
|
175
|
-
To apply the Apache License to your work, attach the following
|
|
176
|
-
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
177
|
-
replaced with your own identifying information. (Don't include
|
|
178
|
-
the brackets!) The text should be enclosed in the appropriate
|
|
179
|
-
comment syntax for the file format in question. It may also be
|
|
180
|
-
printed or read aloud for identification purposes.
|
|
181
|
-
|
|
182
|
-
Copyright [yyyy] [name of copyright owner]
|
|
183
|
-
|
|
184
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
|
185
|
-
you may not use this file except in compliance with the License.
|
|
186
|
-
You may obtain a copy of the License at
|
|
187
|
-
|
|
188
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
|
189
|
-
|
|
190
|
-
Unless required by applicable law or agreed to in writing, software
|
|
191
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
|
192
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
193
|
-
See the License for the specific language governing permissions and
|
|
194
|
-
limitations under the License.
|