|
| 1 | +# Keep an agent's Slack image in sync |
| 2 | + |
| 3 | +Upload an image in the connected agent's identity settings. In this connector, |
| 4 | +open **Connection settings → Agent image → Connect image updates**. Supply a |
| 5 | +Slack app configuration access token and its refresh token, generated for the |
| 6 | +workspace under **Your App Configuration Tokens** at https://api.slack.com/apps. |
| 7 | +Use a separate token pair per connector: rotating a shared refresh token in two |
| 8 | +processes would invalidate the other process's copy. These credentials can |
| 9 | +manage your apps; they stay in this connector's private secret store and are |
| 10 | +never sent to the ACP agent or included in configuration exports or UI state. |
| 11 | + |
| 12 | +The connector reads the optional `agent-identity/1` extension over its configured |
| 13 | +ACP connection every two minutes while running. It uploads changed image bytes |
| 14 | +using Slack's documented [`apps.icon.set`](https://docs.slack.dev/reference/methods/apps.icon.set/) |
| 15 | +API. This changes the actual app icon, including DMs and profile surfaces, rather |
| 16 | +than overriding only the appearance of individual messages. No public image |
| 17 | +hosting, `chat:write.customize`, transcript access or model prompt is needed. |
| 18 | +The app configuration token needs `app_configurations:write` and access to this |
| 19 | +app. Manager-app tokens can only change apps they created. Slack remains the |
| 20 | +authority on whether a token may change the selected app. |
| 21 | + |
| 22 | +The bot identity independently verifies the destination app before an upload. |
| 23 | +Icons are deduplicated by checksum; accepted updates and retry deadlines survive |
| 24 | +restarts. A replacement is picked up automatically. Removing a previously synced |
| 25 | +portrait uploads the agent's neutral fallback. An agent without an uploaded |
| 26 | +portrait leaves a manually selected Slack icon alone. Disconnecting image access |
| 27 | +stops sync and leaves Slack's existing icon in place. Slack clients may briefly |
| 28 | +cache old icons after an accepted update. |
| 29 | + |
| 30 | +Failures appear in image status and do not interrupt conversations. Rate limits |
| 31 | +respect `Retry-After`; uncertain responses may safely retry the idempotent icon |
| 32 | +replacement after a delay. Expiring configuration tokens rotate using |
| 33 | +[`tooling.tokens.rotate`](https://docs.slack.dev/reference/methods/tooling.tokens.rotate/) |
| 34 | +when a refresh token is configured. A lost/revoked token needs reconnecting. |
| 35 | + |
| 36 | +## Generic ACP compatibility |
| 37 | + |
| 38 | +Portable identity is optional, **not part of base ACP**. Any ACP implementation |
| 39 | +can implement the [documented extension](https://github.com/microsoft/amplifier-constellation-instance/blob/main/docs/agent-identity.md). |
| 40 | +The connector only calls the exact advertised method and accepts bounded, |
| 41 | +checksum-verified PNG bytes. It does not read the agent's installation files, |
| 42 | +use its management token, or fetch an agent-provided image URL. Agents without |
| 43 | +this extension keep their normal Slack icon and ordinary ACP behavior. |
| 44 | + |
| 45 | +## Automation |
| 46 | + |
| 47 | +- `GET /api/v1/identity`: synchronization status (`observe`). |
| 48 | +- `POST /api/v1/identity` with `{}`: sync now (`admin`), respecting retry deadlines. |
| 49 | +- `PUT /api/v1/identity/credential` with `{ "token": "...", "refresh_token": "..." }`: |
| 50 | + save private configuration access (`admin`). Optional `expires_at` is Unix seconds. |
| 51 | +- `DELETE /api/v1/identity/credential`: stop synchronization and remove local access. |
| 52 | + |
| 53 | +The UI exposes `identity.open`, `identity.credentials`, `identity.sync` and |
| 54 | +`identity.disconnect` through `slackConnector.act`. Its view/modal state uses the |
| 55 | +existing authenticated view API. Credential input values are excluded from it. |
0 commit comments