@purpleraven/hits 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +298 -0
- package/LICENSE +190 -0
- package/README.md +336 -0
- package/bin/hits.js +56 -0
- package/config/schema.json +94 -0
- package/config/settings.yaml +102 -0
- package/data/dev_handover.yaml +143 -0
- package/hits_core/__init__.py +9 -0
- package/hits_core/ai/__init__.py +11 -0
- package/hits_core/ai/compressor.py +86 -0
- package/hits_core/ai/llm_client.py +65 -0
- package/hits_core/ai/slm_filter.py +126 -0
- package/hits_core/api/__init__.py +3 -0
- package/hits_core/api/routes/__init__.py +8 -0
- package/hits_core/api/routes/auth.py +211 -0
- package/hits_core/api/routes/handover.py +117 -0
- package/hits_core/api/routes/health.py +8 -0
- package/hits_core/api/routes/knowledge.py +177 -0
- package/hits_core/api/routes/node.py +121 -0
- package/hits_core/api/routes/work_log.py +174 -0
- package/hits_core/api/server.py +181 -0
- package/hits_core/auth/__init__.py +21 -0
- package/hits_core/auth/dependencies.py +61 -0
- package/hits_core/auth/manager.py +368 -0
- package/hits_core/auth/middleware.py +69 -0
- package/hits_core/collector/__init__.py +18 -0
- package/hits_core/collector/ai_session_collector.py +118 -0
- package/hits_core/collector/base.py +73 -0
- package/hits_core/collector/daemon.py +94 -0
- package/hits_core/collector/git_collector.py +177 -0
- package/hits_core/collector/hits_action_collector.py +110 -0
- package/hits_core/collector/shell_collector.py +178 -0
- package/hits_core/main.py +36 -0
- package/hits_core/mcp/__init__.py +20 -0
- package/hits_core/mcp/server.py +429 -0
- package/hits_core/models/__init__.py +18 -0
- package/hits_core/models/node.py +56 -0
- package/hits_core/models/tree.py +68 -0
- package/hits_core/models/work_log.py +64 -0
- package/hits_core/models/workflow.py +92 -0
- package/hits_core/platform/__init__.py +5 -0
- package/hits_core/platform/actions.py +225 -0
- package/hits_core/service/__init__.py +6 -0
- package/hits_core/service/handover_service.py +382 -0
- package/hits_core/service/knowledge_service.py +172 -0
- package/hits_core/service/tree_service.py +105 -0
- package/hits_core/storage/__init__.py +11 -0
- package/hits_core/storage/base.py +84 -0
- package/hits_core/storage/file_store.py +314 -0
- package/hits_core/storage/redis_store.py +123 -0
- package/hits_web/dist/assets/index-Bgx7F6m6.css +1 -0
- package/hits_web/dist/assets/index-D1B5E67G.js +3 -0
- package/hits_web/dist/index.html +16 -0
- package/package.json +60 -0
- package/requirements-core.txt +7 -0
- package/requirements.txt +1 -0
- package/run.sh +271 -0
- package/server.js +234 -0
package/AGENTS.md
ADDED
|
@@ -0,0 +1,298 @@
|
|
|
1
|
+
# AGENTS.md
|
|
2
|
+
|
|
3
|
+
Development guidelines for AI assistants (opencode, Claude, Cursor, etc.) working on this project.
|
|
4
|
+
|
|
5
|
+
## Pre-flight Checks
|
|
6
|
+
|
|
7
|
+
**ALWAYS run before making code changes:**
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
./run.sh --check
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
This verifies:
|
|
14
|
+
1. Core imports work correctly (models, storage, auth, API)
|
|
15
|
+
2. Configuration files exist
|
|
16
|
+
3. Frontend is built
|
|
17
|
+
|
|
18
|
+
If pre-flight checks fail, fix the errors before proceeding.
|
|
19
|
+
|
|
20
|
+
## AI Session Handover Protocol
|
|
21
|
+
|
|
22
|
+
토큰 한계 등으로 AI 세션이 교체될 때, 프로젝트별 인수인계가 자동으로 동작합니다.
|
|
23
|
+
모든 데이터는 `~/.hits/data/`에 중앙 집중 저장되며, 프로젝트 경로로 격리됩니다.
|
|
24
|
+
|
|
25
|
+
### 세션 시작 시
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
# HTTP API (HITS 서버 실행 중일 때)
|
|
29
|
+
curl -s "http://localhost:8765/api/handover?project_path=$(pwd)" | python -m json.tool
|
|
30
|
+
|
|
31
|
+
# 또는 MCP 툴 (HITS MCP가 설정된 경우):
|
|
32
|
+
# hits_get_handover → 이전 세션의 작업 내용, 결정 사항, 미완료 항목 조회
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### 세션 종료 시 (반드시 기록)
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
curl -X POST http://localhost:8765/api/work-log \
|
|
39
|
+
-H "Content-Type: application/json" \
|
|
40
|
+
-d '{
|
|
41
|
+
"performed_by": "<AI_도구_이름>",
|
|
42
|
+
"request_text": "<작업 요약>",
|
|
43
|
+
"context": "<상세 내용, 결정 사항>",
|
|
44
|
+
"source": "ai_session",
|
|
45
|
+
"tags": ["<태그>"],
|
|
46
|
+
"project_path": "<프로젝트_절대경로>",
|
|
47
|
+
"result_data": {
|
|
48
|
+
"files_modified": ["<수정한_파일>"],
|
|
49
|
+
"commands_run": ["<실행한_명령>"]
|
|
50
|
+
}
|
|
51
|
+
}'
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
### performed_by 규칙
|
|
55
|
+
|
|
56
|
+
| AI 도구 | performed_by 값 |
|
|
57
|
+
|---------|----------------|
|
|
58
|
+
| OpenCode | `"opencode"` |
|
|
59
|
+
| Claude Code | `"claude"` |
|
|
60
|
+
| Cursor | `"cursor"` |
|
|
61
|
+
| GitHub Copilot | `"copilot"` |
|
|
62
|
+
| 사용자 직접 | `"manual"` 또는 사용자명 |
|
|
63
|
+
|
|
64
|
+
### project_path 규칙
|
|
65
|
+
|
|
66
|
+
- **항상 절대경로 사용**: `"/home/user/source/my-project"` (O), `"./my-project"` (X)
|
|
67
|
+
- **자동 감지**: CWD에서 `.git` 디렉토리가 있는 루트를 프로젝트 경로로 사용
|
|
68
|
+
- **프로젝트별 격리**: 서로 다른 `project_path`는 완전히 독립된 인수인계 컨텍스트를 가짐
|
|
69
|
+
|
|
70
|
+
### MCP 툴 사용 (권장)
|
|
71
|
+
|
|
72
|
+
HITS MCP 서버가 설정된 경우, HTTP API 대신 직접 툴 호출:
|
|
73
|
+
|
|
74
|
+
```
|
|
75
|
+
hits_record_work → 작업 기록 (project_path 자동 감지)
|
|
76
|
+
hits_get_handover → 인수인계 요약 조회
|
|
77
|
+
hits_search_works → 이전 작업 검색
|
|
78
|
+
hits_list_projects → 프로젝트 목록
|
|
79
|
+
hits_get_recent → 최근 작업 조회
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
### 기록 시점
|
|
83
|
+
|
|
84
|
+
- 사용자와 긴 작업 세션 종료 시
|
|
85
|
+
- 주요 기능 구현 완료 시
|
|
86
|
+
- 버그 수정 완료 시
|
|
87
|
+
- 사용자가 명시적으로 종료 요청 시
|
|
88
|
+
- **토큰 한계 경고 수신 시** (즉시 기록!)
|
|
89
|
+
|
|
90
|
+
### 데이터 저장소
|
|
91
|
+
|
|
92
|
+
| 위치 | 설명 |
|
|
93
|
+
|------|------|
|
|
94
|
+
| `~/.hits/data/work_logs/` | 작업 기록 (JSON) |
|
|
95
|
+
| `~/.hits/data/trees/` | 지식 트리 |
|
|
96
|
+
| `~/.hits/data/workflows/` | 워크플로우 |
|
|
97
|
+
| `~/.hits/.auth/` | 인증 데이터 (권한 600/700) |
|
|
98
|
+
| `HITS_DATA_PATH` 환경변수 | 저장소 경로 오버라이드 |
|
|
99
|
+
|
|
100
|
+
## API Endpoints
|
|
101
|
+
|
|
102
|
+
### 인증
|
|
103
|
+
|
|
104
|
+
| Method | Path | Description |
|
|
105
|
+
|--------|------|-------------|
|
|
106
|
+
| GET | `/api/auth/status` | 인증 상태 (초기화 여부, 로그인 여부) |
|
|
107
|
+
| POST | `/api/auth/register` | 사용자 등록 (첫 사용자 = admin) |
|
|
108
|
+
| POST | `/api/auth/login` | 로그인 (HttpOnly 쿠키 설정) |
|
|
109
|
+
| POST | `/api/auth/logout` | 로그아웃 |
|
|
110
|
+
| POST | `/api/auth/refresh` | 액세스 토큰 갱신 |
|
|
111
|
+
| GET | `/api/auth/me` | 현재 사용자 정보 |
|
|
112
|
+
| PUT | `/api/auth/password` | 비밀번호 변경 |
|
|
113
|
+
|
|
114
|
+
### 작업 기록
|
|
115
|
+
|
|
116
|
+
| Method | Path | Description |
|
|
117
|
+
|--------|------|-------------|
|
|
118
|
+
| GET | `/api/health` | 서버 상태 확인 |
|
|
119
|
+
| POST | `/api/work-log` | 작업 기록 생성 |
|
|
120
|
+
| GET | `/api/work-logs` | 작업 기록 목록 (`project_path` 필터 지원) |
|
|
121
|
+
| GET | `/api/work-logs/search?q=키워드` | 작업 검색 (`project_path` 필터 지원) |
|
|
122
|
+
| GET | `/api/work-log/{id}` | 단건 조회 |
|
|
123
|
+
| PUT | `/api/work-log/{id}` | 수정 |
|
|
124
|
+
| DELETE | `/api/work-log/{id}` | 삭제 |
|
|
125
|
+
|
|
126
|
+
### 인수인계
|
|
127
|
+
|
|
128
|
+
| Method | Path | Description |
|
|
129
|
+
|--------|------|-------------|
|
|
130
|
+
| GET | `/api/handover?project_path=...` | 프로젝트별 인수인계 요약 |
|
|
131
|
+
| GET | `/api/handover/projects` | 프로젝트 목록 |
|
|
132
|
+
| GET | `/api/handover/project-stats?project_path=...` | 프로젝트 통계 |
|
|
133
|
+
|
|
134
|
+
### 지식 카테고리
|
|
135
|
+
|
|
136
|
+
| Method | Path | Description |
|
|
137
|
+
|--------|------|-------------|
|
|
138
|
+
| GET | `/api/knowledge/categories` | 카테고리 목록 |
|
|
139
|
+
| POST | `/api/knowledge/category` | 카테고리 생성 |
|
|
140
|
+
| PUT | `/api/knowledge/category/{name}` | 카테고리 수정 |
|
|
141
|
+
| DELETE | `/api/knowledge/category/{name}` | 카테고리 삭제 |
|
|
142
|
+
| POST | `/api/knowledge/category/{name}/nodes` | 노드 추가 |
|
|
143
|
+
| PUT | `/api/knowledge/category/{name}/nodes/{idx}` | 노드 수정 |
|
|
144
|
+
| DELETE | `/api/knowledge/category/{name}/nodes/{idx}` | 노드 삭제 |
|
|
145
|
+
|
|
146
|
+
### 지식 트리 (노드 기반)
|
|
147
|
+
|
|
148
|
+
| Method | Path | Description |
|
|
149
|
+
|--------|------|-------------|
|
|
150
|
+
| POST | `/api/node` | 지식 노드 생성 |
|
|
151
|
+
| PUT | `/api/node/{id}` | 지식 노드 수정 |
|
|
152
|
+
| DELETE | `/api/node/{id}` | 지식 노드 삭제 |
|
|
153
|
+
|
|
154
|
+
## Development Workflow
|
|
155
|
+
|
|
156
|
+
1. Before making changes:
|
|
157
|
+
```bash
|
|
158
|
+
./run.sh --check
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
2. After code changes:
|
|
162
|
+
```bash
|
|
163
|
+
# Clear cache
|
|
164
|
+
find . -type d -name "__pycache__" -exec rm -rf {} +
|
|
165
|
+
|
|
166
|
+
# Run checks again
|
|
167
|
+
./run.sh --check
|
|
168
|
+
|
|
169
|
+
# Run tests if needed
|
|
170
|
+
./run.sh --test
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
3. If frontend changes:
|
|
174
|
+
```bash
|
|
175
|
+
cd hits_web && npm run build
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
4. Development mode (hot reload):
|
|
179
|
+
```bash
|
|
180
|
+
./run.sh --dev
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
## Project Structure
|
|
184
|
+
|
|
185
|
+
```
|
|
186
|
+
hits_core/ # Apache 2.0 - Backend
|
|
187
|
+
├── auth/ # Authentication & security
|
|
188
|
+
│ ├── manager.py # Argon2id + JWT + user management
|
|
189
|
+
│ ├── middleware.py # CSP, security headers
|
|
190
|
+
│ └── dependencies.py # FastAPI auth dependencies
|
|
191
|
+
├── models/ # Node, Tree, Workflow, WorkLog
|
|
192
|
+
├── storage/ # Redis, File storage (~/.hits/data/)
|
|
193
|
+
├── ai/ # Compression, SLM filter, LLM client
|
|
194
|
+
├── platform/ # Cross-platform utilities
|
|
195
|
+
├── service/ # TreeService, HandoverService, KnowledgeService
|
|
196
|
+
├── api/ # FastAPI server + routes
|
|
197
|
+
│ └── routes/ # health, work_log, node, handover, auth, knowledge
|
|
198
|
+
├── collector/ # Git, Shell, AI session collectors
|
|
199
|
+
├── mcp/ # MCP server (stdio transport)
|
|
200
|
+
└── main.py # Web server entry point
|
|
201
|
+
|
|
202
|
+
hits_web/ # Apache 2.0 - Svelte 5 Web UI
|
|
203
|
+
├── src/
|
|
204
|
+
│ ├── lib/ # API client, stores, CSS
|
|
205
|
+
│ ├── components/ # Svelte components
|
|
206
|
+
│ │ ├── Login.svelte # Authentication page
|
|
207
|
+
│ │ ├── MainLayout.svelte # App shell with sidebar + header
|
|
208
|
+
│ │ ├── KnowledgeTree.svelte # Knowledge category CRUD
|
|
209
|
+
│ │ ├── Timeline.svelte # Work log timeline
|
|
210
|
+
│ │ └── HandoverPanel.svelte # Handover summary view
|
|
211
|
+
│ ├── App.svelte # Root component
|
|
212
|
+
│ └── main.ts # Entry point
|
|
213
|
+
├── dist/ # Built static files (served by FastAPI)
|
|
214
|
+
├── package.json
|
|
215
|
+
├── vite.config.ts
|
|
216
|
+
└── tsconfig.json
|
|
217
|
+
|
|
218
|
+
config/ # Configuration files
|
|
219
|
+
├── settings.yaml # Main config
|
|
220
|
+
└── schema.json # JSON schema
|
|
221
|
+
|
|
222
|
+
tests/ # Test files
|
|
223
|
+
└── core/ # Core tests
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
## Security Architecture
|
|
227
|
+
|
|
228
|
+
### Authentication Flow
|
|
229
|
+
|
|
230
|
+
```
|
|
231
|
+
Browser → POST /api/auth/login → Argon2id verify → JWT HttpOnly cookies
|
|
232
|
+
← Set-Cookie: access_token (15min, /)
|
|
233
|
+
← Set-Cookie: refresh_token (7d, /api/auth/refresh)
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
### Protected Endpoints
|
|
237
|
+
|
|
238
|
+
All `/api/*` endpoints except `/api/health`, `/api/auth/*` require authentication via:
|
|
239
|
+
- `access_token` HttpOnly cookie, OR
|
|
240
|
+
- `Authorization: Bearer <token>` header
|
|
241
|
+
|
|
242
|
+
### Data Protection
|
|
243
|
+
|
|
244
|
+
- Password files: `chmod 600` (owner read/write only)
|
|
245
|
+
- Auth directory: `chmod 700` (owner access only)
|
|
246
|
+
- Pepper/JWT secret: auto-generated, stored in `~/.hits/`
|
|
247
|
+
|
|
248
|
+
## Common Issues and Solutions
|
|
249
|
+
|
|
250
|
+
### Import Errors
|
|
251
|
+
```
|
|
252
|
+
ModuleNotFoundError: No module named 'hits_core.auth'
|
|
253
|
+
```
|
|
254
|
+
|
|
255
|
+
**Solution:**
|
|
256
|
+
1. Reinstall dependencies: `./run.sh --setup`
|
|
257
|
+
2. Run: `./run.sh --check`
|
|
258
|
+
|
|
259
|
+
### Frontend Not Loading
|
|
260
|
+
```
|
|
261
|
+
HITS Web UI not built yet
|
|
262
|
+
```
|
|
263
|
+
|
|
264
|
+
**Solution:**
|
|
265
|
+
```bash
|
|
266
|
+
cd hits_web && npm install && npm run build
|
|
267
|
+
```
|
|
268
|
+
|
|
269
|
+
### Auth System Not Initialized
|
|
270
|
+
|
|
271
|
+
First run requires creating an admin account through the web UI or API:
|
|
272
|
+
```bash
|
|
273
|
+
curl -X POST http://localhost:8765/api/auth/register \
|
|
274
|
+
-H "Content-Type: application/json" \
|
|
275
|
+
-d '{"username":"admin","password":"your-secure-password"}'
|
|
276
|
+
```
|
|
277
|
+
|
|
278
|
+
## Testing
|
|
279
|
+
|
|
280
|
+
Run tests with:
|
|
281
|
+
```bash
|
|
282
|
+
./run.sh --test
|
|
283
|
+
```
|
|
284
|
+
|
|
285
|
+
Or for specific tests:
|
|
286
|
+
```bash
|
|
287
|
+
source venv/bin/activate
|
|
288
|
+
python -m pytest tests/core/test_ai.py -v
|
|
289
|
+
```
|
|
290
|
+
|
|
291
|
+
## Key Reminders
|
|
292
|
+
|
|
293
|
+
- **hits_core**: No GUI dependencies. FastAPI serves both API and static frontend.
|
|
294
|
+
- **hits_web**: Svelte 5 frontend, built to `dist/` and served by FastAPI.
|
|
295
|
+
- **Security**: All sensitive endpoints require auth. Use `Depends(require_auth)`.
|
|
296
|
+
- **Centralized storage**: All data goes to `~/.hits/data/`, not `./data/`
|
|
297
|
+
- **Argon2id**: Preferred password hasher. Falls back to HMAC-SHA256 if not installed.
|
|
298
|
+
- **JWT**: Uses `python-jose` if available, falls back to HMAC-based tokens.
|
package/LICENSE
ADDED
|
@@ -0,0 +1,190 @@
|
|
|
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
|
+
Copyright 2024 HITS Team
|
|
179
|
+
|
|
180
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
181
|
+
you may not use this file except in compliance with the License.
|
|
182
|
+
You may obtain a copy of the License at
|
|
183
|
+
|
|
184
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
185
|
+
|
|
186
|
+
Unless required by applicable law or agreed to in writing, software
|
|
187
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
188
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
189
|
+
See the License for the specific language governing permissions and
|
|
190
|
+
limitations under the License.
|