Skip to content

Commit 4fd4da9

Browse files
authored
docs: deprecate request options the API ignores (#98)
## Summary Three request options are sent to the API, which never reads them: - **`refresh` on assess.** The API stopped reading it when assessment scoring was removed; every assess is evaluated live. - **`address` and `operator_token` on session create.** `POST /v1/sessions` reads only `context`, `product_name` and `kind`, so a session is never pre-associated with a wallet or a credential. The README examples presented this as a way to "refresh KYC for an existing operator credential", which does nothing. These options are now marked deprecated with the reason, and the README pre-association examples are gone; the `kind: "sign_in"` example stays. Nothing is removed and no signature changes, so existing callers keep compiling. pay's `--refresh` help text says the same. Found in a docs audit by comparing what each SDK sends with what the API route reads. ## Type of change - [ ] Bug fix (no breaking change) - [ ] New feature (no breaking change) - [ ] Breaking change (existing callers must update) - [x] Docs, tests, or internal maintenance only ## Public API None removed. The options gain a deprecation note (`@deprecated` in TypeScript, a docstring line in Python, help text in pay). No release is cut for this alone. ## Test plan Lint, type check and the full test suite pass locally in each repo. ## Checklist - [x] Tests cover the new behavior, and the suite passes locally (no behavior changed) - [x] Lint, format, and type checks pass - [x] Docs and README examples updated if the public surface changed - [x] No secrets, credentials, or personal data in the diff or the tests
1 parent c8aefd4 commit 4fd4da9

2 files changed

Lines changed: 6 additions & 7 deletions

File tree

‎README.md‎

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,8 @@ if (status.status === "verified") {
6464
console.log(status.operator_token); // "opc_...", use for future requests
6565
}
6666

67-
// Optional pre-association: attach the session to a known wallet or refresh KYC
68-
// for an existing operator credential.
69-
await client.createSession({ address: "0x..." });
70-
await client.createSession({ operator_token: "opc_..." }); // KYC refresh
71-
await client.createSession({ kind: "sign_in" }); // registration-only: account sign-in, no identity documents
67+
// Registration-only session: the buyer signs in with an AgentScore account, no identity documents.
68+
await client.createSession({ kind: "sign_in" });
7269
```
7370

7471
### Wallet resolution

‎src/types.ts‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ export interface SignerMatch {
6767
export interface AssessRequest {
6868
address: string;
6969
chain?: string;
70+
/** @deprecated The API ignores this field; every assess is evaluated live. */
7071
refresh?: boolean;
7172
policy?: DecisionPolicy;
7273
/** Optional server-side signer verdicts (wallet-binding + OFAC SDN). See {@link Signer}. */
@@ -421,6 +422,7 @@ export type AipAssessOptions =
421422

422423
export type AssessOptions = {
423424
chain?: string;
425+
/** @deprecated The API ignores this field; every assess is evaluated live. */
424426
refresh?: boolean;
425427
policy?: DecisionPolicy;
426428
operatorToken?: string;
@@ -433,9 +435,9 @@ export type AssessOptions = {
433435
export interface SessionCreateOptions {
434436
context?: string;
435437
product_name?: string;
436-
/** Pre-associate the session with a known wallet (EVM `0x...` or Solana base58). */
438+
/** @deprecated The API ignores this field; a session is not pre-associated with a wallet. */
437439
address?: string;
438-
/** Pre-associate the session with an existing operator credential: e.g. refresh KYC for an `opc_...`. */
440+
/** @deprecated The API ignores this field; a session is not pre-associated with a credential. */
439441
operator_token?: string;
440442
/** Session kind. `'kyc'` (the default) runs identity verification; `'sign_in'` is
441443
* registration-only (the buyer signs in with an AgentScore account, no identity documents)

0 commit comments

Comments
 (0)