@extrovert.dev/sdk 0.1.0-pre.3 → 0.1.0-pre.5
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 +4 -4
- package/dist/index.cjs +25 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +35 -10
- package/dist/index.d.ts +35 -10
- package/dist/index.js +25 -4
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
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.
|
|
33
|
+
Pin `@extrovert.dev/sdk@0.1.0-pre.5` 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
|
|
@@ -442,7 +442,7 @@ a wire protocol (there is no `/v1/contract` endpoint).
|
|
|
442
442
|
```ts
|
|
443
443
|
import { CONTRACT_VERSION, CONTRACT_MANIFEST } from "@extrovert.dev/sdk";
|
|
444
444
|
|
|
445
|
-
CONTRACT_VERSION; // "0.1.0-pre.
|
|
445
|
+
CONTRACT_VERSION; // "0.1.0-pre.5" — provisional, pre-1.0; pin it
|
|
446
446
|
CONTRACT_MANIFEST.stability; // "provisional"
|
|
447
447
|
CONTRACT_MANIFEST.core_shapes; // ["ReviewIntent","ReviewFeedback","DiffJson","Rule","ReviewEvent"]
|
|
448
448
|
```
|
|
@@ -463,7 +463,7 @@ page and the agent skills (`extrovert-send-email`, `extrovert-writing-rules`).
|
|
|
463
463
|
The Review-Loop shapes are an **open, documented contract — versioned *with* this SDK** (not a wire
|
|
464
464
|
protocol; there is no `/v1/contract` endpoint). Three guarantees:
|
|
465
465
|
|
|
466
|
-
- **One version, everywhere.** `CONTRACT_VERSION` is **`0.1.0-pre.
|
|
466
|
+
- **One version, everywhere.** `CONTRACT_VERSION` is **`0.1.0-pre.5`**, reconciled across the SDK package
|
|
467
467
|
version, the MCP server, and the OpenAPI `info.version`. Pin it; pin `CONTRACT_MANIFEST` for the
|
|
468
468
|
exact shape set you built against.
|
|
469
469
|
- **Named, documented types.** The five canonical shapes — `ReviewIntent`, `ReviewFeedback`,
|
|
@@ -494,7 +494,7 @@ EXTROVERT_API_BASE_URL=mock npx tsx examples/wait-for-otp.ts
|
|
|
494
494
|
|
|
495
495
|
## Status
|
|
496
496
|
|
|
497
|
-
> **Note.** This source SDK tracks the `/v1` contract at `CONTRACT_VERSION` `0.1.0-pre.
|
|
497
|
+
> **Note.** This source SDK tracks the `/v1` contract at `CONTRACT_VERSION` `0.1.0-pre.5` — a
|
|
498
498
|
> deliberate **prerelease**, pre-1.0, expect additive change. The offline `mock` transport models the
|
|
499
499
|
> live server closely enough to reproduce a 422 `intent_required` and a queued review, so build and
|
|
500
500
|
> 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.
|
|
271
|
+
var SDK_VERSION = "0.1.0-pre.5";
|
|
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}`;
|
|
@@ -625,6 +625,23 @@ function decodeMockCursor(cursor) {
|
|
|
625
625
|
return 0;
|
|
626
626
|
}
|
|
627
627
|
}
|
|
628
|
+
function mailboxQuickstart(address) {
|
|
629
|
+
return {
|
|
630
|
+
inbox: address,
|
|
631
|
+
list_mail: {
|
|
632
|
+
tool: "read_messages",
|
|
633
|
+
arguments: { inbox: address, limit: 20, unread_only: false }
|
|
634
|
+
},
|
|
635
|
+
read_message: {
|
|
636
|
+
tool: "get_message",
|
|
637
|
+
arguments: { id: "<message_id from read_messages>", format: "text", variant: "extracted" }
|
|
638
|
+
},
|
|
639
|
+
wait_for_mail: {
|
|
640
|
+
tool: "wait_for_email",
|
|
641
|
+
arguments: { inbox: address, since_now: true }
|
|
642
|
+
}
|
|
643
|
+
};
|
|
644
|
+
}
|
|
628
645
|
var SHARED_SUBDOMAIN = "smtp.extrovert.dev";
|
|
629
646
|
var MOCK_ORG_ID = "org_mock";
|
|
630
647
|
var MOCK_PROJECT_ID = "prj_mock";
|
|
@@ -935,7 +952,7 @@ var MockBackend = class {
|
|
|
935
952
|
const customerId = existing?.customerId ?? `cus_pn_signup_${rid("c").slice(2)}`;
|
|
936
953
|
const agentId = existing?.agentId ?? rid("agt");
|
|
937
954
|
const address = existing?.address ?? `${req.username ?? randomHandle()}@smtp.extrovert.dev`;
|
|
938
|
-
const otp =
|
|
955
|
+
const otp = "492013";
|
|
939
956
|
this.state.signupByEmail.set(email, { customerId, agentId, address, otp, verified: false });
|
|
940
957
|
return {
|
|
941
958
|
customer_id: customerId,
|
|
@@ -960,8 +977,10 @@ var MockBackend = class {
|
|
|
960
977
|
agent_key: `pk_agent_${s.agentId.slice(4)}_${rid("sk").slice(3)}`,
|
|
961
978
|
key_prefix: `pk_agent_${s.agentId.slice(4, 8)}`,
|
|
962
979
|
scopes: ["mailbox:create", "mailbox:read", "mailbox:send"],
|
|
980
|
+
address: s.address,
|
|
963
981
|
verified: true,
|
|
964
|
-
message: "Verified.
|
|
982
|
+
message: "Verified. The inbox is ready; use read_messages, then get_message with a returned message id.",
|
|
983
|
+
mailbox_quickstart: mailboxQuickstart(s.address)
|
|
965
984
|
};
|
|
966
985
|
}
|
|
967
986
|
}
|
|
@@ -4983,6 +5002,8 @@ var ExtrovertClient = class _ExtrovertClient {
|
|
|
4983
5002
|
/**
|
|
4984
5003
|
* Confirm the emailed signup code and receive a NEW full-scope agent key (shown
|
|
4985
5004
|
* once). Must be called with the limited key from {@link signUp} as the bearer.
|
|
5005
|
+
* The result repeats the ready inbox address and includes MCP-first list/read/wait
|
|
5006
|
+
* calls; SDK callers can pass `address` directly to `inboxes` and `messages`.
|
|
4986
5007
|
*/
|
|
4987
5008
|
verify(req, signal) {
|
|
4988
5009
|
return this.transport.verify(req, signal);
|
|
@@ -5150,7 +5171,7 @@ async function signWebhook(secret, body, timestampSeconds) {
|
|
|
5150
5171
|
}
|
|
5151
5172
|
|
|
5152
5173
|
// src/contract.ts
|
|
5153
|
-
var CONTRACT_VERSION = "0.1.0-pre.
|
|
5174
|
+
var CONTRACT_VERSION = "0.1.0-pre.5";
|
|
5154
5175
|
var CONTRACT_MANIFEST = {
|
|
5155
5176
|
name: "extrovert.review-loop",
|
|
5156
5177
|
version: CONTRACT_VERSION,
|