pushary 1.9.183 → 1.9.184

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.9.184
4
+
5
+ - `pushary calls on`: when changing your number or turning calls on is refused because agent keys already made too many of those changes today, the CLI now says so and that you can make the change in the Pushary app or the dashboard. Before, it said you had used today's test calls.
6
+ - `pushary calls on` on a plan without phone calls now says "Phone calls need an active Agent, Agent Pro or Team plan.", as the phone app does. Before, it named only Agent and Agent Pro.
7
+
3
8
  ## 1.9.183
4
9
 
5
10
  - A session in a git worktree you made yourself, or one a tool such as Conductor made, is named after the worktree's folder again, as before 1.9.173, so parallel worktrees of one repository can be told apart on your phone. Only Claude Code's own worktrees, in `.claude/worktrees`, keep the repository's name, such as the `bridge-cse_...` folders of sessions started from claude.ai.
@@ -81,7 +81,7 @@ var SETUP_ERROR_LINES = {
81
81
  daily_test_limit: "You used today's test calls. Try again tomorrow.",
82
82
  number_test_limit: "This number had too many test calls. Try again tomorrow.",
83
83
  no_minutes: "You have no call minutes left this month.",
84
- not_entitled: "Your plan has no phone calls. Agent and Agent Pro include call minutes.",
84
+ not_entitled: "Phone calls need an active Agent, Agent Pro or Team plan.",
85
85
  daily_limit: "You reached today's call limit.",
86
86
  busy: "A call to you is already running. Try again in a minute.",
87
87
  provider_failed: "The call could not be placed. Try again in a minute.",
@@ -115,6 +115,8 @@ var NUMBER_FLAG_NEEDED = "Add your mobile number with --number, since nobody is
115
115
  var TEST_CALL_TIMED_OUT_LINE = "No result yet. Run pushary calls in a minute to see if the number is confirmed.";
116
116
  var settingsPageOf = (baseUrl) => `${baseUrl}${PHONE_CALL_SETTINGS_PAGE}`;
117
117
  var errorLineOf = (error, phoneRejection) => error === "phone_rejected" && phoneRejection !== void 0 ? PHONE_REJECTION_LINES[phoneRejection] : SETUP_ERROR_LINES[error];
118
+ var KEY_CHANGES_USED_UP_LINE = "Agent keys changed your call number or turned calls on too many times today. Try again tomorrow, or make the change in the Pushary app or the dashboard.";
119
+ var settingsChangeErrorLineOf = (error, phoneRejection) => error === "daily_test_limit" ? KEY_CHANGES_USED_UP_LINE : errorLineOf(error, phoneRejection);
118
120
  var hourOf = (hour) => `${String(hour).padStart(2, "0")}:00`;
119
121
  var minutesOf = (seconds) => {
120
122
  const minutes = Math.round(seconds / 60);
@@ -172,8 +174,8 @@ var answeredReply = async (client, answer) => {
172
174
  if (answer.kind === "unreadable") throw new CallsRefused(unreadableReplyLineOf(answer.status));
173
175
  return answer.reply;
174
176
  };
175
- var acceptedStatus = (reply) => {
176
- if (!reply.ok) throw new CallsRefused(errorLineOf(reply.error, reply.phoneRejection));
177
+ var acceptedStatus = (reply, refusalLineOf = errorLineOf) => {
178
+ if (!reply.ok) throw new CallsRefused(refusalLineOf(reply.error, reply.phoneRejection));
177
179
  return reply;
178
180
  };
179
181
  var currentStatus = async (client) => acceptedStatus(await answeredReply(client, await readPhoneCallSetup(client))).status;
@@ -201,8 +203,8 @@ var saveNumber = async (client, status, options) => {
201
203
  io.line(` ${io.check()} Saved ${reply.status.number ?? phone}`);
202
204
  return reply.status;
203
205
  }
204
- if (!options.interactive || options.number !== void 0 || reply.error !== "phone_rejected") throw new CallsRefused(errorLineOf(reply.error, reply.phoneRejection));
205
- io.warn(errorLineOf(reply.error, reply.phoneRejection));
206
+ if (!options.interactive || options.number !== void 0 || reply.error !== "phone_rejected") throw new CallsRefused(settingsChangeErrorLineOf(reply.error, reply.phoneRejection));
207
+ io.warn(settingsChangeErrorLineOf(reply.error, reply.phoneRejection));
206
208
  }
207
209
  };
208
210
  var pause = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
@@ -250,13 +252,13 @@ var turnCallsOn = async (client, options) => {
250
252
  io.line(" Calls stay off.");
251
253
  return;
252
254
  }
253
- const on = acceptedStatus(await change(client, { action: "enabled", enabled: true, consented: true })).status;
255
+ const on = acceptedStatus(await change(client, { action: "enabled", enabled: true, consented: true }), settingsChangeErrorLineOf).status;
254
256
  io.line(` ${io.check()} ${callsOnLine(on)}`);
255
257
  io.line(` ${io.dim(`Turn them off: pushary calls off. Change the rules: ${settingsPageOf(client.baseUrl)}`)}`);
256
258
  io.line();
257
259
  };
258
260
  var turnCallsOff = async (client) => {
259
- acceptedStatus(await change(client, { action: "enabled", enabled: false, consented: false }));
261
+ acceptedStatus(await change(client, { action: "enabled", enabled: false, consented: false }), settingsChangeErrorLineOf);
260
262
  io.line(` ${io.check()} Calls are off. Turn them back on: pushary calls on`);
261
263
  };
262
264
  var main = async () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pushary",
3
- "version": "1.9.183",
3
+ "version": "1.9.184",
4
4
  "description": "Human-in-the-loop (HITL) for AI agents: ask a person for approvals or answers by push notification. One command connects Claude Code, Codex, Cursor, Gemini CLI and more.",
5
5
  "keywords": [
6
6
  "pushary",