The best way to control Claude Code, Codex and more from any computer or phone

main
ts 16 lines 814 Bytes
Raw
1 /**
2 * Derives a deterministic AppRegistry client token from the resource's
3 * instance ID so retried creates never double-provision.
4 */
5 export const clientToken = (instanceId: string): string =>
6 instanceId.replaceAll(/[^a-zA-Z0-9]/g, "").slice(0, 64) || "alchemy";
7
8 /**
9 * Drops AWS-managed system tags (`aws:*`, case-insensitive) from an
10 * observed tag map. AppRegistry stamps resources with system tags (e.g.
11 * `aws:servicecatalog:applicationName`) that customers cannot remove —
12 * including them in the diff baseline makes untagResource fail with
13 * "Customers cannot remove tag keys starting with aws:".
14 */
15 export const stripAwsSystemTags = (tags: Record<string, string>): Record<string, string> =>
16 Object.fromEntries(Object.entries(tags).filter(([key]) => !key.toLowerCase().startsWith("aws:")));