@ryusenkei/maezae 0.14.0 → 0.15.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/README.md CHANGED
@@ -147,6 +147,15 @@ if (!(await verifyRequest(env.CMS_FUNCTION_SECRET, request, { header: SIGNED_HEA
147
147
  const body = (await request.json()) as PublishCheckRequest;
148
148
  ```
149
149
 
150
+ - 検査だけの実行: 提出・公開前の検査(`publish_check`)の本文の `dryRun` が `true` なら、提出・公開をせずに結果だけを見る依頼(MCP の `check_entry` など、0.15.0)
151
+ - 行は書きかけでもよい。返した `problems` は提出・公開を止めず、人と AI に見せるだけ
152
+ - 重い検査(引用の照合など)を `dryRun` のときだけ足してよい。時間切れ(1件3秒)は同じ
153
+ - `problems` の `message` はそのまま AI と画面に出るため、秘密の値・内部の URL を含めない
154
+
155
+ ```ts
156
+ if (body.hook === 'publish_check' && body.dryRun) problems.push(...(await verifyQuotes(body.values)));
157
+ ```
158
+
150
159
  - Webhook の重複: 失敗した送信は同じ本文で再送する。本文の `id`(イベントの ID)を処理済みとして保存し、同じ `id` は処理せずに 2xx を返す
151
160
 
152
161
  ## Webhook の本文と契約の版
@@ -48,12 +48,17 @@ export type SaveCheckResponse = Readonly<{
48
48
  }>[];
49
49
  values?: Readonly<Record<string, unknown>>;
50
50
  }>;
51
- /** 提出・公開前の検査の本文(stage は submit か publish、values は保存済みの行の値、id はテストの呼び出しだけ null) */
51
+ /**
52
+ * 提出・公開前の検査の本文
53
+ * - stage: submit か publish(検査だけの実行は次に進む段階)、values: 保存済みの行の値、id: テストの呼び出しだけ null
54
+ * - dryRun: 検査だけの実行なら true(提出・公開の点検では省略)
55
+ */
52
56
  export type PublishCheckRequest = Readonly<{
53
57
  hook: 'publish_check';
54
58
  type: string;
55
59
  id: string | null;
56
60
  stage: 'submit' | 'publish';
61
+ dryRun?: true;
57
62
  values: Readonly<Record<string, unknown>>;
58
63
  user: Readonly<{
59
64
  id: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ryusenkei/maezae",
3
- "version": "0.14.0",
3
+ "version": "0.15.0",
4
4
  "description": "maezae の導入先のサイト向けの SDK(配信 API の取得・本文の型・プレビューの署名・手元の開発の配信 API)",
5
5
  "license": "UNLICENSED",
6
6
  "author": "RYUSENKEI",