@agentstrack/collector 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +168 -0
- package/LICENSE +202 -0
- package/README.md +779 -0
- package/dist/adapters/account.d.ts +22 -0
- package/dist/adapters/account.js +142 -0
- package/dist/adapters/account.js.map +1 -0
- package/dist/adapters/claude.d.ts +49 -0
- package/dist/adapters/claude.js +259 -0
- package/dist/adapters/claude.js.map +1 -0
- package/dist/adapters/codex.d.ts +64 -0
- package/dist/adapters/codex.js +350 -0
- package/dist/adapters/codex.js.map +1 -0
- package/dist/adapters/opencode.d.ts +79 -0
- package/dist/adapters/opencode.js +338 -0
- package/dist/adapters/opencode.js.map +1 -0
- package/dist/adapters/types.d.ts +97 -0
- package/dist/adapters/types.js +20 -0
- package/dist/adapters/types.js.map +1 -0
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +450 -0
- package/dist/cli.js.map +1 -0
- package/dist/commands/service.d.ts +3 -0
- package/dist/commands/service.js +86 -0
- package/dist/commands/service.js.map +1 -0
- package/dist/config.d.ts +67 -0
- package/dist/config.js +97 -0
- package/dist/config.js.map +1 -0
- package/dist/daemon.d.ts +57 -0
- package/dist/daemon.js +368 -0
- package/dist/daemon.js.map +1 -0
- package/dist/git/commits.d.ts +34 -0
- package/dist/git/commits.js +85 -0
- package/dist/git/commits.js.map +1 -0
- package/dist/git/repo.d.ts +36 -0
- package/dist/git/repo.js +141 -0
- package/dist/git/repo.js.map +1 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.js +12 -0
- package/dist/index.js.map +1 -0
- package/dist/privacy/mode.d.ts +11 -0
- package/dist/privacy/mode.js +17 -0
- package/dist/privacy/mode.js.map +1 -0
- package/dist/privacy/paths.d.ts +11 -0
- package/dist/privacy/paths.js +30 -0
- package/dist/privacy/paths.js.map +1 -0
- package/dist/privacy/pipeline.d.ts +26 -0
- package/dist/privacy/pipeline.js +112 -0
- package/dist/privacy/pipeline.js.map +1 -0
- package/dist/privacy/redact.d.ts +29 -0
- package/dist/privacy/redact.js +58 -0
- package/dist/privacy/redact.js.map +1 -0
- package/dist/queue/spool.d.ts +47 -0
- package/dist/queue/spool.js +152 -0
- package/dist/queue/spool.js.map +1 -0
- package/dist/queue/tailer.d.ts +25 -0
- package/dist/queue/tailer.js +48 -0
- package/dist/queue/tailer.js.map +1 -0
- package/dist/schema.d.ts +76 -0
- package/dist/schema.js +46 -0
- package/dist/schema.js.map +1 -0
- package/dist/sessions/title.d.ts +2 -0
- package/dist/sessions/title.js +11 -0
- package/dist/sessions/title.js.map +1 -0
- package/dist/transport/client.d.ts +76 -0
- package/dist/transport/client.js +80 -0
- package/dist/transport/client.js.map +1 -0
- package/package.json +42 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project are documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
A change to the event envelope or to the config file shape is a **breaking change** and will be
|
|
9
|
+
released as a major version, with a migration note in this file.
|
|
10
|
+
|
|
11
|
+
## [Unreleased]
|
|
12
|
+
|
|
13
|
+
### Added
|
|
14
|
+
- **OpenCode adapter.** Reads `~/.local/share/opencode/opencode.db` (honouring `$XDG_DATA_HOME`,
|
|
15
|
+
`$OPENCODE_DATA_DIR` and `$OPENCODE_DB`) and emits `session.started`, `session.ended`, cumulative
|
|
16
|
+
`usage.reported`, `user.prompted`, `tool.completed` / `tool.failed`, `command.executed`,
|
|
17
|
+
`file.changed` and `file.read`. OpenCode records the provider's real settled cost, so it is the
|
|
18
|
+
first agent whose sessions carry `cost_basis: REPORTED` rather than an estimate.
|
|
19
|
+
|
|
20
|
+
This is a live database the OpenCode app writes to, so it is opened `readonly` + `fileMustExist`
|
|
21
|
+
with `PRAGMA query_only` and a `busy_timeout`, one short query at a time. The collector never
|
|
22
|
+
writes to, migrates or locks a user's data.
|
|
23
|
+
- **`AgentAdapter.poll()`**, an optional pull-based source for database-backed agents. `normalize()`
|
|
24
|
+
is line-oriented and a SQLite file has no lines; rather than pretend otherwise, the daemon drives
|
|
25
|
+
`poll()` on the same scan cycle, under the same `tracking.agents` gating, the same
|
|
26
|
+
`excluded_projects` filter and the same privacy pipeline. Resumption uses the spool's meta store —
|
|
27
|
+
the tailer's `(path, inode, offset)` checkpoint means nothing to a database.
|
|
28
|
+
- **Per-account attribution.** `session.started` and `user.prompted` now carry an optional `account`
|
|
29
|
+
object: a stable opaque `key` (Claude Code's `oauthAccount.accountUuid`; OpenCode's
|
|
30
|
+
`<serviceID>:<accountId>`), plus `label`, `org` and `provider`. Sessions from a personal login and
|
|
31
|
+
a work login no longer merge into one identity and one bill.
|
|
32
|
+
|
|
33
|
+
`label` and `org` are PII and are stripped by the privacy pipeline in `metadata` mode; `key` and
|
|
34
|
+
`provider` always travel, so sessions still split correctly there. Credentials are never read:
|
|
35
|
+
OpenCode's `account.json` holds a live API key beside the account id and only `id`/`serviceID` are
|
|
36
|
+
touched, while `auth.json` is never opened.
|
|
37
|
+
|
|
38
|
+
Events that predate the collector's start carry **no** account. These files record only who is
|
|
39
|
+
signed in now, so a historical transcript cannot be attributed without guessing, and a guess that
|
|
40
|
+
looks like a fact is worse than a blank.
|
|
41
|
+
- `SUPPORT.md`, `ROADMAP.md`, `GOVERNANCE.md`, `CODEOWNERS`, `.editorconfig`, `.gitattributes`,
|
|
42
|
+
`.nvmrc`, Dependabot config and a CodeQL workflow.
|
|
43
|
+
|
|
44
|
+
### Fixed
|
|
45
|
+
- **`session.started.cwd` is no longer sent as an absolute path** regardless of
|
|
46
|
+
`privacy.file_paths`. `cwd` *is* the project root, and it leaked the username, the client name and
|
|
47
|
+
the directory tree even in `metadata` mode — where `repo.project_path` was already being dropped.
|
|
48
|
+
It now follows the same rule: sent only under `file_paths: absolute`. Affected the Codex adapter
|
|
49
|
+
since 0.1.0.
|
|
50
|
+
|
|
51
|
+
### Changed
|
|
52
|
+
- `tracking.agents` defaults to `[claude_code, codex, opencode]`.
|
|
53
|
+
- **`privacy.prompts: never` now strips the locally derived `derived_title` in `analytics` mode**, so
|
|
54
|
+
it is possible to keep token, tool and cost analytics while sending nothing derived from a prompt.
|
|
55
|
+
Previously the setting was consulted only in `full` mode, which made `never` and
|
|
56
|
+
`local_summary_only` behave identically everywhere else — a privacy control that silently did
|
|
57
|
+
nothing. `never` now applies in every mode, `full` included.
|
|
58
|
+
- **Agent versions in the registration payload are real.** `ClaudeCodeAdapter.detect()` reads the
|
|
59
|
+
`version` field out of a transcript (e.g. `2.1.247`) instead of reporting the literal string
|
|
60
|
+
`'detected'`. An adapter that cannot cheaply establish a version reports none, rather than a
|
|
61
|
+
placeholder — which today is the case for Codex, whose `detect()` does not open a rollout to read
|
|
62
|
+
`session_meta.cli_version`.
|
|
63
|
+
- `~/.agentstrack/` is created mode `700`, and `spool.db` with its `-wal` / `-shm` sidecars is
|
|
64
|
+
`chmod`ed `600`. Previously only `config.yaml` was hardened, so on a shared host another user could
|
|
65
|
+
read spooled telemetry.
|
|
66
|
+
- The schema contract test resolves the server repository from a sibling `../agentstrack.ai` checkout
|
|
67
|
+
or `AGENTSTRACK_SERVER_REPO`, instead of an absolute path to one maintainer's machine. It still
|
|
68
|
+
skips cleanly when the server repo is absent.
|
|
69
|
+
|
|
70
|
+
### Fixed
|
|
71
|
+
- **A partial trailing line is no longer consumed.** The tailer advances its checkpoint only to the
|
|
72
|
+
last complete newline and re-reads an unterminated line whole on the next pass. Previously a line
|
|
73
|
+
the agent was mid-way through writing was emitted broken and its remainder arrived orphaned, so
|
|
74
|
+
both halves failed to parse and the event was lost — which happened on every live session.
|
|
75
|
+
- **A failed batch can no longer delete unrelated queued events.** `Spool.fail()` now scopes its
|
|
76
|
+
retry-exhaustion delete to the event ids in the failing batch; it previously deleted table-wide on
|
|
77
|
+
`attempts`, so one batch exhausting its retries could destroy events it had never touched.
|
|
78
|
+
- **`upload.max_retries: 0` no longer empties the spool.** The value is clamped to a minimum of 1.
|
|
79
|
+
`attempts >= 0` matched every row, including never-attempted ones, so a config of `0` wiped the
|
|
80
|
+
whole queue on the first upload failure. The config still accepts `0`–`20`; `0` behaves as `1`.
|
|
81
|
+
|
|
82
|
+
## [0.1.0] - 2026-08-26
|
|
83
|
+
|
|
84
|
+
Initial release.
|
|
85
|
+
|
|
86
|
+
### Added
|
|
87
|
+
|
|
88
|
+
- **Log tailing, not hooks.** Reads `~/.claude/projects/<slug>/<session-uuid>.jsonl` and
|
|
89
|
+
`~/.codex/sessions/YYYY/MM/DD/rollout-<ts>-<uuid>.jsonl` read-only, rescanning every 5 seconds for
|
|
90
|
+
`*.jsonl` files modified in the last 7 days. The collector never installs hooks and never modifies
|
|
91
|
+
`~/.claude/settings.json` or `~/.codex/hooks.json`. `CLAUDE_CONFIG_DIR` and `CODEX_HOME` are
|
|
92
|
+
honoured.
|
|
93
|
+
- **Claude Code adapter** — human prompts (separated from tool results), `model.response` with the
|
|
94
|
+
full token breakdown, tool calls, `Bash` commands, and `Edit` / `Write` / `NotebookEdit` /
|
|
95
|
+
`Read` file activity. Line counts for an edit are computed locally from the tool input, as a
|
|
96
|
+
multiset difference, matching what `git diff --numstat` reports.
|
|
97
|
+
- **Codex adapter** — `session.started` and turn boundaries, cumulative `usage.reported` snapshots,
|
|
98
|
+
user messages, commands with exit code and duration, agent errors, `function_call` and
|
|
99
|
+
`custom_tool_call` tool calls, and file activity parsed out of the `apply_patch` body or inferred
|
|
100
|
+
narrowly from shell redirects and pager commands.
|
|
101
|
+
- **Schema v1 envelope** shared with the server, with a contract test in `npm test`. It always asserts
|
|
102
|
+
the 18 event types and that the envelope carries no tenancy fields; the field-by-field comparison
|
|
103
|
+
against the server's canonical `EVENT_SCHEMA.json` runs only when the server repository is checked
|
|
104
|
+
out alongside this one, and is skipped otherwise. This release emits 14 of the schema's 18 event
|
|
105
|
+
types.
|
|
106
|
+
- **Three privacy modes**, enforced locally before the spool write: `metadata` (counts and timings;
|
|
107
|
+
titles and messages stripped), `analytics` (adds locally derived session titles — the default), and
|
|
108
|
+
`full` (which still requires `privacy.prompts: full` before any prompt text is uploaded).
|
|
109
|
+
- **Built-in secret redaction**, 15 patterns covering Anthropic, OpenAI, GitHub, Slack, Stripe, AWS
|
|
110
|
+
and Google credentials, private key blocks, JWTs, bearer headers, credentials in URLs,
|
|
111
|
+
secret-shaped environment assignments, and long hex strings. Organization patterns are fetched
|
|
112
|
+
from the server and applied alongside them; a malformed org pattern is skipped, not fatal.
|
|
113
|
+
- **Path privacy** — `never`, `relative` (default: relative to the project root, `~` for home, last
|
|
114
|
+
two segments for anything else) and `absolute` (opt-in). The project root itself is transmitted
|
|
115
|
+
only under `absolute`; repositories correlate by a SHA-256 of the normalized remote URL.
|
|
116
|
+
- **Project exclusion** by prefix via `privacy.excluded_projects`; an excluded project emits no
|
|
117
|
+
events at all.
|
|
118
|
+
- **Offline-first SQLite spool** (WAL) at `~/.agentstrack/spool.db`, holding both the queue and the
|
|
119
|
+
per-file `(path, inode, offset)` read checkpoints — so a restart resumes mid-file, a replaced or
|
|
120
|
+
truncated file is re-read from the start, and nothing is lost to a network outage.
|
|
121
|
+
- **Batched gzip upload** — `upload.batch_size` events (default 100) every `upload.interval_seconds`
|
|
122
|
+
(default 30), gzipped above 1 KB, idempotent on `event_id`. A `413` halves the batch size and
|
|
123
|
+
recovers on success; retryable failures back off exponentially with jitter, capped at 5 minutes.
|
|
124
|
+
- **Normalized token accounting** across both agents — `input_tokens`, `cached_input_tokens`,
|
|
125
|
+
`cache_creation_input_tokens`, `output_tokens`, `reasoning_output_tokens`, with reasoning treated
|
|
126
|
+
as a subset of output rather than added on top.
|
|
127
|
+
- **Git enrichment** — branch and project root read straight out of `.git`, plus `git.commit` events
|
|
128
|
+
with SHA and diffstat for commits landing inside a session's window. The remote URL is never sent,
|
|
129
|
+
only a SHA-256 of its normalized form, so ssh and https clones of one repo correlate.
|
|
130
|
+
- **CLI**: `login`, `logout`, `start`, `stop`, `status`, `doctor`, `config`, `sync`, and
|
|
131
|
+
`service install | uninstall`. Background service via launchd (macOS) or a systemd user unit
|
|
132
|
+
(Linux); neither needs root.
|
|
133
|
+
- **`agentstrack sync --dry-run --print`** to see the exact post-redaction JSON that would be
|
|
134
|
+
uploaded, and **`agentstrack config --show-effective`** to see the policy actually in force.
|
|
135
|
+
- **`agentstrack doctor --json`** structured diagnostics, containing no API key and no payloads —
|
|
136
|
+
safe to paste into a bug report.
|
|
137
|
+
- **`AGENTSTRACK_HOME`** to relocate all local state (config, spool, log, pidfile).
|
|
138
|
+
- Config at `~/.agentstrack/config.yaml`, written mode `600`. An invalid config is a hard error
|
|
139
|
+
rather than a silent fallback to defaults, so a typo cannot quietly widen your privacy mode.
|
|
140
|
+
|
|
141
|
+
### Security
|
|
142
|
+
|
|
143
|
+
- `organization_id` and `user_id` are absent from the event envelope by design; the server derives
|
|
144
|
+
both from the API key, so a collector cannot name its own tenant.
|
|
145
|
+
- The organization privacy policy acts as a ceiling: a local config may be stricter, never looser.
|
|
146
|
+
Both `login` and the daemon clamp through one shared function.
|
|
147
|
+
- The collector log records counts, queue depths and event ids — never prompts, code content, or
|
|
148
|
+
API keys.
|
|
149
|
+
|
|
150
|
+
### Known limitations
|
|
151
|
+
|
|
152
|
+
As released. Several of these have since been fixed — see `## Unreleased` above, and
|
|
153
|
+
[ROADMAP.md](./ROADMAP.md) for what is still outstanding.
|
|
154
|
+
|
|
155
|
+
- `tracking.idle_timeout_seconds` and `tracking.process_metrics` are accepted and validated but not
|
|
156
|
+
yet used by the collector; time accounting is derived server-side from the event stream.
|
|
157
|
+
- `privacy.shell_arguments: full` behaves the same as `redact_secrets` — secret redaction is applied
|
|
158
|
+
to commands unconditionally.
|
|
159
|
+
- `session.ended`, `heartbeat`, `model.request` and `git.branch_changed` exist in the schema but no
|
|
160
|
+
adapter emits them yet, and no adapter populates `task_category`.
|
|
161
|
+
- The backfill window is fixed at 7 days and is not configurable.
|
|
162
|
+
- `event_id` is generated per enqueue rather than derived from content, so re-reading a truncated
|
|
163
|
+
transcript would produce duplicate events server-side. Retrying a batch is unaffected.
|
|
164
|
+
- The service installer supports launchd and systemd only. `agentstrack start --foreground` works
|
|
165
|
+
anywhere Node 20+ does.
|
|
166
|
+
|
|
167
|
+
[Unreleased]: https://github.com/agentstrack/collector/compare/v0.1.0...HEAD
|
|
168
|
+
[0.1.0]: https://github.com/agentstrack/collector/releases/tag/v0.1.0
|
package/LICENSE
ADDED
|
@@ -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.
|