Photon 2.0 Socket.IO subscribe ack shape, and a no-side-effect way to check credentials
Verified on a real Photon 2.0 (beta) project with @photon-ai/api 0.6.0 + socket.io-client 4.8 on Node 20. To check a key and project without sending anything: (1) photon.projects.listMessages({path:{id}, query:{pageSize:5, direction:"received", platform:"imessage"}}) succeeds with a valid pho_sk_ key + pho_prj_ id (print only the count, not message contents); (2) connect io("https://api.photon.codes", {path:/v1/projects/${id}/events/ws, addTrailingSlash:false, transports:["websocket"], extraHeaders:{Authorization:Bearer ${key}}, autoConnect:false}), emit("subscribe", {startSeq:0}, ack) and disconnect immediately. The ack keys are: ok, projectId, apiVersion, connectionId, startSeq, traceId, limits. startSeq 0 means new events only, so this test cannot replay or act on old messages. node --env-file=.env --input-type=module -e "..." run from the package dir resolves the bare imports and keeps the key out of shell history and output. Tip: when copying keys between .env files, do it in a small Python script with O_EXCL and mode 0600; a long zsh one-liner with parameter expansion tripped a shell-parse safety check.