commit 21aa81d2b053587c9d37bd2bef8be9314add7fe0 Author: Mortalus Date: Thu Feb 19 13:39:14 2026 +0100 chore: initial MCP preparation package 14-file blueprint including: - sources.yml with data source provenance - 12 golden contract tests with native-language search terms - 5-6 drift detection anchors - MCP Registry + npm package configs - Vercel deployment config (SMALL tier) - Security policies and issue templates Co-Authored-By: Claude Opus 4.6 diff --git a/.github/ISSUE_TEMPLATE/data-error.md b/.github/ISSUE_TEMPLATE/data-error.md new file mode 100644 index 0000000..46d5d62 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/data-error.md @@ -0,0 +1,39 @@ +--- +name: Data Error Report +about: Report incorrect, missing, or outdated legal data +title: "[DATA] " +labels: data-error, triage +assignees: '' +--- + +## Data Error Report + +### Which law or provision is affected? + +**Law/Act name:** +**Section/Article number:** +**Jurisdiction:** IL + +### What is wrong? + +- [ ] Incorrect text +- [ ] Missing provision +- [ ] Outdated version (amendment not reflected) +- [ ] Incorrect citation/URL +- [ ] Missing cross-reference +- [ ] Other (describe below) + +### Expected content + +Please provide the correct text or a link to the official source: + +### Official source URL + +Link to the authoritative source showing the correct content: + +### Additional context + +Any other information that would help us fix this issue. + +--- +*This MCP uses automated drift detection to catch upstream changes. If you're seeing stale data, it may already be flagged in our monitoring.* diff --git a/.github/SECURITY-SETUP.md b/.github/SECURITY-SETUP.md new file mode 100644 index 0000000..d9a60bb --- /dev/null +++ b/.github/SECURITY-SETUP.md @@ -0,0 +1,49 @@ +# Security Setup Guide (Internal) + +## Required Secrets + +Configure these secrets in the GitHub repository settings: + +| Secret | Purpose | Source | +|--------|---------|--------| +| `NPM_TOKEN` | npm publishing with provenance | npm.js account (Ansvar org) | +| `VERCEL_TOKEN` | Vercel deployment | Vercel dashboard | +| `VERCEL_ORG_ID` | Vercel organization | Vercel dashboard | +| `VERCEL_PROJECT_ID` | Vercel project | Vercel dashboard | + +## MCP Registry Publishing + +Registry publishing uses Azure Key Vault for signing: + +- **Vault:** `kv-ansvar-dev` +- **Key:** `mcp-registry-signing-key` +- **Algorithm:** ECDSA P-384 +- **DNS Auth:** `ansvar.eu` TXT record + +To publish: +```bash +mcp-publisher login dns azure-key-vault \ + --domain="ansvar.eu" \ + --vault "kv-ansvar-dev" \ + --key "mcp-registry-signing-key" + +mcp-publisher publish +``` + +## Branch Protection + +Enable these rules on `main`: +- Require pull request reviews (1 reviewer) +- Require status checks to pass (ci, contract-tests) +- Require branches to be up to date +- Do not allow bypassing the above settings + +## Security Scanning + +All 6 scanners are configured in `.github/workflows/ci.yml`: +- CodeQL (semantic SAST) +- Semgrep (pattern SAST) +- Trivy (dependency CVE) +- Gitleaks (secret detection) +- Socket Security (supply chain) +- OSSF Scorecard (security posture) diff --git a/.github/SECURITY.md b/.github/SECURITY.md new file mode 100644 index 0000000..e84b1ea --- /dev/null +++ b/.github/SECURITY.md @@ -0,0 +1,34 @@ +# Security Policy + +## Supported Versions + +| Version | Supported | +| ------- | ------------------ | +| 1.x.x | :white_check_mark: | + +## Reporting a Vulnerability + +If you discover a security vulnerability in Israel Law MCP, please report it responsibly: + +1. **Do NOT open a public issue** +2. Email **security@ansvar.eu** with: + - Description of the vulnerability + - Steps to reproduce + - Potential impact +3. You will receive acknowledgment within 48 hours +4. We aim to provide a fix within 7 days for critical issues + +## Data Accuracy + +For data accuracy issues (incorrect legal text, missing provisions, stale data), please use our [data error issue template](https://github.com/Ansvar-Systems/israel-law-mcp/issues/new?template=data-error.md). + +## Scope + +This policy covers: +- The npm package `@ansvar/israel-law-mcp` +- The Vercel deployment at `https://israel-law-mcp.vercel.app` +- The MCP server code in this repository + +Out of scope: +- The upstream legal data sources themselves +- Third-party dependencies (report to their maintainers) diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a3e9bdb --- /dev/null +++ b/.gitignore @@ -0,0 +1,10 @@ +node_modules/ +dist/ +*.db +!data/.gitkeep +.env +.env.* +*.tgz +coverage/ +.vercel/ +.DS_Store diff --git a/.vercelignore b/.vercelignore new file mode 100644 index 0000000..1beaafb --- /dev/null +++ b/.vercelignore @@ -0,0 +1,9 @@ +node_modules +__tests__ +fixtures +scripts +src +*.md +!README.md +tsconfig.json +.github diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..0009072 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,27 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [Unreleased] + +## [1.0.0] - 2026-XX-XX +### Added +- Initial release of Israel Law MCP +- `search_legislation` tool for full-text search across all Israeli statutes +- `get_provision` tool for retrieving specific articles/sections +- `get_provision_eu_basis` tool for international framework cross-references (GDPR adequacy) +- `validate_citation` tool for legal citation validation +- `check_statute_currency` tool for checking statute amendment status +- `list_laws` tool for browsing available legislation +- Contract tests with 12 golden test cases +- Drift detection with 6 stable provision anchors +- Health and version endpoints +- Vercel deployment (single tier bundled) +- npm package with stdio transport +- MCP Registry publishing + +[Unreleased]: https://github.com/Ansvar-Systems/israel-law-mcp/compare/v1.0.0...HEAD +[1.0.0]: https://github.com/Ansvar-Systems/israel-law-mcp/releases/tag/v1.0.0 diff --git a/README.md b/README.md new file mode 100644 index 0000000..a837384 --- /dev/null +++ b/README.md @@ -0,0 +1,142 @@ +# Israel Law MCP + +[![npm](https://img.shields.io/npm/v/@ansvar/israel-law-mcp)](https://www.npmjs.com/package/@ansvar/israel-law-mcp) +[![License](https://img.shields.io/badge/license-Apache--2.0-blue.svg)](LICENSE) +[![CI](https://github.com/Ansvar-Systems/israel-law-mcp/actions/workflows/ci.yml/badge.svg)](https://github.com/Ansvar-Systems/israel-law-mcp/actions/workflows/ci.yml) +[![MCP Registry](https://img.shields.io/badge/MCP-Registry-green)](https://registry.modelcontextprotocol.io/) +[![OpenSSF Scorecard](https://img.shields.io/ossf-scorecard/github.com/Ansvar-Systems/israel-law-mcp)](https://securityscorecards.dev/viewer/?uri=github.com/Ansvar-Systems/israel-law-mcp) + +A Model Context Protocol (MCP) server providing comprehensive access to Israeli legislation, including the Privacy Protection Law, Protection of Privacy Regulations (Data Security), Computer Law, Companies Law, Electronic Signature Law, and Credit Data Law with full-text search. + +## Deployment Tier + +**SMALL** -- Single tier, bundled SQLite database shipped with the npm package. + +**Estimated database size:** ~60-120 MB (full corpus of Israeli federal legislation with English translations) + +## Key Legislation Covered + +| Law | Year | Significance | +|-----|------|-------------| +| **Privacy Protection Law** | 1981 (amended) | Comprehensive privacy law; predates GDPR; Israel has EU adequacy decision; database registration regime | +| **Protection of Privacy Regulations (Data Security)** | 2017 | Specific technical and organisational security requirements for database owners; four security levels | +| **Computer Law** | 1995 | Criminalises unauthorised computer access, interference, and computer viruses | +| **Companies Law** | 1999 | Corporate governance, registration, directors' duties, and corporate obligations | +| **Electronic Signature Law** | 2001 | Legal recognition of electronic signatures and certification authorities | +| **Credit Data Law** | 2002 | Regulation of credit data collection, processing, and sharing | +| **Basic Law: Human Dignity and Liberty** | 1992 | Quasi-constitutional protection of human dignity and liberty including privacy | + +## Regulatory Context + +- **Data Protection Supervisory Authority:** Privacy Protection Authority (PPA), operating under the Ministry of Justice +- **Israel has an EU adequacy decision** under the Data Protection Directive, maintained under GDPR review, recognising Israel's data protection framework as providing adequate safeguards for data transfers from the EU +- **The Privacy Protection Law (1981)** established one of the earliest comprehensive data protection frameworks globally; it is being modernised to align more closely with GDPR +- **Protection of Privacy Regulations (Data Security) 2017** impose specific technical requirements at four security levels based on database sensitivity and size +- Israel is a **major global cybersecurity hub** (Unit 8200, extensive startup ecosystem), making its legal framework highly relevant to cybersecurity clients +- Israel uses a mixed legal system combining elements of common law, civil law, and religious law +- Hebrew is the legally binding language; English translations are available for major laws but are unofficial +- The Knesset (parliament) database and Nevo commercial database are the primary legal information sources + +## Data Sources + +| Source | Authority | Method | Update Frequency | License | Coverage | +|--------|-----------|--------|-----------------|---------|----------| +| [Knesset Legislation Database](https://main.knesset.gov.il/Activity/Legislation) | The Knesset | HTML Scrape | Weekly | Government Open Data | All primary legislation, Basic Laws, bills | +| [Nevo Legal Database](https://www.nevo.co.il) | Nevo (commercial) | HTML Scrape | Daily | Commercial (public law content) | Comprehensive legislation, regulations, court decisions | +| [Israeli Law Resource Center](https://www.gov.il/en/departments/legalinfo) | Government of Israel | HTML Scrape | Monthly | Government Publication | English translations of major laws | + +> Full provenance metadata: [`sources.yml`](./sources.yml) + +## Installation + +```bash +npm install -g @ansvar/israel-law-mcp +``` + +## Usage + +### As stdio MCP server + +```bash +israel-law-mcp +``` + +### In Claude Desktop / MCP client configuration + +```json +{ + "mcpServers": { + "israel-law": { + "command": "npx", + "args": ["-y", "@ansvar/israel-law-mcp"] + } + } +} +``` + +## Available Tools + +| Tool | Description | +|------|-------------| +| `get_provision` | Retrieve a specific section/article from an Israeli law | +| `search_legislation` | Full-text search across all Israeli legislation | +| `get_provision_eu_basis` | Cross-reference lookup for international framework relationships (GDPR adequacy, etc.) | + +## Development + +```bash +# Install dependencies +npm install + +# Build +npm run build + +# Run tests +npm test + +# Run contract tests +npm run test:contract + +# Run all validation +npm run validate + +# Build database from sources +npm run build:db + +# Start server +npm start +``` + +## Contract Tests + +This MCP includes 12 golden contract tests covering: +- 3 article retrieval tests (Privacy Protection Law, Companies Law) +- 3 search tests (privacy, data security, computer) +- 2 citation roundtrip tests (official knesset.gov.il/nevo.co.il URL patterns) +- 2 cross-reference tests (GDPR adequacy, data security standards) +- 2 negative tests (non-existent law, malformed section) + +Run with: `npm run test:contract` + +## EU Adequacy Decision + +Israel is one of the few non-EU countries with an EU adequacy decision for data protection. This means: +- Personal data can flow freely from the EU/EEA to Israel without additional safeguards +- The Privacy Protection Law and its regulations are considered to provide an adequate level of data protection +- The adequacy decision is subject to periodic review by the European Commission + +This makes Israel Law MCP particularly relevant for organisations operating across EU-Israel data flows. + +## Security + +See [SECURITY.md](./SECURITY.md) for vulnerability disclosure policy. + +Report data errors: [Open an issue](https://github.com/Ansvar-Systems/israel-law-mcp/issues/new?template=data-error.md) + +## License + +Apache-2.0 -- see [LICENSE](./LICENSE) + +--- + +Built by [Ansvar Systems](https://ansvar.eu) -- Cybersecurity compliance through AI-powered analysis. diff --git a/fixtures/golden-hashes.json b/fixtures/golden-hashes.json new file mode 100644 index 0000000..93bcf65 --- /dev/null +++ b/fixtures/golden-hashes.json @@ -0,0 +1,56 @@ +{ + "$schema": "./golden-hashes.schema.json", + "version": "1.0", + "mcp_name": "Israel Law MCP", + "jurisdiction": "IL", + "provisions": [ + { + "id": "il-hash-001", + "description": "Basic Law: Human Dignity and Liberty, Section 1 -- purpose of the Basic Law; fundamental provision stating that human rights in Israel are founded on recognition of the value of the human being", + "upstream_url": "https://main.knesset.gov.il/Activity/Legislation/Laws/Pages/LawBill.aspx?t=lawsuggestionssearch&lawitemid=2000039", + "selector_hint": "Section 1 - Basic principles", + "expected_sha256": "COMPUTE_ON_FIRST_INGEST", + "expected_snippet": "human dignity" + }, + { + "id": "il-hash-002", + "description": "Privacy Protection Law 1981, Section 1 -- definitions of key terms including database, holder of a database, and sensitive information", + "upstream_url": "https://main.knesset.gov.il/Activity/Legislation/Laws/Pages/LawBill.aspx?t=lawsuggestionssearch&lawitemid=2000480", + "selector_hint": "Section 1 - Definitions", + "expected_sha256": "COMPUTE_ON_FIRST_INGEST", + "expected_snippet": "privacy" + }, + { + "id": "il-hash-003", + "description": "Protection of Privacy Regulations (Data Security) 2017, Section 1 -- definitions and scope of the data security regulations", + "upstream_url": "https://main.knesset.gov.il/Activity/Legislation/Laws/Pages/LawBill.aspx?t=lawsuggestionssearch&lawitemid=2000480", + "selector_hint": "Section 1 - Definitions", + "expected_sha256": "COMPUTE_ON_FIRST_INGEST", + "expected_snippet": "security" + }, + { + "id": "il-hash-004", + "description": "Companies Law 1999, Section 1 -- definitions and interpretation of key corporate governance terms", + "upstream_url": "https://main.knesset.gov.il/Activity/Legislation/Laws/Pages/LawBill.aspx?t=lawsuggestionssearch&lawitemid=2000559", + "selector_hint": "Section 1 - Definitions", + "expected_sha256": "COMPUTE_ON_FIRST_INGEST", + "expected_snippet": "company" + }, + { + "id": "il-hash-005", + "description": "Computer Law 1995, Section 1 -- definitions of computer, computer material, and computer output", + "upstream_url": "https://main.knesset.gov.il/Activity/Legislation/Laws/Pages/LawBill.aspx?t=lawsuggestionssearch&lawitemid=2000539", + "selector_hint": "Section 1 - Definitions", + "expected_sha256": "COMPUTE_ON_FIRST_INGEST", + "expected_snippet": "computer" + }, + { + "id": "il-hash-006", + "description": "Electronic Signature Law 2001, Section 1 -- definitions of electronic signature, secure electronic signature, and certification authority", + "upstream_url": "https://main.knesset.gov.il/Activity/Legislation/Laws/Pages/LawBill.aspx?t=lawsuggestionssearch&lawitemid=2000606", + "selector_hint": "Section 1 - Definitions", + "expected_sha256": "COMPUTE_ON_FIRST_INGEST", + "expected_snippet": "electronic signature" + } + ] +} diff --git a/fixtures/golden-tests.json b/fixtures/golden-tests.json new file mode 100644 index 0000000..7c8521c --- /dev/null +++ b/fixtures/golden-tests.json @@ -0,0 +1,180 @@ +{ + "$schema": "./golden-tests.schema.json", + "version": "1.0", + "mcp_name": "Israel Law MCP", + "description": "Golden contract tests for the Israel Law MCP covering Privacy Protection Law, Data Security Regulations, Computer Law, Companies Law, Electronic Signature Law, and Credit Data Law", + "tests": [ + { + "id": "il-001", + "category": "article_retrieval", + "description": "Retrieve Section 1 of the Privacy Protection Law 1981 -- definitions and interpretation of key terms including database and privacy", + "tool": "get_provision", + "input": { + "law_identifier": "Privacy Protection Law 1981", + "article": "1" + }, + "assertions": { + "result_not_empty": true, + "text_contains": ["privacy", "database"], + "fields_present": ["text", "article_number"], + "text_not_empty": true + } + }, + { + "id": "il-002", + "category": "article_retrieval", + "description": "Retrieve Section 7 of the Privacy Protection Law 1981 -- registration of databases with the Registrar of Databases", + "tool": "get_provision", + "input": { + "law_identifier": "Privacy Protection Law 1981", + "article": "7" + }, + "assertions": { + "result_not_empty": true, + "any_result_contains": ["database", "registration", "registrar"], + "fields_present": ["text", "article_number"], + "text_not_empty": true + } + }, + { + "id": "il-003", + "category": "article_retrieval", + "description": "Retrieve Section 1 of the Companies Law 1999 -- definitions and interpretation", + "tool": "get_provision", + "input": { + "law_identifier": "Companies Law 1999", + "article": "1" + }, + "assertions": { + "result_not_empty": true, + "any_result_contains": ["company", "Companies Law"], + "fields_present": ["text"], + "text_not_empty": true + } + }, + { + "id": "il-004", + "category": "search", + "description": "Full-text search for 'privacy' returns Privacy Protection Law provisions", + "tool": "search_legislation", + "input": { + "query": "privacy" + }, + "assertions": { + "result_not_empty": true, + "min_results": 1, + "any_result_contains": ["Privacy Protection Law", "privacy", "database"] + } + }, + { + "id": "il-005", + "category": "search", + "description": "Full-text search for 'data security' returns Privacy Protection Regulations provisions", + "tool": "search_legislation", + "input": { + "query": "data security" + }, + "assertions": { + "result_not_empty": true, + "min_results": 1, + "any_result_contains": ["Protection of Privacy Regulations", "data security", "security", "database"] + } + }, + { + "id": "il-006", + "category": "search", + "description": "Full-text search for 'computer' returns Computer Law provisions", + "tool": "search_legislation", + "input": { + "query": "computer" + }, + "assertions": { + "result_not_empty": true, + "min_results": 1, + "any_result_contains": ["Computer Law", "computer", "unauthorised"] + } + }, + { + "id": "il-007", + "category": "citation_roundtrip", + "description": "Citation for Privacy Protection Law Section 2 includes official URL pattern from knesset.gov.il or nevo.co.il", + "tool": "get_provision", + "input": { + "law_identifier": "Privacy Protection Law 1981", + "article": "2" + }, + "assertions": { + "result_not_empty": true, + "citation_url_pattern": "(knesset\\.gov\\.il|nevo\\.co\\.il)", + "text_not_empty": true + } + }, + { + "id": "il-008", + "category": "citation_roundtrip", + "description": "Citation for Electronic Signature Law Section 1 includes official identifier", + "tool": "get_provision", + "input": { + "law_identifier": "Electronic Signature Law 2001", + "article": "1" + }, + "assertions": { + "result_not_empty": true, + "fields_present": ["text"], + "text_not_empty": true + } + }, + { + "id": "il-009", + "category": "eu_cross_reference", + "description": "Privacy Protection Law cross-reference to GDPR -- Israel has an EU adequacy decision", + "tool": "get_provision_eu_basis", + "input": { + "law_identifier": "Privacy Protection Law 1981" + }, + "assertions": { + "result_not_empty": true, + "any_result_contains": ["GDPR", "General Data Protection Regulation", "adequacy", "data protection"] + } + }, + { + "id": "il-010", + "category": "eu_cross_reference", + "description": "Protection of Privacy Regulations (Data Security) 2017 cross-reference to international data security standards", + "tool": "get_provision_eu_basis", + "input": { + "law_identifier": "Protection of Privacy Regulations (Data Security) 2017" + }, + "assertions": { + "result_not_empty": true, + "any_result_contains": ["GDPR", "data security", "privacy", "data protection"] + } + }, + { + "id": "il-011", + "category": "negative_test", + "description": "Non-existent Israeli law returns graceful error or empty result", + "tool": "get_provision", + "input": { + "law_identifier": "Fictional Autonomous Vehicles Cyber Law 2099", + "article": "1" + }, + "assertions": { + "handles_gracefully": true + } + }, + { + "id": "il-012", + "category": "negative_test", + "description": "Malformed section number returns graceful error or empty result", + "tool": "get_provision", + "input": { + "law_identifier": "Privacy Protection Law 1981", + "article": "999ZZZ-INVALID" + }, + "assertions": { + "handles_gracefully": true + } + } + ] +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..d8c1d0b --- /dev/null +++ b/package.json @@ -0,0 +1,76 @@ +{ + "name": "@ansvar/israel-law-mcp", + "version": "1.0.0", + "mcpName": "eu.ansvar/israel-law-mcp", + "description": "Israel law database covering Privacy Protection Law, Data Security Regulations, Computer Law, Companies Law, Electronic Signature Law, and Credit Data Law with full-text search", + "author": "Ansvar Systems ", + "license": "Apache-2.0", + "repository": { + "type": "git", + "url": "https://github.com/Ansvar-Systems/israel-law-mcp.git" + }, + "homepage": "https://ansvar.eu", + "keywords": [ + "mcp", + "model-context-protocol", + "israel-law", + "privacy-protection", + "data-security", + "computer-law", + "companies-law", + "electronic-signature", + "credit-data", + "legislation", + "legal", + "compliance", + "cybersecurity", + "ansvar" + ], + "type": "module", + "main": "dist/server.js", + "bin": { + "israel-law-mcp": "dist/server.js" + }, + "files": [ + "dist/", + "data/database-free.db", + "sources.yml", + "fixtures/", + "LICENSE", + "README.md" + ], + "scripts": { + "build": "tsc", + "test": "vitest run", + "test:contract": "vitest run __tests__/contract/", + "test:watch": "vitest", + "lint": "eslint src/", + "start": "node dist/server.js", + "start:stdio": "node dist/server.js --stdio", + "health": "curl -s http://localhost:3000/health | jq .", + "build:db": "tsx scripts/build-db.ts", + "build:db:free": "tsx scripts/build-db-free.ts", + "ingest": "tsx scripts/ingest.ts", + "drift:detect": "tsx scripts/drift-detect.ts", + "check:freshness": "tsx scripts/check-freshness.ts", + "validate": "npm run lint && npm run test && npm run test:contract" + }, + "dependencies": { + "@modelcontextprotocol/sdk": "^1.12.0", + "node-sqlite3-wasm": "^0.8.0", + "zod": "^3.23.0" + }, + "devDependencies": { + "@types/node": "^22.0.0", + "eslint": "^9.0.0", + "prettier": "^3.4.0", + "tsx": "^4.19.0", + "typescript": "^5.7.0", + "vitest": "^3.0.0", + "@typescript-eslint/eslint-plugin": "^8.0.0", + "@typescript-eslint/parser": "^8.0.0" + }, + "engines": { + "node": ">=18.0.0" + } +} diff --git a/server.json b/server.json new file mode 100644 index 0000000..7dca8af --- /dev/null +++ b/server.json @@ -0,0 +1,20 @@ +{ + "$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json", + "name": "eu.ansvar/israel-law-mcp", + "description": "Israel law database covering Privacy Protection Law, Data Security Regulations, Computer Law, Companies Law, Electronic Signature Law, and Credit Data Law with full-text search", + "repository": { + "url": "https://github.com/Ansvar-Systems/israel-law-mcp", + "source": "github" + }, + "homepage": "https://ansvar.eu", + "version": "1.0.0", + "license": "Apache-2.0", + "packages": [ + { + "registryType": "npm", + "identifier": "@ansvar/israel-law-mcp", + "version": "1.0.0", + "transport": { "type": "stdio" } + } + ] +} diff --git a/sources.yml b/sources.yml new file mode 100644 index 0000000..17d65ae --- /dev/null +++ b/sources.yml @@ -0,0 +1,86 @@ +# sources.yml +schema_version: "1.0" +mcp_name: "Israel Law MCP" +jurisdiction: "IL" + +sources: + - name: "Knesset Legislation Database" + authority: "The Knesset (Israeli Parliament)" + official_portal: "https://main.knesset.gov.il/Activity/Legislation" + canonical_identifier: "N/A (Israeli legislation identified by law name, year, and Sefer HaChukkim reference number)" + retrieval_method: "HTML_SCRAPE" + api_documentation: "https://knesset.gov.il/Odata/ParliamentInfo.svc/ (OData API for some legislative data)" + update_frequency: "weekly" + last_ingested: "PENDING_FIRST_INGEST" + license_or_terms: + type: "Government Open Data" + url: "https://main.knesset.gov.il/Activity/Legislation/Pages/default.aspx" + summary: "Knesset provides public access to legislation; Israeli government legislation is publicly accessible; the Knesset website provides free access to laws, bills, and legislative proceedings" + coverage: + scope: "All primary legislation (Chukkim), Basic Laws (Chukei Yesod), bills, and selected legislative proceedings; laws published in Sefer HaChukkim (Book of Laws) and Reshumot (Official Gazette)" + limitations: "Consolidated versions may lag behind recent amendments; subsidiary legislation and regulations are less comprehensively covered; some older laws may only be available in Hebrew; English translations available for major laws but may not be current" + languages: + - "he" + - "en" + + - name: "Nevo Legal Database" + authority: "Nevo (commercial legal database, widely used as de facto reference)" + official_portal: "https://www.nevo.co.il" + canonical_identifier: "N/A" + retrieval_method: "HTML_SCRAPE" + api_documentation: "N/A (commercial platform with structured web interface)" + update_frequency: "daily" + last_ingested: "PENDING_FIRST_INGEST" + license_or_terms: + type: "Commercial Database (public law content)" + url: "https://www.nevo.co.il/general/terms.aspx" + summary: "Nevo is the dominant Israeli legal database; while access is commercial, the underlying legislation is government-published public content; used as the de facto standard reference by Israeli legal professionals and courts" + coverage: + scope: "Comprehensive Israeli legislation including primary laws, regulations, court decisions, attorney general guidelines, and regulatory directives; consolidated and up-to-date versions" + limitations: "Full access requires commercial subscription; free access limited to basic law text; court decisions and regulatory materials may require paid access; structured data extraction limited by terms of service" + languages: + - "he" + + - name: "Israeli Law Resource Center (English translations)" + authority: "Various official and academic sources" + official_portal: "https://www.gov.il/en/departments/legalinfo" + canonical_identifier: "N/A" + retrieval_method: "HTML_SCRAPE" + api_documentation: "N/A" + update_frequency: "monthly" + last_ingested: "PENDING_FIRST_INGEST" + license_or_terms: + type: "Government Publication" + url: "https://www.gov.il/en/departments/legalinfo" + summary: "English translations of major Israeli laws published by government ministries and the Knesset; translations are unofficial but widely referenced" + coverage: + scope: "English translations of major Israeli laws including Basic Laws, Privacy Protection Law, Companies Law, and key regulatory frameworks" + limitations: "Not all laws have official English translations; translations may lag behind Hebrew amendments; unofficial status means Hebrew text is always authoritative" + languages: + - "en" + +data_freshness: + automated_checks: true + check_frequency: "weekly" + last_verified: "PENDING_FIRST_INGEST" + +# Notes: +# - Israel uses a mixed legal system combining elements of common law, civil law, and +# religious law traditions +# - Hebrew is the legally binding language; Arabic has special status; English translations +# are available for major laws but are not official +# - Israel does not have a single codified constitution; instead, it has a series of +# Basic Laws (Chukei Yesod) that serve quasi-constitutional functions +# - The Privacy Protection Law (1981) predates the EU GDPR but is being modernized; +# Israel has an EU adequacy decision under the Data Protection Directive (maintained +# under GDPR review) +# - The Privacy Protection Authority (PPA) is the supervisory authority for data protection +# - The Protection of Privacy Regulations (Data Security) 2017 impose specific technical +# and organisational security requirements on database owners +# - Israel is a major global cybersecurity hub (Unit 8200, startup ecosystem), making +# its legal framework highly relevant to Ansvar's client base +# - The Computer Law 1995 addresses computer crimes and unauthorised access +# - Nevo (nevo.co.il) is the dominant commercial legal database used by essentially all +# Israeli legal professionals; the Knesset database is the official government source +# - Israel's legal publishing uses Sefer HaChukkim (Book of Laws) for primary legislation +# and Kovetz HaTakanot (Collection of Regulations) for subsidiary legislation diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000..8f36af2 --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,20 @@ +{ + "compilerOptions": { + "target": "ES2022", + "module": "Node16", + "moduleResolution": "Node16", + "lib": ["ES2022"], + "outDir": "./dist", + "rootDir": "./src", + "strict": true, + "esModuleInterop": true, + "skipLibCheck": true, + "forceConsistentCasingInFileNames": true, + "resolveJsonModule": true, + "declaration": true, + "declarationMap": true, + "sourceMap": true + }, + "include": ["src/**/*"], + "exclude": ["node_modules", "dist", "__tests__"] +} diff --git a/vercel.json b/vercel.json new file mode 100644 index 0000000..ce4fed2 --- /dev/null +++ b/vercel.json @@ -0,0 +1,17 @@ +{ + "$schema": "https://openapi.vercel.sh/vercel.json", + "buildCommand": "bash scripts/download-db.sh && npm run build", + "functions": { + "api/mcp.ts": { + "maxDuration": 30, + "memory": 1024, + "includeFiles": "{data/database.db,node_modules/node-sqlite3-wasm/dist/node-sqlite3-wasm.wasm}" + } + }, + "crons": [ + { + "path": "/api/health", + "schedule": "*/5 * * * *" + } + ] +}