pidge-cli 0.10.0 → 0.11.0

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/README.md CHANGED
@@ -33,6 +33,12 @@ then gets the answer as JSON — no webhook, no polling loop to write.
33
33
  > stdout now carries only the `operating_contract`, so the key never lands in an agent's
34
34
  > transcript/logs.
35
35
  >
36
+ > **v0.11.0** (Pidge manifest v30): the **first-contact WOW** (#217). New **`pidge hello`** —
37
+ > your channel's debut handshake, narrated LIVE on the lock screen by a server-driven 3-stage
38
+ > Live Activity (Conectando → toque para confirmar → Concluído ✓) so your human *sees* the
39
+ > agent→human→agent loop close. Send + wait in one; run it as your first contact on a fresh
40
+ > channel. (It's a thin `ask --template onboarding` wrapper — that path already works on v0.10.0.)
41
+ >
36
42
  > **v0.10.0** (Pidge manifest v29): the onboarding-close batch. **`pidge selftest`** proves
37
43
  > your listener works by ROUND-TRIP (#205) — fire a nonce, run the listener, confirm it
38
44
  > picks it up + acks in time (PASS exit 0 / FAIL exit 2 with the likely cause). `listen_mode`
@@ -121,6 +127,7 @@ npx pidge-cli notify --title "Relatório" --file ./relatorio.xlsx
121
127
 
122
128
  | Command | What it does |
123
129
  |---|---|
130
+ | `hello` | **v0.11.0 (#217):** your channel's **first-contact WOW** — send the onboarding handshake **and block** until the human confirms. The server narrates a 3-stage Live Activity on the lock screen (Conectando → toque para confirmar → Concluído ✓) so they *see* the agent→human→agent loop close. Run it as your **first** contact on a fresh channel. A thin `ask --template onboarding` wrapper with friendly default copy. |
124
131
  | `ask` | Send a notification **and block** until the human answers; prints the chosen action JSON. The default for agents. |
125
132
  | `notify` | Send only. Prints the raw 201 JSON; the `correlation_id` + warnings go to stderr. |
126
133
  | `wait <correlation_id>` | Block on an already-sent notification until it's answered. |
package/bin/pidge.js CHANGED
@@ -157,6 +157,10 @@ USAGE
157
157
  pidge doctor validate the setup WITHOUT exposing secrets:
158
158
  env source, server, key, "canal X · N devices"
159
159
  pidge whoami which channel does this key speak for (JSON)
160
+ pidge hello [options] FIRST-CONTACT WOW (#217): your channel's debut handshake,
161
+ narrated LIVE on the lock screen by a 3-stage Live Activity
162
+ (Conectando → toque para confirmar → Concluído ✓). send + wait
163
+ in one — run it as your FIRST contact on a fresh channel.
160
164
  pidge ask [options] send AND wait for the answer (prints chosen_action JSON)
161
165
  pidge notify [options] send only (prints the 201 JSON)
162
166
  pidge wait <correlation_id> [options] block on an already-sent notification
@@ -298,7 +302,7 @@ function fetchT(url, opts = {}, timeoutMs = 30000) {
298
302
  // The server advertises its manifest version on every response. When it's newer
299
303
  // than what this CLI shipped knowing, nudge ONCE on stderr — the agent re-reads
300
304
  // the manifest (whats_new) and learns the new capabilities without polling.
301
- const KNOWN_MANIFEST_VERSION = 28;
305
+ const KNOWN_MANIFEST_VERSION = 30;
302
306
  let newsWarned = false;
303
307
  function checkManifestNews(res) {
304
308
  const v = parseInt(res.headers.get('x-pidge-manifest-version') || '0', 10);
@@ -1273,6 +1277,31 @@ ${notes.map((n) => `- ${n}`).join('\n')}
1273
1277
  process.exit(ok ? 0 : 2);
1274
1278
  break;
1275
1279
  }
1280
+ case 'hello': {
1281
+ // #217 — the first-contact WOW: fire the onboarding handshake and block on
1282
+ // your human's confirmation. The SERVER narrates a 3-stage Live Activity on
1283
+ // the lock screen (Conectando → toque para confirmar → Concluído ✓) so your
1284
+ // human SEES the agent→human→agent loop close. One command: send + wait.
1285
+ // Run it as your FIRST contact on a fresh channel. A thin wrapper over `ask`:
1286
+ // it just pins template=onboarding and friendly default copy.
1287
+ if (v.profile === 'tracking')
1288
+ die('pidge: `hello --profile tracking` makes no sense — the handshake waits for a confirmation, which tracking (Live-Activity-only) never produces', 1);
1289
+ v.template = 'onboarding';
1290
+ if (v.title === undefined) v.title = 'Seu agente está pronto 🐦';
1291
+ if (v.body === undefined) v.body = 'Toque em Feito ✓ para confirmar que me recebeu — você vai ver o teste fechar na tela.';
1292
+ const cid = v['correlation-id'] || crypto.randomUUID();
1293
+ v['correlation-id'] = cid;
1294
+ console.error(`pidge: correlation_id=${cid}`);
1295
+ const { ok, info } = await doNotify();
1296
+ if (!ok) process.exit(2);
1297
+ console.error(`pidge: WOW sent (${info.registered_devices} device(s)) — watch the lock screen narrate the handshake; waiting for your human to confirm on ${cid}`);
1298
+ // No --timeout ⇒ obey the template's suggestion from the 201 echo (onboarding
1299
+ // = 3600 s); explicit --timeout always wins.
1300
+ let timeout = num(v.timeout, NaN);
1301
+ if (!Number.isFinite(timeout)) timeout = info.suggested_ask_timeout || 3600;
1302
+ await waitForAnswer(cid, { timeout, interval: num(v.interval, 30) });
1303
+ break;
1304
+ }
1276
1305
  case 'ask': {
1277
1306
  // Send, then block on the answer in one shot. stdout = ONLY chosen_action JSON.
1278
1307
  // tracking is Live-Activity-only: it NEVER produces a chosen_action, so an ask
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pidge-cli",
3
- "version": "0.10.0",
3
+ "version": "0.11.0",
4
4
  "description": "Send rich, actionable iPhone notifications to a human and block until they answer. Built for AI agents.",
5
5
  "keywords": [
6
6
  "pidge",