@roottale/cms-mcp 0.75.3 → 0.76.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/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @roottale/cms-mcp
2
2
 
3
+ ## 0.76.0
4
+
5
+ ### Patch Changes
6
+
7
+ - e41421a: `RootTaleBlogPost`에 `authorTitle` prop을 추가했습니다. 작성자 slug로 직함을 돌려주면 글 머리와 작성자 카드가 `작성자 김루트` 대신 `김루트 세무사`처럼 이름 뒤에 직함을 씁니다. 지정하지 않으면 기존 표기를 유지합니다. 글 머리의 `작성자`와 링크로 감싼 이름 사이 공백이 사라져 `작성자김루트`로 붙어 보이던 문제도 고쳤습니다.
8
+
9
+ ## 0.75.4
10
+
11
+ ### Patch Changes
12
+
13
+ - 965e522: 문의 폼 항목에 `role: "consent"`(동의 기록)를 지정할 수 있습니다. 방문자가 동의할 때 본 안내를 접수 건에 남기는 항목으로, 연락처·문의 요약으로 읽지 않으며 받은 문의에서는 추가 입력 항목 대신 개인정보 동의에 표시됩니다. 지정하지 않은 폼은 기존 동작을 유지합니다.
14
+
3
15
  ## 0.75.3
4
16
 
5
17
  ### 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.3" : "dev";
1858
+ var VERSION = true ? "0.76.0" : "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/blog.md CHANGED
@@ -267,6 +267,19 @@ SDK 0.69.0부터 `categoryHref`로 H1 위 카테고리 링크를 별도로 지
267
267
  />
268
268
  ```
269
269
 
270
+ 작성자 이름 뒤에 직함을 붙이려면 `authorTitle`을 줍니다. 작성자 slug를 받아 직함을
271
+ 돌려주면 헤더 메타와 저자 카드가 `작성자 김루트` 대신 `김루트 세무사`로 씁니다. 직함은
272
+ 사이트가 가진 값에서 찾습니다(예: `editor.authorProfile`로 작성자와 이어진 구성원 글의
273
+ 직함 필드). 빈 값을 돌려주거나 slug가 없는 작성자는 기존 표기 그대로입니다.
274
+
275
+ ```tsx
276
+ <RootTaleBlogPost
277
+ apiKey={apiKey}
278
+ slugOrId={slug}
279
+ authorTitle={(slug) => members.find((member) => member.slug === slug)?.role}
280
+ />
281
+ ```
282
+
270
283
  `breadcrumb` prop(opt-in, 기본 off)을 주면 시각 브레드크럼(홈 › 블로그 ›
271
284
  카테고리 › 글 제목)을 본문 위에 렌더하고, `siteUrl` 을 함께 주면
272
285
  `BreadcrumbList` JSON-LD 도 같이 emit합니다:
@@ -577,6 +577,7 @@ ROOT-ADMIN 글 목록·편집 화면의 공개/검수 사이트 열기가 저장
577
577
  `imageField`·`bioField`(필드 name)가 이름·사진·소개가 되고 글 slug가 작성자 주소가 되며, 글을 고치면 따라오고
578
578
  내리면 보관된다. `presentation.hiddenWhen`에 걸린 글은 빠진다. 글마다 어느 작성자로 낼지는 계속 직접 고른다.
579
579
  사이트는 `RootTaleBlogPost`의 `authorHref`로 그 주소를 모델 상세 화면에 잇는다.
580
+ 이름 뒤에 직함을 붙이려면 `authorTitle`에 slug로 그 글의 직함 필드를 찾아 넘긴다.
580
581
 
581
582
  `editor.hiddenSections`는 `body`, `excerpt`, `featuredImage`, `relatedContent`,
582
583
  `editorialReview`, `reservations` 중
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.fields, data),
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(fields: InquiryFormField[], data: FormData): Record<string, InquiryAnswer> {
127
+ function collectAnswers(definition: InquiryFormDefinition, data: FormData): Record<string, InquiryAnswer> {
128
128
  const answers: Record<string, InquiryAnswer> = {};
129
- for (const field of fields) {
130
- if (field.type === "multiselect") answers[field.key] = data.getAll(field.key).filter((value): value is string => typeof value === "string");
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@roottale/cms-mcp",
3
- "version": "0.75.3",
3
+ "version": "0.76.0",
4
4
  "type": "module",
5
5
  "description": "RootTale CMS MCP server and CLI for models, entries, exposures, media, integration docs, and public API access.",
6
6
  "bin": {