@appgrowstack/app-contract 0.0.0-stage → 0.1.1

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/dist/http.js ADDED
@@ -0,0 +1,465 @@
1
+ export const STREAMED_BODY_ENDPOINTS = new Set(["putCaptureFile", "putArchiveFile", "putReferenceFile", "putAssetFile", "putScreenBundle", "putProjectIcon", "putNoticeImage"]);
2
+ export const pendingApprovalBody = ["access/approval.schema.json", "pendingApproval"];
3
+ export const APPGROWSTACK_CLIENT_HEADER = "AppGrowStack-Client";
4
+ export const APPGROWSTACK_CLIENT_PATTERN = /^(ios|android)\/\d+\.\d+(\.\d+)?\/[a-z][a-z0-9-]{1,40}\/\d+\.\d+\.\d+(-[0-9A-Za-z.-]+)?$/;
5
+ export const APPGROWSTACK_DEVICE_HEADER = "AppGrowStack-Device";
6
+ export const APPGROWSTACK_INSTALL_HEADER = "AppGrowStack-Install";
7
+ export const APPGROWSTACK_ASSIGNMENT_HEADER = "AppGrowStack-Assignment";
8
+ export const ASSIGNMENT_HEADER_PATTERN = /^(app_transaction|android_id|install_id):([A-Za-z0-9._-]{1,140})$/;
9
+ export const APPGROWSTACK_STOREFRONT_HEADER = "AppGrowStack-Storefront";
10
+ export const STOREFRONT_HEADER_PATTERN = /^[A-Z]{2}$/;
11
+ export const DEVICE_HASH_PATTERN = /^[0-9a-f]{64}$/;
12
+ export const APPGROWSTACK_OWNER_CLAIM_HEADER = "AppGrowStack-Owner-Claim";
13
+ export const OWNER_CLAIM_TOKEN_PATTERN = /^[A-Za-z0-9]{32}$/;
14
+ export const OWNER_CLAIM_PATH = "/app/owner-claim/";
15
+ export const apiSignalNames = ["http_5xx", "set_invalid", "core_error", "rate_limited", "set_served", "link_robot"];
16
+ export const apiEndpoints = {
17
+ getCampaignSet: {
18
+ method: "GET",
19
+ path: "/v1/campaigns/sets/:key",
20
+ auth: "public_key_path",
21
+ request: null,
22
+ response: { status: 200, body: ["inapp/set.schema.json"] },
23
+ note: "If-None-Match で 304。ETag は \"v<version>\"(止めている間は \"v<version>-paused\")。Cache-Control: public, max-age=60。知らないキーは 404 unknown_key。人の値を受け取らない(クエリも読まない)。頭 AppGrowStack-Client(K2-5)を読んで set_served を数える",
24
+ },
25
+ getConfigSet: {
26
+ method: "GET",
27
+ path: "/v1/config/sets/:key",
28
+ auth: "public_key_path",
29
+ request: null,
30
+ response: { status: 200, body: ["config/set.schema.json"] },
31
+ note: "K6-3。R9 の組。取り方は getCampaignSet と同じ(ETag \"v<version>\"・304・max-age=60・回数の制限・人の値を受けない)。config が off・paused の間は今のバージョンの番号のまま空の組(ETag \"v<version>-paused\")。set_served・set_invalid は道(blob2)で組の取得と分ける",
32
+ },
33
+ getScreenBundle: {
34
+ method: "GET",
35
+ path: "/v1/screens/bundles/:key/:digest",
36
+ auth: "public_key_path",
37
+ request: null,
38
+ response: { status: 200, body: null },
39
+ note: "リモート画面のバンドル(1つの HTML・text/html; charset=utf-8)。:digest は組の screens の sha256。core が R2 appgrowstack-screen-bundles の <project>/<sha256>.html を読んで返す(api は R2 を持たない。RPC の readScreenBundle)。中身は sha256 で決まるので Cache-Control: public, max-age=31536000, immutable。無い・形の違う sha256 は 404 not_found。端末は受けた中身の sha256 を確かめ、違えば捨てる(docs/design/remote-screens.md 2.3節)",
40
+ },
41
+ recordAttribution: {
42
+ method: "POST",
43
+ path: "/v1/links/attributions",
44
+ auth: "public_key",
45
+ request: ["links/attribution.schema.json"],
46
+ response: { status: 200, body: ["links/attribution.schema.json", "response"] },
47
+ note: "同じ install_id の2回目は最初の答え",
48
+ },
49
+ createTicket: {
50
+ method: "POST",
51
+ path: "/v1/support/tickets",
52
+ auth: "public_key",
53
+ request: ["support/ticket.schema.json"],
54
+ response: { status: 201, body: ["support/ticket.schema.json", "createResponse"] },
55
+ note: "install_id ごとに1時間に5件まで(429 rate_limited)",
56
+ },
57
+ listTickets: {
58
+ method: "GET",
59
+ path: "/v1/support/tickets",
60
+ auth: "public_key_and_support_token",
61
+ request: null,
62
+ response: { status: 200, body: ["support/ticket.schema.json", "listResponse"] },
63
+ note: "その owner_token の問い合わせを新しい順に50件まで",
64
+ },
65
+ postTicketMessage: {
66
+ method: "POST",
67
+ path: "/v1/support/tickets/:ticket_id/messages",
68
+ auth: "public_key_and_support_token",
69
+ request: ["support/ticket.schema.json", "postMessageRequest"],
70
+ response: { status: 201, body: ["support/ticket.schema.json", "message"] },
71
+ note: "owner_token が違えば 404 not_found",
72
+ },
73
+ uploadAttachment: {
74
+ method: "POST",
75
+ path: "/v1/support/tickets/:ticket_id/attachments",
76
+ auth: "public_key_and_support_token",
77
+ request: null,
78
+ response: { status: 201, body: ["support/ticket.schema.json", "attachment"] },
79
+ note: "本文は画像そのもの(Content-Type は AttachmentContentType)。1枚5MB・1件に4枚まで(超えたら 413・409)",
80
+ },
81
+ createFeedback: {
82
+ method: "POST",
83
+ path: "/v1/support/feedback",
84
+ auth: "public_key",
85
+ request: ["support/feedback.schema.json"],
86
+ response: { status: 201, body: ["support/feedback.schema.json", "createResponse"] },
87
+ note: "アンケートで書いた文・設定から送った声。返事はしない。install_id ごとに1時間に5件まで(429 rate_limited)。support が off なら 404",
88
+ },
89
+ listArticles: {
90
+ method: "GET",
91
+ path: "/v1/support/articles",
92
+ auth: "public_key",
93
+ request: null,
94
+ response: { status: 200, body: ["support/article.schema.json", "listResponse"] },
95
+ note: "?lang=<札>。Cache-Control: public, max-age=300",
96
+ },
97
+ notifyOpened: {
98
+ method: "POST",
99
+ path: "/v1/notify/opened",
100
+ auth: "public_key",
101
+ request: ["notify/opened.schema.json"],
102
+ response: { status: 204, body: null },
103
+ note: "知らない send_id でも 204(端末は送り直さない)",
104
+ },
105
+ shortLink: {
106
+ method: "GET",
107
+ path: "/l/:code",
108
+ auth: "none",
109
+ request: null,
110
+ response: { status: 302, body: null },
111
+ note: "製品のドメイン(registry_project.web_domain)の Workers のルートで受ける。links_click に1行足して行き先へ。知らない・止めたリンクは製品のトップへ 302",
112
+ },
113
+ namedLink: {
114
+ method: "GET",
115
+ path: "/go/:code",
116
+ auth: "none",
117
+ request: null,
118
+ response: { status: 302, body: null },
119
+ note: "/l/:code と同じ。名前を付けたリンク",
120
+ },
121
+ getMySegments: {
122
+ method: "GET",
123
+ path: "/v1/people/me/segments",
124
+ auth: "public_key_and_install",
125
+ request: null,
126
+ response: { status: 200, body: ["segments/admin.schema.json", "mine"] },
127
+ note: "自分の群れと値段の段階(docs/design/remote-screens.md 4.1節・5節)。頭 AppGrowStack-Install の install につながる人の所属を返す(まだ人がいなければ空)。段階は頭 AppGrowStack-Assignment と AppGrowStack-Storefront を読んで core が決め、30日は変えない。Cache-Control: no-store。端末は保存し、起動と前面に戻った時に1時間を過ぎていれば取り直す",
128
+ },
129
+ createOfferSignature: {
130
+ method: "POST",
131
+ path: "/v1/pricing/offer-signatures",
132
+ auth: "public_key_and_install",
133
+ request: ["pricing/admin.schema.json", "signatureRequest"],
134
+ response: { status: 200, body: ["pricing/admin.schema.json", "signature"] },
135
+ note: "Apple のプロモーションのオファーの署名(docs/design/remote-screens.md 4.2節)。今の pricing/offers.json の ios のオファーと今の階段の商品だけ(違えば 404)。署名のキーが無い製品は 503。Cache-Control: no-store",
136
+ },
137
+ postSessionBatch: {
138
+ method: "POST",
139
+ path: "/v1/sessions/batches",
140
+ auth: "public_key",
141
+ request: ["sessions/batch.schema.json"],
142
+ response: { status: 200, body: ["sessions/batch.schema.json", "answer"] },
143
+ note: "R8(K3)。gzip 可・1回 256KB・出来事500件まで。install_id ごとに5秒に1回(429 と Retry-After)。sessions が off・paused なら 204(端末は溜めた物を消す)",
144
+ },
145
+ putSessionSegment: {
146
+ method: "PUT",
147
+ path: "/v1/sessions/:session_id/segments/:seq",
148
+ auth: "public_key_and_upload_token",
149
+ request: null,
150
+ response: { status: 204, body: null },
151
+ note: "頭 X-Session-Install(install_id)と X-Session-Upload(upload_token。verifySessionUploadToken)。本文は .agsr の塊そのもの(application/vnd.appgrowstack.replay-segment・1MB まで・頭は ReplaySegmentHeader)。同じ seq の2回目は 204 で捨てる。install_id ごとに1分に 4MB・プロジェクトの1日 daily_bytes",
152
+ },
153
+ postSessionDiagnostic: {
154
+ method: "POST",
155
+ path: "/v1/sessions/diagnostics",
156
+ auth: "public_key",
157
+ request: ["sessions/diagnostic.schema.json"],
158
+ response: { status: 204, body: null },
159
+ note: "R8(ADR 0058)。iOS の MetricKit の診断(hang・cpu_exception・launch)の1件と呼び出しの木。gzip 可・1回 256KB。install_id ごとに1分に4件(429 と Retry-After)。同じ id の2回目・1日の上限を超えた分も 204 で捨てる。sessions が off・paused なら 204",
160
+ },
161
+ sessionLive: {
162
+ method: "GET",
163
+ path: "/v1/sessions/live",
164
+ auth: "public_key_and_live_token",
165
+ request: null,
166
+ response: { status: 101, body: null },
167
+ note: "WebSocket(通は sessions/live.schema.json)。頭 X-Session-Install と Sec-WebSocket-Protocol の live の token。api が until と HMAC を確かめ(verifySessionLiveToken。違えば 403)、core の DO SessionLive に X-AppGrowStack-Project と X-Session-Install を付けて渡す。見る人がいるかは DO が確かめる",
168
+ },
169
+ getNoticeFeed: {
170
+ method: "GET",
171
+ path: "/v1/notices",
172
+ auth: "public_key_and_install",
173
+ request: null,
174
+ response: { status: 200, body: ["notices/device.schema.json"] },
175
+ note: "その人に今出すお知らせ(docs/design/notices.md 3節)。?lang=(言語の札)&platform=ios|android&app_version=。頭 AppGrowStack-Install の install につながる人(いなければ install:<id>)を読む人にし、返したお知らせの notice_receipt を作る。画像の url は api の根の /v1/notices/images/<公開キー>/<sha256>。Cache-Control: no-store",
176
+ },
177
+ readNotices: {
178
+ method: "POST",
179
+ path: "/v1/notices/read",
180
+ auth: "public_key_and_install",
181
+ request: ["notices/device.schema.json", "readRequest"],
182
+ response: { status: 200, body: ["notices/device.schema.json", "readResponse"] },
183
+ note: "ids を既読にし、残りの未読の数を返す。届いていない・知らない id は飛ばす。Cache-Control: no-store",
184
+ },
185
+ getNoticeImage: {
186
+ method: "GET",
187
+ path: "/v1/notices/images/:key/:digest",
188
+ auth: "public_key_path",
189
+ request: null,
190
+ response: { status: 200, body: null },
191
+ note: "お知らせの画像。core が R2 appgrowstack-screen-bundles の <project>/notices/<sha256> を読んで返す(RPC の readNoticeImage)。Cache-Control: public, max-age=31536000, immutable。無ければ 404",
192
+ },
193
+ };
194
+ const m = (permission) => ({ kind: "member", permission });
195
+ const anyPrincipal = { kind: "principal" };
196
+ export const coreEndpoints = {
197
+ createProject: { method: "POST", path: "/v1/registry/projects", auth: m("registry.project.create"), request: ["registry/admin.schema.json"], response: { status: 201, body: ["registry/admin.schema.json", "createResponse"] }, note: "同じ id は 409 conflict" },
198
+ listProjects: { method: "GET", path: "/v1/registry/projects", auth: m("registry.read"), request: null, response: { status: 200, body: ["registry/admin.schema.json", "projectList"] }, note: "" },
199
+ getProject: { method: "GET", path: "/v1/registry/projects/:project", auth: m("registry.read"), request: null, response: { status: 200, body: ["registry/admin.schema.json", "projectDetail"] }, note: "" },
200
+ updateProject: { method: "PATCH", path: "/v1/registry/projects/:project", auth: m("registry.project.update"), request: ["registry/admin.schema.json", "updateProjectRequest"], response: { status: 200, body: ["registry/project.schema.json"] }, note: "" },
201
+ exportProject: { method: "GET", path: "/v1/registry/projects/:project/export", auth: m("registry.read"), request: null, response: { status: 200, body: ["registry/admin.schema.json", "projectDetail"] }, note: "app-growth project export が app-playbook の config/products.toml の登録の値に書き出す(逆向きには書かない)" },
202
+ getProjectIcon: { method: "GET", path: "/v1/registry/projects/:project/icon", auth: m("registry.read"), request: null, response: { status: 200, body: null }, note: "アイコンの画像そのもの(png・jpeg・webp)。無ければ 404 not_found。console の名前の前に出す" },
203
+ putProjectIcon: { method: "PUT", path: "/v1/registry/projects/:project/icon", auth: m("registry.project.icon"), request: null, response: { status: 200, body: ["registry/project.schema.json", "projectIcon"] }, note: "本文は画像そのもの(Content-Type は image/png・image/jpeg・image/webp。1MB まで)。Play だけの物とまだ出していない物はアプリの repo のアイコンをこれで上げる(app-growth project icon --file)。次の週の取り直しで App Store に出ていれば、そちらに替わる" },
204
+ refreshProjectIcon: { method: "POST", path: "/v1/registry/projects/:project/icon/refresh", auth: m("registry.project.icon"), request: null, response: { status: 200, body: ["registry/project.schema.json", "projectIcon"] }, note: "App Store の公開の検索(lookup)から今すぐ取り直す。送るのは asc_app_id か bundle id だけ。App Store に無ければ 404 not_found で、今のアイコンはそのまま。core は週に1回(月曜 0:30 UTC)全部のプロジェクトで同じことをする" },
205
+ putApp: { method: "PUT", path: "/v1/registry/projects/:project/apps/:platform", auth: m("registry.app.write"), request: ["registry/admin.schema.json", "putAppRequest"], response: { status: 200, body: ["registry/app.schema.json"] }, note: "" },
206
+ createKey: { method: "POST", path: "/v1/registry/projects/:project/keys", auth: m("keys.create"), request: ["registry/admin.schema.json", "createKeyRequest"], response: { status: 201, body: ["registry/admin.schema.json", "createKeyResponse"] }, note: "" },
207
+ revokeKey: { method: "POST", path: "/v1/registry/projects/:project/keys/:key_id/revoke", auth: m("keys.revoke"), request: null, response: { status: 200, body: ["registry/key.schema.json"] }, note: "最後の active な公開キーは 409 conflict" },
208
+ listInternalMarks: { method: "GET", path: "/v1/registry/projects/:project/internal", auth: m("registry.read"), request: null, response: { status: 200, body: ["registry/admin.schema.json", "internalMarkList"] }, note: "本人とテスターのマークと、見分けごとの人数。app-growth registry internal list" },
209
+ putInternalMark: { method: "PUT", path: "/v1/registry/projects/:project/internal/:match/:value", auth: m("registry.device.write"), request: ["registry/admin.schema.json", "putInternalMarkRequest"], response: { status: 200, body: ["registry/admin.schema.json", "internalMarkResult"] }, note: ":match は uid・install・device。当たる人と、その人の出来事の audience をその場で書き換える。app-growth registry internal add" },
210
+ deleteInternalMark: { method: "DELETE", path: "/v1/registry/projects/:project/internal/:match/:value", auth: m("registry.device.write"), request: null, response: { status: 200, body: ["registry/admin.schema.json", "internalMarkResult"] }, note: "外したマークにだけ当たっていた人を、自動の見分け(channel・ネットワーク)に戻す。無いマークは 404。app-growth registry internal remove" },
211
+ createOwnerClaim: { method: "POST", path: "/v1/registry/projects/:project/owner-claims", auth: m("registry.device.write"), request: null, response: { status: 201, body: ["registry/admin.schema.json", "ownerClaim"] }, note: "端末に本人のマークを付ける10分のリンク https://<web_domain>/app/owner-claim/<token>(docs/design/people.md 6.3節)。console の「この端末は自分」と app-growth registry internal claim" },
212
+ listOwnerClaims: { method: "GET", path: "/v1/registry/projects/:project/owner-claims", auth: m("registry.read"), request: null, response: { status: 200, body: ["registry/admin.schema.json", "ownerClaimList"] }, note: "本人のリンクの一覧(作った人・時刻・期限・付けた端末・状態)。token は返さない。console の「本人の端末」と app-growth registry internal claims" },
213
+ revokeOwnerClaim: { method: "POST", path: "/v1/registry/projects/:project/owner-claims/:claim_id/revoke", auth: m("registry.device.write"), request: null, response: { status: 200, body: ["registry/admin.schema.json", "ownerClaimEntry"] }, note: ":claim_id は一覧の id。無効にしたリンクは開いても切れたリンクと同じで、マークを付けない。無効にしたリンクはそのまま返す。使った・切れたリンクは 409 conflict(付いたマークは deleteInternalMark で外す)。app-growth registry internal claim revoke" },
214
+ doctor: { method: "GET", path: "/v1/registry/doctor", auth: m("registry.read"), request: null, response: { status: 200, body: ["registry/admin.schema.json", "doctorReport"] }, note: "app-growth doctor。?project=<id> でそのプロジェクトだけ(KD-6)。呼んだ主体が見られるプロジェクトだけ" },
215
+ health: { method: "GET", path: "/v1/registry/health", auth: m("registry.read"), request: null, response: { status: 200, body: ["registry/admin.schema.json", "healthReport"] }, note: "K2-7。core の Cron が5分ごとに数えた物(inapp_health)。app-playbook が5分ごとに読んで知らせる" },
216
+ listPending: { method: "GET", path: "/v1/registry/pending", auth: m("registry.read"), request: null, response: { status: 200, body: ["registry/admin.schema.json", "pendingList"] }, note: "KD-1。呼んだ主体が見られる全部のプロジェクトの承認待ち(案・下書き・承認の依頼)。1件ごとに can_decide。?decider=human は本人が決める物(tier が human の承認の依頼)だけに絞る。console のホームはこれで読む(ADR 0053)。app-growth pending" },
217
+ getGlobalHoldout: { method: "GET", path: "/v1/registry/projects/:project/global-holdout", auth: m("people.aggregate.read"), request: null, response: { status: 200, body: ["registry/admin.schema.json", "globalHoldoutReport"] }, note: "R10。製品全体の holdout とほかの人の差(7日の継続・30日の課金・通知を切った率)。console の概要" },
218
+ getToday: { method: "GET", path: "/v1/registry/today", auth: m("registry.read"), request: null, response: { status: 200, body: ["registry/today.schema.json"] }, note: "日々の施策の検討・分析・実装を始める時に最初に読む一覧(ADR 0067)。見られる動いている製品の、すぐの知らせ・決めること・止まっている物・出せる施策(ready)・作る物が要る施策(build)・確かめ中の仮説・直近7日の検知・仮説につながっていない件を1つの一覧にし、1行ごとに cloud か local かと次に叩くコマンドを付ける。?project= で1つの製品に絞る。読めない部分(権限・insights が答えない)は飛ばす。app-growth today・MCP の today" },
219
+ getMetrics: { method: "GET", path: "/v1/registry/metrics", auth: m("registry.read"), request: null, response: { status: 200, body: ["registry/admin.schema.json", "metricsReport"] }, note: "直近30日の日ごとの数(開いた人・初めての人・キャンペーンの表示・問い合わせ・リンクのクリック)と7日・30日の合計。?project=<id> でそのプロジェクトだけ。数ごとに段階1の操作が無ければ null。console のホームと概要" },
220
+ putTouchBudget: { method: "PUT", path: "/v1/registry/projects/:project/touch-budget", auth: m("registry.budget.write"), request: ["registry/admin.schema.json", "putTouchBudgetRequest"], response: { status: 200, body: ["registry/touch-budget.schema.json"] }, note: "" },
221
+ listPolicies: { method: "GET", path: "/v1/registry/policies", auth: m("registry.read"), request: null, response: { status: 200, body: ["registry/policy.schema.json", "policyList"] }, note: "?project=<id> でそのプロジェクトと組織の決まりだけ。app-growth policy list・MCP の state" },
222
+ startRun: { method: "POST", path: "/v1/registry/runs", auth: m("registry.run.write"), request: ["registry/run.schema.json", "startRunRequest"], response: { status: 201, body: ["registry/run.schema.json"] }, note: "定期実行の1回を始める。本文の cron・tz・grace_minutes で定期実行の登録も置き換える。launchd とクラウドの定期実行が app-growth runs start(scripts/runs-exec.sh)で呼ぶ。Worker の Cron は呼ばずに core の D1 に直接書く" },
223
+ finishRun: { method: "POST", path: "/v1/registry/runs/:run/finish", auth: m("registry.run.write"), request: ["registry/run.schema.json", "finishRunRequest"], response: { status: 200, body: ["registry/run.schema.json"] }, note: "1回を終える。無い回は 404・終わった回は 409 conflict。failed は本人にメールで知らせる。app-growth runs finish" },
224
+ listRuns: { method: "GET", path: "/v1/registry/runs", auth: m("registry.read"), request: null, response: { status: 200, body: ["registry/run.schema.json", "runList"] }, note: "?job=<名前>・?limit=(1〜200・既定50)。新しい順。app-growth runs list" },
225
+ listRunJobs: { method: "GET", path: "/v1/registry/runs/jobs", auth: m("registry.read"), request: null, response: { status: 200, body: ["registry/run.schema.json", "runJobList"] }, note: "定期実行ごとの今(ok・running・failed・missed)。?stopped=true で止まった物だけ。console の最初の画面の「止まった定期実行」・app-growth runs jobs・MCP の state・life の起動時の1行" },
226
+ deleteRunJob: { method: "DELETE", path: "/v1/registry/runs/jobs/:job", auth: m("registry.run.write"), request: null, response: { status: 204, body: null }, note: "やめた定期実行を消す(記録の行も消す)。消さないと missed のまま残る。無い名前は 404。app-growth runs jobs delete" },
227
+ getCostMonth: { method: "GET", path: "/v1/registry/cost", auth: m("registry.read"), request: null, response: { status: 200, body: ["registry/cost.schema.json"] }, note: "?month=YYYY-MM(既定は今月・UTC)。費用の1つの表(Cloudflare の従量・固定費・AI・広告)と売上と組織の目標。console の最初の画面の「今月の費用と売上」・app-growth cost show・MCP の state" },
228
+ listFixedCosts: { method: "GET", path: "/v1/registry/cost/fixed", auth: m("registry.read"), request: null, response: { status: 200, body: ["registry/cost.schema.json", "fixedCostList"] }, note: "app-growth cost fixed list" },
229
+ putFixedCost: { method: "PUT", path: "/v1/registry/cost/fixed/:name", auth: m("registry.cost.write"), request: ["registry/cost.schema.json", "putFixedCostRequest"], response: { status: 200, body: ["registry/cost.schema.json", "fixedCost"] }, note: "固定費を作るか置き換える。やめた契約は消さずに ended_on を書く(前の月の表が変わらない)。app-growth cost fixed set" },
230
+ deleteFixedCost: { method: "DELETE", path: "/v1/registry/cost/fixed/:name", auth: m("registry.cost.write"), request: null, response: { status: 204, body: null }, note: "誤って入れた固定費を消す。無い名前は 404。app-growth cost fixed delete" },
231
+ putOrgPolicy: { method: "PUT", path: "/v1/registry/policies/:key", auth: m("registry.policy.write"), request: ["registry/policy.schema.json", "putPolicyRequest"], response: { status: 200, body: ["registry/policy.schema.json"] }, note: "組織の決まりを作るか置き換える。値の形はキーで決まり、合わなければ 400 invalid。app-growth policy set" },
232
+ deleteOrgPolicy: { method: "DELETE", path: "/v1/registry/policies/:key", auth: m("registry.policy.write"), request: null, response: { status: 204, body: null }, note: "無い決まりは 404。app-growth policy delete" },
233
+ putProjectPolicy: { method: "PUT", path: "/v1/registry/projects/:project/policies/:key", auth: m("registry.policy.write"), request: ["registry/policy.schema.json", "putPolicyRequest"], response: { status: 200, body: ["registry/policy.schema.json"] }, note: "プロジェクトの決まり。同じキーの組織の決まりより先に当たる。app-growth policy set --project" },
234
+ deleteProjectPolicy: { method: "DELETE", path: "/v1/registry/projects/:project/policies/:key", auth: m("registry.policy.write"), request: null, response: { status: 204, body: null }, note: "無い決まりは 404。app-growth policy delete --project" },
235
+ getOrgTargets: { method: "GET", path: "/v1/registry/org/targets", auth: m("registry.read"), request: null, response: { status: 200, body: ["registry/org.schema.json"] }, note: "組織の目標。書いていなければ targets は空。app-growth org show・MCP の state・console のホーム" },
236
+ putOrgTargets: { method: "PUT", path: "/v1/registry/org/targets", auth: m("registry.org.write"), request: ["registry/org.schema.json", "putOrgTargetsRequest"], response: { status: 200, body: ["registry/org.schema.json"] }, note: "組織の目標を全部置き換える。同じ指標が2つあれば 400 invalid。app-growth org set" },
237
+ listAccounts: { method: "GET", path: "/v1/registry/accounts", auth: m("registry.read"), request: null, response: { status: 200, body: ["registry/account.schema.json", "accountList"] }, note: "?project=<id> でそのプロジェクトのアカウントと、組織の全部で使うアカウントだけ。app-growth accounts list・MCP の state・console の設定" },
238
+ putAccount: { method: "PUT", path: "/v1/registry/accounts/:account", auth: m("registry.account.write"), request: ["registry/account.schema.json", "putAccountRequest"], response: { status: 200, body: ["registry/account.schema.json"] }, note: "作るか置き換える。組織に無いプロジェクトは 400 invalid。app-growth accounts set" },
239
+ deleteAccount: { method: "DELETE", path: "/v1/registry/accounts/:account", auth: m("registry.account.write"), request: null, response: { status: 204, body: null }, note: "無いアカウントは 404。閉じたアカウントは消さず status を closed にする。app-growth accounts delete" },
240
+ pushSet: { method: "POST", path: "/v1/campaigns/projects/:project/sets", auth: m("campaigns.push"), request: ["inapp/admin.schema.json"], response: { status: 201, body: ["inapp/admin.schema.json", "pushResponse"] }, note: "形が合わない・送ったことのある id の holdout・triggers・audience を変えた・target が R1 に無い は 400 invalid(problems つき)" },
241
+ listSets: { method: "GET", path: "/v1/campaigns/projects/:project/sets", auth: m("campaigns.read"), request: null, response: { status: 200, body: ["inapp/admin.schema.json", "setHistory"] }, note: "?limit=20" },
242
+ stop: { method: "POST", path: "/v1/campaigns/projects/:project/stop", auth: m("campaigns.stop"), request: ["inapp/admin.schema.json", "stopRequest"], response: { status: 201, body: ["inapp/admin.schema.json", "pushResponse"] }, note: "" },
243
+ resume: { method: "POST", path: "/v1/campaigns/projects/:project/resume", auth: m("campaigns.resume"), request: null, response: { status: 200, body: ["inapp/admin.schema.json", "pushResponse"] }, note: "inapp_state.paused を戻す" },
244
+ previewRollback: { method: "POST", path: "/v1/campaigns/projects/:project/rollback/preview", auth: m("campaigns.read"), request: ["inapp/admin.schema.json", "rollbackRequest"], response: { status: 200, body: ["inapp/admin.schema.json", "rollbackResponse"] }, note: "戻す前の差だけを返して足さない(applied は false)。読みなのでエージェントも承認なしで呼べる。app-growth campaigns rollback が先に呼ぶ" },
245
+ rollback: { method: "POST", path: "/v1/campaigns/projects/:project/rollback", auth: m("campaigns.rollback"), request: ["inapp/admin.schema.json", "rollbackRequest"], response: { status: 200, body: ["inapp/admin.schema.json", "rollbackResponse"] }, note: "差は previewRollback で先に見る" },
246
+ simulate: { method: "POST", path: "/v1/campaigns/projects/:project/simulate", auth: m("campaigns.read"), request: ["inapp/admin.schema.json", "simulateRequest"], response: { status: 200, body: ["inapp/admin.schema.json", "simulateReport"] }, note: "K2-7。app-growth campaigns simulate。人ごとの出来事を返さず、数と例の person_id だけ" },
247
+ explainPerson: { method: "GET", path: "/v1/campaigns/projects/:project/people/:person/explain", auth: m("people.person.read"), request: null, response: { status: 200, body: ["inapp/admin.schema.json", "explainReport"] }, note: "K2-7。?event=&at=。app-growth campaigns explain。段階2(監査に残す)" },
248
+ getCampaignReport: { method: "GET", path: "/v1/campaigns/projects/:project/campaigns/:campaign/report", auth: m("campaigns.read"), request: null, response: { status: 200, body: ["inapp/admin.schema.json", "campaignReport"] }, note: "KD-2。?since=&until=。app-growth campaigns report・console" },
249
+ listNotifyVariants: { method: "GET", path: "/v1/notify/projects/:project/variants", auth: m("notify.read"), request: null, response: { status: 200, body: ["notify/admin.schema.json", "variantList"] }, note: "?campaign=&status=proposed|live|retired。content は入れない。notify が知らないプロジェクトは 404" },
250
+ getNotifyVariant: { method: "GET", path: "/v1/notify/projects/:project/variants/:variant_id", auth: m("notify.read"), request: null, response: { status: 200, body: ["notify/admin.schema.json", "variant"] }, note: "content(全部の言語)つき" },
251
+ approveNotifyVariant: { method: "POST", path: "/v1/notify/projects/:project/variants/:variant_id/approve", auth: m("notify.variant.approve"), request: ["notify/admin.schema.json"], response: { status: 200, body: ["notify/admin.schema.json", "approveResponse"] }, note: "proposed でない・live の上限を超える(retire が要る)・retire が同じ施策の live でない は 409 conflict" },
252
+ rejectNotifyVariant: { method: "POST", path: "/v1/notify/projects/:project/variants/:variant_id/reject", auth: m("notify.variant.reject"), request: null, response: { status: 200, body: ["notify/admin.schema.json", "variant"] }, note: "proposed の案を retired(rejected)に。ほかは 409" },
253
+ retireNotifyVariant: { method: "POST", path: "/v1/notify/projects/:project/variants/:variant_id/retire", auth: m("notify.variant.retire"), request: null, response: { status: 200, body: ["notify/admin.schema.json", "variant"] }, note: "live の案を retired(retired_by_hand)に。ほかは 409" },
254
+ listNotifyCampaigns: { method: "GET", path: "/v1/notify/projects/:project/campaigns", auth: m("notify.read"), request: null, response: { status: 200, body: ["notify/admin.schema.json", "campaignStateList"] }, note: "" },
255
+ stopNotifyCampaign: { method: "POST", path: "/v1/notify/projects/:project/campaigns/:campaign/stop", auth: m("notify.campaign.stop"), request: null, response: { status: 200, body: ["notify/admin.schema.json", "campaignState"] }, note: "入りの記録は続ける。アプリに無い施策は 404" },
256
+ resumeNotifyCampaign: { method: "POST", path: "/v1/notify/projects/:project/campaigns/:campaign/resume", auth: m("notify.campaign.resume"), request: null, response: { status: 200, body: ["notify/admin.schema.json", "campaignState"] }, note: "" },
257
+ checkNotifyPlan: { method: "POST", path: "/v1/notify/projects/:project/plans/check", auth: m("notify.plan.check"), request: ["notify/plan.schema.json"], response: { status: 200, body: ["notify/plan.schema.json", "pushResponse"] }, note: "app-growth notify check と push の前の確かめ。書かずに problems と変わる案を返す(version は null)。読みなのでエージェントも承認なしで呼べる" },
258
+ pushNotifyPlan: { method: "POST", path: "/v1/notify/projects/:project/plans", auth: m("notify.plan.push"), request: ["notify/plan.schema.json"], response: { status: 200, body: ["notify/plan.schema.json", "pushResponse"] }, note: "app-growth notify push。problems があれば 400 invalid。確かめは checkNotifyPlan" },
259
+ listNotifyRuns: { method: "GET", path: "/v1/notify/runs", auth: m("notify.read"), request: null, response: { status: 200, body: ["notify/admin.schema.json", "runList"] }, note: "?limit=1(1〜20)。全部のプロジェクトの物" },
260
+ previewNotify: { method: "POST", path: "/v1/notify/projects/:project/campaigns/:campaign/preview", auth: m("notify.read"), request: ["notify/admin.schema.json", "previewRequest"], response: { status: 200, body: ["notify/admin.schema.json", "preview"] }, note: "K2-8。core → NOTIFY_ADMIN.preview。書き込まない。app-growth notify preview" },
261
+ explainNotifyPerson: { method: "GET", path: "/v1/notify/projects/:project/people/:person", auth: m("people.person.read"), request: null, response: { status: 200, body: ["notify/admin.schema.json", "explain"] }, note: "K2-8。core → NOTIFY_ADMIN.explain。app-growth notify explain。段階2" },
262
+ getNotifyStats: { method: "GET", path: "/v1/notify/projects/:project/campaigns/:campaign/stats", auth: m("notify.read"), request: null, response: { status: 200, body: ["notify/admin.schema.json", "stats"] }, note: "KD-3。?days=7(1〜90)。core → NOTIFY_ADMIN.stats" },
263
+ createLink: { method: "POST", path: "/v1/links/projects/:project/links", auth: m("links.create"), request: ["links/link.schema.json", "createInput"], response: { status: 201, body: ["links/link.schema.json"] }, note: "本文の project は道と同じでなければ 400" },
264
+ listLinks: { method: "GET", path: "/v1/links/projects/:project/links", auth: m("links.read"), request: null, response: { status: 200, body: ["links/link.schema.json", "listResponse"] }, note: "?limit=50(200まで)" },
265
+ getLink: { method: "GET", path: "/v1/links/projects/:project/links/:code", auth: m("links.read"), request: null, response: { status: 200, body: ["links/link.schema.json", "detail"] }, note: "app-growth links show。押された回数と流入元が付いた数" },
266
+ listAcqChannels: { method: "GET", path: "/v1/acq/projects/:project/channels", auth: m("acq.read"), request: null, response: { status: 200, body: ["acquisition/channel.schema.json", "list"] }, note: "登録した順。app-growth acq channel list" },
267
+ addAcqChannel: { method: "POST", path: "/v1/acq/projects/:project/channels", auth: m("acq.channel.write"), request: ["acquisition/channel.schema.json", "addInput"], response: { status: 201, body: ["acquisition/channel.schema.json"] }, note: "同じ id は 409。種類に合わない account の項目は 400。app-growth acq channel add" },
268
+ updateAcqChannel: { method: "PATCH", path: "/v1/acq/projects/:project/channels/:channel", auth: m("acq.channel.write"), request: ["acquisition/channel.schema.json", "updateInput"], response: { status: 200, body: ["acquisition/channel.schema.json"] }, note: "書いた項目だけ変える。app-growth acq channel set・pause" },
269
+ getAcquisition: { method: "GET", path: "/v1/acq/projects/:project/report", auth: m("acq.read"), request: null, response: { status: 200, body: ["acquisition/report.schema.json"] }, note: "?days=28(28・90)か ?month=YYYY-MM。core → INSIGHTS_ADMIN.getAcquisition。app-growth acq report・console の獲得" },
270
+ listAcquisitionNodes: { method: "GET", path: "/v1/acq/projects/:project/nodes", auth: m("acq.read"), request: null, response: { status: 200, body: ["acquisition/report.schema.json", "nodeList"] }, note: "?channel=&level=campaign|group|term|creative|query&days=28&parent=。core → INSIGHTS_ADMIN.listAcquisitionNodes。app-growth acq report --level・console の獲得のタブ" },
271
+ putAcqPosts: { method: "PUT", path: "/v1/acq/projects/:project/channels/:channel/posts", auth: m("acq.post.write"), request: ["acquisition/post.schema.json", "putInput"], response: { status: 200, body: ["acquisition/post.schema.json", "list"] }, note: "書いた投稿を作るか置き換え、そのチャネルの投稿を返す。kind video・social でないチャネルは 400。まだ出していない予約が決まり content.posts_per_account_day を超える日があれば 409 policy_denied で何も書かない。app-growth acq posts put(channel の repo が予約・投稿のたびに呼ぶ)" },
272
+ listAcqPosts: { method: "GET", path: "/v1/acq/projects/:project/posts", auth: m("acq.read"), request: null, response: { status: 200, body: ["acquisition/post.schema.json", "list"] }, note: "?channel=<id>・?state=stock|scheduled|posted|dropped。app-growth acq posts list" },
273
+ getContentStock: { method: "GET", path: "/v1/acq/projects/:project/content", auth: m("acq.read"), request: null, response: { status: 200, body: ["acquisition/post.schema.json", "stock"] }, note: "アカウントごとの在庫の日数・次の予約・決まり content.posts_per_account_day との差。app-growth acq content・MCP の state・console の獲得" },
274
+ listWebPages: { method: "GET", path: "/v1/acq/projects/:project/pages", auth: m("acq.read"), request: null, response: { status: 200, body: ["acquisition/page.schema.json", "list"] }, note: "?origin=sitemap|<チャネルの id>。自社サイトの sitemap と、チャネルの RSS(Zenn・note)の記事を1つの一覧にする。core → INSIGHTS_ADMIN.listWebPages。app-growth acq pages" },
275
+ listTickets: { method: "GET", path: "/v1/support/projects/:project/tickets", auth: m("support.ticket.list"), request: null, response: { status: 200, body: ["support/ticket.schema.json", "adminListResponse"] }, note: "?status=drafted(app-growth inbox)" },
276
+ approveDraft: { method: "POST", path: "/v1/support/tickets/:ticket_id/drafts/:draft_id/approve", auth: m("support.reply"), request: ["support/ticket.schema.json", "approveRequest"], response: { status: 201, body: ["support/ticket.schema.json", "message"] }, note: "返事を送り、support_ticket_answered を track し、R5 で知らせる" },
277
+ getTicket: { method: "GET", path: "/v1/support/tickets/:ticket_id", auth: m("support.ticket.read"), request: null, response: { status: 200, body: ["support/ticket.schema.json", "adminTicket"] }, note: "app-growth inbox show" },
278
+ replyTicket: { method: "POST", path: "/v1/support/tickets/:ticket_id/messages", auth: m("support.reply"), request: ["support/ticket.schema.json", "replyRequest"], response: { status: 201, body: ["support/ticket.schema.json", "message"] }, note: "下書きを使わない返事。待っている下書きは rejected にする" },
279
+ redraftTicket: { method: "POST", path: "/v1/support/tickets/:ticket_id/drafts", auth: m("support.redraft"), request: ["support/ticket.schema.json", "redraftRequest"], response: { status: 204, body: null }, note: "AI の下書きを作り直す(Queue)" },
280
+ getAttachment: { method: "GET", path: "/v1/support/tickets/:ticket_id/attachments/:attachment_id", auth: m("support.attachment.read"), request: null, response: { status: 200, body: null }, note: "画像そのもの" },
281
+ rejectDraft: { method: "POST", path: "/v1/support/tickets/:ticket_id/drafts/:draft_id/reject", auth: m("support.draft.reject"), request: null, response: { status: 200, body: ["support/ticket.schema.json", "draft"] }, note: "" },
282
+ resolveTicket: { method: "POST", path: "/v1/support/tickets/:ticket_id/resolve", auth: m("support.resolve"), request: null, response: { status: 204, body: null }, note: "" },
283
+ listReviews: { method: "GET", path: "/v1/support/projects/:project/reviews", auth: m("support.review.read"), request: null, response: { status: 200, body: ["support/review.schema.json", "list"] }, note: "?status=received,drafted(既定)|all・?store=app_store|google_play(app-growth reviews list)。下書きを含む" },
284
+ approveReviewDraft: { method: "POST", path: "/v1/support/projects/:project/reviews/:review_id/drafts/:draft_id/approve", auth: m("support.review.reply"), request: ["support/review.schema.json", "approveRequest"], response: { status: 201, body: ["support/review.schema.json"] }, note: "ストアに返事を送る(customerReviewResponses・reviews.reply)。字数は reply_limit まで。送れない・キーが無いときは 503 で、下書きは pending のまま" },
285
+ rejectReviewDraft: { method: "POST", path: "/v1/support/projects/:project/reviews/:review_id/drafts/:draft_id/reject", auth: m("support.draft.reject"), request: null, response: { status: 200, body: ["support/review.schema.json", "draft"] }, note: "" },
286
+ redraftReview: { method: "POST", path: "/v1/support/projects/:project/reviews/:review_id/drafts", auth: m("support.redraft"), request: ["support/review.schema.json", "redraftRequest"], response: { status: 204, body: null }, note: "AI の下書きを作り直す(Queue)" },
287
+ getFeedbackSummary: { method: "GET", path: "/v1/support/projects/:project/feedback/summary", auth: m("support.feedback.read"), request: null, response: { status: 200, body: ["support/feedback.schema.json", "summary"] }, note: "?days=28(1〜365)&campaign=<件の id>。AI が付けた話題ごとの数と例(app-growth feedback summary・数字の仕組み)" },
288
+ pushArticles: { method: "PUT", path: "/v1/support/projects/:project/articles", auth: m("help.push"), request: ["support/article.schema.json", "pushRequest"], response: { status: 204, body: null }, note: "app-growth help push。索引を全部置き換える" },
289
+ checkLegalProduct: { method: "POST", path: "/v1/legal/products/:product/check", auth: m("legal.check"), request: ["legal/admin.schema.json", "checkRequest"], response: { status: 200, body: ["legal/admin.schema.json", "pushResponse"] }, note: "app-growth legal push --dry-run。core → LEGAL_ADMIN.putProduct(入れない)。stored は false。製品のデータの問題は 400 invalid(problems つき)" },
290
+ pushLegalProduct: { method: "PUT", path: "/v1/legal/products/:product", auth: m("legal.push"), request: ["legal/admin.schema.json", "pushRequest"], response: { status: 200, body: ["legal/admin.schema.json", "pushResponse"] }, note: "app-growth legal push。core → LEGAL_ADMIN.putProduct。製品のデータの問題は 400 invalid(problems つき)" },
291
+ getSupportSummary: { method: "GET", path: "/v1/support/projects/:project/summary", auth: m("support.aggregate.read"), request: null, response: { status: 200, body: ["support/ticket.schema.json", "summary"] }, note: "MG-5。?since=(既定は28日前)。数だけ(段階1)" },
292
+ getPeopleSummary: { method: "GET", path: "/v1/people/projects/:project/summary", auth: m("people.aggregate.read"), request: null, response: { status: 200, body: ["people/admin.schema.json"] }, note: "KD-4。段階1" },
293
+ findPerson: { method: "GET", path: "/v1/people/projects/:project/find", auth: m("people.person.read"), request: null, response: { status: 200, body: ["people/admin.schema.json", "personView"] }, note: "KD-4。?q=<person_id・install_id・uid>。1人だけ・見つからなければ 404。段階2(監査に残す)" },
294
+ pushPricing: { method: "POST", path: "/v1/pricing/projects/:project", auth: m("pricing.push"), request: ["pricing/admin.schema.json"], response: { status: 201, body: ["pricing/admin.schema.json", "pushResponse"] }, note: "値段の階段とオファーを置き換える(docs/design/remote-screens.md 4節)。既定が1つでない・階段に無い段階・実験の最初の案が既定でない・オファーの id の重なりは 400 invalid。決めた人の段階は30日のまま。app-growth pricing push" },
295
+ pushSegments: { method: "POST", path: "/v1/people/projects/:project/segments", auth: m("segments.push"), request: ["segments/admin.schema.json"], response: { status: 201, body: ["segments/admin.schema.json", "pushResponse"] }, note: "群れの定義を送った一覧で置き換え、すぐに全員を計算し直す(docs/design/remote-screens.md 4節)。無くなった群れは所属ごと消す。形・id の重なり・名指しの期限(90日まで)・条件の値の型の誤りは 400 invalid(problems つき)。app-growth segments push" },
296
+ listSegments: { method: "GET", path: "/v1/people/projects/:project/segments", auth: m("people.aggregate.read"), request: null, response: { status: 200, body: ["segments/admin.schema.json", "list"] }, note: "群れの一覧と人数・最後に全員を計算した時刻。app-growth segments list。段階1" },
297
+ listSegmentMembers: { method: "GET", path: "/v1/people/projects/:project/segments/:segment/members", auth: m("people.person.read"), request: null, response: { status: 200, body: ["segments/admin.schema.json", "members"] }, note: "群れの人(入った時刻の新しい順)。?limit=100(500まで)&cursor=。知らない群れは 404。app-growth segments members。段階2(監査に残す)" },
298
+ getPersonTimeline: { method: "GET", path: "/v1/people/projects/:project/people/:person/timeline", auth: m("people.person.read"), request: null, response: { status: 200, body: ["people/admin.schema.json", "personTimeline"] }, note: "1人のセッション・購入と課金・キャンペーン・割り当て・群れ・問い合わせ・アプリの付与を新しい順に1つの並びで(docs/design/identity.md)。寄せた人の id を渡しても寄せた先の人を返す。見つからなければ 404。段階2(監査に残す)" },
299
+ forgetPerson: { method: "POST", path: "/v1/people/projects/:project/people/:person/forget", auth: m("people.forget"), request: null, response: { status: 204, body: null }, note: "管理の道からの手での削除(本人の確認)。中身は RPC の forget と同じ" },
300
+ listSessions: { method: "GET", path: "/v1/sessions/projects/:project/sessions", auth: m("sessions.person.read"), request: null, response: { status: 200, body: ["sessions/admin.schema.json"] }, note: "K3。?person=&since=&end=<reason>,…&has=rage|dead|friction|replay|ticket|summary&campaign=&side=&screen=&exit=&mark=<kind>[:<ref>],…&no_mark=<kind>[:<ref>],…&platform=&app_version=&internal=exclude|only&new=1&reviewed=yes|no&issue=<key>&min_taps=1&sort=new|friction|attention&limit=20&cursor=。min_taps の既定は1(タップの無い閉じたセッションを入れない)。app-growth sessions list" },
301
+ getSession: { method: "GET", path: "/v1/sessions/projects/:project/sessions/:session_id", auth: m("sessions.person.read"), request: null, response: { status: 200, body: ["sessions/admin.schema.json", "detail"] }, note: "行・出来事の列をつないだ物・マーク・塊の一覧・要約。?format=text なら時刻表の文(text/plain。+00:12 画面 習慣を作る の形・名前はマニフェストの names)。app-growth sessions show" },
302
+ reviewSession: { method: "POST", path: "/v1/sessions/projects/:project/sessions/:session_id/review", auth: m("sessions.review"), request: ["sessions/admin.schema.json", "reviewRequest"], response: { status: 200, body: ["sessions/admin.schema.json", "review"] }, note: "読んだ記録(reviewed_at と短いメモ)と、結ぶセッションの課題(issues。書けばその集まりに置き換える・無い key は 404)。同じセッションの2回目は上書き。app-growth sessions review" },
303
+ listSessionIssues: { method: "GET", path: "/v1/sessions/projects/:project/issues", auth: m("sessions.aggregate.read"), request: null, response: { status: 200, body: ["sessions/admin.schema.json", "issueList"] }, note: "?status=open,fixed,wontfix(既定は全部)。課題ごとに結んだセッションの数・人の数・最初と最後に出た時刻・バージョンごとの本数・after_fix(fixed_in 以上のバージョンの本数)。app-growth sessions issues list" },
304
+ upsertSessionIssue: { method: "PUT", path: "/v1/sessions/projects/:project/issues/:key", auth: m("sessions.review"), request: ["sessions/admin.schema.json", "upsertIssueRequest"], response: { status: 200, body: ["sessions/admin.schema.json", "issue"] }, note: "無ければ作る(title が要る)・あれば書いた項目だけ変える(fixed_in・ref・note は null で消す)。app-growth sessions issues set" },
305
+ listSessionDiagnostics: { method: "GET", path: "/v1/sessions/projects/:project/diagnostics", auth: m("sessions.person.read"), request: null, response: { status: 200, body: ["sessions/diagnostic.schema.json", "diagnosticList"] }, note: "ADR 0058。MetricKit の診断の一覧(受けた時刻の新しい順・呼び出しの木は入れない)。?kind=hang|cpu_exception|launch&app_version=&since=30d&session=&limit=50(200まで)。app-growth sessions hangs list" },
306
+ getSessionDiagnostic: { method: "GET", path: "/v1/sessions/projects/:project/diagnostics/:diagnostic_id", auth: m("sessions.person.read"), request: null, response: { status: 200, body: ["sessions/diagnostic.schema.json", "diagnosticDetail"] }, note: "ADR 0058。1件の診断の行と呼び出しの木(記号化しない・binaryUUID と offset のまま)。app-growth sessions hangs show(--dsym で手元の atos が記号化する)" },
307
+ listPersonSessions: { method: "GET", path: "/v1/sessions/projects/:project/people/:person/sessions", auth: m("sessions.person.read"), request: null, response: { status: 200, body: ["sessions/admin.schema.json", "personSessions"] }, note: "1人のセッションを古い順に。?since=&limit=20(50まで)&min_taps=1&format=text(日ごとにつないだ時刻表の文)。app-growth sessions person" },
308
+ rejudgeSessions: { method: "POST", path: "/v1/sessions/projects/:project/sessions/rejudge", auth: m("sessions.summarize"), request: ["sessions/admin.schema.json", "rejudgeRequest"], response: { status: 200, body: ["sessions/admin.schema.json", "rejudgeAnswer"] }, note: "since 以後の閉じたセッションを閉じる Queue に積み直し、新しい判定で数え直す(当たった物は要約の待ちに入る・お金がかかる)。app-growth sessions rejudge" },
309
+ getSessionReplay: { method: "GET", path: "/v1/sessions/projects/:project/sessions/:session_id/replay", auth: m("sessions.replay.read"), request: null, response: { status: 200, body: ["sessions/admin.schema.json", "replay"] }, note: "録画のコマの一覧(塊の頭だけを R2 の範囲の読みで集める・画像は入れない)。再生の画面が読む。段階3・1回ごとに監査" },
310
+ getSessionFrame: { method: "GET", path: "/v1/sessions/projects/:project/sessions/:session_id/segments/:seq", auth: m("sessions.replay.read"), request: null, response: { status: 200, body: null }, note: "塊の本文(.agsr)か、?frame=<n> で1コマの画像(R2 の Range)。段階3・1回ごとに監査" },
311
+ summarizeSession: { method: "POST", path: "/v1/sessions/projects/:project/sessions/:session_id/summarize", auth: m("sessions.summarize"), request: null, response: { status: 200, body: ["sessions/admin.schema.json", "summary"] }, note: "その場で作る(Batches を使わない)。お金がかかる" },
312
+ keepSession: { method: "POST", path: "/v1/sessions/projects/:project/sessions/:session_id/keep", auth: m("sessions.keep"), request: ["sessions/admin.schema.json", "keepRequest"], response: { status: 200, body: ["sessions/admin.schema.json", "keepResponse"] }, note: "既定180日" },
313
+ listScreenStats: { method: "GET", path: "/v1/sessions/projects/:project/screens", auth: m("sessions.aggregate.read"), request: null, response: { status: 200, body: ["sessions/admin.schema.json", "screenStatsList"] }, note: "?since=&platform=&internal=include(本人とテスターの端末のセッションをその場で数えて足す。sessions.person.read も要る)" },
314
+ getScreenMap: { method: "GET", path: "/v1/sessions/projects/:project/screens/:screen/map", auth: m("sessions.aggregate.read"), request: null, response: { status: 200, body: ["sessions/admin.schema.json", "screenMap"] }, note: "?since=&platform=&kind=&internal=include(sessions.person.read も要る)。代表のコマの道は sessions.replay.read を持つ主体にだけ入れる" },
315
+ getScreenRef: { method: "GET", path: "/v1/sessions/projects/:project/screens/:screen/ref", auth: m("sessions.replay.read"), request: null, response: { status: 200, body: null }, note: "?platform=&app_version=。画面の代表のコマの画像(ScreenMap.ref_frame.path)。段階3・1回ごとに監査" },
316
+ getFlows: { method: "GET", path: "/v1/sessions/projects/:project/flows", auth: m("sessions.aggregate.read"), request: null, response: { status: 200, body: ["sessions/admin.schema.json", "flowReport"] }, note: "?since=&from=&depth=&platform=&internal=include(sessions.person.read も要る)" },
317
+ getSessionFunnel: { method: "GET", path: "/v1/sessions/projects/:project/funnel", auth: m("sessions.aggregate.read"), request: null, response: { status: 200, body: ["sessions/admin.schema.json", "funnel"] }, note: "?since=&platform=&internal=include(sessions.person.read も要る)。オンボーディング → ペイウォール → 購入をマークで数える" },
318
+ getSessionNames: { method: "GET", path: "/v1/sessions/projects/:project/names", auth: m("sessions.aggregate.read"), request: null, response: { status: 200, body: ["sessions/manifest.schema.json", "names"] }, note: "マニフェストの names(画面と出来事の人の読む名前)。送っていなければ空。console が画面と出来事の名前に使う" },
319
+ getSessionDigest: { method: "GET", path: "/v1/sessions/projects/:project/digest", auth: m("sessions.aggregate.read"), request: null, response: { status: 200, body: ["sessions/admin.schema.json", "digest"] }, note: "?week=YYYY-Www" },
320
+ rebuildSessionDigest: { method: "POST", path: "/v1/sessions/projects/:project/digest", auth: m("sessions.summarize"), request: null, response: { status: 200, body: ["sessions/admin.schema.json", "digest"] }, note: "?week=。app-growth sessions summarize --week。週のまとめを作り直す" },
321
+ pushSessionPolicy: { method: "PUT", path: "/v1/sessions/projects/:project/policy", auth: m("sessions.policy.push"), request: ["sessions/manifest.schema.json"], response: { status: 200, body: ["sessions/manifest.schema.json", "policy"] }, note: "app-growth sessions push。エージェントが呼ぶと 202 PendingApproval" },
322
+ watchLive: { method: "POST", path: "/v1/sessions/projects/:project/live", auth: m("sessions.live.watch"), request: ["sessions/admin.schema.json", "watchLiveRequest"], response: { status: 200, body: ["sessions/admin.schema.json", "liveWatch"] }, note: "sessions_live_watch に until = 今 + 30分。段階3・1回ごとに監査" },
323
+ watchLiveSocket: { method: "GET", path: "/v1/sessions/projects/:project/live/:install_id", auth: m("sessions.live.watch"), request: null, response: { status: 101, body: null }, note: "見る人の WebSocket(console が Service Binding の fetch でそのまま渡す)" },
324
+ whoami: { method: "GET", path: "/v1/access/whoami", auth: anyPrincipal, request: null, response: { status: 200, body: ["access/principal.schema.json", "whoAmI"] }, note: "主体・証・所属の組織と役割。console の上の帯が要求ごとに1回読む" },
325
+ listMembers: { method: "GET", path: "/v1/access/orgs/:org/members", auth: m("access.member.read"), request: null, response: { status: 200, body: ["access/membership.schema.json", "memberList"] }, note: "" },
326
+ putMember: { method: "PUT", path: "/v1/access/orgs/:org/members/:principal_id", auth: m("access.member.write"), request: ["access/membership.schema.json", "putMemberRequest"], response: { status: 200, body: ["access/membership.schema.json"] }, note: "本人の確認" },
327
+ deleteMember: { method: "DELETE", path: "/v1/access/orgs/:org/members/:principal_id", auth: m("access.member.write"), request: null, response: { status: 204, body: null }, note: "?role=(要る。無い・知らない役割は 400)&project=。本人の確認" },
328
+ listAgents: { method: "GET", path: "/v1/access/orgs/:org/agents", auth: m("access.agent.read"), request: null, response: { status: 200, body: ["access/principal.schema.json", "agentList"] }, note: "" },
329
+ createAgent: { method: "POST", path: "/v1/access/orgs/:org/agents", auth: m("access.agent.write"), request: ["access/principal.schema.json", "createAgentRequest"], response: { status: 201, body: ["access/principal.schema.json", "agentPrincipal"] }, note: "本人の確認。オーナーの人つき" },
330
+ issueToken: { method: "POST", path: "/v1/access/tokens", auth: m("access.token.issue"), request: ["access/token.schema.json", "issueTokenRequest"], response: { status: 201, body: ["access/token.schema.json", "issueTokenResponse"] }, note: "値は答えの1回だけ。エージェント(app-growth tokens request)は自分のトークンの回しだけを依頼でき、202" },
331
+ listTokens: { method: "GET", path: "/v1/access/tokens", auth: anyPrincipal, request: null, response: { status: 200, body: ["access/token.schema.json", "tokenList"] }, note: "自分のトークン。owner は組織の全部" },
332
+ revokeToken: { method: "POST", path: "/v1/access/tokens/:token_id/revoke", auth: m("access.token.revoke"), request: null, response: { status: 200, body: ["access/token.schema.json"] }, note: "エージェントは自分のトークンだけ。次の要求から止まる" },
333
+ pushConfig: { method: "POST", path: "/v1/config/projects/:project/sets", auth: m("config.push"), request: ["config/admin.schema.json"], response: { status: 201, body: ["config/admin.schema.json", "pushResponse"] }, note: "K6-3。app-growth config push。形が合わない・manifest に無い key・型の違い・送ったことのある実験の固定する項目を変えた・最初の案の割合が holdout_min 未満 は 400 invalid(problems つき)" },
334
+ listConfigSets: { method: "GET", path: "/v1/config/projects/:project/sets", auth: m("config.read"), request: null, response: { status: 200, body: ["config/admin.schema.json", "setHistory"] }, note: "?limit=20" },
335
+ listExperiments: { method: "GET", path: "/v1/experiments/projects/:project", auth: m("config.read"), request: null, response: { status: 200, body: ["experiment/admin.schema.json"] }, note: "app-growth experiments list・MCP の list_experiments。実験の一覧(experiment_registry)の動いている実験と決めた実験。案ごとの露出・指標・良い確率・ガードレール・今の decide の答え(docs/design/experimentation.md 8.1節)" },
336
+ getExperiment: { method: "GET", path: "/v1/experiments/projects/:project/:experiment", auth: m("config.read"), request: null, response: { status: 200, body: ["experiment/admin.schema.json", "detail"] }, note: "app-growth experiments get・MCP の get_experiment。一覧の行に、案ごとの値・SRM・日ごとの露出・監査の行を足す。一覧に無い実験は 404" },
337
+ planExperiment: { method: "POST", path: "/v1/experiments/plan", auth: m("config.read"), request: ["experiment/admin.schema.json", "planRequest"], response: { status: 200, body: ["experiment/admin.schema.json", "planResult"] }, note: "app-growth experiments plan。基準の率と1週の人数から、見分けたい差に要る1案の人数(rule.needed_per_arm)と週。読みだけ" },
338
+ decideExperiment: { method: "POST", path: "/v1/experiments/projects/:project/:experiment/decide", auth: m("config.push"), request: ["experiment/admin.schema.json", "decideRequest"], response: { status: 201, body: ["config/admin.schema.json", "pushResponse"] }, note: "app-growth experiments decide。勝った案の values を各パラメーターの default にし、実験を外した組を足す(最初の案なら revert)。動いていない実験は 404・知らない案は 400 invalid" },
339
+ stopExperiment: { method: "POST", path: "/v1/experiments/projects/:project/:experiment/stop", auth: m("config.stop"), request: ["experiment/admin.schema.json", "stopRequest"], response: { status: 201, body: ["config/admin.schema.json", "pushResponse"] }, note: "app-growth experiments stop。実験を外した組を足す(revert と同じ組)。動いていない実験は 404" },
340
+ putScreenBundle: { method: "PUT", path: "/v1/campaigns/projects/:project/bundles/:digest", auth: m("campaigns.bundle.write"), request: null, response: { status: 200, body: ["screens/admin.schema.json"] }, note: "本文はバンドルの HTML そのもの(text/html)。Content-Length が要る。4MB まで(超えたら 413)。中身の sha256 が :digest と違えば 400 invalid。R2 appgrowstack-screen-bundles の <project>/<sha256>.html に置く。同じ物があれば created: false。組が指すまで端末には出ない。app-growth screens build(--upload)・campaigns push" },
341
+ getScreenBundle: { method: "GET", path: "/v1/campaigns/projects/:project/bundles/:digest", auth: m("campaigns.read"), request: null, response: { status: 200, body: ["screens/admin.schema.json", "bundleRead"] }, note: "R2 のバンドルの HTML を JSON に入れて返す。無ければ 404。console の配っている画面のプレビュー" },
342
+ listPatternUses: { method: "GET", path: "/v1/campaigns/projects/:project/patterns", auth: m("campaigns.read"), request: null, response: { status: 200, body: ["screens/admin.schema.json", "patternUseList"] }, note: "画面の型ごとに、この製品で使った画面・キャンペーン・実験と仮説の結果と、アプリのテーマ(docs/design/screen-patterns.md 4節)。app-growth patterns list・console のデザインの型" },
343
+ listApprovals: { method: "GET", path: "/v1/access/approvals", auth: m("access.approval.read"), request: null, response: { status: 200, body: ["access/approval.schema.json", "approvalList"] }, note: "?status=pending&project=&decider=human|reviewer&requested_by=me&unresolved=true。失敗はまず依頼した主体が requested_by=me&status=failed で読んで作り直す。unresolved=true は24時間のうちに同じ操作が通らなかった失敗で、console のホームと承認待ちの「失敗」のタブが読む。app-playbook が5分ごとに decider=human で読んで Web Push(URL は console)。点検役は decider=reviewer で読む(ADR 0050)" },
344
+ getApproval: { method: "GET", path: "/v1/access/approvals/:approval_id", auth: m("access.approval.read"), request: null, response: { status: 200, body: ["access/approval.schema.json"] }, note: "app-growth approvals show(--wait で実行の結果まで)" },
345
+ getApprovalReview: { method: "GET", path: "/v1/access/approvals/:approval_id/review", auth: m("access.approval.read"), request: null, response: { status: 200, body: ["access/approval.schema.json", "approvalReview"] }, note: "点検役に渡す依頼の中身(差・送る本文・決まりの確かめの結果・関わる文書のパス)。作った時の文脈は入れない。app-growth approvals review" },
346
+ approveApproval: { method: "POST", path: "/v1/access/approvals/:approval_id/approve", auth: m("access.approval.decide"), request: ["access/approval.schema.json", "decideApprovalRequest"], response: { status: 200, body: ["access/approval.schema.json"] }, note: "tier が human の依頼は本人の確認つきの人だけ。tier が reviewer の依頼は点検役のエージェントも(作った主体と、同じ人の下の同じ種類のエージェントは 403)。依頼の操作の権限も要る。依頼に残した本文で実行する。24時間を過ぎた・前提が変わったら 409 approval_expired" },
347
+ rejectApproval: { method: "POST", path: "/v1/access/approvals/:approval_id/reject", auth: m("access.approval.decide"), request: ["access/approval.schema.json", "decideApprovalRequest"], response: { status: 200, body: ["access/approval.schema.json"] }, note: "却下はその場で rejected にし、理由は note に残して依頼したエージェントが読む。本人には回さない" },
348
+ listAudit: { method: "GET", path: "/v1/access/audit", auth: m("audit.read"), request: null, response: { status: 200, body: ["access/audit-event.schema.json", "auditEventList"] }, note: "?project=&principal=&action=&since=&until=&limit=。app-growth audit list" },
349
+ verifyAuditArchive: { method: "GET", path: "/v1/access/audit/archive", auth: m("audit.read"), request: null, response: { status: 200, body: ["access/audit-event.schema.json", "auditArchiveCheck"] }, note: "?day=YYYY-MM-DD(UTC)。R2 の書き出し(docs/security.md SC5)と D1 の行の数を組織の分だけ比べる。app-growth audit verify" },
350
+ getPolicy: { method: "GET", path: "/v1/access/projects/:project/policy", auth: m("registry.read"), request: null, response: { status: 200, body: ["access/policy.schema.json"] }, note: "プロジェクトの上書きが無ければ組織の既定" },
351
+ putPolicy: { method: "PUT", path: "/v1/access/projects/:project/policy", auth: m("access.policy.write"), request: ["access/policy.schema.json", "putAccessPolicyRequest"], response: { status: 200, body: ["access/policy.schema.json"] }, note: "本人の確認" },
352
+ stopCloudAgents: { method: "POST", path: "/v1/access/cloud/revoke", auth: m("access.agent.write"), request: null, response: { status: 200, body: ["access/principal.schema.json", "cloudAgentsStatusResponse"] }, note: "人だけ。呼んだ人の下のクラウドのエージェント(mcp からの主体)を止める。次の要求から mcp は 403(docs/design/mcp.md)" },
353
+ startCloudAgents: { method: "POST", path: "/v1/access/cloud/start", auth: m("access.agent.write"), request: null, response: { status: 200, body: ["access/principal.schema.json", "cloudAgentsStatusResponse"] }, note: "人だけ。止めたクラウドのエージェントを戻す。本人の確認" },
354
+ listServiceTokenAgents: { method: "GET", path: "/v1/access/service-tokens", auth: m("access.agent.read"), request: null, response: { status: 200, body: ["access/principal.schema.json", "serviceTokenAgentList"] }, note: "Access のサービストークンとエージェントの結びの一覧(組織の分)" },
355
+ putServiceTokenAgent: { method: "PUT", path: "/v1/access/service-tokens/:common_name", auth: m("access.agent.write"), request: ["access/principal.schema.json", "putServiceTokenAgentRequest"], response: { status: 200, body: ["access/principal.schema.json", "serviceTokenAgent"] }, note: "サービストークンだけで来た要求を、このエージェントとして通す(クラウドの CLI・点検役)。本人の確認" },
356
+ deleteServiceTokenAgent: { method: "DELETE", path: "/v1/access/service-tokens/:common_name", auth: m("access.agent.write"), request: null, response: { status: 204, body: null }, note: "結びを外す。次の要求から 401 token_required。本人の確認" },
357
+ listReleases: { method: "GET", path: "/v1/releases/projects/:project/versions", auth: m("releases.read"), request: null, response: { status: 200, body: ["releases/admin.schema.json"] }, note: "?platform=&state=&limit=50。app-growth releases list・console・insights" },
358
+ getRelease: { method: "GET", path: "/v1/releases/projects/:project/apps/:platform/versions/:version", auth: m("releases.read"), request: null, response: { status: 200, body: ["releases/admin.schema.json", "releaseDetail"] }, note: "状態の変化・ストアの新機能の文・マニフェスト・つながる変更。core の知らないバージョンは 404。app-growth releases show" },
359
+ getReleaseTimeline: { method: "GET", path: "/v1/releases/projects/:project/timeline", auth: m("releases.read"), request: null, response: { status: 200, body: ["releases/admin.schema.json", "timeline"] }, note: "?since=。無ければ90日前から。console のタイムライン" },
360
+ getReleaseReport: { method: "GET", path: "/v1/releases/projects/:project/apps/:platform/versions/:version/report", auth: m("people.aggregate.read"), request: null, response: { status: 200, body: ["releases/admin.schema.json", "releaseReport"] }, note: "数だけ。公開していないバージョンは 409 not_released。app-growth releases report・console・insights" },
361
+ syncReleases: { method: "POST", path: "/v1/releases/projects/:project/sync", auth: m("releases.sync"), request: null, response: { status: 200, body: ["releases/admin.schema.json", "syncResult"] }, note: "Cron と同じ同期をすぐ回す。app-growth releases sync・app-release ship submit" },
362
+ pushManifest: { method: "PUT", path: "/v1/releases/projects/:project/apps/:platform/versions/:version/manifest", auth: m("releases.manifest.push"), request: ["releases/manifest.schema.json"], response: { status: 200, body: ["releases/admin.schema.json", "manifestResult"] }, note: "本文の project・platform・version がパスと違えば 400 invalid。固定の後に違う本文は 409 manifest_locked、同じ sha256 は 200 で何もしない。app-growth releases manifest push" },
363
+ resolveRequires: { method: "POST", path: "/v1/releases/projects/:project/resolve", auth: m("releases.read"), request: ["releases/admin.schema.json", "resolveRequest"], response: { status: 200, body: ["releases/admin.schema.json", "resolveResult"] }, note: "campaigns check・config check・core の push が同じ解決を使う。誤りと警告は答えの problems に入れる" },
364
+ listChanges: { method: "GET", path: "/v1/releases/projects/:project/changes", auth: m("releases.read"), request: null, response: { status: 200, body: ["releases/admin.schema.json", "changeList"] }, note: "?platform=&version=&feature=&status=&kind=。app-growth changes list・app-playbook・insights" },
365
+ putChange: { method: "PUT", path: "/v1/releases/projects/:project/changes/:change", auth: m("releases.change.write"), request: ["releases/change.schema.json"], response: { status: 200, body: ["releases/change.schema.json"] }, note: "作るか置き換える。本文の id がパスと違えば 400 invalid。platforms に core の知らないバージョンがあれば 400 unknown_app_version。kind が onboarding・paywall・pricing・notification・store・campaign で hypothesis も untested も無ければ 400 hypothesis_required。app-growth changes add" },
366
+ judgeChange: { method: "POST", path: "/v1/releases/projects/:project/changes/:change/judge", auth: m("releases.change.write"), request: ["releases/change.schema.json", "judgeRequest"], response: { status: 200, body: ["releases/change.schema.json"] }, note: "判定の結果を書く。無い変更は 404。app-growth changes judge" },
367
+ deleteChange: { method: "DELETE", path: "/v1/releases/projects/:project/changes/:change", auth: m("releases.change.write"), request: null, response: { status: 204, body: null }, note: "書き間違いを消す。出した物を戻したときは消さず judgeChange で reverted にする。app-growth changes remove" },
368
+ getProjectSources: { method: "GET", path: "/v1/releases/projects/:project/sources", auth: m("releases.read"), request: null, response: { status: 200, body: ["releases/sources.schema.json"] }, note: "repo から送った物ごとの最後の commit と、repo の main とのずれ(送り忘れ)。GitHub は読むだけで、呼ぶたびに読む。app-growth state・MCP の state" },
369
+ getProjectWork: { method: "GET", path: "/v1/releases/projects/:project/work", auth: m("releases.read"), request: null, response: { status: 200, body: ["releases/work.schema.json"] }, note: "GitHub から取り込んだ作業を R1 の repos で結ぶ。app-growth work list・MCP の state・console の製品の画面" },
370
+ syncWork: { method: "POST", path: "/v1/releases/work/sync", auth: m("releases.sync"), request: null, response: { status: 200, body: ["releases/work.schema.json", "workSyncResult"] }, note: "Cron(毎時)と同じ GitHub の取り込みをすぐ回す。GitHub は読むだけ。app-growth work sync" },
371
+ getReleaseWeek: { method: "GET", path: "/v1/releases/week", auth: m("releases.read"), request: null, response: { status: 200, body: ["releases/week.schema.json"] }, note: "?week=<月曜の日付>(既定は今週・Asia/Tokyo)・?day=<日付>・?project=<id>。console の最初の画面・app-growth releases week list・app-release week run・MCP の state" },
372
+ planReleaseWeek: { method: "POST", path: "/v1/releases/projects/:project/week/:day/plan", auth: m("releases.week.write"), request: ["releases/week.schema.json", "planRequest"], response: { status: 200, body: ["releases/week.schema.json", "entry"] }, note: "止める条件を core が決める。:day の曜日が release_weekday でない scheduled は 409 not_release_day、決まり release.exceptions に無い exception は 409 policy_denied。app-growth releases week plan(app-release week run が呼ぶ)" },
373
+ putReleaseWeekStep: { method: "POST", path: "/v1/releases/projects/:project/week/:day/step", auth: m("releases.week.write"), request: ["releases/week.schema.json", "stepRequest"], response: { status: 200, body: ["releases/week.schema.json", "entry"] }, note: "ステップと状態を書く。hold・failed は本人に知らせる(health の release_week_stopped)。app-growth releases week step(app-release week run が呼ぶ)" },
374
+ createCaptureSet: { method: "POST", path: "/v1/creatives/projects/:project/captures", auth: m("creatives.capture.write"), request: ["creative/capture.schema.json", "createCaptureSetRequest"], response: { status: 201, body: ["creative/capture.schema.json", "createCaptureSetResult"] }, note: "組を uploading で作り、ファイルごとに putCaptureFile のパスを返す。署名付きの URL は使わない(ADR 0028)。app-growth creatives captures push" },
375
+ putCaptureFile: { method: "PUT", path: "/v1/creatives/projects/:project/captures/:set/files/:locale/:device/:screen/:kind", auth: m("creatives.capture.write"), request: null, response: { status: 204, body: null }, note: "本文はファイルそのもの(image は image/png、video は video/mp4)。Content-Length が要る。1つ 90MB まで(超えたら 413)。R2 が受けた中身を、組を作った時の sha256 と照らす(違えば 409 capture_mismatch)。core が本文を流したまま CREATIVE_ADMIN に渡し、creative が R2 の binding で書く。組が uploading でなければ 409 conflict" },
376
+ getCaptureFile: { method: "GET", path: "/v1/creatives/projects/:project/captures/:set/files/:locale/:device/:screen/:kind", auth: m("creatives.read"), request: null, response: { status: 200, body: null }, note: "撮った画面か録画のファイルそのもの。R2 は公開の URL を持たないので、console と CLI はここで読む。組に無いファイル・まだ R2 に無いファイルは 404" },
377
+ completeCaptureSet: { method: "POST", path: "/v1/creatives/projects/:project/captures/:set/complete", auth: m("creatives.capture.write"), request: null, response: { status: 200, body: ["creative/capture.schema.json"] }, note: "sha256 と寸法を R2 の物と照らし、合えば ready。合わないファイルがあれば failed にして 409 capture_mismatch(problems にファイルの名前)" },
378
+ listCaptureSets: { method: "GET", path: "/v1/creatives/projects/:project/captures", auth: m("creatives.read"), request: null, response: { status: 200, body: ["creative/admin.schema.json"] }, note: "?platform=&version=&purpose=&set=。新しい順に20組。app-growth creatives captures list・pull" },
379
+ createArchive: { method: "POST", path: "/v1/creatives/projects/:project/archives", auth: m("creatives.capture.write"), request: ["creative/archive.schema.json", "createArchiveRequest"], response: { status: 201, body: ["creative/archive.schema.json", "createArchiveResult"] }, note: "アーカイブを uploading で作り、R2 にまだ無い中身ごとに putArchiveFile のパスを返す。app-growth creatives archives push" },
380
+ putArchiveFile: { method: "PUT", path: "/v1/creatives/projects/:project/archives/:archive/files/:digest", auth: m("creatives.capture.write"), request: null, response: { status: 204, body: null }, note: ":digest は中身の sha256。本文はファイルそのもの。Content-Length が要る。1つ 90MB まで(超えたら 413)。R2 が受けた中身を sha256 と照らす(違えば 409 capture_mismatch)。アーカイブが uploading でなければ 409 conflict" },
381
+ completeArchive: { method: "POST", path: "/v1/creatives/projects/:project/archives/:archive/complete", auth: m("creatives.capture.write"), request: null, response: { status: 200, body: ["creative/archive.schema.json"] }, note: "全部の中身が R2 にあれば ready。無ければ 409 capture_mismatch(problems にパス)" },
382
+ listArchives: { method: "GET", path: "/v1/creatives/projects/:project/archives", auth: m("creatives.read"), request: null, response: { status: 200, body: ["creative/archive.schema.json", "archiveList"] }, note: "新しい順に100件。files は持たない。app-growth creatives archives list" },
383
+ getArchive: { method: "GET", path: "/v1/creatives/projects/:project/archives/:archive", auth: m("creatives.read"), request: null, response: { status: 200, body: ["creative/archive.schema.json"] }, note: "ファイルのパスと sha256 の全部。app-growth creatives archives pull" },
384
+ getArchiveFile: { method: "GET", path: "/v1/creatives/projects/:project/archives/:archive/files/:digest", auth: m("creatives.read"), request: null, response: { status: 200, body: null }, note: "アーカイブの中身そのもの。アーカイブに無い sha256・まだ R2 に無い物は 404" },
385
+ getBrand: { method: "GET", path: "/v1/creatives/projects/:project/brand", auth: m("creatives.read"), request: null, response: { status: 200, body: ["creative/brand.schema.json"] }, note: "新しい rev。まだ無ければ 404。app-growth creatives brand show" },
386
+ putBrand: { method: "PUT", path: "/v1/creatives/projects/:project/brand", auth: m("creatives.brand.write"), request: ["creative/brand.schema.json", "brandBody"], response: { status: 200, body: ["creative/brand.schema.json"] }, note: "rev を1つ上げて足す。同じ sha256 は 200 で何もしない。app-growth creatives brand push" },
387
+ createAssetUpload: { method: "POST", path: "/v1/creatives/projects/:project/assets", auth: m("creatives.brand.write"), request: ["creative/admin.schema.json", "assetUploadRequest"], response: { status: 201, body: ["creative/admin.schema.json", "assetUploadResult"] }, note: "フォント・端末の枠・背景の素材を足し、putAssetFile のパスを返す。R2 に同じ sha256 の物が既にあれば upload は null。app-growth creatives assets push" },
388
+ putAssetFile: { method: "PUT", path: "/v1/creatives/projects/:project/assets/:asset", auth: m("creatives.brand.write"), request: null, response: { status: 204, body: null }, note: "本文はファイルそのもの(createAssetUpload の content_type)。Content-Length が要る。1つ 20MB まで(超えたら 413)。R2 が受けた中身を createAssetUpload の sha256 と照らす(違えば 409 capture_mismatch)。core が本文を流したまま CREATIVE_ADMIN に渡す" },
389
+ listAssets: { method: "GET", path: "/v1/creatives/projects/:project/assets", auth: m("creatives.read"), request: null, response: { status: 200, body: ["creative/admin.schema.json", "assetList"] }, note: "フォント・端末の枠・背景の素材。R2 のキーごとに新しい行だけ。console の素材の画面" },
390
+ getAssetFile: { method: "GET", path: "/v1/creatives/projects/:project/assets/:asset", auth: m("creatives.read"), request: null, response: { status: 200, body: null }, note: "素材のファイルそのもの。R2 は公開の URL を持たないので、console と CLI はここで読む。同じキーの新しい素材に置き換わった物・まだ R2 に無い物は 404" },
391
+ listPages: { method: "GET", path: "/v1/creatives/projects/:project/pages", auth: m("creatives.read"), request: null, response: { status: 200, body: ["creative/admin.schema.json", "pageList"] }, note: "app-growth creatives pages list" },
392
+ putPage: { method: "PUT", path: "/v1/creatives/projects/:project/pages/:platform/:page", auth: m("creatives.page.write"), request: ["creative/page.schema.json", "putPageRequest"], response: { status: 200, body: ["creative/page.schema.json"] }, note: "作るか置き換える。app-growth creatives pages put" },
393
+ listStoreTexts: { method: "GET", path: "/v1/creatives/projects/:project/texts", auth: m("creatives.read"), request: null, response: { status: 200, body: ["creative/admin.schema.json", "textList"] }, note: "?platform=&page=&locale=&field=&status=。app-growth creatives texts list" },
394
+ getStoreTextHistory: { method: "GET", path: "/v1/creatives/projects/:project/texts/:platform/:page/:locale/:field", auth: m("creatives.read"), request: null, response: { status: 200, body: ["creative/admin.schema.json", "textList"] }, note: "1つの欄の全部の行。新しい順。app-growth creatives texts history" },
395
+ proposeStoreText: { method: "POST", path: "/v1/creatives/projects/:project/texts/:platform/:page/:locale/:field", auth: m("creatives.text.write"), request: ["creative/text.schema.json", "proposeStoreTextRequest"], response: { status: 201, body: ["creative/text.schema.json"] }, note: "proposed で足す。長さが creativeFields の上限を超えれば 400 invalid。app-growth creatives texts propose" },
396
+ approveStoreText: { method: "POST", path: "/v1/creatives/projects/:project/texts/revisions/:revision/approve", auth: m("creatives.text.approve"), request: null, response: { status: 200, body: ["creative/text.schema.json"] }, note: "proposed でない行は 409 conflict。審査の要らない欄はすぐ公開、要る欄は次のバージョンで公開(無ければ waiting_version)。app-growth creatives texts approve" },
397
+ rejectStoreText: { method: "POST", path: "/v1/creatives/projects/:project/texts/revisions/:revision/reject", auth: m("creatives.text.write"), request: null, response: { status: 200, body: ["creative/text.schema.json"] }, note: "proposed の行を rejected に。ほかは 409。app-growth creatives texts reject" },
398
+ generateVariant: { method: "POST", path: "/v1/creatives/projects/:project/variants", auth: m("creatives.variant.generate"), request: ["creative/variant.schema.json", "generateVariantRequest"], response: { status: 200, body: ["creative/metrics.schema.json", "run"] }, note: "変える所の一覧を作る。changes があればそのまま案にして done の回を、無ければ LLM のワークフローを始めて running の回を返す。202 は承認の依頼に使うので使わない。今の掲載が無ければ 409 conflict、予算で止めている時は 409 budget_stop。app-growth creatives variants generate" },
399
+ listVariants: { method: "GET", path: "/v1/creatives/projects/:project/variants", auth: m("creatives.read"), request: null, response: { status: 200, body: ["creative/admin.schema.json", "variantList"] }, note: "?platform=&page=&surface=&status=。app-growth creatives variants list" },
400
+ getVariant: { method: "GET", path: "/v1/creatives/projects/:project/variants/:variant", auth: m("creatives.read"), request: null, response: { status: 200, body: ["creative/variant.schema.json"] }, note: "変える所の一覧と、基準にした今の掲載の参考の素材の id。app-growth creatives variants show" },
401
+ acceptVariant: { method: "POST", path: "/v1/creatives/projects/:project/variants/:variant/accept", auth: m("creatives.variant.approve"), request: null, response: { status: 200, body: ["creative/variant.schema.json"] }, note: "本人が案を採る。外には何も出さない。採った案は手元で作り込んでストアに出す。proposed でない案は 409 conflict。console の案の画面・app-growth creatives variants accept" },
402
+ rejectVariant: { method: "POST", path: "/v1/creatives/projects/:project/variants/:variant/reject", auth: m("creatives.variant.approve"), request: ["creative/variant.schema.json", "decideRequest"], response: { status: 200, body: ["creative/variant.schema.json"] }, note: "本人が案を断る。reason は任意。proposed でない案は 409 conflict。console の案の画面・app-growth creatives variants reject" },
403
+ withdrawVariant: { method: "POST", path: "/v1/creatives/projects/:project/variants/:variant/withdraw", auth: m("creatives.variant.write"), request: ["creative/variant.schema.json", "decideRequest"], response: { status: 200, body: ["creative/variant.schema.json"] }, note: "AI か作った人が案を取り下げる。reason が要る。generating・proposed でない案は 409 conflict。app-growth creatives variants withdraw" },
404
+ submitCreatives: { method: "POST", path: "/v1/creatives/projects/:project/submissions", auth: m("creatives.submit"), request: ["creative/admin.schema.json", "submitRequest"], response: { status: 200, body: ["creative/admin.schema.json", "submitResult"] }, note: "CPP・イベント・素材・PPO の treatment を1つの reviewSubmission にまとめて審査に出す。本人の確認。app-growth creatives submit" },
405
+ registerTest: { method: "PUT", path: "/v1/creatives/projects/:project/tests/:test", auth: m("creatives.test.write"), request: ["creative/test.schema.json", "registerTestRequest"], response: { status: 200, body: ["creative/test.schema.json"] }, note: "決めて始める。同じアプリの PPO が動いている時は 409 test_running。見分けられる差が足りない PPO は 409 underpowered。app-growth creatives tests register" },
406
+ stopTest: { method: "POST", path: "/v1/creatives/projects/:project/tests/:test/stop", auth: m("creatives.test.stop"), request: null, response: { status: 200, body: ["creative/test.schema.json"] }, note: "止める。勝ち負けは決めない。app-growth creatives tests stop" },
407
+ listTests: { method: "GET", path: "/v1/creatives/projects/:project/tests", auth: m("creatives.read"), request: null, response: { status: 200, body: ["creative/admin.schema.json", "testList"] }, note: "?status=。app-growth creatives tests list" },
408
+ getTest: { method: "GET", path: "/v1/creatives/projects/:project/tests/:test", auth: m("creatives.read"), request: null, response: { status: 200, body: ["creative/test.schema.json", "testDetail"] }, note: "日ごとの配分つき。app-growth creatives tests show" },
409
+ listCreativeMetrics: { method: "GET", path: "/v1/creatives/projects/:project/metrics", auth: m("creatives.read"), request: null, response: { status: 200, body: ["creative/admin.schema.json", "metricList"] }, note: "?page=&variant=&since=&country=&source=。app-growth creatives metrics・insights" },
410
+ getTagEffects: { method: "GET", path: "/v1/creatives/effects", auth: m("creatives.read"), request: null, response: { status: 200, body: ["creative/metrics.schema.json", "snapshot"] }, note: "?snapshot=。無ければ新しい物。全部の製品をまとめた値。app-growth creatives effects" },
411
+ listKeywords: { method: "GET", path: "/v1/creatives/projects/:project/keywords", auth: m("creatives.read"), request: null, response: { status: 200, body: ["creative/admin.schema.json", "keywordList"] }, note: "?country=&week=。app-growth creatives keywords list" },
412
+ syncKeywords: { method: "POST", path: "/v1/creatives/projects/:project/keywords/sync", auth: m("creatives.keyword.sync"), request: null, response: { status: 200, body: ["creative/admin.schema.json", "keywordSyncResult"] }, note: "週に1回の取り込みをすぐ回す。app-growth creatives keywords sync" },
413
+ listSteps: { method: "GET", path: "/v1/creatives/projects/:project/steps", auth: m("creatives.read"), request: null, response: { status: 200, body: ["creative/admin.schema.json", "stepList"] }, note: "?status=waiting。app-growth creatives steps list" },
414
+ completeStep: { method: "POST", path: "/v1/creatives/projects/:project/steps/:step/complete", auth: m("creatives.step.complete"), request: ["creative/metrics.schema.json", "completeStepRequest"], response: { status: 200, body: ["creative/metrics.schema.json", "step"] }, note: "waiting でない手順は 409 conflict。app-growth creatives steps complete" },
415
+ runCreativeWeekly: { method: "POST", path: "/v1/creatives/runs", auth: m("creatives.run"), request: ["creative/metrics.schema.json", "runWeeklyRequest"], response: { status: 200, body: ["creative/metrics.schema.json", "run"] }, note: "週の流れをすぐ回し、running の回を返す。app-growth creatives runs weekly" },
416
+ createReference: { method: "POST", path: "/v1/creatives/references", auth: m("creatives.reference.write"), request: ["creative/reference.schema.json", "createReferenceRequest"], response: { status: 201, body: ["creative/reference.schema.json", "createReferenceResult"] }, note: "files か url。同じ sha256 のファイル1つの件があれば 200 で前の件(created: false)。URL が読めない・ログインが要れば 422 fetch_failed。Web のページを撮るキーが無ければ 501 browser_unavailable。app-growth creatives refs add" },
417
+ putReferenceFile: { method: "PUT", path: "/v1/creatives/references/:reference/files/:digest", auth: m("creatives.reference.write"), request: null, response: { status: 204, body: null }, note: ":digest はファイルの sha256。本文はファイルそのもの。Content-Length が要る。1つ 90MB まで(超えたら 413)。中身が sha256 と合わなければ 409 reference_mismatch。core が本文を流したまま CREATIVE_ADMIN に渡す" },
418
+ completeReference: { method: "POST", path: "/v1/creatives/references/:reference/complete", auth: m("creatives.reference.write"), request: null, response: { status: 200, body: ["creative/reference.schema.json"] }, note: "全部のファイルが R2 にあれば ready。無ければ 409 reference_mismatch" },
419
+ listReferences: { method: "GET", path: "/v1/creatives/references", auth: m("creatives.read"), request: null, response: { status: 200, body: ["creative/reference.schema.json", "referenceList"] }, note: "?project=&subject=&tag=&source=&origin=&since=&q=&cursor=。新しい順に50件。app-growth creatives refs list" },
420
+ getReference: { method: "GET", path: "/v1/creatives/references/:reference", auth: m("creatives.read"), request: null, response: { status: 200, body: ["creative/reference.schema.json"] }, note: "app-growth creatives refs show" },
421
+ updateReference: { method: "PATCH", path: "/v1/creatives/references/:reference", auth: m("creatives.reference.write"), request: ["creative/reference.schema.json", "updateReferenceRequest"], response: { status: 200, body: ["creative/reference.schema.json"] }, note: "書いた欄だけ変え、仮説をつなぐ。app-growth creatives refs update" },
422
+ getReferenceFile: { method: "GET", path: "/v1/creatives/references/:reference/files/:digest", auth: m("creatives.read"), request: null, response: { status: 200, body: null }, note: "ファイルそのもの。R2 は公開の URL を持たないので、console と CLI はここで読む" },
423
+ listCreativeRuns: { method: "GET", path: "/v1/creatives/runs", auth: m("creatives.read"), request: null, response: { status: 200, body: ["creative/admin.schema.json", "runList"] }, note: "?limit=1(1〜20)。app-growth creatives runs list" },
424
+ getInsightsMetric: { method: "GET", path: "/v1/insights/metrics/:project/:metric", auth: m("insights.read"), request: null, response: { status: 200, body: ["insights/metric.schema.json"] }, note: "?from=&to=(YYYY-MM-DD・既定は前の日までの28日)&dims=(カンマで3つまで)&audience=(real が既定・all・カンマの一覧)。metrics.toml に無い指標は 404。app-growth insights metric" },
425
+ compareInsightsMetric: { method: "GET", path: "/v1/insights/metrics/:project/:metric/compare", auth: m("insights.read"), request: null, response: { status: 200, body: ["insights/metric.schema.json", "compare"] }, note: "?at=(YYYY-MM-DD)&weeks=(1〜12・既定4)。前後 N 週と95%の幅・流入元の内訳。app-growth insights compare" },
426
+ runInsightsSql: { method: "POST", path: "/v1/insights/sql", auth: m("insights.sql"), request: ["insights/admin.schema.json"], response: { status: 200, body: ["insights/admin.schema.json", "sqlResult"] }, note: "データレイクへの1つの SELECT。決まりに合わなければ 400 sql_refused、スキャンの上限は 429 scan_limit。全部を insights_query に残す。app-growth insights sql" },
427
+ listInsightsSignals: { method: "GET", path: "/v1/insights/signals", auth: m("insights.read"), request: null, response: { status: 200, body: ["insights/signal.schema.json", "list"] }, note: "?project=&kind=&since=(YYYY-MM-DD)。app-growth insights signals" },
428
+ listInsightsFindings: { method: "GET", path: "/v1/insights/findings", auth: m("insights.read"), request: null, response: { status: 200, body: ["insights/finding.schema.json", "list"] }, note: "?project=&status=&since=。app-growth insights findings" },
429
+ getInsightsFinding: { method: "GET", path: "/v1/insights/findings/:finding", auth: m("insights.read"), request: null, response: { status: 200, body: ["insights/finding.schema.json", "detail"] }, note: "根拠の数ごとの SQL の文と結果つき。見えないプロジェクトの指摘は 404。app-growth insights findings show" },
430
+ decideInsightsFinding: { method: "POST", path: "/v1/insights/findings/:finding/decide", auth: m("insights.finding.decide"), request: ["insights/finding.schema.json", "decideRequest"], response: { status: 200, body: ["insights/finding.schema.json"] }, note: "採る・却下・後で。採ると仮説(open・出どころ finding)を作る。却下は note が要る。proposed と later でない指摘は 409 conflict。承認待ちの種類は insights_finding。app-growth insights findings decide" },
431
+ getInsightsPortfolio: { method: "GET", path: "/v1/insights/portfolio", auth: m("insights.read"), request: null, response: { status: 200, body: ["insights/portfolio.schema.json"] }, note: "?week=(月曜の日付)。無ければ新しい物。まだ1回も作っていなければ 404。app-growth insights portfolio" },
432
+ getCompetitors: { method: "GET", path: "/v1/insights/competitors/:project", auth: m("insights.read"), request: null, response: { status: 200, body: ["insights/competitors.schema.json"] }, note: "競合と自分のアプリの評価・評価の数・今のバージョン、集めた競合のレビュー(新しい順に200件)、自分の検索の順位。competitor-reviews の取り込みが書いた D1 を読む。app-growth insights competitors" },
433
+ getKpiTree: { method: "GET", path: "/v1/insights/kpis/:project", auth: m("insights.read"), request: null, response: { status: 200, body: ["insights/kpi.schema.json"] }, note: "?from=&to=(YYYY-MM-DD・既定は前の日までの90日)。製品の KPI の木(ノーススター・漏斗・細かい率)と、KPI ごとの日の値・前の日の判定。木を書いていなければ kpis は空。app-growth kpi list・show・chart・console の KPI の画面" },
434
+ putKpiTree: { method: "PUT", path: "/v1/insights/kpis/:project", auth: m("insights.kpi.write"), request: ["insights/kpi.schema.json", "putRequest"], response: { status: 200, body: ["insights/kpi.schema.json"] }, note: "製品の KPI の木を全部置き換え、前の日までの90日の答えを返す。key が重なる・north_star が1〜3個でない・定義した指標に無い metric は 400 invalid。app-growth kpi set" },
435
+ computeKpis: { method: "POST", path: "/v1/insights/kpis/:project/compute", auth: m("insights.kpi.write"), request: ["insights/kpi.schema.json", "computeRequest"], response: { status: 200, body: ["insights/kpi.schema.json", "computeResult"] }, note: "from〜to(90日まで)の KPI の値をデータレイクから数え直し、検知も回す毎日の流れを始める。終わるのを待たない。app-growth kpi compute" },
436
+ collectInsights: { method: "POST", path: "/v1/insights/collect", auth: m("insights.collect"), request: ["insights/admin.schema.json", "collectRequest"], response: { status: 200, body: ["insights/admin.schema.json", "collectResult"] }, note: "取り込みの step だけをすぐ回し、step ごとの結果を返す。app-growth insights collect" },
437
+ pushInsights: { method: "POST", path: "/v1/insights/push/:source", auth: m("insights.collect"), request: ["insights/admin.schema.json", "pushRequest"], response: { status: 200, body: ["insights/admin.schema.json", "collection"] }, note: "手元でしか取れない取り込み元(sources.toml の runs_on が push。aso-rank)の応答を受け、R2 に残して数を作る。push でない取り込み元は 400。app-growth insights push" },
438
+ listLedgerHypotheses: { method: "GET", path: "/v1/ledger/hypotheses", auth: m("ledger.read"), request: null, response: { status: 200, body: ["insights/ledger.schema.json", "hypothesisList"] }, note: "?project=&surface=&status=&outcome=。app-growth ledger list" },
439
+ addLedgerHypothesis: { method: "POST", path: "/v1/ledger/hypotheses", auth: m("ledger.write"), request: ["insights/ledger.schema.json", "hypothesisInput"], response: { status: 201, body: ["insights/ledger.schema.json"] }, note: "open で足す。source は呼び手の主体で決める(usr_ は owner・agt_ は agent)。app-growth ledger add" },
440
+ getLedgerHypothesis: { method: "GET", path: "/v1/ledger/hypotheses/:hypothesis", auth: m("ledger.read"), request: null, response: { status: 200, body: ["insights/ledger.schema.json", "hypothesisDetail"] }, note: "つながる物・学んだこと・広げた子の仮説つき。app-growth ledger show" },
441
+ updateLedgerHypothesis: { method: "PATCH", path: "/v1/ledger/hypotheses/:hypothesis", auth: m("ledger.write"), request: ["insights/ledger.schema.json", "hypothesisUpdate"], response: { status: 200, body: ["insights/ledger.schema.json"] }, note: "書いた項目だけ変える。outcome は書けない。できない状態の変え方は 409 conflict。app-growth ledger set" },
442
+ markLedgerApplied: { method: "POST", path: "/v1/ledger/hypotheses/:hypothesis/applied", auth: m("ledger.write"), request: ["insights/ledger.schema.json", "appliedRequest"], response: { status: 200, body: ["insights/ledger.schema.json"] }, note: "基盤に無い打ち手を当てた日を書き、testing にして確認の日を決める。open でなければ 409 conflict。app-growth ledger applied" },
443
+ listLedgerLearnings: { method: "GET", path: "/v1/ledger/learnings", auth: m("ledger.read"), request: null, response: { status: 200, body: ["insights/ledger.schema.json", "learningList"] }, note: "?project=&surface=&since=。app-growth ledger learnings" },
444
+ addLedgerLearning: { method: "POST", path: "/v1/ledger/learnings", auth: m("ledger.write"), request: ["insights/ledger.schema.json", "learningInput"], response: { status: 201, body: ["insights/ledger.schema.json", "learning"] }, note: "追記だけ。source は呼び手の主体で決める。app-growth ledger learn" },
445
+ searchLedger: { method: "GET", path: "/v1/ledger/search", auth: m("ledger.read"), request: null, response: { status: 200, body: ["insights/ledger.schema.json", "searchResult"] }, note: "?q=(3文字以上)&project=&surface=&kind=(hypothesis・learning・reference・knowledge)&limit=(1〜100・既定20)。仮説・結論・学んだこと・参考の素材のメモ・app-playbook の知見の行を1つの問いで探す。app-growth ledger search" },
446
+ putLedgerKnowledge: { method: "PUT", path: "/v1/ledger/knowledge", auth: m("ledger.write"), request: ["insights/ledger.schema.json", "knowledgeSync"], response: { status: 200, body: ["insights/ledger.schema.json", "knowledgeSyncResult"] }, note: "app-playbook の knowledge/ の行を全部送り、前に取り込んだ行と入れ替える。基盤は読むだけ。app-growth ledger knowledge push" },
447
+ listLedgerKnowledge: { method: "GET", path: "/v1/ledger/knowledge", auth: m("ledger.read"), request: null, response: { status: 200, body: ["insights/ledger.schema.json", "knowledgeList"] }, note: "?file=<knowledge のファイルの名前>&linked=true。取り込んだ知見の行と、行につないだ仮説の今の状態。app-growth ledger knowledge list" },
448
+ checkNotices: { method: "POST", path: "/v1/notices/projects/:project/notices/check", auth: m("notices.check"), request: ["notices/admin.schema.json"], response: { status: 200, body: ["notices/admin.schema.json", "checkResponse"] }, note: "送らずに core の確かめ(noticeProblems・知らない群れ・requires の解決・前に送った物とのプッシュの間隔)だけを返す(docs/design/notices.md 1.1節)。書かない。app-growth notices check --remote・MCP" },
449
+ putNoticeImage: { method: "PUT", path: "/v1/notices/projects/:project/images/:digest", auth: m("notices.image.write"), request: null, response: { status: 200, body: ["notices/admin.schema.json", "imageUpload"] }, note: "本文は画像そのもの(image/png・image/jpeg・image/webp)。1MB まで(超えたら 413)。中身の sha256 が :digest と違えば 400 invalid。R2 appgrowstack-screen-bundles の <project>/notices/<sha256> に置く。同じ物があれば created: false。app-growth notices push" },
450
+ pushNotices: { method: "POST", path: "/v1/notices/projects/:project/notices", auth: m("notices.push"), request: ["notices/admin.schema.json"], response: { status: 201, body: ["notices/admin.schema.json", "pushResponse"] }, note: "お知らせの一覧を送った物で置き換える(docs/design/notices.md 2節)。無くなったお知らせは一覧から外す(既読の記録は残す)。誤りは 400 invalid(problems つき)。画像が R2 に無ければ 400。止めた id は止めたまま。app-growth notices push" },
451
+ listNotices: { method: "GET", path: "/v1/notices/projects/:project/notices", auth: m("notices.read"), request: null, response: { status: 200, body: ["notices/admin.schema.json", "list"] }, note: "お知らせの一覧と、状態・届いた人・既読の率・プッシュの進み。repo から消したお知らせは入れない。app-growth notices list・console のお知らせ" },
452
+ stopNotice: { method: "POST", path: "/v1/notices/projects/:project/notices/:notice/stop", auth: m("notices.stop"), request: null, response: { status: 200, body: ["notices/admin.schema.json", "summary"] }, note: "その場で一覧から外し、待っているプッシュも止める。止めた id は次に送っても止めたまま。知らない id は 404。app-growth notices stop・console" },
453
+ listLiveNotices: { method: "GET", path: "/v1/notices/live", auth: m("notices.read"), request: null, response: { status: 200, body: ["notices/admin.schema.json", "liveList"] }, note: "見える製品の、今出しているお知らせ(新しい順・100件まで)。console のホームの「配信中」" },
454
+ };
455
+ export const CORE_ACCESS_AUDS_VAR = "ACCESS_AUDS";
456
+ export const workers = {
457
+ api: { name: "appgrowstack-api", host: "api.appgrowstack.com", stagingHost: "api-staging.appgrowstack.com" },
458
+ core: { name: "appgrowstack-core", host: "admin.appgrowstack.com", stagingHost: "admin-staging.appgrowstack.com", d1: "appgrowstack-core" },
459
+ notify: { name: "appgrowstack-notify", host: null, stagingHost: null },
460
+ creative: { name: "appgrowstack-creative", host: null, stagingHost: null, d1: "appgrowstack-creative" },
461
+ insights: { name: "appgrowstack-insights", host: null, stagingHost: null, d1: "appgrowstack-insights-production" },
462
+ playbook: { name: "appgrowstack-playbook", host: "playbook.appgrowstack.com", stagingHost: null },
463
+ console: { name: "appgrowstack-console", host: "console.appgrowstack.com", stagingHost: "console-staging.appgrowstack.com" },
464
+ mcp: { name: "appgrowstack-mcp", host: "mcp.appgrowstack.com", stagingHost: "mcp-staging.appgrowstack.com" },
465
+ };