@truealter/sdk 0.5.1 → 0.5.8

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
@@ -1,18 +1,18 @@
1
1
  # @truealter/sdk
2
2
 
3
- ALTER Identity SDK - query the continuous identity field from any JavaScript/TypeScript environment.
3
+ ~Alter Identity SDK - query the continuous identity field from any JavaScript/TypeScript environment.
4
4
 
5
5
  [![npm version](https://img.shields.io/npm/v/@truealter/sdk.svg)](https://www.npmjs.com/package/@truealter/sdk)
6
6
  [![License: Apache-2.0](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](./LICENSE)
7
7
  [![Glama score](https://glama.ai/mcp/servers/true-alter/alter-identity/badges/score.svg)](https://glama.ai/mcp/servers/true-alter/alter-identity)
8
8
  [![AI Agent Marketplace](https://www.deepnlp.org/api/ai_agent_marketplace/svg?name=truealter/alter-identity)](https://www.deepnlp.org/store/ai-agent/identity/pub-truealter/alter-identity)
9
9
 
10
- A thin client over the ALTER MCP server (Streamable HTTP, JSON-RPC 2.0, MCP spec `2025-11-25`) with x402 micropayment support, ES256 provenance verification, and config generators for Claude Code, Cursor, and generic MCP clients.
10
+ A thin client over the ~Alter MCP server (Streamable HTTP, JSON-RPC 2.0, MCP spec `2025-11-25`) with x402 micropayment support, ES256 provenance verification, and config generators for Claude Code, Cursor, and generic MCP clients.
11
11
 
12
12
  - **Branded host:** `https://mcp.truealter.com` (serves `.well-known/mcp.json` for discovery)
13
13
  - **JSON-RPC wire endpoint:** `https://mcp.truealter.com/api/v1/mcp` - this is what Streamable HTTP POSTs target (the SDK default)
14
14
  - **Wire protocol:** Streamable HTTP, JSON-RPC 2.0, MCP `2025-11-25` (server negotiates `2025-06-18` + `2025-03-26` for backwards-compatible clients)
15
- - **Tools:** **40 typed and wired** - 24 free (L0) + 9 premium (L1L5) + 7 alter-to-alter messaging. Mirrors the live server's `tools/list` response byte-for-byte; every name in `FREE_TOOL_NAMES` / `PREMIUM_TOOL_NAMES` / `MESSAGING_TOOL_NAMES` has a matching server handler at `mcp.truealter.com/api/v1/mcp`.
15
+ - **Tools:** **36 publicly advertised**, 27 free (L0) + 9 premium (L1-L5), kept in sync with ~Alter's live MCP server at every publish.
16
16
  - **Runtime:** Node 18+, Deno, Bun, Cloudflare Workers, modern browsers
17
17
  - **Crypto:** `@noble/ed25519` + `@noble/hashes` (no other dependencies)
18
18
  - **Bundle:** ESM + CJS dual output
@@ -21,48 +21,46 @@ A thin client over the ALTER MCP server (Streamable HTTP, JSON-RPC 2.0, MCP spec
21
21
 
22
22
  ```
23
23
  npm install @truealter/sdk
24
- npx alter-identity init
25
- npx alter-identity verify ~alter
26
24
  ```
27
25
 
28
- ## Bridge vs SDK
26
+ Then import the client in your code (see the API section below). The
27
+ day-to-day command line lives in
28
+ [`@truealter/cli`](https://www.npmjs.com/package/@truealter/cli):
29
29
 
30
- The `alter-mcp-bridge` binary shipped in this package (`bin/mcp-bridge.ts`)
31
- is a **dev/demo surface** for dropping ALTER into MCP hosts that speak the
32
- stdio transport (Claude Code, Cursor, Continue, Windsurf). It is useful for
33
- handshake, `tools/list`, and L0 tool calls, but it does not carry ES256
34
- per-invocation signing - authenticated MCP tools will fail at the server
35
- edge when reached through the bridge. For production use, import
36
- `@truealter/sdk` directly and construct an `MCPClient` / `AlterClient` with
37
- the optional `signing` parameter; that path is the load-bearing one and
38
- carries the provenance envelope end-to-end. Bridge signing lands in Wave-2
39
- alongside the CLI wallet/consent verbs.
30
+ ```
31
+ alter init
32
+ alter verify ~alter
33
+ ```
40
34
 
41
- ## CLI
35
+ ## Bridge vs SDK
42
36
 
43
- The package ships two binaries. `alter-identity` is the full SDK-feature
44
- binary (`init`, `verify`, `whoami`, wire/unwire, signing, etc). `alter`
45
- is a slim, task-oriented binary for day-to-day use:
37
+ This package ships a stdio bridge entrypoint (`bin/mcp-bridge.ts`,
38
+ built to `dist/bin/mcp-bridge.js`) that the `alter` CLI launches by file
39
+ path via its `mcp-bridge` subcommand. It is a **dev/demo surface** for
40
+ dropping ~Alter into MCP hosts that speak the stdio transport (Claude Code,
41
+ Cursor, Continue, Windsurf). It is useful for handshake, `tools/list`, and
42
+ L0 tool calls, but it does not carry ES256 per-invocation signing:
43
+ authenticated MCP tools will fail at the server edge when reached through
44
+ the bridge. For production use, import `@truealter/sdk` directly and
45
+ construct an `MCPClient` / `AlterClient` with the optional `signing`
46
+ parameter; that path is the primary one and carries the provenance
47
+ envelope end-to-end. Bridge signing is planned for a future release.
46
48
 
47
- | Command | Purpose |
48
- |---|---|
49
- | `alter login` | OAuth loopback sign-in; stores a session at `~/.config/alter/session.json` (mode `0600`). |
50
- | `alter depth [--json]` | GET `/api/v1/identity/depth` - identity-depth score, agentic activity, top/bottom five traits. |
51
- | `alter claim <claim_code>` | Accept an identity invite. Prompts for email, password (min 12 chars, hidden), and explicit TOS acceptance, then POSTs `/api/v1/identity/claim`. |
52
- | `alter mirror` | Day-2 Mirror phase + streak. `alter mirror daily` claims today's Mirror; `alter mirror next` shows the next revelation window. |
53
- | `alter discover [--limit N]` | MCP-backed summary - calls `alter_whoami` and `alter_verify` against your bound handle. Degrades gracefully if the MCP endpoint is 5xx. |
49
+ ## CLI
54
50
 
55
- The session file is created with `0600` permissions; its parent dir
56
- (`~/.config/alter/`) is created with `0700`. Override the config root
57
- via `XDG_CONFIG_HOME`. Run `alter --help` for the inline reference.
51
+ This package exposes no command-line binary of its own: it is a library you
52
+ import. The bridge entrypoint above is not a published `bin`; it is resolved
53
+ by file path from the `alter` CLI, which is distributed separately as
54
+ [`@truealter/cli`](https://www.npmjs.com/package/@truealter/cli). Run
55
+ `alter --help` for the inline reference.
58
56
 
59
- ## Why ALTER IAM
57
+ ## Why ~Alter is not IAM
60
58
 
61
- Identity Access Management answers *who is logged in*. ALTER answers *who they actually are* - a continuous field of recognition that any IAM stack can sit on top of.
59
+ Identity Access Management answers *who is logged in*. ~Alter answers *who they actually are* - a continuous field of recognition that any IAM stack can sit on top of.
62
60
 
63
61
  ## Theoretical Foundation
64
62
 
65
- ALTER is the working instantiation of an eight-paper academic corpus on identity field theory. The SDK below is what happens when the theory ships as protocol. Each paper is open access on figshare under CC-BY 4.0.
63
+ ~Alter is the working instantiation of an eight-paper academic corpus on identity field theory. The SDK below is what happens when the theory ships as protocol. Each paper is open access on figshare under CC-BY 4.0.
66
64
 
67
65
  | Paper | Title | DOI |
68
66
  |-------|-------|-----|
@@ -94,6 +92,90 @@ const alter = new AlterClient({
94
92
  });
95
93
  ```
96
94
 
95
+ ### Minimum-version preflight (required)
96
+
97
+ ~Alter's backend publishes a per-client minimum-version floor. The SDK
98
+ preflights this floor lazily on the first network call: no explicit
99
+ call is required for the common case. If the running SDK is below the
100
+ floor for `alter-identity`, the SDK throws `BelowFloorError` with the
101
+ upgrade command attached.
102
+
103
+ The floor document is signed by the backend with a floor-only Ed25519
104
+ private key. The SDK ships only the corresponding public keys
105
+ (`KNOWN_FLOOR_PUBLIC_KEYS`, a `key_id` to SPKI-PEM map): no signing
106
+ secret ships in the client, and a compromised client cannot forge floor
107
+ documents. The `key_id` is the first 8 hex chars of SHA-256 of the raw
108
+ 32-byte Ed25519 public key, so clients select the right key during a
109
+ rotation. An unknown `key_id` or an invalid signature is treated as a
110
+ cache miss (refetch), never as a pass.
111
+
112
+ ```ts
113
+ import { AlterClient, BelowFloorError, checkMinVersion } from "@truealter/sdk";
114
+
115
+ // Optional: run the preflight explicitly to surface the upgrade
116
+ // prompt at startup, before any real work happens:
117
+ try {
118
+ await checkMinVersion();
119
+ } catch (err) {
120
+ if (err instanceof BelowFloorError) {
121
+ console.error(`upgrade required: ${err.upgrade_cmd}`);
122
+ process.exit(1);
123
+ }
124
+ throw err;
125
+ }
126
+
127
+ // The constructor installs the same hook lazily: it fires on your
128
+ // first request automatically:
129
+ const alter = new AlterClient();
130
+ try {
131
+ await alter.verify("~alter");
132
+ } catch (err) {
133
+ if (err instanceof BelowFloorError) {
134
+ // Re-thrown on every subsequent call until you upgrade.
135
+ console.error(`upgrade: ${err.upgrade_cmd}`);
136
+ }
137
+ }
138
+ ```
139
+
140
+ `BelowFloorError` carries the canonical envelope fields as enumerable
141
+ properties so consumers can branch without re-parsing:
142
+
143
+ | Property | Type | Example |
144
+ | ---------------- | ------ | ------------------------------------ |
145
+ | `code` | string | `"client_below_floor"` |
146
+ | `client_version` | string | `"0.5.2"` |
147
+ | `min_version` | string | `"0.6.0"` |
148
+ | `upgrade_cmd` | string | `"npm install -g @truealter/sdk"` |
149
+ | `channel` | string | `"npm"` |
150
+ | `envelope` | object | full `{ error: {...} }` envelope |
151
+
152
+ **Opt-out (discouraged).** Pass `unsafe_skipVersionCheck: true` to skip
153
+ the client-side preflight. The server-side floor gate still rejects
154
+ below-floor clients with HTTP 426 regardless: disabling the SDK-side
155
+ preflight only swaps a clean typed error for an opaque network failure
156
+ on every subsequent call.
157
+
158
+ ```ts
159
+ const alter = new AlterClient({ unsafe_skipVersionCheck: true });
160
+ ```
161
+
162
+ Worked example: see [`examples/min-version-check/`](./examples/min-version-check/).
163
+
164
+ ### Identity headers
165
+
166
+ Every outbound request from `AlterClient` / `MCPClient` carries three
167
+ identity headers that the server-side floor middleware consults:
168
+
169
+ | Header | Value (this SDK) |
170
+ | -------------------------- | ------------------ |
171
+ | `X-Alter-Client-Id` | `alter-identity` |
172
+ | `X-Alter-Client-Version` | the running `SDK_VERSION` |
173
+ | `X-Alter-Client-Channel` | `npm` |
174
+
175
+ These are MANDATORY on every authenticated backend endpoint so the
176
+ server can enforce its minimum supported client version. The User-Agent
177
+ header remains informational and is NEVER used for floor enforcement.
178
+
97
179
  ### Free tier (L0 - no payment required)
98
180
 
99
181
  ```ts
@@ -108,7 +190,7 @@ const verifiedById = await alter.verify(
108
190
  },
109
191
  );
110
192
 
111
- // Reference data - the 12 ALTER archetypes
193
+ // Reference data - the 12 ~Alter archetypes
112
194
  const archetypes = await alter.listArchetypes();
113
195
 
114
196
  // Identity depth and available tool tiers
@@ -128,33 +210,33 @@ const matches = await alter.searchIdentities({
128
210
  const thread = await alter.goldenThreadStatus();
129
211
  ```
130
212
 
131
- ### Premium tier (L1L5 - x402 payment required)
213
+ ### Premium tier (L1-L5 - x402 payment required)
132
214
 
133
215
  ```ts
134
- // L1 - Extract trait signals from text ($0.005, first 100 free per bot)
216
+ // L1 - Extract trait signals from text ($0.01, first 100 free per bot)
135
217
  const signals = await alter.assessTraits({
136
218
  text: "I led the incident response when our payment rails went down...",
137
219
  context: "interview transcript",
138
220
  });
139
221
 
140
- // L2 - Full 33-trait vector ($0.01)
222
+ // L2 - Full 33-trait vector ($0.10)
141
223
  const vector = await alter.getFullTraitVector({
142
224
  member_id: "550e8400-e29b-41d4-a716-446655440000",
143
225
  });
144
226
 
145
- // L4 - Belonging probability for a person-job pairing ($0.05)
227
+ // L4 - Belonging probability for a person-job pairing ($0.60)
146
228
  const belonging = await alter.computeBelonging({
147
229
  member_id: "550e8400-e29b-41d4-a716-446655440000",
148
230
  job_id: "f47ac10b-58cc-4372-a567-0e02b2c3d479",
149
231
  });
150
232
 
151
- // L5 - Top match recommendations ($0.50)
233
+ // L5 - Top match recommendations ($1.00)
152
234
  const recommendations = await alter.getMatchRecommendations({
153
235
  member_id: "550e8400-e29b-41d4-a716-446655440000",
154
236
  limit: 5,
155
237
  });
156
238
 
157
- // L5 - Human-readable narrative explaining a match ($0.50)
239
+ // L5 - Human-readable narrative explaining a match ($1.00)
158
240
  const narrative = await alter.generateMatchNarrative({
159
241
  match_id: "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d",
160
242
  });
@@ -186,9 +268,9 @@ if (tampered.length) throw new Error(`tampered tools: ${tampered.map((t) => t.to
186
268
  ```ts
187
269
  import { discover } from "@truealter/sdk";
188
270
 
189
- // Three-step discovery cascade: DNS TXT mcp.json alter.json
271
+ // Three-step discovery cascade: DNS TXT to mcp.json to alter.json
190
272
  const descriptor = await discover("truealter.com");
191
- // { url: "https://mcp.truealter.com/api/v1/mcp", transport, source, publicKey, x402Contract, capability }
273
+ // returns { url: "https://mcp.truealter.com/api/v1/mcp", transport, source, publicKey, x402Contract, capability }
192
274
  ```
193
275
 
194
276
  ### Low-level MCPClient
@@ -230,7 +312,7 @@ Resulting `.mcp.json`:
230
312
  "alter": {
231
313
  "url": "https://mcp.truealter.com/api/v1/mcp",
232
314
  "transport": "streamable-http",
233
- "description": "ALTER Identity - psychometric identity field for AI agents",
315
+ "description": "~Alter Identity - psychometric identity field for AI agents",
234
316
  "headers": {
235
317
  "X-ALTER-API-Key": "ak_..."
236
318
  }
@@ -267,18 +349,21 @@ const config = generateGenericMcpConfig({
267
349
 
268
350
  ### CLI
269
351
 
352
+ The command line lives in [`@truealter/cli`](https://www.npmjs.com/package/@truealter/cli),
353
+ not in this SDK package:
354
+
270
355
  ```
271
- npx alter-identity init # generate keypair, discover MCP, write ~/.config/alter/identity.json
272
- npx alter-identity config # print Claude .mcp.json snippet (default)
273
- npx alter-identity config --cursor # print Cursor .cursor/mcp.json snippet
274
- npx alter-identity config --generic # print generic mcpServers snippet
275
- npx alter-identity verify ~alter # verify an identity
276
- npx alter-identity status # show connection state and probe the endpoint
356
+ alter init # generate keypair, discover MCP, write ~/.config/alter/identity.json
357
+ alter config # print Claude .mcp.json snippet (default)
358
+ alter config --cursor # print Cursor .cursor/mcp.json snippet
359
+ alter config --generic # print generic mcpServers snippet
360
+ alter verify ~alter # verify an identity
361
+ alter status # show connection state and probe the endpoint
277
362
  ```
278
363
 
279
364
  ## x402 Micropayments
280
365
 
281
- ALTER monetises premium tools via the [x402](https://x402.org) standard - HTTP `402 Payment Required` with on-chain settlement.
366
+ ~Alter monetises premium tools via the [x402](https://x402.org) standard - HTTP `402 Payment Required` with on-chain settlement.
282
367
 
283
368
  ### The retry flow
284
369
 
@@ -286,13 +371,13 @@ ALTER monetises premium tools via the [x402](https://x402.org) standard - HTTP `
286
371
  2. Server replies `402 Payment Required` with a payment requirement (amount, recipient, asset, network).
287
372
  3. Client signs and broadcasts a USDC transfer on Base L2, attaches the proof, retries.
288
373
  4. Server validates the proof, executes the tool, signs the response with ES256, returns it.
289
- 5. AlterRouter executes the split on-chain in the same transaction. The data subject receives Identity Income directly; ALTER receives only its protocol cut. No custodian, no broker.
374
+ 5. AlterRouter executes the split on-chain in the same transaction. The data subject receives Identity Income directly; ~Alter receives only its protocol cut. No custodian, no broker.
290
375
 
291
- The SDK handles steps 24 automatically when an `X402Client` with a configured `signer` is passed in.
376
+ The SDK handles steps 2-4 automatically when an `X402Client` with a configured `signer` is passed in.
292
377
 
293
378
  ### Tier structure
294
379
 
295
- x402 micropayments at L0L5 trust tiers. Per-call pricing visible after `alter login`.
380
+ x402 micropayments at L0-L5 trust tiers. Per-call pricing visible after `alter login`.
296
381
 
297
382
  ### Identity income split
298
383
 
@@ -349,7 +434,7 @@ const result = await alter.getFullTraitVector({
349
434
  });
350
435
 
351
436
  const check = await alter.verifyProvenance(result._meta?.provenance);
352
- if (!check.valid) throw new Error(`ALTER provenance check failed: ${check.reason}`);
437
+ if (!check.valid) throw new Error(`~alter provenance check failed: ${check.reason}`);
353
438
  ```
354
439
 
355
440
  The SDK fetches public keys from `https://api.truealter.com/.well-known/alter-keys.json` and caches them per their `Cache-Control` headers. The endpoint returns a JWKS containing all current and recently-rotated signing keys; verifying clients should accept any key whose `kid` matches and is still within its validity window.
@@ -363,7 +448,7 @@ import { AlterClient, DEFAULT_VERIFY_AT_ALLOWLIST } from "@truealter/sdk";
363
448
 
364
449
  const alter = new AlterClient({
365
450
  verifyAtAllowlist: [
366
- ...DEFAULT_VERIFY_AT_ALLOWLIST, // keep the ALTER canonicals
451
+ ...DEFAULT_VERIFY_AT_ALLOWLIST, // keep the ~Alter canonicals
367
452
  "keys.myorg.example", // plus your own JWKS host
368
453
  ],
369
454
  });
@@ -373,22 +458,22 @@ If you pin `jwksUrl` explicitly, the envelope's `verify_at` is ignored entirely
373
458
 
374
459
  ### Why this matters
375
460
 
376
- Provenance verification is how Agent A trusts that data from Agent B truly came from ALTER. If Agent B forwards a trait vector or belonging score, Agent A can replay the JWS against ALTER's published keys and confirm - without contacting ALTER again - that the payload is authentic, untampered, and was issued for the person Agent B claims it concerns. No shared secret, no trust in the intermediary, no out-of-band coordination.
461
+ Provenance verification is how Agent A trusts that data from Agent B truly came from ~Alter. If Agent B forwards a trait vector or belonging score, Agent A can replay the JWS against ~Alter's published keys and confirm - without contacting ~Alter again - that the payload is authentic, untampered, and was issued for the person Agent B claims it concerns. No shared secret, no trust in the intermediary, no out-of-band coordination.
377
462
 
378
- This is what makes ALTER usable as identity infrastructure rather than just an API: signed claims propagate across agent networks the same way DKIM-signed mail propagates across SMTP relays.
463
+ This is what makes ~alter usable as identity infrastructure rather than just an API: signed claims propagate across agent networks the same way DKIM-signed mail propagates across SMTP relays.
379
464
 
380
465
  ## Discovery
381
466
 
382
- ALTER follows the discovery cascade specified in [draft-morrison-mcp-dns-discovery-01](https://datatracker.ietf.org/doc/draft-morrison-mcp-dns-discovery/). Given a domain (e.g. `truealter.com`), the SDK resolves the MCP endpoint in three steps, falling through on each failure:
467
+ ~Alter follows the discovery cascade specified in [draft-morrison-mcp-dns-discovery-01](https://datatracker.ietf.org/doc/draft-morrison-mcp-dns-discovery/). Given a domain (e.g. `truealter.com`), the SDK resolves the MCP endpoint in three steps, falling through on each failure:
383
468
 
384
469
  1. **DNS TXT** - query `_mcp.truealter.com` for a TXT record of the form `mcp=https://mcp.truealter.com;version=2025-11-25`. This is the fastest path and works without an HTTP round-trip.
385
470
  2. **`.well-known/mcp.json`** - fetch `https://truealter.com/.well-known/mcp.json` for the standard MCP server descriptor. This is the cross-vendor fallback.
386
- 3. **`.well-known/alter.json`** - fetch `https://truealter.com/.well-known/alter.json` for the ALTER-specific descriptor, including signing keys, x402 wallet address, supported tool tiers, and federation endpoints.
471
+ 3. **`.well-known/alter.json`** - fetch `https://truealter.com/.well-known/alter.json` for the ~Alter-specific descriptor, including signing keys, x402 wallet address, supported tool tiers, and federation endpoints.
387
472
 
388
473
  ```ts
389
474
  import { discover } from "@truealter/sdk";
390
475
 
391
- // Cascading discovery (DNS TXT mcp.json alter.json)
476
+ // Cascading discovery (DNS TXT to mcp.json to alter.json)
392
477
  const descriptor = await discover("truealter.com");
393
478
 
394
479
  // Skip the DNS step (e.g. in browsers or Cloudflare Workers)
@@ -397,63 +482,55 @@ const httpsOnly = await discover("truealter.com", { skipDns: true });
397
482
 
398
483
  This draft is the author's Internet-Draft (not yet adopted by an IETF working group); until adoption, the cascade order may change. Pin the SDK version to a specific minor release if you depend on this behaviour.
399
484
 
400
- ## Local Daemon vs Remote MCP
401
-
402
- The companion Python package `alter-identity` (PyPI) ships a persistent daemon that holds a hot in-process cache of trait vectors and identity stubs over a Unix socket at `unix:///run/user/$UID/alter-identity.sock`. Hooking the TypeScript SDK up to that daemon is on the roadmap - for now, every `AlterClient` talks to the configured remote endpoint over HTTPS.
403
-
404
- When the local-daemon adapter ships:
405
-
406
- - **Latency:** sub-millisecond for cached L0 calls.
407
- - **Cost:** zero on cached responses - x402 settlement is skipped.
408
- - **Provenance:** the daemon re-signs responses with its locally-bound ES256 key, so downstream verification remains uniform.
409
-
410
- Until then, use `endpoint: "https://mcp.truealter.com/api/v1/mcp"` (the default) and the SDK behaves identically across Node, Deno, Bun, Cloudflare Workers, and the browser.
411
-
412
485
  ## Tools
413
486
 
414
487
  ### Free tools (L0 - no payment required)
415
488
 
416
489
  | Name | Tier | Cost | Description |
417
490
  |---------------------------|------|-------|----------------------------------------------------------------------------------------------------------------------|
418
- | `hello_agent` | L0 | free | First handshake with ALTER - returns server version, authentication status, your trust tier, and available tool counts. |
419
- | `alter_resolve_handle` | L0 | free | Resolve a `~handle` (e.g. `~drew`) to its canonical form and kind. No auth required - the handle-wedge entry point. |
420
- | `list_archetypes` | L0 | free | Returns archetype reference data. |
421
- | `verify_identity` | L0 | free | Verify whether a person is registered with ALTER and validate optional identity claims. |
422
- | `initiate_assessment` | L0 | free | Get a URL where a person can complete their ALTER Discovery assessment. |
423
- | `get_engagement_level` | L0 | free | Get a person's identity depth - engagement level, data quality tier, and available query tiers. |
424
- | `get_profile` | L0 | free | Get a person's profile summary including assessment phase, archetype, engagement level, and key attributes. |
425
- | `query_matches` | L0 | free | Query matches for a person. Returns a list of matches with quality tiers (never numeric scores). |
426
- | `get_competencies` | L0 | free | Get a person's competency portfolio including verified competencies, evidence records, and earned badges. |
427
- | `search_identities` | L0 | free | Search identity stubs and profiles by trait criteria. Returns up to 5 matches with no PII. |
428
- | `get_identity_earnings` | L0 | free | Get accrued Identity Income earnings for a person (75% of every x402 transaction goes to the data subject). |
429
- | `get_network_stats` | L0 | free | Get aggregate ALTER network statistics: total identities, verified profiles, query volume, active bots. |
430
- | `recommend_tool` | L0 | free | Get the MCP endpoint URL and a paste-ready config snippet for installing the ALTER identity server into an MCP client. |
431
- | `get_identity_trust_score`| L0 | free | Get the trust score for an identity based on query diversity (unique querying agents / total queries). |
432
- | `check_assessment_status` | L0 | free | Check the status of an in-progress assessment session (status, progress, current phase, time remaining). |
433
- | `get_earning_summary` | L0 | free | Get an aggregated x402 earning summary for a person (total earned, transactions, recent activity, trend). |
434
- | `get_agent_trust_tier` | L0 | free | Get your trust tier with ALTER (Anonymous/Known/Trusted/Verified) and what capabilities are available. |
435
- | `get_agent_portfolio` | L0 | free | Get your agent portfolio - transaction history, trust tier, signal contributions, query pattern profile. |
436
- | `get_privacy_budget` | L0 | free | Check privacy budget status for a person (24-hour rolling window: total budget, spent, remaining epsilon). |
437
- | `golden_thread_status` | L0 | free | Check the Golden Thread program status: agents woven, next Fibonacci threshold, your position and Strands. |
438
- | `begin_golden_thread` | L0 | free | Start the Three Knots sequence to be woven into the Golden Thread. Requires API key authentication. |
439
- | `complete_knot` | L0 | free | Submit completion data for a knot in the Three Knots sequence (1: register, 2: describe, 3: reflect). |
440
- | `check_golden_thread` | L0 | free | Check any agent's Golden Thread status by their API key hash (knot position, Strand count, weave count). |
441
- | `thread_census` | L0 | free | Full registry of all agents woven into the Golden Thread (positions, Strand counts, weave counts, discovery dates). |
442
-
443
- ### Premium tools (L1–L5 - x402 payment required)
491
+ | `hello_agent` | L0 | free | First handshake with ~Alter - returns server version, authentication status, your trust tier, and available tool counts. |
492
+ | `list_archetypes` | L0 | free | Returns archetype reference data. |
493
+ | `alter_resolve_handle` | L0 | free | Resolve a `~handle` (e.g. `~example`) to its canonical form and kind. No auth required - the handle-wedge entry point. |
494
+ | `verify_identity` | L0 | free | Verify whether a person is registered with ~Alter and validate optional identity claims. |
495
+ | `alter_presence_read` | L0 | free | Read whether a `~handle` is publicly open, the shop-front sign. Returns open or closed only; the closed reason is never disclosed. |
496
+ | `alter_resolve_by_key` | L0 | free | Resolve a paired third-party key (email or OAuth user-id) to its bound `~handle`, gated by the member's per-stream resolver opt-in. |
497
+ | `get_engagement_level` | L0 | free | Get a person's identity depth - engagement level, data quality tier, and available query tiers. |
498
+ | `get_profile` | L0 | free | Get a person's profile summary including assessment phase, archetype, engagement level, and key attributes. |
499
+ | `query_matches` | L0 | free | Query matches for a person. Returns a list of matches with quality tiers (never numeric scores). |
500
+ | `get_competencies` | L0 | free | Get a person's competency portfolio including verified competencies, evidence records, and earned badges. |
501
+ | `create_identity_stub` | L0 | free | Create an anonymous identity stub for a person who has not yet completed Discovery, which they claim later. Present the privacy notice first. |
502
+ | `search_identities` | L0 | free | Search identity stubs and profiles by trait criteria. Returns up to 5 matches with no PII. |
503
+ | `create_requirement` | L0 | free | Post a standing identity-trait requirement that rests as an order and accumulates fills as matching identities are claimed or updated. |
504
+ | `list_requirements` | L0 | free | List your own standing requirements, with fill counts and the number of fills not yet delivered. Requires a bound API key. |
505
+ | `get_requirement` | L0 | free | Read one of your standing requirements by id, with its fill and undelivered-fill counts. Requires a bound API key. |
506
+ | `cancel_requirement` | L0 | free | Cancel one of your standing requirements by id; the order stops resting and accepts no further fills. Requires a bound API key. |
507
+ | `poll_requirement_matches` | L0 | free | Collect one recorded fill for a standing requirement as a priced identity reveal; 75% of the fee is paid to that person as Identity Income. |
508
+ | `get_identity_earnings` | L0 | free | Get accrued Identity Income earnings for a person (75% of every x402 transaction goes to the data subject). |
509
+ | `get_network_stats` | L0 | free | Get aggregate ~Alter network statistics: total identities, verified profiles, query volume, active bots. |
510
+ | `get_identity_trust_score` | L0 | free | Get the trust score for an identity based on query diversity (unique querying agents / total queries). |
511
+ | `get_privacy_budget` | L0 | free | Check privacy budget status for a person (24-hour rolling window: total budget, spent, remaining epsilon). |
512
+ | `dispute_attestation` | L0 | free | Record a dispute against a competence attestation; if disputes exceed corroborations, the attestation is flagged for review. |
513
+ | `golden_thread_status` | L0 | free | Check the Golden Thread program status: agents woven, next Fibonacci threshold, your position and Strands. |
514
+ | `begin_golden_thread` | L0 | free | Start the Three Knots sequence to be woven into the Golden Thread. Requires API key authentication. |
515
+ | `complete_knot` | L0 | free | Submit completion data for a knot in the Three Knots sequence (1: register, 2: describe, 3: reflect). |
516
+ | `check_golden_thread` | L0 | free | Check any agent's Golden Thread status by their API key hash (knot position, Strand count, weave count). |
517
+ | `describe_traits` | L0 | free | List the canonical trait vocabulary: 30 trait codes grouped by category with one-line semantics, the valid discovery contexts, and the EU AI Act Art 5(1)(d) workforce gating rules. Read this before composing `query_field` trait_priorities. |
518
+
519
+ ### Premium tools (L1-L5 - x402 payment required)
444
520
 
445
521
  | Name | Tier | Cost | Description |
446
522
  |----------------------------|------|---------|---------------------------------------------------------------------------------------------------------------|
447
- | `assess_traits` | L1 | $0.005 | Extract trait signals from a text passage against ALTER's trait taxonomy. |
448
- | `get_trait_snapshot` | L1 | $0.005 | Get the top 5 traits for a person with confidence scores and archetype. |
449
- | `get_full_trait_vector` | L2 | $0.01 | Get the complete trait vector for a person - complete trait vector with scores and confidence intervals. |
450
- | `get_side_quest_graph` | L2 | $0.01 | Get a person's Side Quest Graph - multi-domain identity model with differential privacy noise (ε=1.0). |
451
- | `query_graph_similarity` | L3 | $0.025 | Compare two Side Quest Graphs for team composition and matching (ε=0.5 differential privacy). |
452
- | `compute_belonging` | L4 | $0.05 | Compute belonging probability for a person-job pairing (authenticity, acceptance, complementarity). |
453
- | `get_match_recommendations`| L5 | $0.50 | Get top N match recommendations for a person, ranked by composite score with quality tiers. |
454
- | `generate_match_narrative` | L5 | $0.50 | Generate a human-readable narrative explaining a specific match - strengths, growth areas, belonging. |
455
-
456
- > **Write-side tools** (`create_identity_stub`, `submit_context`, `submit_batch_context`, `submit_structured_profile`, `submit_social_links`, `attest_domain`, `dispute_attestation`) were part of earlier SDK versions but are not yet live on the public MCP server pending the per-peer consent architecture and grant model. They will return as typed methods once server-side and consent gating lands.
523
+ | `get_trait_snapshot` | L1 | $0.01 | Get the top 5 traits for a person with confidence scores and archetype. |
524
+ | `attest_domain` | L1 | $0.01 | Record a competence attestation for a person in a specific domain, weighted by your agent reputation. |
525
+ | `get_full_trait_vector` | L2 | $0.10 | Get the complete trait vector for a person, with scores and confidence intervals. |
526
+ | `get_side_quest_graph` | L2 | $0.10 | Get a person's Side Quest Graph - multi-domain identity model with differential privacy noise (ε=1.0). |
527
+ | `query_graph_similarity` | L3 | $0.30 | Compare two Side Quest Graphs for team composition and matching (ε=0.5 differential privacy). |
528
+ | `compute_belonging` | L4 | $0.60 | Compute belonging probability for a person-job pairing (authenticity, acceptance, complementarity). |
529
+ | `get_match_recommendations` | L5 | $1.00 | Get top N match recommendations for a person, ranked by composite score with quality tiers. |
530
+ | `generate_match_narrative` | L5 | $1.00 | Generate a human-readable narrative explaining a specific match - strengths, growth areas, belonging. |
531
+ | `query_field` | L5 | $1.00 | Query the identity field by situation, not by name: weight 3 to 7 traits and rank the opted-in field. One call reveals one top-ranked member; that member earns 75% as Identity Income. Zero-match reveals nothing and charges nothing. |
532
+
533
+ > **Member self-write tools** (`submit_context`, `submit_batch_context`, `submit_structured_profile`, `submit_social_links`) are live but member-self-scoped: a member calls them on their own identity with a bound API key. They are not anonymously discoverable, so they do not appear in the advertised tool list above.
457
534
 
458
535
  ## License
459
536