@roottale/cms-mcp 0.75.3 → 0.75.4
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/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @roottale/cms-mcp
|
|
2
2
|
|
|
3
|
+
## 0.75.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 965e522: 문의 폼 항목에 `role: "consent"`(동의 기록)를 지정할 수 있습니다. 방문자가 동의할 때 본 안내를 접수 건에 남기는 항목으로, 연락처·문의 요약으로 읽지 않으며 받은 문의에서는 추가 입력 항목 대신 개인정보 동의에 표시됩니다. 지정하지 않은 폼은 기존 동작을 유지합니다.
|
|
8
|
+
|
|
3
9
|
## 0.75.3
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
package/dist/index.js
CHANGED
|
@@ -1855,7 +1855,7 @@ function registerTools(server) {
|
|
|
1855
1855
|
}
|
|
1856
1856
|
|
|
1857
1857
|
// src/server.ts
|
|
1858
|
-
var VERSION = true ? "0.75.
|
|
1858
|
+
var VERSION = true ? "0.75.4" : "dev";
|
|
1859
1859
|
var SERVER_INSTRUCTIONS = `
|
|
1860
1860
|
roottale-cms-mcp\uB294 RootTale CMS\uB97C \uC678\uBD80 \uC0AC\uC774\uD2B8(\uC8FC\uB85C Next.js)\uC5D0 \uC5F0\uB3D9\uD558\uACE0
|
|
1861
1861
|
\uAE00\xB7\uC378\uB124\uC77C\xB7\uBCF8\uBB38 \uC774\uBBF8\uC9C0\uB97C \uC790\uB3D9\uD654\uD558\uAE30 \uC704\uD55C \uBB38\uC11C\xB7\uC608\uC2DC \uCF54\uB4DC\xB7API tool\uC744 \uC81C\uACF5\uD569\uB2C8\uB2E4.
|
package/docs/inquiries.md
CHANGED
|
@@ -61,6 +61,12 @@ const [quote, service] = await Promise.all([
|
|
|
61
61
|
문자열 배열, 숫자는 숫자, 체크박스는 boolean으로 보냅니다. 정의·타입·검증의
|
|
62
62
|
공통 계약은 공개 패키지 `@roottale/inquiry-forms`에 있습니다.
|
|
63
63
|
|
|
64
|
+
항목의 `role`은 받은 문의에서 그 답변을 어디에 보일지 정합니다. `name`·`email`·`phone`은
|
|
65
|
+
연락처, `message`는 문의 요약, `consent`는 동의 기록입니다. 방문자가 동의할 때 본 안내를
|
|
66
|
+
접수 건마다 남기려면 `text`·`textarea` 항목 하나에 `role: "consent"`를 지정하고, 입력칸으로
|
|
67
|
+
보이지 않은 채 그 안내 문장을 답변으로 보냅니다. 받은 문의에서는 추가 입력 항목이 아니라
|
|
68
|
+
옆 칸의 개인정보 동의에 접혀 보이고, 내보내기에는 개인정보 동의 열에 남습니다.
|
|
69
|
+
|
|
64
70
|
## 권장 — `submitFormInquiry` Server Action
|
|
65
71
|
|
|
66
72
|
아래 `attempt`는 브라우저가 한 번의 제출을 시작할 때 만든 입력 묶음입니다.
|
|
@@ -112,6 +112,9 @@ PC·모바일 미리보기는 동일한 영상 공개 값 계약을 사용합니
|
|
|
112
112
|
|
|
113
113
|
### 기존 사이트를 연결할 때
|
|
114
114
|
|
|
115
|
+
`content-model:sync`는 dry-run에서 바뀔 항목을 보여 줍니다. 검색 노출이 켜진 분류를 끄는 변경은
|
|
116
|
+
`--allow-hub-demotion` 없이는 멈추므로, 노출을 유지하려면 파일에 `"hubPromoted": true`를 넣으세요.
|
|
117
|
+
|
|
115
118
|
먼저 `content-model:sync`로 사이트 필드 그룹을 등록한 뒤 `site:content-contract:sync`로
|
|
116
119
|
화면 편집 계약을 등록합니다. 필드 key는 해석된 그룹 전체에서 중첩 깊이와 관계없이
|
|
117
120
|
유일해야 합니다. `fieldKeys`에 없는 key를 쓰거나 여러 섹션이 같은 값을 편집하도록
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import { useState, useTransition, type FormEvent, type ReactNode } from "react";
|
|
4
4
|
import { readAttribution } from "@roottale/cms-client/attribution";
|
|
5
5
|
import { readJourney, trackCustomEvent, trackFormError } from "@roottale/analytics-runtime";
|
|
6
|
-
import type { InquiryAnswer, InquiryFormField, PublishedInquiryForm, SubmitFormInquiryResult } from "@roottale/cms-client/server";
|
|
6
|
+
import type { InquiryAnswer, InquiryFormDefinition, InquiryFormField, PublishedInquiryForm, SubmitFormInquiryResult } from "@roottale/cms-client/server";
|
|
7
7
|
|
|
8
8
|
import { submitSiteForm, type SiteFormAttempt } from "../lib/actions/submit-site-form";
|
|
9
9
|
import type { SiteFormKey } from "../lib/site-inquiry-forms";
|
|
@@ -27,7 +27,7 @@ export function SiteInquiryForm({
|
|
|
27
27
|
const nextAttempt: SiteFormAttempt = {
|
|
28
28
|
...(attempt ?? {
|
|
29
29
|
version: form.version,
|
|
30
|
-
answers: collectAnswers(form.definition
|
|
30
|
+
answers: collectAnswers(form.definition, data),
|
|
31
31
|
privacyConsent: data.get("privacyConsent") === "on",
|
|
32
32
|
idempotencyKey: crypto.randomUUID(),
|
|
33
33
|
attribution: readAttribution(),
|
|
@@ -86,7 +86,7 @@ export function SiteInquiryForm({
|
|
|
86
86
|
<h2>{form.definition.title}</h2>
|
|
87
87
|
<fieldset disabled={pending || attempt !== null}>
|
|
88
88
|
<legend>문의 내용</legend>
|
|
89
|
-
{form.definition.fields.map((field) => (
|
|
89
|
+
{form.definition.fields.filter((field) => field.role !== "consent").map((field) => (
|
|
90
90
|
<div key={field.key}>
|
|
91
91
|
<label htmlFor={`${form.formId}-${field.key}`}>{field.label}{field.required ? " (필수)" : ""}</label>
|
|
92
92
|
<AnswerField field={field} id={`${form.formId}-${field.key}`} />
|
|
@@ -124,10 +124,12 @@ function AnswerField({ field, id }: { field: InquiryFormField; id: string }) {
|
|
|
124
124
|
return <input {...common} type={field.type} min={field.min} max={field.max} maxLength={field.maxLength} />;
|
|
125
125
|
}
|
|
126
126
|
|
|
127
|
-
function collectAnswers(
|
|
127
|
+
function collectAnswers(definition: InquiryFormDefinition, data: FormData): Record<string, InquiryAnswer> {
|
|
128
128
|
const answers: Record<string, InquiryAnswer> = {};
|
|
129
|
-
for (const field of fields) {
|
|
130
|
-
|
|
129
|
+
for (const field of definition.fields) {
|
|
130
|
+
// 동의 기록 항목은 입력칸으로 보이지 않고, 방문자가 체크하며 본 동의 문구를 남긴다.
|
|
131
|
+
if (field.role === "consent") answers[field.key] = definition.privacyConsentText;
|
|
132
|
+
else if (field.type === "multiselect") answers[field.key] = data.getAll(field.key).filter((value): value is string => typeof value === "string");
|
|
131
133
|
else if (field.type === "checkbox") answers[field.key] = data.has(field.key);
|
|
132
134
|
else {
|
|
133
135
|
const value = text(data.get(field.key));
|
package/package.json
CHANGED