divan-cli 0.2.0__py3-none-any.whl
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.
- divan/SKILL.md +12 -0
- divan/__init__.py +1 -0
- divan/__main__.py +3 -0
- divan/agent.py +281 -0
- divan/check.py +182 -0
- divan/cli.py +415 -0
- divan/config.py +278 -0
- divan/doc.py +90 -0
- divan/hooks.py +475 -0
- divan/index.py +229 -0
- divan/join.py +213 -0
- divan/land.py +271 -0
- divan/privdir.py +53 -0
- divan/safe.py +27 -0
- divan/settings.py +123 -0
- divan/tomledit.py +97 -0
- divan/write.py +72 -0
- divan_cli-0.2.0.dist-info/METADATA +202 -0
- divan_cli-0.2.0.dist-info/RECORD +22 -0
- divan_cli-0.2.0.dist-info/WHEEL +4 -0
- divan_cli-0.2.0.dist-info/entry_points.txt +2 -0
- divan_cli-0.2.0.dist-info/licenses/LICENSE +202 -0
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: divan-cli
|
|
3
|
+
Version: 0.2.0
|
|
4
|
+
Summary: Search and write several markdown knowledge-base repos from one command.
|
|
5
|
+
Project-URL: Homepage, https://github.com/tnunamak/divan
|
|
6
|
+
Project-URL: Issues, https://github.com/tnunamak/divan/issues
|
|
7
|
+
Project-URL: Changelog, https://github.com/tnunamak/divan/blob/main/CHANGELOG.md
|
|
8
|
+
Author: Tim Nunamaker
|
|
9
|
+
License-Expression: Apache-2.0
|
|
10
|
+
License-File: LICENSE
|
|
11
|
+
Keywords: agents,cli,fts5,knowledge-base,markdown,search,sqlite
|
|
12
|
+
Classifier: Development Status :: 4 - Beta
|
|
13
|
+
Classifier: Environment :: Console
|
|
14
|
+
Classifier: Intended Audience :: Developers
|
|
15
|
+
Classifier: Operating System :: POSIX
|
|
16
|
+
Classifier: Programming Language :: Python :: 3
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
20
|
+
Classifier: Topic :: Text Processing :: Indexing
|
|
21
|
+
Classifier: Topic :: Utilities
|
|
22
|
+
Requires-Python: >=3.11
|
|
23
|
+
Requires-Dist: pyyaml>=6
|
|
24
|
+
Description-Content-Type: text/markdown
|
|
25
|
+
|
|
26
|
+
# divan
|
|
27
|
+
|
|
28
|
+
Search and write several markdown knowledge bases ("corpora") from one command. Each corpus is its own git repo; divan is only the tool. A repo works with zero config.
|
|
29
|
+
|
|
30
|
+
## Install
|
|
31
|
+
|
|
32
|
+
The PyPI package is `divan-cli`; the command is `divan`.
|
|
33
|
+
|
|
34
|
+
```
|
|
35
|
+
uv tool install divan-cli # or: pipx install divan-cli
|
|
36
|
+
uvx --from divan-cli divan --help # run once without installing
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
The installer sets up uv first if you lack it (it does not edit your shell rc files; it tells you how to add the folder to PATH). Download it, then run it. Add `--agents` to also run `divan agent setup -y`:
|
|
40
|
+
|
|
41
|
+
```
|
|
42
|
+
curl -fsSLo install.sh https://raw.githubusercontent.com/tnunamak/divan/main/install.sh && sh install.sh
|
|
43
|
+
sh install.sh --agents
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
The one-line pipe works too (`curl -fsSL https://raw.githubusercontent.com/tnunamak/divan/main/install.sh | sh`). The script is written so a download cut short fails to parse and runs nothing, but downloading first lets you read it and know the whole file arrived.
|
|
47
|
+
|
|
48
|
+
Homebrew:
|
|
49
|
+
|
|
50
|
+
```
|
|
51
|
+
brew install tnunamak/divan/divan
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## Quick start (one repo, no config)
|
|
55
|
+
|
|
56
|
+
```
|
|
57
|
+
divan find "retry backoff" --path ~/notes
|
|
58
|
+
divan check --path .
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
## Set up your agent
|
|
62
|
+
|
|
63
|
+
Three commands give your coding agent the habit of searching before it researches and saving what it learns:
|
|
64
|
+
|
|
65
|
+
```
|
|
66
|
+
uv tool install divan-cli # 1. install divan
|
|
67
|
+
divan join https://github.com/<owner>/<knowledge-repo> # 2. clone a knowledge base and register it
|
|
68
|
+
divan agent setup # 3. install the plugin into Claude Code, Codex and Antigravity
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
`divan join <git-url> [--path P] [--name N] [--author A]` clones the repo (to `~/divan/<name>` unless you pass `--path`), adds it to `~/.config/divan/config.toml` without reformatting your file, adds it to `[profiles.default]` if you have that profile, and sets `[vars] author` if you pass `--author` and have none. Only https and ssh addresses are accepted (`https://…`, `ssh://…`, `git@host:path`); a local path or `file://` address needs `--allow-local`, and the clone never runs git hooks from your system or global git config. Running it again changes nothing. To start your own knowledge base, `git init` a folder and register it by hand (see Config).
|
|
72
|
+
|
|
73
|
+
`divan agent setup` finds Claude Code, Codex and Antigravity and runs each one's own plugin commands, which you can also run yourself:
|
|
74
|
+
|
|
75
|
+
```
|
|
76
|
+
claude plugin marketplace add tnunamak/divan && claude plugin install divan@divan
|
|
77
|
+
codex plugin marketplace add tnunamak/divan && codex plugin add divan@divan
|
|
78
|
+
agy plugin install https://github.com/tnunamak/divan
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
Flags: `--status` (show what is installed), `--json` (print the plan, change nothing), `--client claude|codex|antigravity`, `-y` (do not ask), `--remove`. divan never edits an agent's settings files. **Codex keeps the divan hooks inactive until you approve them**: open `/hooks` in Codex and trust them. `divan agent setup` and `--status` say so. Claude Code and Antigravity have no such step. For other agents, `npx skills add tnunamak/divan -g` installs the skill alone.
|
|
82
|
+
|
|
83
|
+
The plugin brings the skill and five hooks (four in Antigravity, which has no pre-compaction event). The hooks call `divan hook <agent> <event>` and do nothing if `divan` is not on PATH:
|
|
84
|
+
|
|
85
|
+
- Session start: a short reminder to search first, save after, and the corpora you can see (`divan guide <corpus>` before writing).
|
|
86
|
+
- The first web search of a session is turned back once with "run `divan find` first"; every later call is allowed.
|
|
87
|
+
- After web research, a one-time reminder to save. If research happened and nothing was landed, the agent is asked once, before compaction and before stopping, to save it with `divan new` + `divan land` or say why nothing is durable.
|
|
88
|
+
|
|
89
|
+
Codex's built-in web search does not run hooks, so for Codex the check happens when the agent stops, not before the search. Antigravity's hooks can deny a tool call or keep the agent going at stop, but cannot add a note after a tool call, so it gets no after-research reminder.
|
|
90
|
+
|
|
91
|
+
### Customise or turn off
|
|
92
|
+
|
|
93
|
+
Every behaviour can be changed without editing code. Settings live in an `[agent]` table in `~/.config/divan/config.toml`; hooks read them on every call, so changes apply at once.
|
|
94
|
+
|
|
95
|
+
```
|
|
96
|
+
divan agent config # effective settings, and where each came from
|
|
97
|
+
divan agent set search_first remind # change one; the rest of your file is left as it is
|
|
98
|
+
DIVAN_AGENT=off claude # turn every hook off for one process
|
|
99
|
+
divan agent setup --remove # undo what setup added (a marketplace you already had stays)
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
| Setting | Values (default first) | What it does |
|
|
103
|
+
| --- | --- | --- |
|
|
104
|
+
| `enabled` | `true`, `false` | Master switch for every hook. |
|
|
105
|
+
| `session_note` | `true`, `false` | The short note at session start. |
|
|
106
|
+
| `search_first` | `"deny-once"`, `"remind"`, `"off"` | First web search before `divan find`: deny it once, only remind, or do nothing. |
|
|
107
|
+
| `capture_reminder` | `true`, `false` | Remind to save after the first web research. |
|
|
108
|
+
| `compact_reminder` | `true`, `false` | Before compaction, remind to save unsaved research. |
|
|
109
|
+
| `stop_gate` | `"block-once"`, `"remind"`, `"off"` | Unsaved research at stop: block once, only show a note, or do nothing. |
|
|
110
|
+
| `gate_headless` | `true`, `false` (default) | Also apply the stop gate in headless runs such as `claude -p` or an Agent SDK program, where the last message is a result a parent reads. Off by default; the other checks still run there. |
|
|
111
|
+
| `note_extra` | text or a file path | Appended to the session note, so a team or person can add their own rule. A relative path is read from the config's folder; at most 800 characters are used. |
|
|
112
|
+
|
|
113
|
+
To see exactly what an agent sends the hooks, set `DIVAN_HOOK_LOG=<dir>`: each call's raw stdin and output is saved there. **These files contain raw prompts and tool input, which can include secrets.** divan makes the folder `0700` and each file `0600`, writes nothing else there, and logs nothing if the folder already exists and is a symlink, is not yours, or has any group or other permission bits. Turn it on only while you capture, then delete the folder.
|
|
114
|
+
|
|
115
|
+
`DIVAN_AGENT=off` beats the config file. Every deny or block message ends with the one command that softens it, for example `To change this: divan agent set search_first remind (or off)`. With `stop_gate = "remind"`, Claude Code and Codex show you a note instead of blocking; Antigravity has no way to show one, so it behaves as `off`. An invalid value in the file is ignored (the default applies) and shown by `divan agent config`.
|
|
116
|
+
|
|
117
|
+
## Config
|
|
118
|
+
|
|
119
|
+
`~/.config/divan/config.toml` (override the path with `DIVAN_CONFIG`) names corpora and groups them into profiles. Pick a profile with `--profile`, then `DIVAN_PROFILE`, then `default`.
|
|
120
|
+
|
|
121
|
+
```toml
|
|
122
|
+
[corpora.notes]
|
|
123
|
+
path = "~/code/notes"
|
|
124
|
+
|
|
125
|
+
[corpora.team]
|
|
126
|
+
path = "~/code/team-knowledge"
|
|
127
|
+
remote = "git@github.com:acme/team-knowledge.git" # land refuses to push anywhere else
|
|
128
|
+
branch = "main" # optional; default: the remote's default branch
|
|
129
|
+
|
|
130
|
+
[profiles.default] # the owner: search everything, write private notes
|
|
131
|
+
corpora = ["notes", "team"]
|
|
132
|
+
write = "notes"
|
|
133
|
+
|
|
134
|
+
[profiles.team] # a team task: opens only the team corpus and its index
|
|
135
|
+
corpora = ["team"]
|
|
136
|
+
write = "team"
|
|
137
|
+
|
|
138
|
+
[check]
|
|
139
|
+
denylist_file = "~/.config/divan/denylist.txt" # one literal or regex per line; stays local
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
A profile opens only its own corpora's paths and index files (`~/.cache/divan/<corpus>.sqlite`, override the directory with `DIVAN_CACHE`). Labels are not the privacy boundary; the repo and the profile are.
|
|
143
|
+
|
|
144
|
+
### Per-corpus `divan.toml` (optional)
|
|
145
|
+
|
|
146
|
+
```toml
|
|
147
|
+
[corpus]
|
|
148
|
+
shared = true # turns on the strict leak checks in `divan check`
|
|
149
|
+
guide = "docs/WRITING.md" # what `divan guide` prints (default: AGENTS.md, CLAUDE.md, README.md)
|
|
150
|
+
exclude = ["INDEX*.md"] # files that are not entries
|
|
151
|
+
|
|
152
|
+
[[collections]]
|
|
153
|
+
name = "findings"
|
|
154
|
+
path = "findings/*/*.md" # glob or list of globs; first match wins
|
|
155
|
+
template = "templates/finding.md" # placeholders: {{title}} {{date}} {{slug}}
|
|
156
|
+
required = ["title", "status"]
|
|
157
|
+
severity = "error" # "warn" (default) or "error"
|
|
158
|
+
weight = 1.5 # search multiplier
|
|
159
|
+
filename = "{slug}.md" # what `divan new` calls the file (default shown)
|
|
160
|
+
dir = "{author}/{date}-{slug}" # folder pattern for `divan new`, from the corpus root
|
|
161
|
+
|
|
162
|
+
[[collections]]
|
|
163
|
+
name = "case-studies"
|
|
164
|
+
path = "case-studies/**"
|
|
165
|
+
search = false # only with --all or --collection
|
|
166
|
+
|
|
167
|
+
[check]
|
|
168
|
+
allow_emails = ["*@example.com"]
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
Undeclared files belong to no collection and stay searchable. Indexing skips only the corpus's own root docs (`README.md`, `AGENTS.md`, `CLAUDE.md`, `CONTRIBUTING.md`), the collections' `template` files and anything matching `[corpus] exclude`; a nested `README.md` is an entry like any other file.
|
|
172
|
+
|
|
173
|
+
`divan new` fills `{placeholders}` in `filename`, `dir` and the template (`{{name}}` there). Built in: `slug`, `date`, `title`. Add more with `--var key=value` or a `[vars]` table in the user config (for example `author = "alice"`). A missing placeholder is an error that names it. `--dir` replaces the collection's `dir` pattern. A folder-per-item corpus can say `dir = "{author}/{date}-{slug}"` with `filename = "TAKEAWAYS.md"`.
|
|
174
|
+
|
|
175
|
+
## Commands
|
|
176
|
+
|
|
177
|
+
- `divan find QUERY [--corpus C] [--collection X] [--all] [-n 8] [--json]` ranked search (SQLite FTS5, Porter stemming; title/tags/body weight 6/4/1). Results are grouped per corpus, never blended. Files one folder deep outrank deeper ones (x0.6), times the collection weight.
|
|
178
|
+
- `divan new --title T [--corpus C] [--collection X] [--dir SUB] [--var key=value]` create an entry; refuses to overwrite; prints the path.
|
|
179
|
+
- `divan land FILE... -m MSG` commit exactly those files on the fetched destination branch and push that commit; retry if the branch moves for other files; stop with a conflict if someone changed the same note since your copy. It refuses when the remote's fetch and push URLs differ, or when they differ from the corpus's `remote` in your config (on github.com, gitlab.com, bitbucket.org and codeberg.org the ssh and https forms of a repository match; on any other host the two addresses must be the same text apart from host case, a trailing slash, and an explicit default port (`notes` and `notes.git` differ there; on the four hosts `.git` is ignored), so `git@h:repo` and `ssh://git@h/repo` differ). It pushes to the corpus's `branch` if you set one, otherwise to the remote's default branch (read with `git ls-remote --symref`); your local upstream setting never picks the branch, and if the default branch cannot be read, land stops and asks you to set `branch`. It never touches your working files or local branch: afterwards, run `git pull`. Runs `divan check` first for shared corpora. Only your files are published. `land` builds its commit directly, so the repo's commit hooks do not run; a corpus that regenerates committed index files in a hook should keep using plain git.
|
|
180
|
+
- `divan check [FILE...] [--corpus C] [--path DIR] [--explain] [--json]` frontmatter, required fields, and (shared corpora) leaks: local paths, private IPs, emails, secrets, links to unshared corpora (`corpus:path`), denylist hits. Exits non-zero on errors.
|
|
181
|
+
- `divan list [--topics] [--corpus C] [--collection X] [--where key=value] [--since 7d] [--fields a,b] [--json]` replaces hand-kept index files. `--topics` prints one line per top-level folder (entries, top 3 tags, else title words) in place of a hand-made root `INDEX.md`; divan never requires `INDEX.md`. `--since 7d|2w|3m` keeps entries dated that recently (frontmatter `date`, `updated` or `created`, else file mtime).
|
|
182
|
+
- `divan join URL [--path P] [--name N] [--author A]` clone a knowledge-base repo and register it (see Set up your agent).
|
|
183
|
+
- `divan agent setup [--status] [--json] [--client C] [-y] [--remove]` install the plugin into Claude Code, Codex and Antigravity through their own CLIs.
|
|
184
|
+
- `divan agent config [--json]` and `divan agent set KEY VALUE` show and change the hook settings (see Customise or turn off).
|
|
185
|
+
- `divan guide [CORPUS]` print the corpus guide (how to write to it): `[corpus] guide = "..."` in its `divan.toml`, else `AGENTS.md`, `CLAUDE.md`, `README.md`. `divan new` ends with a line pointing at it.
|
|
186
|
+
- `divan hook AGENT EVENT` the hook entry point the plugin calls; reads JSON on stdin.
|
|
187
|
+
- `divan skill` prints the agent skill (SKILL.md) for installing into an agent harness.
|
|
188
|
+
- `divan corpora` the active profile, corpora, collections and index freshness.
|
|
189
|
+
|
|
190
|
+
Frontmatter is parsed as YAML with 1.2-style booleans (`no` stays a string).
|
|
191
|
+
|
|
192
|
+
## CI
|
|
193
|
+
|
|
194
|
+
Copy `examples/ci-divan-check.yml` into a corpus repo's `.github/workflows/`.
|
|
195
|
+
|
|
196
|
+
## Develop
|
|
197
|
+
|
|
198
|
+
```
|
|
199
|
+
uv run python -m pytest -q
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
See `CONTRIBUTING.md`, `SECURITY.md` (what divan does not protect against) and `CHANGELOG.md`. Licensed under Apache-2.0.
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
divan/SKILL.md,sha256=tXnHHHkBZGXZ3t90b-60e5ioX-enfuov5-RyMCBmFMQ,1154
|
|
2
|
+
divan/__init__.py,sha256=Zn1KFblwuFHiDRdRAiRnDBRkbPttWh44jKa5zG2ov0E,22
|
|
3
|
+
divan/__main__.py,sha256=4RO7B_scoAvPPxUt_HtBZWTv6NKIbB7W3YoXZXIWuXU,53
|
|
4
|
+
divan/agent.py,sha256=bcaMgSkaJ5Ih-kdC617ZnHjLHxXeXJEZ3U8OXLIMMc0,11997
|
|
5
|
+
divan/check.py,sha256=xXHRFuN2l0Q8NFLzZtoTFmkYpnIUUzkhet3usmz7eAM,7613
|
|
6
|
+
divan/cli.py,sha256=E2GYRLMH77yfVSJ4cupO7InxWNKBQcm2NqBhpbJBzDo,17708
|
|
7
|
+
divan/config.py,sha256=42ecqLSjWoql7JeHZbKxqEczuQJx1N88KQcnFSnJz8Y,10448
|
|
8
|
+
divan/doc.py,sha256=GBbeVUHRg8RnLg-00kVGhovWtruMyusVpbVmrMtGi1Y,2678
|
|
9
|
+
divan/hooks.py,sha256=aEALQ4Zjl6uikJN5KosxTLZjV6omq0oKsmb47ZbTHOs,17764
|
|
10
|
+
divan/index.py,sha256=SIPH7mGlIDZ6P8WqDV8Fwu_vZJLuUbEHNF4Jf7YVOSk,8759
|
|
11
|
+
divan/join.py,sha256=WSb-73PsXj3sFtquEu44w08REcnUi3hJZuj49bKbdZU,9258
|
|
12
|
+
divan/land.py,sha256=hNRHw36olBd05cgDqbUMYxxtLVX23jP2ckQLqvwuPJY,13953
|
|
13
|
+
divan/privdir.py,sha256=aDJ2ZexKU8y3atyfWLvF79FuoqBWJXntjPGuDtbnNHs,2173
|
|
14
|
+
divan/safe.py,sha256=4m2ZZzBYAVyB6gLYSUOb0k_-Hp-vz3PasG6Hc7vSiPY,656
|
|
15
|
+
divan/settings.py,sha256=-xOT9BCYNCUD6Jeszjt_QzLSZxbO8dprCMzBs8D31aQ,4558
|
|
16
|
+
divan/tomledit.py,sha256=1MJbMhzn23nfKKYYbBvgExnrnRo-N_wmB2_9xbTQVVw,3961
|
|
17
|
+
divan/write.py,sha256=YEdCLx0oF78sYuzfL7r-bAwU3KLhzSZ_TA8aQhlm92o,3217
|
|
18
|
+
divan_cli-0.2.0.dist-info/METADATA,sha256=zyWHZsFosPJmigzWHVsdf2AGoogO3m8rgzrX0Oa90oo,13982
|
|
19
|
+
divan_cli-0.2.0.dist-info/WHEEL,sha256=2iZrJkDIkeDh0k9SikKMqFuRP-ua6mb4Ir1AsER4BEw,87
|
|
20
|
+
divan_cli-0.2.0.dist-info/entry_points.txt,sha256=UlN2ra322P7ufmetZIVctRPs-jRmC5nbmcXKGJEz0Rk,41
|
|
21
|
+
divan_cli-0.2.0.dist-info/licenses/LICENSE,sha256=2xCcXBEHkyp_GOPZRd3llOhUTmHVRv0E9949gGNRJrk,11344
|
|
22
|
+
divan_cli-0.2.0.dist-info/RECORD,,
|
|
@@ -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 2026 Tim Nunamaker
|
|
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.
|