Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 13 additions & 15 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@ name: CI

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: I appreciate those improvements but maybe worth another PR to keep diff cleaner? WDYT?

on:
push:
branches: [main, develop]
pull_request:
branches: [main, develop]
workflow_dispatch:

concurrency:
Expand All @@ -19,7 +17,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
fetch-depth: 0

Expand All @@ -29,7 +27,7 @@ jobs:
bun-version: latest

- name: Setup Node.js
uses: actions/setup-node@v4
uses: actions/setup-node@v5
with:
node-version: '20'
cache: 'npm'
Expand All @@ -56,7 +54,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
fetch-depth: 0

Expand All @@ -66,7 +64,7 @@ jobs:
bun-version: latest

- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
uses: actions/setup-node@v5
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
Expand All @@ -80,7 +78,7 @@ jobs:
run: npx nx affected --target=test --base=origin/main --parallel=3 --coverage

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
uses: codecov/codecov-action@v5
if: matrix.node-version == '20'
with:
token: ${{ secrets.CODECOV_TOKEN }}
Expand All @@ -96,7 +94,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
fetch-depth: 0

Expand All @@ -106,7 +104,7 @@ jobs:
bun-version: latest

- name: Setup Node.js
uses: actions/setup-node@v4
uses: actions/setup-node@v5
with:
node-version: '20'
cache: 'npm'
Expand Down Expand Up @@ -136,7 +134,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v5

- name: Setup Bun
uses: oven-sh/setup-bun@v2
Expand All @@ -158,11 +156,10 @@ jobs:
name: E2E Tests
runs-on: ubuntu-latest
timeout-minutes: 20
if: github.event_name == 'pull_request'

steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
fetch-depth: 0

Expand All @@ -172,7 +169,7 @@ jobs:
bun-version: latest

- name: Setup Node.js
uses: actions/setup-node@v4
uses: actions/setup-node@v5
with:
node-version: '20'
cache: 'npm'
Expand All @@ -193,7 +190,7 @@ jobs:
all-checks-pass:
name: All Checks Pass
runs-on: ubuntu-latest
needs: [lint, test, build, security]
needs: [lint, test, build, security, e2e]
if: always()

steps:
Expand All @@ -202,7 +199,8 @@ jobs:
if [[ "${{ needs.lint.result }}" != "success" || \
"${{ needs.test.result }}" != "success" || \
"${{ needs.build.result }}" != "success" || \
"${{ needs.security.result }}" != "success" ]]; then
"${{ needs.security.result }}" != "success" || \
"${{ needs.e2e.result }}" != "success" ]]; then
echo "One or more checks failed"
exit 1
fi
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/dependency-update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
fetch-depth: 0

Expand All @@ -29,7 +29,7 @@ jobs:
bun-version: latest

- name: Setup Node.js
uses: actions/setup-node@v4
uses: actions/setup-node@v5
with:
node-version: '20'
cache: 'npm'
Expand Down Expand Up @@ -96,7 +96,7 @@ jobs:

- name: Create Pull Request
if: steps.update.outputs.has_updates == 'true'
uses: actions/github-script@v7
uses: actions/github-script@v8
with:
script: |
const { data: pr } = await github.rest.pulls.create({
Expand Down Expand Up @@ -148,7 +148,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v5

- name: Setup Bun
uses: oven-sh/setup-bun@v2
Expand Down Expand Up @@ -189,7 +189,7 @@ jobs:

- name: Create issue if vulnerabilities found
if: steps.audit.outputs.has_vulnerabilities == 'true'
uses: actions/github-script@v7
uses: actions/github-script@v8
with:
script: |
const fs = require('fs');
Expand All @@ -210,7 +210,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v5

- name: Setup Bun
uses: oven-sh/setup-bun@v2
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/pr-validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v5

- name: Validate PR title
uses: amannn/action-semantic-pull-request@v5
Expand Down Expand Up @@ -60,12 +60,12 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
fetch-depth: 0

- name: Check PR size
uses: actions/github-script@v7
uses: actions/github-script@v8
with:
script: |
const pr = context.payload.pull_request;
Expand Down Expand Up @@ -115,7 +115,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
fetch-depth: 0

Expand All @@ -142,7 +142,7 @@ jobs:
- '.github/**'

- name: Comment file changes
uses: actions/github-script@v7
uses: actions/github-script@v8
with:
script: |
const output = `## 📁 Changed Files Summary
Expand All @@ -167,7 +167,7 @@ jobs:

steps:
- name: Auto-assign PR
uses: actions/github-script@v7
uses: actions/github-script@v8
with:
script: |
const pr = context.payload.pull_request;
Expand Down
15 changes: 8 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
fetch-depth: 0
token: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -36,7 +36,7 @@ jobs:
bun-version: latest

- name: Setup Node.js
uses: actions/setup-node@v4
uses: actions/setup-node@v5
with:
node-version: '20'
registry-url: 'https://registry.npmjs.org'
Expand Down Expand Up @@ -93,8 +93,10 @@ jobs:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Create Git tag
id: version
run: |
VERSION=$(node -p "require('./mcp/riigiteataja/package.json').version")
VERSION=$(node -p "require('./packages/riigiteataja-api-client/package.json').version")
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git tag -a "v$VERSION" -m "Release v$VERSION"
Expand All @@ -103,15 +105,14 @@ jobs:
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
tag_name: v${{ env.VERSION }}
name: Release v${{ env.VERSION }}
tag_name: v${{ steps.version.outputs.version }}
name: Release v${{ steps.version.outputs.version }}
body: |
## 🚀 Release v${{ env.VERSION }}
## 🚀 Release v${{ steps.version.outputs.version }}

### Packages Released:
- @estonia-ai-kit/rik-mcp-server
- @estonia-ai-kit/open-data-mcp-server
- @estonia-ai-kit/riigiteataja-mcp-server
- @estonia-ai-kit/riigiteataja-api-client
- @estonia-ai-kit/shared
draft: false
Expand Down
18 changes: 8 additions & 10 deletions .github/workflows/riigiteataja-api-client.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,10 @@ name: Riigiteataja API Client CI/CD

on:
push:
branches: [main, develop]
paths:
- 'packages/riigiteataja-api-client/**'
- '.github/workflows/riigiteataja-api-client.yml'
pull_request:
branches: [main, develop]
paths:
- 'packages/riigiteataja-api-client/**'
- '.github/workflows/riigiteataja-api-client.yml'
Expand Down Expand Up @@ -53,7 +51,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
fetch-depth: 0

Expand All @@ -63,7 +61,7 @@ jobs:
bun-version: latest

- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
uses: actions/setup-node@v5
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
Expand All @@ -90,7 +88,7 @@ jobs:

- name: Upload coverage to Codecov
if: matrix.node-version == '20'
uses: codecov/codecov-action@v4
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./packages/riigiteataja-api-client/coverage/lcov.info
Expand All @@ -109,7 +107,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v5

- name: Setup Bun
uses: oven-sh/setup-bun@v2
Expand Down Expand Up @@ -155,15 +153,15 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v5

- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest

- name: Setup Node.js
uses: actions/setup-node@v4
uses: actions/setup-node@v5
with:
node-version: '20'

Expand Down Expand Up @@ -212,7 +210,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
fetch-depth: 0
token: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -223,7 +221,7 @@ jobs:
bun-version: latest

- name: Setup Node.js
uses: actions/setup-node@v4
uses: actions/setup-node@v5
with:
node-version: '20'
registry-url: 'https://registry.npmjs.org'
Expand Down
16 changes: 9 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,13 @@ This toolkit covers **government services** (tax, business registry, legal data,

### 🏛️ Government Services

| Package | Description | Type | Auth | Status |
| --------------------------------------------------------- | --------------------------------------------- | ----------- | -------- | ---------- |
| [`@estonia-ai-kit/rik-mcp-server`](./mcp/rik) | Estonian Business Register (RIK) | MCP Server | None | 🔶 WIP |
| [`@estonia-ai-kit/open-data-mcp-server`](./mcp/open-data) | Statistics Estonia / Open Data Portal | MCP Server | None | 🔶 WIP |
| [`cli/emta`](./cli/emta) | Tax & Customs Board (EMTA) - TSD declarations | CLI / Skill | Smart-ID | ✅ Working |
| [`rag/riigiteataja`](./rag/riigiteataja) | Estonian Legal Document RAG pipeline | RAG | None | 🔶 WIP |
| [`@estonia-ai-kit/shared`](./packages/shared) | Shared utilities and types | Library | - | ✅ Ready |
| Package | Description | Type | Auth | Status |
| --------------------------------------------------------- | -------------------------------------------- | ----------- | -------- | ---------- |
| [`@estonia-ai-kit/rik-mcp-server`](./mcp/rik) | Estonian Business Register (RIK) | MCP Server | None | 🔶 WIP |
| [`@estonia-ai-kit/open-data-mcp-server`](./mcp/open-data) | Statistics Estonia / Open Data Portal | MCP Server | None | 🔶 WIP |
| [`cli/emta`](./cli/emta) | Tax & Customs Board (EMTA) - TSD + KMD tools | CLI / Skill | Smart-ID | ✅ Working |
| [`rag/riigiteataja`](./rag/riigiteataja) | Estonian Legal Document RAG pipeline | RAG | None | 🔶 WIP |
| [`@estonia-ai-kit/shared`](./packages/shared) | Shared utilities and types | Library | - | ✅ Ready |

### 🏦 Private Sector Services

Expand Down Expand Up @@ -84,6 +84,8 @@ go install github.com/stefanoamorelli/estonia-ai-kit/cli/lhv@latest
emta-cli login # Login via Smart-ID QR code
emta-cli tsd list # List your TSD declarations
emta-cli tsd show <declaration-id> # Show declaration details
emta-cli kmd list # List KMD declarations
emta-cli kmd main read --declaration-id <id>
```

**LHV Bank**:
Expand Down
2 changes: 2 additions & 0 deletions cli/emta/CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,5 @@ Get the declaration ID from `tsd list`.
- Login is interactive (Smart-ID QR code) — ask the user to scan when running `login`
- If you get "session expired", the user needs to run `login` again
- Do not hardcode company/person names
- KMD commands live under `emta-cli kmd ...`
- `kmd submit` exists but should be treated as high-risk and only used when explicitly requested
Loading
Loading