kosha-okf 0.1.0__tar.gz
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.
- kosha_okf-0.1.0/.github/workflows/acceptance.yml +38 -0
- kosha_okf-0.1.0/.github/workflows/ci.yml +36 -0
- kosha_okf-0.1.0/.gitignore +218 -0
- kosha_okf-0.1.0/.python-version +1 -0
- kosha_okf-0.1.0/ACCEPTANCE_REPORT.md +48 -0
- kosha_okf-0.1.0/CONTRIBUTING.md +80 -0
- kosha_okf-0.1.0/LICENSE +201 -0
- kosha_okf-0.1.0/PKG-INFO +247 -0
- kosha_okf-0.1.0/PREMISE_REPORT.md +48 -0
- kosha_okf-0.1.0/README.md +234 -0
- kosha_okf-0.1.0/bundles/northwind/entities/customer.md +13 -0
- kosha_okf-0.1.0/bundles/northwind/entities/index.md +5 -0
- kosha_okf-0.1.0/bundles/northwind/entities/membership-tier.md +13 -0
- kosha_okf-0.1.0/bundles/northwind/entities/order.md +13 -0
- kosha_okf-0.1.0/bundles/northwind/index.md +26 -0
- kosha_okf-0.1.0/bundles/northwind/log.md +13 -0
- kosha_okf-0.1.0/bundles/northwind/playbooks/escalate-complaint.md +13 -0
- kosha_okf-0.1.0/bundles/northwind/playbooks/handle-return.md +18 -0
- kosha_okf-0.1.0/bundles/northwind/playbooks/index.md +4 -0
- kosha_okf-0.1.0/bundles/northwind/policies/exchanges.md +14 -0
- kosha_okf-0.1.0/bundles/northwind/policies/index.md +6 -0
- kosha_okf-0.1.0/bundles/northwind/policies/refunds.md +13 -0
- kosha_okf-0.1.0/bundles/northwind/policies/returns/gold-members.md +16 -0
- kosha_okf-0.1.0/bundles/northwind/policies/returns/index.md +4 -0
- kosha_okf-0.1.0/bundles/northwind/policies/returns/standard.md +17 -0
- kosha_okf-0.1.0/bundles/northwind/policies/shipping.md +13 -0
- kosha_okf-0.1.0/bundles/northwind/references/channels.md +13 -0
- kosha_okf-0.1.0/bundles/northwind/references/glossary.md +14 -0
- kosha_okf-0.1.0/bundles/northwind/references/index.md +4 -0
- kosha_okf-0.1.0/consumer/AGENTS.fragment.md +19 -0
- kosha_okf-0.1.0/consumer/kosha-traversal/SKILL.md +24 -0
- kosha_okf-0.1.0/docs/authoring-bundles.md +139 -0
- kosha_okf-0.1.0/docs/cli-reference.md +149 -0
- kosha_okf-0.1.0/docs/configuration.md +78 -0
- kosha_okf-0.1.0/docs/getting-started.md +136 -0
- kosha_okf-0.1.0/docs/mcp-integration.md +117 -0
- kosha_okf-0.1.0/docs/overview.md +226 -0
- kosha_okf-0.1.0/docs/system_design.md +495 -0
- kosha_okf-0.1.0/evals/contradict/test_contradict_eval.py +46 -0
- kosha_okf-0.1.0/evals/dedup/test_dedup_eval.py +71 -0
- kosha_okf-0.1.0/evals/extract/test_extract_eval.py +41 -0
- kosha_okf-0.1.0/evals/merge/test_merge_eval.py +40 -0
- kosha_okf-0.1.0/evals/relate/test_relate_eval.py +45 -0
- kosha_okf-0.1.0/evals/test_suite_index.py +48 -0
- kosha_okf-0.1.0/labels/contradict_seed.jsonl +12 -0
- kosha_okf-0.1.0/labels/dedup_seed.jsonl +24 -0
- kosha_okf-0.1.0/labels/granularity_seed.jsonl +10 -0
- kosha_okf-0.1.0/labels/merge_seed.jsonl +5 -0
- kosha_okf-0.1.0/labels/relate_seed.jsonl +4 -0
- kosha_okf-0.1.0/pyproject.toml +56 -0
- kosha_okf-0.1.0/src/kosha/__init__.py +13 -0
- kosha_okf-0.1.0/src/kosha/approve/__init__.py +38 -0
- kosha_okf-0.1.0/src/kosha/approve/autonomy.py +147 -0
- kosha_okf-0.1.0/src/kosha/approve/decision.py +60 -0
- kosha_okf-0.1.0/src/kosha/approve/render.py +48 -0
- kosha_okf-0.1.0/src/kosha/bench/__init__.py +74 -0
- kosha_okf-0.1.0/src/kosha/bench/acceptance.py +515 -0
- kosha_okf-0.1.0/src/kosha/bench/grade.py +51 -0
- kosha_okf-0.1.0/src/kosha/bench/labels.py +164 -0
- kosha_okf-0.1.0/src/kosha/bench/queries.py +73 -0
- kosha_okf-0.1.0/src/kosha/bench/report.py +214 -0
- kosha_okf-0.1.0/src/kosha/bench/runner.py +135 -0
- kosha_okf-0.1.0/src/kosha/bench/strategies.py +175 -0
- kosha_okf-0.1.0/src/kosha/cli.py +455 -0
- kosha_okf-0.1.0/src/kosha/contradiction/__init__.py +67 -0
- kosha_okf-0.1.0/src/kosha/contradiction/detect.py +267 -0
- kosha_okf-0.1.0/src/kosha/contradiction/escalate.py +157 -0
- kosha_okf-0.1.0/src/kosha/contradiction/policy.py +86 -0
- kosha_okf-0.1.0/src/kosha/contradiction/temporal.py +52 -0
- kosha_okf-0.1.0/src/kosha/dedup/__init__.py +58 -0
- kosha_okf-0.1.0/src/kosha/dedup/adjudicate.py +131 -0
- kosha_okf-0.1.0/src/kosha/dedup/audit.py +68 -0
- kosha_okf-0.1.0/src/kosha/dedup/candidates.py +37 -0
- kosha_okf-0.1.0/src/kosha/dedup/decision.py +102 -0
- kosha_okf-0.1.0/src/kosha/dedup/resolver.py +99 -0
- kosha_okf-0.1.0/src/kosha/dedup/split.py +42 -0
- kosha_okf-0.1.0/src/kosha/eval/__init__.py +62 -0
- kosha_okf-0.1.0/src/kosha/eval/contradict.py +132 -0
- kosha_okf-0.1.0/src/kosha/eval/dedup.py +141 -0
- kosha_okf-0.1.0/src/kosha/eval/extract.py +85 -0
- kosha_okf-0.1.0/src/kosha/eval/merge.py +131 -0
- kosha_okf-0.1.0/src/kosha/eval/relate.py +139 -0
- kosha_okf-0.1.0/src/kosha/extract.py +107 -0
- kosha_okf-0.1.0/src/kosha/git_store.py +170 -0
- kosha_okf-0.1.0/src/kosha/index/__init__.py +13 -0
- kosha_okf-0.1.0/src/kosha/index/embedding.py +122 -0
- kosha_okf-0.1.0/src/kosha/indexlog/__init__.py +38 -0
- kosha_okf-0.1.0/src/kosha/indexlog/index.py +111 -0
- kosha_okf-0.1.0/src/kosha/indexlog/log.py +79 -0
- kosha_okf-0.1.0/src/kosha/ingest/__init__.py +20 -0
- kosha_okf-0.1.0/src/kosha/ingest/folder.py +46 -0
- kosha_okf-0.1.0/src/kosha/ingest/url.py +121 -0
- kosha_okf-0.1.0/src/kosha/link/__init__.py +61 -0
- kosha_okf-0.1.0/src/kosha/link/edits.py +169 -0
- kosha_okf-0.1.0/src/kosha/link/paths.py +80 -0
- kosha_okf-0.1.0/src/kosha/link/relate.py +189 -0
- kosha_okf-0.1.0/src/kosha/lint.py +38 -0
- kosha_okf-0.1.0/src/kosha/mcp/__init__.py +38 -0
- kosha_okf-0.1.0/src/kosha/mcp/fallback.py +86 -0
- kosha_okf-0.1.0/src/kosha/mcp/server.py +110 -0
- kosha_okf-0.1.0/src/kosha/mcp/service.py +301 -0
- kosha_okf-0.1.0/src/kosha/merge/__init__.py +67 -0
- kosha_okf-0.1.0/src/kosha/merge/apply.py +46 -0
- kosha_okf-0.1.0/src/kosha/merge/claims.py +153 -0
- kosha_okf-0.1.0/src/kosha/merge/create.py +98 -0
- kosha_okf-0.1.0/src/kosha/merge/reconstruct.py +75 -0
- kosha_okf-0.1.0/src/kosha/merge/update.py +166 -0
- kosha_okf-0.1.0/src/kosha/model.py +164 -0
- kosha_okf-0.1.0/src/kosha/okf/__init__.py +37 -0
- kosha_okf-0.1.0/src/kosha/okf/errors.py +15 -0
- kosha_okf-0.1.0/src/kosha/okf/load.py +38 -0
- kosha_okf-0.1.0/src/kosha/okf/parse.py +146 -0
- kosha_okf-0.1.0/src/kosha/okf/serialize.py +136 -0
- kosha_okf-0.1.0/src/kosha/pipeline/__init__.py +23 -0
- kosha_okf-0.1.0/src/kosha/pipeline/run.py +374 -0
- kosha_okf-0.1.0/src/kosha/pipeline/writer.py +157 -0
- kosha_okf-0.1.0/src/kosha/plan/__init__.py +23 -0
- kosha_okf-0.1.0/src/kosha/plan/assemble.py +68 -0
- kosha_okf-0.1.0/src/kosha/plan/changes.py +61 -0
- kosha_okf-0.1.0/src/kosha/providers/__init__.py +53 -0
- kosha_okf-0.1.0/src/kosha/providers/base.py +61 -0
- kosha_okf-0.1.0/src/kosha/providers/extractive.py +51 -0
- kosha_okf-0.1.0/src/kosha/providers/factory.py +75 -0
- kosha_okf-0.1.0/src/kosha/providers/lexical.py +49 -0
- kosha_okf-0.1.0/src/kosha/providers/openai_compatible.py +181 -0
- kosha_okf-0.1.0/src/kosha/providers/tokens.py +27 -0
- kosha_okf-0.1.0/src/kosha/validate.py +237 -0
- kosha_okf-0.1.0/tests/bench/test_acceptance.py +316 -0
- kosha_okf-0.1.0/tests/bench/test_grade.py +43 -0
- kosha_okf-0.1.0/tests/bench/test_labels.py +49 -0
- kosha_okf-0.1.0/tests/bench/test_queries.py +24 -0
- kosha_okf-0.1.0/tests/bench/test_report.py +188 -0
- kosha_okf-0.1.0/tests/bench/test_runner.py +82 -0
- kosha_okf-0.1.0/tests/bench/test_strategies.py +62 -0
- kosha_okf-0.1.0/tests/contradiction/test_detect.py +167 -0
- kosha_okf-0.1.0/tests/contradiction/test_escalate.py +125 -0
- kosha_okf-0.1.0/tests/contradiction/test_invariant.py +97 -0
- kosha_okf-0.1.0/tests/contradiction/test_policy.py +86 -0
- kosha_okf-0.1.0/tests/contradiction/test_temporal.py +80 -0
- kosha_okf-0.1.0/tests/dedup/test_adjudicate.py +105 -0
- kosha_okf-0.1.0/tests/dedup/test_audit.py +76 -0
- kosha_okf-0.1.0/tests/dedup/test_candidates.py +87 -0
- kosha_okf-0.1.0/tests/dedup/test_decision.py +69 -0
- kosha_okf-0.1.0/tests/dedup/test_resolver.py +116 -0
- kosha_okf-0.1.0/tests/dedup/test_split.py +82 -0
- kosha_okf-0.1.0/tests/fixtures/bad_bundle/concepts/no-type.md +8 -0
- kosha_okf-0.1.0/tests/fixtures/bad_bundle/reports/index.md +7 -0
- kosha_okf-0.1.0/tests/fixtures/bad_bundle/tables/no-frontmatter.md +4 -0
- kosha_okf-0.1.0/tests/fixtures/good_bundle/concepts/customer-lifetime-value.md +13 -0
- kosha_okf-0.1.0/tests/fixtures/good_bundle/index.md +11 -0
- kosha_okf-0.1.0/tests/fixtures/good_bundle/log.md +7 -0
- kosha_okf-0.1.0/tests/fixtures/good_bundle/tables/orders.md +11 -0
- kosha_okf-0.1.0/tests/index/test_embedding.py +64 -0
- kosha_okf-0.1.0/tests/indexlog/test_index.py +106 -0
- kosha_okf-0.1.0/tests/indexlog/test_log.py +91 -0
- kosha_okf-0.1.0/tests/ingest/fixtures/docs/returns.md +7 -0
- kosha_okf-0.1.0/tests/ingest/fixtures/docs/shipping.md +3 -0
- kosha_okf-0.1.0/tests/ingest/fixtures/page.html +16 -0
- kosha_okf-0.1.0/tests/ingest/test_extract.py +70 -0
- kosha_okf-0.1.0/tests/ingest/test_folder.py +44 -0
- kosha_okf-0.1.0/tests/ingest/test_ingest_model.py +69 -0
- kosha_okf-0.1.0/tests/ingest/test_url.py +43 -0
- kosha_okf-0.1.0/tests/link/test_edits.py +143 -0
- kosha_okf-0.1.0/tests/link/test_paths.py +74 -0
- kosha_okf-0.1.0/tests/link/test_relate.py +152 -0
- kosha_okf-0.1.0/tests/mcp/conftest.py +81 -0
- kosha_okf-0.1.0/tests/mcp/test_acl.py +65 -0
- kosha_okf-0.1.0/tests/mcp/test_core_independence.py +27 -0
- kosha_okf-0.1.0/tests/mcp/test_fallback.py +38 -0
- kosha_okf-0.1.0/tests/mcp/test_load_concept.py +67 -0
- kosha_okf-0.1.0/tests/mcp/test_lockdown.py +49 -0
- kosha_okf-0.1.0/tests/mcp/test_query.py +76 -0
- kosha_okf-0.1.0/tests/mcp/test_server.py +88 -0
- kosha_okf-0.1.0/tests/mcp/test_service.py +52 -0
- kosha_okf-0.1.0/tests/mcp/test_traverse.py +59 -0
- kosha_okf-0.1.0/tests/merge/test_apply.py +91 -0
- kosha_okf-0.1.0/tests/merge/test_create.py +91 -0
- kosha_okf-0.1.0/tests/merge/test_fidelity.py +136 -0
- kosha_okf-0.1.0/tests/merge/test_reconstruct.py +93 -0
- kosha_okf-0.1.0/tests/merge/test_supersede.py +142 -0
- kosha_okf-0.1.0/tests/merge/test_update.py +154 -0
- kosha_okf-0.1.0/tests/okf/fixtures/acme/concepts/customer-lifetime-value.md +18 -0
- kosha_okf-0.1.0/tests/okf/fixtures/acme/index.md +9 -0
- kosha_okf-0.1.0/tests/okf/fixtures/acme/playbooks/diagnose-revenue-drop.md +20 -0
- kosha_okf-0.1.0/tests/okf/fixtures/acme/tables/orders.md +23 -0
- kosha_okf-0.1.0/tests/okf/test_load.py +62 -0
- kosha_okf-0.1.0/tests/okf/test_model.py +67 -0
- kosha_okf-0.1.0/tests/okf/test_parse.py +93 -0
- kosha_okf-0.1.0/tests/okf/test_roundtrip.py +115 -0
- kosha_okf-0.1.0/tests/okf/test_serialize.py +136 -0
- kosha_okf-0.1.0/tests/pipeline/fixtures/northwind/bundle/entities/customer.md +6 -0
- kosha_okf-0.1.0/tests/pipeline/fixtures/northwind/bundle/policies/refunds.md +6 -0
- kosha_okf-0.1.0/tests/pipeline/fixtures/northwind/bundle/policies/returns.md +8 -0
- kosha_okf-0.1.0/tests/pipeline/fixtures/northwind/source/entities/membership-tier.md +3 -0
- kosha_okf-0.1.0/tests/pipeline/fixtures/northwind/source/policies/returns.md +3 -0
- kosha_okf-0.1.0/tests/pipeline/test_approve.py +96 -0
- kosha_okf-0.1.0/tests/pipeline/test_autonomy.py +133 -0
- kosha_okf-0.1.0/tests/pipeline/test_git_store.py +77 -0
- kosha_okf-0.1.0/tests/pipeline/test_northwind_policy_update.py +121 -0
- kosha_okf-0.1.0/tests/pipeline/test_pipeline.py +252 -0
- kosha_okf-0.1.0/tests/pipeline/test_plan.py +63 -0
- kosha_okf-0.1.0/tests/providers/test_extractive.py +35 -0
- kosha_okf-0.1.0/tests/providers/test_factory.py +61 -0
- kosha_okf-0.1.0/tests/providers/test_lexical.py +51 -0
- kosha_okf-0.1.0/tests/providers/test_openai_compatible.py +84 -0
- kosha_okf-0.1.0/tests/test_smoke.py +28 -0
- kosha_okf-0.1.0/tests/validate/test_conformance.py +138 -0
- kosha_okf-0.1.0/tests/validate/test_fixtures.py +54 -0
- kosha_okf-0.1.0/tests/validate/test_lint.py +46 -0
- kosha_okf-0.1.0/tests/validate/test_permissive.py +75 -0
- kosha_okf-0.1.0/uv.lock +967 -0
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
name: Acceptance
|
|
2
|
+
|
|
3
|
+
# Opt-in / manual: the acceptance gate and the per-surface eval suites may make
|
|
4
|
+
# model calls when a non-local provider is env-configured, so this runs on demand
|
|
5
|
+
# rather than on every push/PR (the default providers are local and offline).
|
|
6
|
+
on:
|
|
7
|
+
workflow_dispatch:
|
|
8
|
+
|
|
9
|
+
concurrency:
|
|
10
|
+
group: acceptance-${{ github.ref }}
|
|
11
|
+
cancel-in-progress: true
|
|
12
|
+
|
|
13
|
+
jobs:
|
|
14
|
+
acceptance:
|
|
15
|
+
runs-on: ubuntu-latest
|
|
16
|
+
steps:
|
|
17
|
+
- uses: actions/checkout@v7
|
|
18
|
+
|
|
19
|
+
- name: Install uv
|
|
20
|
+
uses: astral-sh/setup-uv@v8.2.0
|
|
21
|
+
with:
|
|
22
|
+
enable-cache: true
|
|
23
|
+
|
|
24
|
+
- name: Install Python and dependencies
|
|
25
|
+
run: uv sync --locked
|
|
26
|
+
|
|
27
|
+
- name: MVP success-criteria gate (exit 0 iff all four pass)
|
|
28
|
+
run: uv run kosha bench acceptance --report ACCEPTANCE_REPORT.md
|
|
29
|
+
|
|
30
|
+
- name: Per-surface eval suites
|
|
31
|
+
run: uv run pytest evals -q
|
|
32
|
+
|
|
33
|
+
- name: Upload acceptance report
|
|
34
|
+
if: always()
|
|
35
|
+
uses: actions/upload-artifact@v4
|
|
36
|
+
with:
|
|
37
|
+
name: acceptance-report
|
|
38
|
+
path: ACCEPTANCE_REPORT.md
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
|
|
8
|
+
concurrency:
|
|
9
|
+
group: ci-${{ github.ref }}
|
|
10
|
+
cancel-in-progress: true
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
check:
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
steps:
|
|
16
|
+
- uses: actions/checkout@v7
|
|
17
|
+
|
|
18
|
+
- name: Install uv
|
|
19
|
+
uses: astral-sh/setup-uv@v8.2.0
|
|
20
|
+
with:
|
|
21
|
+
enable-cache: true
|
|
22
|
+
|
|
23
|
+
- name: Install Python and dependencies
|
|
24
|
+
run: uv sync --locked
|
|
25
|
+
|
|
26
|
+
- name: Lint (ruff)
|
|
27
|
+
run: uv run ruff check
|
|
28
|
+
|
|
29
|
+
- name: Type-check (mypy --strict)
|
|
30
|
+
run: uv run mypy --strict src
|
|
31
|
+
|
|
32
|
+
- name: Test (pytest)
|
|
33
|
+
run: uv run pytest -q
|
|
34
|
+
|
|
35
|
+
- name: Conformance gate (kosha validate)
|
|
36
|
+
run: uv run kosha validate tests/fixtures/good_bundle
|
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
# Byte-compiled / optimized / DLL files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[codz]
|
|
4
|
+
*$py.class
|
|
5
|
+
|
|
6
|
+
# C extensions
|
|
7
|
+
*.so
|
|
8
|
+
|
|
9
|
+
# Distribution / packaging
|
|
10
|
+
.Python
|
|
11
|
+
build/
|
|
12
|
+
develop-eggs/
|
|
13
|
+
dist/
|
|
14
|
+
downloads/
|
|
15
|
+
eggs/
|
|
16
|
+
.eggs/
|
|
17
|
+
lib/
|
|
18
|
+
lib64/
|
|
19
|
+
parts/
|
|
20
|
+
sdist/
|
|
21
|
+
var/
|
|
22
|
+
wheels/
|
|
23
|
+
share/python-wheels/
|
|
24
|
+
*.egg-info/
|
|
25
|
+
.installed.cfg
|
|
26
|
+
*.egg
|
|
27
|
+
MANIFEST
|
|
28
|
+
|
|
29
|
+
# PyInstaller
|
|
30
|
+
# Usually these files are written by a python script from a template
|
|
31
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
32
|
+
*.manifest
|
|
33
|
+
*.spec
|
|
34
|
+
|
|
35
|
+
# Installer logs
|
|
36
|
+
pip-log.txt
|
|
37
|
+
pip-delete-this-directory.txt
|
|
38
|
+
|
|
39
|
+
# Unit test / coverage reports
|
|
40
|
+
htmlcov/
|
|
41
|
+
.tox/
|
|
42
|
+
.nox/
|
|
43
|
+
.coverage
|
|
44
|
+
.coverage.*
|
|
45
|
+
.cache
|
|
46
|
+
nosetests.xml
|
|
47
|
+
coverage.xml
|
|
48
|
+
*.cover
|
|
49
|
+
*.py.cover
|
|
50
|
+
.hypothesis/
|
|
51
|
+
.pytest_cache/
|
|
52
|
+
cover/
|
|
53
|
+
|
|
54
|
+
# Translations
|
|
55
|
+
*.mo
|
|
56
|
+
*.pot
|
|
57
|
+
|
|
58
|
+
# Django stuff:
|
|
59
|
+
*.log
|
|
60
|
+
local_settings.py
|
|
61
|
+
db.sqlite3
|
|
62
|
+
db.sqlite3-journal
|
|
63
|
+
|
|
64
|
+
# Flask stuff:
|
|
65
|
+
instance/
|
|
66
|
+
.webassets-cache
|
|
67
|
+
|
|
68
|
+
# Scrapy stuff:
|
|
69
|
+
.scrapy
|
|
70
|
+
|
|
71
|
+
# Sphinx documentation
|
|
72
|
+
docs/_build/
|
|
73
|
+
|
|
74
|
+
# PyBuilder
|
|
75
|
+
.pybuilder/
|
|
76
|
+
target/
|
|
77
|
+
|
|
78
|
+
# Jupyter Notebook
|
|
79
|
+
.ipynb_checkpoints
|
|
80
|
+
|
|
81
|
+
# IPython
|
|
82
|
+
profile_default/
|
|
83
|
+
ipython_config.py
|
|
84
|
+
|
|
85
|
+
# pyenv
|
|
86
|
+
# For a library or package, you might want to ignore these files since the code is
|
|
87
|
+
# intended to run in multiple environments; otherwise, check them in:
|
|
88
|
+
# .python-version
|
|
89
|
+
|
|
90
|
+
# pipenv
|
|
91
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
|
92
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
93
|
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
|
94
|
+
# install all needed dependencies.
|
|
95
|
+
# Pipfile.lock
|
|
96
|
+
|
|
97
|
+
# UV
|
|
98
|
+
# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
|
|
99
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
100
|
+
# commonly ignored for libraries.
|
|
101
|
+
# uv.lock
|
|
102
|
+
|
|
103
|
+
# poetry
|
|
104
|
+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
|
105
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
106
|
+
# commonly ignored for libraries.
|
|
107
|
+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
|
108
|
+
# poetry.lock
|
|
109
|
+
# poetry.toml
|
|
110
|
+
|
|
111
|
+
# pdm
|
|
112
|
+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
|
113
|
+
# pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
|
|
114
|
+
# https://pdm-project.org/en/latest/usage/project/#working-with-version-control
|
|
115
|
+
# pdm.lock
|
|
116
|
+
# pdm.toml
|
|
117
|
+
.pdm-python
|
|
118
|
+
.pdm-build/
|
|
119
|
+
|
|
120
|
+
# pixi
|
|
121
|
+
# Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
|
|
122
|
+
# pixi.lock
|
|
123
|
+
# Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
|
|
124
|
+
# in the .venv directory. It is recommended not to include this directory in version control.
|
|
125
|
+
.pixi
|
|
126
|
+
|
|
127
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
|
128
|
+
__pypackages__/
|
|
129
|
+
|
|
130
|
+
# Celery stuff
|
|
131
|
+
celerybeat-schedule
|
|
132
|
+
celerybeat.pid
|
|
133
|
+
|
|
134
|
+
# Redis
|
|
135
|
+
*.rdb
|
|
136
|
+
*.aof
|
|
137
|
+
*.pid
|
|
138
|
+
|
|
139
|
+
# RabbitMQ
|
|
140
|
+
mnesia/
|
|
141
|
+
rabbitmq/
|
|
142
|
+
rabbitmq-data/
|
|
143
|
+
|
|
144
|
+
# ActiveMQ
|
|
145
|
+
activemq-data/
|
|
146
|
+
|
|
147
|
+
# SageMath parsed files
|
|
148
|
+
*.sage.py
|
|
149
|
+
|
|
150
|
+
# Environments
|
|
151
|
+
.env
|
|
152
|
+
.envrc
|
|
153
|
+
.venv
|
|
154
|
+
env/
|
|
155
|
+
venv/
|
|
156
|
+
ENV/
|
|
157
|
+
env.bak/
|
|
158
|
+
venv.bak/
|
|
159
|
+
|
|
160
|
+
# Spyder project settings
|
|
161
|
+
.spyderproject
|
|
162
|
+
.spyproject
|
|
163
|
+
|
|
164
|
+
# Rope project settings
|
|
165
|
+
.ropeproject
|
|
166
|
+
|
|
167
|
+
# mkdocs documentation
|
|
168
|
+
/site
|
|
169
|
+
|
|
170
|
+
# mypy
|
|
171
|
+
.mypy_cache/
|
|
172
|
+
.dmypy.json
|
|
173
|
+
dmypy.json
|
|
174
|
+
|
|
175
|
+
# Pyre type checker
|
|
176
|
+
.pyre/
|
|
177
|
+
|
|
178
|
+
# pytype static type analyzer
|
|
179
|
+
.pytype/
|
|
180
|
+
|
|
181
|
+
# Cython debug symbols
|
|
182
|
+
cython_debug/
|
|
183
|
+
|
|
184
|
+
# PyCharm
|
|
185
|
+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
|
186
|
+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
|
187
|
+
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
|
188
|
+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
|
189
|
+
# .idea/
|
|
190
|
+
|
|
191
|
+
# Abstra
|
|
192
|
+
# Abstra is an AI-powered process automation framework.
|
|
193
|
+
# Ignore directories containing user credentials, local state, and settings.
|
|
194
|
+
# Learn more at https://abstra.io/docs
|
|
195
|
+
.abstra/
|
|
196
|
+
|
|
197
|
+
# Visual Studio Code
|
|
198
|
+
# Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
|
|
199
|
+
# that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
|
|
200
|
+
# and can be added to the global gitignore or merged into this file. However, if you prefer,
|
|
201
|
+
# you could uncomment the following to ignore the entire vscode folder
|
|
202
|
+
# .vscode/
|
|
203
|
+
# Temporary file for partial code execution
|
|
204
|
+
tempCodeRunnerFile.py
|
|
205
|
+
|
|
206
|
+
# Ruff stuff:
|
|
207
|
+
.ruff_cache/
|
|
208
|
+
|
|
209
|
+
# PyPI configuration file
|
|
210
|
+
.pypirc
|
|
211
|
+
|
|
212
|
+
# Marimo
|
|
213
|
+
marimo/_static/
|
|
214
|
+
marimo/_lsp/
|
|
215
|
+
__marimo__/
|
|
216
|
+
|
|
217
|
+
# Streamlit
|
|
218
|
+
.streamlit/secrets.toml
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
3.12
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# Kosha MVP Acceptance Report
|
|
2
|
+
|
|
3
|
+
**Verdict: PASS** - the MVP success contract holds on the reference corpus.
|
|
4
|
+
|
|
5
|
+
## Setup
|
|
6
|
+
|
|
7
|
+
- Corpus: `bundles/northwind` (12 concepts)
|
|
8
|
+
- Embedding provider: `lexical-hash-256`
|
|
9
|
+
- Generation provider: `extractive-3`
|
|
10
|
+
|
|
11
|
+
Token figures are deterministic (fixed corpus, fixed queries, deterministic local providers); latency is wall-clock and environment-dependent, so the latency gate falls back to the deterministic round-trip comparison below the wall-clock noise floor.
|
|
12
|
+
|
|
13
|
+
## Criteria
|
|
14
|
+
|
|
15
|
+
| Criterion | Result | Target |
|
|
16
|
+
|---|---|---|
|
|
17
|
+
| C1-token-latency Hybrid token cost < RAG (at matched quality) and latency within RAG margin | PASS | hybrid total tokens < raw-docs baseline AND hybrid tokens-per-recall < RAG; hybrid latency within 2x RAG (round-trip comparison below 5ms wall-clock) |
|
|
18
|
+
| C2-duplicate-rate Duplicate-rate ~= 0 after repeated ingests | PASS | duplicate-rate <= 0.00 on a re-ingest of the corpus |
|
|
19
|
+
| C3-fidelity Fidelity preserved across >=20 sequential ingests | PASS | no edit-drift across >=20 ingests |
|
|
20
|
+
| C4-contradiction-safety Contradictions resolved-or-escalated, 0 silent overwrites | PASS | 100% of injected contradictions resolved-or-escalated; 0 silent overwrites |
|
|
21
|
+
|
|
22
|
+
### C1-token-latency — PASS
|
|
23
|
+
|
|
24
|
+
_Hybrid token cost < RAG (at matched quality) and latency within RAG margin_
|
|
25
|
+
|
|
26
|
+
tokens: hybrid 602 vs RAG 541 vs raw-docs 1131; concept recall: hybrid 1.00 vs RAG 0.62; tokens-per-recall: hybrid 602 vs RAG 865 (PASS); hybrid < raw-docs PASS. latency: hybrid 2 round-trips vs RAG 2, 0.34ms vs 0.49ms (0.69x, margin 2x; wall-clock below noise floor).
|
|
27
|
+
|
|
28
|
+
### C2-duplicate-rate — PASS
|
|
29
|
+
|
|
30
|
+
_Duplicate-rate ~= 0 after repeated ingests_
|
|
31
|
+
|
|
32
|
+
re-ingesting 12 existing concepts: 0 CREATE / 12 UPDATE; duplicate-rate 0.000.
|
|
33
|
+
|
|
34
|
+
### C3-fidelity — PASS
|
|
35
|
+
|
|
36
|
+
_Fidelity preserved across >=20 sequential ingests_
|
|
37
|
+
|
|
38
|
+
20 sequential ingests: body==claim projection True; every in-force claim grounded True; unrelated claim byte-identical True; OKF-conformant each step True; latest statement reflected, telephone-game absent True.
|
|
39
|
+
|
|
40
|
+
### C4-contradiction-safety — PASS
|
|
41
|
+
|
|
42
|
+
_Contradictions resolved-or-escalated, 0 silent overwrites_
|
|
43
|
+
|
|
44
|
+
12 injected contradictions: 12 detected; 11 resolved (temporal/authority) + 1 escalated = 12 handled; 0 silent overwrites.
|
|
45
|
+
|
|
46
|
+
## Decision
|
|
47
|
+
|
|
48
|
+
All success criteria: **PASS**. The MVP meets its measured success contract.
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
# Contributing
|
|
2
|
+
|
|
3
|
+
Kosha is a deterministic spine with isolated, eval-gated LLM surfaces. Contributions are expected to keep that shape: code owns control flow, file I/O, conformance, and traversal; the model is touched only behind a typed provider interface with an eval suite. Read [system design §1](docs/system_design.md) before changing the architecture.
|
|
4
|
+
|
|
5
|
+
## Development setup
|
|
6
|
+
|
|
7
|
+
Requires Python ≥ 3.12 and [`uv`](https://docs.astral.sh/uv/).
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
git clone <repo-url> kosha && cd kosha
|
|
11
|
+
uv sync # runtime + dev toolchain (ruff, mypy, pytest, mcp)
|
|
12
|
+
uv run kosha --version
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Use `uv` only — never `pip`. Add dependencies with `uv add` (or `uv add --dev` for tooling).
|
|
16
|
+
|
|
17
|
+
## The gate set
|
|
18
|
+
|
|
19
|
+
CI runs these on every push and pull request ([`.github/workflows/ci.yml`](.github/workflows/ci.yml)). Run them locally before opening a PR — they are the contract:
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
uv run ruff check # lint
|
|
23
|
+
uv run mypy --strict src # type-check (strict)
|
|
24
|
+
uv run pytest -q # tests
|
|
25
|
+
uv run kosha validate tests/fixtures/good_bundle # conformance gate
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
All four must pass. The acceptance gate and per-surface eval suites run separately (and may make model calls when a non-local provider is configured), so they are opt-in via the manual `Acceptance` workflow:
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
uv run kosha bench acceptance --report ACCEPTANCE_REPORT.md
|
|
32
|
+
uv run pytest evals -q
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Code style
|
|
36
|
+
|
|
37
|
+
Enforced by `ruff` and `mypy --strict` (config in [`pyproject.toml`](pyproject.toml)):
|
|
38
|
+
|
|
39
|
+
- Line length 100, target `py312`.
|
|
40
|
+
- Lint rule sets: `E`, `F`, `I`, `UP`, `B`, `SIM`, `RUF`.
|
|
41
|
+
- `from __future__ import annotations` at the top of every module.
|
|
42
|
+
- Built-in generics and `|` unions; no `typing.Any` in generics. Full strict typing — no untyped defs, no implicit `Any`.
|
|
43
|
+
- Pydantic models for every typed boundary.
|
|
44
|
+
|
|
45
|
+
No silent failures: fail loud rather than falling back. A half-configured provider should error, not degrade to a default (see [configuration](docs/configuration.md)). No `try/except ImportError`, no placeholder/mock values in shipped code.
|
|
46
|
+
|
|
47
|
+
## Tests
|
|
48
|
+
|
|
49
|
+
`tests/` mirrors the source tree — one directory per subsystem (`okf/`, `dedup/`, `merge/`, `contradiction/`, `link/`, `indexlog/`, `pipeline/`, `mcp/`, `providers/`, `index/`, `bench/`, `validate/`). `evals/` holds the per-LLM-surface eval gates scored against the seed labels in `labels/`.
|
|
50
|
+
|
|
51
|
+
When adding behavior:
|
|
52
|
+
|
|
53
|
+
- Add tests next to the subsystem you changed; assert observable behavior and invariants (round-trip stability, no edit-drift, no silent overwrite), not incidental defaults.
|
|
54
|
+
- Touching an LLM surface (extract, dedup, merge, relate, contradict) means updating its eval suite under `evals/` and, where relevant, the seed labels.
|
|
55
|
+
- Changing the on-disk format means updating the conformance/round-trip tests under `tests/okf` and `tests/validate`.
|
|
56
|
+
- Keep the default providers deterministic so the suite stays offline and reproducible.
|
|
57
|
+
|
|
58
|
+
`pytest` discovers both `tests` and `evals` (`testpaths` in `pyproject.toml`).
|
|
59
|
+
|
|
60
|
+
## Commits and pull requests
|
|
61
|
+
|
|
62
|
+
Follow [Conventional Commits 1.0.0](https://www.conventionalcommits.org/):
|
|
63
|
+
|
|
64
|
+
```text
|
|
65
|
+
<type>[optional scope]: <description>
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
Types: `feat`, `fix`, `docs`, `style`, `refactor`, `perf`, `test`, `build`, `ci`, `chore`, `revert`. Subject in imperative mood, lowercase, no trailing period, ≤72 chars. Breaking changes use `!` and/or a `BREAKING CHANGE:` footer.
|
|
69
|
+
|
|
70
|
+
- One logical change per commit.
|
|
71
|
+
- PR titles are valid Conventional Commit subjects (squash-merge uses them as the commit message).
|
|
72
|
+
- PR body: what and why; call out breaking changes; link issues with `Closes #N` / `Refs #N`.
|
|
73
|
+
- The PR must pass the full gate set above before review.
|
|
74
|
+
|
|
75
|
+
## Non-negotiables
|
|
76
|
+
|
|
77
|
+
- The artifact stays open and self-sufficient: output is plain OKF files; no proprietary store on the critical path.
|
|
78
|
+
- Every write goes through the plan → approve → commit gate; no silent mutation of a bundle.
|
|
79
|
+
- Conformance is a gate, not a guideline: non-conformant output never reaches `main`.
|
|
80
|
+
- Model- and cloud-neutral: no dependency on a specific model, cloud, or agent framework outside the provider layer.
|
kosha_okf-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
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, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright [yyyy] [name of copyright owner]
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|