Skip to content

Commit 54b2f43

Browse files
committed
Add iMessage config cleanup RFC
1 parent 9732bb8 commit 54b2f43

1 file changed

Lines changed: 204 additions & 0 deletions

File tree

Lines changed: 204 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,204 @@
1+
# iMessage Channel Configuration Cleanup
2+
3+
## Summary
4+
5+
Simplify the iMessage channel configuration surface by moving expected reliability
6+
behavior into defaults, preserving true safety and operations controls, and
7+
hiding or deprecating knobs that expose implementation details.
8+
9+
The current iMessage config surface mixes user-facing policy, bridge operations,
10+
generic channel behavior, and legacy compatibility fields. This makes setup
11+
harder than it needs to be: users must discover opt-in settings for behavior
12+
they reasonably expect, while advanced fields appear equally important in docs
13+
and schema output.
14+
15+
## Goals
16+
17+
- Make common iMessage behavior work with less configuration.
18+
- Keep explicit controls for privacy, security, and deployment variance.
19+
- Keep shipped configs compatible unless there is a deliberate migration path.
20+
- Reduce docs and setup emphasis on low-level transport and generic channel
21+
internals.
22+
- Clarify which options are basic setup, advanced operations, compatibility, or
23+
planned deprecation.
24+
25+
## Non-Goals
26+
27+
- Removing multi-account iMessage support.
28+
- Removing group allowlists, pairing, or config-write authorization.
29+
- Changing the iMessage bridge dependency or replacing `imsg`.
30+
- Removing generic channel config support from other channels.
31+
32+
## Current Problems
33+
34+
### Expected behavior is opt-in
35+
36+
Several settings are currently optional even though they mostly represent
37+
expected channel reliability:
38+
39+
- `includeAttachments`: users expect media to work once iMessage is enabled,
40+
while `attachmentRoots` and `mediaMaxMb` already provide the real safety
41+
boundaries.
42+
- `coalesceSameSenderDms`: users should not need to discover a magic opt-in for
43+
Apple split-send behavior.
44+
- `catchup.enabled`: users generally expect messages received during gateway
45+
downtime to be replayed, and catchup already has age, count, lookback, and
46+
failure limits.
47+
48+
### Advanced controls are not distinguished from setup
49+
50+
Operational escape hatches such as `probeTimeoutMs`, `remoteHost`, and
51+
`textChunkLimit` are valid, but they should not be presented as normal setup
52+
requirements.
53+
54+
### Generic channel options look iMessage-specific
55+
56+
Fields such as `healthMonitor`, `heartbeat`, `responsePrefix`,
57+
`dmHistoryLimit`, and `dms` are shared channel/session behavior. They should
58+
remain available where compatibility requires them, but the iMessage docs should
59+
not imply they are core iMessage concepts.
60+
61+
### Some accepted fields may be stale
62+
63+
`capabilities` is accepted by the iMessage config schema, but no iMessage
64+
runtime consumer has been identified. If there is no generic consumer, it should
65+
be removed or deprecated.
66+
67+
## Proposed Classification
68+
69+
### Basic setup
70+
71+
These fields remain visible in basic setup and examples:
72+
73+
- `enabled`: starts or stops the iMessage channel.
74+
- `cliPath`: selects the local `imsg` binary or SSH wrapper.
75+
- `dbPath`: overrides the Messages database path.
76+
- `dmPolicy`: controls direct-message admission.
77+
- `allowFrom`: controls authorized direct senders.
78+
- `groupPolicy`: controls group admission.
79+
- `groupAllowFrom`: controls authorized group senders.
80+
- `groups`: controls group registry and mention behavior.
81+
- `attachmentRoots`: path safety boundary for inbound local attachments.
82+
- `service`: selects iMessage, SMS, or auto send behavior.
83+
- `region`: SMS region default, if SMS support remains in scope.
84+
- `accounts`: declares multi-account setups.
85+
- `defaultAccount`: selects the default account when multiple accounts exist.
86+
- `name`: display label for account lists.
87+
88+
### Default or collapse
89+
90+
These should stop being prominent opt-in settings:
91+
92+
- `includeAttachments`: default to enabled, with `attachmentRoots` and
93+
`mediaMaxMb` continuing to enforce safety. If compatibility risk is too high,
94+
introduce a staged rollout with a doctor warning before changing the default.
95+
- `coalesceSameSenderDms`: make this default DM behavior or fold it into generic
96+
inbound debounce. Keep an escape hatch only if real regressions appear.
97+
- `catchup.enabled`: consider default-on catchup using existing safety limits.
98+
Keep sub-options for advanced tuning.
99+
- `actions`: collapse per-action toggles into bridge capability probing, or a
100+
single private API policy if operators need one broad switch.
101+
- `remoteAttachmentRoots`: default to `attachmentRoots` and keep as an advanced
102+
override only when remote and local paths differ.
103+
104+
### Keep advanced
105+
106+
These options should remain user-configurable but move out of basic setup docs:
107+
108+
- `sendReadReceipts`: privacy-sensitive opt-out for read receipts.
109+
- `reactionNotifications`: controls tapback system-event noise.
110+
- `probeTimeoutMs`: escape hatch for slow Macs or SSH wrappers.
111+
- `remoteHost`: explicit SCP host when wrapper auto-detection is insufficient.
112+
- `contextVisibility`: privacy policy for quoted or supplemental context.
113+
- `healthMonitor`: generic operational health override.
114+
- `groups.*.tools`: group-specific tool authority policy.
115+
- `groups.*.toolsBySender`: sender-specific group tool authority policy.
116+
117+
### Keep compatible, hide from iMessage docs
118+
119+
These fields should remain schema-compatible, but documentation should frame
120+
them as shared channel/session behavior or omit them from iMessage setup:
121+
122+
- `textChunkLimit`: low-level outbound chunk limit.
123+
- `mediaMaxMb`: media size safety limit; prefer generic media-limit docs.
124+
- `responsePrefix`: generic outbound presentation policy.
125+
- `heartbeat`: generic channel heartbeat visibility policy.
126+
- `dmHistoryLimit`: generic DM transcript history tuning.
127+
- `dms`: generic per-DM overrides.
128+
- `blockStreaming`: generic reply pipeline override.
129+
130+
### Deprecate or migrate
131+
132+
These fields should get a compatibility plan:
133+
134+
- `blockStreamingCoalesce`: migrate to the newer generic streaming block
135+
coalesce shape if available.
136+
- `chunkMode`: remove from iMessage-specific docs and consider migration to
137+
generic streaming chunk config only.
138+
- `capabilities`: deprecate or remove if no runtime consumer exists.
139+
- `defaultTo`: reassess. It is a CLI convenience, but explicit target or
140+
last-route behavior is less surprising.
141+
- `groups.*.systemPrompt`: reassess. It is powerful, but contributes to
142+
prompt/config sprawl. Keep only if cross-channel group prompt policy is an
143+
intentional product surface.
144+
145+
### Keep as explicit safety or authority boundaries
146+
147+
These options should not be removed as part of cleanup:
148+
149+
- `attachmentRoots`: path allowlist for inbound attachment ingestion.
150+
- `configWrites`: gates channel-initiated config mutation.
151+
- `groups.*.tools`: controls tool authority in group conversations.
152+
- `groups.*.toolsBySender`: controls sender-specific tool authority.
153+
154+
## Migration Plan
155+
156+
1. Split documentation into basic setup and advanced configuration.
157+
2. Remove nonessential fields from basic examples, especially
158+
`includeAttachments: false`, `actions.*`, `textChunkLimit`, and catchup
159+
disabled examples.
160+
3. Add schema metadata or docs tables that classify fields as basic, advanced,
161+
shared, compatibility, or deprecated.
162+
4. Add tests around any default changes:
163+
- inbound attachments enabled by default while path roots still block
164+
disallowed files;
165+
- split-send DM coalescing enabled by default;
166+
- catchup default behavior respects age/count/failure limits;
167+
- private API actions remain gated by probe status.
168+
5. Add doctor migrations for any removed or renamed shipped config keys.
169+
6. Stage risky default changes behind one release of warnings when needed.
170+
171+
## Compatibility Notes
172+
173+
Changing config defaults is upgrade-sensitive. Any behavior change must preserve
174+
existing explicit config values:
175+
176+
- `includeAttachments: false` must continue to disable attachment ingestion.
177+
- `coalesceSameSenderDms: false` must continue to disable DM coalescing if the
178+
default changes.
179+
- `catchup: { enabled: false }` must continue to disable replay if catchup
180+
becomes default-on.
181+
- Existing `actions.*` fields should continue to parse until a doctor migration
182+
or deprecation window removes them.
183+
184+
## Open Questions
185+
186+
- Should iMessage attachment ingestion become default-on in one release, or
187+
after one release of doctor warnings?
188+
- Should catchup become default-on, or should onboarding explicitly recommend
189+
enabling it?
190+
- Is per-action private API gating used enough to justify keeping `actions.*`?
191+
- Is `capabilities` consumed by any generic config path, or is it stale?
192+
- Should `groups.*.systemPrompt` remain a cross-channel group feature, or move
193+
to an agent/routing-owned surface?
194+
- Should `defaultTo` remain for CLI workflows, or be replaced by explicit target
195+
and last-route behavior?
196+
197+
## Success Criteria
198+
199+
- New iMessage setup requires fewer config lines.
200+
- Safety boundaries remain explicit and tested.
201+
- Advanced operators can still configure remote Mac, timeouts, read receipts,
202+
reaction visibility, and group tool policy.
203+
- Basic docs no longer present internal transport knobs as normal setup.
204+
- Deprecated fields have a migration or doctor path before removal.

0 commit comments

Comments
 (0)