the catalogue shapes a commander's words, not the commander

"it should always say Commander: <name>" was left to whether the commander
remembered to write it. that is not a structure, it is a hope — and the
producer's title reached the lock screen untouched, because both transports
built the alert from n.title rather than from the renderer.

so the code owns the shape and the producer only supplies values.
officer/core:commander is `Commander: {title}` / `{body}`; the commander
sends "Voice Memos", never the prefix. interpolation gains {title} and
{body} alongside {n} and {id}, for the same reason the others exist.

apns-payload and fcm now send the RENDERED text. that was the actual
delivery bug: the catalogue could say whatever it liked and neither
transport read it.

a placeholder that resolves to nothing takes its punctuation with it, or
`Commander: {title}` with no title ships `Commander: ` and every template
has to assume its values are always present.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Officer-Session: 656f5c85-e49a-4f1f-b9f3-042a04b4d043
This commit is contained in:
2026-08-24 15:24:17 +00:00
co-authored by Claude Opus 5
parent 478ddb13e9
commit 2d5e9835f5
7 changed files with 91 additions and 21 deletions
+7 -2
View File
@@ -76,8 +76,11 @@ export function credentialSection(credentialPath: string | null): string[] {
'',
'### Telling the owner something',
'',
"A push to their devices, in your own words. `id` is this directory's name, which groups your",
'notifications together and is what the deeplink opens:',
'A push to their devices, in your own words.',
'',
'`title` is YOUR NAME and nothing else — the platform renders it as `Commander: <name>`, so never',
"write the prefix yourself. `body` is the sentence. `id` is this directory's name, which groups your",
'notifications together and is what the deeplink opens.',
'',
'```',
'curl -X POST "$OFFICER_API_URL/api/notify/_officer/notify" \\',
@@ -86,6 +89,8 @@ export function credentialSection(credentialPath: string | null): string[] {
' -d \'{"code":"officer/core:commander","id":"1","title":"Voice Memos","body":"3 memos filed"}\'',
'```',
'',
'That arrives as **Commander: Voice Memos** / *3 memos filed*.',
'',
'Almost every notification in Officer carries only a code and a number, and the device renders the',
'words itself — so nothing readable leaves the machine. This one is the exception: `title` and `body`',
'are yours to write, and they go through Apple and Google to reach the lock screen.',