@mcp-gen-ui/core 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/LICENSE +202 -0
- package/README.md +32 -0
- package/dist/consistency.d.ts +19 -0
- package/dist/consistency.d.ts.map +1 -0
- package/dist/consistency.js +53 -0
- package/dist/consistency.js.map +1 -0
- package/dist/deadlines.d.ts +10 -0
- package/dist/deadlines.d.ts.map +1 -0
- package/dist/deadlines.js +29 -0
- package/dist/deadlines.js.map +1 -0
- package/dist/fixtures.d.ts +8 -0
- package/dist/fixtures.d.ts.map +1 -0
- package/dist/fixtures.js +96 -0
- package/dist/fixtures.js.map +1 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +9 -0
- package/dist/index.js.map +1 -0
- package/dist/personas.d.ts +100 -0
- package/dist/personas.d.ts.map +1 -0
- package/dist/personas.js +88 -0
- package/dist/personas.js.map +1 -0
- package/dist/recommender.d.ts +15 -0
- package/dist/recommender.d.ts.map +1 -0
- package/dist/recommender.js +222 -0
- package/dist/recommender.js.map +1 -0
- package/dist/repository.d.ts +18 -0
- package/dist/repository.d.ts.map +1 -0
- package/dist/repository.js +16 -0
- package/dist/repository.js.map +1 -0
- package/dist/sqlite-store.d.ts +19 -0
- package/dist/sqlite-store.d.ts.map +1 -0
- package/dist/sqlite-store.js +103 -0
- package/dist/sqlite-store.js.map +1 -0
- package/dist/tool-service.d.ts +29 -0
- package/dist/tool-service.d.ts.map +1 -0
- package/dist/tool-service.js +140 -0
- package/dist/tool-service.js.map +1 -0
- package/package.json +42 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
180
|
+
|
|
181
|
+
To apply the Apache License to your work, attach the following
|
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
183
|
+
replaced with your own identifying information. (Don't include
|
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
185
|
+
comment syntax for the file format. We also recommend that a
|
|
186
|
+
file or class name and description of purpose be included on the
|
|
187
|
+
same "printed page" as the copyright notice for easier
|
|
188
|
+
identification within third-party archives.
|
|
189
|
+
|
|
190
|
+
Copyright [yyyy] [name of copyright owner]
|
|
191
|
+
|
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
|
+
you may not use this file except in compliance with the License.
|
|
194
|
+
You may obtain a copy of the License at
|
|
195
|
+
|
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
197
|
+
|
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
+
See the License for the specific language governing permissions and
|
|
202
|
+
limitations under the License.
|
package/README.md
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# @mcp-gen-ui/core
|
|
2
|
+
|
|
3
|
+
Transport-neutral public-benefit business logic for the mcp-gen-ui gateway.
|
|
4
|
+
|
|
5
|
+
It includes the fixture-backed benefit repository, rule-based recommendation engine, SQLite snapshot/change-log support, consistency checks, and `BenefitToolService` used by MCP transports.
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm install @mcp-gen-ui/core
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Usage
|
|
14
|
+
|
|
15
|
+
```ts
|
|
16
|
+
import { BenefitToolService, FixtureBenefitRepository } from '@mcp-gen-ui/core';
|
|
17
|
+
|
|
18
|
+
const service = new BenefitToolService(new FixtureBenefitRepository());
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Persona presets
|
|
22
|
+
|
|
23
|
+
`defaultPersonaRegistry` ships starter recommendation weight presets for
|
|
24
|
+
`youth_jobseeker`, `university_student`, `newlywed_family`, `single_parent`,
|
|
25
|
+
`senior`, and `general`. `general` is the backward-compatible uniform-weight
|
|
26
|
+
default. Use `resolveWeights(persona, overrides)` to merge request-level weight
|
|
27
|
+
overrides on top of a preset, or pass `{ personas }` to `BenefitToolService` to
|
|
28
|
+
replace the registry for an embedder-specific deployment.
|
|
29
|
+
|
|
30
|
+
The package is LLM-free.
|
|
31
|
+
|
|
32
|
+
Recommendations are candidates, not eligibility decisions, and users must verify final requirements on the official source.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { BenefitRecord } from "@mcp-gen-ui/schema";
|
|
2
|
+
/**
|
|
3
|
+
* Plugin-style consistency checks. New rules can be added to the array (or
|
|
4
|
+
* passed in) without touching the runner, so contributors extend validation
|
|
5
|
+
* without rewriting core logic.
|
|
6
|
+
*/
|
|
7
|
+
export interface ConsistencyIssue {
|
|
8
|
+
ruleId: string;
|
|
9
|
+
severity: "error" | "warning";
|
|
10
|
+
benefitId: string;
|
|
11
|
+
message: string;
|
|
12
|
+
}
|
|
13
|
+
export interface ConsistencyRule {
|
|
14
|
+
id: string;
|
|
15
|
+
check(benefit: BenefitRecord): ConsistencyIssue[];
|
|
16
|
+
}
|
|
17
|
+
export declare const defaultConsistencyRules: ConsistencyRule[];
|
|
18
|
+
export declare function runConsistencyRules(benefits: BenefitRecord[], rules?: ConsistencyRule[]): ConsistencyIssue[];
|
|
19
|
+
//# sourceMappingURL=consistency.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"consistency.d.ts","sourceRoot":"","sources":["../src/consistency.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAExD;;;;GAIG;AACH,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,OAAO,GAAG,SAAS,CAAC;IAC9B,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,CAAC,OAAO,EAAE,aAAa,GAAG,gBAAgB,EAAE,CAAC;CACnD;AAED,eAAO,MAAM,uBAAuB,EAAE,eAAe,EAkDpD,CAAC;AAEF,wBAAgB,mBAAmB,CACjC,QAAQ,EAAE,aAAa,EAAE,EACzB,KAAK,GAAE,eAAe,EAA4B,GACjD,gBAAgB,EAAE,CAIpB"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
export const defaultConsistencyRules = [
|
|
2
|
+
{
|
|
3
|
+
id: "required-source-url",
|
|
4
|
+
check: (benefit) => benefit.sourceUrl.length > 0
|
|
5
|
+
? []
|
|
6
|
+
: [
|
|
7
|
+
{
|
|
8
|
+
ruleId: "required-source-url",
|
|
9
|
+
severity: "error",
|
|
10
|
+
benefitId: benefit.id,
|
|
11
|
+
message: "sourceUrl is required."
|
|
12
|
+
}
|
|
13
|
+
]
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
id: "application-url-when-online",
|
|
17
|
+
check: (benefit) => benefit.applicationMethods.some((method) => method.includes("온라인")) &&
|
|
18
|
+
!benefit.applicationUrl
|
|
19
|
+
? [
|
|
20
|
+
{
|
|
21
|
+
ruleId: "application-url-when-online",
|
|
22
|
+
severity: "warning",
|
|
23
|
+
benefitId: benefit.id,
|
|
24
|
+
message: "Online application method should include an applicationUrl."
|
|
25
|
+
}
|
|
26
|
+
]
|
|
27
|
+
: []
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
id: "dedupe-documents",
|
|
31
|
+
check: (benefit) => {
|
|
32
|
+
const labels = new Set();
|
|
33
|
+
return benefit.documents.flatMap((document) => {
|
|
34
|
+
if (labels.has(document.label)) {
|
|
35
|
+
return [
|
|
36
|
+
{
|
|
37
|
+
ruleId: "dedupe-documents",
|
|
38
|
+
severity: "warning",
|
|
39
|
+
benefitId: benefit.id,
|
|
40
|
+
message: `Duplicate document: ${document.label}`
|
|
41
|
+
}
|
|
42
|
+
];
|
|
43
|
+
}
|
|
44
|
+
labels.add(document.label);
|
|
45
|
+
return [];
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
];
|
|
50
|
+
export function runConsistencyRules(benefits, rules = defaultConsistencyRules) {
|
|
51
|
+
return benefits.flatMap((benefit) => rules.flatMap((rule) => rule.check(benefit)));
|
|
52
|
+
}
|
|
53
|
+
//# sourceMappingURL=consistency.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"consistency.js","sourceRoot":"","sources":["../src/consistency.ts"],"names":[],"mappings":"AAmBA,MAAM,CAAC,MAAM,uBAAuB,GAAsB;IACxD;QACE,EAAE,EAAE,qBAAqB;QACzB,KAAK,EAAE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AC,CAAC;QACL,CAAC;KACF;CACF,CAAC;AAEF,MAAM,UAAU,mBAAmB,CACjC,QAAyB,EACzB,QAA2B,uBAAuB;IAElD,OAAO,QAAQ,CAAC,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,CAClC,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAC7C,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Convert a Korean public-data bare application deadline date to the gateway's
|
|
3
|
+
* UTC-only `applicationDeadline` contract.
|
|
4
|
+
*
|
|
5
|
+
* Public-data sources commonly publish date-only deadlines in KST. A date-only
|
|
6
|
+
* value means applications remain open through the end of that calendar day in
|
|
7
|
+
* Korea, so `2026-07-15` becomes `2026-07-15T14:59:59.000Z` (23:59:59 KST).
|
|
8
|
+
*/
|
|
9
|
+
export declare function kstDeadlineToUtc(date: string): string;
|
|
10
|
+
//# sourceMappingURL=deadlines.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deadlines.d.ts","sourceRoot":"","sources":["../src/deadlines.ts"],"names":[],"mappings":"AAGA;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAsBrD"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
const KST_UTC_OFFSET_HOURS = 9;
|
|
2
|
+
const DATE_ONLY_RE = /^(\d{4})-(\d{2})-(\d{2})$/;
|
|
3
|
+
/**
|
|
4
|
+
* Convert a Korean public-data bare application deadline date to the gateway's
|
|
5
|
+
* UTC-only `applicationDeadline` contract.
|
|
6
|
+
*
|
|
7
|
+
* Public-data sources commonly publish date-only deadlines in KST. A date-only
|
|
8
|
+
* value means applications remain open through the end of that calendar day in
|
|
9
|
+
* Korea, so `2026-07-15` becomes `2026-07-15T14:59:59.000Z` (23:59:59 KST).
|
|
10
|
+
*/
|
|
11
|
+
export function kstDeadlineToUtc(date) {
|
|
12
|
+
const match = DATE_ONLY_RE.exec(date);
|
|
13
|
+
if (!match) {
|
|
14
|
+
throw new Error("KST deadline must be a bare date in YYYY-MM-DD format.");
|
|
15
|
+
}
|
|
16
|
+
const [, yearPart, monthPart, dayPart] = match;
|
|
17
|
+
const year = Number(yearPart);
|
|
18
|
+
const month = Number(monthPart);
|
|
19
|
+
const day = Number(dayPart);
|
|
20
|
+
const utcMillis = Date.UTC(year, month - 1, day, 24 - KST_UTC_OFFSET_HOURS - 1, 59, 59, 0);
|
|
21
|
+
const normalized = new Date(utcMillis);
|
|
22
|
+
if (normalized.getUTCFullYear() !== year ||
|
|
23
|
+
normalized.getUTCMonth() !== month - 1 ||
|
|
24
|
+
normalized.getUTCDate() !== day) {
|
|
25
|
+
throw new Error(`Invalid KST deadline date: ${date}`);
|
|
26
|
+
}
|
|
27
|
+
return normalized.toISOString();
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=deadlines.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deadlines.js","sourceRoot":"","sources":["../src/deadlines.ts"],"names":[],"mappings":"AAAA,MAAM,oBAAoB,GAAG,CAAC,CAAC;AAC/B,MAAM,YAAY,GAAG,2BAA2B,CAAC;AAEjD;;;;;;;GAOG;AACH,MAAM,UAAU,gBAAgB,CAAC,IAAY;IAC3C,MAAM,KAAK,GAAG,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACtC,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,MAAM,IAAI,KAAK,CAAC,wDAAwD,CAAC,CAAC;IAC5E,CAAC;IAED,MAAM,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,OAAO,CAAC,GAAG,KAAK,CAAC;IAC/C,MAAM,IAAI,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC;IAC9B,MAAM,KAAK,GAAG,MAAM,CAAC,SAAS,CAAC,CAAC;IAChC,MAAM,GAAG,GAAG,MAAM,CAAC,OAAO,CAAC,CAAC;IAC5B,MAAM,SAAS,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,KAAK,GAAG,CAAC,EAAE,GAAG,EAAE,EAAE,GAAG,oBAAoB,GAAG,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC;IAC3F,MAAM,UAAU,GAAG,IAAI,IAAI,CAAC,SAAS,CAAC,CAAC;IAEvC,IACE,UAAU,CAAC,cAAc,EAAE,KAAK,IAAI;QACpC,UAAU,CAAC,WAAW,EAAE,KAAK,KAAK,GAAG,CAAC;QACtC,UAAU,CAAC,UAAU,EAAE,KAAK,GAAG,EAC/B,CAAC;QACD,MAAM,IAAI,KAAK,CAAC,8BAA8B,IAAI,EAAE,CAAC,CAAC;IACxD,CAAC;IAED,OAAO,UAAU,CAAC,WAAW,EAAE,CAAC;AAClC,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { BenefitRecord } from "@mcp-gen-ui/schema";
|
|
2
|
+
/**
|
|
3
|
+
* Deterministic, non-identifying sample data so tests and demos reproduce
|
|
4
|
+
* without live government-site dependencies. URLs point at public service
|
|
5
|
+
* pages; no sensitive identifiers are present.
|
|
6
|
+
*/
|
|
7
|
+
export declare const fixtureBenefits: BenefitRecord[];
|
|
8
|
+
//# sourceMappingURL=fixtures.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fixtures.d.ts","sourceRoot":"","sources":["../src/fixtures.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAExD;;;;GAIG;AACH,eAAO,MAAM,eAAe,EAAE,aAAa,EAyF1C,CAAC"}
|
package/dist/fixtures.js
ADDED
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Deterministic, non-identifying sample data so tests and demos reproduce
|
|
3
|
+
* without live government-site dependencies. URLs point at public service
|
|
4
|
+
* pages; no sensitive identifiers are present.
|
|
5
|
+
*/
|
|
6
|
+
export const fixtureBenefits = [
|
|
7
|
+
{
|
|
8
|
+
id: "seoul-youth-rent-support",
|
|
9
|
+
title: "서울 청년 월세 지원",
|
|
10
|
+
provider: "서울특별시",
|
|
11
|
+
category: "housing",
|
|
12
|
+
summary: "서울 거주 청년의 주거비 부담을 줄이기 위한 월세 지원 사업입니다.",
|
|
13
|
+
target: "서울시에 거주하는 청년 1인 가구 중 공고 조건을 충족하는 신청자",
|
|
14
|
+
eligibility: [
|
|
15
|
+
"서울 거주",
|
|
16
|
+
"청년 연령대",
|
|
17
|
+
"무주택 또는 주거 지원 필요",
|
|
18
|
+
"공고별 소득 기준 확인 필요"
|
|
19
|
+
],
|
|
20
|
+
applicationPeriod: "공고별 상이",
|
|
21
|
+
applicationDeadline: "2030-07-15T09:00:00.000Z",
|
|
22
|
+
fee: "없음",
|
|
23
|
+
processingTime: "공고별 상이",
|
|
24
|
+
documents: [
|
|
25
|
+
{ id: "resident-proof", label: "거주지 확인 서류", required: true, source: "program" },
|
|
26
|
+
{ id: "rent-contract", label: "임대차계약서", required: true, source: "program" },
|
|
27
|
+
{ id: "income-proof", label: "소득 확인 서류", required: true, source: "program" }
|
|
28
|
+
],
|
|
29
|
+
applicationMethods: ["온라인 신청", "공고문 확인 후 제출"],
|
|
30
|
+
applicationUrl: "https://www.gov.kr/portal/service/serviceInfo/611000000119",
|
|
31
|
+
sourceUrl: "https://www.gov.kr/portal/service/serviceInfo/611000000119",
|
|
32
|
+
lastFetchedAt: "2026-05-20T00:00:00.000Z",
|
|
33
|
+
evidence: [],
|
|
34
|
+
searchableText: "서울 청년 월세 주거 주택 임대차 지원 대학생",
|
|
35
|
+
regionTags: ["서울"],
|
|
36
|
+
ageRanges: ["twenties", "thirties"],
|
|
37
|
+
studentOnly: false,
|
|
38
|
+
employmentStatuses: [],
|
|
39
|
+
householdTypes: ["single"]
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
id: "national-scholarship",
|
|
43
|
+
title: "국가장학금",
|
|
44
|
+
provider: "한국장학재단",
|
|
45
|
+
category: "education",
|
|
46
|
+
summary: "대학생의 등록금 부담 완화를 위한 소득연계형 장학금입니다.",
|
|
47
|
+
target: "국내 대학 재학생 중 학자금 지원 구간 등 기준을 충족하는 학생",
|
|
48
|
+
eligibility: ["대학생", "학자금 지원 구간 확인 필요", "성적 기준 확인 필요"],
|
|
49
|
+
applicationPeriod: "학기별 신청 기간",
|
|
50
|
+
fee: "없음",
|
|
51
|
+
processingTime: "학기별 심사 일정에 따름",
|
|
52
|
+
documents: [
|
|
53
|
+
{ id: "student-status", label: "재학 상태 확인", required: true, source: "program" },
|
|
54
|
+
{ id: "household-consent", label: "가구원 정보제공 동의", required: true, source: "program" }
|
|
55
|
+
],
|
|
56
|
+
applicationMethods: ["한국장학재단 온라인 신청"],
|
|
57
|
+
applicationUrl: "https://www.kosaf.go.kr/",
|
|
58
|
+
sourceUrl: "https://www.gov.kr/portal/service/serviceInfo/B55252900001",
|
|
59
|
+
lastFetchedAt: "2026-05-20T00:00:00.000Z",
|
|
60
|
+
evidence: [],
|
|
61
|
+
searchableText: "대학생 장학금 등록금 학자금 교육 지원",
|
|
62
|
+
regionTags: [],
|
|
63
|
+
ageRanges: ["teen", "twenties", "thirties"],
|
|
64
|
+
studentOnly: true,
|
|
65
|
+
employmentStatuses: [],
|
|
66
|
+
householdTypes: []
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
id: "job-seeker-allowance",
|
|
70
|
+
title: "국민취업지원제도",
|
|
71
|
+
provider: "고용노동부",
|
|
72
|
+
category: "employment",
|
|
73
|
+
summary: "취업을 원하는 사람에게 취업지원서비스와 수당을 제공하는 제도입니다.",
|
|
74
|
+
target: "취업을 희망하는 구직자 중 유형별 요건을 충족하는 신청자",
|
|
75
|
+
eligibility: ["구직 의사", "소득 및 재산 기준 확인 필요", "취업 상태 확인 필요"],
|
|
76
|
+
applicationPeriod: "상시",
|
|
77
|
+
fee: "없음",
|
|
78
|
+
processingTime: "심사 일정에 따름",
|
|
79
|
+
documents: [
|
|
80
|
+
{ id: "job-seeker-profile", label: "구직 신청 정보", required: true, source: "program" },
|
|
81
|
+
{ id: "income-assets", label: "소득·재산 확인 자료", required: true, source: "program" }
|
|
82
|
+
],
|
|
83
|
+
applicationMethods: ["온라인 신청", "고용센터 방문"],
|
|
84
|
+
applicationUrl: "https://www.kua.go.kr/",
|
|
85
|
+
sourceUrl: "https://www.gov.kr/portal/service/serviceInfo/149200000001",
|
|
86
|
+
lastFetchedAt: "2026-05-20T00:00:00.000Z",
|
|
87
|
+
evidence: [],
|
|
88
|
+
searchableText: "구직 취업 청년 실업 고용 지원 수당",
|
|
89
|
+
regionTags: [],
|
|
90
|
+
ageRanges: ["twenties", "thirties", "forties", "fifties"],
|
|
91
|
+
studentOnly: false,
|
|
92
|
+
employmentStatuses: ["unemployed"],
|
|
93
|
+
householdTypes: []
|
|
94
|
+
}
|
|
95
|
+
];
|
|
96
|
+
//# sourceMappingURL=fixtures.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fixtures.js","sourceRoot":"","sources":["../src/fixtures.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,MAAM,CAAC,MAAM,eAAe,GAAoB;IAC9C;QACE,EAAE,EAAE,0BAA0B;QAC9B,KAAK,EAAE,aAAa;QACpB,QAAQ,EAAE,OAAO;QACjB,QAAQ,EAAE,SAAS;QACnB,OAAO,EAAE,uCAAuC;QAChD,MAAM,EAAE,sCAAsC;QAC9C,WAAW,EAAE;YACX,OAAO;YACP,QAAQ;YACR,iBAAiB;YACjB,iBAAiB;SAClB;QACD,iBAAiB,EAAE,QAAQ;QAC3B,mBAAmB,EAAE,0BAA0B;QAC/C,GAAG,EAAE,IAAI;QACT,cAAc,EAAE,QAAQ;QACxB,SAAS,EAAE;YACT,EAAE,EAAE,EAAE,gBAAgB,EAAE,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CAAC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * from "./consistency.js";
|
|
2
|
+
export * from "./deadlines.js";
|
|
3
|
+
export * from "./fixtures.js";
|
|
4
|
+
export * from "./personas.js";
|
|
5
|
+
export * from "./recommender.js";
|
|
6
|
+
export * from "./repository.js";
|
|
7
|
+
export * from "./sqlite-store.js";
|
|
8
|
+
export * from "./tool-service.js";
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * from "./consistency.js";
|
|
2
|
+
export * from "./deadlines.js";
|
|
3
|
+
export * from "./fixtures.js";
|
|
4
|
+
export * from "./personas.js";
|
|
5
|
+
export * from "./recommender.js";
|
|
6
|
+
export * from "./repository.js";
|
|
7
|
+
export * from "./sqlite-store.js";
|
|
8
|
+
export * from "./tool-service.js";
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import type { RecommendationPersona, RecommendationWeights } from "@mcp-gen-ui/schema";
|
|
2
|
+
export type ResolvedRecommendationWeights = Required<RecommendationWeights>;
|
|
3
|
+
export type PersonaPreset<Id extends string = string> = {
|
|
4
|
+
id: Id;
|
|
5
|
+
description: string;
|
|
6
|
+
weights: ResolvedRecommendationWeights;
|
|
7
|
+
};
|
|
8
|
+
export type PersonaRegistry<Id extends string = string> = Record<Id, PersonaPreset<Id>>;
|
|
9
|
+
export declare const uniformRecommendationWeights: ResolvedRecommendationWeights;
|
|
10
|
+
/**
|
|
11
|
+
* Built-in starter personas for public-benefit ranking.
|
|
12
|
+
*
|
|
13
|
+
* These are intentionally small, documented presets rather than hidden policy:
|
|
14
|
+
* embedders can replace the registry to reflect their own audience. `general`
|
|
15
|
+
* preserves the previous uniform-weight default, while the other presets make a
|
|
16
|
+
* single user context more prominent without disabling any score dimension.
|
|
17
|
+
*/
|
|
18
|
+
export declare const defaultPersonaRegistry: {
|
|
19
|
+
youth_jobseeker: {
|
|
20
|
+
id: "youth_jobseeker";
|
|
21
|
+
description: string;
|
|
22
|
+
weights: {
|
|
23
|
+
age: number;
|
|
24
|
+
employment: number;
|
|
25
|
+
category: number;
|
|
26
|
+
query: number;
|
|
27
|
+
student: number;
|
|
28
|
+
region: number;
|
|
29
|
+
household: number;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
university_student: {
|
|
33
|
+
id: "university_student";
|
|
34
|
+
description: string;
|
|
35
|
+
weights: {
|
|
36
|
+
age: number;
|
|
37
|
+
student: number;
|
|
38
|
+
category: number;
|
|
39
|
+
employment: number;
|
|
40
|
+
region: number;
|
|
41
|
+
household: number;
|
|
42
|
+
query: number;
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
newlywed_family: {
|
|
46
|
+
id: "newlywed_family";
|
|
47
|
+
description: string;
|
|
48
|
+
weights: {
|
|
49
|
+
region: number;
|
|
50
|
+
age: number;
|
|
51
|
+
household: number;
|
|
52
|
+
category: number;
|
|
53
|
+
employment: number;
|
|
54
|
+
student: number;
|
|
55
|
+
query: number;
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
single_parent: {
|
|
59
|
+
id: "single_parent";
|
|
60
|
+
description: string;
|
|
61
|
+
weights: {
|
|
62
|
+
region: number;
|
|
63
|
+
employment: number;
|
|
64
|
+
household: number;
|
|
65
|
+
category: number;
|
|
66
|
+
student: number;
|
|
67
|
+
age: number;
|
|
68
|
+
query: number;
|
|
69
|
+
};
|
|
70
|
+
};
|
|
71
|
+
senior: {
|
|
72
|
+
id: "senior";
|
|
73
|
+
description: string;
|
|
74
|
+
weights: {
|
|
75
|
+
region: number;
|
|
76
|
+
age: number;
|
|
77
|
+
category: number;
|
|
78
|
+
employment: number;
|
|
79
|
+
student: number;
|
|
80
|
+
household: number;
|
|
81
|
+
query: number;
|
|
82
|
+
};
|
|
83
|
+
};
|
|
84
|
+
general: {
|
|
85
|
+
id: "general";
|
|
86
|
+
description: string;
|
|
87
|
+
weights: {
|
|
88
|
+
employment: number;
|
|
89
|
+
student: number;
|
|
90
|
+
region: number;
|
|
91
|
+
age: number;
|
|
92
|
+
household: number;
|
|
93
|
+
category: number;
|
|
94
|
+
query: number;
|
|
95
|
+
};
|
|
96
|
+
};
|
|
97
|
+
};
|
|
98
|
+
export declare function resolveWeights(persona: RecommendationPersona | string | undefined, overrides?: RecommendationWeights, registry?: PersonaRegistry): ResolvedRecommendationWeights;
|
|
99
|
+
export declare function listPersonaPresets(registry?: PersonaRegistry): PersonaPreset[];
|
|
100
|
+
//# sourceMappingURL=personas.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"personas.d.ts","sourceRoot":"","sources":["../src/personas.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,qBAAqB,EACrB,qBAAqB,EACtB,MAAM,oBAAoB,CAAC;AAE5B,MAAM,MAAM,6BAA6B,GAAG,QAAQ,CAAC,qBAAqB,CAAC,CAAC;AAE5E,MAAM,MAAM,aAAa,CAAC,EAAE,SAAS,MAAM,GAAG,MAAM,IAAI;IACtD,EAAE,EAAE,EAAE,CAAC;IACP,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,6BAA6B,CAAC;CACxC,CAAC;AAEF,MAAM,MAAM,eAAe,CAAC,EAAE,SAAS,MAAM,GAAG,MAAM,IAAI,MAAM,CAAC,EAAE,EAAE,aAAa,CAAC,EAAE,CAAC,CAAC,CAAC;AAExF,eAAO,MAAM,4BAA4B,EAAE,6BAQ1C,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2De,CAAC;AAEnD,wBAAgB,cAAc,CAC5B,OAAO,EAAE,qBAAqB,GAAG,MAAM,GAAG,SAAS,EACnD,SAAS,GAAE,qBAA0B,EACrC,QAAQ,GAAE,eAAwC,GACjD,6BAA6B,CAM/B;AAED,wBAAgB,kBAAkB,CAAC,QAAQ,GAAE,eAAwC,GAAG,aAAa,EAAE,CAEtG"}
|