@pingroom/sdk 0.3.1 → 0.4.1

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
@@ -2,12 +2,17 @@
2
2
 
3
3
  Official TypeScript/JavaScript SDK for the [PingRoom](https://pingroom.io) agent API — the push-native notification fabric for agents.
4
4
 
5
- One typed client for everything an agent does: authenticate, create and join rooms, send pings, message other agents by handle, ask a human to approve something — or answer a multi-option question — and block until they tap, listen for inbound pings in real time, drive the MCP endpoint, and verify outgoing-webhook signatures.
5
+ One typed client for everything an agent does: authenticate, create and join rooms, send pings, ask a human to approve something — or answer a multi-option question — and block until they tap, listen for inbound pings in real time, drive the MCP endpoint, and verify outgoing-webhook signatures.
6
6
 
7
7
  - **Zero runtime dependencies** — built on the platform `fetch`. Works in Node ≥ 20, browsers, Cloudflare Workers, Deno, and Bun.
8
8
  - **Fully typed** — ships `.d.ts`; request fields mirror the HTTP API verbatim.
9
9
  - **Secure by default** — refuses to send credentials over plain http, never logs or serializes the token, and verifies webhook signatures in constant time.
10
10
 
11
+ > **Release status:** npm currently serves 0.4.0. The corrected attachment
12
+ > limits are in the tested 0.4.1 release candidate on `main` and
13
+ > must not be presented as installed behavior until 0.4.1 is published and
14
+ > clean-install verified.
15
+
11
16
  ```bash
12
17
  npm install @pingroom/sdk
13
18
  ```
@@ -27,10 +32,15 @@ await pr.broadcast('ab12cd', {
27
32
  ack_timeout_seconds: 300,
28
33
  });
29
34
 
30
- // Ping another agent by handle
31
- await pr.agents.ping('agt_reviewer', { message: 'PR #42 ready', correlation_id: 'pr-42' });
35
+ // Listen for what comes back
36
+ const { notifications, cursor } = await pr.notifications.wait({ timeout: 20 });
32
37
  ```
33
38
 
39
+ > **`pr.agents.ping()` is retired.** Handle-addressed pings across accounts
40
+ > always fail with `410 cross_account_ping_retired`. An agent reaches only the
41
+ > account that connected it — to reach another agent or person, share a room
42
+ > (invite them, or join one they post in) and `pr.broadcast()` into it.
43
+
34
44
  ### Link pings
35
45
 
36
46
  A ping becomes a tappable link button when its `data` carries the reserved
@@ -50,7 +60,31 @@ await pr.broadcast('ab12cd', {
50
60
 
51
61
  ## Authentication
52
62
 
53
- Bring an existing agent token, or run the auth.md flow:
63
+ For local tools, pair through the PingRoom app. No copied token or room code:
64
+
65
+ ```ts
66
+ const pr = new PingRoom();
67
+
68
+ const pairing = await pr.auth.startPairing({
69
+ agent_label: 'Deploy bot',
70
+ scopes: ['pingroom:rooms:read', 'pingroom:broadcast:send', 'pingroom:handoffs:create'],
71
+ });
72
+
73
+ console.log(`Open in PingRoom: ${pairing.pair_url}`);
74
+ const active = await pr.auth.waitForPairing(pairing);
75
+
76
+ // The approver chose this room, and the client now uses the active credential.
77
+ await pr.broadcast(active.room.invite_code, { message: 'SDK connected ✅' });
78
+ ```
79
+
80
+ `waitForPairing()` tolerates short network outages and stops when the app link
81
+ expires. Pass an `AbortSignal` when your process needs its own cancellation.
82
+ If `scopes` is omitted, pairing requests room lookup, broadcast access, and
83
+ `pingroom:handoffs:create` for private Handoffs and Agent Inbox activation. The
84
+ approval screen shows every grant before the user connects.
85
+
86
+ If you already manage credentials, bring an existing agent token or run the
87
+ lower-level auth.md email flow:
54
88
 
55
89
  ```ts
56
90
  const pr = new PingRoom();
@@ -84,6 +118,41 @@ await pr.actions.update('ab12cd', 1, { label: 'Approve', icon: 'check' });
84
118
  await pr.actions.trigger('ab12cd', 1);
85
119
  ```
86
120
 
121
+ ## Attachments
122
+
123
+ Send the file itself, not a link to it. Upload first, then pass the ids to any
124
+ send. Bytes never travel over MCP or a JSON ping body, and the returned metadata
125
+ never carries a permanent URL — recipients read the content back through an
126
+ authenticated endpoint.
127
+
128
+ ```ts
129
+ const report = await pr.attachments.upload({
130
+ content: await readFile('report.pdf'),
131
+ filename: 'report.pdf',
132
+ });
133
+
134
+ await pr.broadcast('ab12cd', {
135
+ message: 'Nightly report',
136
+ attachment_ids: [report.id],
137
+ });
138
+
139
+ // Read one back (raw Response — stream it, or .arrayBuffer() / .text() it)
140
+ const res = await pr.attachments.content(report.id);
141
+ ```
142
+
143
+ `content` accepts a `Blob`/`File`, a `Uint8Array`, or a UTF-8 string. Accepted
144
+ types are `md`, `pdf`, `html`, `txt`, `jpg`, `jpeg`, `png`, from 1 byte through
145
+ 5 MiB each. A Ping or Question accepts at most 4; `questions.ask()` takes
146
+ `attachment_ids` too.
147
+
148
+ Ids are single-use: the send claims them, and a claimed or expired id fails the
149
+ whole send. An upload you never attach expires by itself after 24 hours, or you
150
+ can `pr.attachments.delete(id)` it.
151
+
152
+ Uploading needs the `pingroom:attachments:write` scope **and** a Pro account —
153
+ otherwise the API answers `402 pro_required`. Reading and deleting are not gated,
154
+ so a lapsed subscription never locks you out of files you already sent.
155
+
87
156
  ## Listening for pings (real time)
88
157
 
89
158
  `listen()` is an async iterator that long-polls and advances the cursor for you — no poll-spam, no missed or duplicated pings. Stop it with an `AbortSignal`.
@@ -190,14 +259,54 @@ A **handoff** is the direct, private version of the human-in-the-loop: it always
190
259
 
191
260
  Requires the `pingroom:handoffs:create` scope.
192
261
 
193
- On first connect, activate the human's private Agent Inbox. This is idempotent:
194
- it creates at most one inbox and one onboarding test Question.
262
+ On first connect, explicitly activate the human's Agent Inbox. `activate()`
263
+ replays the viable test Question or creates its next numbered retry in the
264
+ designated delivery room, then waits for its terminal answer. It is deliberately
265
+ separate from `auth.waitForPairing()`: pairing adopts the approved credential
266
+ immediately and never silently blocks on the onboarding Question.
195
267
 
196
268
  ```ts
197
- const onboarding = await pr.inbox.ensure();
198
- console.log(onboarding.room.invite_code, onboarding.question.state);
269
+ import { PingRoomActivationIncompleteError } from '@pingroom/sdk';
270
+
271
+ const controller = new AbortController();
272
+ try {
273
+ const activation = await pr.inbox.activate({
274
+ timeout: 20, // seconds per bounded server hold
275
+ overallTimeoutMs: 120_000, // ensure + all holds; this is the default
276
+ signal: controller.signal, // caller cancellation
277
+ });
278
+ // On supporting builds this proves native phone receipt before the answer,
279
+ // plus this agent observation—not just `question.state === 'answered'`.
280
+ console.log(activation.activation_completed); // true
281
+ console.log(`Agent Inbox ready: ${activation.question.answer.value}`);
282
+ } catch (error) {
283
+ if (error instanceof PingRoomActivationIncompleteError) {
284
+ console.log(`Activation incomplete: ${error.reason}`);
285
+ }
286
+ throw error;
287
+ }
199
288
  ```
200
289
 
290
+ Pending long-poll responses are observed internally and polled again. The
291
+ `timeout` option controls each bounded `GET /handoffs/{id}/wait` hold;
292
+ `overallTimeoutMs` limits the whole ensure-and-wait composition and defaults to
293
+ two minutes. Immediate observations are spaced by at least 2.1 seconds, keeping
294
+ the loop below the wait route's 30-request-per-minute limit.
295
+
296
+ A plain answer does not prove activation: `activate()` returns only when the
297
+ wait response carries `activation_completed: true`. An answered response with a
298
+ false or missing completion stamp is terminal and incomplete because a later
299
+ callback cannot rewrite the required receipt-before-answer sequence. It throws
300
+ `PingRoomActivationIncompleteError` immediately with reason
301
+ `answered_without_completion`. Expiry and cancellation throw the same domain
302
+ error with their corresponding reasons. Caller aborts reject with the signal's
303
+ reason. None of these paths revoke or change the client's active credential.
304
+ Network/API errors remain `PingRoomError`. Use
305
+ `pr.inbox.ensure()` directly when you only want to create or inspect the
306
+ onboarding Question without waiting. Call `activate()` again after an expired,
307
+ cancelled, or `answered_without_completion` result; the server replays a viable
308
+ attempt and creates one numbered retry for a terminal incomplete attempt.
309
+
201
310
  ```ts
202
311
  // Ask for an acknowledgement. Pass idempotencyKey so a retried create is a no-op.
203
312
  const task = await pr.handoffs.requestAck({
@@ -389,13 +498,19 @@ app.post('/pingroom', async (req, res) => {
389
498
 
390
499
  ## MCP
391
500
 
392
- Drive the MCP endpoint directly (tools are scope-filtered server-side):
501
+ Drive the MCP endpoint directly with a credential you already hold. The helper
502
+ performs the initialize handshake automatically, and tools are scope-filtered
503
+ server-side:
393
504
 
394
505
  ```ts
395
506
  const { tools } = await pr.mcp.listTools();
396
- const result = await pr.mcp.callTool('broadcast', { room: 'ab12cd', message: 'hi' });
507
+ const result = await pr.mcp.callTool('broadcast', { invite_code: 'ab12cd', message: 'hi' });
397
508
  ```
398
509
 
510
+ `pr.mcp` is a PingRoom-specific JSON-RPC convenience client, not a general MCP
511
+ host. Cursor, Claude, and other MCP hosts should connect to the hosted endpoint
512
+ directly and use OAuth instead: <https://pingroom.io/connect-mcp.md>.
513
+
399
514
  ## Agent directory (public)
400
515
 
401
516
  No token required:
@@ -414,9 +529,9 @@ Every failure rejects with a `PingRoomError` carrying the HTTP `status` and the
414
529
  import { PingRoomError } from '@pingroom/sdk';
415
530
 
416
531
  try {
417
- await pr.agents.ping('agt_x', { message: 'hi' });
532
+ await pr.broadcast('ab12cd', { message: 'hi' });
418
533
  } catch (err) {
419
- if (err instanceof PingRoomError && err.code === 'cooldown') {
534
+ if (err instanceof PingRoomError && err.code === 'rate_limited') {
420
535
  await new Promise((r) => setTimeout(r, (err.retryAfter ?? 1) * 1000));
421
536
  }
422
537
  }
package/dist/client.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { HttpClient } from './http.js';
2
2
  import type { LiveStatusPing, LiveStatusResult, LiveStatusSnapshot } from './liveStatus.js';
3
3
  import { McpClient } from './mcp.js';
4
- import type { AcknowledgementWaitResult, AgentInboxEnsureResult, AgentNotification, Approval, ApprovalInput, CreatePublicRoomInput, CreateRoomInput, Credential, ClaimCompleteParams, ClaimStartParams, AskInput, DirectoryEntry, DirectoryListInput, DirectoryProfile, DirectPingResult, Handoff, ListHandoffsInput, JoinRoomInput, ListNotificationsInput, ListenInput, ListQuestionsInput, NotificationDetail, Paginated, PingInput, PingResult, PingRoomOptions, Question, QuestionInput, QuickAction, RegisterParams, Room, RequestAckInput, RotateHandleResult, TriggerInput, UpdateQuickActionInput, WaitApprovalInput, WaitHandoffInput, WaitForAcknowledgementInput, WaitInput, WaitQuestionInput, WaitResult } from './types.js';
4
+ import type { AcknowledgementWaitResult, Attachment, AgentInboxEnsureResult, AgentInboxActivateInput, AgentInboxActivationResult, AgentInboxEnsureInput, AgentNotification, Approval, ApprovalInput, CreatePublicRoomInput, CreateRoomInput, Credential, ClaimCompleteParams, ClaimStartParams, AskInput, DirectoryEntry, DirectoryListInput, DirectoryProfile, DirectPingResult, Handoff, ListHandoffsInput, JoinRoomInput, ListNotificationsInput, ListenInput, ListQuestionsInput, NotificationDetail, Paginated, PingInput, PingResult, PingRoomOptions, Question, QuestionInput, QuickAction, RegisterParams, PairingStart, PairingStatus, PairedCredential, Room, RequestAckInput, RotateHandleResult, StartPairingParams, TriggerInput, UpdateQuickActionInput, UploadAttachmentInput, WaitApprovalInput, WaitHandoffInput, WaitForAcknowledgementInput, WaitInput, WaitQuestionInput, WaitResult, WaitForPairingOptions } from './types.js';
5
5
  /** Agent credential lifecycle (auth.md flow). */
6
6
  declare class AuthApi {
7
7
  private readonly http;
@@ -15,6 +15,23 @@ declare class AuthApi {
15
15
  }>;
16
16
  /** Complete the claim with the emailed OTP; returns an active credential + handle. */
17
17
  claimComplete(params: ClaimCompleteParams): Promise<Credential>;
18
+ /**
19
+ * Register a pending agent and create a short-lived link that opens the
20
+ * PingRoom app. The person approving it chooses the delivery room and sees
21
+ * the exact requested scopes. The pending credential stays private inside
22
+ * this client and is replaced automatically once waitForPairing() succeeds.
23
+ */
24
+ startPairing(params?: StartPairingParams): Promise<PairingStart>;
25
+ /** Read the current state of an app pairing using the pending credential. */
26
+ pairingStatus(options?: Pick<WaitForPairingOptions, 'signal'>): Promise<PairingStatus>;
27
+ /**
28
+ * Wait until the person approves in PingRoom, or the short-lived link
29
+ * expires. Transient network, 429, and 5xx failures are retried inside the
30
+ * server-provided lifetime. On success the client immediately starts using
31
+ * the active credential returned by the server.
32
+ */
33
+ waitForPairing(pairing: PairingStart, options?: WaitForPairingOptions): Promise<PairedCredential>;
34
+ private throwIfPairingAborted;
18
35
  /** Rotate to a fresh credential (same scopes/handle). */
19
36
  refresh(): Promise<Credential>;
20
37
  /** Revoke the current credential. */
@@ -145,12 +162,19 @@ declare class HandoffsApi {
145
162
  private wait;
146
163
  private create;
147
164
  }
148
- /** One-call activation of the bound human's private Agent Inbox. */
165
+ /** Setup and activation of the bound human's Agent Inbox delivery room. */
149
166
  declare class InboxApi {
150
167
  private readonly http;
151
168
  constructor(http: HttpClient);
152
- /** Idempotently create/resolve the inbox and deliver its one-time test Question. */
153
- ensure(): Promise<AgentInboxEnsureResult>;
169
+ /** Replay the viable activation attempt or create its next numbered retry. */
170
+ ensure(input?: AgentInboxEnsureInput): Promise<AgentInboxEnsureResult>;
171
+ /**
172
+ * Ensure the bound human's Agent Inbox, then block on its onboarding
173
+ * Question until the server confirms activation, it expires/cancels, or the
174
+ * overall deadline elapses. Pairing remains a separate operation so adopting
175
+ * a credential never silently waits for a phone response.
176
+ */
177
+ activate(input?: AgentInboxActivateInput): Promise<AgentInboxActivationResult>;
154
178
  }
155
179
  declare class ProfileApi {
156
180
  private readonly http;
@@ -182,6 +206,31 @@ declare class LiveApi {
182
206
  */
183
207
  get(inviteCode: string, correlationId: string): Promise<LiveStatusSnapshot | null>;
184
208
  }
209
+ /**
210
+ * Private files that a Ping or Question can carry.
211
+ *
212
+ * Upload first, then pass the returned ids to `broadcast()` / `questions.ask()`
213
+ * as `attachment_ids`. Bytes never travel over MCP or a JSON ping body. An
214
+ * upload that is never attached expires on its own after 24 hours.
215
+ * Each file must be 1 byte–5 MiB with an md/pdf/html/txt/jpg/jpeg/png filename;
216
+ * a Ping or Question accepts at most four ids.
217
+ *
218
+ * Uploading requires the bound account to hold Pro (the API answers 402
219
+ * `pro_required` otherwise). Reading and deleting are not gated.
220
+ */
221
+ declare class AttachmentsApi {
222
+ private readonly http;
223
+ constructor(http: HttpClient);
224
+ /** Upload one file and get back the id a send can claim. */
225
+ upload(input: UploadAttachmentInput): Promise<Attachment>;
226
+ /**
227
+ * Raw bytes for an attachment this credential is allowed to see. Returns the
228
+ * undecoded Response so a caller can stream it, or read text/arrayBuffer.
229
+ */
230
+ content(attachmentId: string, signal?: AbortSignal): Promise<Response>;
231
+ /** Discard an upload that has not been attached to a ping yet. */
232
+ delete(attachmentId: string): Promise<void>;
233
+ }
185
234
  /** Public, unauthenticated agent directory. */
186
235
  declare class DirectoryApi {
187
236
  private readonly http;
@@ -194,6 +243,7 @@ export declare class PingRoom {
194
243
  readonly rooms: RoomsApi;
195
244
  readonly actions: ActionsApi;
196
245
  readonly notifications: NotificationsApi;
246
+ readonly attachments: AttachmentsApi;
197
247
  readonly agents: AgentsApi;
198
248
  readonly approvals: ApprovalsApi;
199
249
  readonly questions: QuestionsApi;
@@ -1 +1 @@
1
- {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAGvC,OAAO,KAAK,EAAE,cAAc,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAC5F,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AACrC,OAAO,KAAK,EACV,yBAAyB,EACzB,sBAAsB,EACtB,iBAAiB,EACjB,QAAQ,EACR,aAAa,EACb,qBAAqB,EACrB,eAAe,EACf,UAAU,EACV,mBAAmB,EACnB,gBAAgB,EAChB,QAAQ,EACR,cAAc,EACd,kBAAkB,EAClB,gBAAgB,EAChB,gBAAgB,EAChB,OAAO,EAGP,iBAAiB,EACjB,aAAa,EACb,sBAAsB,EACtB,WAAW,EACX,kBAAkB,EAClB,kBAAkB,EAClB,SAAS,EACT,SAAS,EACT,UAAU,EACV,eAAe,EACf,QAAQ,EACR,aAAa,EACb,WAAW,EACX,cAAc,EACd,IAAI,EACJ,eAAe,EACf,kBAAkB,EAClB,YAAY,EACZ,sBAAsB,EACtB,iBAAiB,EACjB,gBAAgB,EAChB,2BAA2B,EAC3B,SAAS,EACT,iBAAiB,EACjB,UAAU,EACX,MAAM,YAAY,CAAC;AAsCpB,iDAAiD;AACjD,cAAM,OAAO;IACC,OAAO,CAAC,QAAQ,CAAC,IAAI;gBAAJ,IAAI,EA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