-
Notifications
You must be signed in to change notification settings - Fork 46
Expand file tree
/
Copy pathwrangler.jsonc
More file actions
1146 lines (1145 loc) · 30.6 KB
/
Copy pathwrangler.jsonc
File metadata and controls
1146 lines (1145 loc) · 30.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
{
"$schema": "../../node_modules/wrangler/config-schema.json",
"name": "kody",
"compatibility_date": "2026-04-16",
// `enhanced_error_serialization` is date-default on 2026-04-21. Opt in
// explicitly so JSRPC from the Artifacts binding preserves `name`/`code`
// instead of flattening to `Error` + `ArtifactsError: …` message. Keep
// the structural matcher in `src/repo/artifacts.ts`; this flag does not
// restore custom prototype identity. Do not advance the date just to
// pick this up — 2026-04-21 also defaults `enable_python_external_sdk`.
"compatibility_flags": [
"nodejs_compat",
"global_fetch_strictly_public",
"enhanced_error_serialization",
],
// Paid default is 10_000 subrequests/invocation. The MCP Agent Durable
// Object keeps a long-lived session and each mutating storage_query pays
// several D1 + StorageRunner RPCs (entitlement baseline, sqlQuery,
// estimate refresh). Production hit "Too many API requests by single
// Worker invocation" (Sentry 7650160242 / KODY-CLOUDFLARE-2S) during a
// burst of ~25 storage_query calls in one session — raise the ceiling
// for that long-lived DO workload. Inheritable by env.production /
// env.preview. https://developers.cloudflare.com/workers/wrangler/configuration/#limits
"limits": {
"subrequests": 100000,
},
"main": "./src/index.ts",
"minify": true,
"upload_source_maps": true,
// `find_additional_modules` uploads files matching `rules` (below `base_dir`,
// which defaults to `./src`) as separate external modules instead of inlining
// them into the main module. The pre-bundled worker-bundler modules in
// `src/generated/` (built by `tools/build-worker-bundler-modules.ts`) rely on
// this so their ~4 MB only loads when repo checks dynamically import them,
// instead of being parsed and evaluated on every isolate cold start.
"find_additional_modules": true,
"rules": [
{
// Specifier-shaped globs (`./`/`../` prefixes) on purpose: every
// markdown import in the worker is a relative specifier, and these
// globs must NOT match traversal-relative file names (for example
// `blog/posts/foo.md`). If the traversal discovered those files,
// wrangler would upload them under their directory-relative names
// while keeping the original `./posts/foo.md` import specifiers,
// which resolve against the bundled entry module and fail at boot
// with "No such module".
"type": "Text",
"globs": ["./**/*.md", "../**/*.md"],
"fallthrough": true,
},
{
// Both spellings are required: the bare glob matches file names during
// the on-disk traversal that discovers additional modules, while the
// `./`-prefixed glob matches the import specifier so wrangler keeps
// `import('./generated/…')` external instead of inlining it. Single-star
// globs on purpose: wrangler's specifier matcher converts globs without
// globstar support, so `**/*` can never match a flat specifier.
"type": "ESModule",
"globs": ["generated/*.mjs", "./generated/*.mjs"],
"fallthrough": true,
},
{
"type": "CompiledWasm",
"globs": ["generated/*.wasm"],
"fallthrough": true,
},
],
"migrations": [
{
"new_sqlite_classes": ["MCP"],
"tag": "v1",
},
{
"new_sqlite_classes": ["ChatAgent"],
"tag": "v2",
},
{
"new_sqlite_classes": ["HomeConnectorSession", "HomeMCP"],
"tag": "v3",
},
{
"new_sqlite_classes": ["SchedulerDO"],
"tag": "v4",
},
// v6 (JobManager+JobRunner) and v9 (delete JobRunner) are omitted:
// JobManager lives on the jobs worker (ADR 0016) and is not
// exported here, so a fresh script replaying this chain (local dev,
// a new deployment) must not create it. The deployed production
// script is already past these tags, so wrangler's migration diff
// for it is unaffected.
{
"deleted_classes": ["SchedulerDO"],
"tag": "v7",
},
{
"new_sqlite_classes": ["StorageRunner"],
"tag": "v8",
},
{
"new_sqlite_classes": ["AgentTurnRunner"],
"tag": "v10",
},
{
"new_sqlite_classes": ["RepoSession"],
"tag": "v11",
},
{
"new_sqlite_classes": ["PackageRealtimeSession"],
"tag": "v13",
},
{
"new_sqlite_classes": ["PackageServiceInstance"],
"tag": "v14",
},
{
"renamed_classes": [
{
"from": "HomeConnectorSession",
"to": "RemoteConnectorSession",
},
],
"tag": "v15",
},
{
"deleted_classes": ["HomeMCP"],
"tag": "v16",
},
{
"deleted_classes": ["ChatAgent", "AgentTurnRunner"],
"tag": "v17",
},
{
"new_sqlite_classes": ["McpClientHub"],
"tag": "v18",
},
{
"new_sqlite_classes": ["OAuthPurgeCoordinator"],
"tag": "v19",
},
{
"new_sqlite_classes": ["RunLog"],
"tag": "v20",
},
{
"new_sqlite_classes": ["UserMeter"],
"tag": "v21",
},
{
"new_sqlite_classes": ["Mailbox"],
"tag": "v22",
},
{
"new_sqlite_classes": ["StripePlanRefresh"],
"tag": "v23",
},
{
"new_sqlite_classes": ["RepoSessionIndex"],
"tag": "v24",
},
{
"deleted_classes": ["RemoteConnectorSession"],
"tag": "v25",
},
{
"deleted_classes": ["PackageServiceInstance"],
"tag": "v26",
},
],
"observability": {
"enabled": true,
// Workers automatic tracing (beta): OTel-standard spans for handler
// invocations, outbound fetches, and binding calls (D1, KV, R2, DO,
// queues). Spans share the Workers Logs event quota. Inherited by all
// environments unless overridden; local dev and tests ignore it. The
// production env overrides this block to add the Sentry OTLP export
// destination, so preview spans stay in the Cloudflare dashboard only.
"traces": {
"enabled": true,
},
},
// Cron scheduling moved to the jobs worker (packages/jobs-worker, ADR
// 0016); the main worker has no scheduled handler.
"env": {
"production": {
"ratelimits": [
{
"name": "AUTH_RATE_LIMITER",
"namespace_id": "1001",
"simple": {
"limit": 10,
"period": 60,
},
},
],
// Replaces the top-level observability block (wrangler env keys
// override wholesale, so "enabled" is restated): same tracing,
// plus the account-level Sentry OTLP export destination
// "sentry-otlp-traces" (Workers Observability -> Destinations),
// which points at the kody-cloudflare Sentry project's OTLP
// traces endpoint. The destination must exist in the target
// account before deploy; forks create their own or remove it.
// See docs/contributing/setup-manifest.md.
"observability": {
"enabled": true,
"traces": {
"enabled": true,
"destinations": ["sentry-otlp-traces"],
},
},
"worker_loaders": [
{
"binding": "LOADER",
},
{
"binding": "APP_LOADER",
},
],
// The runtime lane's workflow moved to the kody-runtime script (ADR
// 0016); MCP durable escalation in this Worker starts instances over
// the cross-script binding.
"workflows": [
{
"binding": "DYNAMIC_CALLABLE_WORKFLOWS",
"name": "kody-runtime-dynamic-callable-workflows",
"class_name": "DynamicCallableWorkflow",
"script_name": "kody-runtime",
},
],
// Package runtime Worker (ADR 0016): runtime-owned requests are
// forwarded wholesale over this service binding (see
// packages/worker/src/runtime-worker-routing.ts).
"services": [
{
"binding": "RUNTIME_WORKER",
"service": "kody-runtime",
},
],
"assets": {
"directory": "./public",
"binding": "ASSETS",
"run_worker_first": [
"/@*/api/package-invocations/*",
"/@*/packages/*",
"/@*/webhooks/*",
"/robots.txt",
"/sitemap.xml",
"/auth.md",
"/.well-known/mcp/*",
"/.well-known/api-catalog",
"/.well-known/agent-skills/*",
"/.well-known/security.txt",
"/styles.css",
"/client-entry.js",
"/assets/*",
],
},
"durable_objects": {
"bindings": [
{
"class_name": "MCP",
"name": "MCP_OBJECT",
},
{
"class_name": "McpClientHub",
"name": "MCP_CLIENT_HUB",
},
{
"class_name": "OAuthPurgeCoordinator",
"name": "OAUTH_PURGE_COORDINATOR",
},
// Runtime-owned Durable Objects live in the kody-runtime script
// (ADR 0016); storage transferred there via that script's
// `transferred_classes` migration.
{
"class_name": "StorageRunner",
"name": "STORAGE_RUNNER",
"script_name": "kody-runtime",
},
{
"class_name": "RunLog",
"name": "RUN_LOG",
"script_name": "kody-runtime",
},
{
"class_name": "UserMeter",
"name": "USER_METER",
},
{
"class_name": "Mailbox",
"name": "MAILBOX",
},
{
"class_name": "RepoSessionIndex",
"name": "REPO_SESSION_INDEX",
},
{
"class_name": "StripePlanRefresh",
"name": "STRIPE_PLAN_REFRESH",
},
{
"class_name": "RepoSession",
"name": "REPO_SESSION",
},
{
"class_name": "PackageRealtimeSession",
"name": "PACKAGE_REALTIME_SESSION",
"script_name": "kody-runtime",
},
],
},
"d1_databases": [
{
"binding": "APP_DB",
"database_name": "kody",
"migrations_dir": "./migrations",
},
{
"binding": "AUDIT_DB",
"database_name": "kody-audit",
"migrations_dir": "./audit-migrations",
},
],
"send_email": [
{
"name": "EMAIL",
},
],
// Jobs worker service binding (ADR 0016): account dashboards, MCP
// capabilities, and account deletion/export reach jobs data and the
// JobManager Durable Object through this coarse-grained contract.
"services": [
{
"binding": "JOBS",
"service": "kody-jobs",
"entrypoint": "JobsService",
},
],
"queues": {
"producers": [
{
"binding": "PLATFORM_FEEDBACK_DISPATCH_QUEUE",
"queue": "kody-platform-feedback-dispatch",
},
{
"binding": "COMMUNITY_ACTIVITY_DISPATCH_QUEUE",
"queue": "kody-community-activity-dispatch",
},
{
"binding": "COMMUNITY_LISTING_PUBLISHED_DISPATCH_QUEUE",
"queue": "kody-community-listing-published-dispatch",
},
{
"binding": "PACKAGE_EVENTS_DISPATCH_QUEUE",
"queue": "kody-package-events-dispatch",
},
{
"binding": "WEBHOOK_DISPATCH_QUEUE",
"queue": "kody-webhook-dispatch",
},
],
"consumers": [
{
"queue": "kody-email-delivery",
"max_batch_size": 10,
"max_batch_timeout": 5,
"max_retries": 3,
"dead_letter_queue": "kody-email-delivery-dlq",
},
{
"queue": "kody-artifacts-repo-events",
"max_batch_size": 10,
"max_batch_timeout": 5,
"max_retries": 3,
"dead_letter_queue": "kody-artifacts-repo-events-dlq",
},
{
"queue": "kody-platform-feedback-dispatch",
"max_batch_size": 10,
"max_batch_timeout": 5,
"max_retries": 3,
"dead_letter_queue": "kody-platform-feedback-dispatch-dlq",
},
{
"queue": "kody-community-activity-dispatch",
"max_batch_size": 10,
"max_batch_timeout": 5,
"max_retries": 3,
"dead_letter_queue": "kody-community-activity-dispatch-dlq",
},
{
"queue": "kody-community-listing-published-dispatch",
"max_batch_size": 10,
"max_batch_timeout": 5,
"max_retries": 3,
"dead_letter_queue": "kody-community-listing-published-dispatch-dlq",
},
{
"queue": "kody-package-events-dispatch",
"max_batch_size": 10,
"max_batch_timeout": 5,
"max_retries": 3,
// Each event fans out to dynamic Worker isolate loads per
// subscriber; cap consumer concurrency so an emit burst
// cannot multiply into unbounded isolate loads.
"max_concurrency": 16,
"dead_letter_queue": "kody-package-events-dispatch-dlq",
},
{
"queue": "kody-webhook-dispatch",
"max_batch_size": 1,
"max_batch_timeout": 5,
"max_retries": 10,
"max_concurrency": 16,
"dead_letter_queue": "kody-webhook-dispatch-dlq",
},
],
},
"kv_namespaces": [
{
"binding": "OAUTH_KV",
},
{
"binding": "BUNDLE_ARTIFACTS_KV",
},
],
"r2_buckets": [
{
"binding": "COMMUNITY_ASSETS",
"bucket_name": "kody-community-assets",
},
{
"binding": "EMAIL_BLOBS",
"bucket_name": "kody-email-blobs",
},
{
"binding": "REPO_SESSION_BLOBS",
"bucket_name": "kody-repo-session-blobs",
},
],
"vectorize": [
{
"binding": "CAPABILITY_VECTOR_INDEX",
"index_name": "kody-capabilities-prod",
},
],
"analytics_engine_datasets": [
{
"binding": "USAGE_EVENTS",
"dataset": "kody_usage_events",
},
{
"binding": "FLAG_EXPOSURES",
"dataset": "kody_flag_exposures",
},
{
"binding": "EMAIL_EVENTS",
"dataset": "kody_email_events",
},
{
"binding": "MCP_PROTOCOL_EVENTS",
"dataset": "kody_mcp_protocol_events",
},
],
"ai": {
"binding": "AI",
},
"artifacts": [
{
"binding": "ARTIFACTS",
"namespace": "production",
},
],
"vars": {
"SENTRY_ENVIRONMENT": "production",
"SIGNUP_MODE": "invite",
// JSON number on purpose: buildSentryOptions reads the raw
// runtime env and only honors a number here (string secrets
// are ignored). 0 disables Sentry SDK trace sampling because
// Workers native tracing already exports OTLP traces to
// Sentry via the sentry-otlp-traces destination; error
// capture is unaffected.
"SENTRY_TRACES_SAMPLE_RATE": 0,
"ARTIFACTS_NAMESPACE": "production",
// Origin hosted package apps are served from. Must stay a
// separate registrable domain from APP_BASE_URL — that is what
// makes package code cross-site from the app origin, so
// `kody_session` never attaches to it. Intentionally unset for
// preview and tests, which keep serving package apps inline on
// the app origin.
//
// Production deploy publishes apex and wildcard zone routes for
// this host on the runtime Worker (never a custom domain in the
// package-app zone); DNS placeholder records are ensured
// separately. The routes deliberately do not live here, because
// Wrangler resolves *local dev* request URLs against the first
// configured route — every `npm run dev` request would arrive
// as https://kody.run/... and send local logins to the real
// domain. See docs/contributing/setup-manifest.md.
"PACKAGE_APP_BASE_URL": "https://kody.run",
// Dual-served package-app apex (`kodyapps.dev`) alongside
// PACKAGE_APP_BASE_URL. Generated runtime zone routes replace
// the whole set, so omitting this host would detach
// `*.kodyapps.dev` and delete its DNS.
"PACKAGE_APP_LEGACY_HOSTS": "kodyapps.dev",
// Email domains are committed (not just GitHub Actions vars) so
// they can never silently rederive from APP_BASE_URL. Canonical
// email lives on kody.codes; the LEGACY_* lists also accept
// inbound mail for heykody.app / heykody.dev addresses on the
// same inboxes. Empty those lists when retiring the old
// domains' email DNS. Outbound always sends from the canonical
// domains, which requires Email Routing + Email Sending
// verification on the kody.codes zone.
"USER_EMAIL_DOMAIN": "inbox.kody.codes",
"SYSTEM_EMAIL_DOMAIN": "kody.codes",
"LEGACY_USER_EMAIL_DOMAINS": "inbox.heykody.app,inbox.heykody.dev",
"LEGACY_SYSTEM_EMAIL_DOMAINS": "heykody.app,heykody.dev",
// Fathom Analytics site id (public, non-secret). Production
// only so local dev, preview, and tests never send pageviews.
"FATHOM_SITE_ID": "WKKSDJGN",
// Public (non-secret) Stripe Price ids for production
// subscriptions. Coupled to the live Stripe account: if a
// price is regenerated in Stripe, update the value in the
// same change or subscription plan matching silently degrades
// to the kody_plan metadata fallback. Checkout sessions are
// created server-side for authenticated users (no public
// Payment Link). STRIPE_STANDARD_PRICE_ID is the $12/month
// price on the "Kody Standard" product;
// STRIPE_STANDARD_YEARLY_PRICE_ID is $120/year (two months
// free). STRIPE_PRO_PRICE_ID is the $29/month price on the
// "Kody Pro" product; STRIPE_PRO_YEARLY_PRICE_ID is $288/year.
// Historical $5/$20 monthly price ids remain in Stripe and
// match in billing-config for existing subscribers.
"STRIPE_STANDARD_PRICE_ID": "price_1U3sg6LAQpAnsYszGeL2nc8O",
"STRIPE_STANDARD_YEARLY_PRICE_ID": "price_1U3sg6LAQpAnsYszqq9abwIY",
"STRIPE_PRO_PRICE_ID": "price_1U3sg6LAQpAnsYszlVpEIFGx",
"STRIPE_PRO_YEARLY_PRICE_ID": "price_1U3sg7LAQpAnsYszpozAEFUi",
// Disaster-recovery exporter → locked R2 bucket in the KCD
// (DR) account. The companion S3 credentials are Worker
// secrets set out-of-band via the Cloudflare API.
"DR_EXPORT_ENABLED": "true",
"DR_BACKUP_ACCOUNT_ID": "a41d50ecaf0ae0f86dd1824ef6729cb2",
"DR_BACKUP_BUCKET_NAME": "kody-production-backups",
// Public verification material shared with the DR control plane.
// The matching signing private key remains control-plane-only.
"BACKUP_MANIFEST_SIGNING_KEY_ID": "kody-dr-2026-07",
"BACKUP_MANIFEST_VERIFYING_PUBLIC_KEY_SPKI_BASE64": "MCowBQYDK2VwAyEA3jqjPcGTzWefE5PGyRBdUQKAEj7FFGtFIz+223sbt9A=",
},
},
"preview": {
// Fresh preview scripts replay the whole migration chain, so it must
// not create JobManager/JobRunner: the class is not exported here
// anymore (it lives in the jobs worker, ADR 0016). Same chain as the
// top level minus the v6/v9 JobManager+JobRunner pair.
"migrations": [
{
"new_sqlite_classes": ["MCP"],
"tag": "v1",
},
{
"new_sqlite_classes": ["ChatAgent"],
"tag": "v2",
},
{
"new_sqlite_classes": ["HomeConnectorSession", "HomeMCP"],
"tag": "v3",
},
{
"new_sqlite_classes": ["SchedulerDO"],
"tag": "v4",
},
{
"deleted_classes": ["SchedulerDO"],
"tag": "v7",
},
{
"new_sqlite_classes": ["StorageRunner"],
"tag": "v8",
},
{
"new_sqlite_classes": ["AgentTurnRunner"],
"tag": "v10",
},
{
"new_sqlite_classes": ["RepoSession"],
"tag": "v11",
},
{
"new_sqlite_classes": ["PackageRealtimeSession"],
"tag": "v13",
},
{
"new_sqlite_classes": ["PackageServiceInstance"],
"tag": "v14",
},
{
"renamed_classes": [
{
"from": "HomeConnectorSession",
"to": "RemoteConnectorSession",
},
],
"tag": "v15",
},
{
"deleted_classes": ["HomeMCP"],
"tag": "v16",
},
{
"deleted_classes": ["ChatAgent", "AgentTurnRunner"],
"tag": "v17",
},
{
"new_sqlite_classes": ["McpClientHub"],
"tag": "v18",
},
{
"new_sqlite_classes": ["OAuthPurgeCoordinator"],
"tag": "v19",
},
{
"new_sqlite_classes": ["RunLog"],
"tag": "v20",
},
{
"new_sqlite_classes": ["UserMeter"],
"tag": "v21",
},
{
"new_sqlite_classes": ["Mailbox"],
"tag": "v22",
},
{
"new_sqlite_classes": ["StripePlanRefresh"],
"tag": "v23",
},
{
"new_sqlite_classes": ["RepoSessionIndex"],
"tag": "v24",
},
{
"deleted_classes": ["RemoteConnectorSession"],
"tag": "v25",
},
{
"deleted_classes": ["PackageServiceInstance"],
"tag": "v26",
},
],
"ratelimits": [
{
"name": "AUTH_RATE_LIMITER",
"namespace_id": "1002",
"simple": {
"limit": 10,
"period": 60,
},
},
],
"worker_loaders": [
{
"binding": "LOADER",
},
{
"binding": "APP_LOADER",
},
],
"workflows": [
{
"binding": "DYNAMIC_CALLABLE_WORKFLOWS",
"name": "kody-runtime-preview-dynamic-callable-workflows",
"class_name": "DynamicCallableWorkflow",
"script_name": "kody-runtime",
},
],
// Preview deploys generate per-PR worker names; the deploy config
// generator rewrites "kody-runtime" service/script references to the
// PR's runtime worker name (tools/ci/runtime-worker-config.ts).
"services": [
{
"binding": "RUNTIME_WORKER",
"service": "kody-runtime",
},
],
"assets": {
"directory": "./public",
"binding": "ASSETS",
"run_worker_first": [
"/@*/api/package-invocations/*",
"/@*/packages/*",
"/@*/webhooks/*",
"/robots.txt",
"/sitemap.xml",
"/auth.md",
"/.well-known/mcp/*",
"/.well-known/api-catalog",
"/.well-known/agent-skills/*",
"/.well-known/security.txt",
"/styles.css",
"/client-entry.js",
"/assets/*",
],
},
"durable_objects": {
"bindings": [
{
"class_name": "MCP",
"name": "MCP_OBJECT",
},
{
"class_name": "McpClientHub",
"name": "MCP_CLIENT_HUB",
},
{
"class_name": "OAuthPurgeCoordinator",
"name": "OAUTH_PURGE_COORDINATOR",
},
{
"class_name": "StorageRunner",
"name": "STORAGE_RUNNER",
"script_name": "kody-runtime",
},
{
"class_name": "RunLog",
"name": "RUN_LOG",
"script_name": "kody-runtime",
},
{
"class_name": "UserMeter",
"name": "USER_METER",
},
{
"class_name": "Mailbox",
"name": "MAILBOX",
},
{
"class_name": "RepoSessionIndex",
"name": "REPO_SESSION_INDEX",
},
{
"class_name": "StripePlanRefresh",
"name": "STRIPE_PLAN_REFRESH",
},
{
"class_name": "RepoSession",
"name": "REPO_SESSION",
},
{
"class_name": "PackageRealtimeSession",
"name": "PACKAGE_REALTIME_SESSION",
"script_name": "kody-runtime",
},
],
},
"d1_databases": [
{
"binding": "APP_DB",
"database_name": "kody-preview",
"migrations_dir": "./migrations",
},
{
"binding": "AUDIT_DB",
"database_name": "kody-preview-audit",
"migrations_dir": "./audit-migrations",
},
],
"send_email": [
{
"name": "EMAIL",
},
],
// Rewired per preview by tools/ci/preview-resources.ts to the
// per-preview jobs worker name.
"services": [
{
"binding": "JOBS",
"service": "kody-jobs",
"entrypoint": "JobsService",
},
],
"queues": {
"producers": [
{
"binding": "WEBHOOK_DISPATCH_QUEUE",
"queue": "kody-preview-webhook-dispatch",
},
],
"consumers": [
{
"queue": "kody-preview-webhook-dispatch",
"max_batch_size": 1,
"max_batch_timeout": 5,
"max_retries": 10,
"max_concurrency": 16,
"dead_letter_queue": "kody-preview-webhook-dispatch-dlq",
},
],
},
"kv_namespaces": [
{
"binding": "OAUTH_KV",
},
{
"binding": "BUNDLE_ARTIFACTS_KV",
},
],
"r2_buckets": [
{
"binding": "COMMUNITY_ASSETS",
"bucket_name": "kody-preview-community-assets",
},
{
"binding": "EMAIL_BLOBS",
"bucket_name": "kody-preview-email-blobs",
},
{
"binding": "REPO_SESSION_BLOBS",
"bucket_name": "kody-preview-repo-session-blobs",
},
],
"vectorize": [
{
"binding": "CAPABILITY_VECTOR_INDEX",
"index_name": "kody-capabilities-preview",
},
],
"analytics_engine_datasets": [
{
"binding": "USAGE_EVENTS",
"dataset": "kody_usage_events_preview",
},
{
"binding": "FLAG_EXPOSURES",
"dataset": "kody_flag_exposures_preview",
},
{
"binding": "EMAIL_EVENTS",
"dataset": "kody_email_events_preview",
},
{
"binding": "MCP_PROTOCOL_EVENTS",
"dataset": "kody_mcp_protocol_events_preview",
},
],
"ai": {
"binding": "AI",
},
"artifacts": [
{
"binding": "ARTIFACTS",
"namespace": "preview",
},
],
"vars": {
"SENTRY_ENVIRONMENT": "preview",
"SIGNUP_MODE": "invite",
"ARTIFACTS_NAMESPACE": "preview",
"DR_EXPORT_ENABLED": "",
"DR_BACKUP_ACCOUNT_ID": "",
"DR_BACKUP_BUCKET_NAME": "",
"BACKUP_MANIFEST_SIGNING_KEY_ID": "",
"BACKUP_MANIFEST_VERIFYING_PUBLIC_KEY_SPKI_BASE64": "",
},
},
"test": {
// Local test workers replay the whole migration chain, so it must
// not create JobManager/JobRunner: the class is not exported here
// anymore (it lives in the jobs worker, ADR 0016). Same chain as the
// top level minus the v6/v9 JobManager+JobRunner pair.
"migrations": [
{
"new_sqlite_classes": ["MCP"],
"tag": "v1",
},
{
"new_sqlite_classes": ["ChatAgent"],
"tag": "v2",
},
{
"new_sqlite_classes": ["HomeConnectorSession", "HomeMCP"],
"tag": "v3",
},
{
"new_sqlite_classes": ["SchedulerDO"],
"tag": "v4",
},
{
"deleted_classes": ["SchedulerDO"],
"tag": "v7",
},
{
"new_sqlite_classes": ["StorageRunner"],
"tag": "v8",
},
{
"new_sqlite_classes": ["AgentTurnRunner"],
"tag": "v10",
},
{
"new_sqlite_classes": ["RepoSession"],
"tag": "v11",
},
{
"new_sqlite_classes": ["PackageRealtimeSession"],
"tag": "v13",
},
{
"new_sqlite_classes": ["PackageServiceInstance"],
"tag": "v14",
},
{
"renamed_classes": [
{
"from": "HomeConnectorSession",
"to": "RemoteConnectorSession",
},
],
"tag": "v15",
},
{
"deleted_classes": ["HomeMCP"],
"tag": "v16",
},
{
"deleted_classes": ["ChatAgent", "AgentTurnRunner"],
"tag": "v17",
},
{
"new_sqlite_classes": ["McpClientHub"],
"tag": "v18",
},
{
"new_sqlite_classes": ["OAuthPurgeCoordinator"],
"tag": "v19",
},
{
"new_sqlite_classes": ["RunLog"],
"tag": "v20",
},
{
"new_sqlite_classes": ["UserMeter"],
"tag": "v21",
},
{
"new_sqlite_classes": ["Mailbox"],
"tag": "v22",
},
{
"new_sqlite_classes": ["StripePlanRefresh"],
"tag": "v23",
},
{
"new_sqlite_classes": ["RepoSessionIndex"],
"tag": "v24",
},
{
"deleted_classes": ["RemoteConnectorSession"],
"tag": "v25",
},
{
"deleted_classes": ["PackageServiceInstance"],
"tag": "v26",
},
],
"worker_loaders": [
{
"binding": "LOADER",
},
{
"binding": "APP_LOADER",
},
],
"workflows": [
{
"binding": "DYNAMIC_CALLABLE_WORKFLOWS",
"name": "kody-test-dynamic-callable-workflows",
"class_name": "DynamicCallableWorkflow",
},
],
"assets": {
"directory": "./public",
"binding": "ASSETS",
"run_worker_first": [
"/@*/api/package-invocations/*",
"/@*/packages/*",
"/@*/webhooks/*",
"/robots.txt",
"/sitemap.xml",
"/auth.md",
"/.well-known/mcp/*",
"/.well-known/api-catalog",
"/.well-known/agent-skills/*",
"/.well-known/security.txt",
"/styles.css",
"/client-entry.js",
"/assets/*",
],
},
"durable_objects": {
"bindings": [