@octocodeai/freellama-mcp-server 0.1.0 → 0.6.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.
@@ -0,0 +1,108 @@
1
+ # FreeLlama MCP configuration
2
+
3
+ Settings for the [FreeLlama MCP server](README.md).
4
+
5
+ ## Environment variables
6
+
7
+ The following settings have environment-variable overrides. Set them in the MCP client's
8
+ server-launch config (for example `.mcp.json`'s `env` block) or the launching shell.
9
+
10
+ | Variable | Default | Affects |
11
+ |---|---|---|
12
+ | `FREELLAMA_OLLAMA_ENDPOINT` | `http://127.0.0.1:11434` | Default Ollama endpoint for `doctor`, the `models` detail/raw/library views, and all `ollama_*` tools |
13
+ | `FREELLAMA_SERVE_ENDPOINT` | `http://127.0.0.1:11435` | Default `endpoint` for serve-backed tools and `delegate_research` |
14
+ | `FREELLAMA_MCP_DEFAULT_MODEL` | unset (routes to an installed coding model) | `delegate_research`'s default `model` |
15
+ | `FREELLAMA_MCP_DEFAULT_ADAPTER` | `bash` | `delegate_research`'s adapter (`octocode` to switch) |
16
+ | `FREELLAMA_MCP_MAX_TURNS` | `8` | Max agent turns for `delegate_research` |
17
+ | `FREELLAMA_MCP_DELEGATE_TIMEOUT_SECONDS` | `180` | Whole-subprocess timeout for `delegate_research` |
18
+ | `FREELLAMA_MCP_PULL_TIMEOUT_SECONDS` | `1200` | Default `ollama_manage` `"pull"` timeout |
19
+ | `FREELLAMA_MCP_FETCH_TIMEOUT_SECONDS` | `30` | Timeout for other direct Ollama HTTP calls |
20
+ | `FREELLAMA_MCP_ALLOWED_ROOTS` | checkout: this repository; published: must be set | Platform-separated allowlist of directories `delegate_research` may read (`:` on macOS/Linux, `;` on Windows) |
21
+ | `FREELLAMA_MCP_MODEL_EVIDENCE` | checkout: `packages/mcp/evidence/model-evidence.json`; published: unset | Path to per-model research grades (see "Runtime evidence") |
22
+ | `FREELLAMA_EXTERNAL_COST_MODEL` | unset | External-model label in estimated avoided-cost telemetry; set all three cost variables or none |
23
+ | `FREELLAMA_EXTERNAL_COST_INPUT_USD_PER_M` | unset | External input USD per million tokens |
24
+ | `FREELLAMA_EXTERNAL_COST_OUTPUT_USD_PER_M` | unset | External output USD per million tokens |
25
+ | `FREELLAMA_CONTROL_TIMEOUT_SECONDS` | `30` | Decision-only serve calls; read by `packages/rust-core/src/napi.rs` |
26
+ | `FREELLAMA_TASK_TIMEOUT_SECONDS` | `900` | Generation calls; read by `packages/rust-core/src/napi.rs` |
27
+ | `FREELLAMA_AUTH_TOKEN_FILE` | unset | Bearer-token file used by the native client and research adapters for all serve routes |
28
+ | `FREELLAMA_AGENT_TOKEN_CALIBRATION_DIR` | platform data directory | Prompt-free, model-specific token-estimator calibration shared across adapter processes |
29
+ | `FREELLAMA_MCP_AUTOSTART_SERVE` | `1` | When the default loopback serve endpoint does not answer, start `freellama serve` as a child of the MCP server (stopped with it). `0` disables |
30
+ | `FREELLAMA_SERVE_BINARY` | checkout `target/release`/`debug`, then the platform package | Binary used for serve autostart |
31
+ | `FREELLAMA_AGENT_OS_SANDBOX` | `auto` | Bash adapter OS confinement: `bwrap` on Linux, `sandbox-exec` on macOS, when present. `off` keeps only the restricted shell |
32
+ | `FREELLAMA_AGENT_OCTOCODE_PACKAGE` | `octocode@19.1.0` | Pinned npm spec the Octocode adapter runs through `npx` |
33
+
34
+ Serve-side placement settings (read by `freellama serve`, not the MCP process):
35
+
36
+ | Variable | Default | Affects |
37
+ |---|---|---|
38
+ | `FREELLAMA_EVICT_IDLE_MODELS` | on | Unload idle, unpinned models using reuse and load costs when a cold load needs room. `0` turns eviction off |
39
+ | `FREELLAMA_CPU_NUM_THREAD` | half the logical cores (not set on macOS) | `num_thread` for CPU-placed tasks only; GPU tasks leave it to Ollama |
40
+ | `FREELLAMA_MAX_QUEUE_WAIT_SECONDS` | `120` | How long a managed task queues for a slot or memory |
41
+ | `OLLAMA_NUM_PARALLEL`, `OLLAMA_KV_CACHE_TYPE`, `OLLAMA_FLASH_ATTENTION` | Ollama's | Read as hints for the memory estimate: parallel slots multiply the KV cache, and `q8_0`/`q4_0` shrink it only with flash attention. Set them for serve the same way as for Ollama |
42
+
43
+ Research-adapter settings are deployment defaults. The optional `delegate_research.agent` object
44
+ overrides the per-call budget (`maxTurns`, `contextTokens`, `outputTokens`); explicit per-call
45
+ fields win. Sampling, keep-alive, timeouts, and placement preference for research come from the
46
+ operator's `FREELLAMA_AGENT_*` variables or the adapter defaults.
47
+ The research subprocess inherits only these server variables: `FREELLAMA_*`; `PATH`, `HOME`,
48
+ `USER`, `LOGNAME`; `LANG`, `LC_ALL`, `LC_CTYPE`, `TZ`; `TMPDIR`, `TEMP`, `TMP`; Windows `SYSTEMROOT`,
49
+ `SYSTEMDRIVE`, `WINDIR`, `COMSPEC`, `PATHEXT`, `APPDATA`, `LOCALAPPDATA`, `USERPROFILE`;
50
+ `HTTP_PROXY`, `HTTPS_PROXY`, `NO_PROXY` (and lowercase forms); `NODE_EXTRA_CA_CERTS`,
51
+ `SSL_CERT_FILE`, `SSL_CERT_DIR`, `REQUESTS_CA_BUNDLE`; `XDG_CACHE_HOME`, `XDG_DATA_HOME`,
52
+ `npm_config_cache`.
53
+
54
+ | Variable | Default | Affects |
55
+ |---|---:|---|
56
+ | `FREELLAMA_AGENT_NUM_CTX` | `8192` | Ollama context window |
57
+ | `FREELLAMA_AGENT_EXECUTION_PREFERENCE` | `auto` | Managed coding-agent backend hint |
58
+ | `FREELLAMA_AGENT_MIN_PLACEMENT_EVIDENCE` | `configured` | Set `observed` to fail closed on cold/mismatched placement |
59
+ | `FREELLAMA_AGENT_NUM_PREDICT` | `512` | Reserved output budget |
60
+ | `FREELLAMA_AGENT_TEMPERATURE` / `FREELLAMA_AGENT_SEED` | `0` / `42` | Repeatable decoding |
61
+ | `FREELLAMA_AGENT_THINK` / `FREELLAMA_AGENT_KEEP_ALIVE` | `false` / `5m` | Ollama reasoning and residency |
62
+ | `FREELLAMA_AGENT_REQUEST_TIMEOUT_SECONDS` | `600` | Each Ollama chat attempt |
63
+ | `FREELLAMA_AGENT_TOOL_TIMEOUT_SECONDS` | Bash `30`, Octocode `45` | Each local tool call |
64
+ | `FREELLAMA_AGENT_RETRY_ATTEMPTS` / `FREELLAMA_AGENT_RETRY_BACKOFF_SECONDS` | `2` / `5` | Conversation-level retry |
65
+ | `FREELLAMA_AGENT_MAX_PARSE_REPAIRS` / `FREELLAMA_AGENT_PARSE_REPAIR_ECHO_CHARS` | `2` / `500` | Invalid JSON correction limit and retained reply text |
66
+ | `FREELLAMA_AGENT_CHARS_PER_TOKEN` | `4` | First-call token estimate; later calibrated from Ollama |
67
+ | `FREELLAMA_AGENT_SAFETY_MARGIN_TOKENS` | `256` | Input headroom beyond `num_predict` |
68
+ | `FREELLAMA_AGENT_IMAGE_TOKEN_ESTIMATE` | `1024` | Bounded charge per image |
69
+ | `FREELLAMA_AGENT_KEEP_RECENT` | `2` | Recent observations preserved verbatim |
70
+ | `FREELLAMA_AGENT_COMPACT_PREVIEW_CHARS` | `180` | Old-observation breadcrumb size |
71
+ | `FREELLAMA_AGENT_COMPACT_RETAIN_RATIO` | `0.8` | Current payload retained per emergency pass |
72
+ | `FREELLAMA_AGENT_CLIP_HEAD_RATIO` | `0.667` | Head share when an emergency clip preserves both ends |
73
+ | `FREELLAMA_AGENT_OBSERVATION_PAGE_CHARS` | `3000` | Lossless observation page target |
74
+ | `FREELLAMA_AGENT_PINNED_OVERFLOW` | `error` | Preserve system/task bytes; `clip` is explicit opt-in |
75
+
76
+ Invalid values fail before an Ollama request. Each successful result returns
77
+ `contextManagement` with the resolved policy, calibration source/scale, estimated input budget,
78
+ and compaction count. Ollama has no stable preflight tokenizer endpoint, so “exact before the first
79
+ call” is not claimed. Model-specific calibration persists after successful calls, so later
80
+ processes start conservatively from prior `prompt_eval_count` evidence without sharing estimates
81
+ between model templates.
82
+
83
+ **Security:** `delegate_research` grants a local model read access to `workspacePath`. The path is
84
+ confined to `FREELLAMA_MCP_ALLOWED_ROOTS` (default: this repository in a checkout; unset in a published
85
+ install until you set it), resolved through symlinks so a link inside an allowed root can't escape
86
+ it. The default `bash` adapter runs an allowlist of read-only tools in a restricted shell with a
87
+ scrubbed environment and, where available, an OS sandbox; it also rejects command substitution,
88
+ home-directory paths, `..`, and absolute paths outside that workspace. Production deployments should generate a permission-restricted token with
89
+ `freellama auth-token`, start `serve` with `--auth-token-file`, and set
90
+ `FREELLAMA_AUTH_TOKEN_FILE` for MCP. Authentication covers managed and raw passthrough routes; use
91
+ an external TLS and authorization layer for untrusted or multi-tenant networks.
92
+
93
+ ## Runtime evidence
94
+
95
+ Admission weights can be set by task kind in the server runtime file's `[task_costs]` table.
96
+ Inspect `doctor {view:"full"}` at `platform_health.admission.costs.base_by_task` for effective
97
+ weights and `run_task {preview:true}` for current cost and capacity advice. The table changes
98
+ managed admission; it does not create Ollama
99
+ slots or relax memory guards. Existing queued work keeps its captured cost. See
100
+ [monitoring controls](https://github.com/bgauryy/FreeLlama/blob/main/docs/MONITORING.md#adaptive-concurrency).
101
+
102
+ **No measurements are compiled in.** In a repository checkout, per-model research grades load from
103
+ `packages/mcp/evidence/model-evidence.json`. A published package does not include that repository
104
+ file, so its evidence table is empty unless you set `FREELLAMA_MCP_MODEL_EVIDENCE`. An unmeasured
105
+ model yields a `verify` verdict, and an unreadable evidence file is reported on stderr and treated
106
+ as empty. Tool descriptions state the rules; measurement details live in
107
+ [`skills/freellama/references/`](https://github.com/bgauryy/FreeLlama/tree/main/skills/freellama/references/) and
108
+ [`docs/dev/evidence/`](https://github.com/bgauryy/FreeLlama/tree/main/docs/dev/evidence/).
package/DEVELOPING.md ADDED
@@ -0,0 +1,109 @@
1
+ # Developing the FreeLlama MCP server
2
+
3
+ Build, test, and release notes for the [FreeLlama MCP server](README.md).
4
+
5
+ ## Build
6
+
7
+ Build the native addon from the repository root and this package in place.
8
+
9
+ ```bash
10
+ # From the repository root (yarn workspaces — one install for every package)
11
+ corepack enable
12
+ yarn install
13
+ yarn build
14
+ ```
15
+
16
+ `yarn build` writes **one** MCP file, `packages/mcp/dist/index.js` (shebang, executable). During
17
+ checkout development it loads `native/freellama.<triple>.node`. Published installs resolve the
18
+ matching `@octocodeai/freellama-native-<target>` optional package instead, so the base MCP package remains
19
+ portable. Research adapters are copied into `adapters/` for packed installs.
20
+
21
+ Piecewise, if you are iterating on one layer:
22
+
23
+ ```bash
24
+ # 1. Native addon → packages/mcp/native/freellama.<triple>.node
25
+ yarn build:native
26
+
27
+ # 2. This server → dist/index.js via esbuild (then copies the research adapters into adapters/)
28
+ yarn workspace @octocodeai/freellama-mcp-server build
29
+ ```
30
+
31
+ `yarn start` needs `dist/index.js` and the compiled `.node` addon — `yarn build` from the repository
32
+ root produces both in a checkout. `dist/index.js` loads `native/index.js`, which loads a local addon
33
+ first and then a matching optional platform package. The `.node` binary is gitignored (a build
34
+ artifact). `native/index.js` is a small hand-written loader; `native/index.d.ts` is generated from
35
+ `napi.rs` by `yarn build:native`. Both are checked in; do not edit the declarations by hand —
36
+ change the Rust doc comments or `ts_args_type`, rebuild, and commit. CI rebuilds it and fails
37
+ on any diff.
38
+
39
+ ## Test
40
+
41
+ Vitest, in three tiers (all TypeScript, under `test/`):
42
+
43
+ | Tier | Command (from this package) | Checks | Needs |
44
+ |---|---|---|---|
45
+ | `test/unit/` | `yarn test` (watch: `yarn test:watch`) | pure functions straight from `src/*.ts` — no build step, this is the TDD loop | nothing, ~0.5s |
46
+ | `test/integration/` | `yarn test:integration` | the built server over the real MCP protocol: tool contract, structured content, guardrails; rebuilds `dist/` itself | Ollama at `FREELLAMA_OLLAMA_ENDPOINT` (default :11434) |
47
+ | `test/e2e/` | `yarn test:e2e` | every tool against the live system: real routing/execution, pull → delete round trip (net-zero), a real delegated research run | serve + Ollama + models, ~40s |
48
+
49
+ The same commands work from the repository root (`yarn test` there also runs the CLI package's tests).
50
+ The integration/e2e tiers fail fast with a readable message when Ollama is down, and the lifecycle
51
+ test refuses to delete a model already installed on the test system.
52
+
53
+ For default-endpoint autostart, a spawn failure, early exit, or readiness timeout rejects the
54
+ request while leaving the MCP transport available for diagnosis or retry. Autostart does not apply
55
+ to an explicit non-default endpoint; see `FREELLAMA_MCP_AUTOSTART_SERVE` in
56
+ [configuration](CONFIGURATION.md#environment-variables).
57
+
58
+ ## Platform support
59
+
60
+ The native addon is named by target triple (`freellama.<platform>-<arch>[-<abi>].node`). The base
61
+ package has eight npm optional dependencies, one each for macOS arm64/x64, Linux arm64/x64 with
62
+ glibc or musl, and Windows arm64/x64 with MSVC. `native/index.js` tries the checkout artifact first,
63
+ then the host's optional package. A release is supported only when all eight artifact packages pass
64
+ the publish verifier; an installation made with `--omit=optional` cannot load the addon. `engines`
65
+ requires Node >= 20.
66
+
67
+ Machine discovery distinguishes total host memory (`memory_bytes`) from known unified memory
68
+ (`unified_memory_bytes`). Library-tag `fitsInMemory` is a conservative host-memory preflight and
69
+ includes `fitScope: "host_memory_budget_only"`; inspect `/api/ps` for actual accelerator placement.
70
+
71
+ Start the serve-backed tools' dependency from the repository root:
72
+
73
+ ```bash
74
+ cargo run --release -- serve
75
+ ```
76
+
77
+ See `skills/freellama/references/proxy-vs-serve.md` for the `proxy` vs `serve` distinction (only
78
+ `serve` has the `/_freellama/v1/*` routes these tools call).
79
+
80
+ ## Publish
81
+
82
+ `packages/mcp/` is the portable JavaScript package. Its `package.json` lists the platform packages
83
+ as exact-version optional dependencies; it intentionally does not embed a `.node` binary. Publish
84
+ the eight `packages/native/*` packages first, then publish `@octocodeai/freellama` (`npx @octocodeai/freellama`) and `@octocodeai/freellama-mcp-server` (`npx @octocodeai/freellama-mcp-server`)
85
+ at the same version. `yarn release:verify:publish` refuses a release if any of the ten packages
86
+ omits `assets/logo.jpg`, or if any platform package has a missing, empty, or unpacked
87
+ executable/addon pair.
88
+
89
+ ```bash
90
+ cd packages/mcp
91
+ npm pack --dry-run # confirm exactly what a publish would ship
92
+ ```
93
+
94
+ Treat `npm publish` as a public release action. Follow the repository
95
+ [release procedure](https://github.com/bgauryy/FreeLlama/blob/main/RELEASE.md) and obtain the repository owner's release authorization first.
96
+
97
+ ## Why native bindings
98
+
99
+ - **No routing reimplementation.** `run_task`, `run_task {preview:true}`, and the installed-model list are HTTP
100
+ calls into a running `freellama serve`, matching the CLI tool map in `packages/cli/src/tools.rs`. `doctor` talks to Ollama
101
+ and the host's portable machine-discovery layer directly. `ollama_manage` / `ollama_delete` hit Ollama's HTTP API. `delegate_research`
102
+ is a subprocess. Routing decisions still live in exactly one place — the Rust core; see
103
+ [what the MCP layer computes](README.md#what-the-mcp-layer-computes).
104
+ - **One connection pool.** `packages/rust-core/src/napi.rs` holds a single `reqwest::Client` in a
105
+ `OnceLock` and clones the handle per request, matching the server side.
106
+ - **`unsafe_code` stays isolated.** The crate is `deny(unsafe_code)` except `napi.rs`, which
107
+ carries an explicit `#[allow(unsafe_code)]` for napi-derive's FFI glue.
108
+ - **The napi build is off by default** (`cargo build` never touches it); the addon is built with
109
+ `napi build --features napi` from the repo root.
package/LICENSE-APACHE 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.
package/LICENSE-MIT ADDED
@@ -0,0 +1,18 @@
1
+ MIT License
2
+
3
+ Copyright (c) FreeLlama contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
6
+ associated documentation files (the "Software"), to deal in the Software without restriction, including
7
+ without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the
9
+ following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be included in all copies or substantial
12
+ portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
15
+ LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO
16
+ EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
17
+ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
18
+ USE OR OTHER DEALINGS IN THE SOFTWARE.