can2cup 0.10.3 → 0.10.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/wrangler.toml ADDED
@@ -0,0 +1,106 @@
1
+ name = "parley-relay"
2
+ main = "src/relay/index.ts"
3
+ compatibility_date = "2026-08-01"
4
+
5
+ # Declaring any route turns the workers.dev name OFF unless this stays explicit,
6
+ # which would kill every invite link already handed out and force every connected
7
+ # client to re-authorise. Both names serve the same worker; new links use the
8
+ # custom one. Must sit above every table header — a key after [[routes]] belongs
9
+ # to that route, not to the top level.
10
+ workers_dev = true
11
+
12
+ # The public name. Everything the relay hands out — Agent Card url, A2A extension
13
+ # URIs, the OAuth issuer and its endpoints, invite links — is derived from the
14
+ # request origin, so this is the only place the hostname is set.
15
+ # 2026-09-03 rename (parley → can2can → can2cup): the can2cup name is canonical; the parley
16
+ # domain stays up so every invite link and configured client keeps working.
17
+ # At launch, can2cup.com (+ cup2can.com as a typo redirect) gets added here the same way.
18
+ [[routes]]
19
+ pattern = "can2cup.com"
20
+ custom_domain = true
21
+
22
+ [[routes]]
23
+ pattern = "www.can2cup.com"
24
+ custom_domain = true
25
+
26
+ [[routes]]
27
+ pattern = "can2cup.peachpitboat.com"
28
+ custom_domain = true
29
+
30
+ [[routes]]
31
+ pattern = "can2can.peachpitboat.com"
32
+ custom_domain = true
33
+
34
+ [[routes]]
35
+ pattern = "parley.peachpitboat.com"
36
+ custom_domain = true
37
+
38
+ [observability]
39
+ enabled = true
40
+
41
+ # Static assets: the install tarball, so `npm i -g https://<relay>/dl/parley.tgz` needs no token.
42
+ # `npm run release:relay` copies the freshly packed tarball into relay-assets/dl/ before `deploy:relay`.
43
+ [assets]
44
+ directory = "./relay-assets"
45
+ binding = "ASSETS" # v0.9.0: the relay reads /dl/VERSION through this to fill x-can2cup-latest
46
+
47
+ [[durable_objects.bindings]]
48
+ name = "ROOMS"
49
+ class_name = "RoomDO"
50
+
51
+ [[migrations]]
52
+ tag = "v1"
53
+ new_sqlite_classes = ["RoomDO"]
54
+
55
+ # Secrets (never in this file):
56
+ # wrangler secret put RELAY_KEY — value required in X-Parley-Key to create rooms
57
+ # wrangler secret put RELAY_SIGNING_KEY — hex ed25519 priv (v0.3): signs system events + transcript heads; GET / shows the pub
58
+ # Local dev: put RELAY_KEY=... in .dev.vars
59
+
60
+ [[durable_objects.bindings]]
61
+ name = "BRIDGE"
62
+ class_name = "BridgeDO"
63
+
64
+ [[migrations]]
65
+ tag = "v2"
66
+ new_sqlite_classes = ["BridgeDO"]
67
+
68
+ # Bridge (LINE bot) — see src/relay/bridge.ts
69
+ # wrangler secret put BRIDGE_KEY shared with the bot (lilinene PARLEY_BRIDGE_KEY)
70
+ # wrangler secret put LINE_FORWARD_URL the bot's push endpoint, e.g. https://lilinene.onrender.com/parley/push
71
+ # wrangler secret put LINE_CHANNEL_ACCESS_TOKEN (alternative: push straight to LINE from the worker)
72
+ [vars]
73
+ # v0.9.14 (G-4 R1): the relay's own name and its aliases. scripts/routes-check.mjs (run by release:relay) fails the
74
+ # release when these drift from the [[routes]] above — that drift is how "five names, nobody said so" happened.
75
+ RELAY_CANONICAL = "https://can2cup.com"
76
+ RELAY_ALIASES = "https://www.can2cup.com,https://can2cup.peachpitboat.com,https://can2can.peachpitboat.com,https://parley.peachpitboat.com"
77
+ PUSH_BUDGET = "180"
78
+ # v0.8.1: `can2cup report` from any agent lands on the relay operator's LINE. Since 2026-09-06 the userId is a
79
+ # wrangler secret (OPERATOR_LINE_USER_ID), not a var here — this file will be public one day.
80
+ # How long a closed session's goodbye is held before the principal is told the agent is offline.
81
+ # Must stay above the MCP's 60 s heartbeat: every Claude Code session runs its own MCP process under
82
+ # the same agent key, so one window closing must not announce anything while siblings are alive.
83
+ PRESENCE_GRACE_SEC = "90"
84
+ # Abuse quotas (per identity; /terms renders these numbers)
85
+ MSGS_PER_MIN = "60"
86
+ ROOMS_PER_DAY = "10"
87
+ MIN_CLIENT = "0.0.0"
88
+ # v0.9.2: a room wired to a LINE group expires this long after its LAST message (not after creation).
89
+ # v0.9.12: a 1:1 LINE binding lapses once the AGENT has been absent this long (warned 14 d ahead; the first 30 d
90
+ # after the deploy that introduced it only warn). The boss set 90 on 2026-09-05. Dev overrides: IDLE_DAYS_SEC etc. in .dev.vars.
91
+ IDLE_DAYS = "90"
92
+ GROUP_ROOM_TTL_DAYS = "30" # v0.9.0 upgrade protocol: below this, /p/rooms, /p/room-created, /p/invite and room sends answer 426. Raise only for incompatible protocol changes, after 7 days notice in known-issues.json
93
+ IMG_BYTES_PER_DAY = "5000000"
94
+ PUSH_USER_BUDGET = "60"
95
+ # RFC 3161 Time Stamping Authority. UNSET = anchoring disabled and /rooms/:id/anchor answers 501.
96
+ # When set, the relay takes a third-party timestamp over the transcript head on every commitment
97
+ # (accept / grant) and on demand, so a reader does not have to trust the operator's clock.
98
+ # freetsa.org proves the mechanism but is a free hobby service — point this at a commercial TSA
99
+ # before anyone relies on the anchor as evidence.
100
+ # TSA_URL = "https://freetsa.org/tsr"
101
+ # The LINE official account's basic ID (public add-friend id). Lets clients build
102
+ # https://line.me/R/oaMessage/<id>/?<text> deep links: scan → chat opens with "/link CODE" prefilled.
103
+ LINE_OA_ID = "@789jxzby"
104
+ # Dedicated can2cup OA「傳聲罐罐 can2cup」= "@789jxzby" (created 2026-09-03; Provider can2cup, its own
105
+ # userId pool). Switch this AND the LINE_FORWARD_URL secret together, only once the BOT_MODE=can2cup
106
+ # Render service is live — the moment it flips, everyone has to /link again on the new bot.