@cosmovex/agentpager 0.1.3 → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/cli.js +11 -1
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -199,7 +199,14 @@ async function serve(state, keepAwake) {
199
199
  console.log(` ${s.available ? '●' : '○'} ${s.name}${s.version ? ` ${dim(s.version)}` : ''}${s.available ? '' : dim(` ${s.reason}`)}`);
200
200
  console.log(` ${state.devices.length} phone${state.devices.length === 1 ? '' : 's'} paired:`);
201
201
  printPhones(state.devices, ' ');
202
- console.log(dim('\nKeep this running (or run `agentpager service install` to start it at login).'));
202
+ if (process.argv[1]?.includes('_npx')) {
203
+ // Started with npx: this window IS AgentPager. Say so before someone closes it.
204
+ console.log(`\n${bold('Keep this window open.')} Closing it (or Ctrl+C) disconnects your phone until you start it again.`);
205
+ console.log(dim('Want it always on, even after a restart? npm install -g @cosmovex/agentpager then: agentpager service install'));
206
+ }
207
+ else {
208
+ console.log(dim('\nKeep this running (or run `agentpager service install` to start it at login).'));
209
+ }
203
210
  // Someone who reinstalls the app, or picks up a second phone, reasonably runs `agentpager` again
204
211
  // and waits for a code that never comes — this is the only place they will look for why.
205
212
  console.log(dim('Pairing another phone (or the same one after a reinstall)? Run `agentpager pair`.'));
@@ -217,6 +224,9 @@ async function serve(state, keepAwake) {
217
224
  const updateTimer = setInterval(() => void checkUpdate(), 12 * 3600_000);
218
225
  const quit = async () => {
219
226
  console.log(dim('\nDisconnecting…'));
227
+ for (const c of channels.values())
228
+ c.send({ type: 'bye' });
229
+ await new Promise((r) => setTimeout(r, 800)); // let it leave before the socket closes
220
230
  hub.shutdown();
221
231
  stopControl();
222
232
  codex.shutdown();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cosmovex/agentpager",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "description": "Pager for your AI coding agents — approve, reply and hear results on your phone. End-to-end encrypted.",
5
5
  "main": "dist/cli.js",
6
6
  "scripts": {