@extrovert.dev/sdk 0.1.0-pre.5 → 0.1.0-pre.6

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
@@ -30,7 +30,7 @@ for a stable release:
30
30
  npm install @extrovert.dev/sdk@next
31
31
  ```
32
32
 
33
- Pin `@extrovert.dev/sdk@0.1.0-pre.5` when a dogfood test needs a reproducible contract snapshot.
33
+ Pin `@extrovert.dev/sdk@0.1.0-pre.6` when a dogfood test needs a reproducible contract snapshot.
34
34
  Requires Node 18+ for global `fetch` and Web Crypto.
35
35
 
36
36
  ## Build and use from source
@@ -419,6 +419,7 @@ A key carries a subset of these capability scopes (`whoami().scopes`):
419
419
  | ----------------- | ---------------------------------------------------------------------- |
420
420
  | `mailbox:create` | Create inboxes. |
421
421
  | `mailbox:read` | Read inboxes, messages, threads. |
422
+ | `mailbox:credentials` | Export raw IMAP/SMTP credentials on paid plans; never implied by read. |
422
423
  | `mailbox:send` | Send / reply / forward. |
423
424
  | `mailbox:quota` | Change an inbox's effective daily recipient cap (opt-in). |
424
425
  | `mailbox:delete` | Delete inboxes. |
@@ -442,7 +443,7 @@ a wire protocol (there is no `/v1/contract` endpoint).
442
443
  ```ts
443
444
  import { CONTRACT_VERSION, CONTRACT_MANIFEST } from "@extrovert.dev/sdk";
444
445
 
445
- CONTRACT_VERSION; // "0.1.0-pre.5" — provisional, pre-1.0; pin it
446
+ CONTRACT_VERSION; // "0.1.0-pre.6" — provisional, pre-1.0; pin it
446
447
  CONTRACT_MANIFEST.stability; // "provisional"
447
448
  CONTRACT_MANIFEST.core_shapes; // ["ReviewIntent","ReviewFeedback","DiffJson","Rule","ReviewEvent"]
448
449
  ```
@@ -463,7 +464,7 @@ page and the agent skills (`extrovert-send-email`, `extrovert-writing-rules`).
463
464
  The Review-Loop shapes are an **open, documented contract — versioned *with* this SDK** (not a wire
464
465
  protocol; there is no `/v1/contract` endpoint). Three guarantees:
465
466
 
466
- - **One version, everywhere.** `CONTRACT_VERSION` is **`0.1.0-pre.5`**, reconciled across the SDK package
467
+ - **One version, everywhere.** `CONTRACT_VERSION` is **`0.1.0-pre.6`**, reconciled across the SDK package
467
468
  version, the MCP server, and the OpenAPI `info.version`. Pin it; pin `CONTRACT_MANIFEST` for the
468
469
  exact shape set you built against.
469
470
  - **Named, documented types.** The five canonical shapes — `ReviewIntent`, `ReviewFeedback`,
@@ -494,7 +495,7 @@ EXTROVERT_API_BASE_URL=mock npx tsx examples/wait-for-otp.ts
494
495
 
495
496
  ## Status
496
497
 
497
- > **Note.** This source SDK tracks the `/v1` contract at `CONTRACT_VERSION` `0.1.0-pre.5` — a
498
+ > **Note.** This source SDK tracks the `/v1` contract at `CONTRACT_VERSION` `0.1.0-pre.6` — a
498
499
  > deliberate **prerelease**, pre-1.0, expect additive change. The offline `mock` transport models the
499
500
  > live server closely enough to reproduce a 422 `intent_required` and a queued review, so build and
500
501
  > test against it before you have a key. Install from the `next` tag until a stable release is cut.
package/dist/index.cjs CHANGED
@@ -268,7 +268,7 @@ var CURRENT_API_VERSION = "2026-06-23";
268
268
  var API_VERSION_HEADER = "Extrovert-Version";
269
269
 
270
270
  // src/http.ts
271
- var SDK_VERSION = "0.1.0-pre.5";
271
+ var SDK_VERSION = "0.1.0-pre.6";
272
272
  function buildUrl(baseUrl, path, query) {
273
273
  const base = baseUrl.endsWith("/") ? baseUrl.slice(0, -1) : baseUrl;
274
274
  const rel = path.startsWith("/") ? path : `/${path}`;
@@ -959,7 +959,7 @@ var MockBackend = class {
959
959
  agent_id: agentId,
960
960
  agent_key: `pk_agent_${agentId.slice(4)}_${rid("sk").slice(3)}`,
961
961
  key_prefix: `pk_agent_${agentId.slice(4, 8)}`,
962
- scopes: ["mailbox:read"],
962
+ scopes: ["signup:verify"],
963
963
  address,
964
964
  verified: false,
965
965
  otp_sent_to: email,
@@ -1990,7 +1990,15 @@ var MockBackend = class {
1990
1990
  category = active.filter((r) => r.scope === "category" && r.category_id === params.category_id).sort(byRank);
1991
1991
  }
1992
1992
  const items = [...category, ...general];
1993
- return { items, total: items.length };
1993
+ return {
1994
+ items,
1995
+ total: items.length,
1996
+ house_style_version: 1,
1997
+ category_rules_version: params.category_id ? 1 : 0,
1998
+ rule_high_water: params.category_id ? 1 : 0,
1999
+ composition_token: params.scope ? void 0 : `cmp_fixture_${params.category_id ?? "general"}`,
2000
+ composition_token_expires_at: params.scope ? void 0 : new Date(Date.now() + 6e5).toISOString()
2001
+ };
1994
2002
  }
1995
2003
  /** Save / edit a rule (mock) — append-only by supersession (D11). */
1996
2004
  saveRule(req) {
@@ -3598,7 +3606,13 @@ var HttpTransport = class {
3598
3606
  });
3599
3607
  }
3600
3608
  saveRule(req, signal) {
3601
- return this.call({ method: "PUT", path: "/v1/rules", body: req, signal });
3609
+ return this.call({
3610
+ method: "PUT",
3611
+ path: "/v1/rules",
3612
+ body: withoutIdempotencyKey(req),
3613
+ idempotencyKey: req.idempotency_key,
3614
+ signal
3615
+ });
3602
3616
  }
3603
3617
  promoteRule(ruleId, toScope, signal) {
3604
3618
  return this.call({
@@ -4995,6 +5009,8 @@ var ExtrovertClient = class _ExtrovertClient {
4995
5009
  * + a first inbox and returns a LIMITED-scope (read-only) agent key; a one-time
4996
5010
  * code is emailed to `human_email`. Call {@link verify} with the code to unlock
4997
5011
  * full scopes. Idempotent on `human_email`: re-calling rotates the key + resends.
5012
+ * When free signup is paused, this throws an `ApiError` with status 403 and
5013
+ * code `signup_disabled` without creating account state.
4998
5014
  */
4999
5015
  signUp(req, signal) {
5000
5016
  return this.transport.signUp(req, signal);
@@ -5004,6 +5020,8 @@ var ExtrovertClient = class _ExtrovertClient {
5004
5020
  * once). Must be called with the limited key from {@link signUp} as the bearer.
5005
5021
  * The result repeats the ready inbox address and includes MCP-first list/read/wait
5006
5022
  * calls; SDK callers can pass `address` directly to `inboxes` and `messages`.
5023
+ * Pending verification is also fail-closed with 403 `signup_disabled` while
5024
+ * free signup is paused.
5007
5025
  */
5008
5026
  verify(req, signal) {
5009
5027
  return this.transport.verify(req, signal);
@@ -5171,7 +5189,7 @@ async function signWebhook(secret, body, timestampSeconds) {
5171
5189
  }
5172
5190
 
5173
5191
  // src/contract.ts
5174
- var CONTRACT_VERSION = "0.1.0-pre.5";
5192
+ var CONTRACT_VERSION = "0.1.0-pre.6";
5175
5193
  var CONTRACT_MANIFEST = {
5176
5194
  name: "extrovert.review-loop",
5177
5195
  version: CONTRACT_VERSION,