Skip to content

Commit aa87fa6

Browse files
committed
Release 1.0.6
1 parent 5078d7b commit aa87fa6

File tree

10 files changed

+518
-43
lines changed

10 files changed

+518
-43
lines changed

.env

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ BASE_TAG="9.6"
99
BASE_IMAGE="registry.access.redhat.com/ubi9/ubi-minimal"
1010
CACHE_FLAG=""
1111
PORT=8001
12-
VERSION=1.0.4
12+
VERSION=1.0.6
1313

1414
# Registry
1515
ORG=atarazana

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "eligibility-engine-mcp-server"
3-
version = "0.1.0"
3+
version = "1.0.6"
44
edition = "2024"
55

66
[dependencies]

Containerfile copy

Lines changed: 137 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,137 @@
1+
# syntax=docker/dockerfile:1
2+
3+
# Build arguments
4+
ARG BASE_IMAGE=registry.access.redhat.com/ubi9/ubi-minimal
5+
ARG BASE_TAG=9.6
6+
ARG VERSION=1.0.2
7+
ARG MAINTAINER="Alpha Hack Group <[email protected]>"
8+
ARG DESCRIPTION="Eligibility Engine MCP Server - Model Context Protocol server for eligibility evaluation"
9+
ARG APP_NAME=eligibility-engine-mcp-server
10+
ARG PORT=8001
11+
ARG SOURCE=https://github.com/alpha-hack-program/eligibility-engine-mcp-rs.git
12+
13+
# Multi-stage build
14+
# Stage 1: Build stage with Rust toolchain
15+
FROM registry.access.redhat.com/ubi9/ubi:${BASE_TAG} AS builder
16+
17+
# Install Rust and build dependencies
18+
RUN dnf update -y && \
19+
dnf install -y \
20+
gcc \
21+
gcc-c++ \
22+
make \
23+
openssl-devel \
24+
pkg-config && \
25+
dnf clean all && \
26+
rm -rf /var/cache/dnf
27+
28+
# Install Rust
29+
ENV RUSTUP_HOME=/opt/rust
30+
ENV CARGO_HOME=/opt/rust
31+
ENV PATH=/opt/rust/bin:$PATH
32+
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable --no-modify-path
33+
34+
# Set working directory
35+
WORKDIR /build
36+
37+
# Copy Cargo TOML
38+
COPY Cargo.* .
39+
40+
# Fetch dependencies
41+
RUN cargo fetch
42+
43+
# Create dummy source structure that matches your project
44+
RUN mkdir -p src && \
45+
echo "fn main() {}" > src/stdio_server.rs && \
46+
echo "fn main() {}" > src/sse_server.rs && \
47+
echo "fn main() {}" > src/mcp_server.rs && \
48+
echo "fn main() {}" > src/main.rs
49+
50+
51+
# Build dependencies only - this layer will be cached unless dependencies change
52+
RUN cargo build --release --bin sse_server && \
53+
rm -rf src && \
54+
rm -f target/release/sse_server && \
55+
rm -f target/release/stdio_server && \
56+
rm -f target/release/mcp_server && \
57+
rm -f target/release/eligibility-engine-mcp-server
58+
59+
# Copy the source code
60+
COPY src/ ./src
61+
62+
# Build the application
63+
RUN cargo build --release --bin sse_server
64+
65+
# Run sse server
66+
RUN cargo run --release --bin sse_server
67+
68+
# Stage 2: Runtime stage with minimal UBI
69+
FROM ${BASE_IMAGE}:${BASE_TAG}
70+
71+
# Build arguments for labels
72+
ARG VERSION
73+
ARG BUILD_DATE
74+
ARG VCS_REF
75+
ARG MAINTAINER
76+
ARG DESCRIPTION
77+
ARG APP_NAME
78+
ARG PORT
79+
ARG SOURCE
80+
81+
# Add labels (OCI standard)
82+
LABEL org.opencontainers.image.title="${APP_NAME}" \
83+
org.opencontainers.image.description="${DESCRIPTION}" \
84+
org.opencontainers.image.version="${VERSION}" \
85+
org.opencontainers.image.created="${BUILD_DATE}" \
86+
org.opencontainers.image.revision="${VCS_REF}" \
87+
org.opencontainers.image.source="${SOURCE}" \
88+
org.opencontainers.image.authors="${MAINTAINER}" \
89+
org.opencontainers.image.vendor="Alpha Hack Group" \
90+
org.opencontainers.image.licenses="MIT" \
91+
org.opencontainers.image.url="${SOURCE}" \
92+
org.opencontainers.image.documentation="${SOURCE}" \
93+
io.k8s.description="${DESCRIPTION}" \
94+
io.k8s.display-name="${APP_NAME}" \
95+
io.openshift.tags="mcp,eligibility-engine,rust,server" \
96+
maintainer="${MAINTAINER}"
97+
98+
# Install runtime dependencies
99+
RUN microdnf update -y && \
100+
microdnf install -y \
101+
ca-certificates \
102+
openssl && \
103+
microdnf clean all && \
104+
rm -rf /var/cache/yum
105+
106+
# Create non-root user for security
107+
RUN useradd -r -u 1001 -g 0 -s /sbin/nologin \
108+
-c "Eligibility Engine MCP Server user" mcpserver
109+
110+
# Set working directory
111+
WORKDIR /app
112+
113+
# Copy the binary from builder stage
114+
COPY --from=builder /build/target/release/sse_server /app/sse_server
115+
116+
# Set permissions
117+
RUN chown -R 1001:0 /app && \
118+
chmod -R g=u /app && \
119+
chmod +x /app/sse_server
120+
121+
# Switch to non-root user
122+
USER 1001
123+
124+
# Health check
125+
HEALTHCHECK --interval=30s --timeout=10s --start-period=30s --retries=3 \
126+
CMD curl -f http://localhost:${PORT}/health || exit 1
127+
128+
# Expose port
129+
EXPOSE ${PORT}
130+
131+
# Environment variables
132+
ENV RUST_LOG=info
133+
ENV RUST_BACKTRACE=1
134+
ENV PORT=${PORT}
135+
136+
# Run the application
137+
CMD ["/app/sse_server"]

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,8 @@ BIND_ADDRESS=127.0.0.1:8001
9797
"input": {
9898
"relationship": "mother",
9999
"situation": "illness",
100-
"single_parent_family": false,
101-
"number_of_children": 2
100+
"is_single_parent": false,
101+
"total_children_after": 2
102102
}
103103
}
104104
```
@@ -191,7 +191,7 @@ Connect and list tools, select the tool and use this JSON.
191191
{
192192
"relationship": "son",
193193
"situation": "birth",
194-
"single_parent_family": true
194+
"is_single_parent": true
195195
}
196196
```
197197

@@ -254,8 +254,8 @@ make sgw-mcp # STDIO -> MCP HTTP wrapping
254254
|-------|------|----------|-------------|
255255
| `relationship` | string || Family relationship (father, mother, son, daughter, spouse, partner, husband, wife, woman, man) |
256256
| `situation` | string || Care reason (birth, adoption, foster_care, illness, accident, etc.) |
257-
| `single_parent_family` | boolean || Is it a single-parent family? |
258-
| `number_of_children` | number || Number of children (optional, required for Case B) |
257+
| `is_single_parent` | boolean || Is it a single-parent family? |
258+
| `total_children_after` | number || Number of children (optional, required for Case B) |
259259

260260
### Response
261261

docs/2025_47-SA-R1.md

Lines changed: 187 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,187 @@
1+
---
2+
3+
**REPUBLIC OF LYSMARK**
4+
**MINISTRY OF SOCIAL AFFAIRS AND EMPLOYMENT**
5+
6+
---
7+
8+
# REGULATION No. 2025/47-SA-R1
9+
## FAMILY RELATIONSHIP DEFINITIONS FOR UNPAID CARE LEAVE
10+
### Supplementary Regulation to Act No. 2025/47-SA
11+
12+
**Adopted:** 20 March 2025
13+
**Effective:** 1 April 2025
14+
**Legal Basis:** Act No. 2025/47-SA, Article 2; Constitution of Lysmark, Article 45
15+
**Official Journal Reference:** OJ AR 2025/48, p. 12-16
16+
17+
---
18+
19+
**PREAMBLE**
20+
21+
This regulation establishes the precise definitions of family relationships eligible for unpaid care leave assistance under the Family Care Unpaid Leave Support Act, ensuring clarity in application and consistent interpretation across all administrative bodies.
22+
23+
## Article 1 - Scope and Purpose
24+
25+
This regulation defines the accepted levels of relationship between the person taking unpaid leave and the person requiring care, as referenced in Article 2 of Act No. 2025/47-SA.
26+
27+
## Article 2 - First-Degree Family Relationships by Consanguinity
28+
29+
### Direct Line Relationships
30+
The following blood relationships qualify as first-degree family relationships:
31+
32+
#### Parents and Children
33+
- **Father** (*padre*): Biological, adoptive, or legally recognized father
34+
- **Mother** (*madre*): Biological, adoptive, or legally recognized mother
35+
- **Son** (*hijo*): Male child, biological or adoptive
36+
- **Daughter** (*hija*): Female child, biological or adoptive
37+
38+
### Legal Equivalencies
39+
- Adoptive relationships carry the same legal weight as biological relationships
40+
- Step-relationships do not qualify unless formal adoption has occurred
41+
- Foster relationships qualify only when legal guardianship has been established
42+
43+
## Article 3 - First-Degree Family Relationships by Affinity
44+
45+
### Spousal Relationships
46+
The following marital and partnership relationships qualify:
47+
48+
#### Legal Marriage
49+
- **Spouse** (*cónyuge*): Person legally married under Lysmarkn civil law
50+
- **Husband** (*marido/esposo*): Male spouse in legal marriage
51+
- **Wife** (*esposa*): Female spouse in legal marriage
52+
53+
#### Registered Partnerships
54+
- **Partner** (*pareja*): Person in legally registered civil partnership or domestic partnership recognized under Lysmarkn law
55+
- **Civil partner**: Person in registered civil union with equivalent legal status to marriage
56+
57+
### Documentation Requirements
58+
- Marriage certificate or civil partnership registration
59+
- For foreign marriages: Apostilled documents with certified translation
60+
- Partnership agreements must be officially registered with competent Lysmarkn authorities
61+
62+
## Article 4 - Extended Family Relationships (Non-Qualifying)
63+
64+
### Second-Degree and Beyond
65+
The following relationships do **NOT** qualify for unpaid care leave assistance:
66+
67+
#### Siblings
68+
- Brothers and sisters (second-degree consanguinity)
69+
- Half-siblings and step-siblings
70+
71+
#### Grandparents and Grandchildren
72+
- Grandparents (second-degree ascendant line)
73+
- Grandchildren (second-degree descendant line)
74+
75+
#### In-Laws
76+
- Parents-in-law
77+
- Children-in-law
78+
- Siblings-in-law
79+
80+
#### Other Relatives
81+
- Aunts, uncles, cousins
82+
- Nephews and nieces
83+
- Any relationship beyond first degree
84+
85+
## Article 5 - Special Circumstances and Clarifications
86+
87+
### Legal Guardianship and Foster Care
88+
- **Legal Guardian**: Person with court-appointed guardianship over a minor qualifies as equivalent to parent-child relationship
89+
- **Foster Parent**: Qualified only when official foster care placement exceeds one year duration
90+
- **Ward**: Minor under official guardianship is treated as child for relationship purposes
91+
92+
### Unmarried Partnerships
93+
- **Cohabiting Partners**: Must demonstrate stable cohabitation for minimum 2 years with shared residence and financial interdependence
94+
- **Common-Law Relationships**: Require official declaration before competent authorities
95+
- Documentary proof required: joint lease agreements, shared bank accounts, witness statements
96+
97+
### Same-Sex Relationships
98+
- All relationship definitions apply equally regardless of gender or sexual orientation
99+
- Same-sex marriages and partnerships carry identical rights and obligations
100+
101+
## Article 6 - Proof of Relationship
102+
103+
### Required Documentation
104+
Applicants must provide appropriate documentation to establish qualifying relationship:
105+
106+
#### For Consanguinity
107+
- Birth certificates showing direct lineage
108+
- Adoption decrees (certified copies)
109+
- DNA testing (in disputed cases, at administrative discretion)
110+
111+
#### For Affinity
112+
- Marriage certificates
113+
- Civil partnership registration
114+
- Cohabitation declarations with supporting evidence
115+
116+
#### For Legal Guardianship
117+
- Court orders establishing guardianship
118+
- Foster care placement agreements
119+
- Child welfare authority certifications
120+
121+
### Foreign Documentation
122+
- Documents issued outside Lysmark require apostille certification
123+
- Non-Lysmarkn language documents require certified translation by court-appointed translator
124+
- Consular authentication may be required for certain jurisdictions
125+
126+
## Article 7 - Disputed Relationships
127+
128+
### Administrative Review
129+
- Relationship disputes subject to review by Family Relations Assessment Board
130+
- Appeals process available within 30 days of negative determination
131+
- Independent verification procedures may be implemented
132+
133+
### Burden of Proof
134+
- Applicant bears responsibility for proving qualifying relationship
135+
- Clear and convincing evidence standard applies
136+
- Administrative authorities may request additional documentation
137+
138+
## Article 8 - Effective Date and Transitional Provisions
139+
140+
### Implementation
141+
- This regulation takes effect simultaneously with Act No. 2025/47-SA
142+
- Applications submitted prior to effective date evaluated under previous standards
143+
- No retroactive application to closed cases
144+
145+
### Review and Updates
146+
- Regulation subject to periodic review every 3 years
147+
- Updates published in Official Journal with 30-day implementation period
148+
149+
## Article 9 - Interpretative Guidelines
150+
151+
### Principle of Family Unity
152+
- Definitions should be interpreted to support legitimate family care needs
153+
- Cultural and social diversity in family structures given appropriate consideration
154+
- Best interests of care recipients considered in borderline cases
155+
156+
### Legal Certainty
157+
- Clear documentation requirements ensure predictable outcomes
158+
- Standardized forms and procedures minimize administrative discretion
159+
- Regular training for administrative personnel on relationship definitions
160+
161+
---
162+
163+
**ANNEX A - RELATIONSHIP VERIFICATION FLOWCHART**
164+
165+
```
166+
RELATIONSHIP QUALIFICATION PROCESS
167+
168+
├── CONSANGUINITY (Blood Relations)
169+
│ ├── Parent → Child: QUALIFIED ✓
170+
│ ├── Child → Parent: QUALIFIED ✓
171+
│ └── Siblings/Other: NOT QUALIFIED ✗
172+
173+
├── AFFINITY (Marriage/Partnership)
174+
│ ├── Legal Spouse: QUALIFIED ✓
175+
│ ├── Registered Partner: QUALIFIED ✓
176+
│ ├── Cohabiting Partner (2+ years): QUALIFIED ✓
177+
│ └── Dating/Casual: NOT QUALIFIED ✗
178+
179+
└── LEGAL GUARDIANSHIP
180+
├── Court-Appointed Guardian: QUALIFIED ✓
181+
├── Foster Parent (1+ year): QUALIFIED ✓
182+
└── Informal Care: NOT QUALIFIED ✗
183+
```
184+
185+
---
186+
187+
*This is a fictional document for demonstration purposes only.*

0 commit comments

Comments
 (0)